]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
cp-tree.h (lang_decl_flags): Remove comdat.
[gcc.git] / gcc / cp / ChangeLog
1 1999-05-02 Mark Mitchell <mark@codesourcery.com>
2
3 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
4 (DECL_COMDAT): Remove definition.
5
6 1999-05-01 Mark Mitchell <mark@codesourcery.com>
7
8 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
9 change.
10
11 1999-04-30 Mark Mitchell <mark@codesourcery.com>
12
13 * class.c (build_vtable): Use build_lang_decl when building
14 vtables, not just build_decl.
15 (prepare_fresh_vtable): Likewise.
16 * decl.c (wrapup_globals_for_namespace): Mark vtables as
17 DECL_EXTERNAL when calling wrapup_global_declarations.
18 * decl2.c (priority_info_s): Add initializations_p and
19 destructions_p members.
20 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
21 when deciding what vtables to write out.
22 (ssdf_decls): New variable.
23 (ssdf_decls_used): Likewise.
24 (start_static_storage_duration_function): Deal with being called
25 multiple times. Avoid inlining this function.
26 (generate_inits_for_priority): Deal with reuse of priority map.
27 (get_priority_info): Clear initializations_p and destructions_p.
28 (do_static_initialization): Tweak comment.
29 (do_static_destruction): Likewise. Fix condition on sentries for
30 destruction.
31 (generate_ctor_or_dtor_function): Call all of the static storage
32 duration functions.
33 (generate_ctor_or_dtor_function_for_priority): Check
34 initializations_p and destructions_p to see what priorities need
35 initialization functions.
36 (finish_file): Rework to generate multiple static storage duration
37 functions, rather than just one.
38
39 * typeck.c (build_const_cast): Tweak last change to handle
40 templates correctly.
41
42 * typeck.c (build_const_cast): Disallow use of const_cast to
43 anything but a pointer or reference type.
44
45 1999-04-30 Nathan Sidwell <nathan@acm.org>
46
47 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
48 signature type.
49
50 1999-04-29 Mark Mitchell <mark@codesourcery.com>
51
52 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
53 (finish_file): Indent comments properly.
54
55 1999-04-29 Richard Henderson <rth@cygnus.com>
56
57 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
58 (do_static_destruction): Likewise.
59
60 1999-04-29 Nathan Sidwell <nathan@acm.org>
61
62 * cp-tree.h (TYPE_NOTHROW_P): New macro.
63 * decl2.c (delete_sanity): Warn on deleting void *.
64 * init.c (build_new_1): Use TYPE_NOTHROW_P.
65 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
66 throwing operator new.
67
68 1999-04-28 Nathan Sidwell <nathan@acm.org>
69
70 * cp-tree.h (build_component_addr): Remove prototype.
71 * typeck.c (build_component_addr): Make static. Remove MSG
72 argument.
73 (build_component_addr): Remove MSG parameter, clean up
74 comment.
75 (build_x_function_call): Use cp_error.
76 (build_unary_op): Adjust call of build_component_addr.
77
78 1999-04-28 Mark Mitchell <mark@codesourcery.com>
79
80 * pt.c (tsubst_friend_class): Check for NULL.
81
82 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
83
84 * search.c (binfo_for_vtable): Initialize bfvi.var.
85
86 1999-04-27 Nathan Sidwell <nathan@acm.org>
87
88 * rtti.c (build_x_typeid): Check rtti is enabled.
89
90 1999-04-26 Mark Mitchell <mark@codesourcery.com>
91
92 * search.c (is_subobject_of_p): Make sure we're looking at the
93 right baseclasses.
94
95 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
96
97 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
98
99 1999-04-23 Mark Mitchell <mark@codesourcery.com>
100
101 * decl2.c (finish_file): Tweak handling of extern inlines so that
102 they are not unnecessarily put out.
103
104 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
105 such as base classes.
106
107 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
108
109 * tree.c (build_exception_variant): Fix typo: use the chain of U,
110 not trying V, while cycling through U.
111
112 1999-04-22 Mark Mitchell <mark@codesourcery.com>
113
114 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
115 preserves_first_arg. Enlarge dummy accordingly.
116 (DECL_TINFO_FN_P): New macro.
117 (SET_DECL_TINO_FN_P): Likeiwse.
118 (DECL_RETURNS_FIRST_ARG): Remove.
119 (DECL_PRESERVES_THIS): Likewise.
120 (DECL_INIT_PRIORITY): New macro.
121 (finish_struct_1): Change prototype.
122 (cat_namespace_levels): Remove prototype.
123 (vtable_decl_p): New prototype.
124 (vtype_decl_p): Likewise.
125 (sigtable_decl_p): Likewise.
126 (walk_globals_pred): New typedef.
127 (walk_globals_fn): Likewise.
128 (walk_globals): New prototype.
129 (walk_namespaces_fn): New typedef.
130 (walk_namespaces): New prototype.
131 (wrapup_globals_for_namespace): Likewise.
132 (walk_vtables): Remove prototype.
133 (walk_sigtables): Likewise.
134 (instantiate_pending_templates): New prototype.
135 * class.c (finish_struct_1): Don't return a value.
136 * decl.h (pending_statics): Remove declaration.
137 * decl.c (walk_namespaces_r): New function.
138 (walk_globals_r): Likewise.
139 (vtable_decl_p): Likewise.
140 (vtype_decl_p): Likewise.
141 (sigtable_decl_p): Likewise.
142 (walk_namespaces): Likewise.
143 (walk_globals_data): New type.
144 (walk_globals): New function.
145 (wrapup_globals_for_namespace): Likewise.
146 (expand_static_init): Remove assertion. Remove redundancy in
147 conditional. Don't put static data members in static_aggregates
148 Tidy.
149 (finish_function): Remove redundancy in conditional. Don't set
150 DECL_RETURNS_FIRST_ARG.
151 (cat_namespace_levels): Remove.
152 * decl2.c: Include splay-tree.h and varray.h.
153 (priority_info_s): New structure.
154 (finish_vtable_vardecl): Change prototype. Adjust for new calling
155 conventions.
156 (prune_vtable_vardecl): Likewise.
157 (finish_sigtable_vardecl): Likewise.
158 (setup_initp): Remove.
159 (do_dtors): Remove.
160 (do_ctors): Remove.
161 (start_static_storage_duration_function): New function.
162 (generate_inits_for_priority): Likewise.
163 (finish_static_storage_duration_function): Likewise.
164 (get_priority_info): Likewise.
165 (do_static_initialization): Likewise.
166 (do_static_destruction): Likewise.
167 (do_static_initialization_and_destruction): Likewise.
168 (generate_ctor_or_dtor_function): Likewise.
169 (generate_ctor_and_dtor_functions_for_priority): Likewise.
170 (pending_statics): Make it a varray.
171 (pending_statics_used): New variable.
172 (saved_inlines): Make it a varray.
173 (saved_inlines_used): New variable.
174 (finish_static_data_member): Change method of updating
175 pending_statics.
176 (mark_inline_for_output): Remove #if 0'd code. Change method of
177 updating saved_inlines.
178 (walk_vtables): Remove.
179 (walk_sigtables): Likewise.
180 (import_export_decl): Use DECL_TINFO_FN_P.
181 (pending_templates): Remove declaration.
182 (maybe_templates): Likewise.
183 (static_aggregates_initp): Likewise.
184 (setup_initp): Likewise.
185 (finish_objects): Simplify.
186 (INITIALIZE_P_IDENTIFIER): New macro.
187 (PRIORITY_IDENTIFIER): New macro.
188 (SSDF_IDENTIFIER): New macro.
189 (initialize_p_decl): New variable.
190 (priority_decl): Likewise.
191 (ssdf_decl): Likewise.
192 (priority_info_map): Likewise.
193 (finish_file): Recode output of static intializers and other
194 file-scope finalization tasks.
195 * error.c (OB_END_TEMPLATE_ID): New macro.
196 (dump_type_real): Use it.
197 (dump_decl): Likewise.
198 (dump_function_name): Likewise.
199 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
200 interface.
201 (check_newline): Use walk_globals, not walk_vtables.
202 * pt.c (pending_tempalte_expansions): Remove.
203 (set_vardecl_interface_info): Likewise.
204 (pending_templates): Make static.
205 (maybe_templates): Likewise.
206 (instantiate_class_template): Adjust call to finish_struct_1.
207 (instantiate_pending_templates): New function.
208 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
209 * tree.c (static_aggregates_initp): Remove.
210 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
211 instead.
212 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
213
214 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
215 with the RTL code RETURN.
216 * hash.h: Regenerated.
217 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
218 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
219 * parse.c: Regenerated.
220 * pt.c: Include varray.h. Include rtl.h since varray.h requires
221 it.
222 (inline_parm_levels): New variable.
223 (inline_parm_levels_used): Likewise.
224 (maybe_begin_member_template_processing): Update them.
225 (maybe_end_member_template_processing): Use them, rather than
226 guessing how many levels to pop.
227
228 * decl.c (make_typename_type): Tighten error-checking.
229
230 1999-04-20 Mark Mitchell <mark@codesourcery.com>
231
232 * cp-tree.h (build_binary_op): Remove unneeded parameter.
233 * class.c (build_vrable_entry_ref): Adjust call to
234 build_binary_op.
235 * decl.c (expand_static_init): Likewise.
236 (grokdeclarator): Likewise.
237 (finish_function): Likewise.
238 * decl2.c (delete_sanity): Likewise.
239 (do_dtors): Likewise.
240 (do_ctors): Likewise.
241 * error.c (dump_type_suffix): Likewise.
242 * expr.c (cplus_expand_expr): Likewise.
243 * init.c (resolve_offset_ref): Likewise.
244 (build_new): Likewise.
245 (build_new_1): Likewise.
246 (build_vec_delete_1): Likewise.
247 (expand_vec_init_catch_clause): Likewise.
248 (build_delete): Likewise.
249 * pt.c (tsubst): Likewise.
250 * rtti.c (synthesize_tinfo_fn): Likewise.
251 * search.c (expand_upcast_fixups): Likewise.
252 (expand_direct_vtbls_init): Likewise.
253 * typeck.c (get_member_function_from_ptrfunc): Likewise.
254 (build_binary_op_nodefault): Likewise.
255 (point_int_sum): Likewise.
256 (pointer_diff): Likewise.
257 (build_unary_op): Likewise.
258 (build_modify_expr): Likewise.
259 (get_delta_difference): Likewise.
260 (build_ptrmemfunc): Likewise.
261 (expand_ptrmemfunc_cst): Likewise.
262
263 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
264
265 * decl.c (grokfndecl): Always call cplus_decl_attributes.
266 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
267
268 1999-04-19 Mark Mitchell <mark@codesourcery.com>
269
270 * cp-tree.h (finish_static_data_member_decl): New function.
271 * decl2.c (finish_static_data_member_decl): Split out from ...
272 (grokfield): Here.
273 * pt.c (instantiate_class_template): Use it here instead of
274 trying to fake it.
275 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
276 finish_static_data_member_decl will do that. Explicit set
277 DECL_EXTERNAL to match non-template processing.
278
279 1999-04-18 Mark Mitchell <mark@codesourcery.com>
280
281 * cp-tree.h (finish_class_definition): Add parameter.
282 * parse.y (structsp): Use it. Don't call pop_scope here.
283 * parse.c: Regenerated.
284 * semantics.c (finish_class_definition): Pop it here.
285
286 1999-04-17 Mark Mitchell <mark@codesourcery.com>
287
288 * decl.c (xref_tag): Revise handling of nested template
289 declarations.
290 * pt.c (check_explicit_specialization): Tweak handling of friend
291 templates in template classes.
292 (tsubst_friend_class): Handle friend declarations for nested
293 member template classes.
294
295 1999-04-16 Mark Mitchell <mark@codesourcery.com>
296
297 * class.c (finish_struct): Remove unused variable.
298 (pushclass): Likewise.
299 (invalidate_class_lookup_cache): Likewise.
300 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
301 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
302 doesn't get obliterated.
303 (make_typename_type): Handle template classes correctly.
304
305 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
306 (storetags): Declare.
307 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
308 (pushclass): Likewise. Use storetags to install tag declarations,
309 not pushtag.
310 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
311 * decl.c (storetags): Make it global.
312 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
313 implicit typename declaration.
314 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
315 * method.c (hack_identifier): Likewise.
316 * search.c (lookup_member): Likewise.
317
318 * decl.c (warn_about_implicit_typename_lookup): New function.
319 (lookup_name_real): Use it. Rework handling of implicit typename
320 extension.
321
322 1999-04-15 Mark Mitchell <mark@codesourcery.com>
323
324 * cp-tree.h (lookup_nested_field): Remove.
325 * class.c (push_nested_class): Handle UNION_TYPEs.
326 (pop_nested_class): Likewise.
327 * decl.c (lookup_name_real): Don't call lookup_nested_field.
328 (start_decl): Use push_nested_class, not just pushclass.
329 (cp_finish_decl): Use pop_nested_class, not just popclass.
330 * search.c (lookup_nested_field): Remove.
331
332 * cp-tree.h (lang_type): Add documentation.
333 * decl2.c (handle_class_head): Create template declarations here,
334 as appropriate.
335 * parse.y (class_head): Return whether or not we entered a new
336 scope, as well as the type named.
337 (named_class_head): Likewise.
338 (named_complex_class_head_sans_basetype): Likewise.
339 (structsp): Adjust accordingly. Pop scope when required.
340 * parse.c: Regenerated.
341 * pt.c (check_default_tmpl_args): Robustify.
342 (redeclare_class_template): Likewise.
343 (instantiate_class_template): An instantiation of an
344 anonymous union is itself an anonymous union.
345 * semantics.c (begin_class_definition): Don't create template
346 declarations here.
347
348 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
349
350 * parse.y (after_type_declarator_intern): New nonterminal.
351 (after_type_declarator): Use it.
352 (direct_after_type_declarator): Likewise. Move above
353 nonnested_type to fix reduce/reduce conflict resolution.
354 (declmods): Reducing from just 'attributes' has EMPTY precedence.
355 * Makefile.in (CONFLICTS): Update.
356
357 * decl.c (define_label): Downgrade error for jumping over a
358 non-POD decl to pedwarn.
359
360 1999-04-14 Mark Mitchell <mark@codesourcery.com>
361
362 * cp-tree.h (popclass): Change declaration.
363 (pop_nested_class): Likewise.
364 (poplevel_class): Remove declaration.
365 * call.c (convert_default_argument): Pass no arguments to
366 popclass.
367 * class.c (finish_struct_1): Likewise.
368 (finish_struct): Likewise.
369 (popclass): Remove argument. Simplify code accordingly.
370 (pop_nested_class): Likewise.
371 * decl.c (poplevel_class): Declare it here, and make it static.
372 (poplevel): Handle class scopes.
373 (poplevel_class): Don't take an rgument. Simplify.
374 (pop_everything): Pass no arguments to pop_nested_class.
375 (cp_finish_decl): Pass no arguments to popclass.
376 (grokdeclarator): Pass no arguments to pop_nested_class.
377 (finish_function): Likewise.
378 * decl2.c (grokfield): Likewise.
379 (pop_scope): Pass no arguments to popclass.
380 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
381 * pt.c (instantiate_class_template): Move call to pushclass, and
382 document. Pass no arguments to popclass.
383 (regenerate_decl_from_template): Likewise.
384
385 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
386
387 * typeck.c (build_unary_op): Handle taking the address of a unique
388 bound non-static member function.
389
390 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
391
392 * lang-options.h (-Wdeprecated): New flag.
393 * decl2.c (warn_deprecated): New flag.
394 (lang_decode_option): Deprecated this-is-variable,
395 external-templates, alt-external-templates.
396 Support -Wdeprecated.
397 * errfn.c (cp_deprecated): New function.
398
399 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
400
401 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
402 of the decls themselves.
403
404 * pt.c (tsubst_function_type): Copy attributes over.
405
406 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
407 and com_interface.
408 * cp-tree.h: Add prototype.
409 * decl.c (init_decl_processing): Set valid_lang_attribute.
410
411 1999-04-13 Mark Mitchell <mark@codesourcery.com>
412
413 * class.c (finish_struct_1): Look at the const-ness of the field's
414 type, not the TREE_READONLY-ness of the declaration.
415 * method.c (synthesize_method): Likewise.
416 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
417 creating new declarations.
418
419 1999-04-13 Mike Stump <mrs@wrs.com>
420
421 * decl2.c (import_export_decl): Because vtables always reference
422 virtual functions, even if they are inlined, don't allow
423 -fno-implement-inlines to not emit them, instead, emit them with
424 the vtable.
425 * decl.c (start_function): Likewise.
426
427 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
428
429 * cp-tree.h (struct lang_type): Add com_interface.
430 (CLASSTYPE_COM_INTERFACE): New macro.
431 * class.c (set_rtti_entry): COM interface classes have no RTTI
432 entries in their vtables; adjust.
433 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
434 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
435 finish_struct_1): Likewise.
436 * decl2.c (mark_vtable_entries): Likewise.
437 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
438 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
439 expand_upcast_fixups): Likewise.
440 * tree.c (debug_binfo): Likewise.
441
442 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
443 * typeck.c (comptypes): If we get it, ignore attributes.
444 * class.c (instantiate_type): Use BASELINK_P. Change complain
445 parameter to flags; 2 means ignore attributes.
446 * call.c (build_op_delete_call): Pass it.
447
448 * decl.c (xref_tag): Only complain once about using a typedef-name
449 with 'struct'. Downgrade to pedwarn.
450
451 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
452
453 * parse.y (absdcl_intern): New nonterminal.
454 (absdcl, direct_abstract_declarator): Use it.
455
456 * pt.c (lookup_template_class): Look through implict typename.
457
458 1999-04-11 Mark Mitchell <mark@codesourcery.com>
459
460 * friend.c (add_friend): Deal gracefully with error_mark_node.
461 * method.c (build_overload_value): Handle pointers-to-members as
462 template parameters.
463
464 * decl.c (push_binding): Fix typo in comment.
465
466 1999-04-10 Mark Mitchell <mark@codesourcery.com>
467
468 * error.c (dump_type_real): If a typename is a template-id, put
469 out the template arguments.
470 (dump_expr): Handle TEMPLATE_ID_EXPR.
471 * pt.c (lookup_template_class): Now that full arguments are
472 available everywhere, remove code that tried to guess them.
473
474 1999-04-09 Mark Mitchell <mark@codesourcery.com>
475
476 * decl.c (make_typename_type): Complain if we don't find a type
477 when trying to make a typename type for a non-template type.
478
479 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
480
481 * decl.c (start_decl): Pass attributes to grokdeclarator.
482 (grokdeclarator): Handle attributes on constructor-syntax
483 initializers.
484
485 1999-04-08 Mark Mitchell <mark@codesourcery.com>
486
487 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
488 don't have types.
489
490 * search.c (template_self_reference_p): Tweak.
491
492 1999-04-07 Mark Mitchell <mark@codesourcery.com>
493
494 * init.c (build_offset_ref): Don't build yet another weird data
495 structure to describe overloaded functions.
496
497 1999-04-06 Mark Mitchell <mark@codesourcery.com>
498
499 * cp-tree.h (BASELINK_P): New macro.
500 (SET_BASELINK_P): Likewise.
501 * init.c (build_member_call): Remove needless assignment in if
502 statement.
503 * search.c (lookup_field_r): Fix handling when we are looking
504 specifically for a type; these are not hidden by functions and
505 variables.
506 (lookup_member): Use SET_BASELINK_P.
507 * tree.c (is_overloaded_fn): Use BASELINK_P.
508 (really_overloaed_fn): Likewise.
509 (get_first_fn): Likewise.
510
511 1999-04-05 Mark Mitchell <mark@codesourcery.com>
512
513 * decl.c (lookup_name_current_level): Tweak, and improve
514 documentation.
515
516 * class.c (maybe_fixup_vptrs): Remove declaration.
517 (build_class_init_list): Likewise.
518 * decl.c (pushdecl_class_level): Call check_template_shadow here
519 ...
520 (push_class_level_binding): ... not here.
521 * search.c (dfs_push_type_decls): Only avoid
522 template-self-reference TYPE_DECLs if they are from base classes.
523
524 1999-04-04 Mark Mitchell <mark@codesourcery.com>
525
526 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
527 nodes. Tidy.
528
529 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
530
531 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
532 (finish_struct_1): Don't call build_class_init_list.
533
534 1999-04-02 Mark Mitchell <mark@codesourcery.com>
535
536 * tinfo.h (__class_type_info): Fix illegal declaration.
537
538 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
539 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
540 (IDENTIFIER_CLASS_VALUE): Improve documentation.
541 (is_properly_derived_from): Declare.
542 (invalidate_class_lookup_cache): Likewise.
543 (maybe_maybe_note_name_used_in_class): Likewise.
544 (note_name_declared_in_class): Likewise.
545 (push_using_decl): Remove duplicate declaration.
546 (id_in_current_class): Remove declaration.
547 (push_class_binding): Change prototype.
548 (clear_identitifer_class_values): Declare.
549 * call.c (is_properly_derived_from): Make it global.
550 (build_new_function_call): Be careful about updating candidates.
551 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
552 asked to make illegal calls.
553 * class.c: Include splay-tree.h.
554 (class_stack_node): Add names_used slot.
555 (check_member_decl_is_same_in_complete_scope): Remove.
556 (add_method): Fix comment. Push the declaration into class
557 scope.
558 (finish_struct_1): When popping the class, pop the bindings too.
559 Remove check for data member/function member conflict.
560 (finish_struct): Remove calls to
561 check_member_decl_is_same_in_complete_scope. Change calls to
562 popclass.
563 (pushclass): Clear names_used in the class stack entry.
564 Use invalidate_class_lookup_cache to remove cached entries, rather
565 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
566 before entering a new class. Remove dead code. Don't mess with
567 current_function_decl when pushing declarations.
568 (invalidate_class_lookup_cache): New function, split out from ...
569 (popclass): Here. Clean up names_used on our way out.
570 (instantiate_type): Adjust.
571 (build_self_reference): Don't push the declaration here.
572 (maybe_note_name_used_in_class): New function.
573 (note_name_declared_in_class): Likewise.
574 * decl.c (add_binding): Change prototype.
575 (find_class_binding_level): New function.
576 (innermost_nonclass_level): Likewise.
577 (current_binding_level): Update documentation.
578 (inner_binding_level): Remove. Replace with current_binding_level
579 throughout.
580 (push_binding_level): Remove special handling of
581 class_binding_level.
582 (pop_binding_level): Likewise. Use find_class_binding_level.
583 (suspend_binding_level): Likewise.
584 (global_bindings_p): Use innermost_nonclass_level.
585 (toplevel_bindings_p): Likewise.
586 (namespace_bindings_p): Likewise.
587 (pseudo_global_level_p): Likewise.
588 (push_binding): Clear INHERITED_VALUE_BINDING_P.
589 (add_binding): Check for illegal multiple declarations. Return a
590 value indicating whether or not the new binding was legal.
591 (push_local_binding): Skip over class binding levels. Check
592 return value from add_binding.
593 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
594 note_name_declared_in_class.
595 (pushlevel_class): Remove "fake out the rest of the compiler"
596 code.
597 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
598 (clear_identifier_class_values): New function.
599 (pop_from_top_level): Use it.
600 (pop_everything): Tweak.
601 (maybe_process_template_type_declaration): Don't push the
602 declaration for the template here.
603 (pushtag): Don't push tag declarations into class scope here.
604 (pushdecl): Apply DeMorgan's law for readability.
605 (pushdecl_class_level): Remove special-case code for
606 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
607 (push_class_level_bindng): Deal with inherited bindings.
608 (lookup_name_real): Remove special-case code for
609 TYPE_BEING_DEFINED, and some implicit typename magic.
610 (grokdeclarator): Handle COMPONENT_REF for a template function.
611 (build_enumerator): Don't call pushdecl_class_level here.
612 (id_in_current_class): Remove.
613 * decl2.c (grokfield): Don't call pushdecl_class_level or
614 check_template_shadow.
615 * errfn.c (cp_file_of): Don't declare.
616 (cp_line_of): Likewise.
617 * error.c (dump_decl): Handle an OVERLOAD.
618 (cp_file_of): Likewise.
619 (cp_line_of): Likewise.
620 * init.c (build_member_call): Handle a COMPONENT_REF.
621 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
622 pushdecl_class_level.
623 * method.c (hack_identifier): Build COMPONENT_REFs for references
624 to member templates as well as member functions. Remove dead
625 code.
626 * parse.y (left_curly): Remove.
627 (nonnested_type): Call maybe_note_name_used_in_class, not
628 pushdecl_class_level.
629 * parse.c: Regenerated.
630 (nested_name_specifier_1): Likewise.
631 * pt.c (check_explicit_specialization): Adjust, for robustness.
632 (check_template_shadow): Handle OVERLOADs.
633 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
634 TEMPLATE_DECL, if appropriate.
635 * search.c (envelope_add_decl): Remove.
636 (dfs_pushdecls): Likewise.
637 (dfs_compress_decls): Likewise.
638 (dfs_push_decls): New function.
639 (dfs_push_type_decls): Likewise.
640 (setup_class_bindings): Likewise.
641 (template_self_reference_p): Likewise.
642 (lookup_field_r): Use it.
643 (looup_member): Remove old comment. Deal with ambiguity.
644 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
645 and remove envelope processing.
646 * semantics.c (begin_class_definition): Let pushclass push
647 declarations for base classes.
648 (finish_member_declaration): Push declarations into class scope.
649 * typeck.c (build_component_ref): Just put an OVERLOAD into the
650 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
651 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
652 * Makefile.in (class.o): Depend on splay-tree.h.
653
654 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
655
656 * cvt.c (convert_pointer_to_real): Use same_type_p.
657 * typeck.c (comp_target_types): Use same_type_p.
658
659 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
660
661 * semantics.c (begin_inline_definitions,
662 finish_inline_definitions): Rename from finish_default_args and
663 begin_inline_definitions, respectively, to something that isn't a
664 total lie. :)
665 * parse.y (structsp): Adjust.
666
667 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
668 (list_hash_lookup): Likewise.
669 (hash_tree_chain): Adjust.
670 * pt.c (tsubst): Adjust.
671 (tsubst_arg_types): Use plain hash_tree_cons.
672 * cp-tree.h (hash_tree_cons_simple): Lose.
673 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
674
675 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
676
677 * Makefile.in (hash.h): Generate using gperf language 'C', not
678 'KR-C', so gperf uses the `const' keyword on strings.
679
680 * gxx.gperf (resword): Const-ify a char*.
681
682 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
683
684 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
685 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
686 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
687 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
688 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
689 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
690 tree.c: Adjust.
691
692 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
693
694 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
695
696 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
697
698 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
699
700 1999-03-27 Mark Mitchell <mark@codesourcery.com>
701
702 * cp-tree.h (add_friend): Declare.
703 (add_friends): Likewise.
704 * friend.c (add_friend): Make it global. Don't add to
705 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
706 (add_friends): Make it global.
707 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
708 befriending class is a template.
709 * parse.y (component_decl_1): Fix typo in comment.
710 * parse.c: Regenerated.
711 * pt.c (instantiate_class_template): Use add_friend and
712 add_friends rather that duplicating some of their functionality
713 here.
714
715 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
716
717 * call.c (build_field_call): Unify 'this' and non-'this' cases.
718
719 * typeck.c (build_indirect_ref): Check for 'this' sooner.
720
721 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
722
723 * call.c (op_error): Const-ify a char*.
724 (add_candidate, source_type, add_warning): Add static prototype.
725 (print_z_candidates): Const-ify a char*.
726
727 * class.c (resolve_address_of_overloaded_function,
728 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
729 (get_vtable_name, finish_struct_1): Const-ify a char*.
730
731 * cvt.c (convert_to_reference): Likewise.
732
733 * decl.c (redeclaration_error_message, record_builtin_type,
734 record_unknown_type, member_function_or_else, bad_specifiers):
735 Likewise.
736 (find_binding, select_decl, unqualified_namespace_lookup,
737 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
738 Add static prototype.
739 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
740 implicitly_declare, record_builtin_java_type, define_function,
741 grok_op_properties, tag_name): Const-ify a char*.
742
743 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
744 (define_function, finish_builtin_type): Const-ify a char*.
745 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
746 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
747 (file_name_nondirectory): Const-ify a char*.
748 (init_filename_times): Don't prototype.
749 (compiler_error): Prototype.
750 (yyerror, init_repo): Const-ify a char*.
751 (build_srcloc): Don't prototype.
752 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
753 Const-ify a char*.
754 (warn_for_assignment): Don't prototype.
755 (convert_for_initialization, readonly_error, check_for_new_type,
756 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
757 Const-ify a char*.
758
759 * decl2.c (acceptable_java_type, output_vtable_inherit,
760 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
761 merge_functions, decl_namespace, validate_nonmember_using_decl,
762 do_nonmember_using_decl): Add static prototype.
763 (lang_f_options): Const-ify a char*.
764 (finish_builtin_type): Likewise.
765 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
766 prototype.
767
768 * errfn.c: Include cp-tree.h.
769 (cp_thing): Add static prototype.
770 (compiler_error): Don't protoptype.
771 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
772 passing it to `cp_thing'.
773
774 * error.c (interesting_scope_p): Add static prototype.
775
776 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
777 a char*.
778
779 * init.c (compiler_error): Don't prototype.
780 (member_init_ok_or_else): Const-ify a char*.
781 (build_java_class_ref): Add static prototype.
782
783 * lex.c (compiler_error): Don't prototype.
784 (get_time_identifier, interface_strcmp, extend_token_buffer,
785 handle_cp_pragma): Const-ify a char*.
786 (is_global, init_filename_times): Add static prototype.
787 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
788 (compiler_error): Change from fixed args to variable args.
789 (yyerror): Const-ify a char*.
790
791 * parse.y (cond_stmt_keyword): Const-ify a char*.
792 (parse_decl): Add static prototype.
793
794 * pt.c (template_args_equal, print_template_context): Likewise.
795 (print_candidates, check_default_tmpl_args): Const-ify a char*.
796 (instantiate_class_template): Likewise.
797
798 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
799
800 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
801 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
802
803 * search.c (lookup_field_info, lookup_member): Likewise.
804 (lookup_member): Cast the first argument of `bzero' to a PTR.
805
806 * sig.c (compiler_error): Don't prototype.
807 (build_signature_pointer_or_reference_nam): Const-ify a char*.
808 (get_sigtable_name, build_member_function_pointer): Likewise.
809
810 * tree.c (compiler_error): Don't prototype.
811 (no_linkage_helper, build_srcloc): Add static prototype.
812 (build_vbase_pointer_fields): Const-ify a char*.
813 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
814
815 * typeck.c (compiler_error): Don't prototype.
816 (convert_for_assignment): Const-ify a char*.
817 (comp_cv_target_types): Add static prototype.
818 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
819 build_component_addr, build_unary_op, convert_for_initialization):
820 Const-ify a char*.
821
822 * typeck2.c (ack): Add static prototype and change from fixed args
823 to variable args.
824 (readonly_error, check_for_new_type): Const-ify a char*.
825
826 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
827 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
828 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
829 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
830 gen_assign, GNU_xref_member): Const-ify a char*.
831
832 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
833
834 * gxxint.texi: Remove old discussion on copying virtual bases.
835
836 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
837
838 * Make-lang.in: Remove all references to g++.o/g++.c.
839 Link g++ from gcc.o.
840
841 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
842
843 * decl2.c (comdat_linkage): Treat vtables like functions.
844
845 1999-03-25 Mark Mitchell <mark@codesourcery.com>
846
847 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
848
849 1999-03-25 Nathan Sidwell <nathan@acm.org>
850
851 * decl.c (init_decl_processing): Add `signed' type as a synonym
852 for `int'.
853
854 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
855
856 * typeck.c (common_type): Handle cv-qual unification for pointers
857 to members.
858
859 * decl.c (unqualified_namespace_lookup): Return error_mark_node
860 on error.
861 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
862 * lex.c (do_identifier): If we got error_mark_node, call
863 lookup_name again.
864
865 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
866
867 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
868 classes.
869
870 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
871
872 * decl.c (lookup_name_real): Do nested field lookup regardless of
873 TYPE_BEING_DEFINED.
874
875 1999-03-24 Mark Mitchell <mark@codesourcery.com>
876
877 * cp-tree.h (lang_type): Remove has_assignment and
878 has_real_assignment. Add befriending_classes.
879 (TYPE_HAS_ASSIGNMENT): Remove.
880 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
881 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
882 (lang_decl): Document.
883 (DECL_BEFRIENDING_CLASSES): New macro.
884 (FRIEND_NAME): Move declaration to more obvious location.
885 (FRIEND_DECLS): Likewise.
886 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
887 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
888 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
889 (grok_op_properties): Likewise.
890 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
891 (add_friend): Likewise. Don't do weird things with assignment
892 operators. Update DECL_BEFRIENDING_CLASSES.
893 (add_friends): Don't do weird things with assignment operators.
894 (make_friend_class): Likewise. Update
895 CLASSTYPE_BEFRIENDING_CLASSES.
896 * pt.c (instantiate_class_template): Don't set
897 TYPE_HAS_ASSIGNMENT.
898 (tsubst_copy): Substitute the TREE_TYPE for more unary
899 expressions.
900 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
901 * search.c (protected_accessible_p): New function.
902 (friend_accessible_p): Likewise.
903 (accessible_p): Use them.
904
905 1999-03-23 Mark Mitchell <mark@codesourcery.com>
906
907 * pt.c (convert_nontype_argument): Don't create things that aren't
908 PTRMEM_CSTs when applying a qualification conversion to a
909 PTRMEM_CST.
910
911 1999-03-23 Mark Mitchell <mark@codesourcery.com>
912
913 * Makefile.in (OBJS): Don't mention hash.o.
914 (OBJDEPS): Likewise.
915
916 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
917
918 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
919 * decl.c (expand_static_init): Make sure we don't add any after
920 then.
921
922 * decl.c (cp_finish_decl): Move intelligence about handling
923 DECL_COMDAT for variables from here...
924 * decl2.c (comdat_linkage): ...to here.
925 (maybe_make_one_only): Tweak.
926 (import_export_decl): Call comdat_linkage for variables, too.
927 (finish_file): Handle template statics properly.
928
929 1999-03-22 Mark Mitchell <mark@codesourcery.com>
930
931 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
932 Document internals of pointer-to-member-functions.
933 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
934 (PFN_FROM_PTRMEMFUNC): Likewise.
935 (build_type_conversion): Remove unused parameter.
936 (build_ptrmemfunc1): Declare.
937 (expand_ptrmemfunc_cst): New function.
938 (delta2_from_ptrmemfunc): Likewise.
939 (pfn_from_ptrmemfunc): Likewise.
940 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
941 build_type_conversion. Use TYPE_PTRMEM_P for readability.
942 (convert_to_reference): Remove unused parameter to
943 build_type_conversion.
944 (ocp_convert): Likewise.
945 (build_user_type_conversion): Likewise.
946 * error.c (dump_expr): Handle NULL pointer-to-member functions.
947 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
948 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
949 open when handling pointer-to-member functions.
950 * pt.c (convert_nontype_argument): Clean up error messages. Be
951 more stringent with pointers-to-members.
952 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
953 (build_unary_op): Tidy ever-so-slightly.
954 (build_conditional_expr): Remove extra parameter to
955 build_type_conversion.
956 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
957 we're using.
958 (expand_ptrmemfunc_cst): Define.
959 (delta2_from_ptrmemfunc): Likewise.
960 (pfn_from_ptrmemfunc): Likewise.
961
962 1999-03-19 Mark Mitchell <mark@codesourcery.com>
963
964 * init.c (build_member_call): Handle template-id expressions
965 correctly.
966 * typeck.c (build_x_function_call): Likewise.
967
968 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
969
970 * friend.c (make_friend_class): Avoid core dump when
971 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
972
973 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
974
975 * decl.c (start_function): Suppress normal linkage heuristics
976 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
977
978 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
979
980 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
981 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
982
983 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
984
985 * parse.y (named_complex_class_head_sans_basetype):
986 Do not push a scope for error_mark_node.
987 (maybe_base_class_list): Likewise.
988
989 * decl.c (start_decl): Check for error_mark_node as a type.
990 Detected by g++.brendan/array-refs.C.
991 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
992 (maybe_build_cleanup_1): Likewise. Detected by
993 g++.jason/incomplete1.C.
994
995 * tree.c (build_dummy_object): Use void_zero_node instead of the
996 error_mark_node.
997 (is_dummy_object): Check for such a node.
998 Detected by g++.bob/inherit1.C
999
1000 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
1001
1002 * method.c (old_backref_index): Split out...
1003 (flush_repeats): From here. Rename back from try_old_backref.
1004 (build_mangled_name): Put back some old-style repeat handling.
1005
1006 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1007
1008 * lex.c: Don't include setjmp.h.
1009 (parse_float): New static function.
1010 (pf_args): New struct.
1011 (real_yylex): Use them in call to `do_float_handler'.
1012
1013 1999-03-15 Mark Mitchell <mark@markmitchell.com>
1014
1015 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
1016 * tree.c (layout_basetypes): Not here.
1017 * search.c (dfs_search): Remove; no longer used.
1018
1019 1999-03-12 Mark Mitchell <mark@markmitchell.com>
1020
1021 * decl2.c (validate_nonmember_using_decl): Issue sensible
1022 error-messages on bogus qualifiers.
1023
1024 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
1025
1026 * call.c (add_function_candidate): Fix uninitialized variable.
1027
1028 * Makefile.in (search.o): Add dependency on varray.h.
1029
1030 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
1031
1032 * decl.c (duplicate_decls): Use same_type_p.
1033 * method.c (try_old_backref): Renamed from flush_repeats. Use
1034 same_type_p. Don't try to handle repeats. Return success.
1035 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
1036 calls from old-style code, too.
1037 (check_ktype): Use same_type_p.
1038 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
1039 (build_qualified_name): Simplify logic.
1040 (process_overload_item): Strip typedefs and quals at the top.
1041 (build_mangled_name_for_type_with_Gcode): Remove call to
1042 type_canonical_variant.
1043 (build_mangled_name): Likewise. Remove support for old-style
1044 repeats, which have been disabled since 2.7.2. Don't mess with
1045 TREE_USED.
1046 (build_decl_overload_real): Don't mess with TREE_USED.
1047
1048 1999-03-13 Nathan Sidwell <nathan@acm.org>
1049
1050 * error.c (cp_printers): Add 'F' escape character.
1051 (dump_type_real): Remove TREE_LIST (fnargs) printing.
1052 Functionality moved to dump_parameters.
1053 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
1054 (dump_function_decl): Extend meaning of V parameter. Use
1055 dump_parameters and dump_exception_spec.
1056 (dump_parameters): New static function.
1057 (dump_exception_spec): New static function.
1058 (fndecl_as_string): Change argument semantics. Use
1059 dump_function_decl directly.
1060
1061 * sig.c (build_signature_table_constructor): Use cp_error.
1062
1063 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
1064
1065 * semantics.c (finish_switch_cond): Handle error cases gracefully.
1066 Detected by g++.law/enum5.C.
1067
1068 * typeck.c (build_modify_expr): Check for errors after resolving
1069 offsets. Detected by g++.brendan/static1.C.
1070
1071 * decl.c (complete_array_type): Ignore initial_value if it is an
1072 error. Detected by g++.benjamin/17930.C.
1073
1074 * typeck2.c (process_init_constructor): Return error if one argument
1075 is in error. Detected by g++.benjamin/13478.C.
1076
1077 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
1078
1079 * decl.c (select_decl): Allow class templates when we need types.
1080 * decl2.c (ambiguous_decl): Likewise.
1081
1082 1999-03-12 Mark Mitchell <mark@markmitchell.com>
1083
1084 * lex.c (do_identifier): Correct call to enforce_access.
1085 * search.c (accessible_p): Tweak comment.
1086
1087 1999-03-10 Mark Mitchell <mark@markmitchell.com>
1088
1089 * semantics.c (begin_class_definition): Call build_self_reference.
1090 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
1091
1092 * search.c (assert_canonical_unmarked): Fix typo in prototype.
1093
1094 * search.c (dfs_canonical_queue): New function.
1095 (dfs_assert_unmarked_p): Likewise.
1096 (assert_canonical_unmarked): Likewise.
1097 (access_in_type): Use it.
1098 (accessible_p): Likewise. Walk the whole tree when umarking.
1099
1100 * sig.c (build_signature_table_constructor): Use accessible_p
1101 instead of compute_access.
1102
1103 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
1104
1105 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
1106
1107 1999-03-09 Mark Mitchell <mark@markmitchell.com>
1108
1109 * cp-tree.h (flag_access_control): Declare.
1110 (TREE_VIA_PPUBLIC): Document.
1111 (DECL_NONSTATIC_MEMBER_P): New macro.
1112 (enforce_access): Return an indication of whether or not access
1113 was permitted.
1114 (build_self_reference): Change prototype.
1115 (compute_access): Replace with ...
1116 (accessible_p): New function.
1117 (dfs_walk): Change prototype.
1118 (dfs_unmark): Likewise.
1119 (markedp): Likewise.
1120 * call.c (enforce_access): Use accessible_p.
1121 * class.c (build_self_reference): Insert the declaration into the
1122 list of members for this type, and make it public.
1123 * decl.c (xref_basetypes): Avoid ill-timed recursion.
1124 * init.c (build_offset_ref): Use lookup_member, not three separate
1125 name-lookups. Call enforce_access rather than checking for
1126 illegal accesses here.
1127 (resolve_offset_ref): Likewise.
1128 * lex.c (do_identifier): Likewise.
1129 * method.c (hack_identifier): Likewise.
1130 * parse.y (self_reference): Remove.
1131 (opt_component_decl_list): Don't use it.
1132 * parse.c: Regenerated.
1133 * pt.c (print_candidates): Generalize to handle lists of
1134 overloaded functions.
1135 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
1136 not set.
1137 (get_template_base): Use new calling convention for dfs_walk.
1138 * search.c: Include varray.h. Add prototypes.
1139 (dfs_walk): Accept a data pointer to pass to the work functions.
1140 All callers changed. All work functions changed.
1141 (breadth_first_search): Rename to bfs_walk, and make consistent
1142 with dfs_walk.
1143 (dfs_walk_real): New function.
1144 (canonical_binfo): New function.
1145 (context_for_name_lookup): Likewise.
1146 (shared_marked_p): Likewise.
1147 (shared_unmarked_p): Likewise.
1148 (lokup_field_queue_p): Likewise.
1149 (lookup_field_r): Generalize to handle both functions and fields.
1150 (lookup_field): Just call lookup_member.
1151 (lookup_fnfields): Likewise.
1152 (lookup_member): Move body of lookup_field here and generalize.
1153 (dfs_accessible_queue_p): Likewise.
1154 (dfs_accessible_p): Likewise.
1155 (dfs_access_in_type): Likewise.
1156 (access_in_type): Likewise.
1157 (compute_access): Remove, and replace with ...
1158 (accessible_p): New function.
1159 (vbase_types): Remove.
1160 (vbase_decl_ptr_intermediate): Likewise.
1161 (vbase_decl_ptr): Likewise.
1162 (vbase_init_result): Likewise.
1163 (closed_envelopes): Likewise.
1164 (bvtable): Likewise.
1165
1166 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
1167
1168 * call.c (add_function_candidate): Check for proper number of args
1169 before checking the validity of those args.
1170
1171 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
1172
1173 * cp-tree.h (struct lang_type): Add anon_union field.
1174 (ANON_UNION_TYPE_P): Use it instead of examining type.
1175 (SET_ANON_UNION_TYPE_P): New macro.
1176 * decl.c (check_tag_decl): Use it.
1177
1178 * search.c (compute_access): Handle non-type contexts earlier, and
1179 handle NULL_TREE.
1180
1181 * tree.c (build_exception_variant): Use copy_to_permanent.
1182
1183 * decl2.c (setup_initp): Give statics with no priority the default
1184 priority here.
1185 (do_dtors, do_ctors, finish_file): Remove special handling of
1186 non-prioritized statics.
1187
1188 1999-03-05 Mark Mitchell <mark@markmitchell.com>
1189
1190 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
1191 * decl.c (make_typename_type): Don't issue an error if an
1192 immediate lookup fails; it migt be resolved later.
1193 * friend.c (is_friend): Add comment.
1194 * search.c (breadth_first_search): Add POSTFN and DATA
1195 parameters. Tidy. All callers changed.
1196 (lookup_field_queue_p): New function.
1197 (lookup_field_r): Likewise.
1198 (lookup_field_post): Likewise.
1199 (lookup_field): Use them, via breadth_first_search, instead of
1200 duplicating logic.
1201 (compute_access): Robustify.
1202 (lookup_fnfield_info): New structure.
1203
1204 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
1205
1206 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
1207
1208 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
1209
1210 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
1211 cc happy.
1212
1213 * decl2.c (import_export_class): Also return if
1214 CLASSTYPE_INTERFACE_ONLY is set.
1215
1216 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
1217
1218 * decl.c (push_overloaded_decl): Only overwrite the old binding if
1219 there was one.
1220 * decl2.c (do_local_using_decl): Fix loop termination.
1221
1222 1999-03-02 Mark Mitchell <mark@markmitchell.com>
1223
1224 * cp-tree.h (determine_specialization): Don't declare.
1225 * pt.c (determine_specialization): Make it static. Eliminate
1226 complain parameter. Note that decl is always non-NULL now, and
1227 simplify accordingly.
1228
1229 * decl.c (maybe_push_to_top_level): Always call
1230 push_cp_function_context.
1231 (pop_from_top_level): Always call pop_cp_function_context.
1232
1233 1999-02-26 Nathan Sidwell <nathan@acm.org>
1234
1235 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
1236 diagnostics.
1237 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
1238 * init.c (build_new_1): Extra arg to complete_type_or_else.
1239 (build_delete): Likewise.
1240 * typeck.c (require_complete_type): Likewise.
1241 (pointer_int_sum): Likewise.
1242 (pointer_diff): Likewise.
1243 (build_component_ref): Likewise.
1244
1245 * typeck2.c (incomplete_type_error): Always use cp_error.
1246 Show declaration of undefined type, if appropriate.
1247 Deal with UNKNOWN_TYPE nodes.
1248
1249 * typeck.c (require_complete_type): Use TYPE_SIZE as
1250 size_zero_node to mean incomplete type.
1251 (require_complete_type_in_void): New function.
1252 (build_compound_expr): Call complete_type_in_void for LHS.
1253 (build_c_cast): Call complete_type_in_void for void cast.
1254 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
1255 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
1256 require_complete_type_in_void. Call it.
1257 * cp-tree.h (require_complete_type_in_void): Prototype new function.
1258
1259 * typeck.c (convert_arguments): Use alternative format for
1260 function decls. Don't require_complete_type here. Simplify
1261 diagnostic printing.
1262 (convert_for_initialization): Don't require_complete_type on RHS yet.
1263 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
1264
1265 * call.c (build_over_call): Cope with qualified void return type.
1266 * semantics.c (finish_call_expr): Likewise.
1267 * typeck.c (build_function_call_real): Likewise.
1268 (c_expand_return): Likewise.
1269 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
1270
1271 * call.c (print_z_candidates): Use alternate print format, to be
1272 consistent with (pt.c) print_candidates.
1273 * method.c (hack_identifier): List candidate members.
1274 * search.c (lookup_field): Build ambiguous list, and show it, if
1275 ambiguous.
1276
1277 1999-02-26 Mark Mitchell <mark@markmitchell.com>
1278
1279 * typeck.c (decay_conversion): Don't confuse constant array
1280 variables with their initializers.
1281
1282 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
1283 merging decls.
1284 * pt.c (regenerate_decl_from_template): Tweak for clarity.
1285 (instantiate_decl): Mark a decl instantiated before regenerating
1286 it to avoid recursion.
1287 * tree.c (mapcar): Don't call decl_constant_value unless we know
1288 something is TREE_READONLY_DECL_P.
1289
1290 * class.c (check_for_override): Don't stop checking when we find
1291 the first overridden function. Delete #if 0'd code.
1292 * search.c (get_matching_virtual): Likewise.
1293
1294 1999-02-25 Richard Henderson <rth@cygnus.com>
1295
1296 * lang-specs.h: Define __FAST_MATH__ when appropriate.
1297
1298 1999-02-24 Mike Stump <mrs@wrs.com>
1299
1300 * typeck.c (convert_for_assignment): Allow boolean integral constant
1301 expressions to convert to null pointer.
1302
1303 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
1304
1305 * decl.c (lookup_namespace_name): Resolve namespace aliases.
1306
1307 * class.c (push_nested_class): Allow namespaces.
1308
1309 * decl2.c (set_decl_namespace): Add friendp parameter.
1310 * decl.c (grokfndecl): Pass it.
1311 (grokvardecl): Likewise.
1312 * cp-tree.h: Change declaration.
1313
1314 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
1315
1316 * pt.c (tsubst): Allow an array of explicit size zero.
1317
1318 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
1319
1320 * errfn.c: Change varargs code to look like toplev.c.
1321
1322 * method.c (process_modifiers): Don't prepend 'U' for char or
1323 wchar_t.
1324
1325 1999-02-20 Craig Burley <craig@jcb-sc.com>
1326
1327 * Make-lang.in (cplib2.ready): Don't consider updating
1328 cplib2 stuff if the current directory isn't writable, as
1329 it won't work (such as during a `make install').
1330
1331 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
1332
1333 * decl2.c (start_objects): Make file scope constructors and
1334 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
1335 ASM_OUTPUT_DESTRUCTOR are defined.
1336
1337 1999-02-19 Mark Mitchell <mark@markmitchell.com>
1338
1339 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
1340 (fn_type_unification): Adjust prototype.
1341 (lookup_fnfields_1): Declare.
1342 * call.c (add_template_candidate_real): Adjust call to
1343 fn_type_unification.
1344 * class.c (add_method): Don't allow duplicate declarations of
1345 constructors or destructors.
1346 (resolve_address_of_overloaded_function): Remove unused variable.
1347 Adjust call to fn_type_unification.
1348 * decl.c (grokfndecl): Be more robust in the face of illegal
1349 specializations.
1350 * decl2.c (check_classfn): Remove hokey handling of member
1351 templates.
1352 * pt.c (determine_specialization): Improve comments. Adjust to
1353 handle template argument deduction as per the standard.
1354 (check_explicit_specialization): Fix comment spacing. Handle
1355 type-conversion operators correctly. Improve error-recovery.
1356 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
1357 (get_bindings_real): Simplify handling of static members.
1358 * search.c (lookup_fnfields_1): Make it have external linkage.
1359 * typeck.c (compparms): Fix comment.
1360 (build_unary_op): Don't try to figure out which template
1361 specialization is being referred to when when the address-of
1362 operator is used with a template function.
1363
1364 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1365
1366 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
1367 keyword to match an analogous change at the top level.
1368
1369 * tree.c (lvalue_or_else): Likewise.
1370
1371 1999-02-17 Mark Mitchell <mark@markmitchell.com>
1372
1373 * decl.c (xref_basetypes): Comment.
1374 * pt.c (instantiate_class_template): Use xref_basetypes.
1375
1376 1999-02-16 Mark Mitchell <mark@markmitchell.com>
1377
1378 * cp-tree.h (tsubst): Change prototype.
1379 (tsubst_expr): Likewise.
1380 (tsubst_copy): Likewise.
1381 (type_unification): Remove prototype.
1382 * call.c (convert_default_arg): Adjust call to tsubst_expr.
1383 * class.c (resolve_address_of_overloaded_function): Just use
1384 fn_type_unification.
1385 * decl.c (grokdeclarator): Adjust call to tsubst.
1386 * method.c (build_template_parm_names): Likewise.
1387 * pt.c (GTB_VIA_VIRTUAL): New macro.
1388 (GTB_IGNORE_TYPE): Likewise.
1389 (resolve_overloaded_unification): Add `complain' parameter.
1390 (try_one_overload): Likewise.
1391 (tsubst_template_arg_vector): Likewise.
1392 (tsubst_template_parms): Likewise.
1393 (tsubst_aggr_type): Likewise.
1394 (tsubst_arg_types): Likewise.
1395 (tsubst_call_declarator_parms): Likewise.
1396 (unify): Remove explicit_mask.
1397 (type_unification_real): Likewise.
1398 (get_template_base_recursive): Likewise.
1399 (coerce_template_template_parms): Provide prototype.
1400 (tsubst_function_type): Likewise.
1401 (try_class_unification): New function.
1402 All callers changed to use new complain parameter.
1403 (get_template_base): Use try_class_unification.
1404 (unify): Adjust handling of classes derived from template types.
1405 (fn_type_unification): Substitute explicit arguments before
1406 unification.
1407
1408 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
1409
1410 * decl.c (pushdecl): Remove dead code.
1411
1412 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
1413
1414 * decl2.c (finish_objects): Fix code I missed in previous change.
1415
1416 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
1417
1418 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
1419 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
1420
1421 * pt.c (maybe_process_partial_specialization): Complain about
1422 'template <>' on non-specialization.
1423
1424 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
1425
1426 * decl.c (grokdeclarator): Catch wierd declarators.
1427 * decl2.c (finish_file): Don't abort because of namespace parsing
1428 failure.
1429 (check_decl_namespace): Remove.
1430
1431 1999-02-09 Mark Mitchell <mark@markmitchell.com>
1432
1433 * cp-tree.h (get_template_base): Don't declare.
1434 (dfs_walk): Declare.
1435 (dfs_unmark): Likewise.
1436 (markedp): Likewise.
1437 * pt.c (unify): Remove duplicate declaration. Pass tparms and
1438 targs to get_template_base.
1439 (get_template_base_recursive): Move here from search.c. Check to
1440 see that the base found can be instantiated to form the desired
1441 type.
1442 (get_template_base): Likewise.
1443 (get_class_bindings): Simplify.
1444 * search.c (get_template_base_recursive): Move to pt.c.
1445 (get_template_base): Likewise.
1446 (markedp): Make it global.
1447 (dfs_walk): Likewise.
1448 (dfs_unmark): Likewise.
1449
1450 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
1451
1452 * pt.c (maybe_process_partial_specialization): Complain about
1453 specialization in wrong namespace.
1454 * tree.c (decl_namespace_context): New fn.
1455
1456 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
1457
1458 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
1459 * pt.c (coerce_template_template_parms): Handle nested
1460 template template parameters.
1461
1462 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
1463
1464 * typeck2.c: Update email addresses.
1465
1466 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
1467
1468 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
1469 turned off.
1470
1471 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
1472
1473 * lex.c (retrofit_lang_decl): Split out...
1474 (build_lang_decl): From here.
1475 * decl.c (pushdecl): Call it for functions generated by the middle
1476 end that don't have DECL_LANG_SPECIFIC.
1477 * cp-tree.h: Declare it.
1478
1479 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
1480 (start_objects, finish_objects): Only use special
1481 init_priority code if the user specified a priority.
1482 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
1483 objects.
1484
1485 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
1486
1487 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
1488 mkstemp.o. Get them from libiberty now.
1489 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
1490
1491 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1492
1493 * decl2.c (lang_decode_option): Use read_integral_parameter.
1494
1495 1999-02-01 Mark Mitchell <mark@markmitchell.com>
1496
1497 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
1498 before calling complete_type_or_else.
1499
1500 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1501
1502 * input.c (inline): Don't define, its handled by system.h.
1503
1504 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
1505
1506 * decl2.c: Don't define flag_no_ident here. Don't process
1507 -f(no-)ident here.
1508 * cp-tree.h: Don't declare flag_no_ident here.
1509 * lang-specs.h: Map -Qn to -fno-ident.
1510
1511 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
1512
1513 * cp-tree.h (struct tree_binding): Replace scope field with a union.
1514 (BINDING_SCOPE): Adjust.
1515 * decl.c (BINDING_LEVEL): Adjust.
1516
1517 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
1518
1519 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
1520 member constants.
1521
1522 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
1523 a ctor initializer.
1524
1525 * tree.c (equal_functions): Fix name in prototype.
1526
1527 * decl.c (push_local_binding): Add FLAGS argument.
1528 (pushdecl, push_overloaded_decl): Pass it.
1529 * decl2.c (do_local_using_decl): Likewise.
1530 * cp-tree.h: Adjust prototype.
1531 * decl.c (poplevel): Fix logic.
1532
1533 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
1534 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
1535 (cat_namespace_levels): Don't loop forever.
1536
1537 1999-01-25 Richard Henderson <rth@cygnus.com>
1538
1539 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
1540
1541 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
1542
1543 * class.c (resolve_address_of_overloaded_function): Mark the
1544 chosen function used.
1545
1546 * call.c (build_call): Make sure that a function coming in has
1547 been marked used already.
1548 * decl.c (expand_static_init): Call mark_used instead of
1549 assemble_external.
1550 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
1551 alloc_eh_object, expand_throw): Likewise.
1552 * init.c (build_builtin_delete_call): Likewise.
1553 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
1554 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
1555 expand_generic_desc): Likewise.
1556
1557 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
1558
1559 * tree.c (equal_functions): New function.
1560 (ovl_member): Call it.
1561
1562 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
1563
1564 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
1565
1566 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
1567
1568 * decl.c (decls_match): Return 1 if old and new are identical.
1569 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
1570
1571 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
1572
1573 * decl.c (start_function): Make member functions one_only on windows.
1574 * decl2.c (import_export_decl): Likewise.
1575
1576 * decl.c (grokdeclarator): Don't complain about implicit int in
1577 a system header. Change same-name field check to not complain in
1578 a system header instead of within extern "C".
1579
1580 1999-01-21 Mark Mitchell <mark@markmitchell.com>
1581
1582 * cp-tree.h (PUSH_GLOBAL): New macro.
1583 (PUSH_LOCAL): Likewise.
1584 (PUSH_USING): Likewise.
1585 (namespace_bindings_p): Declare.
1586 (push_overloaded_decl): Likewise.
1587 * decl.c (push_overloaded_decl): Don't make it static. Check for
1588 illegal declarations after using declarations here.
1589 (namespace_bindings_p): Likewise.
1590 (duplicate_decls): Don't consider declarations from different
1591 namespaces to be the same.
1592 (pushdecl): Use symbolic PUSH_ constants in calls to
1593 push_overloaded_decl.
1594 (push_overloaded_decl_1): Likewise.
1595 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
1596 (do_nonmember_using_decl): Check for illegal using declarations
1597 after ordinary declarations here.
1598 (do_local_using_decl): Call pushdecl to insert declarations.
1599
1600 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
1601
1602 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
1603
1604 1999-01-21 Mark Mitchell <mark@markmitchell.com>
1605
1606 * tree.c (build_cplus_array_type_1): Don't call build_array_type
1607 for types involving template parameters.
1608
1609 * cp-tree.h (PARM_DECL_EXPR): Delete.
1610 (convert_default_arg): Change prototype.
1611 (check_default_argument): Declare.
1612 (search_tree): Likewise.
1613 * call.c (convert_default_arg): Take the function to which the
1614 default argument belongs as a parameter, and do any necessary
1615 instantiation here, instead of ...
1616 (build_over_call): Here.
1617 * decl.c (local_variable_p): New function.
1618 (check_default_argument): Likewise, split out and tidied from ...
1619 (grokparms): Here.
1620 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
1621 * pt.c (tsubst_call_declarator_parms): New function.
1622 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
1623 with CALL_EXPRs, rather than trying to be clever.
1624 (tsubst): Use tsubst_call_declarator_parms.
1625 * tree.c (search_tree): Don't make it static.
1626 * typeck.c (convert_arguments): Use new interface to
1627 convert_default_arg.
1628
1629 1999-01-20 Mark Mitchell <mark@markmitchell.com>
1630
1631 * error.c (dump_function_decl): Don't print the argument types for
1632 a function when the verbosity level is negative.
1633
1634 * call.c (build_over_call): Check format attributes at call-time.
1635
1636 * pt.c (tsubst_copy): Fix comment.
1637 (unify): Don't allow unification with variable-sized arrays.
1638
1639 * semantics.c (finish_stmt_expr): When processing a template make
1640 the BIND_EXPR long-lived.
1641
1642 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
1643
1644 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
1645 (import_export_vtable): Not here.
1646
1647 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
1648
1649 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
1650 non-static member function.
1651
1652 1999-01-18 Nathan Sidwell <nathan@acm.org>
1653
1654 * class.c (instantiate_type): Only diagnose illegal address of member
1655 function if complaining.
1656
1657 * decl.c (lookup_name_real): Remove duplicate code.
1658
1659 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
1660
1661 * tree.c (copy_template_template_parm): Use permanent_obstack.
1662
1663 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
1664
1665 * pt.c (unify): Remove restrictions on deduction of argument
1666 of template template parameters.
1667
1668 1999-01-18 Nathan Sidwell <nathan@acm.org>
1669
1670 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
1671
1672 * class.c (resolve_address_of_overloaded_function): Show list of
1673 all candidates, when none of them match.
1674
1675 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
1676
1677 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
1678 definition of 'casting away const' in reinterpret_cast<>.
1679
1680 1999-01-18 Graham <grahams@rcp.co.uk>
1681
1682 * cvt.c: Add include for decl.h, remove extern for
1683 static_aggregates which is now provided by decl.h.
1684
1685 * Makefile.in (cvt.o): Add dependency for decl.h and missing
1686 dependencies for convert.h and flags.h.
1687
1688 1999-01-18 Nathan Sidwell <nathan@acm.org>
1689
1690 * decl2.c (do_dtors): Set current location to that of the
1691 decl, for sensible diagnostics and debugging.
1692 (check_classfn): Issue `incomplete type' error, if
1693 class is not defined.
1694
1695 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
1696
1697 * cp-tree.h: Add prototype for bound_pmf_p.
1698
1699 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
1700 Manfred Hollstein <manfred@s-direktnet.de>
1701
1702 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
1703 -Wreturn-type.
1704
1705 1999-01-16 Nathan Sidwell <nathan@acm.org>
1706
1707 * cp-tree.h (struct lang_type): Added has_mutable flag.
1708 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
1709 (TYPE_HAS_MUTABLE_P): New macro to read it.
1710 (cp_has_mutable_p): Prototype for new function.
1711 * class.c (finish_struct_1): Set has_mutable from members.
1712 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
1713 it contains a mutable.
1714 * typeck.c (cp_has_mutable_p): New function.
1715
1716 1999-01-15 Mark Mitchell <mark@markmitchell.com>
1717
1718 * pt.c (process_template_parm): Ignore top-level qualifiers on
1719 non-type parameters.
1720
1721 * decl.c (start_function): Use current_function_parms in the call
1722 to require_complete_type_for_parms, not the probably empty
1723 DECL_ARGUMENTS.
1724
1725 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
1726
1727 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
1728
1729 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
1730 that we don't suppress the other copies.
1731 * lex.c (handle_cp_pragma): Likewise.
1732
1733 1999-01-13 Mark Mitchell <mark@markmitchell.com>
1734
1735 * decl.c (grokdeclarator): Undo 1998-12-14 change.
1736 * tree.c (build_cplus_array_type_1): Likewise.
1737 * pt.c (instantiate_class_template): Remove misleading comment.
1738 (tsubst_aggr_type): Substitute if there are template parameters,
1739 regardless of whether or not they use template arguments.
1740 (unify): Likewise, but for unification.
1741
1742 1999-01-12 Richard Henderson <rth@cygnus.com>
1743
1744 * cp-tree.h (flag_permissive): Declare extern.
1745
1746 1999-01-06 Mark Mitchell <mark@markmitchell.com>
1747
1748 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
1749 here.
1750 (lang_type): Add is_partial_instantiation. Decrease width of
1751 dummy.
1752 (PARTIAL_INSTANTIATION_P): New macro.
1753 (OPERATOR_TYPENAME_P): Remove.
1754 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
1755 OPERATOR_TYPENAME_P.
1756 (grok_op_properties): Likewise.
1757 * friend.c (do_friend): Handle friends that are member functions
1758 correctly.
1759 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
1760 * pt.c (instantiate_class_template): Rework for clarity. Avoid
1761 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
1762 any more partial instantiation than is absolutely necessary for
1763 implicit typename. Set PARTIAL_INSTANTIATION_P.
1764 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
1765 * semantics.c (begin_class_definition): Handle partial
1766 specializations of a type that was previously partially
1767 instantiated.
1768
1769 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
1770
1771 * g++spec.c (LIBSTDCXX): Provide default definition.
1772 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
1773
1774 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1775
1776 * Make-lang.in (g++.o): Depend on prefix.h.
1777
1778 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
1779
1780 * tree.c (bound_pmf_p): New fn.
1781 * typeck.c (build_c_cast): Use it.
1782
1783 * decl.c (grok_op_properties): Use same_type_p.
1784
1785 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1786
1787 * Makefile.in (cvt.o): Depend on toplev.h.
1788
1789 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
1790
1791 * cvt.c: Include toplev.h.
1792
1793 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
1794 definitions.
1795
1796 * init.c (expand_vec_init): Initialize variable `itype'.
1797
1798 * lex.c (yyerror): Cast the argument passed to a ctype function to
1799 an unsigned char.
1800
1801 * method.c (build_mangled_C9x_name): Wrap prototype and definition
1802 in "HOST_BITS_PER_WIDE_INT >= 64".
1803
1804 * typeck.c (build_binary_op): Mark parameter `convert_p' with
1805 ATTRIBUTE_UNUSED.
1806
1807 1998-12-22 Mark Mitchell <mark@markmitchell.com>
1808
1809 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
1810 * tree.c (build_exception_variant): Don't crash on empty throw
1811 specs.
1812
1813 1998-12-18 DJ Delorie <dj@cygnus.com>
1814
1815 * cvt.c (convert_to_reference): Check for both error_mark_node
1816 and NULL_NODE after call to convert_for_initialization.
1817
1818 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
1819
1820 * error.c (interesting_scope_p): New fn.
1821 (dump_simple_decl): Use it.
1822 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
1823 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
1824
1825 1998-12-16 Mark Mitchell <mark@markmitchell.com>
1826
1827 * class.c (resolve_address_of_overloaded_function): Do conversion
1828 to correct type here, rather than ...
1829 (instantiate_type): Here.
1830
1831 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
1832 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
1833 (decl_template_parm_p): Remove.
1834 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
1835 parameter.
1836 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
1837 * pt.c (push_inline_template_parms_recursive): Set it.
1838 (decl_template_parm_p): Remove.
1839 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
1840 (process_template_parm): Set it.
1841
1842 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
1843
1844 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
1845 if configured with cpplib.
1846
1847 1998-12-15 Mark Mitchell <mark@markmitchell.com>
1848
1849 * decl.c (poplevel): Make sure ns_binding is initialized.
1850
1851 * decl.c (finish_function): Undo inadvertent change in previous
1852 patch.
1853
1854 1998-12-14 Mark Mitchell <mark@markmitchell.com>
1855
1856 * class.c (pushclass): Tweak handling of class-level bindings.
1857 (resolve_address_of_overloaded_function): Update pointer-to-member
1858 handling.
1859 (instantiate_type): Likewise.
1860 * cvt.c (cp_convert_to_pointer): Likewise.
1861 * decl.c (pop_binding): Take the DECL to pop, not just the name.
1862 Deal with `struct stat' hack.
1863 (binding_level): Add to documentation.
1864 (push_binding): Clear BINDING_TYPE.
1865 (add_binding): New function.
1866 (push_local_binding): Use it.
1867 (push_class_binding): Likewise.
1868 (poplevel): Adjust calls to pop_binding.
1869 (poplevel_class): Likewise.
1870 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
1871 declarations to current binding level.
1872 (push_class_level_binding): Likewise.
1873 (push_overloaded_decl): Adjust handling of OVERLOADs in local
1874 bindings.
1875 (lookup_namespace_name): Don't crash when confronted with a
1876 TEMPLATE_DECL.
1877 (lookup_name_real): Do `struct stat' hack in local binding
1878 contexts.
1879 (build_ptrmemfunc_type): Adjust documentation.
1880 (grokdeclarator): Don't avoid building real array types when
1881 processing templates unless really necessary.
1882 (finish_method): Adjust calls to pop_binding.
1883 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
1884 not reparse_decl_as_expr.
1885 (build_expr_from_tree): Deal with a template-id as the function to
1886 call in a METHOD_CALL_EXPR.
1887 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
1888 (maybe_adjust_types_For_deduction): Don't do peculiar things with
1889 METHOD_TYPEs here.
1890 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
1891 pointer-to-member types where necessary.
1892 * tree.c (build_cplus_array_type_1): Don't avoid building real
1893 array types when processing templates unless really necessary.
1894 (build_exception_variant): Compare the exception lists correctly.
1895
1896 1998-12-13 Mark Mitchell <mark@markmitchell.com>
1897
1898 * cp-tree.def (CPLUS_BINDING): Update documentation.
1899 * cp-tree.h (LOCAL_BINDING_P): New macro.
1900 (lang_identifier): Rename local_value to bindings.
1901 (tree_binding): Make `scope' of type `void*', not `tree'.
1902 (BINDING_SCOPE): Update documentation.
1903 (IDENTIFIER_LOCAL_VALUE): Remove.
1904 (IDENTIFIER_CLASS_VALUE): Document.
1905 (IDENTIFIER_BINDING): New macro.
1906 (IDENTIFIER_VALUE): Likewise.
1907 (TIME_IDENTIFIER_TIME): Likewise.
1908 (TIME_IDENTIFIER_FILEINFO): Likewise.
1909 (IMPLICIT_TYPENAME_P): Likewise.
1910 (set_identifier_local_value): Remove.
1911 (push_local_binding): New function.
1912 (push_class_binding): Likewise.
1913 * class.c (pushclass): Update comments; use push_class_binding.
1914 * decl.c (set_identifier_local_value_with_scope): Remove.
1915 (set_identifier_local_value): Likewise.
1916 (push_binding): New function.
1917 (pop_binding): Likewise.
1918 (binding_level): Update documentation. Remove shadowed.
1919 (BINDING_LEVEL): New macro.
1920 (free_binding_nodes): New variable.
1921 (poplevel): Adjust for new name-lookup scheme. Don't mess up
1922 BLOCK_VARs when doing for-scope extension. Remove effectively
1923 dead code.
1924 (pushlevel_class): Tweak formatting.
1925 (poplevel_class): Adjust for new name-lookup scheme.
1926 (print_binding_level): Likewise.
1927 (store_bindings): Likewise.
1928 (pushdecl): Likewise.
1929 (pushdecl_class_level): Likewise.
1930 (push_class_level_binding): Likewise.
1931 (push_overloaded_decl): Update comments. Adjust for new
1932 name-lookup scheme.
1933 (lookup_name_real): Likewise.
1934 (lookup_name_current_level): Likewise.
1935 (cp_finish_decl): Likewise.
1936 (require_complete_types_for_parms): Likewise. Remove misleading
1937 #if 0'd code.
1938 (grok_parms): Likewise. Don't call
1939 require_complete_types_for_parms here.
1940 (grok_ctor_properties): Don't treat templates as copy
1941 constructors.
1942 (grop_op_properties): Or as assignment operators.
1943 (start_function): Document. Adjust for new name-lookup scheme.
1944 (finish_function): Likewise.
1945 * decl2.c (do_local_using_decl): Use push_local_binding.
1946 * lex.c (begin_definition_of_inclass_inline): New function, split
1947 out from ...
1948 (do_pending_inlines): Here, and ...
1949 (process_next_inline): Here.
1950 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
1951 (init_filename_times): Likewise.
1952 (extract_interface_info): Likewise.
1953 (ste_typedecl_interface_info): Likewise.
1954 (check_newline): Likewise.
1955 (dump_time_statistics): Likewise.
1956 (handle_cp_pragma): Likewise.
1957 (do_identifier): Adjust for new name-lookup scheme.
1958 * parse.y (function_try_block): Return ctor_initializer_opt value.
1959 (fndef): Use it.
1960 (fn.defpen): Pass appropriate values to start_function.
1961 (pending_inline): Use functor_try_block value, and pass
1962 appropriate values to finish_function.
1963 * pt.c (is_member_template): Update documentation; remove handling
1964 of FUNCTION_DECLs. As per name, this function should deal only in
1965 TEMPLATE_DECLs.
1966 (decl_template_parm_p): Change name of olddecl parameter to decl.
1967 (check_template_shadow): Adjust for new name-lookup scheme.
1968 (lookup_template_class): Likewise.
1969 (tsubst_decl): Tweak so as not to confuse member templates with
1970 copy constructors and assignment operators.
1971 (unify): Handle UNION_TYPEs.
1972 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
1973 (lang_print_xnode): Adjust for new name-lookup scheme.
1974 * typeck.c (mark_addressable): Likewise.
1975 (c_expand_return): Likewise.
1976
1977 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
1978
1979 * decl.c (grokdeclarator): Allow field with same name as class
1980 in extern "C".
1981
1982 * decl.c (lookup_name_real): Don't limit field lookup to types.
1983 * class.c (check_member_decl_is_same_in_complete_scope): No error
1984 if icv and x are the same.
1985 * lex.c (do_identifier): Tweak error message.
1986
1987 1998-12-10 Mark Mitchell <mark@markmitchell.com>
1988
1989 * decl.c (start_enum): Use push_obstacks, not
1990 end_temporary_allocation.
1991 (finish_enum): Call pop_obstacks.
1992
1993 1998-12-10 Mark Mitchell <mark@markmitchell.com>
1994
1995 * class.c (instantiate_type): Return error_mark_node rather than
1996 junk.
1997
1998 1998-12-09 Mark Mitchell <mark@markmitchell.com>
1999
2000 * cp-tree.h (most_specialized_instantiation): New function.
2001 (print_candidates): Likewise.
2002 * class.c (validate_lhs): Remove.
2003 (resolve_address_of_overloaded_function): New function, split out
2004 and then substantially reworked, from ...
2005 (instantiate_type): Use it. Simplify.
2006 * cvt.c (convert_to_reference): Complain when caller has indicated
2007 that's the right thing to do. Don't crash if instantiate_type
2008 fails.
2009 * pt.c: Substitute `parameters' for `paramters' throughout.
2010 (print_candidates): Don't make it static.
2011 (most_specialized_instantiation): Split out from ...
2012 (most_specialized): Here.
2013
2014 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
2015
2016 * lex.c (lang_init_options): Initialize cpplib.
2017 * decl2.c (parse_options,cpp_initialized): Removed.
2018 (lang_decode_option): Move initialization of cpplib to
2019 lang_init_options.
2020
2021 1998-12-09 Mark Mitchell <mark@markmitchell.com>
2022
2023 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
2024 well as the TYPE_DECL, when a typedef name is assigned to a
2025 previously anonymous type.
2026
2027 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
2028
2029 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
2030 __cp_eh_info for getting the eh info pointer. Add table_index to
2031 field list.
2032 (push_eh_cleanup): Don't increment 'handlers' data field.
2033 (process_start_catch_block): Don't set the 'caught' field.
2034
2035 * cp/exception.cc (CP_EH_INFO): New macro for getting the
2036 exception info pointer within library routines.
2037 (__cp_eh_info): Use CP_EH_INFO.
2038 (__start_cp_handler): Get exception info pointer, set caught field,
2039 and increment the handlers field. Avoids this being done by handlers.
2040 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
2041 (uncaught_exception): Use CP_EH_INFO macro.
2042
2043 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
2044
2045 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
2046
2047 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
2048
2049 * lex.c (check_newline): Add support for \ as `natural'
2050 characters in file names in #line to be consistent with #include
2051 handling. We support escape processing in the # 1 "..." version of
2052 the command. See also support in cp/lex.c.
2053
2054 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
2055
2056 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
2057 structure.
2058
2059 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
2060
2061 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
2062
2063 * error.c (dump_simple_decl): Also print namespace context.
2064 (dump_function_decl): Likewise.
2065
2066 * decl2.c (ambiguous_decl): Don't print old value if it's
2067 error_mark_node.
2068
2069 * decl.c (lookup_name_real): Fix handling of local types shadowed
2070 by a non-type decl. Remove obsolete code.
2071 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
2072
2073 * lang-options.h: Add -fpermissive.
2074 * decl2.c: Likewise.
2075 * cp-tree.h: Add flag_permissive.
2076 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
2077 were specified, set flag_pedantic_errors.
2078 * call.c (build_over_call): Turn dropped qualifier messages
2079 back into pedwarns.
2080 * cvt.c (convert_to_reference): Likewise.
2081 * typeck.c (convert_for_assignment): Likewise.
2082
2083 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
2084
2085 * decl2.c (coerce_new_type): Use same_type_p.
2086 (coerce_delete_type): Likewise.
2087
2088 * call.c (check_dtor_name): Return 1, not error_mark_node.
2089
2090 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
2091
2092 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
2093 if MULTIPLE_SYMBOL_SPACES.
2094
2095 * pt.c (check_template_shadow): New fn.
2096 * decl2.c (grokfield): Use it.
2097 * decl.c (pushdecl): Likewise.
2098 (pushdecl_class_level): Likewise.
2099 (start_method): Likewise.
2100 (xref_tag): Don't try to use 't' if we're defining.
2101
2102 * call.c (check_dtor_name): Just return an error_mark_node.
2103 * pt.c (lookup_template_class): Complain about using non-template here.
2104 * parse.y (apparent_template_type): Not here.
2105
2106 * pt.c (check_explicit_specialization): Complain about specialization
2107 with C linkage.
2108
2109 * lang-options.h: Add -f{no-,}implicit-inline-templates.
2110
2111 * pt.c (convert_nontype_argument): Don't assume that any integer
2112 argument is intended to be a constant-expression.
2113
2114 1998-12-03 Mark Mitchell <mark@markmitchell.com>
2115
2116 * class.c (handle_using_decl): Fix comment. Don't lookup
2117 constructors in base classes.
2118 (validate_lhs): Fix typo in comment.
2119 * search.c (lookup_field_1): Don't return a USING_DECL.
2120
2121 * cp-tree.h (DECL_ACCESS): Improve documentation.
2122
2123 * decl.c (expand_static_init): Don't set the initialization-done
2124 flag until the initialization is done.
2125
2126 1998-12-02 Mark Mitchell <mark@markmitchell.com>
2127
2128 * decl2.c (validate_nonmember_using_decl): Complain about using
2129 declarations for class members.
2130
2131 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
2132
2133 * typeck2.c (process_init_constructor): Use same_type_p.
2134
2135 * decl.c (check_tag_decl): Don't warn about null decl inside a
2136 class.
2137
2138 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
2139 UNIFY_ALLOW_NONE.
2140 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
2141 (resolve_overloaded_unification): Strip baselinks.
2142
2143 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2144
2145 * g++spec.c: Don't prototype xmalloc.
2146
2147 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
2148
2149 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
2150
2151 * decl.c (check_tag_decl): Do complain about null friend decl at
2152 file scope.
2153
2154 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2155
2156 * lex.c (make_lang_type): Clear the whole struct lang_type, not
2157 only the first multiple of sizeof (int).
2158
2159 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
2160
2161 * decl.c (start_decl): An explicit specialization of a static data
2162 member is only a definition if it has an initializer.
2163
2164 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
2165 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
2166 cp_finish_decl.
2167 * init.c (expand_default_init): Check for DIRECT_BIND instead of
2168 DECL_ARTIFICIAL.
2169
2170 * call.c (build_over_call): Use build_decl.
2171
2172 * except.c (expand_throw): Just use convert, not
2173 build_reinterpret_cast.
2174
2175 * lex.c (handle_generic_pragma): Use token_buffer.
2176
2177 * decl.c (check_tag_decl): Don't complain about null friend decl.
2178
2179 1998-11-24 Dave Pitts <dpitts@cozx.com>
2180
2181 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
2182 first position.
2183 * lex.c (check_newline): Use ISALPHA.
2184 (readescape): Use ISGRAPH.
2185 (yyerror): Use ISGRAPH.
2186
2187 1998-11-24 Nathan Sidwell <nathan@acm.org>
2188
2189 * search.c (get_abstract_virtuals): Do not use initial
2190 CLASSTYPE_ABSTRACT_VIRTUALS.
2191 * typeck2.c (abstract_virtuals_error): Show location of abstract
2192 declaration.
2193 * call.c (build_new_method_call): Use
2194 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
2195 * class.c (finish_struct_bits): Don't bother working out whether
2196 get_abstract_virtuals will do anything, just do it.
2197
2198 1998-11-24 Graham <grahams@rcp.co.uk>
2199
2200 * typeck.c (build_component_ref): Remove unused statement.
2201
2202 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
2203
2204 * class.c (add_method): Catch invalid overloads.
2205
2206 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
2207 * search.c (lookup_conversions): Handle getting real OVERLOADs.
2208 (add_conversions): Likewise. Revert last change.
2209 * call.c (add_conv_candidate): Pass totype to add_candidate instead
2210 of fn. Don't add a new candidate if the last one was for the same
2211 type.
2212 (print_z_candidates): Handle getting a type as a function.
2213 (joust): If we got two conversion candidates to the same type,
2214 just pick one.
2215 (build_object_call): Lose 'templates'.
2216 (build_user_type_conversion_1): Handle getting real OVERLOADs.
2217
2218 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
2219
2220 * typeck2.c (process_init_constructor): If there are elements
2221 that don't have initializers and they need to have constructors
2222 run, supply them with initializers.
2223
2224 * class.c (finish_struct_1): A class with a 0-width bitfield is
2225 still empty.
2226
2227 1998-11-23 Mark Mitchell <mark@markmitchell.com>
2228
2229 * pt.c (instantiate_class_template): Don't try to figure out what
2230 specialization to use for a partial instantiation. Correct
2231 typos in a couple of comments. Avoid calling uses_template_parms
2232 multiple times.
2233
2234 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
2235
2236 * method.c (process_overload_item): Add call to
2237 build_mangled_C9x_name for intTI_type_nodes.
2238 (build_mangled_C9x_name): Add prototype, define.
2239 * decl.c (init_decl_processing): Add names for
2240 TImode_type_node.
2241
2242 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
2243
2244 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
2245
2246 * class.c (finish_struct_1): Set things up for 0-width bitfields
2247 like we do for others.
2248
2249 * decl.c (check_tag_decl): New fn.
2250 (shadow_tag): Split out from here.
2251 * decl2.c (grok_x_components): Call it.
2252
2253 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
2254
2255 * decl.c: Lose warn_about_return_type.
2256 (grokdeclarator): Always complain about implicit int, except for
2257 `main () { ... }'.
2258
2259 * decl.c (tag_name): New fn.
2260 (xref_tag): Complain about using typedef-name after class-key.
2261
2262 * init.c (expand_vec_init): Also keep going if from_array.
2263
2264 * tree.c (is_overloaded_fn): Also handle the output of
2265 build_offset_ref.
2266
2267 * decl.c (grokdeclarator): Use constructor_name when comparing
2268 field name against enclosing class.
2269 * class.c (finish_struct_anon): Likewise.
2270
2271 1998-11-22 Mark Mitchell <mark@markmitchell.com>
2272
2273 * decl.c (poplevel): Remove code to handle KEEP == 2.
2274 (finish_function): Don't confuse BLOCK-order when
2275 processing a destructor.
2276
2277 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
2278
2279 * decl.c (require_complete_types_for_parms): Call layout_decl
2280 after we've completed the type.
2281
2282 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
2283
2284 * decl2.c (validate_nonmember_using_decl): Allow using templates
2285 from the global namespace.
2286
2287 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
2288
2289 Handle specifying template args to member function templates.
2290 * tree.c (build_overload): Always create an OVERLOAD for a template.
2291 * search.c (add_conversions): Handle finding an OVERLOAD.
2292 * decl2.c (check_classfn): Likewise.
2293 * lex.c (identifier_type): See through a baselink.
2294 * parse.y (do_id): Don't call do_identifier if we got a baselink.
2295 * class.c (instantiate_type, case TREE_LIST): Recurse.
2296
2297 * decl.c (grokdeclarator): Allow a boolean constant for array
2298 bounds, odd as that sounds.
2299
2300 * pt.c (unify): Be more strict about non-type parms, except for
2301 array bounds.
2302 (UNIFY_ALLOW_INTEGER): New macro.
2303
2304 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
2305
2306 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
2307
2308 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
2309
2310 * semantics.c (begin_class_definition): Call
2311 maybe_process_partial_specialization before push_template_decl.
2312 Don't call push_template_decl for a specialization.
2313 * search.c (lookup_field): Do return a member template class.
2314 * decl2.c (handle_class_head): Handle member template classes.
2315
2316 * decl.c (grokdeclarator): A parm type need not be complete.
2317
2318 * pt.c (convert_nontype_argument): Fix thinko.
2319
2320 1998-11-18 Mark Mitchell <mark@markmitchell.com>
2321
2322 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
2323 (global_delete_fndecl): New variable.
2324 * decl.c (global_delete_fndecl): Define it.
2325 (init_decl_processing): Set it.
2326 * init.c (build_builtin_delete_call): Use it.
2327 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
2328 nodes.
2329
2330 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
2331
2332 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
2333 type.
2334
2335 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
2336 * call.c (build_object_call): Also support references to functions.
2337 * typeck.c (convert_for_initialization): Don't decay a function
2338 if the target is a reference to function.
2339
2340 * search.c (add_conversions): Get all the overloads from a class.
2341
2342 * decl.c (grok_ctor_properties): Complain about any constructor
2343 that will take a single arg of the class type by value.
2344
2345 * typeck2.c (build_functional_cast): Can't create objects of
2346 abstract classes this way.
2347 * cvt.c (ocp_convert): Likewise.
2348
2349 * decl.c (grokfndecl): Member functions of local classes are not
2350 public.
2351
2352 1998-11-18 Mark Mitchell <mark@markmitchell.com>
2353
2354 * Make-lang.in (cc1plus): Add dependency on hash.o.
2355
2356 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
2357
2358 * search.c (get_abstract_virtuals): Complain about virtuals with
2359 no final overrider.
2360 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
2361 with no final overrider.
2362 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
2363 on virtuals with no final overrider.
2364
2365 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
2366
2367 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
2368 after layout_type.
2369
2370 * friend.c (do_friend): Don't set_mangled_name_for_decl.
2371
2372 * class.c (finish_struct_anon): Complain about non-fields.
2373 * decl2.c (build_anon_union_vars): Likewise.
2374
2375 * decl.c (grokdeclarator): Normal data members can't have the same
2376 name as the class, either.
2377 * class.c (finish_struct_anon): Neither can members of an
2378 anonymous union.
2379
2380 1998-11-17 Mark Mitchell <mark@markmitchell.com>
2381
2382 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
2383 (TYPE_BINFO): Likewise.
2384 (IS_AGGR_TYPE): Tweak.
2385 (SET_IS_AGGR_TYPE): New macro.
2386 (CLASS_TYPE_P): Tweak.
2387 (lang_type): Group mark bitfields together. Remove linenum.
2388 (CLASSTYPE_SOURCE_LINE): Remove macro.
2389 (CLASSTYPE_MARKED_N): New macro.
2390 (SET_CLASSTYPE_MARKED_N): Likewise.
2391 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
2392 (CLASS_TYPE_MARKED_*): Use them.
2393 (SET_CLASSTYPE_MARKED_*): Likewise.
2394 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
2395 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
2396 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
2397 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
2398 * class.c (class_cache_obstack): New variable.
2399 (class_cache_firstobj): Likewise.
2400 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
2401 (pushclass): Free the cache, when appropriate.
2402 (popclass): Tidy.
2403 (maybe_push_cache_obstack): Use class_cache_obstack.
2404 * decl.c (include hash.h).
2405 (typename_hash): New function.
2406 (typename_compare): Likewise.
2407 (build_typename_type): Check the hash table to avoid creating
2408 duplicates.
2409 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
2410 (grokdeclarator): Use CLASS_TYPE_P.
2411 (xref_basetypes): Likewise.
2412 (start_function): Likewise. Don't put current_class_ref on the
2413 permanent obstack.
2414 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
2415 and TYPE_TI_ARGS.
2416 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
2417 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
2418 fields for types other than class types. Do clear TYPE_ALIAS_SET
2419 for types other than class types, though.
2420 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
2421 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
2422 * pt.c (process_template_parm): Don't set
2423 CLASSTYPE_GOT_SEMICOLON.
2424 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
2425 Coerce arguments on the momentary obstack.
2426 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
2427 (instantiate_class_template): Calculate template arguments on the
2428 momentary obstack. Tidy.
2429 (tsubst_template_arg_vector): Use make_temp_vec.
2430 (tsubst_aggr_type): Put template arguments on the momentary
2431 obstack.
2432 (tsubst_decl): Likewise.
2433 (tsubst): Copy the array bounds index to the permanent obstack
2434 before building index types. Use new macros.
2435 (unify): Use new macros.
2436 (do_type_instantiation): Likewise.
2437 * search.c (lookup_fnfields_1): Use new macros.
2438 (dfs_pushdecls): Build envelopes on the cache obstack.
2439 (dfs_compress_decls): Use new macros.
2440 (push_class_decls): Build on the cache obstack.
2441 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
2442 * sign.c (build_signature_pointer_or_reference_type): Use
2443 SET_IS_AGGR_TYPE.
2444 * tree.c (make_binfo): Check CLASS_TYPE_P.
2445 (copy_template_template_parm): Adjust.
2446 (make_temp_vec): Use push_expression_obstack.
2447 * typeck.c (complete_type): Use new macros.
2448 (comptypes): Likewise.
2449
2450 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
2451
2452 * pt.c (tsubst): Add diagnostics for invalid array, reference
2453 and pointer to member types.
2454
2455 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
2456
2457 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
2458
2459 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
2460 Simplify.
2461
2462 * parse.y (structsp): Fix cut-and-paste error.
2463
2464 * init.c (build_new): Complain about non-integral size.
2465
2466 * parse.y (unary_expr): Complain about defining types in sizeof.
2467
2468 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
2469
2470 * rtti.c (build_x_typeid): Complain about typeid without
2471 including <typeinfo>.
2472 (get_typeid): Likewise. Complain about typeid of incomplete type.
2473 (get_tinfo_fn_dynamic): Likewise.
2474 (get_typeid_1): Not static anymore.
2475 * except.c (build_eh_type_type): Use get_typeid_1.
2476
2477 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
2478 ambiguous or private bases. Fix warning for reference cast.
2479
2480 1998-11-16 Mark Mitchell <mark@markmitchell.com>
2481
2482 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
2483 * decl.c (duplicate_decls): Remove special-case code to deal with
2484 template friends, and just do the obvious thing.
2485 * pt.c (register_specialization): Tweak for clarity, and also to
2486 clear DECL_INITIAL for an instantiation before it is merged with a
2487 specialization.
2488 (check_explicit_specialization): Fix indentation.
2489 (tsubst_friend_function): Handle both definitions in friend
2490 declaration and outside friend declarations.
2491 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
2492 (regenerate_decl_from_template): Tweak accordingly.
2493 (instantiate_decl): Likewise.
2494
2495 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
2496
2497 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
2498 member function reference to error.
2499 * cvt.c (ocp_convert): Complain about converting an overloaded
2500 function to void.
2501
2502 * init.c (build_offset_ref): Just return a lone static member
2503 function.
2504
2505 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
2506 not internal ones.
2507
2508 * typeck.c (build_binary_op_nodefault): Improve error handling.
2509
2510 * decl.c (grokfndecl): Complain about making 'main' a template.
2511
2512 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
2513
2514 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
2515 TYPE_DECL in a template.
2516
2517 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
2518
2519 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
2520
2521 * decl.c (struct cp_function): Add named_label_uses.
2522 (push_cp_function_context): Save it.
2523 (pop_cp_function_context): Restore it.
2524 (define_label): Also complain about jumping into the scope of
2525 non-POD objects that don't have constructors.
2526 * tree.c (pod_type_p): New fn.
2527
2528 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
2529 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
2530 (get_tinfo_fn): Not here.
2531 * repo.c (repo_get_id): Abort if we get called for an incomplete
2532 type.
2533
2534 1998-11-13 Mark Mitchell <mark@markmitchell.com>
2535
2536 * except.c (expand_throw): Make sure first argument to
2537 __cp_push_exception is of type `void*' to avoid spurious error
2538 messages.
2539
2540 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
2541
2542 * pt.c (try_one_overload): Take orig_targs again. Only check for
2543 mismatches against them; we don't care what a previous call found.
2544 (resolve_overloaded_unification): Adjust.
2545
2546 * search.c (lookup_field): Don't return anything for a non-type
2547 field from a dependent type.
2548 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
2549 in an array declarator.
2550 (start_decl): Push into the class before looking for the field.
2551
2552 1998-11-08 Mark Mitchell <mark@markmitchell.com>
2553
2554 * method.c (build_overload_value): Handle REFERENCE_TYPE.
2555
2556 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
2557
2558 * decl.c (grokdeclarator): Allow namespace-scoped members if they
2559 are friends.
2560
2561 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
2562
2563 * pt.c (tsubst_decl): Don't mess with the global value of an
2564 un-mangled DECL_ASSEMBLER_NAME.
2565
2566 1998-11-03 Christopher Faylor <cgf@cygnus.com>
2567
2568 * decl.c (init_decl_processing): Remove CYGWIN conditional
2569 since CYGWIN is now able to deal with trapping signals.
2570
2571 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2572
2573 * cp-tree.h: Don't include gansidecl.h.
2574 * exception.cc: Include gansidecl.h (since we don't include config.h)
2575 * g++spec.c: Don't include gansidecl.h.
2576
2577 1998-11-06 Mark Mitchell <mark@markmitchell.com>
2578
2579 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
2580 size of dummy.
2581 (DECL_DEFINED_IN_CLASS_P): New macro.
2582 (TEMPLATE_PARMS_FOR_INLINE): Document.
2583 (check_static_variable_definition): New function.
2584 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
2585 appropriate.
2586 (check_static_variable_definition): Split out from ...
2587 (grokdeclarator): Here.
2588 * pt.c (check_default_tmpl_args): New function, split out from ...
2589 (push_template_decl_real): Here.
2590 (instantiate_template): Fix comment.
2591
2592 1998-11-04 Mark Mitchell <mark@markmitchell.com>
2593
2594 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
2595 (CP_TYPE_VOLATILE_P): Likewise.
2596 (CP_TYPE_RESTRICT_P): Likewise.
2597
2598 1998-11-03 Mark Mitchell <mark@markmitchell.com>
2599
2600 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
2601
2602 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
2603
2604 * class.c (instantiate_type): Be more helpful.
2605
2606 * decl2.c (import_export_decl): Call import_export_class.
2607
2608 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
2609 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
2610 * pt.c (tsubst_copy): Likewise.
2611
2612 1998-11-02 Mark Mitchell <mark@markmitchell.com>
2613
2614 * init.c (expand_vec_init): Fix off-by-one error.
2615
2616 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
2617
2618 * parse.y (apparent_template_type): New type.
2619 (named_complex_class_head_sans_basetype): Use it.
2620 * Makefile.in (CONFLICTS): One new conflict.
2621 * parse.c: Regenerated.
2622
2623 1998-11-01 Mark Mitchell <mark@markmitchell.com>
2624
2625 * cp-tree.h (COMPARE_STRICT): New macro.
2626 (COMPARE_BASE): Likewise.
2627 (COMPARE_RELAXED): Likewise.
2628 (COMPARE_REDECLARATION): Likewise.
2629 (same_type_p): Likewise.
2630 (same_or_base_type_p): Likewise.
2631 * call.c (standard_conversion): Use them, in place of comptypes
2632 with numeric arguments.
2633 (reference_binding): Likewise.
2634 (convert_like): Likewise.
2635 (build_over_call): Likewise.
2636 (is_subseq): Likewise.
2637 (is_properly_derived_from): Likewise.
2638 (compare_ics): Likewise.
2639 (joust): Likewise.
2640 * class.c (delete_duplicate_fields_1): Likewise.
2641 (resolves_to_fixed_type_p): Likewise.
2642 (instantiate_type): Likewise. Remove #if 0'd code.
2643 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
2644 (pushdecl): Likewise.
2645 (lookup_name_real): Likewise.
2646 (grokdeclarator): Likewise. Check for illegal array declarations.
2647 (grokparms): Likewise.
2648 (grok_op_properties): Likewise.
2649 * decl2.c (check_classfn): Likewise.
2650 * friend.c (is_friend): Likewise.
2651 (make_friend_class): Likewise.
2652 * init.c (expand_aggr_init): Likewise.
2653 (expand_vec_init): Likewise.
2654 * pt.c (is_member_template_class): Remove declaration.
2655 (is_specialization_of): Use COMPARE_* and new macros.
2656 (comp_template_parms): Likewise.
2657 (convert_nontype_argument): Likewise.
2658 (coerce_template_template_parms): Likewise.
2659 (template_args_equal): Likewise.
2660 (lookup_template_class): Likewise.
2661 (type_unification_real): Likewise.
2662 (unify): Likewise.
2663 (get_bindings_real): Likewise.
2664 * search.c (covariant_return_p): Likewise.
2665 (get_matching_virtual): Likewise.
2666 * sig.c (match_method_types): Likewise.
2667 * tree.c (vec_binfo_member): Likewise.
2668 (cp_tree_equal): Likewise.
2669 * typeck.c (common_type): Likewise.
2670 (comp_array_types): Likewise. Get issues involving unknown array
2671 bounds right.
2672 (comptypes): Update comments. Use new flags.
2673 (comp_target_types): Use new macros.
2674 (compparms): Likewise.
2675 (comp_target_parms): Likewise.
2676 (string_conv_p): Likewise.
2677 (build_component_ref): Likewise.
2678 (build_indirect_ref): Likewise.
2679 (build_conditional_expr): Likewise.
2680 (build_static_cast): Likewise.
2681 (build_reinterpret_cast): Likewise.
2682 (build_const_cast): Likewise.
2683 (build_modify_expr): Likewise.
2684 (convert_for_assignment): Likewise.
2685 (comp_ptr_ttypes_real): Likewise.
2686 (ptr_reasonably_similar): Likewise.
2687 (comp_ptr_ttypes_const): Likewise.
2688
2689 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
2690
2691 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
2692
2693 1998-10-30 Mark Mitchell <mark@markmitchell.com>
2694
2695 * decl2.c (delete_sanity): Pass integer_zero_node, not
2696 integer_two_node, to build_vec_delete.
2697 * init.c (build_array_eh_cleanup): Remove.
2698 (expand_vec_init_try_block): New function.
2699 (expand_vec_init_catch_clause): Likewise.
2700 (build_vec_delete_1): Don't deal with case that auto_delete_vec
2701 might be integer_two_node anymore.
2702 (expand_vec_init): Rework for initialization-correctness and
2703 exception-correctness.
2704 * typeck2.c (process_init_constructor): Make mutual exclusivity
2705 of cases more obvious.
2706
2707 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
2708
2709 * decl.c (lookup_name_real): OK, only warn if not lexing.
2710 Simplify suggested fix.
2711
2712 * cp-tree.h (IDENTIFIER_MARKED): New macro.
2713 * search.c (lookup_conversions): Use breadth_first_search.
2714 (add_conversions): Avoid adding two conversions to the same type.
2715 (breadth_first_search): Work with base binfos, rather
2716 than binfos and base indices.
2717 (get_virtual_destructor): Adjust.
2718 (tree_has_any_destructor_p): Adjust.
2719 (get_matching_virtual): Adjust.
2720
2721 * pt.c (push_template_decl_real): Generalize check for incorrect
2722 number of template parms.
2723 (is_member_template_class): #if 0.
2724
2725 1998-10-29 Richard Henderson <rth@cygnus.com>
2726
2727 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
2728 last.
2729
2730 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
2731
2732 * lex.c: Call check_newline from lang_init always. After
2733 calling cpp_start_read, set yy_cur and yy_lim to read from the
2734 cpplib token buffer.
2735
2736 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
2737
2738 * class.c (instantiate_type): Don't consider templates for a normal
2739 match.
2740
2741 * class.c (finish_struct_1): Don't complain about non-copy
2742 assignment ops in union members.
2743
2744 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
2745 (prepare_fresh_vtable): Likewise.
2746 (finish_struct_1): Don't call import_export_class.
2747 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
2748 (finish_prevtable_vardecl): Lose.
2749 (finish_file): Don't call it.
2750 * pt.c (instantiate_class_template): Likewise.
2751 * cp-tree.h: Remove it.
2752
2753 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
2754 * decl.c (finish_function): Not here.
2755 (start_function): Do set DECL_INITIAL.
2756
2757 * pt.c (push_template_decl_real): Complain about default template
2758 args for enclosing classes.
2759
2760 * call.c (add_function_candidate): Treat conversion functions
2761 as coming from the argument's class.
2762 * cp-tree.h (DECL_CONV_FN_P): New fn.
2763 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
2764 * class.c (add_method): Use DECL_CONV_FN_P.
2765 * decl2.c (check_classfn): Likewise.
2766 * error.c (dump_function_name): Likewise.
2767 (dump_function_decl): Likewise.
2768 * pt.c (fn_type_unification): Likewise.
2769 * search.c (add_conversions): Likewise.
2770
2771 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
2772
2773 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
2774 * method.c (hack_identifier): Also check for using RESULT_DECL
2775 from outer context.
2776
2777 1998-10-27 Mark Mitchell <mark@markmitchell.com>
2778
2779 * decl.c (grokdeclarator): Use type_quals, rather than constp,
2780 consistently.
2781
2782 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
2783
2784 * call.c (standard_conversion): instantiate_type here.
2785 (reference_binding): And here.
2786 (implicit_conversion): Not here.
2787 (build_op_delete_call): No need to cons up an OVERLOAD.
2788 * cvt.c (cp_convert_to_pointer): instantiate_type here.
2789 (convert_to_reference): And here.
2790 * decl.c (grok_reference_init): Not here.
2791 (grokparms): Or here.
2792 * typeck2.c (digest_init): Or here.
2793 * typeck.c (decay_conversion): Take the address of overloaded
2794 functions, too.
2795 (require_instantiated_type): Lose.
2796 (convert_arguments): Don't handle unknown types here.
2797 (build_c_cast): Likewise.
2798 (build_binary_op): Gut.
2799 (build_conditional_expr): Don't require_instantiated_type.
2800 (build_modify_expr): Likewise.
2801 (build_static_cast): Don't instantiate_type.
2802 (build_reinterpret_cast): Likewise.
2803 (build_const_cast): Likewise.
2804 (convert_for_initialization): Likewise.
2805 (build_ptrmemfunc): Use type_unknown_p.
2806 (convert_for_assignment): Also do default_conversion on overloaded
2807 functions. Hand them off to ocp_convert.
2808
2809 1998-10-26 Mark Mitchell <mark@markmitchell.com>
2810
2811 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
2812 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
2813
2814 * class.c (finish_struct_1): Use build_cplus_array_type to build
2815 array types.
2816 * decl.c (init_decl_processing): Likewise.
2817 * except.c (expand_end_eh_spec): Likewise.
2818 * search.c (expand_upcast_fixups): Simplify very slightly.
2819
2820 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
2821
2822 * decl.c (grokdeclarator): Complain about a variable using
2823 constructor syntax coming back null from start_decl.
2824
2825 * friend.c (make_friend_class): Complain about trying to make
2826 a non-class type a friend.
2827
2828 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
2829 (start_function): Not here.
2830
2831 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
2832
2833 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
2834
2835 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
2836
2837 * typeck2.c (process_init_constructor): Only skip anonymous fields
2838 if they are bitfields.
2839
2840 * cp-tree.def (TYPEOF_TYPE): New code.
2841 * error.c (dump_type_real): Handle it.
2842 * pt.c (tsubst): Likewise.
2843 * tree.c (search_tree): Likewise.
2844 * semantics.c (finish_typeof): New fn.
2845 * parse.y (typespec): Use it.
2846 * cp-tree.h: Declare it.
2847
2848 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
2849
2850 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
2851
2852 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
2853
2854 * typeck.c (convert_arguments): Don't handle pmf references
2855 specially.
2856
2857 * init.c (build_member_call): Don't try to convert to the base type
2858 if it's ambiguous or pedantic.
2859
2860 * typeck2.c (check_for_new_type): Only depend on pedantic for
2861 C-style casts.
2862
2863 1998-10-25 Mark Mitchell <mark@markmitchell.com>
2864
2865 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
2866 non-converting constructors.
2867
2868 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
2869
2870 * gxxint.texi: Correct documentation for n, N, Q, and B.
2871
2872 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
2873
2874 * parse.y (condition): Convert VAR_DECL from reference to indirect
2875 reference.
2876
2877 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
2878
2879 * exception.cc (__cp_pop_exception): Free the original exception
2880 value, not the potentially coerced one.
2881
2882 1998-10-23 Mark Mitchell <mark@markmitchell.com>
2883
2884 * Makefile.in (hash.h): Run gperf when necessary.
2885
2886 * cp-tree.h (CP_TYPE_READONLY): Remove.
2887 (CP_TYPE_VOLATILE): Likewise.
2888 (CP_TYPE_QUALS): New macro.
2889 (CP_TYPE_CONST_P): Likewise.
2890 (CP_TYPE_VOLATILE_P): Likewise.
2891 (CP_TYPE_RESTRICT_P): Likewise.
2892 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
2893 (cp_build_type_variant): Rename to ...
2894 (cp_build_qualified_type): New function.
2895 (c_apply_type_quals_to_decl): Declare.
2896 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
2897 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
2898 (cp_type_qual_from_rid): New function.
2899 (compparms): Remove unused parameter. All callers changed.
2900 (cp_type_quals): New function.
2901 (at_least_as_qualified_p): Likewise.
2902 (more_qualified_p): Likewise.
2903
2904 * call.c (standard_conversion): Replace calls to
2905 cp_build_type_variant with cp_build_qualified_type. Use
2906 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
2907 compare them. Use CP_TYPE_* macros to check qualifiers.
2908 (reference_binding): Likewise.
2909 (implicit_conversion): Likewise.
2910 (add_builtin_candidates): Likewise.
2911 (build_over_call): Likewise.
2912 * class.c (overrides): Compare all qualifiers, not just `const',
2913 on method declarations.
2914 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
2915 (convert_pointer_to_real): Likewise.
2916 (type_promotes_to): Likewise.
2917 * decl.c (check_for_uninitialized_const_var): New function.
2918 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
2919 (cp_finish_decl): Use check_for_uninitialized_const_var.
2920 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
2921 handle `restrict'.
2922 (grok_ctor_properties): Likewise.
2923 (grok_op_properties): Likewise.
2924 (start_function): Likewise.
2925 (rever_static_member_fn): Likewise.
2926 * decl2.c (grok_method_quals): Likewise.
2927 (grokfield): Likewise.
2928 * error.c (dump_readonly_or_volatile): Rename to ...
2929 (dump_qualifiers): New function. Handle `restrict'.
2930 (dump_type_real): Use it.
2931 (dump_aggr_type): Likewise.
2932 (dump_type_prefix): Likewise.
2933 (dump_type_suffix): Likewise.
2934 (dump_function_decl): Likewise.
2935 (cv_as_string): Likewise.
2936 * gxx.gperf: Add __restrict and __restrict__.
2937 * gxxint.texi: Document `u' as used for `__restrict', and a few
2938 other previously undocumented codes.
2939 * hash.h: Regenerated.
2940 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
2941 (build_member_call): Likewise.
2942 (build_new_1): Likewise.
2943 * lex.c (init_parse): Add entry for RID_RESTRICT.
2944 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
2945 (cp_type_qual_from_rid): Define.
2946 * lex.h (enum rid): Add RID_RESTRICT.
2947 * method.c (process_modifiers): Deal with `restrict'.
2948 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
2949 * parse.c: Regenerated.
2950 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
2951 (tsubst_aggr_type): Likewise.
2952 (tsubst): Likewise.
2953 (check_cv_quals_for_unify): Likewise.
2954 (unify): Likewise.
2955 * rtti.c (init_rtti_processing): Likewise.
2956 (build_headof): Likewise.
2957 (get_tinfo_var): Likewise.
2958 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
2959 (expand_class_desc): Likewise.
2960 (expand_attr_desc): Likewise.
2961 (synthesize_tinfo_fn): Likewise.
2962 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
2963 (get_matching_virtual): Likewise.
2964 (expand_upcast_fixups): Likewise.
2965 * sig.c (build_signature_pointer_or_reference_name): Take
2966 type_quals, not constp and volatilep.
2967 (build_signature_pointer_or_reference_type): Likewise.
2968 (match_method_types): More CP_TYPE_QUALS conversion, etc.
2969 (build_signature_pointer_constructor): Likewise.
2970 (build_signature_method_call): Likewise.
2971 * tree.c (build_cplus_array_type): Likewise.
2972 (cp_build_type_variant): Rename to ...
2973 (cp_build_qualified_type): New function. Deal with `__restrict'.
2974 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
2975 (build_exception_variant): Likewise.
2976 (mapcar): Likewise.
2977 * typeck.c (qualif_type): Likewise.
2978 (common_type): Likewise.
2979 (comptypes): Likewise.
2980 (comp_cv_target_types): Likewise.
2981 (at_least_as_qualified_p): Define.
2982 (more_qualified_p): Likewise.
2983 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
2984 (compparms): Likewise.
2985 (inline_conversion): Likewise.
2986 (string_conv_p): Likewise.
2987 (build_component_ref): Likewise.
2988 (build_indirect_ref): Likewise.
2989 (build_array_ref): Likewise.
2990 (build_unary_op): Likewise.
2991 (build_conditional_expr): Likewise.
2992 (build_static_cast): Likewise.
2993 (build_c_cast): Likewise.
2994 (build_modify_expr): Likewise.
2995 (convert_For_assignment): Likewise.
2996 (comp_ptr_ttypes_real): Likewise.
2997 (cp_type_quals): New function.
2998
2999 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
3000
3001 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
3002 (CP_TYPE_VOLATILE): Likewise.
3003 * decl.c (grokdeclarator): Use them.
3004 * tree.c (canonical_type_variant): Likewise.
3005
3006 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
3007
3008 * parse.y (named_class_head): Push into class while parsing the
3009 base class list.
3010 * decl2.c (push_scope, pop_scope): New functions.
3011 * cp-tree.h: Declare them.
3012 * init.c (build_new_1): Delay cleanup until end of full expression.
3013
3014 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
3015
3016 * typeck.c (build_component_ref): Use of a type here is an error.
3017
3018 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
3019
3020 Revamp references to member functions.
3021 * method.c (hack_identifier): Call build_component_ref for a
3022 reference to a member function.
3023 * typeck.c (build_component_ref): Only return a single function
3024 if it's static. Otherwise, return a COMPONENT_REF.
3025 (build_x_function_call): Handle a COMPONENT_REF.
3026 (build_unary_op): Handle all unknown-type things.
3027 * decl2.c (arg_assoc): Handle COMPONENT_REF.
3028 * class.c (instantiate_type): Complain if the function we get is a
3029 nonstatic member function. Remove code for finding "compatible"
3030 functions.
3031 * pt.c (tsubst_copy): Handle NOP_EXPR.
3032 * tree.c (build_dummy_object): New fn.
3033 (maybe_dummy_object): New fn.
3034 (is_dummy_object): New fn.
3035 * cp-tree.h: Declare them.
3036 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
3037 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
3038 * init.c (build_member_call): Use maybe_dummy_object and
3039 is_dummy_object.
3040 (build_offset_ref): Use maybe_dummy_object.
3041 (resolve_offset_ref): Use is_dummy_object.
3042 * typeck.c (build_x_function_call): Call build_dummy_object.
3043 (unary_complex_lvalue): Call is_dummy_object.
3044
3045 * typeck.c (build_component_addr): Make sure field is a field.
3046
3047 * call.c (build_new_op): Delete obsolete code.
3048
3049 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
3050
3051 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
3052
3053 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
3054 std if std is ignored.
3055
3056 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
3057
3058 * decl.c (grokvardecl): Fix thinko.
3059
3060 * decl.c (grokdeclarator): Embedded attrs bind to the right,
3061 not the left.
3062
3063 * parse.y (fn.def2): Fix 'attrs' format.
3064
3065 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
3066
3067 * Makefile.in (CONFLICTS): Update.
3068 * parse.y (expr_or_declarator_intern): New rule.
3069 (expr_or_declarator, direct_notype_declarator, primary,
3070 functional_cast): Use it.
3071 (notype_declarator_intern): New rule.
3072 (notype_declarator, complex_notype_declarator): Use it.
3073
3074 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
3075
3076 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
3077 (grokvardecl): Likewise.
3078
3079 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3080
3081 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
3082 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
3083
3084 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
3085
3086 * pt.c (process_partial_specialization): Cast 1st argument of
3087 `bzero' to (PTR).
3088
3089 * tree.c (build_base_fields): Cast `base_align' to (int) when
3090 comparing against one.
3091
3092 1998-10-16 Mark Mitchell <mark@markmitchell.com>
3093
3094 * decl.c (lookup_name_real): Handle template parameters for member
3095 templates where said parameters have the same name as the
3096 surrounding class.
3097
3098 * decl.c (expand_static_init): Build cleanups before entering the
3099 anonymous function used to do them to avoid access-checking
3100 confusion.
3101
3102 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
3103 accidentally removed by previous change, and make DECL_RTL here.
3104 * class.c (add_method): Don't make DECL_RTL here.
3105
3106 * pt.c (for_each_template_parm): Don't examine uninstantiated
3107 default arguments.
3108
3109 1998-10-16 Dave Brolley <brolley@cygnus.com>
3110
3111 * lex.c (real_yylex): Fix unaligned access of wchar_t.
3112
3113 1998-10-16 Mark Mitchell <mark@markmitchell.com>
3114
3115 * class.c (add_method): Fix documentation to reflect previous
3116 changes. Check for duplicate method declarations here.
3117 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
3118 correctly; such things never match.
3119 (grokfndecl): Don't look for duplicate methods here.
3120 * decl2.c (check_classfn): Don't assume names are mangled.
3121 Don't add bogus member function declarations to a class before the
3122 class type is complete.
3123 (grokfield): Reformat error message.
3124 * method.c (set_mangled_name_for_decl): Don't mangle names while
3125 processing_template_decl.
3126
3127 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
3128
3129 * typeck.c (build_indirect_ref): Complain about a pointer to data
3130 member, too.
3131 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
3132 data member.
3133 * init.c (resolve_offset_ref): Don't undo the above.
3134
3135 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
3136 (struct lang_decl_flags): Add `bitfield'.
3137 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
3138 DECL_BIT_FIELD.
3139 * decl2.c (grokbitfield, grok_alignof): Likewise.
3140 * init.c (build_offset_ref): Likewise.
3141 * typeck.c (build_component_addr, expr_sizeof): Likewise.
3142 * cvt.c (build_up_reference): Don't crash if taking the address
3143 returns error_mark_node.
3144
3145 * decl.c (grokfndecl): Also check ctype when checking for ::main().
3146
3147 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
3148
3149 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
3150 Do mangling here.
3151 (grokdeclarator): Instead of here.
3152 * friend.c (do_friend): Lose special handling of ::main and
3153 __builtin_*.
3154 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
3155
3156 * spew.c (yylex): Clear looking_for_typename if we got
3157 'enum { ... };'.
3158
3159 1998-10-15 Mark Mitchell <mark@markmitchell.com>
3160
3161 * class.c (maybe_warn_about_overly_private_class): Improve error
3162 messages for class with only private constructors.
3163
3164 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
3165 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
3166 (build_typename_type): New function.
3167 * decl.c (build_typename_type): Broken out from ...
3168 (make_typename_type): Use it.
3169 * search.c (lookup_field): Likewise.
3170
3171 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
3172
3173 * pt.c (convert_nontype_argument): Check against type_referred_to.
3174 * decl.c (grokvardecl): Check for declarator name before building
3175 DECL_ASSEMBLER_NAME.
3176
3177 1998-10-14 Mark Mitchell <mark@markmitchell.com>
3178
3179 * pt.c (lookup_template_class): Add comment.
3180 (instantiate_class_template): Don't mark the _TYPE node for
3181 member class templates as an instantiation.
3182
3183 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
3184
3185 * decl.c (grokfndecl): Fix my thinko.
3186
3187 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
3188
3189 * tinfo2.cc (fast_compare): Remove.
3190 (before): Just use strcmp.
3191 * tinfo.cc (operator==): Just use strcmp.
3192
3193 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
3194
3195 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
3196 declarations.
3197
3198 1998-10-13 Mark Mitchell <mark@markmitchell.com>
3199
3200 * cp-tree.h (specializations_of_same_template_p): Remove.
3201 * search.c (get_template_base): Don't use it.
3202 (get_template_base_recursive): Likewise.
3203 * pt.c (specializations_of_same_template_p): Remove.
3204 (unify): Don't use it.
3205 (lookup_template_class): Find the correct parent when setting
3206 CLASSTYPE_TI_TEMPLATE.
3207
3208 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
3209
3210 * tinfo.cc (operator==): Always compare names.
3211
3212 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
3213
3214 * decl.c (start_function): Fix cut-and-paste error.
3215
3216 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
3217
3218 * inc/typeinfo: Add #pragma interface.
3219 (operator!=): Just call operator==.
3220 * tinfo.cc: Add #pragma implementation.
3221 (operator==): Move from inc/typeinfo and tinfo2.cc.
3222 Check __COMMON_UNRELIABLE instead of _WIN32.
3223
3224 * typeck2.c (my_friendly_abort): Add URL.
3225
3226 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
3227
3228 * decl.c (start_method): Added extra parameter for attributes.
3229 * cp-tree.h (start_method): Update prototype.
3230 * parse.y (fn.def2): Update start_method parameter list.
3231
3232 1998-10-11 Mark Mitchell <mark@markmitchell.com>
3233
3234 * cp-tree.h (specializations_of_same_template_p): Declare.
3235 * pt.c (specializations_of_same_template_p): New function.
3236 (unify): Use it.
3237 * search.c (get_template_base): Use it.
3238 (get_template_base_recursive): Likewise.
3239
3240 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
3241
3242 * decl2.c (start_objects): Add new variable `joiner' and
3243 initialize it properly.
3244
3245 1998-10-09 Mark Mitchell <mark@markmitchell.com>
3246
3247 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
3248 change to vtable types.
3249
3250 * cvt.c (ocp_convert): Avoid infinite recursion caused by
3251 1998-10-03 change.
3252
3253 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
3254
3255 * pt.c (resolve_overloaded_unification): New fn.
3256 (try_one_overload): Likewise.
3257 (unify): Don't fail on unknown type.
3258 (type_unification_real): Likewise. Use resolve_overloaded_unification
3259 to handle an overloaded argument.
3260 (template_args_equal): Split out...
3261 (comp_template_args): From here.
3262 (determine_specialization): Also allow a template with more
3263 parms than were explicitly specified.
3264 * cp-tree.h: Add template_args_equal.
3265 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
3266
3267 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
3268
3269 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
3270 change.
3271
3272 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
3273
3274 * typeck.c (unsigned_type): Only return TItype nodes when
3275 HOST_BITS_PER_WIDE_INT is >= 64 bits.
3276 (signed_type): Likewise.
3277 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
3278 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
3279 (init_decl_processing): Only create TItype nodes when
3280 HOST_BITS_PER_WIDE_INT is >= 64 bits.
3281 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
3282 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
3283
3284 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3285
3286 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
3287 (gxx.gperf): Update comments describing invocation flags.
3288 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
3289
3290 1998-10-07 Mark Mitchell <mark@markmitchell.com>
3291
3292 * class.c (finish_struct_1): Add commentary on previous change.
3293
3294 * cp-tree.h (vtbl_ptr_type_node): New variable.
3295 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
3296 already of the right type.
3297 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
3298 Simplify code to grow vtable.
3299 * decl.c (vtbl_ptr_type_node): Define.
3300 (init_decl_processing): Initialize it.
3301
3302 1998-10-06 Mark Mitchell <mark@markmitchell.com>
3303
3304 * cp-tree.def (PTRMEM_CST): New tree node.
3305 * cp-tree.h (ptrmem_cst): New type.
3306 (lang_type): Remove local_typedecls.
3307 (dummy): Increase to 12 bits from 11.
3308 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
3309 (PTRMEM_CST_CLASS): New macro.
3310 (PTRMEM_CST_MEMBER): Likewise.
3311 (current_access_specifier): New variable.
3312 (current_class_type): Remove duplicate declaration.
3313 (finish_struct): Change prototype.
3314 (unreverse_member_declarations): New function.
3315 (pushdecl_class_level): Change prototype.
3316 (grok_enum_decls): Remove.
3317 (fixup_anonymous_union): New function.
3318 (grok_x_components): Change prototype.
3319 (tsubst_chain): Remove.
3320 (finish_member_template_decl): Likewise.
3321 (check_explicit_specialization): Fix indentation.
3322 (finish_class_definition): Change prototype.
3323 (finish_member_class_template): Likewise.
3324 (finish_member_declaration): New function.
3325 (check_multiple_declarators): Likewise.
3326 * class.c (class_stack_node_t): New type.
3327 (current_class_base): Remove.
3328 (current_class_stack): Change type.
3329 (current_access_specifier): New variable.
3330 (grow_method): Remove.
3331 (check_member_decl_is_same_in_complete_scope): Break out from
3332 finish_struct.
3333 (make_method_vec): New function.
3334 (free_method_vec): Likewise.
3335 (add_implicitly_declared_members): Break out from finish_struct_1.
3336 (free_method_vecs): New variable.
3337 (add_method): Rework for direct use from parser.
3338 (handle_using_decl): Watch for NULL_TREE while iterating through
3339 CLASSTYPE_METHOD_VEC.
3340 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
3341 just do some error-checking.
3342 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
3343 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
3344 (finish_struct): Change prototype. Simplify; fields and methods
3345 are already set up at this point.
3346 (init_class_processing): Set up current_class_stack.
3347 (pushclass): Save current_access_specifier.
3348 (popclass): Restore it.
3349 (currently_open_class): Simplify.
3350 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
3351 * decl.c (saved_scope): Add access_specifier.
3352 (maybe_push_to_top_level): Save it.
3353 (pop_from_top_level): Restore it.
3354 (maybe_process_template_type_declaration): Use
3355 finish_member_declaration.
3356 (pushtag): Likewise.
3357 (pushdecl_class_level): Don't return a value.
3358 (fixup_anonymous_union): Break out from grok_x_components.
3359 (shadow_tag): Use it.
3360 (xref_tag): Complain about using an elaborated type specifier to
3361 reference a template type parameter or typedef name.
3362 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
3363 (current_local_enum): Remove.
3364 (build_enumerator): Call finish_member_declaration.
3365 (grok_enum_decls): Remove.
3366 * decl2.c (grok_x_components): Simplify.
3367 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
3368 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
3369 (merge_functions): Add to comment.
3370 (arg_assoc_type): Prototype.
3371 (arg_assoc): Pass as many arguments as there are parameters.
3372 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
3373 OFFSET_REF.
3374 * expr.c (cpls_expand_expr): Remove dead code. Handle
3375 PTRMEM_CST.
3376 * friend.c (do_friend): Lookup friends when in nested classes.
3377 Change comments.
3378 * init.c (build_offset_ref): Do lookup even for classes that are
3379 only partially defined.
3380 (decl_constant_value): Remove dead code.
3381 * method.c (build_overload_value): Remove hack where by TYPE was
3382 not a TYPE. Handle PTRMEM_CST.
3383 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
3384 should go.
3385 * parse.y (components, notype_components, component_decl,
3386 component_decl_1, component_declarator, component_declarator0):
3387 Now all are itype rather than ttype. Rework to add members to
3388 classes on the fly.
3389 (typesqpecqual_reserved): Use check_multiple_declarators.
3390 (structsp): Update class to finish_class_definition.
3391 (do_xref_defn): Unsplit into named_class_head.
3392 (access_specifier): Set current_access_specifier.
3393 * pt.c (set_current_access_from_decl): New function.
3394 (finish_member_template_decl): Don't take the parameters.
3395 (comp_template_args): Make more robust.
3396 (lookup_template_class): Don't use current_local_enum.
3397 (for_each_template_parm): Handle PTRMEM_CST.
3398 (instantiate_class_template): Use set_current_access_from_decl,
3399 finish_member_declaration and unreverse_member_declarations. Set
3400 lineno/input_filename before generating implicit member functions.
3401 (type_unification_real): Don't assume back-unification happens
3402 only for the last argument.
3403 (regenerate_decl_from_template): Call pushclass a bit earlier.
3404 (tsubst_chain): Remove.
3405 (tsubst_enum): Use set_current_access_from_decl.
3406 (set_mangled_name_for_template_decl): Fix indentation.
3407 * search.c (lookup_fnfields_1): Change iteration through
3408 CLASSTYPE_METHOD_VEC.
3409 (dfs_pushdecls): Likewise.
3410 (dfs_compress_decls): Likewise.
3411 (add_conversions): Likewise.
3412 * semantics.c (finish_class_definition): Don't take components.
3413 Change call to finish_struct.
3414 (finish_member_declaration): New function.
3415 (finish_member_class_template): Don't take template parameters.
3416 Change call to grok_x_components. Call finish_member_template_decl.
3417 (check_multiple_declarators): New function.
3418 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
3419 a passed in fieldlist.
3420 * tree.c (search_tree): Handle PTRMEM_CST.
3421 (mapcar): Likewise.
3422 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
3423 INTEGER_CSTs, for pointer-to-data members.
3424
3425 * call.c (resolve_args): Resolve template specializations, if
3426 possible.
3427
3428 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3429
3430 * Makefile.in (spew.o): Depend on toplev.h.
3431
3432 * call.c (compare_ics): Initialize variables `deref_from_type2',
3433 `deref_to_type1' and `deref_to_type2'.
3434
3435 * except.c (get_eh_type): Hide prototype and definition.
3436 (process_start_catch_block_old): Remove unused static prototype.
3437
3438 * pt.c (tsubst_decl): Initialize variable `argvec'.
3439
3440 * spew.c: Include toplev.h.
3441
3442 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
3443
3444 * pt.c (instantiate_decl): Do save and restore file position.
3445
3446 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
3447
3448 * method.c (build_decl_overload_real): Clear
3449 numeric_output_need_bar after __.
3450
3451 1998-10-05 Nathan Sidwell <nathan@acm.org>
3452
3453 * call.c (build_new_method_call): Issue 'incomplete type' error,
3454 if class is not defined.
3455
3456 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3457
3458 * call.c (build_object_call): Move declaration of variable
3459 `fn' into the scope where it is used. Don't access variable
3460 `fn' when it is uninitialized, instead use `fns'.
3461
3462 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3463
3464 * errfn.c (cp_thing): Print buf as a string not as a printf format
3465 to avoid problems with the operator%. Consequently, `%%' sequences
3466 in format are copied as `%' in buf.
3467
3468 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
3469
3470 * pt.c (pop_tinst_level): Call extract_interface_info.
3471 (instantiate_decl): Don't save and restore file position.
3472
3473 * decl.c (cp_finish_decl): Make statics in extern inlines and
3474 templates common, if possible and the target doesn't support weak
3475 symbols.
3476
3477 * decl.c (grokdeclarator): Remove redundant calls to
3478 build_type_variant and some duplicated code.
3479 * sig.c (build_signature_reference_type): Only take the type parm.
3480 (build_signature_pointer_type): Likewise.
3481 * tree.c (build_cplus_method_type): Adjust.
3482 * cp-tree.h: Update.
3483
3484 1998-10-04 Mark Mitchell <mark@markmitchell.com>
3485
3486 * call.c (build_over_call): Make pedwarns about dropped qualifiers
3487 into full-fledged errors.
3488 * cvt.c (convert_to_reference): Likewise.
3489 * typeck.c (convert_for_assignment): Likewise.
3490
3491 * search.c (expand_upcast_vtables): In addition to unsetting
3492 TREE_READONLY, remove top-level const type qualifier.
3493
3494 1998-10-03 Mark Mitchell <mark@markmitchell.com>
3495
3496 * class.c (current_class_ptr, current_class_ref): Clarify
3497 documentation.
3498 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
3499 NOP type conversions.
3500 * decl.c (decls_match): Use comptypes directly; ignore
3501 qualifiers on the DECL.
3502 (duplicate_decls): Remove qualifier checks on DECL.
3503 (grokdeclarator): Make the type built up include top-level
3504 qualifiers.
3505 * decl2.c (do_dtors): Fix spelling error.
3506 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
3507 when printing type information.
3508 * init.c (build_new_1): Add documentation. Deal with the fact
3509 that type of allocated memory now contains qualifiers.
3510 * lex.c (is_global): Improve error-recovery.
3511 * sig.c (build_member_function_pointer): Don't cast away const
3512 on fields of sigtable_entry_type.
3513 * tree.c (lvalue_type): Don't look at top-level qualifiers on
3514 expressions.
3515 * typeck.c (decay_conversion): Likewise.
3516 (build_component_ref): Make sure the type of the COMPONENT_REF
3517 contains top-level qualifiers, as appropriate. Improve
3518 error-handling.
3519 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
3520 (build_array_ref): Likewise.
3521 (build_unary_op): Improve error-recovery.
3522 (unary_complex_lvalue): Make taking the address a bound member
3523 function an error, not a sorry.
3524 (build_conditional_expr): Look at the type qualifiers, not the
3525 qualifiers on the expression itself.
3526
3527 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
3528
3529 * decl2.c (merge_functions): Remove duplicates.
3530
3531 * decl2.c: Add -f{no-,}implicit-inline-templates.
3532 (import_export_decl): Check it.
3533
3534 * decl.c (lookup_name_real): Template parms also take precedence
3535 over implicit typename. Only warn if yylex.
3536
3537 * typeck.c (build_conditional_expr): Only fold if ifexp is an
3538 INTEGER_CST.
3539
3540 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
3541 instead of linkage.
3542
3543 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
3544
3545 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
3546 * class.c (build_vbase_pointer): Use it.
3547 * rtti.c (expand_class_desc): Likewise.
3548 * tree.c (build_vbase_pointer_fields): Likewise.
3549
3550 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
3551
3552 * decl.c (start_decl): Add invocation of
3553 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
3554 (start_function): Add invocation of
3555 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
3556
3557 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
3558 HANDLE_GENERIC_PRAGMAS.
3559
3560 1998-09-28 Anthony Green <green@cygnus.com>
3561
3562 * semantics.c (finish_asm_stmt): Always permit volatile asms.
3563
3564 1998-09-28 Mark Mitchell <mark@markmitchell.com>
3565
3566 * decl.c (grokdeclarator): Tighten checks for invalid
3567 destructors. Improve error-messages and error-recovery.
3568 * decl2.c (check_classfn): Don't assume that mangled destructor
3569 names contain type information.
3570
3571 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
3572
3573 * search.c (get_base_distance): Remove assert.
3574
3575 * decl2.c (build_anon_union_vars): Don't process a field with no
3576 name.
3577 (finish_anon_union): Also complain about local anon unions with no
3578 members.
3579
3580 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
3581
3582 * decl.c (lookup_namespace_name): If the name is a namespace,
3583 return it immediately.
3584
3585 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3586
3587 * cp-tree.h (define_case_label): Remove unused parameter.
3588 (check_java_method): Likewise.
3589 (grokclassfn): Likewise.
3590 (expand_aggr_init): Likewise.
3591 (build_x_delete): Likewise.
3592 (maybe_end_member_template_processing): Likewise.
3593 (unshare_base_binfos): Add prototype.
3594 (string_conv_p): Likewise.
3595 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
3596
3597 * cvt.c (build_up_reference): Remove unused parameter
3598 `checkconst', all callers changed.
3599 (build_type_conversion): Mark parameter `code' with
3600 ATTRIBUTE_UNUSED.
3601 (build_expr_type_conversion): Initialize variable `conv'.
3602
3603 * decl.c (push_namespace): Initialize variable `d'.
3604 (define_case_label): Remove unused parameter `decl', all callers
3605 changed.
3606
3607 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
3608 `argc' with ATTRIBUTE_UNUSED.
3609 (grokclassfn): Remove unused parameter `cname', all callers
3610 changed.
3611 (check_java_method): Likewise for parameter `ctype'.
3612 (copy_assignment_arg_p): Mark parameter `virtualp' with
3613 ATTRIBUTE_UNUSED.
3614 (finish_prevtable_vardecl): Likewise for parameter `prev'.
3615
3616 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
3617
3618 * init.c (expand_aggr_init_1): Remove unused parameter
3619 `alias_this', all callers changed.
3620 (expand_aggr_init): Likewise.
3621 (expand_default_init): Likewise.
3622 (build_new_1): Initialize variable `susp'.
3623 (build_x_delete): Remove unused parameter `type', all callers
3624 changed.
3625
3626 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
3627 ATTRIBUTE_UNUSED.
3628 (readescape): Use (unsigned) value in shift.
3629 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
3630 comparing to a signed quantity.
3631
3632 * pt.c (maybe_end_member_template_processing): Remove unused
3633 parameter `decl', all callers changed.
3634 (check_explicit_specialization): Add braces around empty body in
3635 an else-statement.
3636 (current_template_args): Initialize variable `args'.
3637 (lookup_template_class): Likewise for variable `prev_local_enum'.
3638 (tsubst_decl): Likewise for variable `r'.
3639 (set_mangled_name_for_template_decl): Initialize variable
3640 `context'.
3641
3642 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
3643 Likewise for variable `i'.
3644 (yylex): Initialize variable `trrr'.
3645
3646 * typeck.c (compparms): Mark variable `strict' with
3647 ATTRIBUTE_UNUSED.
3648
3649 * xref.c (simplify_type): Cast argument of ctype function to
3650 `unsigned char'.
3651
3652 1998-09-24 Mark Mitchell <mark@markmitchell.com>
3653
3654 * cp-tree.h (language_lvalue_valid): Remove.
3655 * decl.c (grokdeclarator): Don't disallow references to functions.
3656 * tree.c (lvalue_p_1): New function, combining duplicated
3657 code from ...
3658 (lvalue_p): Use it.
3659 (real_lvalue_p): Likewise.
3660 * typeck.c (language_lvalue_valid): Remove.
3661 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
3662 they don't have TREE_READONLY set.
3663 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
3664
3665 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
3666
3667 * spew.c (yylex): Give diagnostic.
3668 * hash.h (is_reserved_word): Add export.
3669 * gxx.gperf: Likewise.
3670 * lex.h (rid): Add RID_EXPORT.
3671 * lex.c (init_parse): Likewise.
3672
3673 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
3674
3675 * friend.c (do_friend): Make warning a full sentence.
3676
3677 1998-09-22 Mark Mitchell <mark@markmitchell.com>
3678
3679 * parse.y (component_decl_list): Improve error-recovery.
3680
3681 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
3682
3683 * decl.c (make_typename_type): Move error to point where name
3684 variable can be used by dump_type.
3685
3686 1998-09-22 Mark Mitchell <mark@markmitchell.com>
3687
3688 * decl.c (grokfndecl): Improve error-recovery.
3689 * decl2.c (grokfield): Likewise.
3690 * pt.c (finish_member_template_decl): Likewise.
3691
3692 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
3693
3694 * method.c (hack_identifier): Finding multiple members is always
3695 an error.
3696
3697 1998-09-21 Per Bothner <bothner@cygnus.com>
3698
3699 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
3700
3701 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
3702
3703 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
3704
3705 1998-09-20 Mark Mitchell <mark@markmitchell.com>
3706
3707 * class.c (maybe_warn_about_overly_private_class): Reformat.
3708
3709 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
3710
3711 * exception.cc (__cplus_type_matcher): Realign some code.
3712
3713 1998-09-16 Mark Mitchell <mark@markmitchell.com>
3714
3715 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
3716 (tinfo2.o): Likewise.
3717 (exception.o): Likewise.
3718 (new.o): Likewise.
3719 (opnew.o): Likewise.
3720 (opnewnt.o): Likewise.
3721 (opvnew.o): Likewise.
3722 (opvnewnt.o): Likewise.
3723 (opdel.o): Likewise.
3724 (opdelnt.o): Likewise.
3725 (opvdel.o): Likewise.
3726 (opvdelnt.o): Likewise.
3727
3728 1998-09-16 Richard Henderson <rth@cygnus.com>
3729
3730 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
3731
3732 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
3733
3734 * call.c (build_field_call): Handle static data members too.
3735
3736 * typeck.c (comptypes): When comparing pointer types, check
3737 whether referred types match even in strictest modes.
3738
3739 1998-09-15 Mark Mitchell <mark@markmitchell.com>
3740
3741 * cp-tree.h: Revert previous change.
3742 (finish_struct_methods): Remove declaration.
3743 * class.c: Revert previous change.
3744 (maybe_warn_about_overly_private_class): New function.
3745 (finish_struct_methods): Declare here, and make static. Remove
3746 unnecessary parameters. Tidy slightly. Use
3747 maybe_warn_about_overly_private_class.
3748 (finish_struct_1): Adjust. Remove check for private constructors,
3749 now done elsewhere.
3750 (finish_struct): Adjust.
3751
3752 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
3753
3754 * except.c (expand_start_catch_block): No need to check for new
3755 exception model.
3756 (process_start_catch_block_old): Deleted.
3757 (process_start_catch_block): Add call to start_decl_1().
3758 (expand_end_catch_block): Add call to end_catch_handler().
3759 * exception.cc (__cplus_type_matcher): Only check the exception
3760 language if there is an exception table.
3761
3762 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
3763
3764 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
3765 as used to prevent conflicts with virtual function tables.
3766
3767 1998-09-14 Mark Mitchell <mark@markmitchell.com>
3768
3769 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
3770 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
3771 * class.c (maybe_class_too_private_p): New function.
3772 (finish_struct_methods): Use it.
3773 (finish_struct_1): Likewise.
3774 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
3775 appropriate.
3776
3777 * pt.c (check_specialization_scope): Fix spelling error.
3778 (check_explicit_specialization): Remove code to handle explicit
3779 specializations in class scope; they are now correctly diagnosed
3780 as errors.
3781
3782 1998-09-10 Mark Mitchell <mark@markmitchell.com>
3783
3784 * decl.c (pushdecl): Don't copy types if the
3785 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
3786 type.
3787
3788 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3789
3790 * class.c (get_enclosing_class): New function.
3791 (is_base_of_enclosing_class): Likewise.
3792 * cp-tree.h (get_enclosing_class): Declare.
3793 (is_base_of_enclosing_class): Likewise.
3794 * pt.c (coerce_template_parms): Use them.
3795
3796 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
3797
3798 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
3799 null to decide whether to use it.
3800
3801 * error.c (dump_type_real): Handle NAMESPACE_DECL.
3802 * parse.y (base_class.1): Avoid crash on error.
3803
3804 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
3805
3806 * decl.c (make_typename_type): If context is a namespace, the code
3807 is in error.
3808
3809 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
3810
3811 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
3812
3813 1998-09-08 Mark Mitchell <mark@markmitchell.com>
3814
3815 * cp-tree.h (anonymous_namespace_name): Declare.
3816 * decl.c: Define it.
3817 (push_namespace): Use anonymous_namespace_name, rather than local
3818 static anon_name.
3819 * error.c (dump_decl): If a namespace is named
3820 anonymous_namespace_name, call it {anonymous}.
3821
3822 * decl.c (grokparms): Distinguish between references and pointers
3823 in error message.
3824
3825 1998-09-08 Richard Henderson <rth@cygnus.com>
3826 Mark Mitchell <mark@markmitchell.com>
3827
3828 * pt.c (process_partial_specialization): Consistently allocate
3829 and zero tpd.parms based on ntparms. Use tpd2.parms, not
3830 tpd.parms, where appropriate.
3831
3832 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
3833
3834 * Makefile.in (INCLUDES): Update after recent toplevel gcc
3835 reorganizations.
3836
3837 1998-09-05 Mark Mitchell <mark@markmitchell.com>
3838
3839 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
3840 * class.c (finish_struct): Remove hackery to deal with explicit
3841 specializations in class scope.
3842 * decl.c (grokfndecl): Improve error-recovery.
3843 * decl2.c (grokfield): Likewise.
3844 * pt.c (check_specialization_scope): New function.
3845 (begin_specialization): Call it.
3846 (process_partial_specialization): New function, split out from
3847 push_template_decl. Check partial specializations more
3848 stringently.
3849 (push_template_decl): Call it.
3850 (check_explicit_specialization): Don't attempt to handle explicit
3851 specializations in class scope.
3852 (template_parm_data): Document. Add current_arg and
3853 arg_uses_template_parms.
3854 (mark_template_parm): Set it.
3855 (tsubst_arg_types): Remove unused variable.
3856 * semantics.c (begin_class_definition): Tweak.
3857
3858 1998-09-04 Mark Mitchell <mark@markmitchell.com>
3859
3860 * inc/typeinfo (type_info::type_info(const char*)): Make
3861 `explicit'.
3862
3863 * cp-tree.h (hash_tree_cons_simple): New macro.
3864 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
3865 (coerce_template_parms): Use make_temp_vec, instead of
3866 make_tree_vec. Document this behavior.
3867 (lookup_template_class): Likewise.
3868 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
3869 Remove dead code (and add assertion to check its deadness). Fix
3870 bug w.r.t. exception specifications.
3871
3872 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
3873
3874 * decl2.c (import_export_vtable): Always make artificials comdat.
3875 (import_export_decl): Likewise.
3876 * pt.c (mark_decl_instantiated): Likewise.
3877
3878 1998-09-03 Mark Mitchell <mark@markmitchell.com>
3879
3880 * cp-tree.h (finish_globally_qualified_member_call_expr):
3881 Rename to ...
3882 (finish_qualified_call_expr).
3883 * semantics.c: Likewise.
3884 * parse.y (primary): Use it.
3885 * method.c (hack_identifier): Remove redundant code.
3886
3887 * init.c (resolve_offset_ref): Call convert_from_reference to
3888 handle members of reference type. Improve error recovery.
3889
3890 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
3891
3892 * cp-tree.h: Declare warn_nontemplate_friend.
3893 * decl2.c (lang_decode_option): Set.
3894 * lang-options.h: Add -Wnon-template-friend.
3895 * friend.c (do_friend): Use to toggle non-template function warning.
3896
3897 1998-09-03 Mark Mitchell <mark@markmitchell.com>
3898
3899 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
3900 corresponding INTEGER_CSTs when processing_template_decl.
3901 * pt.c (tsubst_enum): Tweak accordingly.
3902
3903 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
3904
3905 * decl.c (pushdecl_class_level): Add warning here.
3906 (pushdecl): Tweak.
3907
3908 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
3909
3910 * cvt.c (convert_pointer_to_real): Tidy.
3911 * search.c (get_base_distance_recursive): Simplify.
3912 (get_base_distance): Likewise.
3913
3914 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
3915 parms.
3916
3917 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
3918
3919 * lex.c (check_newline): Call HANDLE_PRAGMA before
3920 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
3921 if unknown pragmas are encountered.
3922 (handle_sysv_pragma): Interpret return code from
3923 handle_pragma_token (). Return success/failure indication rather
3924 than next unprocessed character.
3925 (pragma_getc): New function: retrieves characters from the
3926 input stream. Defined when HANDLE_PRAGMA is defined.
3927 (pragma_ungetc): New function: replaces characters back into the
3928 input stream. Defined when HANDLE_PRAGMA is defined.
3929
3930 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
3931
3932 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
3933 * class.c (build_vtable_entry_ref): Likewise.
3934
3935 1998-09-01 Mark Mitchell <mark@markmitchell.com>
3936
3937 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
3938 * decl2.c (import_export_decl): Likewise.
3939 * pt.c (instantiate_decl): Use it.
3940
3941 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
3942
3943 * decl.c (lookup_name_real): Also do implicit typename thing for
3944 artificial TYPE_DECLs.
3945 * search.c (lookup_field): Likewise.
3946 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
3947 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
3948 (enter_scope_of): Extract type from implicit typename.
3949 (begin_class_definition): Likewise.
3950 * lex.c (identifier_type): Handle implicit typename when checking
3951 for SELFNAME.
3952
3953 * cp-tree.h: Declare flag_strict_prototype.
3954 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
3955 -fstrict-prototype.
3956 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
3957 specified, set it to the value of pedantic.
3958
3959 1998-09-01 Mark Mitchell <mark@markmitchell.com>
3960
3961 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
3962
3963 1998-08-31 Mark Mitchell <mark@markmitchell.com>
3964
3965 * decl.c (finish_enum): Handle member enums of classes declared in
3966 template functions.
3967
3968 * decl2.c (grok_x_components): Strip attributes before calling
3969 groktypename.
3970
3971 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
3972
3973 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
3974 -fenum-int-equivalence and -fno-nonnull-objects.
3975 * class.c (check_for_override): Remove support for -fall-virtual.
3976 (finish_struct_1): Likewise.
3977 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
3978 * typeck.c (build_binary_op_nodefault): Likewise.
3979 * cvt.c (ocp_convert): Likewise.
3980 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
3981 * class.c (build_vbase_path): Likewise.
3982
3983 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
3984
3985 * Makefile.in (INTERFACE): New, set to 1.
3986
3987 1998-08-30 Mark Mitchell <mark@markmitchell.com>
3988
3989 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
3990 comparing with global_namespace.
3991 (dump_aggr_type): Likewise.
3992
3993 * decl.c (grokfndecl): Issue error on declaration of friend
3994 templates with explicit template arguments.
3995
3996 * pt.c (convert_template_argument): New function, split out
3997 from...
3998 (coerce_template_parms): Here.
3999 (tsubst): Attempt better error-recovery.
4000
4001 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
4002
4003 * pt.c (decl_template_parm_p): Add checks for
4004 TEMPLATE_TEMPLATE_PARM.
4005
4006 1998-08-28 Mark Mitchell <mark@markmitchell.com>
4007
4008 * lex.c (do_identifier): Fix thinko in previous change.
4009
4010 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
4011
4012 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
4013 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
4014
4015 1998-08-28 Richard Henderson <rth@cygnus.com>
4016
4017 Add support for discarding unused virtual functions.
4018 * lang-options.h: Add -fvtable-gc.
4019 * cp-tree.h: Add flag_vtable_gc.
4020 * decl2.c (output_vtable_inherit): New fn.
4021 (finish_vtable_vardecl): Call it.
4022 * class.c (build_vtable_entry_ref): New fn.
4023 (build_vtbl_ref): Call it.
4024
4025 1998-08-28 Mark Mitchell <mark@markmitchell.com>
4026
4027 * cp-tree.h (build_enumerator): Take the enumeration type as a
4028 parameter.
4029 * decl.c (finish_enum): Don't set the TREE_TYPE for the
4030 enumeration constant values if we're processing_template_decls.
4031 Don't set the type for the CONST_DECLs either; that's done in
4032 build_enumerator.
4033 (build_enumerator): Take the enumeration type as a
4034 parameter.
4035 * lex.c (do_identifier): Don't resolve enumeration constants while
4036 processing template declarations, even if they happen to be
4037 TEMPLATE_PARM_INDEXs.
4038
4039 * parse.y (current_enum_type): New variable.
4040 (primary): Don't allow statement-expression in local classes just
4041 as we don't in global classes.
4042 (structsp): Use current_enum_type.
4043 (enum_list): Likewise.
4044 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
4045 finish_enum; they no longer occur.
4046
4047 * cp-tree.h (finish_base_specifier): New function.
4048 * parse.y (base_class): Use it.
4049 * semantics.c (finish_base_specifier): Define it.
4050
4051 * parse.y (structsp): Warn on use of typename outside of template
4052 declarations.
4053
4054 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
4055
4056 * lex.c (handle_cp_pragma): Remove #pragma vtable.
4057 * lang-options.h: Remove +e options.
4058 * decl2.c (lang_decode_option): Likewise.
4059 (import_export_vtable): Don't check write_virtuals.
4060 (finish_vtable_vardecl, finish_file): Likewise.
4061 * search.c (dfs_debug_mark): Likewise.
4062 * semantics.c (begin_class_definition): Likewise.
4063 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
4064
4065 * call.c (build_over_call): Check flag_elide_constructors.
4066 * decl2.c: flag_elide_constructors defaults to 1.
4067 * typeck.c (convert_arguments): Remove return_loc parm.
4068 (build_function_call_real): Adjust.
4069
4070 * search.c: Tear out all mi_matrix and memoize code.
4071 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
4072 * lang-options.h: Remove documentation for -fhandle-exceptions,
4073 -fmemoize-lookups and -fsave-memoized.
4074 * cp-tree.h: Lose mi_matrix and memoize support.
4075 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
4076 * class.c: Lose struct class_level.
4077 (pushclass, popclass): Lose memoize support.
4078 * init.c (build_offset_ref): Likewise.
4079
4080 Never change BINFO_INHERITANCE_CHAIN.
4081 * init.c (emit_base_init): Change modification of
4082 BINFO_INHERITANCE_CHAIN to an assert.
4083 * search.c (get_base_distance_recursive): Likewise.
4084 (get_base_distance): Likewise.
4085 (lookup_member): Likewise.
4086 (convert_pointer_to_single_level): Likewise.
4087 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
4088 (lookup_fnfields): Likewise.
4089 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
4090 (unshare_base_binfos): Don't call propagate_binfo_offsets.
4091 (layout_basetypes): Call propagate_binfo_offsets instead of
4092 unshare_base_binfos.
4093 * decl.c (xref_basetypes): Call unshare_base_binfos.
4094 * pt.c (instantiate_class_template): Likewise.
4095 * tree.c (reverse_path): Remove 'copy' parm; always make a
4096 temporary copy.
4097 * class.c (build_vbase_path): Just call it.
4098 * search.c (compute_access): Likewise. Don't re-reverse.
4099
4100 1998-08-27 Mark Mitchell <mark@markmitchell.com>
4101
4102 * class.c (build_vbase_path): Use reverse_path.
4103 (finish_base_struct): Move warnings for inaccessible bases to
4104 layout_basetypes.
4105 (modify_one_vtable): Remove check of TREE_USED (binfo).
4106 (fixup_vtable_deltas1): Likewise.
4107 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
4108 (xref_tag): Remove binfos parameter.
4109 (make_binfo): Remove chain parameter.
4110 (reverse_path): Add copy parameter.
4111 * decl.c (init_decl_processing): Change calls to xref_tag.
4112 (xref_tag): Remove binfos parameter.
4113 (xref_basetypes): Change calls to make_binfo.
4114 * decl2.c (grok_x_components): Change calls to xref_tag.
4115 (handle_class_head): Likewise.
4116 * friend.c (do_friend): Likewise.
4117 * lex.c (make_lang_type): Change calls to make_binfo.
4118 * parse.y (structsp): Change calls to xref_tag.
4119 (named_complex_class_head_sans_basetype): Likewise.
4120 (named_class_head): Likewise.
4121 * rtti.c (init_rtti_processing): Likewise.
4122 * search.c (compute_access): Change calls to reverse_path.
4123 (dfs_get_vbase_types): Change calls to make_binfo.
4124 (get_vbase_types): Remove dead code.
4125 * tree.c (unshare_base_binfos): Change calls to make_binfo.
4126 (layout_basetypes): Warn here about inaccessible bases.
4127 (make_binfo): Remove chain parameter.
4128 (reverse_path): Add copy parameter.
4129
4130 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
4131
4132 * class.c: #if 0 complete_type_p.
4133 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
4134 * method.c (process_overload_item): Likewise.
4135 * typeck.c (comp_target_types): Likewise.
4136
4137 Stop sharing binfos for indirect virtual bases.
4138 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
4139 (layout_basetypes): Likewise.
4140 (unshare_base_binfos): Copy vbases, too.
4141 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
4142 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
4143 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
4144 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
4145 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
4146 reference to BINFO_VIA_PUBLIC.
4147 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
4148 (push_class_decls): Use them.
4149 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
4150 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
4151
4152 1998-08-27 Mark Mitchell <mark@markmitchell.com>
4153
4154 * decl.c (build_enumerator): Set DECL_CONTEXT for the
4155 CONST_DECLs.
4156
4157 1998-08-26 Mark Mitchell <mark@markmitchell.com>
4158
4159 * cp-tree.h (finish_enum): Change prototype.
4160 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
4161 VALUES parameter. Don't try to compute mins/maxs if
4162 processing_template_decl.
4163 * parse.y (structsp): Use new calling sequence for finish_enum.
4164 * pt.c (tsubst_enum): Likewise. Take the new type as input.
4165 (lookup_template_class): Remove unused variables. Tweak.
4166 Register enums on instantiation list before substituting
4167 enumeration constants.
4168 (tsubst_decl): Remove unused variables.
4169 (regenerate_decl_from_template): Likewise.
4170
4171 * decl.c (duplicate_decls): Don't obliterate the
4172 DECL_TEMPLATE_INFO for a template if we're not replacing it with
4173 anything.
4174
4175 * lex.c (do_identifier): Fix typo in comment.
4176
4177 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4178
4179 * errfn.c: Remove stdarg.h/varargs.h.
4180 * tree.c: Likewise.
4181
4182 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
4183
4184 * pt.c (tsubst_copy): Only do typename overloading on an
4185 IDENTIFIER_NODE that happens to look like a typename if it actually
4186 has a type for us to use.
4187
4188 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
4189
4190 * typeck.c (comp_cv_target_types): Split out...
4191 (comp_target_types): From here. Don't allow cv-qual changes under
4192 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
4193 (build_ptrmemfunc): Pass 1 to nptrs.
4194 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
4195
4196 1998-08-25 Mark Mitchell <mark@markmitchell.com>
4197
4198 * search.c (dependent_base_p): Don't compare a binfo to
4199 current_class_type; use the TREE_TYPE of the binfo instead.
4200
4201 * cp-tree.h (CLASS_TYPE_P): Revise definition.
4202
4203 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
4204
4205 * decl.c (duplicate_decls): Don't complain about different
4206 exceptions from an internal decl even if pedantic.
4207
4208 * typeck.c (convert_for_assignment): Converting from pm of vbase
4209 to derived is an error, not a sorry.
4210
4211 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
4212 * class.c (fixed_type_or_null): Rename from
4213 resolves_to_fixed_type_p. Return the dynamic type of the
4214 expression, if fixed, or null.
4215 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
4216 does not match the static type.
4217 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
4218 resolves_to_fixed_type_p again.
4219
4220 1998-08-24 Mark Mitchell <mark@markmitchell.com>
4221
4222 * pt.c (tsubst_decl): Move special case code for dealing with
4223 tricky friend templates here from ...
4224 (regenerate_decl_from_template): Here.
4225
4226 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
4227
4228 * decl.c (start_decl): Remove redundant linkage check.
4229
4230 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
4231
4232 * typeck.c (c_expand_return): Handle the case that valtype
4233 is wider than the functions return type.
4234
4235 1998-08-24 Mark Mitchell <mark@markmitchell.com>
4236
4237 * cp-tree.h (CLASS_TYPE_P): New macro.
4238 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
4239 * pt.c (process_template_parm): Undo previous change.
4240
4241 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
4242
4243 * cp-tree.h: Declare.
4244 * pt.c (decl_template_parm_p): New function.
4245 * decl.c (pushdecl): Check decls for redeclaring template parms.
4246 (xref_tag): Make redeclaration an error, print decl.
4247 * decl2.c (grokfield): Check field_decls for redeclaration as well.
4248
4249 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
4250
4251 * parse.y (primary): Fix up the type of string constants.
4252
4253 1998-08-24 Mark Mitchell <mark@markmitchell.com>
4254
4255 * typeck.c (convert_for_initialization): Move check for odd uses
4256 of NULL to avoid duplicate warnings.
4257
4258 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
4259
4260 * tree.c (lvalue_type): Fix for arrays.
4261 * typeck.c (string_conv_p): New fn.
4262 (convert_for_assignment): Use it.
4263 (build_unary_op): Use lvalue_type.
4264 * call.c (standard_conversion, convert_like): Use string_conv_p.
4265 (add_function_candidate): Use lvalue_type.
4266 * cvt.c (convert_to_reference): Likewise.
4267 * decl2.c (lang_decode_option): Ignore -traditional.
4268 * decl.c (init_decl_processing): flag_writable_strings inhibits
4269 flag_const_strings.
4270
4271 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
4272
4273 * lang-options.h (lang_options): Add fconst-strings to the list
4274 of valid options.
4275 * decl2.c (lang_f_options, lang_decode_option): Likewise.
4276
4277 1998-08-24 Nathan Sidwell <nathan@acm.org>
4278
4279 * lex.c (real_yylex): Don't warn about long long constants if
4280 we're allowing long long.
4281
4282 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
4283
4284 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
4285 accessing bindings directly.
4286
4287 * search.c (my_tree_cons): Reimplement.
4288
4289 * lang-specs.h: Remove __HONOR_STD.
4290 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
4291
4292 1998-08-23 Mark Mitchell <mark@markmitchell.com>
4293
4294 * decl.c (grokdeclarator): Complain about in-class initialization
4295 of aggregates and/or references.
4296 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
4297 TEMPLATE_TYPE_PARMs.
4298
4299 * decl2.c (grok_array_decl): Add comment.
4300 (mark_used): Don't instantiate an explicit instantiation.
4301 * friend.c (make_friend_class): Remove bogus comment. Fix check
4302 for partial specializations.
4303 * pt.c (check_explicit_specialization): Don't
4304 SET_DECL_EXPLICIT_INSTANTIATION here.
4305 (mark_decl_instantiated): Or here.
4306 (do_decl_instantiation): Do it here, instead. Add checks for
4307 duplicate explicit instantiations, etc. Tidy.
4308 (do_type_instantiation): Likewise.
4309 (instantiate_decl): Improve comments. Complain about explicit
4310 instantiations where no definition is available.
4311
4312 * cp-tree.h (ansi_null_node): Remove.
4313 * call.c (build_over_call): Warn about converting NULL to an
4314 arithmetic type.
4315 * cvt.c (build_expr_type_conversion): Likewise. Use
4316 null_ptr_cst_p instead of expanding it inline.
4317 * decl.c (ansi_null_node): Remove.
4318 (init_decl_processing): Make null_node always have integral type.
4319 * except.c (build_throw): Warn about converting NULL to an
4320 arithmetic type.
4321 * lex.c (init_parse): Remove handling of ansi_null_node.
4322 * pt.c (type_unification_real): Don't convert NULL to void* type.
4323 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
4324 (convert_for_assignment): Warn about converting NULL to an
4325 arithmetic type.
4326 (convert_for_initialization): Likewise.
4327
4328 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
4329
4330 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
4331 * pt.c (coerce_template_parms): Use no_linkage_check.
4332 * decl.c (grokvardecl): Likewise.
4333 (grokfndecl): Likewise. Members of anonymous types have no linkage.
4334
4335 * method.c (process_overload_item): Remove useless code.
4336
4337 1998-08-20 Per Bothner <bothner@cygnus.com>
4338
4339 Handle new'ing of Java classes.
4340 * init.c (build_class_classref): New function.
4341 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
4342 constructor does not return this; don't need to exception-protect.
4343
4344 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
4345 * decl2.c (acceptable_java_type): Handle template-derived types.
4346
4347 1998-08-20 Per Bothner <bothner@cygnus.com>
4348
4349 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
4350
4351 1998-08-20 Mark Mitchell <mark@markmitchell.com>
4352
4353 * decl.c (duplicate_decls): Always merge the old and new patterns
4354 for templates, regardless of whether or not the new one has
4355 DECL_INITIAL. Don't throw away specializations. Merge
4356 DECL_SAVED_TREE.
4357 * pt.c (tsubst_decl): Use the right pattern when calculating the
4358 complete args for a new template instance.
4359 (do_decl_instantiation): Fix typo in comment.
4360 (regenerate_decl_from_template): Deal with tricky friend template
4361 case.
4362 (instantiate_decl): Likewise.
4363
4364 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
4365
4366 * init.c (build_builtin_delete_call): Add missing assemble_external
4367 call.
4368
4369 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
4370
4371 * parse.y (notype_unqualified_id): Also accept ~A<int>.
4372
4373 1998-08-19 Mark Mitchell <mark@markmitchell.com>
4374
4375 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
4376 arithmetic.
4377 * except.c (build_throw): Warn when NULL is thrown, even with
4378 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
4379 thrown expression.
4380
4381 * cp-tree.h (ansi_null_node): New variable.
4382 * decl.c (ansi_null_node): New variable.
4383 (init_decl_processing): Initialize its type.
4384 * lex.c (init_parse): Initialize its value. Use ansi_null_node
4385 for null_node in non-ANSI mode.
4386 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
4387 place of null_node to avoid spurious errors.
4388
4389 1998-08-17 Mark Mitchell <mark@markmitchell.com>
4390
4391 * cp-tree.h (enter_scope_of): New function.
4392 * parse.y (complex_direct_notype_declarator): Use it.
4393 * semantics.c (enter_scope_of): New function.
4394
4395 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
4396
4397 * decl.c (grokparms): No, here.
4398
4399 * decl.c (grokdeclarator): Catch parm with pointer to array of
4400 unknown bound here...
4401 * method.c (process_overload_item): ...not here.
4402
4403 * gxxint.texi: Remove obsolete documentation of overloading code.
4404
4405 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
4406 * class.c (finish_struct_bits): Likewise.
4407
4408 * tree.c (lvalue_type): Fix for arrays.
4409 * typeck.c (build_unary_op): Use lvalue_type.
4410 * call.c (add_function_candidate): Likewise.
4411 * cvt.c (convert_to_reference): Likewise.
4412
4413 * decl2.c (lang_decode_option): Ignore -traditional.
4414
4415 * init.c (build_offset_ref): Don't mess with error_mark_node.
4416 * lex.c (do_scoped_id): Use cp_error.
4417
4418 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
4419
4420 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
4421
4422 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
4423
4424 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
4425
4426 * cp-tree.h (set_identifier_local_value): Provide prototype.
4427
4428 * decl2.c (do_namespace_alias): Remove unused variables `binding'
4429 and `old'.
4430
4431 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
4432
4433 * Makefile.in: Rename BBISON to BISON so that it can be properly
4434 inherited from the parent makefile.
4435
4436 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
4437
4438 * lang-options.h: Add -finit-priority.
4439 * decl2.c: Likewise. Check flag_init_priority instead of
4440 USE_INIT_PRIORITY.
4441
4442 * decl2.c (setup_initp): New fn.
4443 (start_objects, finish_objects, do_ctors): Handle init_priority.
4444 (do_dtors, finish_file): Likewise.
4445
4446 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
4447
4448 * pt.c (tsubst_copy): Hush warning.
4449
4450 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
4451
4452 1998-08-12 Mark Mitchell <mark@markmitchell.com>
4453
4454 * pt.c (print_template_context): Don't abort when instantiating a
4455 synthesized method.
4456
4457 * decl.c (grokdeclarator): Issue errors on namespace qualified
4458 declarators in parameter lists or in class scope.
4459
4460 1998-08-09 Mark Mitchell <mark@markmitchell.com>
4461
4462 * pt.c (check_explicit_specialization): Don't abort on bogus
4463 explicit instantiations.
4464
4465 1998-08-07 Mark Mitchell <mark@markmitchell.com>
4466
4467 * typeck.c (require_complete_type): Use complete_type_or_else.
4468 (complete_type_or_else): Always return NULL_TREE on failure, as
4469 documented.
4470
4471 * pt.c (tsubst_aggr_type): Prototype.
4472 (tsubst_decl): New function, split out from tsubst. Set
4473 input_filename and lineno as appropriate.
4474 (pop_tinst_level): Restore the file and line number saved in
4475 push_tinst_level.
4476 (instantiate_class_template): Set input_filename and lineno as
4477 appropriate.
4478 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
4479 context for a TYPENAME_TYPE is complete.
4480
4481 * decl2.c (grokbitfield): Issue errors on bitfields declared with
4482 function type.
4483 (do_dtors): As in do_ctors, pretend to be a member of the same
4484 class as a static data member while generating a call to its
4485 destructor.
4486
4487 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
4488 conversions, even in complex virtual base class hierarchies.
4489
4490 1998-08-06 Mark Mitchell <mark@markmitchell.com>
4491
4492 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
4493 (TYPE_TEMPLATE_INFO): Likewise.
4494 (SET_TYPE_TEMPLATE_INFO): Likewise.
4495 (ENUM_TI_TEMPLATE): Likewise.
4496 (ENUM_TI_ARGS): Likewise.
4497 (lookup_nested_type_by_name): Remove.
4498 * decl.c (maybe_process_template_type_declaration): Handle enums.
4499 (start_enum): Don't check for primary-template enum declarations
4500 here.
4501 (finish_enum): Clean up, document. Make sure template enum
4502 constants get the correct type.
4503 (build_enumerator): Copy initializers for template enumerations,
4504 too.
4505 (grok_enum_decls): Document.
4506 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
4507 better. Build LOOKUP_EXPRs for local variables, even if they are
4508 TREE_PERMANENT.
4509 * pt.c (tsubst_enum): Remove field_chain parameter.
4510 (template_class_depth): Include the depth of surrounding function
4511 contexts.
4512 (push_template_decl): Check for primary-template enum declarations
4513 here. Deal with enumeration templates.
4514 (lookup_template_class): Likewise.
4515 (for_each_template_parm): Likewise.
4516 (instantiate_class_template): Don't call tsubst_enum directly,
4517 call tsubst instead, to instantiate enums. Deal with all
4518 field_chain issues here, not in tsubst_enum.
4519 (lookup_nested_type_by_name): Remove.
4520 (tsubst_aggr_type): Revise handling of enumeration types.
4521 (tsubst): Likewise.
4522 (tsubst_copy): Likewise.
4523 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
4524
4525 1998-08-04 Mark Mitchell <mark@markmitchell.com>
4526
4527 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
4528 uses template parameters.
4529 * method.c (build_template_parm_names): Use the full set of
4530 template arguments for tsubst'ing.
4531 (build_overload_identifier): Pass the full set of template
4532 arguments to build_template_parm_names, not just the
4533 innermost_args.
4534 * pt.c (TMPL_ARGS_DEPTH): Define using
4535 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
4536 (NUM_TMPL_ARGS): New macro.
4537 (add_outermost_template_args): Deal with the case where the outer
4538 args will be completely discarded.
4539 (coerce_template_parms): Use the full set of template arguments
4540 for tsubst'ing. Simplify. Add some asserts. Improve
4541 error messages.
4542 (lookup_template_class): Pass the full set of template arguments
4543 to coerce_template_parms.
4544 (tsubst): Add assertion.
4545 (do_type_instantiation): Don't instantiate member template
4546 classes.
4547
4548 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
4549 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
4550
4551 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
4552
4553 * method.c (set_mangled_name_for_decl): Change return type to void.
4554
4555 * decl.c (lookup_name_real): A namespace-level decl takes priority
4556 over implicit typename. Avoid doing the same lookup twice.
4557
4558 * search.c (dependent_base_p): New fn.
4559 (dfs_pushdecls, dfs_compress_decls): Use it.
4560
4561 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
4562 virtual functions if the type doesn't have any.
4563
4564 1998-08-03 Mark Mitchell <mark@markmitchell.com>
4565
4566 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
4567 uses template parameters.
4568
4569 1998-08-02 Mark Mitchell <mark@markmitchell.com>
4570
4571 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
4572 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
4573 * lex.c (do_identifier): Don't use a second argument, or a type,
4574 when building LOOKUP_EXPRs.
4575 (do_identifier): Likewise.
4576 (do_scoped_id): Likewise.
4577 * method.c (hack_identifier): Improve error message.
4578 * pt.c (lookup_template_function): Don't needlessly call
4579 copy_to_permanent or build_min.
4580 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
4581 necessary.
4582 (do_decl_instantiation): Improve error message.
4583 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
4584 (build_min): Copy the type to the permanent obstack, too.
4585
4586 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
4587
4588 * init.c (init_init_processing): Remove BI* handling.
4589 (build_builtin_call): Remove.
4590 (build_builtin_delete_call): New fn.
4591 (build_delete): Use it.
4592
4593 1998-07-31 Mark Mitchell <mark@markmitchell.com>
4594
4595 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
4596 (maybe_check_template_type): New function.
4597 * decl.c (maybe_process_template_type_declaration): New function,
4598 split out from pushtag Call maybe_check_template_type.
4599 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
4600 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
4601 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
4602 * pt.c (template_class_depth_real): Generalization of ...
4603 (template_class_depth): Use it.
4604 (register_specialization): Use duplicate_decls for duplicate
4605 declarations of specializations.
4606 (maybe_check_template_type): New function.
4607 (push_template_decl_real): Fix comment.
4608 (convert_nontype_argument): Likewise.
4609 (lookup_template_class): Likewise. Avoid an infinite loop on
4610 erroneous code.
4611 (tsubst_friend_function): Fix comment.
4612 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
4613 an IDENTIFIER_NODE.
4614 * semantics.c (begin_function_definition): Use
4615 reset_specialization to note that template headers don't apply
4616 directly to declarations after the opening curly for a function.
4617
4618 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
4619
4620 * decl.c (push_overloaded_decl): Use current_namespace instead of
4621 DECL_CONTEXT (decl) to determine where we go.
4622
4623 * decl.c (lookup_name_real): Fix typo.
4624
4625 1998-07-28 Mark Mitchell <mark@markmitchell.com>
4626
4627 * friend.c (is_friend): Be lenient with member functions to deal
4628 with nested friends.
4629
4630 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
4631
4632 * class.c (finish_struct_1): Convert integer_zero_node to
4633 ssizetype before passing it to set_rtti_entry.
4634 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
4635 of any size to a pointer.
4636
4637 1998-07-27 Mark Mitchell <mark@markmitchell.com>
4638
4639 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
4640 (build_template_decl_overload): Remove.
4641 (set_mangled_name_for_decl): New function.
4642 (innermost_args): Remove is_spec parameter.
4643 (most_specialized, most_specialized_class): Remove declarations.
4644 (lookup_template_class): Add entering_scope parameter.
4645 (maybe_process_partial_specialization): New function.
4646 (finish_template_decl): Likewise.
4647 (finish_template_type): Likewise.
4648 * class.c (finish_struct): Clean up processing of member template
4649 specializations.
4650 * decl.c (pushtag): Fix formatting.
4651 (lookup_tag): Improve handling of pseudo-global levels.
4652 (make_typename_type): Adjust call to lookup_template_class.
4653 (shadow_tag): Use maybe_process_partial_specialization.
4654 (xref_tag): Improve handling of member friends.
4655 (start_function): Call push_nested_class before
4656 push_template_decl. Don't call push_template_decl for
4657 specializations.
4658 * decl2.c (grok_x_components): Don't call xref_tag for
4659 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
4660 (grokclassfn): Use set_mangled_name_for_decl.
4661 (arg_assoc_class): Adjust call to innermost_args.
4662 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
4663 * error.c (dump_function_name): Improve printing of template
4664 function names.
4665 * friend.c (is_friend): Don't compare types of decls to determine
4666 friendship, unless flag_guiding_decls.
4667 (make_friend_class): Partial specializations cannot be friends.
4668 (do_friend): Use set_mangled_name_for_decl. Call
4669 push_template_decl_real instead of push_template_decl.
4670 * method.c (build_decl_overload_real): Remove prototype. Give it
4671 external linkage.
4672 (build_overload_identififer): Adjust call to innermost_args.
4673 (build_template_decl_overload): Remove.
4674 (set_mangled_name_for_decl): New function.
4675 * parse.y (.finish_template_type): New non-terminal.
4676 (template_def): Use finish_template_decl. Use template_extdef
4677 instead of extdef.
4678 (template_extdef, template_datadef): New non-terminals, containing
4679 only those rules for things which can be templates.
4680 (datadef): Tidy.
4681 (template_type, self_template_type): Use .finish_template_type.
4682 (named_class_head): Use maybe_process_partial_specialization.
4683 * pt.c (mangle_class_name_for_template): Remove context parameter.
4684 (get_class_bindings): Remove outer_args parameter.
4685 (complete_template_args): Remove.
4686 (add_outermost_template_args): New function.
4687 (register_specialization): Return the specialization.
4688 (unregister_specialization): New function.
4689 (tsubst_template_parms): Likewise.
4690 (most_specialized, most_specialized_class): Prototype here as
4691 static.
4692 (original_template): Rename to most_general_template.
4693 (tsubst_template_parms): New function.
4694 (set_mangled_name_for_template_decl): Likewise.
4695 (TMPL_ARGS_DEPTH): New macro.
4696 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
4697 (TMPL_ARGS_LEVEL): New macro.
4698 (SET_TMPL_ARGS_LEVEL): Likewise.
4699 (TMPL_ARG): Likewise.
4700 (SET_TMPL_ARG): Likewise.
4701 (TMPL_ARGS_DEPTH): Likewise.
4702 (finish_member_template_decl): Use finish_template_decl.
4703 (maybe_process_partial_specialization): New function, split out
4704 from tsubst.
4705 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
4706 (maybe_begin_member_template_processing): Use new macros.
4707 (is_member_template): Likewise.
4708 (is_member_template_class): Likewise.
4709 (add_to_template_args): Likewise. Deal with multiple levels of
4710 args.
4711 (maybe_process_partial_specialization): New function.
4712 (retrieve_specialization): Add consistency check.
4713 (determine_specialization): Return full argument list.
4714 (check_explicit_specialization): Tweak friend handling. Use full
4715 argument lists. Simplify.
4716 (current_template_args): Use new macros.
4717 (push_template_decl_real): Change ill-named mainargs to specargs.
4718 Check that a partial specialization actually specializes at least
4719 one parameter. Improve friend handling. Modify for full
4720 template arguments.
4721 (classtype_mangled_name): Don't mangle the names of
4722 specializations.
4723 (lookup_template_class): Add entering_scope parameter. Use it to
4724 avoid finding a template type when an instantiation is required.
4725 Simplify. Use full template arguments.
4726 (tsubst_friend_function): Use unregister_specialization. Use new
4727 macros. Use full template arguments.
4728 (tsubst_friend_class): Substitute, using tsubst_template_parms,
4729 into the template parameters before passing them to
4730 redeclare_class_template.
4731 (instantiate_class_template): Simplify. Use full template
4732 arguments. Adjust calls to get_class_bindings. Use
4733 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
4734 (innermost_args): Use new macros.
4735 (tsubst_aggr_type): New function, split out from tsubst.
4736 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
4737 conventions for lookup_template_class. Refine handling of partial
4738 instantiations. Remove calls to complete_template_args.
4739 Simplify. Add consistency checks. Use set_mangled_name_for_decl
4740 and set_mangled_name_for_template_decl.
4741 (tsubst_copy): Use tsubst_aggr_type.
4742 (instantiate_template): Use full template arguments.
4743 (more_specialized): Improve formatting.
4744 (more_specialized_class): Adjust calls to get_class_bindings.
4745 (get_bindings_real): Don't call complete_template_args.
4746 (most_specialized): Don't overwrite input; create a new list.
4747 (most_specialized_class): Use most_general_template.
4748 (regenerate_decl_from_template): Use unregister_specialization.
4749 Use full template arguments.
4750 (instantiate_decl): Use full template arguments.
4751 (set_mangled_name_for_template_decl): New function.
4752 * semantics.c (begin_class_definition): Use
4753 maybe_process_partial_specialization.
4754 (finish_member_class_template): New function.
4755 (finish_template_decl): Likewise.
4756 (finish_template_type): Likewise.
4757 (typeck.c): Don't crash after issuing a compiler_error.
4758 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
4759
4760 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
4761
4762 * typeck2.c (build_functional_cast): Handle default-initialization.
4763
4764 * call.c (build_over_call): Pass 1 to popclass.
4765
4766 * parse.y (direct_notype_declarator): Add precedence declaration
4767 to notype_unqualified_id case.
4768 * Makefile.in (EXPECT): Adjust.
4769
4770 * tree.c (ovl_member): Fix for single function in OVL.
4771
4772 1998-07-27 Dave Brolley <brolley@cygnus.com>
4773
4774 * c-lex.c (yylex): Fix boundary conditions in character literal and
4775 string literal loops.
4776
4777 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
4778
4779 * decl.c (lookup_name_real): OK, do return the from_obj value
4780 unless got_object depends on template parms.
4781
4782 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
4783
4784 * pt.c (coerce_template_parms): Also complain about local enums.
4785
4786 * cp-tree.h: Add prototype for set_identifier_local_value.
4787 * decl.c (set_identifier_local_value_with_scope): Make static,
4788 prototype.
4789 * search.c (covariant_return_p): Likewise.
4790 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
4791
4792 * call.c (build_method_call): Only pull out the type of a destructor
4793 if it's a template type parm.
4794 * decl.c (lookup_name_real): Never return the from_obj value.
4795
4796 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
4797
4798 * except.c (process_start_catch_block_old): Call start_decl_1 for
4799 catch parm.
4800 * decl.c (start_decl_1): Avoid duplicate error.
4801
4802 * init.c (expand_default_init): Only perform the initialization if
4803 it will do something.
4804
4805 1998-07-23 H.J. Lu (hjl@gnu.org)
4806
4807 * parse.y (base_class): Check for invalid base class.
4808
4809 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
4810
4811 * decl2.c (import_export_template): Fold in...
4812 (import_export_class): ...to here. Handle dllimport/export.
4813
4814 * class.c (build_vtable): Pass at_eof to import_export_vtable.
4815 (prepare_fresh_vtable): Likewise.
4816 * decl2.c (import_export_class): Split out...
4817 (finish_prevtable_vardecl): From here.
4818 * class.c (finish_struct_1): Call import_export_class if at_eof.
4819
4820 * decl.c (start_function): #if 0 mysterious code I wrote and have
4821 forgotten why.
4822 * rtti.c (get_tinfo_fn): If this is for a class type, set
4823 DECL_CONTEXT.
4824
4825 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
4826
4827 * inc/exception: Change terminate and unexpected to ().
4828
4829 * parse.y (named_class_head_sans_basetype_defn): A
4830 named_class_head_sans_basetype followed by '{' or ':' is a defn.
4831
4832 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
4833
4834 * tree.c (canonical_type_variant): New fn to handle arrays.
4835 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
4836 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
4837 * method.c (process_overload_item): Use build_overload_value for
4838 arrays.
4839
4840 1998-07-20 Dave Brolley <brolley@cygnus.com>
4841
4842 * lex.c (mbchar.h): #include it.
4843 (GET_ENVIRONMENT): New macro.
4844 (init_parse): Set character set based on LANG environment variable.
4845 (real_yylex): Handle multibyte characters in character literals.
4846 (real_yylex): Handle multibyte characters in string literals.
4847
4848 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
4849
4850 * lex.c (do_identifier): Look for class value even if we don't
4851 have a global value. Do implicit declaration if parsing is 2.
4852 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
4853 lookup.
4854
4855 1998-07-19 Mark Mitchell <mark@markmitchell.com>
4856
4857 * decl.c (pushtag): Revert previous change.
4858 * pt.c (lookup_template_class): Don't put out debugging
4859 information for types that use template parameters.
4860
4861 * decl.c (pushtag): Don't put out debugging information for
4862 compiler-generated typedefs.
4863
4864 * error.c (dump_type_real): Don't crash when presented with
4865 intQI_type_node or the like.
4866
4867 * semantics.c (finish_translation_unit): Fix spelling error in
4868 comment.
4869
4870 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
4871
4872 * decl.c (lookup_name_real): Pull out single function here.
4873 (select_decl): Not here.
4874 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
4875
4876 * decl.c (qualify_lookup): Tweak again.
4877
4878 * pt.c (lookup_template_class): Don't mess with the context of the
4879 instantiation.
4880 * decl2.c (current_decl_namespace): Remove special handling for
4881 templates.
4882
4883 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
4884 a member template specialization.
4885
4886 * tree.c (ovl_member): Use decls_match to compare functions.
4887 * decl.c (decls_match): Check the context of a function.
4888
4889 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
4890 in Koenig lookup support rules.
4891 * semantics.c (finish_call_expr): Handle the new cases.
4892
4893 * typeck.c (build_x_function_call): Handle overloaded methods.
4894
4895 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
4896
4897 1998-07-16 Mark Mitchell <mark@markmitchell.com>
4898
4899 * semantics.c (finish_object_call_expr): Revert previous change.
4900 * call.c (build_new_method_call): Likewise. Instead, convert
4901 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
4902
4903 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
4904
4905 * decl.c (qualify_lookup): Handle templates.
4906
4907 * decl2.c (do_using_directive): Don't pass ancestor.
4908 * decl.c (push_using_directive): Calculate ancestor.
4909
4910 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
4911 * decl.c (pushdecl): Move type shadowing handling from here...
4912 (duplicate_decls): ...to here.
4913 * decl.c (set_identifier_local_value_with_scope): New fn.
4914 (pushdecl): Use it.
4915 (set_identifier_local_value, lookup_type_current_level): New fns.
4916 * decl2.c (do_local_using_decl): Handle types and binding level
4917 stuff properly.
4918
4919 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
4920 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
4921 (lookup_namespace_name): Likewise.
4922 * typeck.c (build_unary_op): Not here anymore.
4923
4924 * decl2.c (do_class_using_decl): Make sure we get an identifier.
4925 * class.c (handle_using_decl): Ignore TYPE_DECLs.
4926
4927 * decl.c (qualify_lookup): New fn.
4928 (lookup_name_real): Use it.
4929
4930 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
4931
4932 * decl2.c (add_using_namespace): When directly using a namespace
4933 that was indirect before, promote it.
4934
4935 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
4936 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
4937 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
4938 * decl.c (select_decl): Replace two flag parameters by one.
4939 (unqualified_namespace_lookup): Likewise, pass flag.
4940 (lookup_flags): New function.
4941 (lookup_name_real): Compute flags, pass them.
4942 (lookup_namespace_name): Call with zero-flag.
4943 * decl2.c (ambiguous_decl): Add flag parameter, complain only
4944 according to flags.
4945 (lookup_using_namespace, qualified_lookup_using_namespace):
4946 Add flag parameter, pass them through.
4947 * lex.c (do_scoped_id): Call with zero-flag.
4948
4949 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
4950
4951 * typeck.c (convert_for_assignment): Use comptypes.
4952
4953 1998-07-16 Mark Mitchell <mark@markmitchell.com>
4954
4955 * semantics.c (finish_object_call_expr): Move test for the
4956 function called being a TYPE_DECL to ...
4957 * call.c (build_new_method_call): Here.
4958
4959 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
4960
4961 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
4962 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
4963
4964 * lex.c (looking_for_typename): Don't initialize.
4965
4966 * decl2.c (ambiguous_decl): Clarify error message.
4967
4968 * decl.c (push_using_directive): Iterate over namespaces used
4969 indirectly.
4970
4971 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4972
4973 * decl2.c (add_using_namespace): Iterate over namespaces used
4974 indirectly.
4975
4976 * decl.c (lookup_name_real): Accept namespace aliases as locals.
4977 (cat_namespace_levels): Ignore aliases.
4978 (duplicate_decls): Ignore duplicate aliases.
4979 * decl2.c (do_namespace_alias): Process block level namespace
4980 aliases. Store alias with pushdecl. Remove odr errors.
4981 * parse.y (namespace_alias): New non-terminal.
4982 (extdef): Use it.
4983
4984 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
4985
4986 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
4987 Handle TEMPLATE_TYPE_PARM.
4988 (arg_assoc): Rewrite.
4989
4990 * pt.c (complete_template_args): Don't look at the context unless
4991 we have to.
4992
4993 * method.c (build_decl_overload_real): Fix namespace handling.
4994
4995 * typeck.c (build_unary_op): Extract a lone function from an
4996 OVERLOAD.
4997
4998 * call.c (build_scoped_method_call): Handle getting a namespace
4999 for basetype in a destructor call.
5000 (check_dtor_name): Handle enums.
5001
5002 * parse.y (using_directive): New nonterminal.
5003 (extdef, simple_stmt): Use it.
5004
5005 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
5006
5007 * decl2.c (add_function): Move error message ...
5008 (arg_assoc_namespace): ... from here.
5009
5010 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
5011
5012 * parse.y (namespace_qualifier): Fix multiple level handling.
5013 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
5014 (arg_assoc): Don't skip the first argument of a function.
5015
5016 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
5017
5018 * search.c (my_tree_cons): Clean up.
5019
5020 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
5021
5022 * call.c (joust): Don't warn about "confusing" conversions to the
5023 same type.
5024
5025 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
5026
5027 * class.c (push_nested_class): Complain about namespaces.
5028 * decl.c (start_decl): Enter the object's namespace.
5029 (cp_finish_decl): Leave it.
5030 (grokdeclarator): Likewise.
5031 * decl2.c (check_decl_namespace): New function.
5032 (finish_file): Call it.
5033 * parse.y (complex_direct_notype_declarator): Set complexity
5034 of namespace-qualified ids to -1, enter the namespace.
5035
5036 * method.c (build_template_decl_overload): Expect _DECL as first
5037 parameter. Put context temporarily into current_namespace.
5038 * pt.c (check_explicit_specialization): Change caller.
5039 (tsubst): Likewise.
5040
5041 * init.c (build_offset_ref): Call mark_used and
5042 convert_from_reference for namespace members.
5043
5044 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
5045
5046 * search.c (my_tree_cons): The bitfield is at index 2.
5047
5048 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
5049
5050 * lang-options.h: Format changed to work with new --help support
5051 in gcc/toplev.c
5052
5053 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
5054
5055 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
5056 Do Koenig lookup in CALL_EXPR.
5057 (arg_assoc): Handle error_mark.
5058 * lex.c (is_global): New function.
5059 (do_identifier): Expect arguments for Koenig lookup.
5060 * parse.y (primary): Add rules for calls of unqualified function calls.
5061 (do_id): Change call of do_identifier.
5062 * pt.c (finish_stmt_expr): Likewise.
5063 * semantics.c (finish_id_expr): Likewise.
5064 (finish_call_expr): Add integer parameter to indicate
5065 argument-dependent lookup.
5066
5067 * decl.c (struct binding_level): New field using_directives.
5068 (push_using_decl): Not sorry anymore.
5069 (push_using_directive): New function.
5070 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
5071 (unqualified_namespace_lookup): New function, code from ...
5072 (lookup_name_real): ... here.
5073 * decl2.c (lookup_using_namespace): Pass using list instead of
5074 initial scope.
5075 (validate_nonmember_using_decl): New function.
5076 (do_nonmember_using_decl): New function.
5077 (do_toplevel_using_decl): Use them.
5078 (do_local_using_decl): New function.
5079 (do_using_directive): Support block-level directives.
5080 * parse.y (simple_stmt): Support using declarations and
5081 directives.
5082 (namespace_qualifier, namespace_using_decl): New non-terminals.
5083
5084 * xref.c (classname): New function.
5085 (GNU_xref_hier): Change class and base parameters to tree.
5086 * decl.c (xref_baseypes): Change caller.
5087 * friend.c (make_friend_class): Likewise.
5088
5089 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
5090
5091 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
5092 comparison.
5093
5094 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
5095 template template parameter, record its use.
5096 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
5097 its template arguments if exists.
5098
5099 * pt.c (coerce_template_template_parms): New function equivalent
5100 to coerce_template_parms when IS_TMPL_PARM is true.
5101 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
5102 all callers changed.
5103
5104 (coerce_template_parms): Access ARGLIST properly when creating a
5105 new vector. Only accept implicit TYPE_DECL as valid argument for
5106 a template template parameter when it is a base class of
5107 current_class_type. Don't display error message when COMPLAIN is
5108 false.
5109
5110 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
5111
5112 * repo.c (get_base_filename): Use file_name_nondirectory.
5113 (open_repo_file): Likewise.
5114 * cp-tree.h (file_name_nondirectory): Add prototype.
5115
5116 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
5117
5118 * friend.c (do_friend): Pull the identifier out of declarator.
5119 Use cp_error and friends.
5120 * decl2.c (qualified_lookup_using_namespace): Fix call to
5121 purpose_member.
5122 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
5123 (grokvardecl): Use DECL_CLASS_SCOPE_P.
5124 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
5125 * class.c (warn_hidden): Fix for OVERLOAD.
5126 From grahams@rcp.co.uk:
5127 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
5128 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
5129
5130 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
5131
5132 * g++.1 (-traditional): Remove duplicated documentation.
5133
5134 1998-07-11 Mark Mitchell <mark@markmitchell.com>
5135
5136 * method.c (flush_repeats): Add nrepeats parameter.
5137 (issue_nrepeats): Likewise.
5138 (is_back_referenceable_type): New function. Don't back-reference
5139 TEMPLATE_TYPE_PARMs as well as simple types like integers.
5140 (build_mangled_name_for_type): Likewise.
5141 (build_mangled_name_for_type_with_Gcode): Likewise.
5142 (lasttype): Remove.
5143 (nrepeats): Likewise.
5144 (Nrepeats): Likewise.
5145 (start_squangling): Don't clear the variables removed above.
5146 (end_squangling): Likewise.
5147 (flush_repeats): Tidy. Use nrepeats parameter rather than
5148 Nrepeats global.
5149 (issue_nrepeats): Likewise, but with nrepeats global. Use
5150 is_backreferenceable_type.
5151 (build_overload_nested_name): Tidy. Add comment. Use
5152 build_mangled_name_for_type.
5153 (build_underscore_int): Comment.
5154 (build_overload_scope_ref): Use build_mangled_name_for_type.
5155 (build_overload_int): Likewise.
5156 (build_template_template_parm_names): Tidy.
5157 (build_template_parm_names): Use build_mangled_name_for_type.
5158 (build_overload_identifier): Add comments.
5159 (build_mangled_name_for_type_with_Gcode): Split out from
5160 build_mangled_name.
5161 (build_mangled_name_for_type): Use it.
5162 (build_mangled_name): Rework to use build_mangled_name_for_type
5163 and to not use global nrepeats/Nrepeats. Tidy.
5164 (process_modifiers): Tidy.
5165 (check_btype): Use is_backreferenceable_type. Add comment.
5166 Rename `node' to `type'.
5167 (process_overload_item): Set numeric_output_need_bar here.
5168 Use build_mangled_name_for_type. Tidy.
5169 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
5170 build_mangled_name_for_type.
5171
5172 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
5173 for TYPE_DECLs.
5174
5175 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
5176
5177 * cp-tree.h (warn_long_long): Define.
5178 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
5179 warning "ANSI C++ does not support `long long'".
5180 * decl2.c (warn_long_long): Define.
5181 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
5182
5183 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
5184
5185 * decl.c (xref_tag): Handle attributes between 'class' and name.
5186 * parse.y (aggr): Likewise.
5187 * semantics.c (finish_class_definition): Likewise.
5188 * Makefile.in (EXPECTED): Adjust.
5189
5190 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
5191 * decl2.c: Define them.
5192 (lang_decode_option): Handle them.
5193 * lang-options.h: Add -foptional-diags.
5194 * class.c (finish_struct): Don't complain about multiple meanings of
5195 name if -fno-optional-diags.
5196 * decl.c (pushdecl_class_level): Likewise.
5197 * lex.c (real_yylex): Check warn_multichar.
5198
5199 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
5200
5201 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
5202
5203 * tree.c (make_binfo): Fix length.
5204
5205 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
5206
5207 * decl2.c (lang_decode_option): Remove warn_template_debugging.
5208 * lang-options.h: Likewise.
5209
5210 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5211
5212 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
5213 (process_start_catch_block): Likewise for variables
5214 `false_label_rtx', `call_rtx' and `return_value_rtx'.
5215
5216 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
5217
5218 * tree.c (build_srcloc): Make sure we allocate this node on the
5219 permanent obstack.
5220
5221 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
5222
5223 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
5224 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
5225 (lang_specific_driver): Only add -lm automatically if need_math is
5226 nonzero.
5227
5228 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
5229
5230 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
5231
5232 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5233
5234 * Makefile.in (EXPR_H): New dependency variable.
5235 (decl2.o): Depend on $(EXPR_H).
5236 (typeck.o): Likewise.
5237 (init.o): Likewise.
5238 (expr.o): Likewise.
5239
5240 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
5241
5242 * decl.c (start_enum): Put local enums on permanent_obstack.
5243
5244 1998-06-25 Mark Mitchell <mark@markmitchell.com>
5245
5246 * cp-tree.h (c_get_alias_set): Declare.
5247 * decl.c (init_decl_processing): Set lang_get_alias_set.
5248
5249 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
5250
5251 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
5252 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
5253 flag for all function decls which are in the exception table.
5254 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
5255 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
5256 code is emitted for any referenced rtti function.
5257
5258 1998-06-25 Dave Brolley <brolley@cygnus.com>
5259
5260 * lang-specs.h: Use new | syntax to eliminate
5261 string concatenation.
5262
5263 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
5264
5265 * cp-tree.h (CP_DECL_CONTEXT): New macro.
5266 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
5267 * method.c (build_overload_nested_name): Likewise.
5268 * sig.c (build_signature_pointer_or_reference_type): Don't set
5269 DECL_CONTEXT.
5270
5271 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5272
5273 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
5274 * cp-tree.h (FROB_CONTEXT): New macro.
5275 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
5276 * decl.c (namespace_binding): Replace NULL_TREE with
5277 global_namespace.
5278 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
5279 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
5280 Likewise.
5281 * decl.c (pushtag): Use FROB_CONTEXT.
5282 (pushdecl, make_typename_type, define_function, grokdeclarator):
5283 Likewise.
5284 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
5285 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
5286 Likewise.
5287 * decl2.c (decl_namespace): Return global_namespace if no context.
5288 * method.c (build_overload_nested_name): Expect null as context.
5289 * pt.c (mangle_class_name_for_template): Do nothing for null
5290 contexts.
5291 (lookup_template_class): Allow for null id_context.
5292
5293 1998-06-25 Richard Henderson <rth@cygnus.com>
5294
5295 * method.c (emit_thunk): Set current_function_is_thunk for the
5296 ASM_OUTPUT_MI_THUNK case as well.
5297
5298 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
5299
5300 * exception.cc (__cplus_type_matcher): Get a match_info pointer
5301 instead of an exception table entry as a parameter.
5302
5303 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
5304
5305 * parse.y (function_try_block): Don't call start_catch_handler.
5306 * except.c (call_eh_info): Remove coerced field from declaration.
5307 (build_eh_type_type_ref): New function to create an address of a
5308 rtti function for the new style exception tables.
5309 (expand_start_catch_block): Split function, this contains the
5310 common part.
5311 (process_start_catch_block_old): New function to perform the rest
5312 of expand_start_catch_block under old style exceptions.
5313 (process_start_catch_block_old): New function to perform the rest
5314 of expand_start_catch_block under new style exceptions.
5315 (expand_end_catch_block): Only pop the false label off the stack under
5316 the old style of exceptions.
5317 * semantics.c (finish_try_block): Don't call start_catch_handler.
5318 * exception.cc (struct cp_eh_info): Add original_value field.
5319 (__cplus_type_matcher): Perform type matching on the original exception
5320 value, and if we have a match, set the current value.
5321 (__cp_push_exception): Set the original exception value.
5322
5323 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
5324
5325 * call.c (joust): Fix confusing conversion warning.
5326
5327 * call.c (build_op_delete_call): Add placement parm. Check
5328 LOOKUP_SPECULATIVELY.
5329 * cp-tree.h, decl2.c, init.c: Adjust.
5330 * decl.c (finish_function): Use it.
5331
5332 * pt.c (tsubst): Diagnose creating void fields or variables.
5333
5334 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5335
5336 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
5337
5338 * cp-tree.h (check_dtor_name): Add prototype.
5339
5340 * init.c (expand_member_init): Remove unused variables
5341 `ptr_type_node', `parm' and `rval'.
5342
5343 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
5344 in call to fprintf.
5345 (lang_print_xnode): Likewise.
5346
5347 * typeck2.c (enum_name_string): Cast argument to sprintf to long
5348 and use %ld specifier.
5349
5350 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
5351 specifier in call to fprintf.
5352 (GNU_xref_member): Cast argument to sprintf to int.
5353
5354 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
5355
5356 * typeck2.c (pop_init_level): Warn about implicit zero initialization
5357 of struct members.
5358
5359 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5360
5361 * cp-tree.h: Prototype function `check_java_method'.
5362
5363 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
5364
5365 * class.c (finish_struct): Make conflicting use of id a pedwarn.
5366 * decl.c (pushdecl_class_level): Likewise.
5367
5368 1998-06-17 Mark Mitchell <mark@markmitchell.com>
5369
5370 * pt.c (convert_nontype_argument): Issue an error when presented
5371 with an integer (real) constant that cannot be simplified to an
5372 INT_CST (REAL_CST).
5373
5374 * cp-tree.h (c_get_alias_set): Remove declaration added in
5375 1998-06-13 change that should never have been checked in.
5376
5377 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
5378
5379 * typeck.c (build_binary_op_nodefault): Change % in format strings
5380 to %%.
5381
5382 * decl.c (grokvardecl): Don't build_static_name for decls that
5383 aren't at namespace scope.
5384
5385 * init.c (perform_member_init): Catch default-initialization of
5386 references.
5387
5388 1998-06-17 Mark Mitchell <mark@markmitchell.com>
5389
5390 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
5391
5392 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
5393
5394 * method.c (hack_identifier): Complain about getting a namespace
5395 or class template.
5396 * typeck.c (decay_conversion): Remove check for namespaces.
5397 * typeck2.c (incomplete_type_error): Likewise.
5398 * parse.y (template_arg): Add PTYPENAME expansion.
5399
5400 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
5401
5402 * decl.c (grokvardecl): Don't build external assembler names for
5403 TYPENAMEs in other namespaces as there is no declarator.
5404 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
5405 info from DECL_CONTEXT if it is NULL.
5406
5407 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
5408
5409 * call.c (check_dtor_name): Split out.
5410 (build_scoped_method_call): Use it.
5411 (build_method_call): Use it.
5412 * init.c (build_offset_ref): Use it.
5413
5414 * typeck.c (build_static_cast): Fix handling of pointers to members.
5415
5416 * decl.c (finish_function): Just return nothing from a constructor.
5417 * typeck.c (c_expand_return): Complain about returning a void
5418 expression from a destructor.
5419
5420 1998-06-13 Mark Mitchell <mark@markmitchell.com>
5421
5422 * class.c (alter_access): Accept a BINFO explaining how to get
5423 from the entity whose accessed is being altered to the type doing
5424 the altering.
5425 (handle_using_decl): New function containing code split out from ...
5426 (finish_struct_1): Here.
5427
5428 * cp-tree.h (complete_type_or_else): Declare.
5429 * init.c (build_new_1, build_delete): Use it.
5430 * typeck.c (require_complete_type): Use complete_type, rather than
5431 expanding it inline.
5432 (complete_type_or_else): New function.
5433 (build_component_ref): Use it.
5434 (pointer_int_sum): Make sure the type pointed to is complete.
5435 (pointer_diff): Likewise.
5436
5437 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
5438 types.
5439
5440 * search.c (get_matching_virtual): Note that member templates
5441 cannot override virtual functions.
5442
5443 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
5444
5445 * pt.c (check_explicit_specialization): If DECLARATOR turned into
5446 an error_mark_node from lookup_template_function, return the same.
5447 (determine_specialization): Also make sure TEMPLATE_ID isn't an
5448 error_mark_node, before we try to read its operands.
5449 * decl.c (grokdeclarator): If we got an error_mark_node from
5450 check_explicit_specialization, just return it right back.
5451
5452 1998-06-12 Mark Mitchell <mark@markmitchell.com>
5453
5454 * class.c (instantiate_type): Don't treat template-ids that don't
5455 specify any template arguments as equivalent to ordinary
5456 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
5457 pointer-to-members for member templates. Tidy slightly.
5458 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
5459 * init.c (build_offset_ref): Handle template-ids like ordinary
5460 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
5461 offset part of the OFFSET_REF.
5462 * typeck.c (build_unary_op): Change check for unknown types to
5463 look for OFFSET_REFs, not SCOPE_REFs.
5464
5465 1998-06-11 Mark Mitchell <mark@markmitchell.com>
5466
5467 * pt.c (is_member_template_class): New function.
5468 (push_template_decl_real): Use it.
5469
5470 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
5471
5472 * friend.c (do_friend): Add support for nested classes using
5473 member functions of the enclosing class as friends.
5474
5475 1998-06-10 Mark Mitchell <mark@markmitchell.com>
5476
5477 * call.c (convert_default_arg): Make global, not static.
5478 (convert_arg_for_ellipsis): Split out from ...
5479 (build_over_call): Here.
5480 * cp-tree.h (convert_default_arg); Declare.
5481 (convert_arg_to_ellipsis): Likewise.
5482 (do_member_init): Remove.
5483 * init.c (do_member_init): Remove; this code is dead.
5484 (expand_member_init): Remove much of this code; it is dead.
5485 * typeck.c (convert_arguments): Use convert_default_arg and
5486 convert_arg_for_ellipsis, rather than duplicating here.
5487
5488 * call.c (convert_like): Don't fail silently if
5489 build_user_type_conversion fails. Always return error_mark_node
5490 for failure.
5491
5492 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
5493
5494 * search.c (covariant_return_p): Complain about ambiguous base.
5495
5496 * typeck.c (build_component_ref): Diagnose ref to nested type.
5497
5498 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
5499
5500 * decl.c (grokparms): Check that INIT isn't an error_mark_node
5501 before giving error about invalid type for default arg.
5502
5503 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
5504
5505 * call.c (build_method_call): Fix thinko.
5506
5507 1998-06-10 Dave Brolley <brolley@cygnus.com>
5508
5509 * decl2.c (lang_decode_option): New argc/argv interface.
5510 * cp-tree.h (lang_decode_option): New argc/argv interface.
5511 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
5512 specified for cpplib-enabled compilers.
5513 * lex.c (lang_init): Don't check_newline for cpplib.
5514 (init_parse): Don't initialize cpplib here.
5515
5516 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
5517
5518 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
5519 piece before checking DECL_MUTABLE_P.
5520
5521 1998-06-10 John Carr <jfc@mit.edu>
5522
5523 * tree.c (debug_binfo): Make printf format match arguments.
5524
5525 * error.c (OB_PUTI): Make printf format match arguments.
5526
5527 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
5528
5529 * init.c (perform_member_init): Handle default-initialization.
5530
5531 * except.c (build_throw): Handle throwing NULL.
5532
5533 * typeck.c (build_x_function_call): Use resolve_offset_ref.
5534
5535 * search.c (compute_access): Only strip an anonymous union
5536 for a FIELD_DECL.
5537
5538 * call.c (add_builtin_candidates): Tweak.
5539
5540 * cvt.c (build_expr_type_conversion): Restore code for conversion
5541 from class types.
5542 * decl2.c (delete_sanity): Use it. Clean up.
5543
5544 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
5545
5546 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
5547
5548 * typeck.c (c_expand_return): Don't warn about void expressions on
5549 return statements in functions returning void.
5550
5551 1998-06-09 Mark Mitchell <mark@markmitchell.com>
5552
5553 * pt.c (fn_type_unification): Revise documentation. Tidy.
5554 (type_unification): Likewise.
5555
5556 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
5557
5558 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
5559 expand_end_catch.
5560 * parse.y (function_try_block): Rename expand_start_catch, and delete
5561 expand_end_catch.
5562 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
5563 expand_end_catch.
5564
5565 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
5566
5567 * search.c (lookup_member): New fn.
5568 * class.c (finish_struct_1): Use it.
5569 * decl.c (lookup_name_real): Use it.
5570
5571 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5572
5573 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
5574
5575 * cp-tree.h: Add prototype for `maybe_print_template_context' and
5576 `maybe_make_one_only'.
5577
5578 * decl.c (auto_function): Remove unused variable `decl'.
5579
5580 * decl2.c: Include dwarf2out.h and dwarfout.h.
5581
5582 * lex.c: Remove redundant declarations of `set_float_handler' and
5583 `asm_out_file'.
5584
5585 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
5586
5587 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
5588 time flag. Call __cp_eh_info instead of __cp_exception_info.
5589 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
5590 (__cp_exception_info): Return offset into cp_eh_info structure to
5591 match what use to be the start of this structure.
5592 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
5593 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
5594 compile time flag.
5595 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
5596 __cp_eh_info instead of __cp_exception_info.
5597
5598 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
5599
5600 * decl.c (cp_finish_decl): Disable inlining of extern inlines
5601 with static variables.
5602
5603 1998-06-08 Mark Mitchell <mark@markmitchell.com>
5604
5605 * init.c (build_offset_ref): Correct previous change to use build,
5606 not build_min.
5607
5608 1998-06-07 Mark Mitchell <mark@markmitchell.com>
5609
5610 * class.c (instantiate_type): Handle pointer-to-members where the
5611 member is a template.
5612 * init.c (build_offset_ref): Likewise.
5613 * typeck.c (build_unary_op): Likewise.
5614
5615 1998-06-07 Richard Henderson <rth@cygnus.com>
5616
5617 * lex.c (lang_init_options): New function.
5618 (lang_init): Remove flag_exceptions == 2 hack.
5619
5620 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
5621
5622 * search.c (envelope_add_decl): Tweak for implicit typename.
5623
5624 * call.c (joust): Also warn about confusing conversion op/constructor
5625 overload resolution.
5626
5627 * spew.c (yylex): Also return the TYPE_DECL if got_object.
5628 Don't clear got_object after '~'.
5629 * call.c (build_scoped_method_call): Tweak destructor handling.
5630 (build_method_call): Likewise.
5631 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
5632 TYPE_MAIN_VARIANT for destructors.
5633 * semantics.c (finish_object_call_expr): Complain about calling a
5634 TYPE_DECL.
5635
5636 1998-06-05 Per Bothner <bothner@cygnus.com>
5637
5638 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
5639 Define - update needed by gcc.c change.
5640
5641 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
5642
5643 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
5644
5645 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
5646
5647 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
5648 * decl.c (lookup_name_real): Add namespaces_only parameter.
5649 If set, return only NAMESPACE_DECLs.
5650 (select_decl): Likewise.
5651 (identifier_type_value): Give additional parameter.
5652 (lookup_name_nonclass): Likewise.
5653 (lookup_name): Likewise.
5654 (find_binding): Skip namespace aliases.
5655 (binding_for_name): Likewise.
5656 (push_namespace): Check for namespace aliases.
5657 (lookup_name_namespace_only): New function.
5658 (begin_only_namespace_names, end_only_namespace_names): New functions.
5659 * decl2.c (set_decl_namespace): Skip namespace aliases.
5660 (do_using_directive): Likewise.
5661 (do_namespace_alias): Produce namespace aliases, fix alias
5662 redeclaration.
5663 * error.c (dump_decl): Support SCOPE_REF.
5664 * parse.y (extdef): Wrap lookup with namespace_only for namespace
5665 aliases and using declarations.
5666
5667 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
5668
5669 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
5670
5671 * error.c (dump_expr): Clean up NEW_EXPR case.
5672
5673 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
5674
5675 Suggested by Brendan Kehoe
5676 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
5677 treat it as using ::decl.
5678
5679 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
5680
5681 * tree.c (mapcar): Support NEW_EXPR.
5682
5683 * error.c (dump_expr): Support NEW_EXPR.
5684
5685 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
5686
5687 * method.c (make_thunk): Use overload machinery to make name.
5688 * search.c (covariant_return_p): New fn.
5689 (get_matching_virtual): Use it.
5690
5691 * init.c (build_new_1): Fix check for void.
5692
5693 1998-06-01 Per Bothner <bothner@cygnus.com>
5694
5695 * cp-tree.h (TYPE_FOR_JAVA): New macro.
5696 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
5697 java_int_type_node, java_long_type_node, java_float_type_node,
5698 java_double_type_node, java_char_type_node, java_boolean_type_node):
5699 New "primitive" types, with predefined names __java_byte etc.
5700 (record_builtin_java_type): New function.
5701 (init_decl_processing): Make Java types with record_builtin_java_type.
5702 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
5703 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
5704 (grokfndecl): Call check_java_method for Java classes.
5705 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
5706 (process_overload_item): Match types against specific
5707 java_XX_type_node types, rather than using is_java_type.
5708 * class.c (finish_struct_1): Don't add default copy constructor
5709 or operator= if TYPE_FOR_JAVA.
5710 (pop_lang_conext): Restore strict_prototyp proper if Java.
5711 * decl2.c (acceptable_java_type, check_java_method): New functions.
5712 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
5713 (tsubst): Move common statement after if statement.
5714 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
5715
5716 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
5717
5718 * pt.c (for_each_template_parm): Use first_rtl_op.
5719
5720 * tree.c (build_cplus_array_type_1): Also check index_type for
5721 template parms.
5722
5723 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
5724
5725 * pt.c (tsubst): Always copy BINFO_BASETYPES.
5726
5727 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
5728
5729 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
5730 TYPE_SIZE_UNIT too.
5731
5732 1998-05-29 Mark Mitchell <mark@markmitchell.com>
5733
5734 * decl.c (grokdeclarator): Don't complain about in-class
5735 initialization of static consts if we don't really know the type
5736 of the variable.
5737
5738 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
5739
5740 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
5741 * method.c (build_destructor_name): New fn.
5742 * decl2.c (maybe_retrofit_in_chrg): Split out...
5743 (grokclassfn): From here. Reorganize.
5744 * decl.c (grok_ctor_properties): Make sure ctors for types with
5745 vbases have the in_chrg parm.
5746 * pt.c (instantiate_class_template): Update
5747 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
5748 grok_*_properties.
5749 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
5750
5751 1998-05-28 Mark Mitchell <mark@markmitchell.com>
5752
5753 * pt.c (instantiate_decl): Make test for whether or not static
5754 variables should be instantiated early match its comment.
5755
5756 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
5757
5758 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
5759 a member.
5760 (start_function): Call check_default_args.
5761 * decl2.c (grokfield): Don't call check_default_args.
5762 (check_default_args): Use cp_error_at.
5763 * lex.c (do_pending_defargs): Call check_default_args.
5764
5765 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
5766
5767 * call.c (build_method_call): Make sure get_type_value returns
5768 something before we try to use its TYPE_MAIN_VARIANT.
5769 (build_scoped_method_call): Likewise.
5770
5771 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
5772
5773 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
5774 initialize an array.
5775
5776 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
5777 DECL_VIRTUAL_P.
5778
5779 * friend.c (do_friend): Clarify template warning.
5780
5781 1998-05-27 Mark Mitchell <mark@markmitchell.com>
5782
5783 * decl.c (shadow_label): Don't treat decls as identifiers.
5784 (maybe_push_to_top_level): Clear shadowed_labels.
5785
5786 * pt.c (instantiate_decl): Reset lineno and filename after calling
5787 regenerate_decl_from_template.
5788
5789 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
5790 error_mark_node.
5791
5792 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
5793
5794 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
5795
5796 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
5797
5798 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
5799 (convert_nontype_argument): Handle cases when nontype template
5800 parameters become classes after substitution.
5801
5802 1998-05-26 Mark Mitchell <mark@markmitchell.com>
5803
5804 * friend.c (is_friend): Use comptypes, rather than == to compare
5805 types. Modify for new representation of template friends.
5806 (make_friend_class): Likewise.
5807 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
5808 (instantiate_class_template): Deal with template friends.
5809
5810 * decl.c (store_parm_decls): Remove redundant call to
5811 expand_main_function.
5812
5813 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
5814
5815 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
5816 DECL_USE_TEMPLATE.
5817
5818 1998-05-26 Per Bothner <bothner@cygnus.com>
5819
5820 * language_as_string: Handle lang_java.
5821
5822 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
5823
5824 * decl.c (pushdecl): Don't copy the type_decl.
5825
5826 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5827
5828 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
5829 current_class_type.
5830 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
5831
5832 * parse.y (complex_direct_notype_declarator): Use $1 to access
5833 scope of notype_qualified_id.
5834
5835 1998-05-26 Dave Brolley <brolley@cygnus.com>
5836
5837 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
5838 (init_parse): Initialize cpplib interface.
5839
5840 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
5841 empty continuation.
5842
5843 1998-05-26 Mark Mitchell <mark@markmitchell.com>
5844
5845 * decl.c (pushtag): Avoid crashing on erroneous input.
5846
5847 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5848
5849 * decl.c (push_namespace): Only produce one unique name for
5850 anonymous namespaces.
5851 (get_unique_name): Remove.
5852
5853 1998-05-25 Mark Mitchell <mark@markmitchell.com>
5854
5855 * call.c (tourney): Don't do any extra comparisons.
5856
5857 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
5858
5859 * cp-tree.h (processing_template_parmlist): Declare.
5860 * decl.c (pushtag): Don't call push_template_decl when we
5861 shouldn't.
5862 * pt.c (processing_template_parmlist): New variable.
5863 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
5864 (complete_template_args): Use it.
5865 (add_to_template_args): Likewise.
5866 (innermost_args): Likewise.
5867 (tsubst): Likewise.
5868 (begin_template_parm_list): Use processing_template_parmlist.
5869 (end_template_parm_list): Likewise.
5870
5871 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
5872 * decl.c (grokdeclarator): Use it.
5873 * decl2.c (grok_x_components): Likewise.
5874 * init.c (initializing_context): Likewise.
5875 * method.c (do_build_copy_constructor): Likewise.
5876 (do_build_assign_ref): Likewise.
5877 * search.c (compute_access): Likewise.
5878 * typeck.c (build_component_ref): Likewise.
5879
5880 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
5881 unnamed type a typedef name "for linkage purposes".
5882
5883 * pt.c (lookup_template_class): Don't look at
5884 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
5885
5886 * method.c (build_overload_int): Handle error cases gracefully.
5887
5888 * pt.c (instantiate_decl): Handle static member variables
5889 correctly.
5890
5891 * pt.c (tsubst): Use the tsubst'd type when producing new
5892 TEMPLATE_PARM_INDEX nodes.
5893
5894 1998-05-24 Mark Mitchell <mark@markmitchell.com>
5895
5896 * tree.c (cp_tree_equal): Handle pointers to member functions.
5897
5898 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
5899 sure the type of the REF_BIND is a reference type.
5900 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
5901 target_type for clarity.
5902
5903 * parse.y (xcond): Move call to condition_conversion ...
5904 * semantics.c (finish_for_cond): Here.
5905 * parse.c: Regenerated.
5906
5907 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
5908
5909 * decl.c (push_namespace): Namespaces have type void.
5910 * typeck2.c (incomplete_type_error): Complain about namespace
5911 used as expression.
5912 * typeck.c (decay_conversion): Likewise.
5913
5914 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
5915
5916 * error.c (dump_expr): Support namespaces.
5917
5918 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
5919
5920 * cp-tree.def: Add SRCLOC.
5921 * cp-tree.h: Add struct tree_srcloc and accessor macros.
5922 * tree.c (build_srcloc, build_srcloc_here): New fns.
5923 * pt.c (add_pending_template): Use build_srcloc_here.
5924 (push_tinst_level): Update last_template_error_tick before erroring.
5925 (instantiate_decl): Restore lineno and input_filename before
5926 calling add_pending_template.
5927 * decl2.c (finish_file): Set up lineno and input_filename for
5928 pending templates.
5929
5930 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
5931
5932 * decl.c (lang_print_error_function): New fn.
5933 (init_decl_processing): Set print_error_function to use it.
5934 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
5935
5936 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
5937 ICS_BAD_FLAG.
5938
5939 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
5940 copy-initialization.
5941
5942 * class.c (build_vtable_entry): Use int_fits_type_p.
5943 (build_vtable): Pass a signed offset to build_vtable_entry.
5944 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
5945 set_rtti_entry): Likewise.
5946
5947 1998-05-22 Per Bothner <bothner@cygnus.com>
5948
5949 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
5950 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
5951
5952 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
5953
5954 * pt.c (print_template_context): Use fprintf instead of cp_error.
5955
5956 * pt.c (determine_specialization): Just return an error_mark_node.
5957 Also print the decl we want in error messages. If we complain,
5958 return error_mark_node.
5959 (tsubst_friend_function): Set lineno and input_filename so
5960 error messages will be useful.
5961 (instantiate_template): Just return an error_mark_node.
5962 (check_explicit_specialization): Don't mess with a returned
5963 error_mark_node.
5964
5965 * pt.c (print_template_context): Add new argument.
5966 (maybe_print_template_context): New fn.
5967 (push_tinst_level): Increment tinst_level_tick.
5968 (pop_tinst_level): Likewise.
5969 * errfn.c (cp_thing): Call maybe_print_template_context. Use
5970 xrealloc instead of xmalloc.
5971
5972 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
5973
5974 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
5975
5976 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
5977 if the template we looked up is the same as the one we already
5978 have.
5979
5980 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
5981
5982 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
5983 (cpp_reader,parse_in): Add for cpplib.
5984 (check_newline): Call handle_sysv_pragma with new interface.
5985 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
5986
5987 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
5988 (sub_getch): Call GETC for cpplib.
5989
5990 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
5991 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
5992
5993 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
5994
5995 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
5996
5997 * decl2.c (maybe_make_one_only): New fn.
5998 (import_export_vtable): Use it.
5999 (import_export_decl): Likewise.
6000 * pt.c (mark_decl_instantiated): Likewise.
6001
6002 1998-05-21 Mark Mitchell <mmitchell@usa.net>
6003
6004 * decl2.c (find_representative_member): Rename to ...
6005 (build_anon_union_vars): New function.
6006 (finish_anon_union): Fix stupidity of previous change.
6007
6008 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
6009
6010 * decl.c (grokfndecl): Handle definition of specialization in
6011 friend declaration.
6012
6013 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
6014
6015 1998-05-20 Mark Mitchell <mmitchell@usa.net>
6016
6017 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
6018 to look for type declarations.
6019 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
6020 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
6021 (finish_member_class_template): Declare.
6022 * decl.c (pushtag): Put member class templates on the
6023 CLASSTYPE_TAGS list, just as for ordinary member classes.
6024 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
6025 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
6026 IDENTIFIER_NAMESPACE_VALUEs.
6027 * parse.y (component_decl): Move code to ...
6028 * semantics.c (finish_member_class_template): New function.
6029 Don't put member class templates on the list of components for a
6030 class.
6031 * parse.c: Regenerated.
6032 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
6033 In fact, don't use DECL_CONTEXT at all here.
6034
6035 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
6036
6037 * decl.c (record_unknown_type): New function.
6038 (init_decl_processing): Call it for the unknown and global type
6039 nodes.
6040
6041 1998-05-20 Mark Mitchell <mmitchell@usa.net>
6042
6043 * decl2.c (find_representative_member): New function.
6044 (finish_anon_union): Use it.
6045
6046 * cp-tree.h (MAIN_NAME_P): New macro.
6047 (DECL_MAIN_P): Likwise.
6048 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
6049 (grokfndecl): Use the new macros.
6050 (grokdeclarator): Likewise.
6051 (start_function): Likewise.
6052 (store_parm_decls): Likewise.
6053 (finsh_function): Likewise.
6054 * friend.c (do_friend): Likewise.
6055 * typeck.c (build_function_call_real): Likewise.
6056 (build_unary_op): Likewise.
6057
6058 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
6059
6060 * decl2.c (start_objects, finish_objects, do_dtors,
6061 do_ctors): Split out from...
6062 (finish_file): ...here.
6063
6064 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
6065
6066 * tree.c (is_overloaded_fn): Don't abort on placeholders from
6067 push_class_decls.
6068
6069 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
6070
6071 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
6072
6073 * error.c (dump_expr): Handle an ARROW_EXPR.
6074
6075 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
6076
6077 * decl.c (saveable_obstack): Declare.
6078 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
6079 declare, if necessary.
6080
6081 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
6082
6083 * call.c (compare_qual): Remove.
6084 (is_subseq): Tweak.
6085 (is_properly_derived_from): New function.
6086 (maybe_handle_ref_bind): Likewise.
6087 (maybe_handle_implicit_object): Likewise.
6088 (compare_ics): Modify substantially to bring into conformance with
6089 the standard.
6090 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
6091 (comp_cv_qualification): Declare.
6092 (comp_cv_qual_signature): Likewise.
6093 * typeck.c (comp_cv_qualification): Likewise.
6094 (comp_cv_qual_signature): Likewise.
6095
6096 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6097
6098 * Makefile.in (parse.o): Depend on toplev.h.
6099
6100 * class.c (typecode_p): Remove prototype and definition.
6101
6102 * cp-tree.h (currently_open_class, is_empty_class, member_p):
6103 Add prototype.
6104
6105 * decl.c (push_overloaded_decl_top_level): Remove prototype and
6106 definition.
6107
6108 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
6109 in call to `cp_thing'.
6110 (cp_warning): Likewise for function pointer `warning'.
6111
6112 * except.c (do_function_call): Remove prototype and definition.
6113 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
6114
6115 * method.c (is_java_type): Add prototype and make it static.
6116
6117 * parse.y: Include toplev.h.
6118
6119 * pt.c (type_unification): Remove unused variable `arg'.
6120 (instantiate_decl): Likewise for `save_ti'.
6121
6122 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
6123
6124 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
6125
6126 * init.c (build_member_call): Handle template_ids.
6127 * parse.y (primary): Add global_scope template_id.
6128
6129 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
6130
6131 * decl2.c (get_sentry): Use end_temporary_allocation.
6132 Don't declare permanent_obstack.
6133
6134 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
6135
6136 * parse.y (.finish_new_placement): New non-terminal.
6137 (unary_expr, new_type_id): Use it.
6138 * parse.c: Regenerated.
6139
6140 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
6141
6142 * pt.c (redeclare_class_template): Say where the original definition
6143 of the template-parameter's default argument appeared.
6144
6145 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
6146
6147 * call.c (build_over_call): Tweak empty class handling.
6148
6149 * decl.c (make_typename_type): Use currently_open_class.
6150
6151 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
6152
6153 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
6154
6155 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
6156 for a type unless it is one.
6157
6158 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
6159
6160 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
6161
6162 * Makefile.in (program_transform_name, objdir): Define.
6163
6164 * Makefile.in (BISON): Use bison from the build tree if it exists.
6165 (FLEX): Likewise.
6166
6167 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
6168
6169 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
6170
6171 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
6172
6173 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
6174
6175 * call.c (build_scoped_method_call): Likewise.
6176
6177 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
6178
6179 * init.c (build_new_1): Call suspend_momentary around the creation
6180 of values that must be saved for exception handling.
6181 * parse.y (.build_new_placement): New non-terminal.
6182 (unary_expr, new_placement): Use it.
6183 * parse.c: Regenerated.
6184
6185 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
6186
6187 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
6188 old and new types.
6189
6190 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
6191 canonical type.
6192
6193 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
6194
6195 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
6196
6197 * decl.c (start_decl): Revert problem change.
6198
6199 * Makefile.in (CONFLICTS): Fix.
6200
6201 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
6202
6203 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
6204
6205 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
6206
6207 * class.c (finish_struct_1): Use BINFO_SIZE.
6208
6209 * decl.c (start_decl): Use 'tem'.
6210
6211 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
6212
6213 * exception.cc: Include eh-common.h.
6214 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
6215 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
6216 (__cp_push_exception): Initialize eh_info struct as well.
6217 * except.c: Remove local structs and include eh-common.h.
6218 (init_exception_processing): Set language and version codes.
6219 (call_eh_info): Add presence of eh_info to runtime description of
6220 struct cp_eh_info.
6221 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
6222 * semantics.c (finish_try_block): Call start_catch_block() and
6223 end_catch_block().
6224 * parse.y (function_try_block): Call start_catch_block() and
6225 end_catch_block().
6226
6227 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
6228
6229 * typeck.c (original_type): New function.
6230 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
6231 to see if they're actually the same.
6232 * cp-tree.h (original_type): Declare.
6233
6234 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6235
6236 * Makefile.in (lex.o): Depend on output.h.
6237
6238 * call.c (add_function_candidate): Remove unused variable `cand'.
6239 (add_conv_candidate): Likewise.
6240 (build_builtin_candidate): Likewise.
6241
6242 * cp-tree.h: Add prototype for `types_overlap_p'.
6243
6244 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
6245
6246 * decl2.c (merge_functions): Remove unused variables `tmp' and
6247 `tempn'.
6248
6249 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
6250 (code_as_string): Likewise.
6251 (language_as_string): Likewise.
6252 (parm_as_string): Likewise.
6253 (op_as_string): Likewise.
6254 (assop_as_string): Likewise.
6255 (cv_as_string): Likewise.
6256
6257 * lex.c: Include output.h.
6258
6259 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
6260
6261 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
6262 ATTRIBUTE_UNUSED.
6263
6264 * tinfo.cc (__class_type_info::dcast): Change the type of variable
6265 `i' from int to size_t.
6266
6267 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
6268 ATTRIBUTE_UNUSED.
6269
6270 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
6271
6272 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
6273 DECL_NAMESPACE_SCOPE_P.
6274 (lang_decl_name): Likewise.
6275 * pt.c (tsubst_friend_function, tsubst): Likewise.
6276 * decl.c (pushdecl, redeclaration_error_message, start_decl,
6277 cp_finish_decl, start_function): Likewise.
6278 * class.c (finish_struct_1): Likewise.
6279 * call.c (build_over_call): Likewise.
6280 (compare_ics): Use DERIVED_FROM_P.
6281
6282 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
6283
6284 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
6285 * method.c (build_mangled_name): Use it.
6286 (build_decl_overload_real): Likewise.
6287
6288 * error.c (dump_simple_decl): New function, broken out from ...
6289 (dump_decl): Use it.
6290
6291 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
6292
6293 * ptree.c (lang_print_xnode): Add missing `break'.
6294
6295 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
6296
6297 * call.c (add_template_candidate): Adjust for changes to
6298 fn_type_unification.
6299 (add_template_candidate_real): Likewise.
6300 (add_template_conv_candidate): Likewise.
6301 (build_user_type_conversion_1): Likewise.
6302 (build_new_function_call): Likewise.
6303 (build_object_call): Likewise.
6304 (build_new_op): Likewise.
6305 (build_new_method_call): Likewise.
6306 * class.c (instantiate_type): Likewise.
6307 * cp-tree.h (unification_kind_t): New type.
6308 (fn_type_unification): Adjust prototype.
6309 (type_unificaiton): Likewise.
6310 * pt.c (UNIFY_ALLOW_NONE): New macro.
6311 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
6312 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
6313 (UNIFY_ALLOW_DERIVED): Likewise.
6314 (unify): Change prototype.
6315 (maybe_adjust_types_for_deduction): New function.
6316 (check_cv_quals_for_unify): Likewise.
6317 (determine_specialization): Adjust.
6318 (fn_type_unification): Likewise.
6319 (type_unification): Likewise.
6320 (type_unification_real): Likewise. Use
6321 maybe_adjust_types_for_deduction. Fix mishandling of
6322 back-unification of template functions passed as arguments. Pass
6323 appropriate combination of UNIFY_ALLOW_* to unify.
6324 (unify): Remove unused NTPARMS parameter. Use
6325 check_cv_quals_for_unify. Remove bogus code that allowed
6326 too-generous unification in order to adhere more closely to standard.
6327 (get_bindings_real): Adjust.
6328 (get_class_bindings): Likewise.
6329
6330 * method.c (build_overload_identifier): Only use the innermost
6331 template arguments when mangling.
6332 * pt.c (tsubst_template_argument_vector): New function.
6333 (complete_template_args): Deal with the situation where the
6334 extra_args contain more than one level of arguments.
6335 (lookup_template_class): Deal with member template classes, which
6336 may have more than one level of arguments.
6337 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
6338 Improve handling of member template classes. Use
6339 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
6340 tsubst_template_argument_vector where appropriate.
6341 (regenerate_decl_from_template): Break out from ...
6342 (instantiate_decl): Here.
6343
6344 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
6345 * parse.h: Regenerated.
6346 * parse.c: Really regenerated.
6347
6348 * cp-tree.h (finish_unary_op_expr): New function.
6349 (finish_id_expr): Likewise.
6350 (begin_new_placement): Likewise.
6351 (finish_new_placement): Likewise.
6352 (finish_declarator): Likewise.
6353 (finish_translation_unit): Likewise.
6354 (finish_parmlist): Likewise.
6355 (begin_class_definition): Likewise.
6356 (finish_class_definition): Likewise.
6357 (finish_default_args): Likewise.
6358 (finish_inline_definitions): Likewise.
6359 * parse.y (GCC_ASM_KEYWORD): Remove.
6360 (TYPENAME_ELLIPSIS): Likewise.
6361 * parse.c: Regenerated.
6362 Use new functions in semantics.c in the actions for many rules.
6363 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
6364 * hash.h: Regenerated.
6365 * semantics.c (finish_expr_stmt): Allow NULL expr.
6366 (finish_unary_op_expr): New function, containing
6367 code previously in parse.y.
6368 (finish_id_expr): Likewise.
6369 (begin_new_placement): Likewise.
6370 (finish_new_placement): Likewise.
6371 (finish_declarator): Likewise.
6372 (finish_translation_unit): Likewise.
6373 (finish_parmlist): Likewise.
6374 (begin_class_definition): Likewise.
6375 (finish_class_definition): Likewise.
6376 (finish_default_args): Likewise.
6377 (finish_inline_definitions): Likewise.
6378
6379 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
6380
6381 * typeck.c (build_c_cast): Don't decay arrays and functions to
6382 pointer type when converting to a class type.
6383
6384 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
6385
6386 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
6387 (DECL_CLASS_SCOPE_P): Likewise.
6388
6389 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
6390
6391 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
6392 * decl2.c (constructor_name_full): Likewise.
6393
6394 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
6395
6396 * tree.c (mapcar): Add OVERLOAD support.
6397
6398 * init.c (resolve_offset_ref): We must use basetype_path before we
6399 destroy it with a call to convert_pointer_to.
6400
6401 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
6402
6403 * class.c (currently_open_class): New fn.
6404 * decl.c (lookup_name_real): Use it.
6405 * search.c (lookup_field): Likewise.
6406
6407 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
6408
6409 * cp-tree.def (OVERLOAD): New node.
6410 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
6411 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
6412 (NAMESPACE_BINDING): Remove.
6413 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
6414 namespace_binding.
6415 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
6416 Define.
6417 (tree_overload): New struct.
6418 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
6419 (REAL_IDENTIFIER_TYPE_VALUE): Define.
6420 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
6421 (lang_decl_flags): Remove in_namespace.
6422 (lang_decl): Remove chain.
6423 (DECL_CHAIN, DECL_NAMESPACE): Remove.
6424 (flag_honor_std): Declare extern.
6425 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
6426 namespace_binding, set_namespace_binding,
6427 lookup_function_nonclass, cat_namespace_levels,
6428 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
6429 scratch_ovl_cons, ovl_member, build_overload): Declare.
6430 (decl_list_length, get_namespace_id, current_namespace_id,
6431 overloaded_globals_p): Remove.
6432 (lookup_using_namespace, qualified_lookup_using_namespace): Change
6433 return type.
6434 (push_scratch_obstack): New macro.
6435 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
6436 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
6437 convs, fns.
6438 (build_new_function_call): Iterate using OVL_CHAIN.
6439 Print DECL_NAME in when reporting ambiguities.
6440 (build_object_call): Iterate using OVL_NEXT for fns, convs.
6441 (build_new_op): Call lookup_function_nonclass.
6442 Iterate using OVL_NEXT.
6443 (build_op_delete_call): Change detection of members.
6444 Do not wrap TREE_LIST around fields and single global functions.
6445 (build_over_call): Don't push a class level if the context is a
6446 namespace.
6447 (build_new_method_call): Iterate using OVL_NEXT.
6448 * class.c (add_method): Chain overloaded members using
6449 build_overload. Remove copying of method.
6450 (grow_method): When iterating through the obstack, expect OVERLOAD
6451 nodes. Chain overload members.
6452 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
6453 nodes in call to get_baselinks.
6454 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
6455 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
6456 fdecls that are OVERLOAD nodes.
6457 (validate_lhs): New function.
6458 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
6459 code. Use DECL_NAME in error messages. Split code between global
6460 and member function processing.
6461 * decl.c (global_type_node): New static variable.
6462 (in_std): New global.
6463 (struct binding_level): New field usings.
6464 (resume_binding_level): Assert that we are not in a class.
6465 (toplevel_bindings_p): Just check for namespace_p or
6466 pseudo_global.
6467 (resume_level): Remove.
6468 (find_binding): New function.
6469 (binding_for_name): Call it.
6470 (namespace_binding, set_namespace_binding): New functions.
6471 (push_namespace): Associate binding level with new namespace,
6472 resume_binding_level for existing namespace. Remove old code.
6473 Fake std by counting.
6474 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
6475 (maybe_push_to_top_level): Save current namespace.
6476 (pop_from_top_level): Restore saved namespace.
6477 (pop_namespace): Call suspend_binding_level. Remove old code.
6478 (cat_namespace_levels): New function.
6479 (set_identifier_type_value_with_scope): For namespace bindings,
6480 set BINDING_TYPE, and use global_type_node.
6481 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
6482 (identifier_type_value): New function.
6483 (pushtag): If no context, use current_namespace.
6484 (duplicate_decls): Don't process DECL_CHAIN.
6485 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
6486 already set. Never reset it to NULL_TREE. Lookup global variables
6487 in their namespace. Push overloaded templates if they are on
6488 namespace level.
6489 (pushdecl_namespace_level): New function.
6490 (pushdecl_top_level): Implement using pushdecl_namespace_level.
6491 (pushdecl_using_decl): New function.
6492 (overloaded_globals_p): Remove.
6493 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
6494 them. Use namespace_binding and set_namespace_value.
6495 (redeclaration_error_message): Complain if the declarations come
6496 from different namespaces.
6497 (lookup_tag): On namespace level, look in the BINDING_TYPE.
6498 (lookup_namespace_name): Pass tree_bindings from stack. Remove
6499 old code.
6500 (select_decl): New function.
6501 (lookup_name_real): Call it for qualified and unqualified lookup.
6502 Pass tree_bindings from the stack.
6503 If prefer_type is 1, also accept namespaces.
6504 (lookup_function_nonclass): New function.
6505 (init_decl_processing): Set the binding level of the global
6506 namespace to global_binding_level.
6507 Build a proper type list for __builtin_apply.
6508 Initialize std_node to "fake std" if flag_honor_std is set.
6509 Initialize global_type_node.
6510 Allocated bad_alloc in namespace std if flag_honor_std.
6511 (define_function): Set the DECL_CONTEXT to the current_namespace.
6512 (start_decl): A namespace is not considered as a context here. If
6513 the DECL_CONTEXT is a namespace, push the decl.
6514 (cp_finish_decl): Check for namespaces used as initializers.
6515 (grokfndecl): Add namespace parameter. Remove processing of
6516 DECL_CHAIN.
6517 (grokvardecl): Add namespace parameter.
6518 (grokdeclarator): Process SCOPEs that are namespaces. For
6519 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
6520 (start_function): Check for contexts that are namespaces.
6521 Set context for declarations that have not been pushed.
6522 (store_parm_decls): Check for ::main only.
6523 (finish_function): Likewise.
6524 (start_method): Check for contexts that are namespaces.
6525 (start_method): Remove DECL_CHAIN processing.
6526 * decl2.c (flag_honor_std): Declare.
6527 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
6528 (decl_namespace_list): New static global.
6529 (grok_x_components): Ignore namespaces as type contexts.
6530 (check_classfn): Expect OVERLOAD nodes.
6531 (grokfield): Remove DECL_CHAIN processing.
6532 (finish_file): Call cat_namespace_levels.
6533 (merge_functions): New function.
6534 (ambiguous_decl): Rewrite.
6535 (lookup_using_namespace): Produce tree_bindings.
6536 (qualified_lookup_using_namespace): Likewise.
6537 (set_decl_namespace, decl_namespace, current_decl_namespace,
6538 push_decl_namespace, pop_decl_namespace): New functions.
6539 (arg_lookup): New struct.
6540 (add_function, arg_assoc_namespace, arg_assoc_class,
6541 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
6542 New functions.
6543 (get_namespace_id, current_namespace_id): Remove.
6544 (do_toplevel_using_decl): Rewrite.
6545 (do_class_using_decl): Complain about namespace qualifiers.
6546 (do_using_directive): Sorry if not on namespace level. Complain
6547 about unknown namespaces.
6548 * error.c (dump_aggr_type): Check for namespace contexts.
6549 * except.c (init_exception_processing): Push terminate into std.
6550 * friend.c (is_friend): A namespace is not a context, here.
6551 * init.c (expand_member_init): Remove DECL_CHAIN processing.
6552 (build_offset_ref): Process OVERLOAD nodes.
6553 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
6554 * lex.c (identifier_type): Loop using OVL_CHAIN.
6555 (see_typename): Set looking_for_typename to 2.
6556 (real_yylex): Likewise.
6557 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
6558 (do_scoped_id): Expect OVERLOAD nodes.
6559 Change calling convention for qualified_lookup_using_namespace.
6560 (build_lang_decl): Don't set in_namespace anymore.
6561 * method.c (typevec_size): New global.
6562 (build_overload_nested_name): Return if global_namespace.
6563 Otherwise, always expect a declaration context.
6564 (build_qualified_name): Likewise.
6565 Make sure we don't write beyond typevec_size.
6566 (build_decl_overload_real): Likewise.
6567 Allocate one extra slot for the namespace.
6568 (hack_identifier): Mark code dead.
6569 Process OVERLOAD and NAMESPACE_DECL nodes.
6570 * parse.y (program): Pop namespaces until in global namespace.
6571 (extdef): In a using-declaration, don't discard the identifier if
6572 there is no declaration.
6573 (left_curly): Ignore type contexts which are namespaces.
6574 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
6575 used as scope.
6576 * pt.c (template_class_depth): Expect types to be namespaces.
6577 (determine_specialization): Simplify by expecting OVERLOAD nodes.
6578 (push_template_decl): Push into namespace level.
6579 Reset ctx if it is a namespace.
6580 Set DECL_CONTEXT to current_namespace if not set already.
6581 Ignore real contexts that are namespaces.
6582 (mangle_class_name_for_template): Skip global_namespace.
6583 Mangle other namespaces as declarations.
6584 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
6585 (lookup_template_class): Push into namespace of context.
6586 If the context is a namespace, set it to global_namespace.
6587 Use id_context for mangling.
6588 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
6589 (tsubst_friend_function): Ignore namespace contexts.
6590 Push into namespace level.
6591 (tsubst): Handle NAMESPACE_DECL nodes.
6592 Remove DECL_CHAIN processing.
6593 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
6594 * ptree.c (print_lang_identifier): Print bindings.
6595 (lang_print_xnode): Print OVERLOAD nodes.
6596 * rtti.c (init_rtti_processing): Push type_info into std.
6597 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
6598 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
6599 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
6600 lookup_fnfields_here): Likewise.
6601 Process all nodes, instead of going through TREE_CHAIN.
6602 * sig.c (build_signature_pointer_or_reference_type): Set context
6603 to global_namespace.
6604 (build_signature_table_constructor): Expect OVERLOAD nodes.
6605 * spew.c (yylex): Save old setting of looking_for_typename.
6606 * tree.c (decl_list_length): Remove.
6607 (binding_init): New function.
6608 (count_functions): Rewrite.
6609 (is_overloaded_fn): Expect OVERLOAD nodes.
6610 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
6611 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
6612 ovl_member): New functions.
6613 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
6614 (type_unknown_p): Likewise.
6615 (require_instantiated_type): Likewise.
6616 (build_component_ref): Declare code dead.
6617 (build_x_function_call): Create and expect OVERLOAD nodes.
6618 (build_function_call_real): Check for ::main only.
6619 (build_unary_op): Likewise. Expect OVERLOAD nodes.
6620 (convert_for_assignment): Check for TREE_LIST before accessing
6621 TREE_VALUE.
6622 * decl.c (duplicate_decls): Check for namespace bindings instead
6623 of global bindings.
6624 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
6625 lookup_name_current_level, start_decl, xref_tag,
6626 finish_enum): Likewise.
6627 * init.c (build_offset_ref): Likewise.
6628 * search.c (lookup_field): Likewise.
6629 (lookup_fnfields): Likewise.
6630 (dfs_debug_mark): Likewise.
6631 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
6632 (poplevel_class, pop_from_top_level): Likewise.
6633 * decl2.c (finish_method): Likewise.
6634 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
6635 * decl.c (record_builtin_type): Likewise.
6636 (init_decl_processing, grokfndecl): Likewise.
6637 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
6638 (make_lang_type): Likewise.
6639 * parse.y (make_thunk): Likewise.
6640 * pt.c (tsubst): Likewise.
6641 * tree.c (debug_binfo): Likewise.
6642 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
6643 tinfo2.cc, inc/new.h: Add std qualifications.
6644 * inc/new: Wrap with namespace std if __HONOR_STD.
6645 * inc/typeinfo: Likewise.
6646
6647 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
6648
6649 * call.c (build_user_type_conversion_1): Handle second_conv
6650 properly for templates.
6651
6652 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
6653
6654 * method.c (build_decl_overload_real): Set TREE_USED flag to
6655 zero for build_type_variants nodes as well.
6656
6657 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
6658
6659 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
6660
6661 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
6662
6663 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
6664 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
6665 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
6666 xref.o): Add toplev.h dependencies.
6667
6668 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
6669
6670 * errfn.c (cp_error, cp_warning): Remove declarations for
6671 error and warning respectively.
6672
6673 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6674
6675 * error.c: Convert to using ctype macros defined in system.h.
6676 * method.c: Likewise.
6677 * xref.c: Likewise.
6678 * lex.c: Likewise. Also remove redundant system header stuff.
6679
6680 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
6681
6682 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
6683 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
6684 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
6685 xref.c: Add include of toplev.h.
6686
6687 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
6688
6689 * tree.c (perm_manip): Also regenerate the RTL of an extern.
6690 (copy_to_permanent): Use end_temporary_allocation.
6691
6692 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
6693
6694 * init.c (expand_vec_init): The initialization of each array
6695 element is a full-expression.
6696
6697 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
6698
6699 * method.c (build_mangled_name): Add a call to build_type_variant
6700 to get the right type.
6701
6702 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
6703
6704 * Makefile.in: Add .SUFFIXES.
6705
6706 * cp-tree.def: Remove NAMESPACE_DECL.
6707
6708 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
6709
6710 * call.c (build_over_call): Do evaluate arg even if it has empty
6711 class type.
6712 * decl.c (start_function): Don't push a member function.
6713
6714 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
6715
6716 * Makefile.in (g++FAQ.info): Put -o option before input file.
6717
6718 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
6719
6720 * gxxint.texi: Add info for squangling codes K and B.
6721
6722 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
6723
6724 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
6725 the expression in templates.
6726 (finish_stmt_expr): Likewise.
6727
6728 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
6729
6730 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
6731
6732 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
6733
6734 * decl.c (maybe_push_to_top_level): Always clear
6735 current_template_parms and processing_template_decl.
6736 (pushtag): Remove check of current_class_type and some comments,
6737 since maybe_push_to_top_level no longer creates confusion.
6738
6739 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
6740
6741 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
6742 (DECL_CLASS_TEMPLATE_P): Likewise.
6743 (DECL_PRIMARY_TEMPLATE): Likewise.
6744 (PRIMARY_TEMPLATE_P): Use it.
6745 (push_template_decl_real): New function.
6746 (redeclare_class_template): Take new template parameters as
6747 input.
6748 (is_specialization_of): New function.
6749 (comp_template_args): Declare.
6750 * decl.c (pushtag): Handle friend template classes.
6751 (xref_tag): Likewise. Use new calling convention for
6752 redeclare_class_template.
6753 * decl2.c (grok_x_components): Handle friend templates.
6754 * friend.c (is_friend): Use is_specialization_of where
6755 appropriate. Deal with friend class templates.
6756 (make_friend_class): Let a class template be friends with itself.
6757 * pt.c (comp_template_args): Remove declaration.
6758 (tsubst_friend_class): New function.
6759 (push_template_decl_real): New function.
6760 (push_template_decl): Use it.
6761 (redeclare_class_template): Adjust for new calling convention.
6762 (comp_template_args): Give it external linkage.
6763 (instantiate_class_type): Use tsubst_friend_class to deal
6764 with friend templates.
6765 * typeck.c (comptypes): Use comp_template_args, rather than
6766 expanding it inline.
6767 * parse.y (component_decl): Handle a nested template type
6768 like other component type declarations.
6769
6770 * pt.c (check_explicit_specialization): Handle overloaded
6771 constructors correctly.
6772
6773 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
6774 (lookup_template_class): Use it.
6775
6776 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
6777
6778 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
6779 * cp-tree.h: Add WRAPPER support.
6780 * call.c (add_candidate): Split out from add_*_candidate fns.
6781 (build_over_call): Take the candidate instead of function and args.
6782 Enforce access control here. Emit overload warnings here.
6783 (add_warning): New fn.
6784 (joust): Add WARN parm. If not set, call add_warning instead of
6785 printing a warning. Re-enable some warnings.
6786 (tourney): Pass it.
6787 (convert_like): Adjust.
6788 (build_new_op): Adjust.
6789 (build_new_function_call): Adjust.
6790 (build_user_type_conversion_1): Adjust.
6791 (USER_CONV_FN): Adjust.
6792 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
6793 build_int_wrapper): New fns.
6794
6795 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
6796
6797 * pt.c (unify): Fix typo in previous change.
6798
6799 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
6800
6801 * error.c (dump_type_real): Declare canonical_name.
6802
6803 * typeck.c (comp_target_types): Fix PMFs.
6804
6805 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
6806
6807 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
6808 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
6809 TEMPLATE_DECL.
6810
6811 * pt.c (tsubst): Decrease the template-level of
6812 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
6813 TEMPLATE_PARM_INDEX.
6814 (template_decl_level): New function.
6815 (unify): Make sure to record unifications for template
6816 parameters, even when the parameters exactly match the arguments.
6817 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
6818 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
6819 aren't from the level we're currently working on.
6820
6821 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
6822
6823 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
6824
6825 * decl2.c (check_member_template): Set DECL_IGNORED for member
6826 class templates, too.
6827
6828 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
6829
6830 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
6831
6832 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
6833
6834 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
6835
6836 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
6837 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
6838 (init_decl_processing): Handle TI types.
6839 * typeck.c (unsigned_type, signed_type): Handle TI types.
6840
6841 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
6842
6843 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
6844 New local added_libraries. Increment count when add library to
6845 arglist.
6846
6847 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
6848
6849 * cp-tree.h (type_as_string_real): New function.
6850 * pt.c (mangle_class_name_for_template): Use it.
6851 * error.c (dump_aggr_type): Change prototype.
6852 (dump_type_prefix): Likewise.
6853 (dump_type_suffix): Likewise.
6854 (dump_type_real): Convert from dump_type. If desired, the
6855 "canonica" name of a typedef, i.e., the name of the underlying
6856 type, can be printed.
6857 (dump_type): Call dump_type_real.
6858
6859 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
6860
6861 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
6862
6863 * typeck.c (comp_target_types): Tweak pedantic case.
6864 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
6865 Return -1 or 1 instead of 1 or 2.
6866 (compparms): Remove STRICT handling.
6867 (convert_for_assignment): Fix handling of pmfs.
6868
6869 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
6870
6871 * typeck.c (comp_target_types): Handle references like pointers.
6872 (comp_target_parms): Note that return code from comp_target_types
6873 can be negative to indicate failure.
6874
6875 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6876
6877 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
6878 which requires a working target compiler to build.
6879
6880 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
6881
6882 * tree.c (avoid_overlap): Add prototype.
6883
6884 * spew.c (num_tokens): Add prototype.
6885 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
6886
6887 * search.c (dfs_check_overlap): Add prototype.
6888 (dfs_no_overlap_yet): Likewise.
6889
6890 * pt.c (original_template): Add prototype.
6891 (inline_needs_template_parms): Likewise.
6892 (push_inline_template_parms_recursive): Likewise.
6893 (retrieve_specialization, register_specialization): Likewise.
6894 (print_candidates, reduce_template_parm_level): Likewise.
6895 (build_template_decl, mark_template_parm): Likewise.
6896 (tsubst_friend_function, get_bindings_real): Likewise.
6897
6898 * method.c (start_squangling): Add prototype.
6899 (end_squangling, check_ktype, issue_ktype): Likewise.
6900 (build_overloaded_scope_ref, check_btype): Likewise.
6901 (build_mangled_template_parm_index): Likewise.
6902
6903 * lex.c (init_cpp_parse): Add prototype.
6904 (handle_cp_pragma, handle_sysv_pragma): Likewise.
6905 (reduce_cmp, token_cmp): Likewise.
6906
6907 * except.c (call_eh_info): Add prototype.
6908 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
6909 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
6910
6911 * decl2.c (is_namespace_ancestor): Add prototype.
6912 (namespace_ancestor, add_using_namespace): Likewise.
6913 (ambiguous_decl): Likewise.
6914
6915 * decl.c (indent): Add prototype.
6916
6917 * call.c (add_template_candidate_real): Add prototype.
6918
6919 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
6920
6921 * decl2.c (build_expr_from_tree): Just return a PMF.
6922
6923 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
6924
6925 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
6926 when doing initializations.
6927
6928 * pt.c (unify): Use comptypes to compare type args.
6929
6930 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
6931
6932 * decl.c (duplicate_decls): Fix check for when it's safe to free
6933 the new decl.
6934
6935 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
6936 to type_as_string.
6937
6938 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
6939
6940 * pt.c (build_template_parm_index): Add prototype.
6941
6942 * search.c (my_tree_cons): Don't clear words outside the
6943 newly allocated node.
6944
6945 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
6946
6947 * lex.c (init_parse): Now returns char* containing the filename.
6948
6949 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
6950 Jeff Law <law@cygnus.com>
6951
6952 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
6953 than a pointer.
6954
6955 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6956
6957 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
6958
6959 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
6960
6961 * decl.c (duplicate_decls): Don't warn for redundant decls if
6962 friend: let add_friend take care of it.
6963
6964 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
6965
6966 * sig.c (build_signature_pointer_constructor): Don't set
6967 TREE_HAS_CONSTRUCTOR for a signature pointer.
6968 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
6969 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
6970 here, too.
6971 * typeck.c (build_unary_op): Only allow taking the address of a
6972 real constructor.
6973 * typeck2.c (digest_init): Simplify.
6974 (store_init_value): Don't pedwarn about using { } for pmfs.
6975
6976 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
6977
6978 * cp-tree.h (start_decl): Update prototype.
6979 * decl.c (start_decl): Like the C version, new parameters
6980 for the attributes. Call cplus_decl_attributes here,
6981 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
6982 (grokdeclarator): Pass NULL for new start_decl arguments.
6983 * pt.c (tsubst_expr): Likewise.
6984 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
6985 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
6986 * lex.c (build_lang_decl): Add lang_name_java.
6987 * class.c (push_lang_context): Add lang_name_java.
6988 * method.c (build_mangled_name): Check for is_java_type.
6989
6990 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
6991
6992 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
6993 * call.c (build_scoped_method_call): Check for TREE_CODE for
6994 VOID_TYPE instead of type == void_type_node.
6995 (build_method_call): Likewise.
6996 * decl.c (lookup_name_real): Likewise.
6997 (grokdeclarator): Likewise.
6998 (start_decl): Likewise.
6999 (grokparms): Likewise.
7000 (start_function): Likewise.
7001 (finish_function): Likewise.
7002 (start_method): Likewise.
7003
7004 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
7005
7006 * lex.c (finput): New variable.
7007 (init_cpp_parse): Renamed from init_parse.
7008 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
7009 (finish_parse): New function.
7010 * cp-tree.h (init_lex, init_parse): Remove declarations.
7011
7012 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
7013
7014 * call.c (build_call): Still evaluate the actual argument.
7015 * class.c (is_empty_class): Update for -fnew-abi.
7016
7017 * decl2.c: -fnew-abi implies -fsquangle.
7018
7019 * method.c (do_build_assign_ref): Don't do anything to copy
7020 an empty class.
7021 (do_build_copy_constructor): Likewise.
7022 * call.c (build_over_call): Likewise.
7023
7024 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
7025
7026 * tree.c (avoid_overlap): Return a value.
7027
7028 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
7029
7030 * method.c (check_btype): Add missing argument to xrealloc.
7031 (check_ktype): Likewise.
7032
7033 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
7034
7035 Implement empty base optimization.
7036 * class.c (finish_struct_1): Add vbase fields earlier. Set
7037 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
7038 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
7039 (types_overlap_p): New fn.
7040 * tree.c (avoid_overlap): New fn.
7041 (build_base_fields): Use it to avoid overlapping empty bases.
7042 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
7043
7044 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
7045
7046 Re-implement allocation of base class subobjects.
7047 * tree.c (unshare_base_binfos): New fn.
7048 (layout_basetypes): Use it. Now handles offsets of both virtual and
7049 non-virtual bases, after layout_type.
7050 (layout_vbasetypes): Remove.
7051 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
7052 (build_vbase_pointer_fields): Split out from old layout_basetypes.
7053 * class.c (finish_base_struct): Lose offset handling code.
7054 Move nonvdtor warning here. Don't mess with t_binfo anymore.
7055 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
7056 * cp-tree.h: Adjust.
7057
7058 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
7059
7060 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
7061 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
7062 * class.c (duplicate_tag_error): Likewise.
7063 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
7064 * tree.c (layout_vbasetypes): Update from layout_record, remove
7065 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
7066 (layout_basetypes): Likewise.
7067
7068 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
7069
7070 * class.c, Make sure system.h is included just after config.h.
7071 Delete lingering stdio and errno references too.
7072 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
7073
7074 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
7075
7076 * friend.c (is_friend): Fix access control for local classes.
7077
7078 * class.c (is_empty_class): New fn.
7079 * call.c (build_call): Don't pass empty class objects to a function.
7080
7081 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
7082
7083 * call.c (build_over_call): Do name resolution for default
7084 arguments of function templates in the scope of the templates.
7085
7086 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
7087
7088 * call.c: Include system.h. Remove includes, declarations and
7089 defines provided by system.h.
7090 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
7091 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
7092 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
7093 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
7094 * typeck2.c, xref.c: Likewise.
7095 * Makefile.in: Dependencies updated as appropriate.
7096 * Make-lang.in: Likewise.
7097
7098 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
7099
7100 * pt.c (fn_type_unification): Allow incomplete unification without
7101 an immediate error message.
7102
7103 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
7104
7105 * tree.c (member_p): New fn.
7106 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
7107 initializing class members.
7108
7109 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
7110 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
7111
7112 * call.c (build_method_call): Handle non-scoped destructors, too.
7113 * pt.c (tsubst_copy): Likewise.
7114
7115 * pt.c (print_template_context): Split out...
7116 (push_tinst_level): ...from here.
7117
7118 * friend.c (is_friend): Don't pass a type to decl_function_context.
7119
7120 * typeck.c (convert_for_initialization): Always hand off
7121 conversions to class type.
7122
7123 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
7124
7125 * friend.c (is_friend): Local classes have the same access as the
7126 enclosing function.
7127
7128 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
7129
7130 * typeck.c (expand_target_expr): Delete dead function.
7131
7132 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
7133
7134 * repo.c (save_string): Delete dead function.
7135
7136 * method.c (thunk_printable_name): Delete dead function.
7137
7138 * lex.c (yynextch): Delete dead function.
7139
7140 * expr.c (tree_extract_aggr_init): #if 0 out.
7141
7142 * except.c (do_unwind): Delete dead function.
7143 (easy_expand_asm): Likewise.
7144
7145 * cvt.c (build_conversion_type_1): Delete dead function.
7146
7147 * cp-tree.h (push_expression_obstack): Declare.
7148
7149 * call.c (source_type): #if 0 out.
7150
7151 * class.c (alter_access): Remove unused label. Add braces
7152 around empty else clause.
7153
7154 * lex.c (yyprint): Fix argument to printf.
7155
7156 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
7157
7158 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
7159
7160 * pt.c (instantiate_class_template): Make sure template
7161 arguments are permanent.
7162 * init.c (resolve_offset_ref): Don't go looking around in
7163 template types.
7164
7165 * semantics.c: Add routines to handle expressions, and some
7166 declaration processing.
7167 * parse.y: Use them.
7168 (current_class_depth): Move declaration to cp-tree.h.
7169 * parse.c: Regenerated.
7170 * cp-tree.h: Use them.
7171 (current_class_depth): Declare.
7172 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
7173
7174 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
7175
7176 * error.c (dump_decl): Be a bit more explicit with template
7177 type arguments, when verbose.
7178
7179 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
7180
7181 * inc/exception: Reorder closing braces.
7182
7183 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
7184
7185 * pt.c (redeclare_class_template): New function.
7186 * cp_tree.h (redeclare_class_template): Declare it.
7187 * decl.c (xref_tag): Use it.
7188
7189 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
7190
7191 * call.c (build_over_call): Check IS_AGGR_TYPE, not
7192 TYPE_LANG_SPECIFIC.
7193 * typeck.c (convert_arguments): Likewise.
7194
7195 * decl.c (grokdeclarator): Remove const and volatile from type after
7196 setting constp and volatilep.
7197
7198 * class.c (finish_struct_1): Don't warn about bool bitfield larger
7199 than one bit.
7200
7201 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
7202
7203 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
7204
7205 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
7206
7207 * call.c (build_object_call): Complain about ambiguous operator(),
7208 rather that crashing.
7209 (build_new_op): Likewise.
7210 (build_op_delete_call): Likewise.
7211
7212 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
7213
7214 * cvt.c (perform_qualification_conversions): Use comp_target_types
7215 instead of comp_ptr_ttypes.
7216
7217 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
7218
7219 * cp-tree.h (enforce_access): Declare.
7220 * call.c (enforce_access): Make it extern, not static.
7221 * class.c (alter_access): Use enforce_access; modify code for ISO
7222 compliance, rather than ARM rules.
7223
7224 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7225
7226 * cp-tree.h: Fix typo.
7227
7228 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
7229
7230 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
7231 if (aggregate_value_p (type)).
7232
7233 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
7234
7235 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
7236
7237 * tree.c (mapcar): When dealing with a DECL, use it's constant
7238 value, if any.
7239 * pt.c (lookup_template_class): Don't mangle the names of template
7240 classes whose arguments are unknown.
7241
7242 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
7243
7244 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
7245
7246 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
7247
7248 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
7249
7250 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
7251 boolean_type_node to 1.
7252
7253 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
7254
7255 * error.c (dump_expr): Remove unused variable `l'.
7256
7257 * pt.c (for_each_template_parm): New function, created by
7258 converting uses_template_parms.
7259 (tree_fn_t): New typedef.
7260 (uses_template_parms): Use it.
7261 (mark_template_parm): New function.
7262 (push_template_decl): Check that the argument list of a partial
7263 specialization uses all the template parameters.
7264
7265 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
7266 with it; we might want it for debugging.
7267 * cp-tree.h (type_unification): Change interface.
7268 * class.c (finish_struct_1): Skip nested template types, just like
7269 ordinary nested types.
7270 (instantiate_type): Use new interface to type_unification.
7271 * lex.c (init_lex): Add __sz as opname for sizeof.
7272 * method.c (build_overload_scope_ref): New function.
7273 (build_overload_int): Handle complex expressions. Set
7274 numeric_output_need_bar if necessary.
7275 (build_overload_value): Handle non-PARM_DECL nodes; this
7276 routine is now used by build_overload_int. Remove some
7277 assignments to numeric_output_need_bar. Use
7278 build_overload_scope_ref.
7279 (build_qualified_name): Note that some template mangled names end
7280 with digits, and set numeric_output_need_bar appropriately. Use
7281 build_underscore_int.
7282 * pt.c (unify): Change interface.
7283 (type_unification_real): Likewise.
7284 (determine_specialization): Use new interfaces.
7285 (tsubst): Deal gracefully with situations in which the argument
7286 vector is not fully filled.
7287 (fn_type_unification): Use new interfaces.
7288 (type_unification): Likewise. Remove NOP_EXPR hack.
7289 (type_unification_real): Likewise.
7290 (unify): Likewise. Deal with unification of complex expressions.
7291
7292 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
7293
7294 * pt.c (complete_template_args): Initialize skip properly.
7295
7296 * decl.c (make_typename_type): Revert.
7297 (make_implicit_typename): Remove.
7298 (lookup_name_real): Don't call it. Call lookup_field if we see a
7299 TYPE_DECL from a template base.
7300 * search.c (lookup_field): Do implicit typename stuff.
7301
7302 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
7303 Geoff Noer <noer@cygnus.com>
7304
7305 * Makefile.in: Various fixes for building cygwin32 native toolchains.
7306 * Make-lang.in: Likewise.
7307
7308 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7309
7310 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
7311
7312 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
7313
7314 * decl.c (make_implicit_typename): Rewrite removed code.
7315 (make_typename_type): Call it if the type we look up comes from
7316 a base that uses template parms.
7317
7318 * pt.c (complete_template_args): Rewrite.
7319 (tsubst, FUNCTION_DECL): Use it.
7320
7321 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
7322
7323 * semantics.c (finish_asm_stmt): Fix combine strings. Call
7324 c_expand_asm_operands () if output_operands, input_operands or
7325 clobbers is not NULL_TREE.
7326
7327 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7328
7329 * pt.c (complete_template_args): New function.
7330 (get_bindings): Deal with specializations of function templates
7331 with return type containing parameters from outer class
7332 templates.
7333 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
7334 substitute arguments and compose a new type.
7335
7336 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
7337
7338 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
7339 FUNCTION_DECLs.
7340
7341 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
7342
7343 * decl.c (make_implicit_typename): Lose useless code.
7344
7345 * call.c (standard_conversion): Handle A* -> const A* properly.
7346
7347 * pt.c (get_bindings_real): Rename from get_bindings. Add
7348 check_rettype parm.
7349 (get_bindings): Pass 1.
7350 (get_bindings_overload): Pass 0.
7351
7352 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
7353
7354 * pt.c (check_explicit_specialization): When reverting a static
7355 member function, also remove the `this' parameter from
7356 last_function_parms.
7357
7358 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
7359
7360 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
7361 a function context.
7362
7363 * decl.c (store_bindings): Use free_binding_vecs.
7364 (pop_from_top_level): Likewise.
7365
7366 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
7367
7368 * decl.c (make_implicit_typename): Only change the type of a
7369 TYPENAME_TYPE.
7370
7371 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
7372
7373 * semantics.c: New file, containing routines to perform the
7374 semantic phase of parsing.
7375 * parse.y: Use it.
7376 * pt.c (tsubst_expr): Likewise.
7377 * cp-tree.h: Declare the various functions in semantics.c.
7378 Provide macros to access _STMT tree nodes.
7379 * cp-tree.def: Add ASM_STMT tree node.
7380 * Makefile.in, Make-lang.in: Add dependencies on and for
7381 semantics.c.
7382
7383 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
7384
7385 * pt.c (push_template_decl): Only check primary templates.
7386
7387 * pt.c (check_explicit_specialization): Complain about default args
7388 in explicit specialization.
7389
7390 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
7391 constructor_declarator.
7392
7393 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
7394
7395 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
7396 has no overloaded operator ->.
7397
7398 * call.c (build_field_call): Don't crash when presented with a
7399 field that is actually a nested type.
7400
7401 * decl.c (pushtag): Deal with friend class injection in local
7402 classes.
7403
7404 * call.c (build_object_call): Don't crash if OBJ is a
7405 pointer-to-member-function.
7406
7407 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
7408
7409 * pt.c (push_template_decl): Complain about template with C linkage,
7410 anonymous template class.
7411
7412 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
7413
7414 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
7415 * search.c: Likewise.
7416
7417 * lex.c (do_pending_defargs): Only call
7418 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
7419
7420 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
7421
7422 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
7423
7424 * parse.y: Deal with CONSTRUCTORS in new_initializers.
7425
7426 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
7427
7428 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
7429 closely mimics the behavior in parse.y.
7430 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
7431 into a compound statement.
7432
7433 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
7434
7435 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
7436 * pt.c (inline_needs_template_parms): New fn.
7437 (original_template): New fn.
7438 (push_inline_template_parms_recursive): New fn.
7439 (maybe_begin_member_template_processing): Use them.
7440 (maybe_end_member_template_processing): Likewise.
7441 (is_member_or_friend_template): Rename to is_member_template.
7442 Member functions of local classes are never member templates.
7443
7444 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7445
7446 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
7447 added in the class scope to catch redefinition error.
7448
7449 * pt.c (reduce_template_parm_level): Also copy
7450 the DECL_TEMPLATE_PARMS field.
7451
7452 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
7453
7454 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
7455 reduced-level template type parameter.
7456
7457 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
7458
7459 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
7460 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
7461 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
7462 * decl.c (duplicate_decls): Propagate it.
7463 * typeck2.c (abstract_virtuals_error): Use two loops to emit
7464 abstract virtual functions and virtual functions which need a
7465 final overrider separately.
7466
7467 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
7468
7469 * lang-specs.h: Properly put brackets around array elements in
7470 initializer.
7471
7472 * typeck.c (build_binary_op_nodefault): Correctly place parens around
7473 && and || in expression.
7474
7475 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
7476
7477 * call.c (default_parm_conversions): Remove prototype definition.
7478 (build_method_call): Remove unused variable result.
7479
7480 * cvt.c (ocp_convert): Remove unused variable conversion.
7481
7482 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
7483
7484 * except.c (do_unwind): #if 0 definition of unused variables fcall
7485 and next_pc.
7486
7487 * expr.c (extract_scalar_init): #if 0 prototype and function
7488 definition.
7489
7490 * init.c (expand_aggr_init_1): Remove unused variable init_type.
7491 (build_new_1): Remove unused variable t.
7492
7493 * pt.c (instantiate_class_template): Remove unused variable newtag;
7494 cast called function return value to void.
7495 (do_decl_instantiation): Remove unused variables name and fn.
7496
7497 * tree.c (get_type_decl): Add default return to shut up compiler from
7498 complaining control reaches end of non-void function.
7499
7500 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
7501
7502 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
7503
7504 * call.c (default_parm_conversions): Remove prototype definition.
7505 (build_method_call): Remove unused variable result.
7506 (build_over_call): Add default case in enumeration switch.
7507
7508 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
7509
7510 * decl2.c (lang_decode_option): Change j's type to size_t.
7511
7512 * tree.c (layout_vbasetypes): record_align and desired_align are of
7513 type unsigned int; const_size and nonvirtual_const_size likewise.
7514
7515 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
7516
7517 * parse.y (new_initializer): Make sure all initializers are
7518 lists.
7519
7520 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
7521
7522 * decl2.c (import_export_decl): Mark tinfo functions for
7523 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
7524
7525 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
7526
7527 * method.c: Fix typo.
7528
7529 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7530
7531 * method.c: Include "system.h" to get stdlib.h, stdio.h,
7532 ctype.h, string.h, etc.
7533 (issue_nrepeats): Add default case in enumeration switch.
7534 (check_btype): Likewise.
7535 (process_overload_item): Likewise.
7536
7537 * Makefile.in (method.o): Depend on system.h.
7538
7539 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
7540
7541 * lex.c (do_scoped_id): Fix parenthesizing.
7542
7543 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
7544
7545 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
7546 FLAG_RTTI is unset, initialize type info machinery and continue
7547 with FLAG_RTTI enabled.
7548 (get_typeid): Likewise.
7549
7550 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
7551
7552 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
7553 from B.
7554
7555 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
7556
7557 * pt.c (finish_member_template_decl): Deal more gracefully with
7558 invalid declarations.
7559
7560 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
7561
7562 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
7563 cp-tree.h: Clean up more old overloading code, old RTTI code, and
7564 some formatting quirks.
7565
7566 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
7567 method.c, pt.c, ptree.c, typeck.c: Remove support for
7568 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
7569 * class.h: Remove.
7570 * Makefile.in: Adjust.
7571
7572 * pt.c (unify): Don't allow reduced cv-quals when strict.
7573
7574 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
7575 *type_unification* and unify.
7576
7577 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
7578
7579 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
7580 (nested_name_specifier): And add it before this use.
7581 (typename_sub0): And this use. Also add use without the keyword.
7582 (typename_sub1): Likewise.
7583 * pt.c (instantiate_class_template): Don't actually instantiate
7584 anything if our type uses template parms.
7585
7586 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
7587
7588 * decl.c (start_function): Don't call temporary_allocation for a
7589 nested function.
7590
7591 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
7592
7593 * pt.c (instantiate_class_template): Don't mess with friends if
7594 our type uses template parms.
7595
7596 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
7597
7598 * parse.y (nested_name_specifier): Use explicit_template_type.
7599 (typename_sub): Allow a template_type, an explicit_template_type,
7600 or an implicit template type at the end.
7601 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
7602 * decl.c (make_typename_type): Handle template-id where the name
7603 is a TEMPLATE_DECL.
7604 * call.c (build_scoped_method_call): Handle member template
7605 destructor call.
7606 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
7607 destructor is represented by the type.
7608
7609 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
7610 * parse.y (nested_name_specifier): Add 'template' case.
7611 (explicit_template_type): New rule.
7612 (typename_sub): Use it.
7613 * decl.c (make_typename_type): Handle getting a template-id for NAME.
7614 * pt.c (tsubst): Likewise.
7615
7616 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
7617
7618 * pt.c (add_to_template_args): Fix thinko.
7619 (instantiate_class_template): Call it later.
7620
7621 * pt.c (get_class_bindings): Add outer_args parm.
7622 (most_specialized_class): Likewise.
7623 (instantiate_class_template): Pass it.
7624 (more_specialized_class): Likewise.
7625 (lookup_template_class): Get context from template if none
7626 was specified.
7627 (finish_member_template_decl): Don't do anything with a
7628 partial specialization.
7629 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
7630 AGGREGATE_TYPE_P.
7631 * class.c (finish_struct): Member class templates have already been
7632 checked for name clashes.
7633 * decl.c (pushdecl_with_scope): Handle pushing at class level.
7634
7635 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
7636
7637 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
7638 (tsubst, *_PARM): Support multiple levels of template classes.
7639 (instantiate_class_template): Look up the pattern from the
7640 original template.
7641 (lookup_template_class): Handle getting a template for d1.
7642 (push_template_decl): Correct setting of 'primary'.
7643 (reduce_template_parm_level): Add 'levels' parm.
7644 (finish_member_template_decl): Support member class templates.
7645 (template_class_depth): Handle multiple levels.
7646 * parse.y (component_decl_1, fn.def2): Remove member template case.
7647 (component_decl): Add member template cases.
7648 * decl2.c (check_member_template): We now handle member template
7649 classes.
7650 * decl.c (pushtag): Handle member templates.
7651 * method.c (do_inline_function_hair): Don't touch
7652 IDENTIFIER_GLOBAL_VALUE.
7653 * init.c (build_offset_ref): If name isn't an identifier, just
7654 return it.
7655 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
7656
7657 * typeck.c (get_delta_difference): Do adjust for conversions to
7658 and from virtual base.
7659
7660 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
7661
7662 * typeck.c (get_delta_difference): Give hard error for conversion
7663 from virtual base.
7664
7665 * cp-tree.h: Tweak formatting.
7666
7667 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
7668
7669 * decl.c (push_namespace): Handle redeclaration error.
7670
7671 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
7672 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
7673 (NAMESPACE_BINDING): New macro.
7674 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
7675 * *.c: Use them.
7676
7677 * pt.c (push_template_decl): Use innermost_args.
7678
7679 * decl.c (get_unique_name): Tweak from earlier in the name.
7680
7681 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
7682
7683 * cp-tree.def: Add CPLUS_BINDING node.
7684 * cp-tree.h (tree_binding): New struct.
7685 (BINDING_SCOPE, BINDING_VALUE): New macros.
7686 (current_namespace, global_namespace): Declare extern.
7687 (struct lang_decl_flags): New field in_namespace.
7688 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
7689 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
7690 (TREE_INDIRECT_USING): New macro.
7691 * decl2.c (current_namespace, global_namespace): Declare. The
7692 value is a NAMESPACE_DECL now, not a TREE_LIST.
7693 (is_namespace_ancestor, namespace_ancestor): New static functions.
7694 (add_using_namespace, ambiguous_decl): Likewise.
7695 (lookup_using_namespace): New support function for lookup_name.
7696 (qualified_lookup_using_namespace): New support function for
7697 do_scoped_id and lookup_namespace_name.
7698 (get_namespace_id): Mark as obsolete.
7699 (current_namespace_id): Likewise.
7700 (do_namespace_alias): Implement.
7701 (do_using_directive): Implement as call to add_using_namespace.
7702 * decl.c (binding_for_name): New function.
7703 (push_namespace, pop_namespace): Implement.
7704 (push_decl): Don't install a FUNCTION_DECL in the global branch.
7705 (lookup_namespace_name): Implement using qualified lookup.
7706 (lookup_name_real): For global scoping, lookup in
7707 global_namespace. For namespace scoping, lookup in given
7708 namespace. For unscoped lookup, iterate over namespace,
7709 considering using directives.
7710 (init_decl_processing): Initialize global_namespace.
7711 (grokvardecl): Build assembler name as static name for globals.
7712 (grokdeclarator): Remove old namespace mangling.
7713 (xref_tag): When installing a global binding for the
7714 tag, make sure we have an identifier.
7715 * method.c (build_overload_nested_name): Mangle namespaces.
7716 (build_qualified_name): Likewise.
7717 (build_decl_overload_real): Likewise.
7718 * lex.c (build_lang_decl): Set namespace for new declaration to
7719 current_namespace.
7720 (do_scoped_id): Find global names in global or current
7721 namespace, or using qualified namespace lookup, depending on
7722 context.
7723 * init.c (build_member_call): When scope is namespace, use
7724 build_x_function_call instead.
7725 (build_offset_ref): When scope is namespace, collapse processing
7726 to lookup_namespace_name instead.
7727 * error.c (dump_decl): Support NAMESPACE_DECL.
7728 * decl.c (pushdecl): Bind globals to current namespace.
7729 (push_overloaded_decl): Likewise.
7730 (lookup_tag): Likewise.
7731 (lookup_name_current_level): Likewise.
7732 (xref_tag): Likewise.
7733 (start_function): Likewise.
7734 * lex.c (do_identifier): Likewise.
7735 (identifier_typedecl_value): Likewise.
7736 (real_yylex): Likewise.
7737 * method.c (do_inline_function_hair): Likewise.
7738 * parse.y (unscoped): Likewise.
7739 * pt.c (check_explicit_specialization): Likewise.
7740 (lookup_template_class): Likewise.
7741 * rtti.c (call_void_fn): Likewise.
7742 * sig.c (build_sigtable): Likewise.
7743 * ptree.c (lang_print_xnode): New function.
7744
7745 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
7746
7747 * pt.c (instantiate_class_template): Don't instantiate if pedantic
7748 and the args use template parms.
7749
7750 * pt.c (push_tinst_level): If the instantiation uses template parms,
7751 fail silently.
7752 * decl.c (xref_basetypes): Do call complete_type for basetypes
7753 that involve template parameters.
7754
7755 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
7756
7757 * typeck2.c (process_init_constructor): Fix labeled init check.
7758
7759 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
7760
7761 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
7762 argument to tsubst and friends.
7763
7764 * pt.c (tsubst, FUNCTION_DECL): Tidy.
7765
7766 * typeck.c (build_x_function_call): Handle static member function
7767 templates like non-templates. Handle friend templates like normal
7768 function templates.
7769 * pt.c (tsubst, *_PARM): Don't use orig_level.
7770 (get_bindings): Don't call add_to_template_args.
7771 (instantiate_template): Likewise.
7772 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
7773 * ptree.c (print_lang_type): Print index/level for template parms.
7774
7775 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
7776
7777 * Make-lang.in (cc1plus): Note that cc1plus depends on
7778 cp/cp-tree.h and cp/cp-tree.def.
7779
7780 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
7781 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
7782 position in a template parameter list.
7783 * cp-tree.h (template_parm_index): New structure, used as the tree
7784 structure for a TEMPLATE_PARM_INDEX.
7785 (TEMPLATE_PARM_IDX): New macro.
7786 (TEMPLATE_PARM_LEVEL): Likewise.
7787 (TEMPLATE_PARM_DESCENDANTS): Likewise.
7788 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
7789 (TEMPLATE_PARM_DECL): Likewise.
7790 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
7791 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
7792 (TEMPLATE_TYPE_DECL): Likewise.
7793 (TEMPLATE_CONST_IDX): Remove.
7794 (TEMPLATE_CONST_LEVEL): Likewise.
7795 (TEMPLATE_CONST_SET_INFO): Likewise.
7796 (TEMPLATE_TYPE_SET_INFO): Likewise.
7797 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
7798 node.
7799 (TEMPLATE_TYPE_LEVEL): Likewise.
7800 * decl.c (decls_match): Call comp_template_parms, rather than
7801 expanding it inline.
7802 (duplicate_decls): If two template declarations are being merged,
7803 then their TEMPLATE_INFOs should be merged as well.
7804 (grokfndecl): Save template-id information when declaring a friend
7805 with explicit template arguments. Pass arguments to
7806 check_explicit_specialization via correct convention; at some
7807 point check_explicit_specialization changed, but these call-sites
7808 did not.
7809 (grokdeclarator): Tidy up slightly.
7810 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
7811 two template functions with the same DECL_ASSEMBLER_NAME the same,
7812 since the names are not yet mangled.
7813 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
7814 TEMPLATE_CONST_PARM.
7815 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
7816 decl for a non-type parameter, rather than printing `<tparm ...>'.
7817 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
7818 (do_friend): Deal with template friends.
7819 * lex.c (do_pending_inlines): Call
7820 maybe_begin_member_template_processing, rather than
7821 conditionally calling begin_member_template_processing.
7822 (process_next_inline): Likewise. Call
7823 maybe_end_member_template_processing, rather than
7824 conditionally calling end_member_template_processing.
7825 (do_pending_defargs): Likewise.
7826 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
7827 TEMPLATE_CONST_PARM.
7828 * method.c (build_mangled_template_parm_index): New function.
7829 (build_overload_value): Use it.
7830 (build_overload_name): Likewise.
7831 * pt.c (finish_member_template_decl): Allow friend declarations.
7832 (template_class_depth): New function.
7833 (is_member_template): Rename, and modify, to become...
7834 (is_member_or_friend_template): New function.
7835 (end_member_template_processing): Rename, and modify, to become...
7836 (maybe_end_member_template_processing).
7837 (build_template_parm_index): New function.
7838 (reduce_template_parm_level): New function.
7839 (process_template_parm): Modify to use build_template_parm_index.
7840 (push_template_decl): Deal with friend templates.
7841 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
7842 TEMPLATE_CONST_PARM.
7843 (tsubst_friend_function): New function.
7844 (instantiate_class_template): Generate the DECL_FRIENDLIST
7845 for a new instantiation by using tsubst_friend_function rather
7846 than just tsubst.
7847 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
7848 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
7849 appropriate new macros. Use reduce_template_parm_level to
7850 generate lower-level template parameters. Handle tsubst'ing into
7851 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
7852 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
7853 templates. Similarly for the template parameters for a new
7854 template.
7855 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
7856 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
7857 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
7858 (get_bindings): Call add_to_template_args if necessary.
7859 (instantiate_decl): Handle instantiations of friend templates.
7860 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
7861 TEMPLATE_TYPE_PARM as a list of fields; it's not!
7862 * spew.c (yylex): Do a little manual constant propagation to
7863 clarify the code.
7864
7865 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
7866
7867 * error.c: Include sys/types.h.
7868
7869 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
7870
7871 * method.c (build_mangled_name): Start CPP directives in column zero.
7872
7873 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
7874
7875 * typeck2.c (process_init_constructor): Sorry about non-trivial
7876 labeled initializers.
7877 * parse.y (initlist): Re-enable labeled initializers.
7878
7879 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7880
7881 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
7882 all callers changed. Rely on the new parameter instead of arg
7883 being a TREE_LIST when determine whether we are working inside
7884 template template parameter. Clean up is_type test.
7885
7886 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
7887
7888 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
7889 * typeck2.c (initializer_constant_valid_p): Allow conversions
7890 between pointers and references.
7891
7892 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
7893
7894 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
7895 if pedantic || warn_pointer_arith.
7896
7897 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7898
7899 * pt.c (unify): Handle TEMPLATE_DECL.
7900
7901 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
7902
7903 * cp-tree.h (strip_attrs): Remove decl.
7904
7905 1998-02-18 Doug Evans <devans@cygnus.com>
7906
7907 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
7908 Update olddecl's attributes too.
7909 (strip_attrs): Remove function.
7910 * typeck.c (common_type): Call merge_machine_type_attributes.
7911
7912 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
7913
7914 * parse.y (initdcl0_innards): New grammar symbol.
7915 (nomods_initdecls, nomods_initdcl0): Change type from itype to
7916 none, since the resulting value is never used.
7917 (parse_decl): New function.
7918 (datadef): Remove redundant actions.
7919 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
7920 * parse.c: Regenerated.
7921
7922 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
7923
7924 * parse.y (simple_stmt): Use getdecls() to check for decl.
7925
7926 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
7927
7928 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
7929 macros.
7930 (c++.install-common): Install c++filt properly as native or as cross
7931 variant.
7932 (c++.uninstall): Add c++filt.
7933
7934 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
7935
7936 * call.c (standard_conversion): Fix multi-level ptr conversions.
7937
7938 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
7939
7940 * init.c (build_new): Propagate error_mark_node up.
7941
7942 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
7943
7944 * parse.y (simple_stmt): If the condition isn't a declaration,
7945 start the controlled block after the test.
7946
7947 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
7948
7949 * call.c (build_over_call): Convert builtin abs, labs and fabs to
7950 tree-codes.
7951 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
7952 builtins.
7953
7954 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
7955
7956 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
7957
7958 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
7959
7960 * cp-tree.h: Add access_protected_virtual_node.
7961 * class.c (init_class_processing): Initialize it.
7962 * decl.c (xref_basetypes): Use it.
7963 * parse.y (base_class_access_list): Likewise.
7964
7965 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
7966 (c++.install-common): Install c++filt.
7967
7968 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7969
7970 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
7971
7972 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
7973
7974 * call.c (reference_binding): Use comptypes when comparing
7975 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
7976
7977 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
7978
7979 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
7980 (really_overloaded_fn): Move check here from is_overloaded_fn.
7981 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
7982
7983 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
7984
7985 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
7986 conversions.
7987
7988 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
7989
7990 * cp-tree.h (push_template_decl): Return the decl passed in, or an
7991 equivalent duplicate.
7992 * decl.c (pushtag): Use the return value from push_template_decl.
7993 (duplicate_decls): When duplicating a template declaration, merge
7994 the DECL_TEMPLATE_RESULTs as well.
7995 (make_implicit_typename): Don't try to dive into typename types to
7996 find a context for making a new implicit typename.
7997 (start_decl): Use the return value from push_template_decl.
7998 (grokdeclarator): Complain about declarations list `const operator
7999 int'. Since we don't correctly handle in-class initializations of
8000 non-static data members, complain about this (now illegal)
8001 practice. Issue an error for initializations of non-const statics
8002 since that is illegal as well, and since we don't handle that case
8003 correctly either.
8004 (start_function): Use the return value from push_template_decl.
8005 (start_method): Likewise.
8006 * decl2.c (grokfield): Likewise. Since the change to
8007 grokdeclarator ensures that all initialized fields are in fact
8008 static, remove a redundant test for TREE_PUBLIC.
8009 * parse.y (initlist): Disable labeled initializers since they do
8010 not work as per the documentation, and since they do not use the
8011 same syntax as the C front end.
8012 * pt.c (push_template_decl): Return the decl passed in, or an
8013 equivalent duplicate.
8014 (lookup_template_class): When searching in a nested context,
8015 use the right arguments.
8016 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
8017 * typeck.c (build_component_ref): Assign the correct type to the
8018 result of build_vfn_ref.
8019
8020 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
8021
8022 * pt.c (convert_nontype_argument): Fix typo.
8023 (check_explicit_specialization): Allow old-style specialization
8024 of class template members.
8025
8026 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
8027 Manfred Hollstein <manfred@s-direktnet.de>
8028
8029 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
8030 when deciding to override DECL_ASSEMBLER_NAME.
8031
8032 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
8033
8034 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
8035 * cp-tree.h (flag_do_squangling): Add declaration.
8036 * lang-options.h: Add -fsquangle and -fno-squangle.
8037 * method.c: Add macros and static variables for squangling.
8038 (build_overload_name): Rename to build_mangled_name, add logic for B
8039 compression, and split into process_modifiers and
8040 process_overload_item.
8041 (process_modifiers): New function, to handle constant, reference,
8042 and pointer types.
8043 (process_overload_item): New function, handles issue of type codes.
8044 (build_overload_name): New function, start squangling and call
8045 build_mangled_name.
8046 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
8047 (start_squangling): New function to initialize squangling structs.
8048 (end_squangling): New function to destroy squangling structs.
8049 (nrepeats): Rename variable to Nrepeats.
8050 (issue_nrepeats): New function for issuing 'n' type repeats.
8051 (check_ktype): New function to check for type K name compression.
8052 (build_overload_nested_name): Add a check for K name compression.
8053 (build_qualified_name): Add a check for K name compression and don't
8054 use DECL_ASSEMBLER_NAME when squangling is on.
8055 (check_btype): New function, checks for B type compression.
8056 (build_static_name, build_decl_overload_real): Initiate squangling.
8057 (build_typename_overload, build_overload_with_type): Initiate
8058 squangling
8059
8060 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
8061
8062 * method.c (make_thunk): Avoid name buffer overflow.
8063
8064 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
8065
8066 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
8067 don't define them yet.
8068
8069 * parse.y (nomods_initdcl0): Add constructor_declarator case.
8070
8071 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8072
8073 * config-lang.in (diff_excludes): Use basename only.
8074
8075 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
8076
8077 * tinfo2.cc: Add tinfo for signed char.
8078
8079 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
8080
8081 * search.c (compute_access): Handle protected constructors in derived
8082 classes as accessible.
8083
8084 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
8085
8086 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
8087 Call convert_from_reference sooner.
8088
8089 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
8090
8091 * cvt.c (ocp_convert): Obtain the constant values from constant
8092 decls even if the destination type is the same as the type of the
8093 decl.
8094
8095 * decl2.c (finish_file): Make sure that static inlines with
8096 definitions are not marked DECL_EXTERNAL before returning.
8097
8098 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
8099
8100 * decl.c: Lose arg_looking_for_template.
8101 (lookup_name_real): Likewise.
8102 * parse.y: Lose processing_template_arg, template_arg1.
8103 (primary): Likewise.
8104 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
8105
8106 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
8107
8108 * error.c (dump_decl): Fix type of default arguments for template
8109 template parameters and nontype template parameters.
8110 * parse.y (template_parm): Handle invalid default template
8111 template arguments here.
8112
8113 * parse.y (template_parm): Use template_arg instead of PTYPENAME
8114 for default template template argument.
8115 * pt.c (coerce_template_parms): Merge default template argument
8116 codes. Can treat RECORD_TYPE as template name if it is implicitly
8117 created. Fix argument index in error message.
8118 * typeck.c (comptypes): Merge template argument comparison codes in
8119 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
8120
8121 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
8122
8123 * lex.c (file_name_nondirectory): Also check for '/'.
8124
8125 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
8126
8127 * parse.y (primary): Deal with statement-expressions in
8128 templates.
8129 * pt.c (tsubst_copy): Handle BIND_EXPR.
8130 * tree.c (mapcar): Likewise.
8131
8132 * call.c (add_template_candidate_real): Pass extra parameter to
8133 fn_type_unification.
8134 * cp-tree.h (fn_type_unification): Add parameter.
8135 * pt.c (fn_type_unification): Add additional parameter to deal with
8136 static member functions.
8137 (get_bindings): Deal with static member functions.
8138
8139 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
8140 (revert_static_member_fn): Declare.
8141 * decl.c (revert_static_member_fn): Remove declaration. Change
8142 linkage from internal to external.
8143 (cp_finish_decl): Deal with virtual functions in classes local to
8144 template functions.
8145 * decl2.c (finish_file): Don't forget to emit increment/decrement
8146 expressions in initializers for file-scope variables.
8147 * parse.y (typename_sub2): If the typename doesn't names a
8148 template, rather than a type, issue an error message.
8149 * pt.c (check_explicit_specialization): Handle specializations of
8150 static member functions.
8151 (coerce_template_parms): Handle offset references to lists of
8152 member functions.
8153 * search.c (note_debug_info_needed): Don't crash when handed a
8154 type which is being defined.
8155 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
8156 that can happen with some illegal code.
8157
8158 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8159
8160 * call.c (user_harshness): Initialize `code' to 0.
8161 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
8162 (null_ptr_cst_p): Add parentheses around && within ||.
8163 (standard_conversion): Likewise.
8164 (z_candidate): Likewise.
8165 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
8166 (build_object_call): Likewise for `mem_args'.
8167 (build_new_op): Likewise for `mem_arglist'. Add `return' from
8168 default case in enumeration switch.
8169
8170 * class.c (build_vtable_entry): Add explicit braces to avoid
8171 ambiguous `else'.
8172 (build_class_init_list): Likewise.
8173 (finish_struct_1): Initialize `width' to 0.
8174 (instantiate_type): Initialize `name' to NULL_TREE. Add
8175 explicit braces to avoid ambiguous `else'.
8176
8177 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
8178 `else'.
8179
8180 * decl.c (grok_reference_init): Eliminate unused parameter, all
8181 callers changed.
8182 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
8183 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
8184 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
8185 (grokdeclarator): Add parentheses around && within ||. Add
8186 explicit braces to avoid ambiguous `else'.
8187 (grokparms): Initialize `type' to NULL_TREE.
8188 (xref_tag): Remove unused label `just_return'.
8189 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
8190 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
8191 (hack_incomplete_structures): Add parentheses around assignment
8192 used as truth value.
8193
8194 * decl2.c (coerce_delete_type): Hide definition of `e3'.
8195
8196 * error.c: Include <stdlib.h>.
8197 (dump_expr): Change the type of `i' to size_t. Remove unused
8198 label `error'.
8199
8200 * except.c (init_exception_processing): Remove unused variable `d'.
8201 (expand_throw): Likewise for `label'.
8202
8203 * friend.c (add_friends): Add explicit braces to avoid ambiguous
8204 `else'.
8205
8206 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
8207 (sort_base_init): Likewise for `binfo'.
8208 (expand_member_init): Likewise for `rval'.
8209 (build_member_call): Add parentheses around assignment used as
8210 truth value.
8211 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
8212 (build_new): Initialize `nelts' to NULL_TREE. Initialize
8213 `old_immediate_size_expand' to 0.
8214 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
8215 (build_vec_delete_1): Remove unused variable `block'.
8216 (expand_vec_init): Initialize `itype' to NULL_TREE.
8217
8218 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
8219 declaration of `index' and `rindex' with autoconf macros.
8220 (reinit_parse_for_expr): Remove unused variables
8221 `look_for_semicolon' and `look_for_lbrac'.
8222 (cons_up_default_function): Initialize `args' to NULL_TREE.
8223 (readescape): Initialize `firstdig' to 0.
8224 (real_yylex): Add parentheses around assignment used as truth value.
8225
8226 * method.c: Include <strings.h> if we don't have <string.h>.
8227 Protect declaration of `index' with autoconf macro.
8228
8229 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
8230 Initialize `type' to NULL_TREE.
8231 (structsp): Remove unused variable `id'.
8232
8233 * pt.c (coerce_template_parms): Add explicit braces to avoid
8234 ambiguous `else'.
8235 (lookup_template_class): Initialize `template' to NULL_TREE.
8236 (instantiate_class_template): Remove unused variable `name' and `e'.
8237 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
8238 (do_poplevel): Initialize `saved_warn_unused' to 0.
8239 (type_unification): Remove unused varable `parm'.
8240 (unify): Likewise for `j'.
8241
8242 * repo.c (init_repo): Add parentheses around assignment used as
8243 truth value.
8244 (finish_repo): Remove unused varable `p'.
8245
8246 * search.c (get_binfo): Initialize `type' to NULL_TREE.
8247 (get_base_distance): Likewise.
8248 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
8249 and `new_v' to NULL_TREE.
8250 (lookup_fnfields): Likewise for `rval_binfo_h'.
8251 (breadth_first_search): Add parentheses around assignment used as
8252 truth value.
8253 (get_template_base): Initialize `type' to NULL_TREE.
8254
8255 * sig.c (append_signature_fields): Initialize `last_mfptr' to
8256 NULL_TREE.
8257 (build_signature_table_constructor): Likewise for
8258 `last_rhs_field', `pfn' and `vt_off'.
8259 (build_sigtable): Likewise for `init'.
8260
8261 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
8262 (propagate_binfo_offsets): Likewise for `delta'.
8263 (hash_tree_cons): Initialize hashcode to 0.
8264 (can_free): Likewise for `size'.
8265 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
8266
8267 * typeck.c (convert_sequence): Hide prototype.
8268 (common_type): Add explicit braces to avoid ambiguous `else'.
8269 (comp_target_types): Likewise.
8270 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
8271 (build_function_call_real): Add explicit braces to avoid ambiguous
8272 `else'.
8273 (convert_arguments): Initialize `called_thing' to 0.
8274 (convert_for_initialization): Initialize `savew' and `savee' to 0.
8275
8276 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
8277 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
8278 (build_x_arrow): Likewise for `last_rval'.
8279
8280 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
8281
8282 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
8283
8284 * decl.c (init_decl_processing): Use set_sizetype.
8285 * decl2.c (sizetype): Don't declare.
8286 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
8287 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
8288 (build_component_addr, unary_complex_lvalue): Likewise.
8289 * rtti.c (expand_class_desc): Likewise.
8290 * class.c (get_vfield_offset): Likewise.
8291
8292 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
8293
8294 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
8295 early to avoid bogus error. Handle overloaded function
8296 names provided as template arguments correctly.
8297 (coerce_template_parms): Don't mishandle overloaded functions when
8298 dealing with template template parameters.
8299 (lookup_template_class): Issue an error message, rather than
8300 crashing, when the TYPE_DECL provided is not a template type.
8301
8302 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
8303
8304 * class.c (instantiate_type): Don't just return a known type if
8305 it's wrong.
8306
8307 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
8308
8309 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
8310 since that code could never be reached.
8311
8312 * error.c (dump_decl): Avoid aborting in the midst of printing an
8313 error message about an illegal template declaration.
8314
8315 * parse.y (structsp): Print an error message, rather than crashing,
8316 when a class-head does not name a class.
8317
8318 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
8319 template arguments as a g++ extension.
8320
8321 * cp-tree.def (ALIGNOF_EXPR): New tree code.
8322 * decl2.c (grok_alignof): If processing_template_decl, just store
8323 the expression.
8324 * typeck.c (c_alignof): Likewise.
8325 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
8326 * error.c (dump_expr): Likewise.
8327 * pt.c (tsubst_copy): Likewise.
8328 * tree.c (cp_tree_equal): Likewise.
8329 * pt.c (uses_template_parms): Correctly determine whether or not a
8330 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
8331 folding can be done.
8332
8333 * cp-tree.h (grok_enum_decls): Remove type parameter.
8334 * decl.c (grok_enum_decls): Likewise.
8335 * decl2.c (grok_x_components): Call grok_enum_decls
8336 unconditionally, since it will do nothing if there is no
8337 current_local_enum. Use the new calling sequence.
8338 * pt.c (tsubst_enum): Use the new calling sequence for
8339 grok_enum_decls.
8340
8341 * decl.c (start_function): Make member functions of local classes
8342 in extern inline functions have comdat linkage here...
8343 (grokdeclarator): Rather than here.
8344
8345 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
8346
8347 * pt.c (convert_nontype_argument): Use decl_constant_value.
8348
8349 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
8350
8351 * call.c (add_template_candidate_real): New function.
8352 (add_template_candidate): Use it.
8353 (add_template_conv_candidate): Likewise.
8354 (joust): Pass extra argument to more_specialized.
8355 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
8356 (is_local_class): Remove.
8357 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
8358 * cp-tree.h (is_local_class): Remove.
8359 (perform_array_to_pointer_conversion): Likewise.
8360 (finish_member_template_decl): Add.
8361 (check_explicit_specialization): Return a tree, not an int.
8362 (more_specialized): Take additional argument.
8363 (get_bindings): Likewise.
8364 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
8365 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
8366 (perform_array_to_pointer_conversion): Remove.
8367 * decl.c (saved_scope): Add processing_specialization,
8368 processing_explicit_instantiation fields.
8369 (maybe_push_to_top_level): Save them.
8370 (pop_from_top_level): Restore them.
8371 (grokfndecl): Use new return value from
8372 check_explicit_specialization.
8373 (start_decl): Don't check flag_guiding_decls before pushing
8374 decls.
8375 (cp_finish_decl): Remove previous (bogus) change.
8376 (grok_declarator): Use decl_function_context rather than
8377 is_local_class.
8378 * decl2.c (finish_file): Pass extra argument to get_bindings.
8379 (build_expr_from_tree): Let build_x_component_ref check
8380 validity of arguments rather than doing it here.
8381 * lex.c (cons_up_default_function): Remove code fooling with
8382 processing_specialization, processing_explicit_instantiation
8383 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
8384 * method.c (build_overload_identifier): Mangle local classes in
8385 template functions correctly.
8386 * parse.y (finish_member_template_decl): Move to pt.c.
8387 * pt.c (finish_member_template_decl): Moved here from parse.y.
8388 (print_candidates): New function.
8389 (determine_specialization): Change interface. Properly look for
8390 most specialized versions of template candidates.
8391 (check_explicit_specialization): Fully process explicit
8392 instantiations.
8393 (push_template_decl): Avoid looking at CLASSTYPE fields in
8394 FUNCTION_DECLS.
8395 (determine_overloaded_function): Remove.
8396 (convert_nontype_argument): Change name from
8397 convert_nontype_parameter. Use determine_overloaded_function
8398 instead of instantiate_type.
8399 (mangle_class_name_for_template): Handle type contexts as well as
8400 function contexts.
8401 (classtype_mangled_name): Likewise.
8402 (lookup_template_class): Likewise.
8403 (tsubst): Likewise.
8404 (more_specialized): Take explict template arguments as a
8405 parameter.
8406 (most_specialized): Likewise.
8407 (get_bindings): Likewise. Check that return types match before
8408 proclaiming a function a match.
8409 (do_decl_instantiation): Remove code searching for function to
8410 instantiate; that is now done in check_explicit_specialization.
8411 (add_maybe_template): Pass extra argument to get_bindings.
8412 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
8413 implementation.
8414 * typeck.c (build_component_ref): Check for invalid arguments.
8415
8416 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
8417
8418 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
8419 return_target and call_target are equivalent.
8420
8421 * pt.c (type_unification_real): Just accept function parms that
8422 don't use any template parms.
8423
8424 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
8425
8426 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
8427 unset DECL_NOT_REALLY_EXTERN.
8428
8429 * parse.y (typename_sub*): Fix std::.
8430
8431 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
8432
8433 * error.c (dump_decl): Fix type default template args.
8434 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
8435
8436 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
8437
8438 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
8439 (file_name_nondirectory): Use.
8440
8441 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
8442
8443 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
8444 that are not really present. Substitute default arguments in
8445 template template arguments. Correctly convert TEMPLATE_DECL to
8446 TEMPLATE_TEMPLATE_PARM.
8447 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
8448 are no longer treated specially here.
8449 * parse.y (template_template_parm): Fix copy error.
8450 * decl.c (grokdeclarator): Warn about missing `typename' for nested
8451 type created from template template parameters.
8452 * parse.y (bad_parm): Likewise
8453
8454 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
8455 (push_nested_class): Likewise.
8456 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
8457 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
8458 (copy_template_template_parm): Declare.
8459 * decl.c (arg_looking_for_template): New variable.
8460 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
8461 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
8462 node if arg_looking_for_template is nonzero.
8463 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
8464 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
8465 (grokdeclarator): Handle TEMPLATE_DECL.
8466 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
8467 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
8468 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
8469 (dump_decl): Handle unnamed template type parameters.
8470 Handle template template parameters.
8471 (dump_function_name): Handle template template parameters.
8472 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
8473 Handle TEMPLATE_TEMPLATE_PARM.
8474 * method.c (build_template_template_parm_names): New function.
8475 (build_template_parm_names): Handle TEMPLATE_DECL.
8476 (build_overload_nested_name, build_overload_name):
8477 Handle TEMPLATE_TEMPLATE_PARM.
8478 * parse.y (maybe_identifier): New nonterminal.
8479 (template_type_parm): Use it.
8480 (template_template_parm, template_arg1): New nonterminal.
8481 (template_parm): Add template_template_parm rules.
8482 (template_arg): Set processing_template_arg.
8483 (template_arg1): Rules moved from template_arg.
8484 (primary, nonnested_type): Set arg_looking_for_template if we are
8485 processing template arguments.
8486 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
8487 (process_template_parm): Handle template template parameters.
8488 (coerce_template_parms, comp_template_args): Likewise.
8489 (mangle_class_name_for_template, lookup_template_class): Likewise.
8490 (uses_template_parms): Handle TEMPLATE_DECL and
8491 TEMPLATE_TEMPLATE_PARM.
8492 (current_template_args): Handle TEMPLATE_DECL.
8493 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
8494 * search.c (dfs_walk, dfs_record_inheritance):
8495 Handle TEMPLATE_TEMPLATE_PARM.
8496 * tree.c (copy_template_template_parm): New function.
8497 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
8498 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
8499
8500 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
8501
8502 * decl.c (start_decl): Don't allow duplicate definitions of static
8503 data members.
8504
8505 * call.c (build_user_type_conversion_1): Handle user-defined
8506 template conversion operators correctly.
8507
8508 * decl2.c (build_expr_from_tree): Issue an error message if the
8509 object in a COMPONENT_REF is a TEMPLATE_DECL.
8510
8511 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
8512
8513 * class.c (is_local_class): New function.
8514 * cp-tree.h (is_local_class): Declare it.
8515 (last_tree): Likewise.
8516 (begin_tree): Likewise.
8517 (end_tree): Likewise.
8518 (lookup_template_class): Change prototype.
8519 * decl.c (cp_finish_decl): Check for NULL where necessary.
8520 Consider FUNCTION_DECLS to declare objects with top-level binding,
8521 when calling make_decl_rtl.
8522 (grokdeclarator): Give members of local classes internal linkage.
8523 (start_function): Remove declaration of last_tree.
8524 (finish_function): Set flag_keep_inline_functions around call to
8525 rest_of_compilation if we are processing a member function in a
8526 local class.
8527 (start_method): Call push_template_decl for member functions of
8528 local classes in template functions.
8529 * decl2.c (import_export_decl): Don't give external linkage to
8530 instantiations of templates with internal linkage.
8531 * parse.y (last_tree): Remove declaration.
8532 (template_type): Pass extra parameter to lookup_template_class.
8533 (self_template_type): Likewise.
8534 (structsp): Move call to reset_specialization into left_curly.
8535 (left_curly): Call reset_specialization, and begin_tree.
8536 * pt.c (saved_trees): New variable.
8537 (mangle_class_name_for_template): Change prototype. Use
8538 additional function context to name local classes in templates
8539 correctly.
8540 (classtype_mangled_name): Pass the context.
8541 (push_template_decl): Handle local classes and templates, and
8542 member functions for such classes.
8543 (convert_nontype_parameter): Fix handling of pointer-to-member
8544 constants.
8545 (lookup_template_class): Handle local classes in templates.
8546 (tsubst): Likewise. Don't assume that template instantiations
8547 have external linkage; pay attention to the template declaration.
8548 (mark_decl_instantiated): Likewise.
8549 (begin_tree): New function.
8550 (end_tree): Likewise.
8551
8552 * decl.c (xref_basetypes): Don't call complete_type for basetypes
8553 that involve template parameters; that can lead to infinite
8554 recursion unnecessarily.
8555
8556 * pt.c (register_specialization): Do not register specializations
8557 that aren't ready to be registered yet.
8558 (check_explicit_specialization): Handle explicit specialization of
8559 constructors and destructors.
8560 (build_template_decl): New function.
8561 (push_template_delc): Handle out-of-class specializations of
8562 member templates.
8563
8564 * pt.c (check_explicit_specialization): Set up the template
8565 information before registering the specialization.
8566 (coerce_template_parms): Fix thinko.
8567 (tsubst): Handle specializations of member templates correctly.
8568
8569 * class.c (finish_struct_methods): Remove calls to
8570 check_explicit_specialization from here.
8571 (finish_struct): And insert them here.
8572 * cp-tree.h (perform_qualification_conversions): New function.
8573 (perform_array_to_pointer_conversion): Likewise.
8574 (begin_explicit_instantiation): Likewise.
8575 (end_explicit_instantiation): Likewise.
8576 (determine_specialization): Renamed from
8577 determine_explicit_specialization.
8578 (comp_template_parms): New function.
8579 (processing_explicit_instantiation): New variable.
8580 * cvt.c (perform_qualification_conversions): New function.
8581 (perform_array_to_pointer_conversion): Likewise.
8582 * decl.c (duplicate_decls): Don't consider template functions
8583 alike unless they have the same parameters. Refine handling of
8584 instantiation/specialization mismatches.
8585 (start_decl): Don't call pushdecl for template specializations,
8586 since they don't affect overloading.
8587 (start_function): Likewise.
8588 (grokfndecl): Call check_explicit_specialization a little later.
8589 Don't call duplicate_decls for memberm template specializations.
8590 (grokdeclarator): Don't update template_count for classes that are
8591 themselves specializations. Remove use of `2' as parameter to
8592 grokfndecl since that value isn't used.
8593 * lex.c (cons_up_default_function): Save and restore
8594 processing_explicit_instantiation around calls to grokfield.
8595 * parse.y (finish_member_template_decl): New function.
8596 (component_decl_1): Use it.
8597 (fn.def2): Likewise.
8598 (template_arg_list_opt): New nonterminal.
8599 (template_type): Use it.
8600 (self_template_type): Likewise.
8601 (template_id): Likewise.
8602 (object_template_id): Likewise.
8603 (notype_template_declarator): Likwise.
8604 (begin_explicit_instantiation): Likewise.
8605 (end_explicit_instantiation): Likewise.
8606 (explicit_instantiation): Use them.
8607 * pt.c (coerce_template_parms): Add parameters.
8608 (processing_explicit_instantiation): New variable.
8609 (convert_nontype_parameter): New function.
8610 (determine_overloaded_function): Likewise.
8611 (begin_explicit_instantiation): Likewise.
8612 (end_explicit_instantiation): Likewise.
8613 (retrieve_specialization): Likewise.
8614 (register_specialization): Likewise.
8615 (processing_explicit_specialization): Removed.
8616 (determine_specialization): Handle specializations of member
8617 functions of template class instantiations.
8618 (check_explicit_specialization): Refine to conform to standard.
8619 (comp_template_parms): New function.
8620 (coerce_template_parms): Call convert_nontype_parameter.
8621 (tsubst): Refine handling of member templates. Use
8622 register_specialization.
8623 (instantiate_template): Use retrieve_specialization.
8624 (do_decl_instantiation): Likewise.
8625 (instantiate_decl): Likewise.
8626 (type_unification): Improve handling of explict template
8627 arguments.
8628 * tree.c (mapcar): Return error_mark_node, rather than aborting,
8629 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
8630 * typeck.c (build_unary_op): Call determine_specialization, rather
8631 than determine_explicit_specialization.
8632
8633 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
8634
8635 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
8636
8637 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
8638
8639 * error.c (dump_decl): For enum tags, output the tag, not its value.
8640
8641 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
8642
8643 * decl.c (init_decl_processing): Only call init_rtti_processing
8644 FLAG_RTTI is set.
8645
8646 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
8647
8648 * init.c (build_new_1): Split out from build_new.
8649 (build_new): Just return a NEW_EXPR.
8650 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
8651
8652 * decl2.c (get_temp_regvar): Tweak.
8653
8654 * cp-tree.h (TREE_CALLS_NEW): Comment out.
8655 * class.c (resolves_to_fixed_type_p): Remove use.
8656 * method.c (build_opfncall): Likewise.
8657 * call.c (build_new_op): Likewise.
8658
8659 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
8660
8661 * exception.cc (__eh_alloc, __eh_free): New fns.
8662 (__cp_push_exception, __cp_pop_exception): Use them.
8663 (__uncatch_exception): Call terminate here if no exception.
8664 * except.c (build_terminate_handler): New fn.
8665 (expand_start_catch_block): Use it.
8666 (expand_exception_blocks): Likewise.
8667 (alloc_eh_object): New fn.
8668 (expand_throw): Use it. Protect exception init with terminate.
8669 * typeck.c (build_modify_expr): Remove code that ignores trivial
8670 methods.
8671
8672 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8673
8674 * call.c (add_builtin_candidate): Add default case in enumeration
8675 switch.
8676 (build_new_op): Likewise.
8677 (convert_like): Likewise.
8678 * cvt.c (build_expr_type_conversion): Likewise.
8679 * tree.c (real_lvalue_p): Likewise.
8680 (lvalue_p): Likewise.
8681 (cp_tree_equal): Likewise.
8682 * typeck.c (comptypes): Likewise.
8683 (build_component_ref): Likewise.
8684 (build_function_call_real): Likewise.
8685 (build_binary_op_nodefault): Likewise.
8686 (build_unary_op): Likewise.
8687 (build_modify_expr): Likewise.
8688 * typeck2.c (initializer_constant_valid_p): Likewise.
8689
8690 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
8691
8692 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
8693
8694 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
8695
8696 * pt.c (coerce_template_parms): Make sure to digest_init if
8697 possible.
8698
8699 * decl.c (duplicate_decls): Make the newdecl virtual if the
8700 olddecl was, just as is done with other attributes of olddecl.
8701
8702 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
8703
8704 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
8705 address of an OFFSET_REF.
8706
8707 * cp-tree.def: Add AGGR_INIT_EXPR.
8708 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
8709 AGGR_INIT_EXPR where appropriate.
8710 * expr.c (cplus_expand_expr): Likewise. Simplify.
8711
8712 * decl2.c (finish_file): Remove call to register_exception_table.
8713
8714 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8715
8716 * pt.c (instantiate_class_template): Don't do injection when
8717 processing_template_decl is true, as pollutes current_binding_level
8718 for base classes.
8719
8720 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
8721
8722 * pt.c (maybe_fold_nontype_arg): Add prototype.
8723
8724 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
8725
8726 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
8727 * error.c (dump_expr): Likewise.
8728
8729 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
8730
8731 * typeck.c (build_function_call_real): Remove "inline called before
8732 definition" pedwarn.
8733
8734 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
8735
8736 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
8737
8738 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
8739
8740 * pt.c (type_unification_real): Change __null to type void* with
8741 a warning.
8742
8743 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
8744
8745 * call.c (implicit_conversion): Don't call
8746 build_user_type_conversion_1 with a NULL expr, since it will
8747 crash.
8748
8749 * pt.c (unify): Don't try to unify array bounds if either array is
8750 unbounded.
8751
8752 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
8753
8754 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
8755 Replace extern decls with casts.
8756
8757 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
8758 Update last_parm_cleanup_insn.
8759 (store_after_parms): Remove.
8760 * cp-tree.h: Adjust.
8761
8762 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
8763
8764 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
8765 (finish_file): Check DECL_COMDAT instead of weak|one_only.
8766 (import_export_vtable): Use make_decl_one_only instead of
8767 comdat_linkage for win32 tweak.
8768 (import_export_decl): Likewise.
8769 * pt.c (mark_decl_instantiated): Likewise.
8770
8771 * decl2.c (finish_file): Lose handling of templates in pending_statics.
8772
8773 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
8774
8775 * decl2.c (finish_file): Lose call to expand_builtin_throw.
8776 * except.c (expand_builtin_throw): Remove.
8777 * cp-tree.h: Remove ptr_ptr_type_node.
8778 * decl.c: Likewise.
8779
8780 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
8781
8782 * decl.c (ptr_ptr_type_node): Define.
8783 (init_decl_processing): Initialize it.
8784 * cp-tree.h: Declare it.
8785 * exception.cc (__cp_exception_info): Use __get_eh_info.
8786 (__cp_push_exception): Likewise.
8787 (__cp_pop_exception): Likewise.
8788
8789 From Scott Snyder <snyder@d0sgif.fnal.gov>:
8790 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
8791 saved_pc.
8792 (init_exception_processing): Removed saved_pc initialization.
8793
8794 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
8795
8796 * pt.c (instantiate_decl): Defer all templates but inline functions.
8797
8798 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
8799
8800 * init.c (expand_vec_init): Don't fold a list of parameters.
8801
8802 * decl.c (copy_args_p): Handle copy elision for types with virtual
8803 bases.
8804 * call.c (build_over_call): Likewise.
8805
8806 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
8807
8808 * pt.c (lookup_template_function): Copy the template arguments,
8809 not just the list containing them, to the permanent obstack.
8810
8811 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
8812
8813 * except.c (expand_start_catch_block): suspend_momentary for the
8814 terminate handler.
8815
8816 * error.c (dump_decl): Handle LOOKUP_EXPR.
8817
8818 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
8819
8820 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
8821 permanent obstack if we are processing a template decl.
8822 * typeck.c (build_static_cast): Likewise.
8823 (build_const_cast): Likewise.
8824 (build_reinterpret_cast): Likewise.
8825
8826 * pt.c (coerce_template_parms): Coerce some expressions, even
8827 when processing_template_decl.
8828
8829 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
8830
8831 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
8832 handling of pointer difference expressions.
8833
8834 * typeck.c (comp_target_types): Comparison of function/method types
8835 is independent of nptrs.
8836
8837 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
8838
8839 * pt.c (tsubst): Avoid creating pointer to reference and
8840 reference to reference types.
8841
8842 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
8843
8844 * parse.y (do_id): New nonterminal.
8845 (template_id): Use it.
8846
8847 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
8848
8849 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
8850 * spew.c (yylex): Don't do_identifier here.
8851 * decl2.c (build_expr_from_tree): Revert last change.
8852
8853 * decl2.c (build_expr_from_tree): Expand the name for a method call.
8854 * parse.y (object_template_id): Don't try to take the DECL_NAME.
8855
8856 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
8857
8858 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
8859 alloc_expr.
8860 * call.c (build_op_delete_call): Adjust.
8861
8862 * except.c (expand_end_catch_block): Lose rethrow region.
8863 (expand_start_catch_block): Likewise.
8864 (expand_end_catch_block): Don't expand_leftover_cleanups.
8865
8866 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8867
8868 * pt.c (tsubst): Remove tree_cons call (places redundant info into
8869 DECL_TEMPLATE_INSTANTIATION).
8870
8871 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
8872
8873 * tree.c (is_overloaded_fn): Handle getting a fn template.
8874 (really_overloaded_fn): Likewise.
8875 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
8876 * pt.c (check_explicit_specialization): Tweak.
8877 (determine_explicit_specialization): Tweak.
8878
8879 * tree.c, cp-tree.h (get_target_expr): New fn.
8880
8881 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
8882
8883 * pt.c (check_explicit_specialization): Fix misspelling in
8884 diagnostic: `preceeded'.
8885 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
8886 `conversiona'.
8887
8888 1997-12-02 Mark Mitchell <mmitchell@usa.net>
8889
8890 * pt.c (determine_explicit_specialization): Avoid an internal
8891 error for bad specializations.
8892
8893 * method.c (build_overload_value): Handle SCOPE_REF.
8894
8895 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
8896
8897 * class.c (prepare_fresh_vtable): Enable even more complex MI
8898 vtable names.
8899
8900 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
8901
8902 * exception.cc (__check_eh_spec): Optimize a bit.
8903
8904 * exception.cc (__cp_pop_exception): Lose handler arg.
8905 * except.c (do_pop_exception): Likewise.
8906 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
8907 (expand_end_catch_block): Likewise.
8908
8909 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
8910
8911 * pt.c (check_explicit_specialization): Complain about using a
8912 template-id for a non-specialization.
8913
8914 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
8915
8916 * repo.c: Prototype rindex only if needed.
8917 * xref.c: Likewise.
8918
8919 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
8920
8921 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
8922
8923 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
8924
8925 * typeck.c (build_const_cast): Handle references here instead of
8926 handing off to convert_to_reference.
8927
8928 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
8929 TerminateFunctionCall.
8930 (init_exception_processing): Likewise. Terminate et al are now
8931 the fns, not ADDR_EXPRs.
8932 (various): Lose redundant assemble_external calls.
8933 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
8934
8935 * cp-tree.h (struct lang_decl_flags): Add comdat.
8936 (DECL_COMDAT): New macro.
8937 * decl.c (duplicate_decls): Propagate it.
8938 (cp_finish_decl): Handle it.
8939 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
8940
8941 * class.c: Remove static pending_hard_virtuals.
8942 (add_virtual_function): Take pointers to pending_virtuals
8943 and pending_hard_virtuals.
8944 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
8945
8946 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
8947
8948 * decl2.c (import_export_vtable): If we support one_only but not
8949 weak symbols, mark instantiated template vtables one_only.
8950 (import_export_decl): Likewise for tinfo functions.
8951 (finish_vtable_vardecl): Also write out vtables from explicitly
8952 instantiated template classes.
8953 * pt.c (mark_class_instantiated): Revert last change.
8954
8955 * except.c (expand_throw): Call mark_used on the destructor.
8956
8957 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
8958
8959 * lex.c (lang_init): Enable flag_exceptions by default if no
8960 command line switch was specified.
8961
8962 1997-11-26 Mark Mitchell <mmitchell@usa.net>
8963
8964 * pt.c (unify): Handle `void' template parameters in
8965 specializations.
8966
8967 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
8968
8969 * rtti.c (build_dynamic_cast): Handle template case here.
8970 (build_dynamic_cast_1): Not here.
8971
8972 * typeck2.c (digest_init): Make copies where appropriate.
8973
8974 * decl2.c (delete_sanity): resolve_offset_ref.
8975
8976 * except.c: Call terminate without caching so many bits.
8977
8978 * except.c (expand_start_catch_block): Fix catching a reference
8979 to pointer.
8980
8981 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
8982
8983 * init.c (build_new): Copy size to the saveable obstack.
8984
8985 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
8986 TRY_CATCH_EXPR for now.
8987
8988 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
8989
8990 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
8991 has DECL_LANG_SPECIFIC.
8992
8993 * exception.cc (struct cp_eh_info): Add handlers field.
8994 (__cp_push_exception): Initialize it.
8995 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
8996 (__throw_bad_exception): Remove.
8997 * except.c (call_eh_info): Add handlers field.
8998 (get_eh_handlers): New fn.
8999 (push_eh_cleanup): Increment handlers.
9000
9001 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
9002
9003 * except.c (expand_start_eh_spec): Use the try/catch code.
9004 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
9005 doing everything inline.
9006 (init_exception_processing): throw_type_match now takes
9007 const void pointers.
9008 * exception.cc (__check_eh_spec): New fn.
9009 * inc/exception: Neither terminate nor unexpected return.
9010 * decl.c: Make const_ptr_type_node public.
9011 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
9012
9013 * except.c (expand_start_catch_block): We only need the rethrow
9014 region for non-sjlj exceptions.
9015 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
9016
9017 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
9018
9019 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
9020 (various.o): Likewise.
9021 * inc/new: Add placement deletes. Add throw specs for default new.
9022 * new.cc (set_new_handler): Move here from libgcc2.
9023 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
9024 (new): Move from libgcc2. Throw bad_alloc.
9025 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
9026 * decl.c (init_decl_processing): Update exception specs on new and
9027 delete.
9028
9029 * method.c (build_decl_overload_real): Don't mess with global
9030 placement delete.
9031
9032 * init.c (build_new): Check for null throw spec, not nothrow_t.
9033
9034 * decl.c (duplicate_decls): Don't complain about different exceptions
9035 from an internal declaration.
9036
9037 * call.c (build_op_delete_call): Fix check for member fns again.
9038
9039 * decl2.c (import_export_decl): Interface hackery affects
9040 virtual synthesized methods.
9041
9042 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
9043
9044 * decl.c (start_decl): Don't just complain about a mismatched
9045 scope, fix it.
9046
9047 * decl.c (make_implicit_typename): Handle case where t is not
9048 actually from context.
9049 * tree.c (get_type_decl): Lose identifier case.
9050 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
9051 * parse.y (nonnested_type): Just use lookup_name.
9052 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
9053
9054 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
9055
9056 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
9057 T was built in C language context (for example, by
9058 output_func_start_profiler).
9059
9060 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
9061
9062 * decl.c (make_implicit_typename): New fn.
9063 (lookup_name_real): Use it. Use current_class_type as the context.
9064
9065 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
9066
9067 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
9068
9069 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
9070
9071 * friend.c (do_friend): Warn about non-template friends in templates.
9072
9073 * call.c (build_op_delete_call): Fix handling of inherited delete.
9074
9075 * search.c (dfs_record_inheritance): Ignore template type parms.
9076
9077 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
9078
9079 * call.c (build_new_op): Fix copy error.
9080 (build_op_new_call): New fn.
9081 (build_op_delete_call): New fn.
9082 * cp-tree.h: Declare them.
9083 * init.c (build_new): Use them. Support placement delete.
9084 (build_x_delete): Use build_op_delete_call.
9085 (build_delete): Likewise.
9086 * decl2.c (delete_sanity): Likewise.
9087 (coerce_delete_type): Don't complain about placement delete.
9088
9089 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
9090
9091 * call.c (build_new_function_call): Remove unused 'obj' parm.
9092 * cp-tree.h, typeck.c: Adjust.
9093
9094 * init.c (build_new): Make the cleanup last longer.
9095 (expand_vec_init): Call do_pending_stack_adjust.
9096
9097 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
9098
9099 * pt.c (do_type_instantiation): Fix typo.
9100 (mark_class_instantiated): If we support one_only but not weak
9101 symbols, don't mark this as known.
9102
9103 * init.c (build_new): Handle vec delete in EH cleanup.
9104
9105 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9106
9107 * call.c (build_method_call): Call complete_type before checking
9108 for destructor.
9109
9110 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
9111
9112 * decl.c (add_block_current_level): Delete.
9113 * init.c (build_vec_delete_1): Delete build_block and
9114 add_block_current_level calls.
9115
9116 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
9117
9118 * init.c (build_new): Handle freeing allocated memory when the
9119 constructor throws.
9120
9121 * call.c (build_new_method_call): Fix flags arg.
9122
9123 * pt.c (do_type_instantiation): Don't try to instantiate
9124 member templates.
9125 (mark_decl_instantiated): If we support one_only but not
9126 weak symbols, mark this one_only.
9127 * decl2.c (import_export_vtable): Don't defer handling of vtables
9128 if MULTIPLE_SYMBOL_SPACES.
9129
9130 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
9131
9132 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
9133
9134 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
9135
9136 * except.c (do_pop_exception): Return a value.
9137
9138 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
9139
9140 * call.c (build_new_method_call): Handle getting a
9141 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
9142 if we got template parms.
9143 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
9144 not just the args.
9145 * decl2.c (build_expr_from_tree): Tweak last change.
9146 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
9147 (maybe_fold_nontype_arg): Split out from tsubst_copy.
9148 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
9149
9150 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
9151
9152 * pt.c (tsubst_copy): Handle explicit template arguments in
9153 function calls.
9154 * typeck.c (build_x_function_call): Likewise.
9155 * decl2.c (build_expr_from_tree): Lookup function name if it
9156 hasn't been done.
9157
9158 * pt.c (tsubst): Instantiate template functions properly when
9159 template parameter does not appear in function arguments and return
9160 type.
9161 (comp_template_args): Handle member templates required by tsubst.
9162
9163 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
9164
9165 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
9166 previous change.
9167
9168 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
9169
9170 * pt.c (coerce_template_parms): Tweak error message.
9171
9172 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
9173 return type defaults to `int', even if there are storage-class
9174 specifiers.
9175
9176 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
9177
9178 Complete nested exception support.
9179 * except.c (do_pop_exception): Split out...
9180 (push_eh_cleanup): From here. Handle the EH region by hand.
9181 (expand_start_catch_block): Add a new level for the catch parm.
9182 Move the rethrow region outside the two cleanup regions.
9183 Protect the initializer for the catch parm with terminate.
9184 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
9185 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
9186 popping off the middle of the stack.
9187 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
9188 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
9189 (build_cplus_new): Only wrap CALL_EXPRs.
9190 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
9191 the constructor call.
9192
9193 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9194
9195 * Make-lang.in (c++.distdir): Make inc subdirectory.
9196
9197 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
9198
9199 * decl2.c (finish_file): Put back some code.
9200
9201 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
9202
9203 * decl2.c (finish_file): Remove redundant code.
9204 * method.c (emit_thunk): Don't let the backend defer generic thunks.
9205
9206 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
9207
9208 * except.c (call_eh_info): Split out...
9209 (push_eh_info): From here.
9210 (expand_builtin_throw): Use it.
9211 (expand_start_catch_block): Move region start back.
9212
9213 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
9214
9215 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
9216 (real_yylex): Record wide strings using target endianness, not host.
9217
9218 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
9219
9220 * repo.c (rindex): Add decl unconditionally.
9221 (get_base_filename, open_repo_file): Don't cast rindex.
9222 * xref.c (rindex): Add decl unconditionally.
9223 (index): Remove unused decl.
9224 (open_xref_file): Don't cast rindex.
9225
9226 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
9227
9228 * class.c (build_vbase_path): Propagate the result type properly.
9229
9230 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
9231
9232 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
9233 remaining use of saved_throw_type with a call to get_eh_type.
9234
9235 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
9236
9237 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
9238 (file_name_nondirectory): New function, doing the same as the macro.
9239 (set_typedecl_interface_info): Use it instead of the macro.
9240 (check_newline): Likewise.
9241 (handle_cp_pragma): Likewise.
9242
9243 * repo.c (get_base_filename): Cast result of rindex to char*.
9244 (open_repo_file): Likewise.
9245 * xref.c (open_xref_file): Likewise.
9246 * error.c (dump_char): Make its arg int, not char.
9247
9248 * except.c (push_eh_info): Pass the number of fields - 1 down, not
9249 the exact number of fields.
9250
9251 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
9252
9253 Support for nested exceptions.
9254 * tinfo2.cc (__is_pointer): New fn.
9255 * exception.cc (struct cp_eh_info): Define.
9256 (__cp_exception_info, __uncatch_exception): New fns.
9257 (__cp_push_exception, __cp_pop_exception): New fns.
9258 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
9259 Lose empty_fndecl.
9260 (init_exception_processing): Likewise. __eh_pc is now external.
9261 (push_eh_info): New fn.
9262 (get_eh_{info,value,type,caught}): New fns.
9263 (push_eh_cleanup): Just call __cp_pop_exception.
9264 (expand_start_catch_block): Use push_eh_info. Start the eh region
9265 sooner.
9266 (expand_end_eh_spec): Use push_eh_info.
9267 (expand_throw): Call __cp_push_exception to set up the exception info.
9268 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
9269 when we rethrow.
9270 (expand_builtin_throw): Don't refer to empty_fndecl.
9271
9272 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
9273
9274 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
9275
9276 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
9277
9278 * method.c (build_template_parm_names, build_decl_overload_real):
9279 Add static to definitions.
9280 * pt.c (add_to_template_args, note_template_header,
9281 processing_explicit_specialization, type_unification_real): Likewise.
9282 ({determine,check}_explicit_specialization): Use a single string for
9283 error messages.
9284
9285 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
9286
9287 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
9288 (expand_end_catch_block): Likewise.
9289 (expand_end_eh_spec): Likewise.
9290
9291 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
9292
9293 * decl.c (duplicate_decls): Handle template specializations
9294 correctly.
9295 * error.c (dump_function_name): Fix printing of specializations of
9296 member functions that are not member templates.
9297 * cp-tree.h (processing_specialization): Make global.
9298 * pt.c (processing_specialization): Likewise.
9299 * lex.c (cons_up_default_function): Save and restore
9300 processing_specialization to avoid confusion.
9301
9302 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
9303
9304 * decl.c (init_decl_processing): Give null_node unknown* type.
9305 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
9306 (common_type): Likewise.
9307 * error.c (args_as_string): Recognize null_node.
9308
9309 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9310
9311 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
9312 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
9313
9314 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
9315
9316 * Make-lang.in (g++): Include prefix.o.
9317
9318 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
9319
9320 * pt.c (determine_explicit_specialization): Initialize "dummy"
9321 to keep Purify quiet.
9322
9323 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
9324
9325 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
9326 (build_overload_int): Not here.
9327
9328 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
9329
9330 * class.c (build_type_pathname): Remove.
9331 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
9332
9333 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
9334
9335 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
9336 &&label GNU extension.
9337
9338 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
9339
9340 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
9341 so as to avoid incorrect manglings.
9342 * method.c (build_decl_overload_real): Don't mangle return types
9343 for constructors.
9344
9345 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
9346
9347 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
9348 scratch_tree_cons): Define as macros for now.
9349 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
9350 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
9351 typeck2.c: Use them and the expression_obstack variants.
9352
9353 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9354
9355 * decl.c (store_return_init): Allow classes with explicit ctors to
9356 be used with the named return values extension.
9357
9358 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
9359
9360 * pt.c (instantiate_decl): Fix previous change.
9361
9362 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
9363
9364 * pt.c (tsubst): Fix thinko.
9365 (instantiate_decl): Really use the original template.
9366
9367 * call.c (build_new_method_call): Use simple constructor_name for
9368 error messages.
9369
9370 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
9371
9372 * method.c (build_underscore_int): Don't use ANSI specific
9373 features.
9374
9375 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
9376
9377 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
9378 for our key method; it might have been inlined by -O3.
9379
9380 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
9381
9382 * decl.c (make_typename_type): Do not try to call lookup_field for
9383 non-aggregate types.
9384
9385 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
9386
9387 * typeck.c (build_reinterpret_cast): Tweak.
9388
9389 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
9390
9391 * typeck.c (build_reinterpret_cast): Converting a void pointer
9392 to function pointer with a reinterpret_cast produces a warning
9393 if -pedantic is issued.
9394
9395 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
9396
9397 * typeck.c (c_expand_return): Don't warn about returning a
9398 reference-type variable as a reference.
9399
9400 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
9401
9402 * method.c (build_static_name): Fix typo.
9403
9404 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
9405
9406 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
9407 OLDDECL before we try to do DECL_USE_TEMPLATE.
9408
9409 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
9410
9411 * decl.c (duplicate_decls): Don't warn about template instances.
9412
9413 * typeck.c (mark_addressable): Lose ancient code that unsets
9414 DECL_EXTERNAL.
9415
9416 * pt.c (do_decl_instantiation): Lose support for instantiating
9417 non-templates.
9418
9419 * call.c (build_new_function_call): Fix handling of null explicit
9420 template args.
9421 (build_new_method_call): Likewise.
9422
9423 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
9424
9425 * method.c (build_underscore_int): Fix typo.
9426
9427 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
9428
9429 * tree.c (print_lang_statistics): #if 0 call to
9430 print_inline_obstack_statistics until its definition is checked in.
9431
9432 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
9433
9434 * decl2.c (finish_file): Move dump_tree_statistics to end.
9435
9436 * pt.c (instantiate_decl): Look for the original template.
9437 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
9438 of member templates.
9439
9440 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
9441
9442 * Makefile.in (g++FAQ.*): New rules.
9443 (CONFLICTS): Update.
9444 * g++FAQ.texi: Moved from libg++.
9445
9446 * parse.y (PFUNCNAME): Only specify the type once.
9447
9448 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
9449
9450 * lex.c (real_yylex): Clean up the code to fully behave the way
9451 the c-lex.c parser does for complex and real numbers.
9452
9453 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
9454
9455 * method.c (build_decl_overload_real): Reformat.
9456
9457 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
9458
9459 * method.c (synthesize_method): If at_eof, determine our linkage.
9460
9461 1997-09-29 Paul Eggert <eggert@twinsun.com>
9462
9463 * lex.c (real_yylex): Treat `$' just like `_', except issue a
9464 diagnostic if !dollars_in_ident or if pedantic.
9465
9466 * lang-specs.h (@c++): -ansi no longer implies -$.
9467
9468 * decl2.c (lang_decode_option):
9469 -traditional and -ansi now do not mess with
9470 dollars_in_ident.
9471
9472 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
9473
9474 * Makefile.in (parse.o, decl.o): Also depend on
9475 $(srcdir)/../except.h $(srcdir)/../output.h.
9476 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
9477 $(srcdir)/../except.h $(srcdir)/../output.h.
9478 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
9479 ../insn-codes.h.
9480
9481 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
9482
9483 * expr.c (cplus_expand_expr): Make it static.
9484
9485 * decl2.c, init.c, typeck.c: Include "expr.h".
9486 (expand_expr): Use proper values when calling the function.
9487
9488 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
9489
9490 * lang-options.h: New -Wold-style-cast flag.
9491 * cp-tree.h (warn_old_style_cast): New variable.
9492 * decl2.c (warn_old_style_cast): Likewise.
9493 (lang_decode_option): Support -Wold-style-cast.
9494 (reparse_absdcl_as_casts): Produce old-style-cast warning.
9495
9496 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9497
9498 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
9499 TREE_USED, reset value based on already_used.
9500
9501 * init.c (expand_member_init): Revert change.
9502
9503 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
9504
9505 * cp-tree.h, decl.c, decl2.c, pt.c:
9506 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
9507
9508 * decl2.c (lang_decode_option): Add missing ;.
9509
9510 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
9511
9512 * friend.c (do_friend): Disable injection for all template-derived
9513 decls.
9514 * decl2.c (lang_decode_option): Handle -fguiding-decls.
9515 * parse.y (notype_template_declarator): New nonterminal.
9516 (direct_notype_declarator): Use it.
9517 (complex_direct_notype_declarator): Likewise.
9518 (object_template_id): Accept any kind of identifier after TEMPLATE.
9519 (notype_qualified_id): Don't add template declarators here.
9520
9521 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
9522
9523 * call.c (add_template_candidate): Add explicit_targs parameter.
9524 (build_scoped_method_call): Use it.
9525 (build_overload_call_real): Likewise.
9526 (build_user_type_conversion_1): Likewise.
9527 (build_new_function_call): Likewise.
9528 (build_object_call): Likewise.
9529 (build_new_op): Likewise.
9530 (build_new_method_call): Likewise.
9531 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
9532 (build_new_method_call): Likewise.
9533
9534 * class.c (finish_struct_methods): Add specialization pass to
9535 determine which methods were specializing which other methods.
9536 (instantiate_type): Handle TEMPLATE_ID_EXPR.
9537
9538 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
9539
9540 * cp-tree.h (name_mangling_version): New variable.
9541 (flag_guiding_decls): Likewise.
9542 (build_template_decl_overload): New function.
9543 (begin_specialization): Likewise.
9544 (reset_specialization): Likewise.
9545 (end_specialization): Likewise.
9546 (determine_explicit_specialization): Likewise.
9547 (check_explicit_specialization): Likewise.
9548 (lookup_template_function): Likewise.
9549 (fn_type_unification): Add explicit_targs parameter.
9550 (type_unification): Likewise.
9551
9552 * decl.c (duplicate_decls): Add smarts for explicit
9553 specializations.
9554 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
9555 specializations.
9556 (grokfndecl): Call check_explicit_specialization.
9557
9558 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
9559 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
9560 (check_classfn): Handle specializations.
9561
9562 * error.c (dump_function_name): Print specialization arguments.
9563
9564 * friend.c (do_friend): Don't call pushdecl for template
9565 instantiations.
9566
9567 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
9568
9569 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
9570 and -fno-guiding-decls.
9571
9572 * lex.c (identifier_type): Return PFUNCNAME for template function
9573 names.
9574
9575 * method.c (build_decl_overload_real): New function.
9576 (build_template_parm_names): New function.
9577 (build_overload_identifier): Use it.
9578 (build_underscore_int): New function.
9579 (build_overload_int): Use it. Add levels for template
9580 parameters.
9581 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
9582 (build_overload_nested_names): Handle template type parameters.
9583 (build_template_decl_overload): New function.
9584
9585 * parse.y (YYSTYPE): New ntype member.
9586 (nested_name_specifier): Use it.
9587 (nested_name_specifier_1): Likewise.
9588 (PFUNCNAME): New token.
9589 (template_id, object_template_id): New non-terminals.
9590 (template_parm_list): Note specializations.
9591 (template_def): Likewise.
9592 (structsp): Likewise.
9593 (fn.def2): Handle member template specializations.
9594 (component_decl_1): Likewise.
9595 (direct_notype_declarator): Handle template-ids.
9596 (component_decl_1): Likewise.
9597 (direct_notype_declarator): Handle template-ids.
9598 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
9599
9600 * pt.c (processing_specializations): New variable.
9601 (template_header_count): Likewise.
9602 (type_unification_real): New function.
9603 (processing_explicit_specialization): Likewise.
9604 (note_template_header): Likewise.
9605 (is_member_template): Handle specializations.
9606 (end_template_decl): Call reset_specialization.
9607 (push_template_decl): Handle member template specializations.
9608 (tsubst): Likewise.
9609 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
9610 (instantiate_template): Handle specializations.
9611 (instantiate_decl): Likewise.
9612 (fn_type_unification): Handle explicit_targs.
9613 (type_unification): Likewise. Allow incomplete unification
9614 without an error message, if allow_incomplete.
9615 (get_bindings): Use new calling sequence for fn_type_unification.
9616
9617 * spew.c (yylex): Handle PFUNCNAME.
9618
9619 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
9620 (really_overloaded_fn): Likewise.
9621 (get_first_fn): Handle function templates.
9622
9623 * typeck.c (build_x_function_call): Use really_overloaded_fn.
9624 Handle TEMPLATE_ID_EXPR.
9625 (build_x_unary_op): Likewise.
9626 (build_unary_op): Likewise.
9627 (mark_addressable): Templates whose address is taken are marked
9628 as used.
9629
9630 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
9631
9632 * decl.c (init_decl_processing): Declare __builtin_constant_p as
9633 accepting any kind of type, not only int.
9634
9635 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
9636
9637 * search.c (get_matching_virtual): Notice virtual bases when sorrying
9638 about covariant returns.
9639
9640 * parse.y (member_init): Also imply typename here. Remove ancient
9641 extension for initializing base members.
9642
9643 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
9644
9645 Handle multi-level typenames and implicit typename in base list.
9646 * parse.y (typename_sub{,[0-2]}): New rules.
9647 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
9648 (nonnested_type): New rule.
9649 (complete_type_name): Use it.
9650 (base_class.1): Use typename_sub and nonnested_type.
9651 (nested_name_specifier): Don't elide std:: here.
9652 * decl.c (make_typename_type): Handle getting a type for NAME.
9653 (lookup_name_real): Turn std:: into :: here.
9654
9655 Rvalue conversions were removed in London.
9656 * call.c (is_subseq): Don't consider lvalue transformations.
9657 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
9658 (joust): Re-enable ?: kludge.
9659
9660 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
9661
9662 * decl.c (start_function): Up warning of no return type to be a
9663 pedwarn.
9664
9665 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9666
9667 * init.c (expand_member_init): Don't set TREE_USED.
9668 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
9669 set,don't clear TREE_USED wholesale.
9670
9671 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
9672
9673 * call.c (build_over_call): Do require_complete_type before
9674 build_cplus_new.
9675
9676 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
9677
9678 * search.c (lookup_field): Call complete_type in all cases.
9679
9680 * decl.c (finish_function): Just warn about flowing off the end.
9681
9682 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
9683
9684 * decl.c (grokparms): Don't bash a permanent list node if we're
9685 in a function.
9686
9687 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
9688
9689 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
9690
9691 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
9692
9693 * call.c (build_new_op): Give better error for syntactically
9694 correct, but semantically invalid, use of undeclared template.
9695
9696 * call.c (compare_qual): Handle pmfs.
9697
9698 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
9699 after the exception spec.
9700
9701 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
9702
9703 * call.c (null_ptr_cst_p): Integer type, not integral type.
9704
9705 * call.c (joust): Disable warnings until they can be moved to the
9706 right place.
9707
9708 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
9709
9710 * Makefile.in, config-lang.in: Convert to autoconf.
9711
9712 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
9713
9714 * decl.c (lookup_name_real): Add implicit 'typename' to types from
9715 base classes.
9716
9717 * pt.c (most_specialized_class): Fix typo.
9718 (tsubst): Move constant folding to TREE_VEC case.
9719
9720 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
9721
9722 * pt.c (do_poplevel): Don't warn about unused local variables
9723 while processing_template_decl since we don't always know whether
9724 or not they will need constructing/destructing.
9725
9726 * pt.c (uses_template_parms): Check the values of an enumeration
9727 type to make sure they don't depend on template parms.
9728
9729 * decl.c (make_typename_type): Don't lookup the field if the
9730 context uses template parms, even if we're not
9731 processing_template_decl at the moment.
9732
9733 * pt.c (coerce_template_parms): Avoid looking at the
9734 TYPE_LANG_DECL portion of a typename type, since there won't be
9735 one.
9736 (tsubst): Do constant folding as necessary to make sure that
9737 arguments passed to lookup_template_class really are constants.
9738
9739 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
9740
9741 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
9742 * decl2.c (finish_file): Only register exception tables if we
9743 need to.
9744
9745 * decl.c (init_decl_processing): Add __builtin_[fs]p.
9746
9747 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
9748
9749 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
9750
9751 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
9752
9753 * error.c (dump_decl): Avoid crashing when presented with a
9754 uninitialized constant, as can occur with a template parameter.
9755 (dump_expr): Make sure that there are enough levels of
9756 current_template_parms before we start diving through them.
9757
9758 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
9759
9760 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
9761 c-typeck.c.
9762
9763 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9764
9765 * except.c (expand_throw): Call build_delete for all
9766 exception types, not just objects with destructors.
9767
9768 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
9769
9770 * decl.c (current_local_enum): Remove static.
9771 * pt.c (tsubst_enum): Save and restore value of current_local_enum
9772 in case template is expanded in enum decl.
9773 (instantiate_class_template): Use new tsubst_enum signature.
9774 (tsubst_expr): Likewise.
9775
9776 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
9777
9778 * pt.c (begin_member_template_processing): Take a function as
9779 argument, not a set of template arguments. Use the template
9780 parameters, rather than the arguments. Handle non-type parameters
9781 correctly. Push a binding level for the parameters so that multiple
9782 member templates using the same parameter names can be declared.
9783 (end_member_template_processing): Pop the binding level.
9784 (push_template_decl): Mark member templates as static when
9785 appropriate.
9786
9787 * lex.c (do_pending_inlines): Pass the function, not its template
9788 arguments, to begin_member_template_processing.
9789 (process_next_inline): Likewise.
9790 (do_pending_defargs): Likewise.
9791
9792 * error.c (dump_expr): Obtain the correct declaration for a
9793 TEMPLATE_CONST_PARM.
9794
9795 * call.c (add_template_conv_candidate): New function.
9796 (build_object_call): Handle member templates, as done in the other
9797 build_ functions.
9798
9799 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
9800
9801 * decl.c (replace_defag): Undo previous change.
9802 * lex.c (do_pending_defargs): Deal with member templates.
9803
9804 * pt.c (is_member_template): Avoid crashing when passed a
9805 non-function argument.
9806
9807 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
9808
9809 * class.c (grow_method): Remove check for redeclaration.
9810
9811 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
9812
9813 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
9814 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
9815 (PRIMARY_TEMPLATE_P): Use it.
9816 * call.c (build_overload_call_real): Use it.
9817 * class.c (instantiate_type): Likewise.
9818 * decl.c (decls_match): Likewise.
9819 * method.c (build_overload_identifier): Likewise.
9820 * pt.c (push_template_decl): Likewise.
9821 (classtype_mangled_name): Likewise.
9822 (lookup_template_class): Likewise.
9823
9824 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
9825 DECL_NTPARMS to conform to usage elsewhere.
9826 * call.c (add_template_candidate): Likewise.
9827 * class.c (instantiate_type): Likewise.
9828 * pt.c (instantiate_template): Likewise.
9829 (get_bindings): Likewise.
9830
9831 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
9832 is_member_template.
9833
9834 * pt.c (unify): Undo changes to allow multiple levels of template
9835 parameters.
9836 (type_unification): Likewise.
9837 (fn_type_unification): Likewise.
9838 (get_class_bindings): Likewise.
9839 * cp-tree.h (Likewise).
9840
9841 * decl.c (replace_defarg): Check that the type of the default
9842 parameter does not invlove a template type before complaining
9843 about the initialization.
9844
9845 * error.c (dump_expr): Deal with template constant parameters in
9846 member templates correctly.
9847
9848 * pt.c (is_member_template): Deal with class specializations
9849 correctly.
9850 (tsubst): Handle "partial instantiation" of member templates
9851 correctly.
9852
9853 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
9854
9855 * pt.c (type_unification): Change calling sequence to allow for
9856 multiple levels of template parameters.
9857 (tsubst_expr): Likewise.
9858 (tsubst): Likewise.
9859 (tsubst_copy): Likewise.
9860 (instantiate_template): Likewise.
9861 (unify): Likewise.
9862 * call.c (build_overload_call_real): Use it.
9863 (add_builtin_candidate): Use it.
9864 (build_new_method_call): Use it.
9865 * class.c (instantiate_type): Use it.
9866 * decl.c (grokdeclarator): Use it.
9867 * decl2.c (finish_file): Use it.
9868 * method.c (build_overload_identifier): Use it.
9869
9870 * call.c (add_template_candidate): Add additional parameter for
9871 the function return type. Call fn_type_unification istead of
9872 type_unification.
9873 (build_user_type_conversion_1): Handle member templates.
9874 (build_new_function_call): Likewise.
9875 (build_new_op): Likewise.
9876 (build_new_method_call): Likewise.
9877
9878 * class.c (grow_method): Don't give an error message indicating
9879 that two member templates with the same name are ambiguous.
9880 (finish_struct): Treat member template functions just like member
9881 functions.
9882
9883 * cp-tree.h (check_member_template): Add declaration.
9884 (begin_member_template_processing): Likewise.
9885 (end_member_template_processing): Likewise.
9886 (fn_type_unification): Likewise.
9887 (is_member_template): Likewise.
9888 (tsubst): Change prototype.
9889 (tsubst_expr): Likewise.
9890 (tsubst_copy): Likewise.
9891 (instantiate_template): Likewise.
9892 (get_bindings): Likewise.
9893
9894 * decl.c (decls_match): Handle multiple levels of template
9895 parameters.
9896 (pushdecl): Handle template type params just like other type
9897 declarations.
9898 (push_class_level_binding): Return immediately if the
9899 class_binding_level is NULL.
9900 (grokfndecl): If check_classfn() returns a member_template, use
9901 the result of the template, not the template itself.
9902
9903 * decl2.c (check_member_template): New function. Check to see
9904 that the entity declared to be a member template can be one.
9905 (check_classfn): Allow redeclaration of member template functions
9906 with different types; the new functions can be specializations or
9907 explicit instantiations.
9908
9909 * error.c (dump_decl): Handle multiple levels of template
9910 parameters.
9911 (dump_function_decl): Update to handle function templates.
9912
9913 * lex.c (do_pending_inlines): Set up template parameter context
9914 for member templates.
9915 (process_next_inline): Likewise.
9916
9917 * method.c (build_overload_identifier): Adjust for multiple levels
9918 of template parameters.
9919
9920 * parse.y (fn.def2): Add member templates.
9921 (component_decl_1): Likewise.
9922
9923 * pt.c (begin_member_template_processing): New function.
9924 (end_member_template_processing): Likewise.
9925 (is_member_template): Likewise.
9926 (fn_type_unification): Likewise.
9927 (current_template_parms): Return a vector of all the template
9928 parms, not just the innermost level of parms.
9929 (push_template_decl): Deal with the possibility of member
9930 templates.
9931 (lookup_template_class): Likewise.
9932 (uses_template_parms): Likewise.
9933 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
9934 TEMPLATE_CONST_PARM to deal with multiple levels of template
9935 arguments. Add processing of TEMPLATE_DECL to produce new
9936 TEMPLATE_DECLs from old ones.
9937 (do_decl_instantiation): Handle member templates.
9938
9939 * search.c (lookup_fnfields_1): Handle member template conversion
9940 operators.
9941
9942 * tree.c (cp_tree_equal): Check the levels, as well as the
9943 indices, of TEMPLATE_CONST_PARMs.
9944
9945 * typeck.c (comptypes): Check the levels, as well as the indices,
9946 fo TEMPLATE_TYPE_PARMs.
9947 (build_x_function_call): Treat member templates like member
9948 functions.
9949
9950 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
9951
9952 * typeck.c (c_expand_return): Always convert_for_initialization
9953 before checking for returning a pointer to local.
9954
9955 * pt.c (type_unification): If strict and the function parm doesn't
9956 use template parms, just compare types.
9957
9958 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
9959
9960 * method.c (build_overloaded_value): Replace direct call
9961 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
9962
9963 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
9964
9965 * typeck.c (convert_arguments): Don't arbitrarily choose the first
9966 of a set of overloaded functions.
9967
9968 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
9969
9970 * lex.c (real_yylex): Don't elide __FUNCTION__.
9971
9972 * method.c (build_overload_value): Add in_template parm.
9973 (build_overload_int): Likewise.
9974 (build_overload_identifier): Pass it.
9975
9976 * decl.c (duplicate_decls): Don't bash a previous template
9977 definition with a redeclaration.
9978
9979 * pt.c (unify): float doesn't match double.
9980
9981 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
9982 TYPE_DECL. Handle getting non-template types.
9983 * parse.y (explicit_instantiation): Use typespec instead of
9984 aggr template_type.
9985
9986 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
9987
9988 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
9989
9990 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
9991
9992 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
9993 (compare_ics): Likewise.
9994
9995 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
9996
9997 * call.c (joust): Warn about choosing one conversion op over
9998 another because of 'this' argument when the other return type is
9999 better.
10000 (source_type): New fn.
10001
10002 * call.c (build_new_op): Strip leading REF_BIND from first operand
10003 to builtin operator.
10004
10005 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
10006 use its RTL.
10007
10008 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
10009
10010 * call.c (null_ptr_cst_p): Remove support for (void*)0.
10011
10012 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
10013
10014 * typeck.c (expand_target_expr): Make definition match declaration.
10015
10016 * class.c (get_basefndecls): Make definition match declaration.
10017
10018 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
10019
10020 * input.c (sub_getch): Eventually give up and release the input file.
10021
10022 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
10023 right place.
10024
10025 * call.c (joust): Tweak message.
10026
10027 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
10028
10029 * error.c (type_as_string): Put const/volatile on template type
10030 parameters where appropriate.
10031
10032 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
10033
10034 * call.c (strictly_better): Make arguments unsigned ints.
10035
10036 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
10037
10038 * lex.c (real_yylex): Refer to __complex instead of complex.
10039
10040 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
10041
10042 * lex.c (real_yylex): Don't use getc directly.
10043
10044 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
10045
10046 * call.c (is_subseq): Don't try to be clever.
10047
10048 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
10049
10050 * parse.y, pt.c: Include "except.h".
10051 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
10052 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
10053 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
10054 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
10055 prototyping.
10056
10057 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
10058
10059 * decl2.c (mark_vtable_entries): Instead of replacing pure
10060 virtuals with a reference to __pure_virtual, copy the decl and
10061 change the RTL.
10062
10063 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
10064
10065 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
10066
10067 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
10068
10069 * pt.c (instantiate_class_template): Call repo_template_used
10070 before finish_prevtable_vardecl.
10071
10072 * call.c (is_subseq): New fn.
10073 (compare_ics): Use it.
10074
10075 * repo.c (finish_repo): Don't crash on no args.
10076
10077 * parse.y (named_complex_class_head_sans_basetype): Handle
10078 explicit global scope.
10079 * decl2.c (handle_class_head): New fn.
10080
10081 * pt.c (unify): Add CONST_DECL case.
10082
10083 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10084
10085 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
10086
10087 * cp-tree.h (report_type_mismatch): Add prototype.
10088 * call.c (build_overload_call_real): Remove erroneous fourth
10089 argument to report_type_mismatch.
10090 (build_user_type_conversion_1): Remove erroneous second arg to
10091 tourney.
10092 (build_new_function_call): Likewise.
10093 (build_object_call): Likewise.
10094 (build_new_op): Likewise.
10095 (build_new_method_call): Likewise.
10096
10097 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
10098
10099 * error.c (dump_decl): Don't bother processing a function with no
10100 DECL_LANG_SPECIFIC.
10101
10102 * method.c (emit_thunk): Call init_function_start in the macro case.
10103
10104 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
10105
10106 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
10107 defined and used to set flag_vtable_thunks.
10108
10109 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
10110
10111 * parse.y: Don't clear the inlines from their obstack until they've
10112 all been processed.
10113
10114 * decl.c (duplicate_decls): Don't complain about exception
10115 specification mismatch if flag_exceptions is off.
10116
10117 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
10118
10119 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
10120
10121 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
10122
10123 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
10124 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
10125 Include <stdio.h> before include files that formerly used STDIO_PROTO.
10126
10127 * decl.c, g++spec.c, lex.c, method.c, repo.c:
10128 Include "config.h" first, as per autoconf manual.
10129
10130 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
10131
10132 * decl.c (duplicate_decls): Tweak wording.
10133 * lex.c (do_pending_defargs): Don't die if we see a default arg
10134 that isn't a DEFAULT_ARG.
10135 * error.c (dump_expr): Handle DEFAULT_ARG.
10136
10137 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
10138 * lang-options.h: Add -fhandle-exceptions.
10139
10140 * class.c (build_vtable): Vtables are artificial.
10141 (prepare_fresh_vtable): Likewise.
10142
10143 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
10144
10145 * cvt.c (ocp_convert): After converting to the target type, set
10146 LOOKUP_NO_CONVERSION.
10147
10148 * call.c (joust): Warn about potentially confusing promotion rules
10149 with -Wsign-promo.
10150 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
10151
10152 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
10153
10154 * exception.cc: Declare __terminate_func with noreturn attribute.
10155
10156 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
10157
10158 * parse.y: Break out eat_saved_input, handle errors.
10159 (function_try_block): Use compstmt instead of compstmt_or_error.
10160
10161 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
10162
10163 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
10164
10165 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
10166
10167 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
10168 existence of cc1plus check whether $(LANGUAGES) contains C++.
10169
10170 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
10171
10172 * method.c (do_build_copy_constructor): When copying an anonymous
10173 union member loop around to handle nested anonymous unions. Use
10174 the offset of the member relative to the outer structure, not the
10175 union.
10176
10177 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
10178
10179 * call.c (resolve_args): New fn.
10180 (build_new_function_call): Use it.
10181 (build_object_call): Likewise.
10182 (build_new_method_call): Likewise.
10183
10184 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
10185
10186 * call.c (build_over_call): tsubst all default parms from templates.
10187
10188 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
10189
10190 * decl.c (struct cp_function): Add static_labelno.
10191 (push_cp_function_context): Save it.
10192 (pop_cp_function_context): Restore it.
10193
10194 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
10195
10196 * typeck.c (build_component_ref_1): Convert from reference.
10197
10198 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10199
10200 * parse.y (current_declspecs, prefix_attributes): Initialize to
10201 NULL_TREE.
10202
10203 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
10204 before we try to force it to be a TREE_LIST.
10205 (decl): Make sure $1.t is non-nil.
10206
10207 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
10208
10209 * pt.c (uses_template_parms): Handle template first-parse codes.
10210
10211 * decl.c (cp_finish_decl): Only warn about user-defined statics.
10212
10213 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
10214
10215 * pt.c (unify): Handle BOOLEAN_TYPE.
10216
10217 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
10218 * pt.c (tsubst): Don't set it.
10219 * call.c (build_over_call): Use uses_template_parms.
10220
10221 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
10222
10223 * method.c (build_overload_nested_name): Use static_labelno
10224 instead of var_labelno.
10225 (build_qualified_name): New fn.
10226 (build_overload_name): Split out from here.
10227 (build_static_name): Use build_qualified_name.
10228 * decl.c (cp_finish_decl): Statics in extern inline functions
10229 have comdat linkage.
10230 (start_function): Initialize static_labelno.
10231
10232 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10233
10234 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
10235 before "all member functions in class [] are private".
10236
10237 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
10238
10239 * lex.c (do_scoped_id): convert_from_reference.
10240 * init.c (build_offset_ref): Likewise.
10241
10242 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
10243
10244 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
10245
10246 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
10247
10248 * typeck.c (get_member_function_from_ptrfunc): Promote index
10249 before saving it.
10250
10251 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
10252
10253 * tree.c (layout_basetypes): Move non-virtual destructor warning.
10254 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
10255
10256 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
10257
10258 * decl.c (grokdeclarator): Call add_defarg_fn for the function
10259 type, too.
10260 * lex.c (add_defarg_fn): Adjust.
10261 (do_pending_defargs): Adjust. Don't skip the first parm.
10262
10263 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
10264
10265 * decl.c (build_enumerator): Global enumerators are also readonly.
10266
10267 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
10268 (build_dynamic_cast): Call it and convert_from_reference.
10269
10270 * lex.c (add_defarg_fn): New fn.
10271 (snarf_defarg): Don't add to defarg_types.
10272 (do_pending_defargs): Lose defarg_types. All fns we process now
10273 have defargs.
10274 * decl.c (grokfndecl): Call add_defarg_fn.
10275
10276 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
10277 * cp-tree.def: Add DEFAULT_ARG.
10278 * spew.c (yylex): Call snarf_defarg as appropriate.
10279 * parse.y: New tokens DEFARG and DEFARG_MARKER.
10280 (defarg_again, pending_defargs, defarg, defarg1): New rules.
10281 (structsp): Use pending_defargs.
10282 (parms, full_parm): Use defarg.
10283 * lex.c (init_lex): Initialize inline_text_firstobj.
10284 (do_pending_inlines): Never pass the obstack to feed_input.
10285 (process_next_inline): Call end_input instead of restore_pending_input.
10286 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
10287 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
10288 * input.c (end_input): New fn.
10289 (sub_getch): At the end of some fed input, just keep returning EOF
10290 until someone calls end_input.
10291 Remove 'obstack' field from struct input_source.
10292 * decl.c (grokparms): Handle DEFAULT_ARG.
10293 (replace_defarg): New fn.
10294 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
10295
10296 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
10297
10298 * call.c (implicit_conversion): If nothing else works, try binding
10299 an rvalue to a reference.
10300
10301 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
10302
10303 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
10304 ifndef for Cygwin32 to include SIGSEGV.
10305
10306 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
10307
10308 * class.c (finish_struct_1): Only complain about pointers without
10309 copy stuff if there are any constructors.
10310
10311 * rtti.c (build_dynamic_cast): Call complete_type on the types.
10312
10313 * decl.c (grokfndecl): If the function we chose doesn't actually
10314 match, die.
10315
10316 * decl2.c (grokclassfn): Don't specify 'const int' for the
10317 artificial destructor parm.
10318
10319 * pt.c (type_unification): If we are called recursively, nothing
10320 decays.
10321
10322 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
10323
10324 * decl.c (init_decl_processing): Stop trying to catch signals
10325 other than SIGABRT since the Cygwin32 library doesn't support
10326 them correctly yet. This fixes a situation in which g++ causes
10327 a hang on SIGSEGVs and other such signals in our Win32-hosted
10328 tools.
10329
10330 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
10331
10332 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
10333
10334 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
10335
10336 * typeck2.c (store_init_value): Always return the value if our
10337 type needs constructing.
10338
10339 * method.c (hack_identifier): Convert class statics from
10340 reference, too.
10341
10342 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
10343
10344 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
10345
10346 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
10347
10348 * typeck.c (c_expand_return): Make sure we clean up temporaries at
10349 the end of return x;
10350
10351 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10352
10353 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
10354
10355 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
10356
10357 * except.c (expand_builtin_throw): Add support
10358 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
10359
10360 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
10361
10362 * repo.c (extract_string): Null-terminate.
10363
10364 * cp-tree.h (TI_SPEC_INFO): New macro.
10365 (CLASSTYPE_TI_SPEC_INFO): New macro.
10366 * pt.c (push_template_decl): Correctly determine # of template parms
10367 for partial specs.
10368
10369 * call.c (compare_ics): Really fix 'this' conversions.
10370
10371 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
10372 non-template fn.
10373
10374 * pt.c (push_template_decl): Complain about mismatch in # of
10375 template parms between a class template and a member template.
10376
10377 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
10378
10379 * method.c (synthesize_method): You can't call
10380 function_cannot_inline_p after finish_function.
10381 * decl.c (finish_function): Turn on flag_inline_functions and turn
10382 off DECL_INLINE before handing a synthesized method to the
10383 backend.
10384
10385 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
10386
10387 * method.c (synthesize_method): Remove July 30 change to never set
10388 DECL_INLINE if at_eof.
10389
10390 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
10391
10392 * xref.c (GNU_xref_member): Ensure that the node has a
10393 decl_lang_specific part before checking DECL_FRIEND_P.
10394
10395 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
10396
10397 * pt.c (instantiate_class_template): Diagnose non-class types used
10398 as bases.
10399
10400 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
10401
10402 * typeck.c (build_conditional_expr): Use convert_for_initialization
10403 instead of convert_and_check.
10404
10405 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10406
10407 * parse.y (typespec): Don't pedwarn for typeof.
10408
10409 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
10410
10411 * repo.c (finish_repo): Only check changes if we would write a
10412 repo file.
10413
10414 * call.c (compare_ics): Fix handling of 'this' conversions.
10415
10416 * pt.c (do_decl_instantiation): Support static data too. Rename
10417 from do_function_instantiation.
10418 * cp-tree.h: Adjust.
10419 * parse.y: Adjust.
10420
10421 * repo.c (extract_string): New fn.
10422 (get_base_filename): Use it.
10423 (init_repo): Compare old args with current args.
10424
10425 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
10426
10427 * Makefile.in, Make-lang.in: Protect C-ls with a comment
10428 character, idea from Paul Eggert <eggert@twinsun.com>.
10429
10430 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
10431
10432 * typeck.c (c_expand_return): Be more persistent in looking for
10433 returned temps.
10434
10435 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
10436 pointer to reference.
10437
10438 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
10439
10440 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
10441
10442 * init.c (build_member_call, build_offset_ref):
10443 Use do_scoped_id instead of do_identifier.
10444
10445 * cvt.c (convert): Remove bogosity.
10446
10447 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10448
10449 * cvt.c (build_up_reference): Do checks of ARGTYPE and
10450 TARGET_TYPE before trying to use get_binfo.
10451
10452 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
10453
10454 * cvt.c (build_up_reference): Call get_binfo to get access control.
10455
10456 * decl2.c (import_export_decl): If we don't support weaks, leave
10457 statics undefined.
10458
10459 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
10460
10461 * except.c (expand_builtin_throw): Add support for machines that
10462 cannot access globals after throw's epilogue when
10463 -fno-sjlj-exceptions is used.
10464
10465 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
10466
10467 * parse.y: 'std::' becomes '::'.
10468 * lex.c (real_yylex): Remove 'namespace' warning.
10469 * init.c (build_member_call): Ignore 'std::'.
10470 (build_offset_ref): Likewise.
10471 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
10472 (do_toplevel_using_decl): Ignore 'using std::whatever'.
10473 * decl.c (push_namespace): Just sorry.
10474 (pop_namespace): Nop.
10475 (init_decl_processing): Declare std namespace.
10476
10477 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
10478
10479 * search.c (push_class_decls): A name which ambiguously refers to
10480 several instantiations of the same template just refers to the
10481 template.
10482
10483 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
10484
10485 * decl.c (build_enumerator): Fix problem with unsigned long
10486 enumerated values being smashed to ints, causing overflow
10487 when computing next enumerated value (for enum values around
10488 MAX_VAL).
10489
10490 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
10491
10492 * typeck.c (build_component_ref): Only call mark_used on a decl.
10493
10494 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10495
10496 * typeck.c (build_c_cast): Make the check for a ptr to function
10497 more specific before possible default_conversion call.
10498
10499 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
10500
10501 * except.c (expand_exception_blocks): Simplify and fix and make
10502 sure we don't end a region in a sequence, as expand_end_bindings
10503 doesn't like it.
10504
10505 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
10506
10507 * except.c (init_exception_processing): Mark terminate as not
10508 returning so that the optimizer can optimize better.
10509
10510 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
10511
10512 * cvt.c (convert): Don't do any extra work, if we can avoid it
10513 easily.
10514
10515 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
10516
10517 * *.[chy]: Change cp_convert to ocp_convert, change convert to
10518 cp_convert. convert is now reserved for the backend, and doesn't
10519 have the semantics a frontend person should ever want.
10520
10521 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
10522
10523 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
10524 Lose -traditional support.
10525
10526 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
10527
10528 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
10529
10530 * parse.y (self_reference): Do it for templates, too.
10531 * class.c (pushclass): Don't overload_template_name; the alias
10532 generated by build_self_reference serves the same purpose.
10533
10534 * tree.c (list_hash): Make static, take more args.
10535 (list_hash_lookup): Likewise.
10536 (list_hash_add): Make static.
10537 (list_hash_canon): Lose.
10538 (hash_tree_cons): Only build a new node if one isn't already in the
10539 hashtable.
10540 (hash_tree_chain): Use hash_tree_cons.
10541 * cp-tree.h: Adjust.
10542 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
10543 of calling lookup_name.
10544
10545 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
10546
10547 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
10548 doesn't refer to the CONST_DECLs.
10549
10550 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
10551
10552 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
10553 is bigger.
10554 (expand_class_desc): Convert the last argument to a sizetype.
10555
10556 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10557
10558 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
10559 __real__): Add reswords.
10560 * hash.h: Regenerate.
10561 * lex.h (rid): Add RID_COMPLEX.
10562 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
10563 * lex.c (init_lex): Add building of RID_COMPLEX.
10564 (real_yylex): General cleanup in line with what c-lex.c also has,
10565 sans the cruft for traditional; add handling of SPEC_IMAG, complex
10566 types, and imaginary numeric constants.
10567 * parse.y (REALPART, IMAGPART): Add tokens.
10568 (unary_expr): Add REALPART and IMAGPART rules.
10569 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
10570 * decl.c (complex_{integer,float,double,long}_type_node): Define
10571 types.
10572 (init_decl_processing): Set up the types.
10573 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
10574 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
10575 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
10576 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
10577 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
10578 COMPLEX_TYPE case.
10579 * method.c (build_overload_name): Add handling of the different
10580 COMPLEX_TYPEs, prefixing them with `J'.
10581 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
10582 as a template parm.
10583 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
10584 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
10585 (mapcar): Handle COMPLEX_CST.
10586 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
10587 (common_type): Add code for complex types.
10588 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
10589 (convert_for_assignment): Likewise.
10590 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
10591
10592 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
10593
10594 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
10595 tsubst_expr, as it might try to do overload resolution.
10596
10597 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
10598
10599 * pt.c (instantiate_class_template): Oops.
10600
10601 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
10602
10603 * cp-tree.def: Add TAG_DEFN.
10604 * pt.c (tsubst_enum): New fn.
10605 (instantiate_class_template): Use it.
10606 (tsubst_expr): Support TAG_DEFN.
10607 (tsubst): Support local enums.
10608 (tsubst_copy): Likewise.
10609 * decl.c (finish_enum): Likewise.
10610 (start_enum): If this is a local enum, switch to permanent_obstack.
10611
10612 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
10613
10614 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
10615 (finish_function): Put the base init code for constructors just
10616 after the parm cleanup insns.
10617 (struct cp_function): Add last_parm_cleanup_insn.
10618 (push_cp_function_context): Likewise.
10619 (pop_cp_function_context): Likewise.
10620
10621 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
10622
10623 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
10624
10625 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10626
10627 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
10628 for THUNK_FNDECL before we switch to temporary allocation.
10629
10630 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
10631
10632 * call.c (build_new_op): Handle null arg2 for ?:.
10633
10634 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
10635
10636 * except.c (expand_exception_blocks): Ensure that we flow through
10637 the end of the exception region for the exception specification.
10638 Move exception region for the exception specification in, so that
10639 it doesn't protect the parm cleanup. Remove some obsolete code.
10640 * decl.c (store_parm_decls): Likewise.
10641 (finish_function): Likewise.
10642
10643 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
10644
10645 * init.c (build_new): Fix nothrow handling.
10646
10647 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10648
10649 * init.c (emit_base_init): Don't warn about the initialization
10650 list for an artificial member.
10651
10652 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10653
10654 * expr.c (do_case): Handle !START case for the error msg.
10655
10656 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
10657
10658 * decl2.c, lang-options.h: New option -Weffc++.
10659 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
10660 to -Weffc++.
10661
10662 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
10663 to MULTIPLE_SYMBOL_SPACES.
10664
10665 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
10666
10667 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
10668
10669 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
10670
10671 * typeck.c (c_expand_return): Don't complain about returning void
10672 to void in an artificial function.
10673 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
10674 don't set DECL_RESULT, set DECL_ARTIFICIAL.
10675 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
10676
10677 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
10678
10679 * init.c (init_decl_processing): Add support for setjmp/longjmp based
10680 exception handling.
10681 * except.c (init_exception_processing): Likewise.
10682 (expand_end_catch_block): Likewise.
10683 (expand_exception_blocks): Likewise.
10684 (expand_throw): Likewise.
10685 * exception.cc (__default_terminate): Likewise.
10686
10687 * init.c (perform_member_init): Use new method of expr level
10688 cleanups, instead of cleanups_this_call and friends.
10689 (emit_base_init): Likewise.
10690 (expand_aggr_vbase_init_1): Likewise.
10691 (expand_vec_init): Likewise.
10692 * decl.c (cp_finish_decl): Likewise.
10693 (expand_static_init): Likewise.
10694 (store_parm_decls): Likewise.
10695 (cplus_expand_expr_stmt): Likewise.
10696 * decl2.c (finish_file): Likewise.
10697
10698 * Make-lang.in (exception.o): Ok to compile with -O now.
10699
10700 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
10701 we know it will be done later by the backend.
10702
10703 * decl2.c (lang_f_options): Remove support for short temps.
10704 * lang-options.h: Likewise.
10705
10706 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
10707
10708 * tree.c (varargs_function_p): New fn.
10709 * method.c (emit_thunk): Replace broken generic code with code to
10710 generate a heavyweight thunk function.
10711
10712 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
10713
10714 * pt.c (process_template_parm): pedwarn about floating-point parms.
10715
10716 * decl.c (grokdeclarator): inline no longer implies static.
10717
10718 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
10719
10720 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
10721
10722 * class.c (check_for_override): The signature of an overriding
10723 function is not changed.
10724
10725 * call.c (build_over_call): Move setting of conv into the loop.
10726 Note: this change, along with the related changes of the 18th thru
10727 the 20th of April, fix an infinite loop problem in conversions.
10728
10729 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
10730
10731 * call.c (build_user_type_conversion_1): Really ignore rvalue
10732 conversions when looking for a REFERENCE_TYPE.
10733
10734 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
10735 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
10736 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
10737 (build_unary_op): Likewise.
10738 * call.c (build_over_call): See through a CONVERT_EXPR around the
10739 ADDR_EXPR for on a temporary.
10740 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
10741 the ADDR_EXPR for a local variable.
10742
10743 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
10744
10745 * call.c (build_user_type_conversion_1): If we're trying to
10746 convert to a REFERENCE_TYPE, only consider lvalue conversions.
10747 (build_new_function_call): Print candidates.
10748 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
10749 (reference_binding): Binding a temporary of a reference-related type
10750 is BAD.
10751
10752 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10753
10754 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
10755 * tinfo2.cc (type_info::before): Likewise.
10756
10757 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
10758
10759 * call.c (implicit_conversion): Oops.
10760
10761 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
10762
10763 * call.c (implicit_conversion): Try to find a reference conversion
10764 before binding a const reference to a temporary.
10765
10766 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
10767
10768 * exception.cc (__default_unexpected): Call terminate by default,
10769 so that if the user overrides terminate, the correct function will
10770 be called.
10771
10772 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
10773
10774 * parse.y (left_curly): Avoid trying to use any fields of
10775 error_mark_node, as there aren't any.
10776
10777 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
10778
10779 * lex.c (do_identifier): Avoid breaking on overloaded methods
10780 as default arguments.
10781
10782 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
10783
10784 * call.c (add_template_candidate): Initialize the variable "dummy".
10785
10786 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
10787
10788 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
10789 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
10790
10791 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10792
10793 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
10794 (debug_binfo): Delete decl, not needed.
10795
10796 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
10797 promotes_to_aggr_type): Delete fns.
10798 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
10799 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
10800 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
10801
10802 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
10803
10804 * friend.c (is_friend_type): Delete fn.
10805 * cp-tree.h (is_friend_type): Delete decl.
10806
10807 * decl.c (original_result_rtx, double_ftype_double,
10808 double_ftype_double_double, int_ftype_int, long_ftype_long,
10809 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
10810 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
10811
10812 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
10813 fwd decls.
10814 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
10815
10816 * decl.c (pushdecl_nonclass_level): #if 0, unused.
10817 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
10818
10819 * lex.c (reinit_lang_specific): #if 0, unused.
10820 * cp-tree.h (reinit_lang_specific): #if 0 decl.
10821
10822 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
10823 * cp-tree.h (revert_static_member_fn): Delete decl.
10824
10825 * class.c (root_lang_context_p): Delete fn.
10826 * cp-tree.h (root_lang_context_p): Delete decl.
10827
10828 * decl.c (set_current_level_tags_transparency): #if 0, unused.
10829 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
10830
10831 * lex.c (set_vardecl_interface_info): Make static.
10832 * cp-tree.h (set_vardecl_interface_info): Delete decl.
10833
10834 * call.c (find_scoped_type): Make static.
10835 * cp-tree.h (find_scoped_type): Delete decl.
10836
10837 * search.c (convert_pointer_to_vbase): Make static.
10838 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
10839
10840 * decl.c (const_ptr_type_node): Likewise.
10841 * cp-tree.h (const_ptr_type_node): Delete decl.
10842
10843 * typeck.c (common_base_type): Make static.
10844 * cp-tree.h (common_base_types): Delete erroneous decl.
10845
10846 * pt.c (classtype_mangled_name): Make static.
10847 * cp-tree.h (classtype_mangled_name): Delete decl.
10848
10849 * lex.c (check_newline): Make static.
10850 * cp-tree.h (check_newline): Delete decl.
10851
10852 * typeck.c (build_x_array_ref): Delete fn, same idea as
10853 grok_array_decl.
10854 * cp-tree.h (build_x_array_ref): Delete decl.
10855
10856 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
10857 copy_lang_decl.
10858 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
10859
10860 * class.c (build_vtable_entry): Make static.
10861 * cp-tree.h (build_vtable_entry): Delete decl.
10862
10863 * class.c (build_vbase_pointer): Make static.
10864 * cp-tree.h (build_vbase_pointer): Delete decl.
10865
10866 * sig.c (build_sptr_ref): Add forward decl and make static.
10867 * cp-tree.h (build_sptr_ref): Delete decl.
10868
10869 * call.c (build_new_method_call): Add forward decl and make static.
10870 * cp-tree.h (build_new_method_call): Delete decl.
10871
10872 * call.c (build_object_call): Make static.
10873 * class.c (check_for_override, complete_type_p, mark_overriders):
10874 Likewise.
10875 * decl.c (cp_function_chain): Likewise.
10876 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
10877 Likewise.
10878 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
10879 Likewise.
10880 * tree.c (build_cplus_array_type_1): Likewise.
10881 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
10882 (comp_target_parms): Likewise.
10883
10884 * init.c (build_builtin_call): Make static.
10885 * cp-tree.h (build_builtin_call): Delete decl.
10886
10887 * typeck.c (binary_op_error): Delete decl.
10888 * cp-tree.h (binary_op_error): Likewise.
10889
10890 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10891
10892 * call.c (build_method_call): Compare against error_mark_node
10893 directly, rather than the ERROR_MARK tree code.
10894 * cvt.c (cp_convert): Likewise.
10895 * decl.c (print_binding_level): Likewise.
10896 (duplicate_decls): Likewise.
10897 (grokdeclarator): Likewise.
10898 (grokdeclarator): Likewise.
10899 * init.c (expand_aggr_init_1): Likewise.
10900 (decl_constant_value): Likewise.
10901 * method.c (build_opfncall): Likewise.
10902 (hack_identifier): Likewise.
10903 * typeck.c (build_modify_expr): Likewise.
10904
10905 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
10906
10907 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
10908
10909 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
10910
10911 * pt.c (coerce_template_parms): Add new error message.
10912
10913 * method.c (build_overload_value): Implement name mangling for
10914 floating-point template arguments.
10915
10916 * method.c (build_overload_int, icat, dicat): Fix mangling of template
10917 arguments whose absolute value doesn't fit in a signed word.
10918
10919 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10920
10921 * friend.c: New file; put all of the friend stuff in here.
10922 * init.c: Instead of here.
10923 * Makefile.in (CXX_OBJS): Add friend.o.
10924 (friend.o): Add dependencies.
10925 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
10926
10927 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
10928
10929 * call.c (build_scoped_method_call): Complain if the scope isn't a
10930 base.
10931
10932 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
10933
10934 * parse.y (left_curly): Don't crash on erroneous type.
10935
10936 * init.c (build_delete): Fix type of ref.
10937
10938 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
10939
10940 * search.c (get_vbase_1): Renamed from get_vbase.
10941 (get_vbase): Wrapper, now non-static.
10942 (convert_pointer_to_vbase): Now static.
10943
10944 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
10945 * init.c (build_delete): Pass one.
10946 (build_partial_cleanup_for): Use build_scoped_method_call.
10947 * decl.c (finish_function): Pass a binfo.
10948
10949 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
10950
10951 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
10952
10953 * typeck.c (build_c_cast): Lose other reference to flag.
10954
10955 * call.c (build_field_call): Don't look for [cd]tor_identifier.
10956 * decl2.c (delete_sanity): Remove meaningless use of
10957 LOOKUP_HAS_IN_CHARGE.
10958 * decl.c (finish_function): Use build_scoped_method_call instead
10959 of build_delete for running vbase dtors.
10960 * init.c (build_delete): Call overload resolution code instead of
10961 duplicating it badly.
10962
10963 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
10964
10965 * call.c (build_over_call): Call mark_used before trying to elide
10966 the call.
10967
10968 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
10969
10970 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10971
10972 * typeck.c (build_modify_expr): Always pedwarn for a cast to
10973 non-reference used as an lvalue.
10974
10975 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
10976
10977 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
10978
10979 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
10980
10981 * parse.y (handler): Fix template typo.
10982
10983 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
10984
10985 * error.c (lang_decl_name): New fn.
10986 * tree.c (lang_printable_name): Use it.
10987
10988 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
10989
10990 * g++spec.c: Include config.h so that we can catch bzero #defines
10991 from the config file.
10992
10993 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
10994
10995 * new1.cc: Include a declaration for malloc, to avoid warning, and
10996 avoid lossing on systems that require one (ones that define malloc
10997 in xm.h).
10998
10999 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11000
11001 * decl2.c (max_tinst_depth): New variable.
11002 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
11003 option.
11004 * pt.c (max_tinst_depth): Variable moved.
11005 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
11006 as legal.
11007
11008 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
11009
11010 * decl.c (xref_basetypes): Allow a base class that depends on
11011 template parms to be incomplete.
11012
11013 * decl2.c (build_expr_from_tree): Support typeid(type).
11014 * rtti.c (get_typeid): Support templates.
11015 (expand_si_desc, expand_class_desc): Fix string length.
11016 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
11017
11018 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
11019
11020 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
11021
11022 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
11023
11024 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
11025
11026 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
11027 smashes together template and non-template decls of the same
11028 signature.
11029
11030 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
11031
11032 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
11033
11034 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11035
11036 * decl.c (duplicate_decls): Next route, pedwarn about different
11037 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
11038
11039 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11040
11041 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
11042 (struct lang_type): Delete has_default_implementation member.
11043 Increase dummy to 21.
11044 * decl.c (start_method): Delete usage.
11045
11046 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
11047 store_after_parms, start_decl_1, auto_function): Add decls.
11048 (get_arglist_len_in_bytes, declare_implicit_exception,
11049 have_exceptions_p, make_type_decl, typedecl_for_tag,
11050 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
11051 build_component_type_expr, cplus_exception_name,
11052 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
11053 * call.c (build_this): Make static.
11054 (is_complete): Likewise.
11055 (implicit_conversion): Likewise.
11056 (reference_binding): Likewise.
11057 (standard_conversion): Likewise.
11058 (strip_top_quals): Likewise.
11059 (non_reference): Likewise.
11060 (build_conv): Likewise.
11061 (user_harshness): Likewise.
11062 (rank_for_ideal): Likewise.
11063 * decl.c (start_decl_1): Delete forward decl.
11064 (push_decl_level): Make static.
11065 (resume_binding_level): Make static.
11066 (namespace_bindings_p): Make static.
11067 (declare_namespace_level): Make static.
11068 (lookup_name_real): Make static.
11069 (duplicate_decls): Make static. Take register off NEWDECL and
11070 OLDDECL parm decls.
11071 * decl2.c (get_sentry): Make static.
11072 (temp_name_p): Delete fn.
11073 * except.c (auto_function): Delete decl.
11074 * lex.c (handle_{cp,sysv}_pragma): Make static.
11075 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
11076 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
11077 * pt.c (tsubst_expr_values): Make static.
11078 * rtti.c (combine_strings): Delete decl.
11079
11080 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
11081
11082 * pt.c (push_template_decl): Handle getting a typedef.
11083
11084 * call.c (build_new_function_call): Complain about void arg.
11085
11086 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11087
11088 * decl.c (duplicate_decls): Give pedwarn of different exceptions
11089 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
11090
11091 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
11092
11093 * except.c (expand_throw): Don't expand the cleanup tree here,
11094 since we are not going to write the rtl out. Fixes problem with
11095 -g -O on SPARC.
11096
11097 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
11098
11099 * Make-lang.in: Add $(exeext) as necessary.
11100
11101 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
11102
11103 * parse.y (handler_seq): Must have at least one catch clause.
11104
11105 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
11106
11107 * call.c (add_builtin_candidate): Restore ?: hack.
11108
11109 * decl.c (grok_op_properties): More warnings.
11110
11111 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11112
11113 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
11114 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
11115
11116 * decl.c (duplicate_decls): Scale back to a warning, and only do
11117 'em if -pedantic.
11118
11119 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
11120
11121 * decl.c (duplicate_decls): pedwarn mismatched exception
11122 specifications.
11123
11124 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
11125
11126 * call.c (build_new_method_call): Don't display the invisible
11127 argument for controlling virtual bases.
11128
11129 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
11130
11131 * new: Add nothrow new and delete, bad_alloc and throw specifications
11132 for delete.
11133 * decl.c (init_decl_processing): Add throw specification for delete.
11134 * new.cc (nothrow): Define.
11135 * lex.c (real_yylex): Removing warning that throw and friends are
11136 keywords.
11137 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
11138 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
11139 * Make-lang.in: Add new{1,2}.{cc,o}.
11140
11141 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
11142
11143 * lex.c (cons_up_default_function): Fix return type of synth op=.
11144
11145 * init.c (emit_base_init): Add warnings for uninitialized members
11146 and bases.
11147
11148 * decl.c (xref_basetypes): Add warning for non-polymorphic type
11149 with destructor used as base type.
11150
11151 * decl.c (grok_op_properties): Add warning for op= returning void.
11152 * typeck.c (c_expand_return): Add warning for op= returning anything
11153 other than *this.
11154
11155 * class.c (finish_struct_1): Add warning for class with pointers
11156 but not copy ctor or copy op=.
11157
11158 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
11159 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
11160 (instantiate_template): If -fexternal-templates, add this
11161 instantiation to pending_templates.
11162
11163 * decl2.c (copy_assignment_arg_p): Disable old hack to support
11164 Booch components.
11165
11166 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
11167
11168 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
11169
11170 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
11171
11172 * call.c (standard_conversion): Handle getting references. Tack
11173 on RVALUE_CONV here. Do it for non-class types, too.
11174 (reference_binding): Pass references to standard_conversion.
11175 (implicit_conversion): Likewise.
11176 (add_builtin_candidate): Disable one ?: kludge.
11177 (convert_like): Handle RVALUE_CONVs for non-class types.
11178 (joust): Disable the other ?: kludge.
11179
11180 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11181
11182 * decl.c (init_decl_processing): Add code to build up common
11183 function types beforehand, to avoid creation then removal of
11184 things already in the hash table.
11185
11186 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
11187
11188 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
11189 the arguments.
11190
11191 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
11192 current_template_parms.
11193
11194 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
11195
11196 * search.c (lookup_field): Don't return a function, check want_type.
11197
11198 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11199
11200 * init.c (build_new): Make sure PLACEMENT has a type.
11201
11202 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
11203
11204 * init.c (build_new): Support new (nothrow).
11205
11206 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11207
11208 * pt.c (instantiate_decl): Also do push_to_top_level before setting
11209 up DECL_INITIAL.
11210
11211 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
11212 * pt.c (tsubst): Defer instantiation of default args.
11213 * call.c (build_over_call): Until here.
11214
11215 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11216
11217 * search.c (lookup_field): Make sure we have an
11218 IDENTIFIER_CLASS_VALUE before we try to return it.
11219
11220 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11221
11222 * call.c (build_method_call): Delete unused var PARM.
11223 (build_overload_call_real): Likewise.
11224 (build_object_call): Delete unused var P.
11225 (build_new_op): Likewise.
11226 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
11227 var definitions, which are never used.
11228 (shadow_tag): Delete unused var FN.
11229 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
11230 * init.c (build_new): Delete unused var ALLOC_TEMP.
11231 * method.c (hack_identifier): Delete unused var CONTEXT.
11232 (do_build_copy_constructor): Delete unused var NAME.
11233 (synthesize_method): Delete unused var BASE.
11234 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
11235 * rtti.c (build_headof): Delete unused var VPTR.
11236 (get_typeid): Delete unused var T.
11237 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
11238 and ORIG_OP2.
11239 (build_ptrmemfunc): Delete unused vars U and NINDEX.
11240 * typeck2.c (build_functional_cast): Delete unused var BINFO.
11241
11242 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
11243
11244 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
11245 things in a type being defined.
11246 * decl.c (finish_enum): Reverse the values so that they are in
11247 the correct order.
11248
11249 * pt.c (instantiate_class_template): Don't initialize
11250 BINFO_BASETYPES until the vector is filled out.
11251 (unify): Don't abort on conflicting bindings, just fail.
11252 (instantiate_decl): Do push_tinst_level before any tsubsting.
11253
11254 * method.c (build_overload_value): Handle getting a
11255 TEMPLATE_CONST_PARM for a pointer.
11256
11257 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
11258
11259 * init.c (expand_member_init): Don't give 'not a base' error for
11260 templates.
11261
11262 * pt.c (instantiate_decl): Call import_export_decl later.
11263
11264 * pt.c (instantiate_class_template): Return a value.
11265
11266 * parse.y (extension): New rule for __extension__.
11267 (extdef, unary_expr, decl, component_decl): Use it.
11268
11269 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
11270
11271 * class.c (base_binfo): Remove unused base_has_virtual member.
11272 (finish_base_struct): Likewise.
11273 (finish_struct_1): Likewise.
11274
11275 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
11276
11277 * search.c (expand_upcast_fixups): Fix bogus code generation
11278 problem where the generated code uses the wrong index into the
11279 runtime built vtable on the stack. Old code could clobber random
11280 stack values.
11281
11282 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
11283
11284 * init.c (perform_member_init): Make sure the partial EH cleanups
11285 live on the function_obstack.
11286
11287 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
11288
11289 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
11290 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
11291
11292 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
11293
11294 * decl.c (grokvardecl): Avoid ANSI style initialization.
11295
11296 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
11297
11298 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
11299
11300 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
11301
11302 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
11303
11304 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11305
11306 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
11307 arguments we compare against. Start the count of I at 1, not 0,
11308 since argv[0] is still the command.
11309
11310 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
11311
11312 * lang-specs.h: Accept .cp as an C++ extension.
11313
11314 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11315
11316 * cp-tree.h (ptr_reasonably_similar): Add decl.
11317
11318 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11319
11320 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
11321 pointer. New local SPECBITS with the parm's value.
11322 (grokdeclarator): Pass &specbits down.
11323
11324 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
11325 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
11326
11327 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
11328 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
11329
11330 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
11331 not an error_mark_node.
11332
11333 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
11334
11335 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
11336 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
11337
11338 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
11339
11340 * decl.c (grokdeclarator): When giving an anonymous struct a name,
11341 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
11342 not affected).
11343
11344 * typeck2.c (build_m_component_ref): If component is a pointer
11345 to data member, resolve the OFFSET_REF now.
11346
11347 * call.c (convert_like): Don't go into infinite recursion.
11348
11349 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
11350
11351 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
11352 * tree.c (layout_basetypes): And on the vbase ptr.
11353
11354 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
11355
11356 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
11357 CHAR_TYPE_SIZE so bool is always the same size as another type.
11358
11359 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
11360
11361 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
11362
11363 * decl2.c (grok_x_components): Remove synthesized methods from
11364 TYPE_METHODS of an anonymous union, complain about member
11365 functions.
11366 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
11367 anonymous unions.
11368 (finish_function): Just clear the DECL_RTL of our arguments.
11369
11370 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
11371
11372 * decl2.c (finish_file): Emit DWARF debugging info for static data
11373 members.
11374
11375 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
11376
11377 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
11378
11379 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
11380 IDENTIFIER_NODE.
11381
11382 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
11383
11384 * Make-lang.in (g++-cross$(exeext)): Fix typo.
11385
11386 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11387
11388 Make the g++ driver now be a standalone program, rather than one
11389 that tries to run the gcc driver after munging up the options.
11390 * Make-lang.in (g++.c, g++spec.o): New rules.
11391 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
11392 added.
11393 (g++$(exeext)): New rule, based on xgcc rule.
11394 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
11395 * g++spec.c: New file.
11396 * g++.c: Removed file.
11397
11398 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
11399
11400 * cvt.c (build_up_reference): Arrange for any temporary values
11401 that have been keep in registers until now to be put into memory.
11402
11403 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11404
11405 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
11406 that make -j3 bootstrap works better.
11407
11408 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
11409
11410 * decl.c (pushtag): Do pushdecl for anon tags.
11411
11412 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
11413
11414 * typeck.c (c_expand_return): Fix logic.
11415 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
11416
11417 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
11418
11419 * g++.c (main): Make sure arglist has a final NULL entry. Add
11420 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
11421 stdin/stdout of the invoked program are redirected to
11422 nowheresville.
11423
11424 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
11425
11426 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
11427
11428 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
11429
11430 * init.c (resolve_offset_ref): Handle obj.vfn better.
11431 * typeck.c (build_component_ref): Set TREE_TYPE on result from
11432 build_vfn_ref.
11433
11434 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
11435
11436 * typeck.c (convert_for_assignment): Also handle anachronistic
11437 implicit conversions from (::*)() to cv void*.
11438 * cvt.c (cp_convert_to_pointer): Likewise.
11439
11440 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
11441
11442 * lex.c (handle_cp_pragma): Fix bogus warning.
11443
11444 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
11445
11446 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
11447 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
11448
11449 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
11450
11451 * class.c (finish_struct_1): Support DWARF2_DEBUG.
11452 * search.c (dfs_debug_mark): Likewise.
11453 * decl2.c (finish_vtable_vardecl): Likewise.
11454 * decl.c (pushtag, finish_enum): Likewise.
11455 * lex.c (check_newline): Use debug_* instead of calling *out
11456 functions directly.
11457
11458 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11459
11460 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
11461 on some picky hosts.
11462
11463 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
11464
11465 * class.c (finish_struct_1): A class has a non-trivial copy
11466 constructor if it has virtual functions.
11467
11468 * cvt.c (cp_convert): Always call a constructor.
11469
11470 * call.c (reference_binding): Still tack on a REF_BIND
11471 for bad conversions.
11472 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
11473
11474 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
11475 (c_expand_return): Likewise.
11476 * typeck2.c (digest_init): Likewise for { }.
11477 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
11478 * cvt.c (cp_convert): Handle failure better.
11479
11480 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11481
11482 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
11483 of GCC be path-relative.
11484
11485 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
11486
11487 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
11488 it does need choose-temp.o and pexecute.o.
11489
11490 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11491
11492 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
11493 that we still use it.
11494 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
11495
11496 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
11497
11498 * init.c (expand_default_init): Avoid calling constructors to
11499 initialize reference temps.
11500
11501 * cvt.c (convert_to_reference): Fix.
11502
11503 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
11504
11505 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
11506 (convert_to_reference): Likewise.
11507 * typeck.c (convert_for_initialization): Likewise.
11508 * init.c (expand_default_init): Likewise.
11509 (expand_aggr_init_1): Likewise.
11510 * cp-tree.h (CONV_NONCONVERTING): Lose.
11511 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
11512 * *.c: Adjust.
11513 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
11514
11515 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
11516
11517 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
11518
11519 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
11520
11521 * init.c (expand_aggr_init_1): Don't crash on non-constructor
11522 TARGET_EXPR.
11523
11524 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11525
11526 * g++.c: Include gansidecl.h.
11527 (VPROTO, PVPROTO, VA_START): Delete.
11528 (choose_temp_base_try, choose_temp_base, perror_exec,
11529 run_dos) [__MSDOS__]: Delete fns.
11530 (pfatal_with_name): Delete fn.
11531 (temp_filename): Declare like in gcc.c.
11532 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
11533 (error_count, signal_count): Define.
11534 (error): Delete both definitions.
11535 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
11536 (pfatal_pexecute): Add fn from gcc.c.
11537 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
11538 code to use the pexecute stuff also used by gcc.c.
11539 (MIN_FATAL_STATUS): Define.
11540 * Make-lang.in (g++): Add dependency on and linking with
11541 choose-temp.o and pexecute.o.
11542
11543 * cp-tree.h: Include gansidecl.h.
11544 (STDIO_PROTO): Delete #undef/#define.
11545 * cvt.c (NULL): Delete #undef/#define.
11546 * expr.c (NULL): Likewise.
11547 * init.c (NULL): Likewise.
11548 * rtti.c (NULL): Likewise.
11549 * xref.c (NULL): Likewise.
11550
11551 * cp-tree.h (build_user_type_conversion): Add prototype.
11552 * call.c (build_user_type_conversion): Delete prototype. Correct
11553 decl of FLAGS arg to be an int.
11554 * cvt.c (build_user_type_conversion): Likewise.
11555
11556 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
11557
11558 * cp-tree.def: Add TRY_BLOCK and HANDLER.
11559 * except.c (expand_start_catch_block): Support templates.
11560 * parse.y (try_block, handler_seq): Likewise.
11561 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
11562
11563 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
11564
11565 * pt.c (current_template_args): New fn.
11566 (push_template_decl): Use it.
11567 * decl.c (grokdeclarator): Use it.
11568
11569 * decl2.c (build_expr_from_tree): Dereference ref vars.
11570
11571 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
11572 the decl-specifier-seq.
11573
11574 * decl.c (grok_op_properties): Don't force the type of a conversion
11575 op to be complete. Don't warn about converting to the same type
11576 for template instantiations.
11577
11578 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
11579 methods.
11580
11581 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
11582
11583 * typeck.c (get_delta_difference): Remove previous bogusness.
11584 Don't give errors if force is set.
11585
11586 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
11587
11588 * decl2.c (finish_file): Don't emit debug info.
11589 * decl.c (pushdecl): Lose obsolete code.
11590 (grokdeclarator): Still do the long long thing after complaining.
11591 * search.c (note_debug_info_needed): Don't do anything if we're in a
11592 template.
11593 * method.c (synthesize_method): For non-local classes,
11594 push_to_top_level first.
11595
11596 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
11597
11598 * typeck.c (get_delta_difference): Add no_error parameter.
11599 (build_ptrmemfunc): Call get_delta_difference with no_error set;
11600 we don't want error messages when converting unrelated
11601 pointer-to-member functions.
11602
11603 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
11604
11605 * error.c (dump_expr): Improve the wording on error messages that
11606 involve pointer to member functions.
11607
11608 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
11609
11610 * cvt.c (cp_convert_to_pointer): Move code for conversions from
11611 (::*)() to void* or (*)() up a bit, so that we can convert from
11612 METHOD_TYPEs as well.
11613
11614 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
11615
11616 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
11617 There are no 'member' types.
11618 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
11619 (build_x_typeid): Handle errors.
11620
11621 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
11622
11623 * typeck.c (convert_for_assignment): Handle anachronistic implicit
11624 conversions from (::*)() to void* or (*)().
11625 * cvt.c (cp_convert_to_pointer): Likewise.
11626 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
11627 conversions from here.
11628 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
11629 * lang-options.h: Likewise.
11630 * decl2.c (warn_pmf2ptr): Define.
11631 * cp-tree.h: Declare it.
11632 * typeck2.c (digest_init): Allow pmfs down into
11633 convert_for_initialization.
11634
11635 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
11636
11637 * typeck.c (c_expand_return): Fix for returning overloaded fn.
11638
11639 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
11640
11641 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
11642 * decl.c (grok_reference_init): Pass DIRECT_BIND.
11643 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
11644 DIRECT_BIND.
11645 * call.c (convert_like): Don't pass INDIRECT_BIND.
11646 * typeck.c (convert_arguments): Likewise.
11647 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
11648
11649 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
11650
11651 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
11652 similar code in build_up_ref.
11653 * cvt.c (build_up_reference): Drastically simplify.
11654
11655 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
11656
11657 * typeck.c (signed_or_unsigned_type): If the given type already
11658 as the correct signedness, then just return it.
11659
11660 * typeck.c ({un,}signed_type): If can't do anything, call
11661 signed_or_unsigned_type.
11662
11663 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
11664
11665 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
11666 current_class_type is NULL.
11667
11668 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
11669
11670 * class.c (finish_struct_1): Avoid empty structs by adding a field
11671 so layout_type gets the mode right.
11672
11673 * typeck.c (c_expand_return): Drastically simplify.
11674
11675 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
11676
11677 * typeck.c (decay_conversion): Handle overloaded methods.
11678
11679 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
11680
11681 * call.c (build_over_call): A TARGET_EXPR has side-effects.
11682
11683 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
11684
11685 * cvt.c (convert_to_pointer_force): Add code to support pointer to
11686 member function to pointer to function conversions.
11687 * init.c (resolve_offset_ref): Add code to allow faked up objects,
11688 ignoring them if they are not used, and giving an error, if they
11689 are needed.
11690 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
11691 code, and so that we can give an error, if we needed an object,
11692 and one was not provided.
11693 (build_c_cast): Don't call default_conversion when we want to
11694 convert to pointer to function from a METHOD_TYPE.
11695
11696 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
11697
11698 * Make-lang.in (cplib2.ready): Fix logic.
11699
11700 * decl.c (shadow_tag): Only complain about non-artificial function
11701 members.
11702
11703 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
11704
11705 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
11706
11707 * expr.c (cplus_expand_expr): Pre-tweak call_target like
11708 expand_inline_function would.
11709
11710 * pt.c (mark_decl_instantiated): If extern_p, call
11711 mark_inline_for_output.
11712
11713 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
11714
11715 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
11716 pmd conversions.
11717
11718 * typeck.c (get_delta_difference): Fix wording, as we can be used
11719 for pointer to data members.
11720
11721 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
11722
11723 * pt.c (tsubst): If the function decl isn't a member of this
11724 template, return a copy of the decl (including copying the
11725 lang-specific part) so we don't hose ourselves later.
11726
11727 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
11728
11729 * class.c (finish_struct): Remove DWARF-specific tag handling.
11730 * decl.c (pushtag): Likewise.
11731 (finish_function): Always clear DECL_ARGUMENTS on function decls with
11732 no saved RTX.
11733 * decl2.c (finish_file): Emit DWARF debugging info for static data
11734 members.
11735
11736 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
11737
11738 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
11739 isn't the same as the new one before we whack it.
11740
11741 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
11742
11743 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
11744 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
11745 warn_traditional and warn_strict_prototypes; remove ancient
11746 'overload' code; remove references to flag_traditional.
11747
11748 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
11749
11750 * input.c (sub_getch): Handle 8-bit characters in string literals.
11751
11752 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
11753
11754 * tree.c (mapcar): Handle CONSTRUCTORs.
11755 (copy_to_permanent): Handle expression_obstack properly.
11756
11757 * Make-lang.in (cplib2.txt): Also depend on the headers.
11758
11759 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
11760 INT_TYPE_SIZE.
11761 (expand_class_desc): Use USItype for offset field.
11762 * tinfo.h (struct __class_type_info): Likewise.
11763
11764 * method.c (build_overload_int): TYPE_PRECISION should be applied
11765 to types.
11766
11767 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
11768
11769 * call.c (build_new_op): A COND_EXPR involving void must be a
11770 builtin.
11771
11772 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
11773
11774 * typeck.c (build_x_component_ref): New fn.
11775 (build_object_ref): Use it.
11776 * parse.y (primary): Use it.
11777 * decl2.c (build_expr_from_tree): Use it.
11778 * cp-tree.h: Declare it.
11779
11780 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
11781 * error.c (dump_type_suffix): Handle variable arrays.
11782
11783 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11784
11785 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
11786
11787 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
11788
11789 * decl.c (lookup_name_real): Don't try to look up anything in a
11790 TYPENAME_TYPE.
11791
11792 * tinfo2.cc (__throw_type_match_rtti): Oops.
11793
11794 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11795
11796 * Make-lang.in (exception.o): Use -fno-PIC for now.
11797
11798 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
11799
11800 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
11801 calling them.
11802 (get_tinfo_fn_dynamic): Extracted from build_typeid.
11803 * tinfo2.cc (__dynamic_cast): Adjust.
11804
11805 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
11806 (build_x_typeid): Likewise.
11807
11808 * parse.y: Call build_x_typeid instead of build_typeid.
11809 * cp-tree.def: Add TYPEID_EXPR.
11810 * pt.c (tsubst_copy): Handle typeid.
11811 * decl2.c (build_expr_from_tree): Likewise.
11812 * rtti.c (build_x_typeid): Throw bad_typeid from here.
11813 (build_typeid): Not here.
11814 * cp-tree.h: Declare build_x_typeid.
11815
11816 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
11817
11818 * call.c (convert_like): Pull out constant values.
11819
11820 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
11821
11822 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
11823
11824 * decl.c (init_decl_processing): Create short int types before
11825 creating size_t in case a machine description needs to use
11826 unsigned short for size_t.
11827
11828 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
11829
11830 * Make-lang.in (exception.o): Turn off pic.
11831
11832 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
11833 type, multi-level ptr conversions.
11834
11835 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
11836 (throw_bad_cast): Use it.
11837 (throw_bad_typeid): New fn.
11838 (build_typeid): Throw bad_typeid as needed.
11839 Use build_call.
11840 (synthesize_tinfo_fn): Handle functions and arrays before checking
11841 for cv-quals.
11842
11843 * Remove .h from standard C++ headers, add new.h, move into inc
11844 subdirectory.
11845
11846 * exception*: Remove pointer from object, constructors. Add
11847 default exception::what that uses type_info::name. Add
11848 __throw_bad_typeid.
11849
11850 * init.c (build_new): Don't add a cookie to new (void *) T[2].
11851
11852 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
11853
11854 * Make-lang.in: Building C++ code depends on cc1plus.
11855
11856 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11857
11858 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
11859 a HOST_WIDE_INT, not a tree.
11860
11861 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
11862
11863 * exception.cc: Don't include <stdlib.h>.
11864
11865 * Make-lang.in (c++.clean): Remove cplib2.*.
11866
11867 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
11868
11869 * parse.y (component_decl_1, component_costructor_declarator case):
11870 Pass attributes/prefix_attributes in tree list.
11871
11872 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
11873
11874 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
11875
11876 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
11877
11878 * lex.c (do_identifier): Don't do deferred lookup in a template
11879 header.
11880
11881 * typeck2.c (store_init_value): Oops.
11882
11883 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
11884 New files for C++ lang-support library.
11885 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
11886 (CXX_LIB2FUNCS): Define.
11887 And rules for building the C++ lang-support code.
11888 * config-lang.in (headers): Define.
11889 (lib2funcs): Define.
11890
11891 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
11892
11893 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
11894 digest_init.
11895 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
11896 * typeck2.c (store_init_value): Check for initializing pmf with { }
11897 here.
11898 (process_init_constructor): Not here.
11899
11900 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
11901
11902 * pt.c (begin_template_parm_list): Increment
11903 processing_template_decl here.
11904 (end_template_parm_list): Not here.
11905 (process_template_parm): No need to add 1 to it now.
11906 * *.c: Use processing_template_decl instead of current_template_parms
11907 to check for being in a template.
11908
11909 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
11910 (tsubst_copy): Handle CONSTRUCTOR.
11911 (instantiate_decl): Set up context properly for variables.
11912 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
11913 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
11914
11915 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11916
11917 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
11918
11919 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
11920
11921 * method.c (make_thunk): Call comdat_linkage before setting the
11922 TREE_CODE.
11923
11924 * decl2.c (comdat_linkage): Use make_decl_one_only.
11925 (import_export_decl): Likewise.
11926 * decl.c (init_decl_processing): Check supports_one_only instead of
11927 SUPPORTS_WEAK.
11928
11929 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
11930
11931 * decl2.c (grokfield): Tighten checking for access decls.
11932
11933 * decl.c (make_typename_type): Resolve references to
11934 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
11935 (lookup_name_real): Types that depend on a template parameter get
11936 an implicit 'typename' unless they're in the current scope.
11937 (start_decl_1): We don't care about incomplete types that depend
11938 on a template parm.
11939 (grokdeclarator): Resolve 'typename's in the type specifier that
11940 refer to members of the current scope.
11941
11942 * call.c (build_over_call): Remove 'inline called before
11943 definition' diagnostic.
11944 (build_method_call): Likewise.
11945 * decl.c (duplicate_decls): Downgrade 'used before declared
11946 inline' to a warning, only with -Winline.
11947
11948 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
11949
11950 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
11951
11952 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
11953
11954 * call.c (build_method_call): When calling a signature
11955 default implementation, as in other cases, let instance_ptr simply
11956 be instance.
11957
11958 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
11959
11960 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
11961
11962 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
11963
11964 * except.c (expand_start_catch_block): Add a pushlevel so that -g
11965 works on hppa and SPARC.
11966
11967 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11968
11969 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
11970
11971 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
11972
11973 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
11974 before testing whether it's a signature.
11975
11976 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
11977
11978 * call.c (build_new_method_call): Don't complain about signature
11979 pointers and references not being an aggr type.
11980 (build_this): If a signature pointer or reference was passed in,
11981 just return it.
11982 (build_new_method_call): If instance is a signature pointer, set
11983 basetype to the signature type of instance.
11984 * sig.c (build_signature_method_call): Deleted basetype and
11985 instance parameters, they can be found as the DECL_CONTEXT of
11986 function and as the first argument passed in.
11987 * cp-tree.h: Changed declaration of build_signature_method_call.
11988 * call.c (build_method_call): Deleted first two arguments in call
11989 of build_signature_method_call.
11990 (build_over_call): Added call to build_signature_method_call.
11991
11992 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
11993
11994 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
11995 target_expr.
11996
11997 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11998
11999 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
12000
12001 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
12002
12003 * except.c (expand_start_try_stmts): Move to except.c in the backend.
12004 (expand_end_try_stmts): Remove.
12005
12006 * init.c (perform_member_init): Use add_partial_entry () instead
12007 of directly manipulating lists.
12008 (emit_base_init): Likewise.
12009
12010 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
12011
12012 * except.c (expand_exception_blocks): Always make sure USE and
12013 CLOBBER insns that came at the end still do, the backend relies
12014 upon this.
12015
12016 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
12017
12018 * call.c (build_over_call): We can only use a TARGET_EXPR of the
12019 right type.
12020
12021 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
12022
12023 * cvt.c (convert_to_reference): Revert last change, don't complain
12024 about temp without target decl.
12025
12026 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
12027
12028 * decl.c (grokdeclarator): Don't core dump when void() is given.
12029
12030 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
12031
12032 * decl.c (copy_args_p): Don't crash.
12033
12034 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
12035
12036 * pt.c (tsubst): And support template args inside the exception
12037 specification.
12038
12039 * pt.c (tsubst): Add support for exception specifications in
12040 template functions.
12041
12042 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
12043
12044 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
12045 fields now.
12046 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
12047 (start_function): Likewise.
12048 (start_method): Likewise.
12049 (grokfield): Likewise.
12050 (make_call_declarator): Add throw spec parameter.
12051 (set_quals_and_spec): Add routine.
12052 * lex.c (set_quals_and_spec): Likewise.
12053 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
12054 * decl.c (shadow_tag): Eliminate the throw spec parameter to
12055 grokdeclarator.
12056 (groktypename): Likewise.
12057 (start_decl): Eliminate the throw spec parameter. Eliminate the
12058 throw spec parameter to grokdeclarator. Eliminate the throw spec
12059 field in DECL_STMT.
12060 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
12061 (grokfndecl): Remove useless set of raises.
12062 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
12063 the throw spec parameter to start_decl. Pull the throw spec out
12064 of the call declarator.
12065 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
12066 (start_function): Eliminate the throw spec parameter. Eliminate
12067 the throw spec parameter to grokdeclarator.
12068 (start_method): Likewise.
12069 * decl2.c (grokfield): Likewise.
12070 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
12071 (grokoptypename): Likewise.
12072 (finish_file): Eliminate the throw spec parameter to
12073 start_function. Add throw spec to make_call_declarator.
12074 * except.c (init_exception_processing): Add throw spec to
12075 make_call_declarator. Eliminate the throw spec parameter to
12076 start_decl.
12077 (expand_start_catch_block): Eliminate the throw spec parameter to
12078 grokdeclarator.
12079 (expand_builtin_throw): Add throw spec to make_call_declarator.
12080 Eliminate the throw spec parameter to start_function.
12081 (start_anon_func): Likewise.
12082 * lex.c (make_call_declarator): Add throw spec parameter.
12083 (set_quals_and_spec): New routine.
12084 (cons_up_default_function): Add throw spec to make_call_declarator.
12085 Eliminate the throw spec parameter to grokfield.
12086 * method.c (synthesize_method): Eliminate the throw spec parameter
12087 to start_function.
12088 * pt.c (process_template_parm): Eliminate the throw spec parameter
12089 to grokdeclarator.
12090 (tsubst): Add throw spec to make_call_declarator.
12091 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
12092 (do_function_instantiation): Eliminate the throw spec parameter to
12093 grokdeclarator. Eliminate the throw spec parameter to
12094 start_function.
12095 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
12096 to start_function.
12097 * parse.y (datadef): Remove non-winning optimization.
12098 (decl): Likewise.
12099 (fndef): Remove ambiguous error productions uncovered by grammar
12100 fixing.
12101 (constructor_declarator): Add exception_specification_opt here.
12102 (component_constructor_declarator): Likewise.
12103 (direct_after_type_declarator): Likewise.
12104 (complex_direct_notype_declarator): Likewise.
12105 (direct_abstract_declarator): Likewise.
12106 (fn.def1): Remove exception_specification_opt.
12107 (fn.def2): Likewise.
12108 (condition): Likewise.
12109 (initdcl0): Likewise.
12110 (initdcl): Likewise.
12111 (notype_initdcl0): Likewise.
12112 (nomods_initdcl0): Likewise.
12113 (component_decl_1): Likewise.
12114 (component_declarator): Likewise.
12115 (after_type_component_declarator0): Likewise.
12116 (after_type_component_declarator): Likewise.
12117 (notype_component_declarator): Likewise.
12118
12119 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
12120
12121 * call.c (build_over_call): Also use an INIT_EXPR when
12122 initializing anything from an rvalue.
12123
12124 * call.c (build_over_call): Call stabilize_reference when building
12125 an INIT_EXPR instead of calling the copy ctor.
12126
12127 * call.c (joust): Extend the previous change to all comparisons.
12128
12129 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
12130 NO_LINKAGE_HEURISTICS.
12131
12132 * decl2.c (finish_file): Emit any statics that weren't already.
12133
12134 * typeck.c (build_static_cast): Implement.
12135 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
12136 * decl.c (grokparms): Use can_convert_arg instead of
12137 implicit_conversion directly.
12138 (copy_args_p): New fn.
12139 * cvt.c (convert_to_reference): Don't complain about temp with
12140 static_cast.
12141 (build_up_reference): Handle TARGET_EXPRs.
12142 * call.c (build_over_call): Elide unnecessary temps.
12143 (can_convert*): Use new overloading code.
12144
12145 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
12146
12147 * call.c: Move TYPE_PTR*_MACROS ...
12148 * cp-tree.h: To here.
12149 * typeck.c (build_reinterpret_cast): Implement.
12150
12151 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
12152 ptr_complete_ob.
12153 (joust): If we're comparing a function to a builtin and the worst
12154 conversion for the builtin is worse than the worst conversion for the
12155 function, take the function.
12156
12157 * typeck.c (build_const_cast): Implement.
12158 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
12159 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
12160
12161 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
12162
12163 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
12164 too early. Make sure we explode if exprtype turns out to be a
12165 NULL_TREE when it shouldn't be.
12166
12167 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
12168
12169 * cp-tree.h: New routine make_call_declarator.
12170 * lex.c (make_call_declarator): Define it.
12171 * except.c (init_exception_processing): Use it.
12172 (expand_builtin_throw): Likewise.
12173 (start_anon_func): Likewise.
12174 * decl2.c (finish_file): Likewise.
12175 * lex.c (cons_up_default_function): Likewise.
12176 * parse.y: Likewise.
12177 * pt.c (tsubst): Likewise.
12178
12179 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
12180
12181 * decl2.c (groktypefield): Remove unused code.
12182
12183 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
12184
12185 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
12186 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
12187 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
12188 nonempty_cv_qualifiers.
12189 * hash.h: Rebuild.
12190
12191 * lex.c (make_pointer_declarator): Change type_quals into
12192 cv_qualifiers.
12193 (make_reference_declarator): Likewise.
12194
12195 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
12196
12197 * decl.c (start_function): Only check interface_* for templates
12198 with flag_alt_external_templates.
12199
12200 * call.c (build_new_op): Check for comparison of different enum types.
12201 (build_over_call): Fix arg # output.
12202
12203 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
12204
12205 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
12206
12207 * call.c (build_new_op): Check for erroneous args.
12208
12209 * call.c (build_new_method_call): Add missing args to cp_error.
12210
12211 * tree.c (error_type): Don't print reference-to-array.
12212
12213 * typeck.c (convert_for_assignment): Don't say contravariance for
12214 removing const.
12215
12216 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
12217
12218 * call.c (build_over_call): Diagnose bad convs for `this'.
12219
12220 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
12221 on _ctor_arg.
12222
12223 * call.c (convert_like): Handle bad convs.
12224 (build_over_call): Handle bad convs better.
12225
12226 * decl2.c: -fansi-overloading is now the default.
12227
12228 * call.c (build_new_method_call): Check for erroneous args.
12229
12230 * pt.c (instantiate_class_template): Propagate
12231 TYPE_USES_MULTIPLE_INHERITANCE.
12232
12233 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
12234
12235 * call.c (enforce_access): Add static to routine.
12236
12237 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
12238
12239 * call.c (build_user_type_conversion_1): Fix bad handling.
12240 (compare_ics): Likewise.
12241
12242 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
12243
12244 * call.c (standard_conversion): Oops.
12245
12246 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
12247
12248 * g++.c: Update test for win32 (&& ! cygwin32).
12249
12250 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
12251
12252 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
12253 (ptr_reasonably_similar): New fn.
12254 * call.c (BAD_RANK): New rank.
12255 (ICS_BAD_FLAG): New macro.
12256 (standard_conversion): Handle almost-right pointer conversions.
12257 (reference_binding): Handle bad rvalue bindings.
12258 (add_*_candidate): Stuff.
12259 (build_over_call): Pass bad conversions to convert_for_initialization.
12260 (compare_ics): Handle bad convs.
12261 (joust): Likewise.
12262
12263 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
12264
12265 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
12266 integer_type_node when computing pointer offsets.
12267
12268 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
12269
12270 * tree.c (lvalue_type): New fn.
12271 (error_type): New fn.
12272 * call.c (op_error): Use error_type.
12273 (add_conv_candidate): Use lvalue_type.
12274 (add_builtin_candidates): Likewise.
12275 * error.c (args_as_string): Use error_type.
12276
12277 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
12278
12279 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
12280 (tsubst): Not here.
12281
12282 * decl.c (init_decl_processing): With -ansi, __null's type is the
12283 signed integral type with the same number of bits as a pointer.
12284 Introduce a new variable null_node for it.
12285 * cp-tree.h: Adjust.
12286 * call.c (null_ptr_cst_p): Adjust.
12287
12288 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
12289
12290 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
12291 optimize.
12292
12293 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
12294
12295 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
12296 fns of classes without virtual functions.
12297
12298 * call.c (add_function_candidate): Handle `this' specially.
12299 (compare_ics): Likewise.
12300
12301 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
12302
12303 * typeck.c (build_conditional_expr): Fix handling of __null.
12304
12305 * decl2.c (comdat_linkage): New fn.
12306 (import_export_vtable): Use it.
12307 (import_export_decl): Use it.
12308 * method.c (make_thunk): Use it.
12309
12310 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
12311
12312 * pt.c (end_template_decl): If we don't actually have parms, return.
12313 * parse.y (template_header): Accept 'template <>'.
12314
12315 * errfn.c: Allow 5 args.
12316
12317 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
12318
12319 * tree.c (make_temp_vec): New fn.
12320 * pt.c (push_template_decl): Handle partial specs.
12321 (instantiate_class_template): Likewise.
12322 (more_specialized): Use get_bindings.
12323 (more_specialized_class): New fn.
12324 (get_class_bindings): New fn.
12325 (most_specialized_class): New fn.
12326 (do_function_instantiation): List candidates for ambiguous case.
12327 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
12328 (shadow_tag): Call push_template_decl for partial specializations.
12329 * parse.y: Likewise.
12330 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
12331 DECL_TEMPLATE_MEMBERS.
12332 * call.c (print_z_candidates): Reduce duplication.
12333
12334 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
12335
12336 * decl2.c (lang_decode_option): Allow -fansi-overloading.
12337
12338 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
12339
12340 * pt.c (get_bindings): New fn.
12341 (most_specialized): Likewise.
12342 (do_function_instantiation): Use them.
12343 (add_maybe_template): New fn.
12344 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
12345 * call.c (build_new_op): Handle guiding decls.
12346 (build_new_function_call): Likewise.
12347 * decl2.c (finish_file): Likewise.
12348
12349 * decl2.c (mark_used): Do synthesis here.
12350 * call.c (build_method_call): Not here.
12351 (build_over_call): Or here.
12352 * typeck.c (build_function_call_real): Or here.
12353 * tree.c (bot_manip): Call mark_used on functions used in default
12354 args.
12355
12356 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
12357
12358 * decl2.c (import_export_vtable): Delete code that disabled vtable
12359 heuristic on systems with ASM_OUTPUT_EXTERNAL.
12360
12361 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
12362
12363 * typeck.c (build_x_function_call): Handle static call context
12364 better.
12365
12366 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
12367 the function, not its outer block.
12368
12369 * call.c (build_field_call): Pass fields on to build_opfncall
12370 regardless of TYPE_OVERLOADS_CALL_EXPR.
12371 (build_method_call): Pass on to build_new_method_call sooner.
12372
12373 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
12374 gives us.
12375 * class.c (instantiate_type): Don't put a POINTER_TYPE to
12376 METHOD_TYPE on an expression. Also make a copy of rhs instead of
12377 modifying it.
12378
12379 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
12380
12381 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
12382 (add_builtin_candidate): Don't take enums for ++.
12383 (build_new_method_call): Handle non-aggregates and field calls.
12384 Move new overloading code from...
12385 * cvt.c: Here.
12386
12387 * decl.c (grokparms): Don't check default args in templates.
12388
12389 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
12390
12391 * cvt.c (build_new_op): Fix args to build_unary_op.
12392 (add_builtin_candidates): Don't call type_promotes_to on float.
12393
12394 * decl.c (grokparms): Check the type of the default arg.
12395
12396 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
12397 returning NULL_TREE.
12398
12399 * typeck.c (build_x_binary_op): Avoid doing extra work.
12400 (build_x_unary_op): Likewise.
12401 (build_x_conditional_expr): Likewise.
12402 * cvt.c (build_over_call): Return.
12403 (add_builtin_candidate): Fix MEMBER_REF.
12404 (build_new_op): Likewise.
12405
12406 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
12407
12408 * method.c (build_overload_name): Put bug fix into code but leave
12409 disabled for now so we can be bug compatible with older releases
12410 that do repeats incorrectly. In the future, we can enable it.
12411
12412 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
12413
12414 * cvt.c (convert_like): Don't call build_cplus_new twice.
12415
12416 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
12417 Control new overloading code with -fansi-overloading.
12418
12419 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
12420
12421 * cvt.c (build_over_call): Call build_cplus_new.
12422 * call.c (build_method_call): Likewise.
12423 * typeck.c (build_function_call_real): Likewise.
12424 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
12425 the COND_EXPR in a TARGET_EXPR so they use the same slot.
12426
12427 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
12428 recursive calls.
12429 * typeck.c (complete_type): Propagate
12430 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
12431
12432 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
12433
12434 * cvt.c (joust): More ?: kludging. Sigh.
12435 (build_over_call): Don't try to synthesize global fns.
12436
12437 * search.c (lookup_conversions): Use binfo marking.
12438
12439 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
12440
12441 * search.c (build_mi_matrix): Use the correct value of cid
12442 when determining the new mi_size.
12443
12444 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
12445
12446 * cvt.c (add_builtin_candidates): Do consider type conversion ops
12447 for the first parms of += et al.
12448 (strip_top_quals): New fn.
12449 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
12450 (implicit_conversion): Likewise.
12451 (add_builtin_candidates): Be careful about arrays.
12452 (build_new_method_call): Handle vtable optimization.
12453
12454 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
12455
12456 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
12457 * cvt.c (reference_binding): Use it.
12458 (implicit_conversion): Use it.
12459 (add_builtin_candidate, COND_EXPR): Use it.
12460
12461 * cvt.c (build_new_function_call): Check for error args.
12462
12463 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
12464
12465 * gxx.gperf: Add __null.
12466 * hash.h: Regenerate.
12467 * lex.h: Add RID_NULL.
12468 * lex.c (init_lex): Create null_pointer_node here, stick it in
12469 RID_NULL.
12470 * decl.c (init_decl_processing): Still set its type here.
12471 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
12472 (convert_to_pointer_force): Likewise.
12473 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
12474 if (! pedantic).
12475 * call.c (convert_harshness): Use null_ptr_cst_p.
12476 * typeck.c (convert_for_assignment): Likewise. Don't produce
12477 null_pointer_node.
12478
12479 * error.c (args_as_string): Handle lists of actual args, too.
12480 * cvt.c (null_ptr_cst): Support (void*)0 for now.
12481 (build_user_type_conversion_1): Improve diagnostics.
12482 (build_new_function_call): Likewise.
12483 (build_object_call): Likewise.
12484 (build_new_method_call): Likewise. Move call before def diagnostic...
12485 (build_over_call): Here.
12486
12487 * cvt.c (build_new_method_call): Don't complain about no match if
12488 LOOKUP_SPECULATIVELY.
12489 (build_over_call): Fix 'this' for virtual fn.
12490 (build_new_method_call): Add diagnostic.
12491
12492 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
12493
12494 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
12495 constructors to be passed in.
12496 (build_over_call): Likewise.
12497 (build_user_type_conversion_1): Pass them in.
12498 (convert_like): Likewise.
12499 (build_object_call): Handle overloaded conversions.
12500 (build_over_call): Pass the right args to build_vfn_ref.
12501 (standard_conversion): Fix pmf convs.
12502 (joust): Handle comparing statics and non-statics.
12503 (build_new_method_call): New fn.
12504 * call.c (build_method_call): Call it if NEW_OVER.
12505
12506 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
12507
12508 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
12509 %D instead.
12510
12511 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
12512
12513 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
12514 instead of just maybe_build_cleanup so that we deallocate the
12515 thrown object.
12516
12517 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12518
12519 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
12520 * cp-tree.h (finish_prevtable_vardecl): Add decl.
12521
12522 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
12523
12524 * pt.c (instantiate_class_template): Call complete_type. Also, if
12525 we're at the end of the file and we just instantiated a template
12526 class with a vtable, call finish_prevtable_vardecl.
12527
12528 * error.c (dump_decl): Don't explode (or explode more gracefully
12529 as appropriate) if the object being dumped has a null type.
12530 (dump_expr): Likewise.
12531
12532 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
12533 by counting the number of nodes that we'll need before allocating
12534 the array.
12535 (lookup_fnfields): Fix comment.
12536 (breadth_first_search): Fix comment.
12537
12538 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
12539
12540 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
12541 TYPE_ALIGN.
12542 * class.c (finish_struct): Call cplus_decl_attributes here.
12543 (finish_struct_1): Not here.
12544 * cp-tree.h: Adjust.
12545
12546 * pt.c (type_unification): New parameter STRICT.
12547 (unify): If STRICT, don't allow cv addition or base deduction.
12548 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
12549
12550 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
12551
12552 * search.c (get_template_base{_recursive}): New fns.
12553 * pt.c (more_specialized): New fn.
12554 (do_function_instantiation): Use it.
12555 (unify): Handle base deduction.
12556 * cvt.c (joust): Use more_specialized.
12557 Don't arbitrarily choose between non-builtin candidates.
12558 (build_over_call): Call require_complete_type.
12559
12560 * decl.c (start_function): Statics are static even in a #pragma
12561 interface file.
12562
12563 * decl2.c (import_export_vtable): Disable vtable heuristic on
12564 systems with ASM_OUTPUT_EXTERNAL.
12565
12566 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
12567 (standard_conversion): No std conv to enum type.
12568
12569 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
12570 for ptm's.
12571
12572 * cvt.c (reference_binding): Bind directly to a base subobject of
12573 a class rvalue.
12574
12575 * cvt.c (build_new_op): Enforce access control.
12576
12577 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
12578
12579 * typeck2.c (process_init_constructor): When scanning the
12580 union for a named field, skip things that aren't FIELD_DECLs.
12581
12582 * method.c (synthesize_method): Don't scan fndecl's rtl if
12583 we're at the end of the file; just assume the function can't
12584 be inlined.
12585
12586 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
12587
12588 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
12589 it failed.
12590
12591 * cvt.c (build_user_type_conversion_1): Handle overloaded
12592 conversion ops.
12593
12594 * cvt.c (add_builtin_candidates): Don't consider type conversion
12595 operators for the first parameter of operator=.
12596
12597 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
12598
12599 * typeck.c (complete_type): Only call layout_type if we're not
12600 expanding a template.
12601
12602 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
12603
12604 * cvt.c (compare_ics): Oops.
12605
12606 * cvt.c (op_error): Oops.
12607
12608 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
12609 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
12610 (build_conv): Use them.
12611 (implicit_conversion): Use them.
12612 (convert_like): Handle them.
12613 (build_new_op): Handle builtin COND_EXPR again.
12614 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
12615 in lists of types for COND_EXPR.
12616 (add_builtin_candidate): Add enum candidates for COND_EXPR.
12617
12618 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
12619
12620 * typeck.c (build_modify_expr): Always attempt to build a call to
12621 the assignment operator, even if we're using a default one.
12622 (convert_for_initialization): Call complete_type.
12623
12624 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
12625
12626 * cvt.c (reference_binding): A REF_BIND gets the reference type.
12627 (implicit_conversion): Likewise.
12628 (convert_like): Likewise.
12629 (compare_ics): Likewise.
12630 (compare_qual): Likewise.
12631 (print_z_candidates): Handle no candidates.
12632 (build_new_op): Don't handle builtin COND_EXPR for now.
12633
12634 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
12635
12636 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
12637
12638 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
12639
12640 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
12641
12642 * cvt.c (build_builtin_candidate): Oops.
12643 (build_new_op): Oops.
12644
12645 * method.c (build_opfncall): Pass COND_EXPR on.
12646 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
12647 (add_builtin_candidate{,s}): Likewise.
12648 (add_builtin_candidates): Likewise.
12649 (print_z_candidates, op_error, build_new_op): Likewise.
12650 (type_decays_to): New fn.
12651 * lex.c (init_lex): Just say ?: for COND_EXPR.
12652
12653 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
12654
12655 * typeck.c (complete_type): Call layout_type rather than building
12656 a new array type.
12657
12658 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
12659 only use ptrdiff_t.
12660
12661 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
12662
12663 * cvt.c: Always compile the new overloading code (but don't use it).
12664 (implicit_conversion): Add a BASE_CONV when converting to
12665 the same class type.
12666 (convert_like): Handle BASE_CONV.
12667
12668 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
12669
12670 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
12671 (add_builtin_candidate): Likewise.
12672
12673 NEW_OVER changes:
12674 * typeck.c (build_x_function_call): Try an operator function
12675 whenever we call an object of class type.
12676 * method.c (build_opfncall): Pass CALL_EXPRs through.
12677 * cvt.c (implicit_conversion): Do const-ref case first.
12678 (add_conv_candidate, build_object_call, op_error): New fns.
12679 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
12680 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
12681 builtin candidates.
12682 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
12683 Fall back on preincrement handling. Use op_error.
12684 Handle warn_synth.
12685 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
12686 an error_mark_node.
12687 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
12688 properly.
12689
12690 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
12691
12692 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
12693
12694 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
12695
12696 * typeck.c (build_component_ref_1): Use build_component_ref
12697 instead of open coding it here.
12698
12699 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
12700
12701 * g++.c (main): Don't link with -lg++.
12702
12703 NEW_OVER changes:
12704 * cvt.c (convert_to_reference): Don't use convert_from_reference on
12705 result of build_type_conversion.
12706 (cp_convert): Only call build_method_call for ctors if
12707 build_type_conversion failed.
12708 (ptr_complete_ob): New function.
12709 (TYPE_PTR{,OB,MEM}_P): New macros.
12710 ({add,build}_builtin_candidate{,s}): New functions.
12711 (print_z_candidates): Handle builtins.
12712 (build_user_type_conversion_1): Don't use conversion fns for
12713 converting to a base type.
12714 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
12715 (build_user_type_conversion): Use convert_from_reference.
12716 (build_new_op): New function.
12717 (build_over_call): Fix handling of methods.
12718 (compare_ics): Handle AMBIG_CONV properly.
12719 * typeck2.c: Increment abort count.
12720 * method.c (build_opfncall): Forward most requests to build_new_op.
12721 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
12722
12723 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12724
12725 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
12726 invalid second argument to dump_expr_list.
12727
12728 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
12729
12730 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
12731
12732 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
12733
12734 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
12735 ASSEMBLE_EXTERNAL.
12736
12737 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
12738
12739 * typeck2.c (process_init_constructor): New pedwarn for using { }
12740 to initialize a pointer to member function.
12741 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
12742 we can avoid the new error.
12743
12744 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
12745
12746 * typeck.c (build_ptrmemfunc1): New function to hide details of
12747 pointer to member functions better.
12748
12749 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
12750
12751 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
12752 methods into the actual method, as we know the implied object is
12753 not used.
12754
12755 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12756
12757 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
12758 inside a system header.
12759
12760 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
12761
12762 * call.c (build_method_call): Call complete_type on the
12763 instance type.
12764
12765 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
12766
12767 * typeck.c (build_component_ref): Always build up an OFFSET_REF
12768 for obj_ptr->func so that we can know which object to use in a
12769 method call.
12770
12771 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
12772
12773 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
12774 around things. Also improve maintainability.
12775
12776 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
12777
12778 * decl.c (grokdeclarator): Check for overflow when evaluating an
12779 array dimension.
12780
12781 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
12782
12783 * cvt.c (cp_convert): Don't check for ambiguity with constructor
12784 if NEW_OVER.
12785
12786 * typeck.c (build_x_function_call): Pass function overload
12787 questions to new overloading code if NEW_OVER.
12788 * init.c (expand_aggr_init_1): Only check for type conversion ops
12789 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
12790 Don't check for ambiguity with constructor if NEW_OVER.
12791 * cvt.c (convert_to_reference): Dereference the result of a type
12792 conversion operator.
12793 (build_conv): Propagate ICS_USER_FLAG.
12794 (implicit_conversion): Call instantiate_type.
12795 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
12796 (add_function_candidate): Fix cv-quals on argtype.
12797 (print_z_candidates): New function.
12798 (build_new_function_call): Call it.
12799 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
12800 consider non-converting constructors.
12801 Call print_z_candidates.
12802 Return an AMBIG_CONV for an ambiguous conversion.
12803 (build_user_type_conversion): Handle AMBIG_CONV.
12804 (convert_like): Fix test for building TARGET_EXPR.
12805 Call instantiate_type.
12806 Handle AMBIG_CONV and LVALUE_CONV.
12807 (build_over_call): Handle 0 args and ellipsis.
12808 * cp-tree.def: Add AMBIG_CONV.
12809
12810 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
12811
12812 * decl.c (lookup_name_real): If we find mem in obj when parsing
12813 `obj->mem', make sure we return the right value.
12814
12815 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
12816
12817 * search.c (get_base_distance): Call complete_type.
12818
12819 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
12820
12821 * decl.c (store_bindings): Make static.
12822
12823 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
12824
12825 * init.c (expand_aggr_init_1): Don't check type conversions if
12826 NEW_OVER.
12827
12828 * cvt.c (z_candidate): Put back template field.
12829 (add_function_candidate): Set it.
12830 (add_template_candidate): Likewise.
12831 (joust): Use it.
12832 (compare_qual): Handle references and pointers to members.
12833 (compare_ics): Handle reference bindings.
12834
12835 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
12836
12837 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
12838
12839 * call.c (compute_conversion_costs): Call complete_type.
12840
12841 * tree.c (vec_binfo_member): Use comptypes instead of comparing
12842 pointers, so we can handle template parameters.
12843
12844 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
12845
12846 * cvt.c (cp_convert_to_pointer): We have to call complete_type
12847 here; let's make it explicit instead of a side effect of an
12848 error check.
12849
12850 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
12851
12852 * cvt.c (z_candidate): Remove template field.
12853 (reference_binding): Handle binding to temporary.
12854 (implicit_conversion): Likewise.
12855 (add_function_candidate): Handle artificial constructor parms.
12856 Handle functions with too few parms.
12857 (add_template_candidate): New function.
12858 (build_user_type_conversion_1): Handle constructors.
12859 (convert_like): Likewise.
12860 (build_over_call): Likewise.
12861 (build_new_function_call): Support templates.
12862 (compare_ics): Fix reference, inheritance handling.
12863
12864 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
12865
12866 * decl.c: Add signed_size_zero_node.
12867 (init_decl_processing): Build it.
12868 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
12869 when we're trying to make a negative delta.
12870
12871 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12872
12873 Stop doing this damn index==strchr variable name confusion.
12874 * class.c (add_virtual_function): Change local var INDEX to be
12875 named IDX.
12876 (add_method): Likewise.
12877 * lex.c (print_parse_statistics): Likewise.
12878 * search.c (make_memoized_table_entry): Likewise.
12879 (lookup_fnfields_here): Likewise.
12880 (lookup_field): Likewise.
12881 (lookup_fnfields): Likewise.
12882 (get_baselinks): Likewise.
12883 * sig.c (build_signature_table_constructor): Likewise.
12884 (build_signature_method_call): Likewise.
12885 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
12886 (get_member_function_from_ptrfunc): Likewise.
12887 (build_ptrmemfunc): Change local var INDEX to be IDX.
12888 (c_expand_start_case): Likewise.
12889
12890 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
12891
12892 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
12893 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
12894 (convert_to_reference): Use build_type_conversion to convert to
12895 the reference type directly.
12896 (standard_conversion): Fix void* case, non-conversions.
12897 (reference_binding): Fix expr == 0 case, non-conversions.
12898 (convert_like): Support REF_BIND.
12899 (compare_qual): Split out from compare_ics.
12900 (compare_ics): Use it, handle icses with only a qual_conv.
12901
12902 * init.c (expand_vec_init): Don't crash if decl is NULL.
12903
12904 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
12905
12906 * mpw-config.in: New file, configury for Mac MPW.
12907 * mpw-make.sed: New file, makefile editing for MPW.
12908
12909 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
12910
12911 * pt.c (instantiate_class_template): Call repo_template_used.
12912
12913 * search.c (lookup_conversions): Only lookup conversions in
12914 complete types.
12915
12916 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12917
12918 * cp-tree.def: Renamed from tree.def, to avoid confusion with
12919 gcc's tree.def.
12920 * cp-tree.h, lex.c: Include cp-tree.def.
12921 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
12922
12923 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
12924
12925 * init.c (build_vec_delete_1): Call complete_type.
12926
12927 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
12928
12929 * except.c (start_anon_func): Make sure anonymous functions are
12930 never external.
12931
12932 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
12933
12934 * decl.c (finish_function): If function_depth > 1, set nested.
12935
12936 * decl2.c (grokbitfield): Revert Bob's change.
12937 * class.c (finish_struct_1): Fix handling of named bitfield widths.
12938
12939 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
12940
12941 * pt.c (add_pending_template): Handle types.
12942 (lookup_template_class): With -fexternal-templates, just add the class
12943 to pending_templates instead of instantiating it now.
12944 * decl2.c (finish_file): Handle types in pending_templates.
12945
12946 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
12947
12948 * decl2.c (grokbitfield): Handle constant decls appropriately.
12949 Give an appropriate error message now instead of spewing core
12950 later.
12951
12952 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
12953
12954 * decl2.c: Don't turn on thunks by default for now.
12955
12956 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
12957
12958 * typeck.c (complete_type): Handle error_mark_node.
12959 (common_type, OFFSET_TYPE): Handle template_type_parms.
12960
12961 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
12962
12963 * pt.c (instantiate_decl): If at_eof, call import_export_decl
12964 regardless of DECL_INLINE.
12965
12966 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
12967
12968 * class.c (finish_struct_bits): Copy TYPE_SIZE.
12969
12970 * rtti.c (build_dynamic_cast): Support templates.
12971 * tree.def: Support DYNAMIC_CAST_EXPR.
12972 * pt.c (tsubst_copy): Likewise.
12973 * decl2.c (build_expr_from_tree): Likewise.
12974
12975 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
12976
12977 * typeck.c (build_static_cast): Support templates.
12978 (build_const_cast): Likewise.
12979 * tree.def: Support CONST/STATIC_CAST_EXPR.
12980 * pt.c (tsubst_copy): Likewise.
12981 * decl2.c (build_expr_from_tree): Likewise.
12982
12983 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
12984
12985 * decl2.c (finish_vtable_vardecl): Don't trust
12986 TREE_SYMBOL_REFERENCED for vtables of local classes.
12987
12988 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
12989
12990 * pt.c (tsubst_copy): Handle operator T.
12991
12992 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12993
12994 * init.c (build_delete): Move creation of PARMS inside test of
12995 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
12996
12997 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
12998
12999 * typeck.c (build_conditional_expr): Don't assume that
13000 the arguments to ?: are always pointers or records.
13001
13002 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
13003
13004 * decl2.c (import_export_decl): Still emit static/weak/comdat
13005 copies of inline template functions with -fno-implicit-templates.
13006
13007 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
13008
13009 * init.c (build_delete): Determine the complete basetype
13010 path to the destructor we're calling.
13011
13012 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
13013
13014 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
13015 initialize the enum, because we really and truly don't know where
13016 it came from.
13017 (start_enum): Don't copy integer_zero_node because
13018 build_enumerator will do it.
13019
13020 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
13021
13022 * decl.c (finish_function): Do access control on base destructors.
13023
13024 * pt.c (tsubst, case FUNCTION_DECL): Set up
13025 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
13026 hose us.
13027
13028 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
13029
13030 * cvt.c (build_up_reference): If we have already extended the
13031 lifetime of the temporary, don't try it again.
13032 * typeck.c (c_expand_return): Don't try and convert the return
13033 value twice when we want a reference, once is enough.
13034
13035 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
13036
13037 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
13038 LOOKUP_ONLYCONVERTING at all for now.
13039
13040 * search.c (add_conversions): Put the conversion function in
13041 TREE_VALUE, the basetype in TREE_PURPOSE.
13042 * cvt.c (build_type_conversion): Adjust.
13043 * cvt.c (build_expr_type_conversion): Adjust.
13044 * call.c (user_harshness): Adjust.
13045
13046 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
13047
13048 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
13049 backend's benefit.
13050
13051 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
13052
13053 * except.c (expand_start_catch_block): Add a dummy region, if we
13054 get an error, so that we can avoid core dumping later.
13055
13056 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
13057
13058 * cp-tree.h (OFFSET_REF): Remove.
13059 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
13060 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
13061 * init.c (expand_aggr_init_1): Likewise.
13062 (build_new): Likewise.
13063 * typeck.c (expand_target_expr): Likewise.
13064
13065 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
13066
13067 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
13068 TARGET_EXPR.
13069
13070 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
13071
13072 * cvt.c (build_up_reference): Redo how and when temporaries are
13073 created.
13074 * decl.c (grok_reference_init): Don't try and be smart about
13075 running cleanups.
13076
13077 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
13078
13079 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
13080 (TARGET_EXPR...), now that it has 4 arguments.
13081 * tree.c (build_cplus_new): Likewise.
13082
13083 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
13084
13085 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
13086
13087 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
13088 * decl.c (struct saved_scope): Remove named_labels,
13089 {base,member}_init_list.
13090 (maybe_push_to_top_level): Don't set them. Call
13091 push_cp_function_context if appropriate.
13092 (pop_from_top_level): Likewise.
13093
13094 * method.c (do_build_assign_ref): Remove obsolete check of
13095 TYPE_HAS_ASSIGN_REF (basetype).
13096
13097 * decl.c (grokfndecl): Diagnose user definition of
13098 implicitly-declared methods.
13099
13100 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
13101
13102 * method.c (do_build_copy_constructor): Add code to give
13103 meaningful error messages instead of crashing.
13104 (do_build_assign_ref): Don't synthesize assignment operators for
13105 classes containing reference or const members.
13106
13107 * class.c (struct base_info): Remove cant_synth_copy_ctor
13108 and cant_synth_asn_ref.
13109 (finish_base_struct): Remove the code that tries to conditionalize
13110 synthesis of copy constructors & assignment operators based on
13111 access permissions. Instead, let it fail when it tries to
13112 synthesize the copy constructor. This will give meaningful error
13113 messages instead of silently generating code to perform a bitcopy.
13114
13115 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
13116
13117 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
13118 determining types for constant values.
13119
13120 * decl.c (struct named_label_list): Use instead of stuffing
13121 random items into a TREE_LIST node.
13122 (named_label_uses): Use the new struct.
13123 (poplevel): Likewise.
13124 (lookup_label): Likewise.
13125 (define_label): Add an error message to tell the user the line
13126 where the goto is located in addition to the destination of the
13127 goto.
13128 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
13129 named_label_uses.
13130 (finish_function): Likewise.
13131
13132 (start_decl): Complain about defining a static data member
13133 in a different type from which it was declared.
13134
13135 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
13136
13137 * cvt.c (build_expr_type_conversion): Adjust.
13138
13139 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
13140
13141 * call.c (build_method_call): Always convert 'this' to the
13142 appropriate type.
13143
13144 * search.c (add_conversions): Put the conversion function in
13145 TREE_VALUE, the type in TREE_PURPOSE.
13146 * cvt.c (build_type_conversion): Adjust.
13147 * call.c (user_harshness): Adjust.
13148
13149 * method.c (emit_thunk): Call temporary_allocation and
13150 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
13151
13152 * tree.c (build_cplus_array_type): Handle tweaking of
13153 TYPE_MAIN_VARIANT here.
13154 * typeck.c (common_type): Not here.
13155
13156 * typeck.c (complete_type): Only try to complete an array type if
13157 it has a domain.
13158
13159 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
13160
13161 * decl.c (grokvardecl): Call complete_type.
13162 (grokdeclarator): Call complete_type for PARM_DECLs.
13163
13164 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
13165
13166 * pt.c (instantiate_class_template): Re-set
13167 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
13168
13169 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
13170
13171 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
13172 smart enough to do it right.
13173 * tree.c (cp_expand_decl_cleanup): Likewise.
13174 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
13175 cp_expand_decl_cleanup.
13176 (store_parm_decls): Likewise.
13177 (hack_incomplete_structures): Likewise.
13178 * except.c (push_eh_cleanup): Likewise.
13179
13180 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
13181
13182 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
13183 frontend to the backend where it belongs.
13184 * tree.c (unsave_expr): Likewise.
13185 (unsave_expr_now): Likewise.
13186 * tree.def (UNSAVE_EXPR): Likewise.
13187 * cp-tree.h (unsave_expr): Likewise.
13188 (unsave_expr_now): Likewise.
13189
13190 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
13191
13192 * init.c (emit_base_init): Make sure the partial EH cleanups live
13193 on the function_obstack.
13194
13195 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
13196
13197 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
13198 when checking for pointer types.
13199
13200 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
13201
13202 * pt.c (instantiate_class_template): Remove obsolete check for
13203 access declarations.
13204
13205 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
13206
13207 * call.c (build_overload_call): Simplify calls to
13208 build_overload_call by removing last parameter.
13209 (build_method_call): Likewise.
13210 * cp-tree.h: Likewise.
13211 * method.c (build_opfncall): Likewise.
13212 * typeck.c (build_x_function_call): Likewise.
13213
13214 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
13215
13216 * call.c (default_parm_conversions): Factor out common code.
13217 (build_method_call): Use it.
13218 (build_overload_call_real): Use it.
13219
13220 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
13221
13222 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
13223 but pedwarn as the code is bogus.
13224 * typeck.c (decay_conversion): Likewise.
13225 (build_function_call_real): Use build_addr_func instead of
13226 default_conversion. Don't allow pointer-to-method functions down
13227 here.
13228 (build_unary_op): Use real pointer-to-member functions instead of
13229 fake ones.
13230 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
13231 (convert_for_assignment): Removed some obsolete code.
13232 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
13233 build_x_function_call instead of current_class_ptr. Only call
13234 digest_init once on an initializer, we do this just checking
13235 TREE_TYPE.
13236 (build_expr_from_tree): Pass current_class_ref to
13237 build_x_function_call instead of current_class_ptr.
13238 * init.c (build_member_call): Likewise.
13239 * pase.y: Likewise.
13240 * error.c (dump_expr): Handle OFFSET_REFs better.
13241 * pt.c (unify): Handle pointer-to-member functions better.
13242 * decl.c (finish_function): Clear out current_class_ref just like
13243 we do for current_class_ptr.
13244
13245 * typeck.c (get_delta_difference): Handle virtual bases better.
13246
13247 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
13248
13249 * sig.c (build_signature_table_constructor): Use the delta for
13250 the original basetype for this virtual function with thunks.
13251 (build_signature_method_call): We still need to adjust 'this'
13252 with thunks.
13253
13254 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
13255
13256 * call.c (build_addr_func): New routine. Used to get the `real'
13257 address of a function or a method. Needed to avoid getting a
13258 pointer-to-member function.
13259 (build_call): New routine to build CALL_EXPRs.
13260 (build_method_call): Use it.
13261 * cvt.c (convert_to_aggr): Likewise.
13262 * typeck.c (build_function_call_real): Likewise.
13263 * sig.c (build_signature_table_constructor): Use build_addr_func.
13264 * cp-tree.h (build_call, build_addr_func): Declare them.
13265
13266 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
13267
13268 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
13269 * parse.y: Remove uses of LOOKUP_AGGR.
13270
13271 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
13272
13273 * *.[chy]: Rename current_class_decl to current_class_ptr, and
13274 C_C_D to current_class_ref.
13275
13276 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
13277
13278 * call.c (convert_harshness): Tighten up pointer conversions.
13279
13280 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
13281
13282 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
13283 (finish_file): Likewise.
13284
13285 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
13286
13287 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
13288
13289 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
13290 code.
13291
13292 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
13293
13294 * decl2.c: Turn on thunks by default where supported.
13295
13296 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
13297
13298 * cp-tree.h (build_overload_call_maybe): Removed.
13299 * call.c (build_overload_call_real): Invert meaning of last arg to
13300 be require_complete.
13301 (build_overload_call): Likewise.
13302 * typeck.c (build_x_function_call): Use build_overload_call_real
13303 instead of build_overload_call_maybe.
13304
13305 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
13306
13307 * decl2.c (finish_file): Don't try to emit functions that haven't
13308 been compiled.
13309
13310 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
13311
13312 * decl2.c (finish_vtable_vardecl): Oops.
13313
13314 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
13315 Also store the bindings from previous_class_values.
13316 (pop_from_top_level): Restore them.
13317
13318 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
13319
13320 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
13321 symbol has been referenced.
13322 (finish_file): Re-join synthesis/vtable loop with inline emission
13323 loop, disable inlining when an inline is output.
13324
13325 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
13326
13327 * except.c (init_exception_processing): Setup saved_in_catch.
13328 (push_eh_cleanup): Reset __eh_in_catch.
13329 (expand_start_catch_block): Set __eh_in_catch.
13330
13331 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
13332
13333 * except.c (push_eh_cleanup): Add tracking for whether or not we
13334 have an active exception object.
13335 (expand_builtin_throw): Use it to make sure a rethrow without an
13336 exception object is caught.
13337
13338 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
13339
13340 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
13341 cache.
13342
13343 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
13344
13345 * decl2.c (finish_file): Also use sentries for vars with
13346 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
13347 created).
13348
13349 * lex.c (handle_cp_pragma): Disable #pragma
13350 interface/implementation if SUPPORTS_ONE_ONLY > 1.
13351
13352 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
13353
13354 * method.c (emit_thunk): Wrap default case in
13355 temporary/permanent_allocation.
13356
13357 * method.c (make_thunk): Use DECL_ONE_ONLY.
13358 (emit_thunk): Call assemble_end_function.
13359
13360 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
13361
13362 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
13363 (import_export_decl): Likewise.
13364 (finish_prevtable_vardecl): Disable vtable hack if
13365 SUPPORTS_ONE_ONLY > 1.
13366
13367 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
13368
13369 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
13370 PREDECREMENT_EXPRs take two arguments, not one.
13371
13372 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
13373
13374 * class.c (build_vtable_entry): Don't build thunks for abstract
13375 virtuals.
13376
13377 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
13378 frontend.
13379
13380 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
13381
13382 * class.c (set_rtti_entry): Use size_zero_node.
13383 (build_vtable): Likewise.
13384
13385 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
13386
13387 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
13388 (prepare_fresh_vtable): Likewise.
13389
13390 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
13391
13392 * method.c (emit_thunk): Call mark_used on the target function.
13393
13394 * call.c (build_method_call): Don't warn about pending templates.
13395
13396 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
13397
13398 * decl2.c (finish_file): Fix list walking logic.
13399
13400 * typeck2.c (check_for_new_type): Only warn if -pedantic.
13401
13402 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
13403
13404 * class.c (finish_struct_1): Remove old code for
13405 dont_allow_type_definitions.
13406 * cp-tree.h: Likewise.
13407 * spew.c: Make sure cp-tree.h is included before parse.h, so the
13408 definition of flagged_type_tree is found before it is used.
13409 * lex.c: Likewise.
13410 * parse.y: Added the ftype member to the type union, and changed a
13411 number of rules to use it instead of ttype. Added calls to
13412 check_for_new_type() as appropriate.
13413 * typeck2.c (check_for_new_type): New function for checking
13414 if a newly defined type appears in the specified tree.
13415 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
13416 for check_for_new_type().
13417
13418 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
13419
13420 * decl2.c (finish_file): Only use a sentry if the decl is public.
13421
13422 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
13423 don't pass LOOKUP_ONLYCONVERTING.
13424
13425 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
13426
13427 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
13428 properly keeps track of const and volatile type modifiers.
13429
13430 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
13431
13432 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
13433 * pt.c (comp_template_args): Use it.
13434
13435 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
13436 assemble_external for artificial function decls.
13437
13438 * decl.c (cp_finish_decl): Oops.
13439
13440 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
13441
13442 * decl2.c (import_export_decl): Put static data member templates
13443 into common storage, or make them weak, depending on whether they
13444 are dynamically or statically initialized.
13445 (get_sentry): New function.
13446 (finish_file): Do import_export_decl for static data members before
13447 building the init/fini functions. Don't init/fini a variable that's
13448 EXTERNAL. Use a sentry for variables in common. Fix mismatching
13449 push/pop_temp_slots.
13450 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
13451 expand_static_init thang.
13452 * method.c (get_id_2): New function.
13453
13454 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
13455
13456 * parse.y (empty_parms): Make sure we use C++-style prototypes
13457 when we're declaring member functions.
13458
13459 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
13460
13461 * Makefile.in (CONFLICTS): 16 s/r conflicts.
13462 * parse.y (self_template_type): New nonterminal.
13463
13464 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
13465
13466 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
13467 name.
13468 * parse.y (base_class.1): Allow 'typename foo::bar'.
13469
13470 * lex.c (check_newline): Remove #pragma code that plays with the
13471 input stream, since we now deal with tokens. Clear nextchar when
13472 we're done.
13473 (handle_cp_pragma): Use real_yylex.
13474 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
13475 in one place.
13476
13477 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
13478
13479 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
13480
13481 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
13482
13483 * parse.y: New token SELFNAME for potential constructor.
13484 * spew.c (yylex): Handle it.
13485 * lex.c (identifier_type): Produce it.
13486
13487 * parse.y (complete_type_name): In :: case, don't push class binding.
13488 (complex_type_name): Likewise.
13489
13490 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
13491
13492 * typeck.c (build_reinterpret_cast): Handle pointer to member
13493 functions.
13494
13495 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13496
13497 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
13498 pragmas.
13499 (check_newline): Put the vtable/unit/implementation/interface pragma
13500 code into handle_cp_pragma, replacing it with a call.
13501 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
13502 args. Get the next token after handling the pragma token.
13503
13504 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
13505
13506 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
13507 (convert_to_pointer_force): Likewise.
13508
13509 * init.c (build_new): Fix array new without -fcheck-new.
13510
13511 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
13512
13513 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
13514 tree.c: Lose TYPE_NESTED_NAME.
13515
13516 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
13517 as identifiers.
13518
13519 * tree.def: Add VEC_INIT_EXPR.
13520 * expr.c (cplus_expand_expr): Handle it.
13521 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
13522 the extra file-scope symbol nastiness.
13523
13524 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
13525
13526 * method.c (make_thunk): Thunks are static.
13527 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
13528
13529 * decl2.c (mark_vtable_entries): Emit thunks as needed.
13530 (finish_file): Don't emit them here.
13531
13532 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
13533
13534 * rtti.c (build_dynamic_cast): Handle null pointers.
13535 (ifnonnull): New function.
13536
13537 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
13538
13539 * call.c (build_method_call): Remember the original basetype we
13540 were called with. Give an error message instead of trying
13541 (incorrectly) to call a non-static member function through a
13542 non-inherited class.
13543
13544 * search.c (expand_upcast_fixups): Mark the new fixup as
13545 DECL_ARTIFICIAL.
13546
13547 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
13548
13549 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
13550
13551 * class.c (set_rtti_entry): Fix for thunks.
13552
13553 * decl2.c (import_export_decl): Still emit typeinfo fns for
13554 cv-variants of builtin types.
13555
13556 * rtti.c (expand_class_desc): Set up base_info_type_node here.
13557 (init_rtti_processing): Instead of here.
13558
13559 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
13560
13561 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
13562 (build_typeid): Only complain about taking dynamic typeid without
13563 -frtti.
13564
13565 * decl2.c: flag_rtti defaults to 1.
13566
13567 * rtti.c (get_tinfo_var): The general class case is now smaller.
13568 (init_rtti_processing): Pack the latter three fields of base_info
13569 into 32 bits.
13570
13571 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
13572
13573 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
13574
13575 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
13576
13577 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
13578 (push_memoized_context): Split out code to undefer pop_type_level to
13579 (clear_memoized_cache): here.
13580 (pop_memoized_context): We can only handle one layer of deferral of
13581 pop_type_level so clear the cache, if there was a previous level.
13582
13583 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
13584
13585 * rtti.c (init_rtti_processing): Build up base_info_type_node.
13586 (expand_class_desc): Use one pointer to an array of base_info
13587 structs, passed using a CONSTRUCTOR.
13588
13589 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
13590
13591 * class.c (build_vbase_path): Remove block extern for
13592 flag_assume_nonnull_objects here.
13593 (build_vfn_ref): Split out functionality into build_vtbl_ref.
13594 (build_vtbl_ref): New routine.
13595 (build_vtable): Set up rtti info here.
13596 (add_virtual_function): Note in CLASSTYPE_RTTI the best
13597 place where we can get the rtti pointers from to avoid having to
13598 search around for a place.
13599 (finish_base_struct): Likewise.
13600 (finish_struct_1): Likewise. Never create totally new vtables
13601 with totally new vtable pointers for rtti. Disable code to layout
13602 vtable pointers better until we want to break binary
13603 compatibility.
13604 * rtti.c (build_headof_sub): New routine to convert down to a
13605 sub-object that has an rtti pointer in the vtable.
13606 (build_headof): Use it. Also, use build_vtbl_ref now to be more
13607 maintainable.
13608 (build_dynamic_cast): Make sure we have saved it, if we need to.
13609 * search.c (dfs_init_vbase_pointers): Disable code that deals with
13610 a more efficient vtable layout, enable later.
13611 * call.c (flag_assume_nonnull_objects): Moved declaration to
13612 * cp-tree.h: here. Declare build_vtbl_ref.
13613 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
13614 function calls that want a tree.
13615
13616 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
13617
13618 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
13619 other X subobjects in the most derived type. Ack.
13620
13621 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
13622 get_typeid will do it for us.
13623 (get_typeid_1): Break out call-building for expand_*_desc to use.
13624 (get_typeid): Call it.
13625 (expand_*_desc): Likewise.
13626 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
13627 and void *.
13628 (init_decl_processing): Lose builtin_type_tdescs lossage.
13629 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
13630
13631 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
13632
13633 * pt.c (tsubst): When calling set_nested_typename, use
13634 TYPE_NESTED_NAME (current_class_type) instead of
13635 current_class_name.
13636
13637 * decl.c (pushdecl): Likewise.
13638 (pushdecl_class_level): Likewise.
13639 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
13640 set_nested_typename.
13641
13642 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
13643
13644 * rtti.c (synthesize_tinfo_fn): Handle arrays.
13645
13646 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
13647
13648 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
13649
13650 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
13651 (init_rtti_processing): Lose bad_cast_type.
13652 (build_dynamic_cast): Use throw_bad_cast.
13653
13654 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
13655
13656 * decl2.c (finish_file): Don't synthesize artificial functions
13657 that are external and not inline.
13658
13659 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
13660
13661 * decl2.c (finish_file): Handle having new inlines added to
13662 saved_inlines by synthesis.
13663
13664 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
13665
13666 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
13667
13668 RTTI rewrite to initialize nodes as needed, not require that
13669 users #include <typeinfo>, complete functionality and reduce wasted
13670 space.
13671 * rtti.c (init_rtti_processing): New fn.
13672 (build_typeid): The vtable entry is now a function.
13673 (get_tinfo_var): New fn.
13674 (get_tinfo_fn): Likewise.
13675 (get_typeid): Use it.
13676 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
13677 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
13678 points __rtti_*.
13679 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
13680 (synthesize_tinfo_fn): New fn.
13681 * method.c (build_t_desc_overload): Lose.
13682 (build_overload_with_type): More generic.
13683 * decl.c (init_decl_processing): Call init_rtti_processing.
13684 * class.c (set_rtti_entry): Use get_tinfo_fn.
13685 * decl2.c (mark_vtable_entries): Mark the rtti function.
13686 (finish_prevtable_vardecl): Don't build_t_desc.
13687 (import_export_decl): Handle tinfo functions.
13688 (finish_file): Likewise.
13689 * typeck.c (inline_conversion): New fn.
13690 (build_function_call_real): Use it.
13691 * cp-tree.h: Add decls.
13692
13693 * method.c (hack_identifier): Also convert component_refs from
13694 references.
13695
13696 * lex.c (cons_up_default_function): Use the type, not the name, in
13697 declspecs.
13698
13699 * decl2.c (import_export_vtable): Fix weak vtables.
13700
13701 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
13702
13703 * search.c (get_base_distance_recursive): Fix access checks for
13704 protected bases.
13705
13706 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13707
13708 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
13709 cp-tree.h.
13710 (convert_harshness): Add prototypes wrapped by PROTO.
13711 * decl2.c (grok_function_init): Likewise.
13712 (do_toplevel_using_decl): Change to void return type.
13713 * class.c (build_vtable_entry): Remove decl of make_thunk.
13714 (merge_overrides): Fix order of arg definitions.
13715 (finish_vtbls): Likewise.
13716 (fixup_vtable_deltas): Likewise.
13717 (modify_all_direct_vtables): Likewise.
13718 (modify_all_indirect_vtables): Likewise.
13719 * search.c (get_base_distance_recursive): Likewise.
13720 (get_abstract_virtuals_1): Likewise.
13721 (fixup_virtual_upcast_offsets): Likewise.
13722 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
13723 * init.c (perform_member_init): Fix order of arg definitions.
13724 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
13725 * cp-tree.h (make_thunk): Add decl.
13726 (overload_template_name, push_template_decl): Add decls.
13727 (do_toplevel_using_decl): Change to void return type.
13728 (vec_binfo_member): Add decl.
13729
13730 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13731
13732 * typeck.c (mark_addressable, convert_for_assignment,
13733 convert_for_initialization, pointer_int_sum, pointer_diff,
13734 unary_complex_lvalue): Add prototypes wrapped by PROTO.
13735 (convert_sequence): #if 0 fn decl, since definition also is.
13736
13737 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
13738
13739 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
13740 cast to pointer types for type searching.
13741
13742 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13743
13744 * typeck.c (get_delta_difference): Use cp_error, not error, in the
13745 case where BINFO == 0.
13746
13747 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
13748
13749 * call.c (build_method_call): Fix wording of error messages so
13750 constructors come out right.
13751
13752 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
13753
13754 * decl.c (push_overloaded_decl): Don't warn about hidden
13755 constructors when both the type and the function are declared
13756 in a system header file.
13757
13758 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
13759
13760 * class.c (finish_struct_1): Propagate the TYPE_PACKED
13761 flag for the type to the type's fields.
13762
13763 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13764
13765 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
13766
13767 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
13768
13769 * class.c (base_info, finish_base_struct): Replace
13770 needs_virtual_dtor with base_has_virtual.
13771
13772 (finish_struct_1): Remove the old code that tried to make default
13773 destructors virtual. Use base_has_virtual when checking if we need
13774 to add a vtable entry for the rtti code.
13775
13776 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
13777
13778 * pt.c (push_template_decl): Complain about template decl with
13779 inappropriate declaration.
13780
13781 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
13782
13783 * typeck.c (build_x_unary_op): Remove bogus check for taking
13784 the address of a member function.
13785
13786 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
13787
13788 * parse.y (constructor_declarator): Only push the class if
13789 we are not already in the class.
13790
13791 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
13792
13793 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
13794 Add additional argument to INIT_CUMULATIVE_ARGS.
13795
13796 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
13797
13798 * decl.c (shadow_tag): Fix error about anon union with methods.
13799
13800 * parse.y (self_reference): Only generate a self-reference if this
13801 is a non-template class.
13802 (opt.component_decl_list): Only use it if it was generated.
13803
13804 * parse.y (component_decl_1): Use constructor_declarator.
13805 (fn.def2): Likewise.
13806 (notype_component_declarator0): Likewise.
13807
13808 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
13809
13810 * typeck.c (build_x_unary_op): Add checks for taking the address
13811 of a TARGET_EXPR or of a member function, and give appropriate
13812 warnings.
13813
13814 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
13815
13816 * pt.c (process_template_parm): Allow template type parms to be
13817 used as types for template const parms.
13818
13819 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
13820
13821 * init.c (expand_vec_init): Ensure the eh cleanups are on the
13822 function_obstack.
13823
13824 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
13825
13826 * decl.c (lookup_name_real): Be even more picky about the
13827 ambiguous lookup warning.
13828 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
13829 * parse.y (constructor_declarator): Rather than here.
13830
13831 * parse.y (constructor_declarator): New nonterminal.
13832 (fn.def1): Use it.
13833 (explicit_instantiation): Likewise.
13834
13835 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
13836
13837 Add implicit declaration of class name at class scope.
13838 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
13839 * parse.y (self_reference): New nonterminal.
13840 (opt.component_decl_list): Use it.
13841 (fn.def1): Add nested_name_specifier type_name cases.
13842 * class.c (build_self_reference): New function.
13843 (finish_struct): Handle access_default later, move self-reference
13844 decl to the end.
13845 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
13846 * cp-tree.h: Adjust.
13847
13848 * pt.c (do_function_instantiation): Separate handling of member
13849 functions and non-member functions properly.
13850
13851 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
13852
13853 * pt.c (process_template_parm): Improve error for 'volatile class K'.
13854
13855 * class.c (finish_struct_1): Check the right slot for destructors.
13856
13857 * decl.c (start_enum): Complain about enum templates.
13858
13859 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
13860
13861 * init.c (resolve_offset_ref): Offset pointers to member data by one.
13862 * typeck.c (unary_complex_lvalue): Likewise.
13863
13864 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
13865
13866 * typeck.c (c_expand_return): Check for a returned local
13867 array name, similar to the check for an ADDR_EXPR.
13868
13869 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
13870
13871 * decl.c (cp_finish_decl): Don't build cleanups for static
13872 variables here.
13873
13874 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
13875
13876 * typeck.c (build_modify_expr): Fix error messages to be more
13877 accurate.
13878 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
13879 assignment operators.
13880 * error.c (assop_as_string): Likewise. Add support for `%Q' for
13881 assignment operators.
13882
13883 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
13884
13885 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
13886 give an error if initialized. pedwarn about nested type with the
13887 same name as its enclosing class.
13888
13889 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
13890
13891 * typeck.c (require_complete_type): Be sure to instantiate the
13892 MAIN_VARIANT of the type.
13893
13894 * decl2.c (finish_file): Instantiate pending templates before
13895 processing static constructors and destructors.
13896
13897 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
13898 unless at_eof.
13899
13900 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
13901
13902 * decl2.c (delete_sanity): If error_mark_node is passed
13903 in as an expression, quit while we're ahead.
13904
13905 * decl.c (grokdeclarator): Give an error message if `friend'
13906 is combined with any storage class specifiers.
13907
13908 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
13909
13910 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
13911 definition of nonexistent nested type.
13912
13913 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
13914 not to say 'typedef'.
13915
13916 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13917
13918 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
13919 * search.c (dfs_walk, dfs_init_vbase_pointers,
13920 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
13921 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
13922
13923 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
13924
13925 * except.c (build_throw): Support minimal parse.
13926 * pt.c (tsubst_copy): Support THROW_EXPR.
13927 * decl2.c (build_expr_from_tree): Likewise.
13928
13929 * pt.c (mangle_class_name_for_template): Always allocate
13930 scratch_firstobj.
13931
13932 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
13933
13934 * cvt.c (cp_convert_to_pointer): Give an appropriate error
13935 when trying to cast from an incomplete type.
13936
13937 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
13938
13939 * pt.c (instantiate_class_template): Don't bother setting up
13940 CLASSTYPE_TAGS explicitly, as the nested types will add
13941 themselves.
13942
13943 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
13944
13945 * decl.c (shadow_tag): Remove old error check for usage of
13946 an enum without a previous declaration.
13947 (xref_tag): Add error message about usage of enums without a
13948 previous declaration.
13949
13950 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
13951
13952 * lex.c (do_identifier): Only do name consistency check if we're
13953 parsing.
13954
13955 * pt.c (push_template_decl): Don't crash if we get a member defn
13956 that doesn't match.
13957
13958 * decl.c (xref_tag_from_type): New function to do an xref without
13959 always having to figure out code_type_node.
13960 * cp-tree.h: Declare it.
13961 * pt.c (instantiate_class_template): Use it for friend classes.
13962 (lookup_template_class): Use it.
13963
13964 * typeck2.c (build_functional_cast): Pull out a single parm before
13965 passing it to build_c_cast.
13966
13967 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
13968
13969 * expr.c (do_case): Give an error message if a pointer is
13970 given as a case value.
13971
13972 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
13973
13974 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
13975 an overload list.
13976
13977 * lex.c (cons_up_default_function): Really, now, interface hackery
13978 does not apply to synthesized methods.
13979
13980 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
13981
13982 * call.c (build_method_call): Ctors and dtors now have special names
13983 with respect to lookups.
13984 * class.c (add_method): Likewise.
13985 (grow_method): Likewise.
13986 (finish_struct_methods): Likewise.
13987 (warn_hidden): Likewise.
13988 (finish_struct_1): Likewise.
13989 * cvt.c (convert_to_reference): Likewise.
13990 (convert_to_aggr): Likewise.
13991 (cp_convert): Likewise.
13992 * decl2.c (check_classfn): Likewise.
13993 * init.c (expand_member_init): Likewise.
13994 (expand_default_init): Likewise.
13995 (expand_aggr_init_1): Likewise.
13996 (build_offset_ref): Likewise.
13997 (build_new): Likewise.
13998 (build_delete): Likewise.
13999 * lex.c (do_inline_function_hair): Likewise.
14000 * search.c (lookup_field_1): Likewise.
14001 (lookup_fnfields_here): Likewise.
14002 (lookup_field): Likewise.
14003 (lookup_fnfields): Likewise.
14004 (get_virtual_destructor): Likewise.
14005 (dfs_debug_mark): Likewise.
14006 (dfs_pushdecls): Likewise.
14007 (dfs_compress_decls): Likewise.
14008 * tree.c (layout_basetypes): Likewise.
14009 * typeck.c (build_component_ref): Likewise.
14010 (build_x_function_call): Likewise.
14011 (build_modify_expr): Likewise.
14012 (convert_for_initialization): Likewise.
14013 (build_functional_cast): Likewise.
14014 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
14015 (CTOR_NAME): New.
14016 (DTOR_NAME): New.
14017 * decl.c (ctor_identifier): New.
14018 (dtor_identifier): New.
14019 (init_decl_processing): Set them.
14020
14021 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
14022
14023 * typeck.c (build_component_ref): Don't get confused by fields whose
14024 context has no type name, like pointer to member functions.
14025
14026 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
14027
14028 * decl.c (grokdeclarator): Handle typedef without declarator.
14029
14030 * pt.c (tsubst): Handle SCOPE_REF in declarator.
14031
14032 * parse.y (bad_parm): Catch another case of missing `typename'.
14033
14034 * lex.c (yyprint): Handle TYPE_DECLs.
14035
14036 * decl.c (start_function): Don't try to be clever.
14037
14038 * lex.c: Lose compiler_error_with_decl.
14039 * typeck2.c: Lose error_with_aggr_type.
14040 (incomplete_type_error): Use cp_* instead of old functions.
14041 (readonly_error): Likewise.
14042 * typeck.c (convert_arguments): Likewise.
14043 * search.c (lookup_nested_field): Likewise.
14044 * method.c (make_thunk): Likewise.
14045 * decl.c (grokparms): Likewise.
14046 * cp-tree.h: Update.
14047
14048 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
14049 and value.
14050
14051 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
14052
14053 * method.c (build_opfncall): When deleting a pointer to an
14054 array, build a new pointer to the tree past any ARRAY_TYPE
14055 nodes.
14056
14057 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14058
14059 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
14060
14061 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
14062
14063 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
14064 and ! DECL_INLINE.
14065
14066 * decl.c (finish_function): Don't set nested based on
14067 hack_decl_function_context.
14068 * parse.y (function_try_block): Check for nested function.
14069 (pending_inlines): Likewise.
14070
14071 * decl2.c (build_expr_from_tree): If a unary op already has a
14072 type, just return it.
14073
14074 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
14075
14076 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
14077 (finish_file): Check the return value of walk_vtables.
14078 (finish_prevtable_vardecl): Return int.
14079 (finish_vtable_vardecl): Likewise.
14080 (prune_vtable_vardecl): Likewise.
14081 * lex.c (set_vardecl_interface_info): Likewise.
14082 * cp-tree.h: Adjust return types.
14083
14084 * class.c (delete_duplicate_fields_1): Don't complain about
14085 duplicate nested types if they're the same type.
14086 (finish_struct): Remove check for duplicate.
14087 * decl2.c (grokfield): Don't check for typedef of anonymous type.
14088
14089 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
14090
14091 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
14092
14093 * decl.c (grokdeclarator): Lose special handling of class-level
14094 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
14095 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
14096
14097 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
14098
14099 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
14100
14101 * search.c (compute_access): Fix handling of anonymous union
14102 members.
14103 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
14104 from anonymous unions to their members.
14105
14106 * typeck.c (build_x_function_call): For static member functions,
14107 hand off to build_member_call.
14108
14109 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
14110
14111 * typeck.c (build_component_ref): Handle OFFSET_REFs.
14112
14113 * init.c (expand_vec_init): Fix init == 0 case.
14114
14115 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
14116
14117 * init.c (build_new): pedwarn about init and array new.
14118 (expand_vec_init): Handle lists, use convert_for_initialization.
14119
14120 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
14121 when converting to an aggregate type.
14122 * cvt.c (cp_convert): Pass it through.
14123
14124 * typeck.c (build_conditional_expr): Handle user-defined
14125 conversions to slightly different types.
14126
14127 * decl.c (grokdeclarator): Force an array type in a parm to be
14128 permanent.
14129
14130 * decl2.c (do_using_directive): Sorry.
14131 (do_namespace_alias): Likewise.
14132 * lex.c (real_yylex): Warn about using the `namespace' keyword.
14133
14134 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
14135
14136 * parse.y (datadef): Move call to note_list_got_semicolon up.
14137
14138 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
14139
14140 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
14141
14142 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
14143
14144 * decl.c (cp_finish_decl): The exception regions have to be
14145 nested, not overlapping. We start the exception region for a
14146 decl, after it has been fully built, and all temporaries for it
14147 have been cleaned up.
14148
14149 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
14150
14151 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
14152
14153 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
14154
14155 * tree.def: Add RETURN_INIT.
14156 * pt.c (instantiate_decl): Handle RETURN_INIT.
14157 * decl.c (store_return_init): Handle minimal_parse_mode.
14158
14159 * tree.c (cp_build_type_variant): Just return an error_mark_node.
14160 * decl.c (make_typename_type): Don't try to get the file and line
14161 of an identifier.
14162 * typeck.c (comptypes): Handle TYPENAME_TYPE.
14163
14164 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
14165
14166 * decl.c (poplevel): Make sure we clear out and restore old local
14167 non-VAR_DECL values by default when they go out of scope.
14168
14169 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
14170
14171 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
14172 referring to addresses of variables and functions.
14173
14174 * error.c (dump_expr): Support SIZEOF_EXPR.
14175
14176 * init.c (do_friend): Use the return value of check_classfn.
14177
14178 * typeck.c (convert_arguments): Call complete_type.
14179
14180 * method.c (hack_identifier): After giving an error, set value to
14181 error_mark_node.
14182
14183 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
14184
14185 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
14186 lossage for local classes.
14187 * cp-tree.h: Declare it.
14188 * decl.c (lookup_name_real): Evil, painful hack for local classes.
14189 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
14190 Use hack_decl_function_context.
14191 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
14192 (start_function): Use hack_decl_function_context.
14193 (finish_function): Likewise.
14194 * method.c (synthesize_method): Likewise.
14195 * lex.c (process_next_inline): Likewise.
14196 (do_pending_inlines): Likewise.
14197 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
14198 done with it.
14199
14200 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
14201
14202 * sig.c (build_signature_pointer_or_reference_type): Align
14203 signature pointers/references on 8-byte boundaries so they can be
14204 grabbed 2 words at a time on a Sparc.
14205
14206 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
14207
14208 * method.c (hack_identifier): Requiring a static chain is now a
14209 hard error.
14210 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
14211 functions.
14212
14213 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
14214
14215 * init.c (build_offset_ref): Call complete_type.
14216
14217 * decl.c (pop_from_top_level): Always pop previous_class_type.
14218
14219 * parse.y: Handle multiple decls in a for-init-statement.
14220 * pt.c (tsubst_expr): Likewise.
14221
14222 * pt.c (tsubst): Use tsubst_expr for the second operand of an
14223 ARRAY_REF.
14224
14225 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
14226 (poplevel_class): Set it here.
14227 (pop_from_top_level): Pop it here if we're returning to class scope.
14228 * class.c (pushclass): Don't set it here.
14229
14230 * decl.c (maybe_push_to_top_level): Save current_template_parms,
14231 and clear it if !pseudo.
14232 (pop_from_top_level): Restore it.
14233
14234 * decl2.c (finish_file): Push the dummy each time we walk the list
14235 of vtables.
14236
14237 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
14238 something for CAST_EXPR.
14239
14240 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
14241
14242 * cvt.c (cp_convert): Warn about implicit conversion of the
14243 address of a function to bool, as it is always true.
14244
14245 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
14246
14247 * typeck.c (c_expand_return): Fix warning for local externs returned.
14248
14249 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
14250
14251 * tree.c (mapcar): Propagate const and volatile properly.
14252
14253 * typeck.c (complete_type): Be sure to instantiate the
14254 MAIN_VARIANT of the type.
14255
14256 * method.c (synthesize_method): Class interface hackery does not
14257 apply to synthesized methods.
14258
14259 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
14260
14261 * pt.c (comp_template_args): Use comptypes rather than just
14262 checking for TEMPLATE_TYPE_PARM equivalence.
14263
14264 * typeck.c (build_x_function_call): Call complete_type before
14265 checking TYPE_OVERLOADS_CALL_EXPR.
14266
14267 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
14268
14269 * g++.c (main): Check also for new define ALT_LIBM.
14270
14271 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
14272
14273 * pt.c (instantiate_class_template): If we don't have a pattern
14274 yet, that's OK.
14275 (coerce_template_parms): If we see a local class, bail.
14276
14277 * decl.c (grok_reference_init): Make sure there's a type before
14278 checking its code.
14279
14280 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
14281 (push_template_decl): Likewise.
14282
14283 * parse.y (named_class_head): Set
14284 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
14285
14286 * decl.c (xref_tag): Diagnose redeclaration of template
14287 type-parameter name.
14288
14289 * error.c (dump_type): Handle anonymous template type parms.
14290
14291 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
14292 TYPE_STUB_DECL.
14293 (coerce_template_parms): Likewise.
14294
14295 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
14296
14297 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
14298 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
14299
14300 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
14301
14302 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
14303 before trying to get its STUB_DECL.
14304 (coerce_template_parms): Likewise.
14305
14306 * parse.y (template_type_parm): If they didn't use 'class',
14307 pretend they did after giving an error.
14308
14309 * pt.c (coerce_template_parms): Diagnose use of local class.
14310
14311 * decl.c (grok_reference_init): Use instantiate_type.
14312
14313 * error.c (dump_expr): Handle TEMPLATE_DECLs.
14314
14315 * parse.y (named_class_head): Diagnose mismatching types and tags.
14316
14317 * decl.c (pushdecl): Type decls and class templates clash with
14318 artificial type decls, not hide them.
14319
14320 * decl.c (redeclaration_error_message): Diagnose redefinition of
14321 templates properly.
14322 (duplicate_decls): Diagnose disallowed overloads for template
14323 functions, too.
14324
14325 * decl.c (start_decl): Call complete_type before checking for a
14326 destructor.
14327
14328 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
14329
14330 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
14331
14332 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14333
14334 * decl.c (grok_op_properties): Don't check for operator++(int) in
14335 a template.
14336
14337 * tree.c (perm_manip): Return a copy of variable and function
14338 decls with external linkage.
14339
14340 * tree.def: Change some of the min tree codes to type "1".
14341 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
14342 * method.c (build_overload_int): Emit something arbitrary for
14343 anything but an INTEGER_CST if we're in a template.
14344
14345 * decl.c (cp_finish_decl): Call complete_type before deciding
14346 whether or not to lay out the decl.
14347
14348 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
14349
14350 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
14351
14352 * typeck2.c (build_x_arrow): Call complete_type.
14353
14354 * pt.c (add_pending_template): Broken out.
14355 (lookup_template_class): If -fexternal-templates, call it for all
14356 the methods of implemented types.
14357 (instantiate_class_template): Instead of instantiating them here.
14358 (instantiate_decl): Handle -fexternal-templates earlier.
14359
14360 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14361
14362 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
14363 memoized lookup stuff inside GATHER_STATISTICS.
14364
14365 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
14366
14367 * decl.c (start_decl): Complain about array of incomplete type
14368 here.
14369 (grokdeclarator): Not here.
14370
14371 * parse.y (template_parm): Expand full_parm inline so we can set
14372 the rule's precedence.
14373
14374 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
14375 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
14376 * decl2.c (grokbitfield): Don't check for integer constant here.
14377 * class.c (finish_struct_1): Check here.
14378
14379 * decl.c (define_label): Make the min decl go on permanent_obstack.
14380
14381 * pt.c (unify): Don't handle CONST_DECLs.
14382 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
14383 (tsubst_copy): Likewise.
14384
14385 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
14386 CONST_DECL for a template parm.
14387
14388 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
14389
14390 * decl.c (grokdeclarator): Complain about array of incomplete type
14391 here.
14392 (start_decl_1): Not here.
14393
14394 * pt.c (tsubst): Handle pointer-to-function declarators.
14395
14396 * method.c (hack_identifier): If pedantic, diagnose local class
14397 methods that require a static chain.
14398
14399 * decl.c (grok_op_properties): No longer static.
14400 * cp-tree.h: Declare it.
14401 * pt.c (tsubst): Call it for operators.
14402 Use tsubst_copy for TREE_VECs.
14403
14404 * parse.y (template_arg): The expr has precedence like '>'.
14405
14406 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
14407
14408 * pt.c (coerce_template_parms): Don't coerce an expression using
14409 template parms.
14410 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
14411 (tsubst): Don't use build_index_2_type if the max_value uses template
14412 parms.
14413 * method.c (build_overload_int): Emit something arbitrary for an
14414 expression using template parms.
14415
14416 * parse.y (template_close_bracket): New non-terminal to catch use
14417 of '>>' instead of '> >' in template class names.
14418 (template_type): Use it.
14419 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
14420
14421 * tree.def: Add CAST_EXPR.
14422 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
14423 CONVERT_EXPR for minimal_parse_mode.
14424 * typeck.c (build_c_cast): Likewise.
14425 * pt.c (tsubst_copy): Likewise.
14426 * decl2.c (build_expr_from_tree): Likewise.
14427 * error.c (dump_expr): Likewise.
14428
14429 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14430
14431 * except.c (SetTerminate, SetUnexpected): Put back global vars.
14432 (init_exception_processing): Put back decl/init of
14433 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
14434 fns from libstdc++.
14435
14436 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
14437 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
14438 Delete unused fns.
14439 * cp-tree.h (declare_uninstantiated_type_level,
14440 uninstantiated_type_level_p): Delete prototypes.
14441
14442 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
14443
14444 * pt.c (tsubst_expr): Add default return.
14445
14446 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14447
14448 * error.c (fndecl_as_string): Delete unused arg CNAME.
14449 * sig.c (build_signature_table_constructor,
14450 build_signature_method_call): Fix calls.
14451
14452 * class.c (the_null_vtable_entry): Delete var definition.
14453 (init_class_processing): Delete tree the_null_vtable_entry init.
14454 * decl.c (no_print_{functions, builtins}): Declare as static.
14455 (__tp_desc_type_node): #if 0 var definition.
14456 (init_type_desc): #if 0 init of __tp_desc_type_node.
14457 (vb_off_identifier): Move var decl into init_decl_processing.
14458 (current_function_assigns_this): Declare as static.
14459 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
14460 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
14461 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
14462 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
14463 * init.c (BI_header_type, BI_header_size): Declare as static.
14464 * pt.c (template_classes): Delete unused var.
14465 (add_pending_template): Delete decl for non-existent fn.
14466 (lookup_template_class): Delete vars CODE and TAG_CODE.
14467 (instantiate_template): Delete unused var TARGS.
14468 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
14469 Delete decls.
14470 (__tp_desc_type_node): #if 0 var decl.
14471 (fndecl_as_string): Fix prototype.
14472
14473 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
14474
14475 * tree.def: Add GOTO_STMT.
14476 * pt.c (tsubst_expr): Support goto and labels.
14477 * decl.c (define_label): Support minimal parsing.
14478 * parse.y (simple_stmt): Likewise.
14479
14480 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14481
14482 * xref.c (GNU_xref_member): Only define/set var I if
14483 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
14484 used.
14485 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
14486 (GNU_xref_end): Fix call.
14487 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
14488 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
14489
14490 * tree.c (build_exception_variant): Delete unused vars I, A, T,
14491 T2, and CNAME.
14492 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
14493 (mapcar): Delete unused var CODE.
14494 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
14495 (break_out_cleanups): Fix call.
14496 (bot_manip): Likewise.
14497 * call.c (build_method_call): Likewise.
14498 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
14499 Likewise.
14500 * typeck.c (unary_complex_lvalue, build_modify_expr,
14501 convert_for_initialization): Likewise.
14502 * typeck2.c (build_functional_cast): Likewise.
14503 * cp-tree.h (build_cplus_new): Fix prototype.
14504
14505 * repo.c (open_repo_file): Delete unused var Q.
14506 (repo_compile_flags, repo_template_declared,
14507 repo_template_defined, repo_class_defined, repo_inline_used,
14508 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
14509 (repo_get_id, repo_vtable_used): Declare as static.
14510 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
14511 prototypes.
14512
14513 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
14514
14515 * parse.y (pending_inlines): Add function_try_block case.
14516
14517 * pt.c (unify): Fix for template const parms.
14518
14519 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14520
14521 * lex.c (extract_interface_info): Delete forward decl.
14522 (default_copy_constructor_body, default_assign_ref_body): Delete
14523 decls for non-existent functions.
14524 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
14525 (init_lex): Delete setting them.
14526 (cons_up_default_function): Delete unused vars FUNC_BUF,
14527 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
14528 #if 0'd synth code.
14529 (toplevel, expression_obstack): Delete unused extern decls.
14530 (tree_node_kind): Delete unused enum.
14531 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
14532 GATHER_STATISTICS.
14533 (tree_node_kind_names): Delete unused extern decl.
14534 (synth_obstack): Delete unused var.
14535 (init_lex): Don't set it.
14536 (init_parse): Add decl before use.
14537 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
14538 (current_unit_{name, language}): Delete unused vars.
14539 (check_newline): Don't bother setting them, just accept the #pragma.
14540 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
14541 (current_unit_{name, language}): Delete decls.
14542
14543 * search.c: Wrap all of the memoized functions, macros, and
14544 variables inside #ifdef GATHER_STATISTICS.
14545 (lookup_field, lookup_fnfields): Likewise.
14546 (init_search_processing): Likewise.
14547 (reinit_search_statistics): Wrap whole function.
14548 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
14549
14550 * decl.c (finish_function): Only call pop_memoized_context if
14551 GATHER_STATISTICS is defined.
14552 (start_function): Likewise for push_memoized_context.
14553 * class.c (pushclass, popclass): Likewise.
14554
14555 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
14556 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
14557
14558 * cvt.c (cp_convert): Delete unused local var FORM.
14559 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
14560 prototypes.
14561
14562 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14563
14564 * pt.c (do_poplevel): Oops; really return what we get from
14565 poplevel this time.
14566
14567 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14568
14569 * cp-tree.h (is_aggr_type): Add prototype.
14570
14571 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
14572 * method.c ({push,pop}_cp_function_context): Delete decls.
14573 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
14574 (SetUnexpected, SetTerminate): Delete unused vars.
14575 (init_exception_processing): Don't set SetUnexpected or
14576 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
14577 (output_exception_table_entry): Delete unused array LABEL.
14578 (expand_internal_throw): Delete unused var PARAMS.
14579 (expand_start_catch_block): Delete unused var CLEANUP.
14580 (emit_exception_table): Delete unused var EH_NODE_DECL.
14581 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
14582 GOTO_UNWIND_AND_THROW. Don't set them.
14583 (end_eh_unwinder): Add top decl.
14584 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
14585 (exception_section, push_rtl_perm, do_function_call,
14586 lang_interim_eh, push_eh_cleanup, eh_outer_context,
14587 expand_end_eh_spec, end_eh_unwinder): Declare as static.
14588 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
14589 throw_used): Likewise.
14590 * cp-tree.h (expand_end_eh_spec): Delete prototype.
14591
14592 * search.c (dfs_mark, dfs_mark_vtable_path,
14593 dfs_unmark_vtable_path, dfs_mark_new_vtable,
14594 dfs_unmark_new_vtable, dfs_clear_search_slot,
14595 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
14596 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
14597 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
14598 functions.
14599 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
14600 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
14601 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
14602 Only define #ifdef GATHER_STATISTICS.
14603 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
14604 is defined.
14605 (vbase_decl): Delete var definition.
14606 (init_search): Delete old decl.
14607 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
14608 never actually used.
14609 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
14610 (get_base_distance_recursive): Delete unused fourth arg
14611 BASETYPE_PATH. Fix call .
14612 (get_base_distance): Fix call.
14613 (push_class_decls): Delete unused var ID.
14614 (make_memoized_table_entry): Declare as static.
14615 (breadth_first_search): Declare as static.
14616 (tree_has_any_destructor_p): Declare as static.
14617 (pop_class_decls): Delete unused arg pop_class_decls.
14618 * class.c (popclass): Fix call to pop_class_decls.
14619 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
14620 tree_has_any_destructor_p): Delete prototypes.
14621
14622 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
14623 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
14624 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
14625 (build_user_desc): Delete unused var T.
14626 (build_class_desc): Delete unused vars T and OFF.
14627 (build_t_desc): Delete unused var NAME_STRING.
14628 (build_headof): Make static.
14629 (get_bad_cast_node): Likewise.
14630 (get_def_to_follow): Likewise.
14631 * cp-tree.h (init_type_desc): Add prototype.
14632 (build_headof): Remove prototype.
14633
14634 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
14635
14636 * pt.c (tsubst): Only look for matching decls at file scope for
14637 non-member functions.
14638
14639 * call.c (build_scoped_method_call): Handle scoped destructor
14640 calls in templates.
14641
14642 * decl.c (*_top_level): Also save previous_class_values.
14643
14644 * pt.c (tsubst_expr): Support do {} while loops.
14645 * parse.y (simple_stmt): Likewise.
14646 * tree.def: Likewise.
14647
14648 * method.c (build_overload_identifier): For a class nested in a
14649 template class, don't mangle in the template parms from our
14650 context.
14651
14652 * lex.c, cp-tree.h: Remove support for template instantiations in
14653 the pending_inlines code.
14654 * pt.c: Remove dead functions and unused arguments.
14655 (uses_template_parms): TYPENAME_TYPEs always use template parms.
14656 * parse.y: Stop passing anything to end_template_decl.
14657 * tree.c (print_lang_statistics): Only print tinst info #ifdef
14658 GATHER_STATISTICS.
14659
14660 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14661
14662 * init.c (expand_recursive_init{,_1}): Delete decls.
14663 (sort_member_init): Delete unused var INIT.
14664 (emit_base_init): Delete unused var X.
14665 (build_offset_ref): Delete unused var CNAME.
14666 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
14667 (emit_base_init): Delete unused local var BASE. Delete extern
14668 decl of IN_CHARGE_IDENTIFIER.
14669 (build_delete): Delete unused local var VIRTUAL_SIZE.
14670
14671 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
14672 (build_delete): Fix call.
14673 * decl2.c (delete_sanity): Likewise.
14674 * cp-tree.h (build_vec_delete): Update prototype.
14675
14676 * typeck.c (common_base_type): Delete unused var TMP.
14677 (build_binary_op): Delete local var ARGS_SAVE.
14678 (build_array_ref): Delete unused var ITYPE.
14679 (c_expand_return): Delete unused var USE_TEMP.
14680
14681 * typeck.c (compexcepttypes): Delete unused arg STRICT.
14682 (comptypes): Fix calls.
14683 * decl.c (duplicate_decls): Likewise.
14684 * cp-tree.h (compexcepttypes): Delete extra arg.
14685
14686 * decl2.c (check_classfn): Delete unused second arg CNAME.
14687 * decl.c (start_decl, grokfndecl): Fix calls.
14688 * init.c (do_friend): Likewise.
14689 * cp-tree.h (check_classfn): Update prototype.
14690
14691 * cp-tree.h (signature_error, import_export_vtable,
14692 append_signature_fields, id_in_current_class, mark_used,
14693 copy_assignment_arg_p): Add decls.
14694 * decl2.c (mark_used): Delete decl.
14695
14696 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
14697
14698 * class.c (get_vtable_entry): Disable unused function.
14699 (doing_hard_virtuals): Delete unused static global var.
14700 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
14701 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
14702 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
14703 (modify_one_vtable): Delete unused var OLD_RTTI.
14704 (finish_struct_anon): Delete unused vars OFFSET and X.
14705 (finish_struct_bits): Delete unused var METHOD_VEC.
14706 (get_basefndecls): Delete unused var PURPOSE. Delete unused
14707 for-scope local variable METHODS.
14708
14709 * call.c (user_harshness): Delete unused/unneeded arg PARM.
14710 (ideal_candidate): Delete unused args BASETYPE and PARMS.
14711 (build_method_call): Delete unused args passed into ideal_candidate.
14712 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
14713 * cp-tree.h (synthesize_method): Add decl.
14714
14715 * decl.c (note_level_for_for): Give void return type.
14716 (pushdecl_nonclass_level): Likewise.
14717 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
14718 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
14719 (suspend_binding_level): Delete unused var LEVEL.
14720 (duplicate_decls): Delete unused var CTYPE.
14721 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
14722 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
14723 PTR_ENDLINK.
14724 (grokdeclarator): Delete unused var C.
14725 (grokdeclarator): Delete unused var SIZE_VARIES.
14726 (grokparms): Delete unused var SAW_VOID.
14727 (start_function): Delete unused var OLDDECL.
14728 (cplus_expand_expr_stmt): Delete unused var
14729 REMOVE_IMPLICIT_IMMEDIATELY.
14730
14731 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
14732
14733 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
14734
14735 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14736
14737 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
14738 (build_min_nt): Likewise.
14739 * pt.c (do_pushlevel): Emit line note.
14740 (do_poplevel): Return what we get from poplevel.
14741 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
14742 * parse.y: Use do_pushlevel and do_poplevel.
14743 * cp-tree.h: Declare do_poplevel.
14744
14745 * cp-tree.h: Declare at_eof.
14746 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
14747 * decl2.c (import_export_decl): Renamed from import_export_inline.
14748 (finish_file): Call it to do interface handling for statics.
14749 * pt.c (tsubst_copy): Call mark_used on variables and functions
14750 used here.
14751
14752 * decl2.c (finish_file): Don't emit statics we can't generate.
14753 * pt.c (instantiate_decl): Don't set interface on instantiations
14754 we can't generate.
14755
14756 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
14757 * tree.c (print_lang_statistics): Print max template depth.
14758 * pt.c (push_tinst_level): Dump entire instantiation context.
14759 (instantiate_class_template): Use it and pop_tinst_level.
14760 (instantiate_decl): Likewise.
14761
14762 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
14763 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
14764
14765 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
14766
14767 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
14768 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
14769 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
14770 the new template implementation.
14771
14772 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14773
14774 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
14775
14776 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
14777
14778 * decl.c (cp_finish_decl): Delay emitting the debug information for
14779 a typedef that has been installed as the canonical typedef, if the
14780 type has not yet been defined.
14781
14782 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
14783
14784 * decl2.c (grokfield): Still call pop_nested_class for access decls.
14785
14786 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14787
14788 * decl.c (lookup_label): Call label_rtx.
14789
14790 * decl.c (make_binding_level): New function.
14791 (pushlevel, pushlevel_class): Call it instead of explicit
14792 duplicate calls to xmalloc.
14793
14794 * decl.c (init_decl_processing): Delete useless build_pointer_type
14795 call.
14796
14797 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
14798 (sizet_ftype_string): Delete variable.
14799 (init_decl_processing): Add built-in functions fabsf, fabsl,
14800 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
14801 variable strlen_ftype, used for strlen.
14802
14803 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
14804
14805 * decl.c (push_to_top_level): Start from current_binding_level
14806 again for now; the stl hacks depend on g++ being broken in this
14807 way, and it'll be fixed in the template rewrite.
14808
14809 * tree.def: Add USING_DECL.
14810 * decl2.c (do_class_using_decl): Implement.
14811 (grokfield): Pass access decls off to do_class_using_decl instead of
14812 grokdeclarator.
14813 * error.c (dump_decl): Handle USING_DECLs.
14814 * decl.c (grokdeclarator): Remove code for handling access decls.
14815 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
14816 as access decls for now.
14817 (finish_struct): Don't check USING_DECLs for other uses of the name.
14818
14819 * search.c (get_matching_virtual): Use cp_error_at.
14820
14821 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14822
14823 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
14824 match c-typeck.c.
14825 (self_promoting_args_p): Move the check that TYPE is non-nil
14826 before trying to look at its main variant.
14827 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
14828
14829 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
14830 Delete macros.
14831 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
14832 (do_friend): Delete call to xref_friend.
14833 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
14834
14835 * typeck.c (convert_sequence): #if 0 unused function.
14836
14837 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
14838 be in decl_in_memory_p.
14839 (decl_in_memory_p): Delete decl.
14840 * expr.c (decl_in_memory_p): Delete fn.
14841 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
14842
14843 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
14844
14845 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
14846
14847 * class.c (finish_struct_1): Check for a pure-specifier on a
14848 non-virtual function here.
14849
14850 * decl2.c (grok_function_init): Don't check whether the function
14851 is virtual here.
14852 (grokfield): Don't call check_for_override here.
14853
14854 * decl.c (push_to_top_level): Start from inner_binding_level,
14855 check class_shadowed in class levels.
14856
14857 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
14858
14859 * decl.c (resume_level): Ignore things that don't have names, instead
14860 of core dumping.
14861
14862 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14863
14864 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
14865
14866 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
14867
14868 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
14869 synthesized dtor.
14870
14871 * parse.y (complete_type_name): Bind global_scope earlier.
14872 (complex_type_name): Likewise.
14873 (qualified_type_name): Remove.
14874
14875 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
14876
14877 * decl.c (grokfndecl): Move code that looks for virtuals in base
14878 classes...
14879 * class.c (check_for_override): ... to a new function.
14880 (finish_struct_1): Call it.
14881
14882 * cp-tree.h: Declare warn_sign_compare.
14883
14884 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
14885 rather than extra_warnings to decide whether to warn about
14886 comparison of signed and unsigned.
14887
14888 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
14889 implies -Wsign-compare. -Wall doesn't imply -W.
14890
14891 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
14892
14893 * typeck.c (build_component_ref): Fix to handle anon unions in base
14894 classes as well.
14895
14896 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14897
14898 * class.c (resolves_to_fixed_type_p): Delete code dealing with
14899 a WITH_CLEANUP_EXPR, since we don't generate them any more.
14900 * cvt.c (build_up_reference): Likewise.
14901 * decl.c (grok_reference_init): Likewise.
14902 (cp_finish_decl): Likewise.
14903 * error.c (dump_expr): Likewise.
14904 * tree.c (real_lvalue_p): Likewise.
14905 (lvalue_p): Likewise.
14906 (build_cplus_new): Likewise.
14907 (unsave_expr_now): Likewise.
14908 * typeck.c (unary_complex_lvalue, build_modify_expr,
14909 c_expand_return): Likewise.
14910
14911 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14912
14913 Make the C++ front-end pay attention to attributes for structures.
14914 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
14915 finish_struct_1.
14916 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
14917 Take out old round_up_size use and setting the DECL_ALIGN possibly
14918 using it. Take out setting of TYPE_ALIGN to round_up_size, which
14919 can override what the attribute set.
14920 * cp-tree.h (finish_struct): Update prototype.
14921 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
14922 attributes to finish_struct.
14923 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
14924 value down into finish_struct.
14925 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
14926
14927 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
14928
14929 * decl.c (poplevel): Re-word dead for local handling.
14930 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
14931 (cp_finish_decl): If is_for_scope, check for duplicates so
14932 we can disable is_for_scope. Otherwise, preserve_temp_slots.
14933
14934 * lex.c (do_identifier): Use global binding in preference of
14935 dead for local variable.
14936
14937 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
14938
14939 * init.c (initializing_context): Handle anon union changes, the
14940 context where fields of anon unions can be initialized now has to be
14941 found by walking up the TYPE_CONTEXT chain.
14942
14943 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
14944
14945 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
14946 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
14947 (obscure_complex_init): If bss is supported, always set
14948 DECL_INITIAL to error_mark_node.
14949
14950 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14951
14952 * init.c (is_friend): Make sure there's a context before we see if
14953 it's an aggr type.
14954
14955 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
14956
14957 * init.c (is_friend): Classes are not friendly with nested classes.
14958
14959 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
14960
14961 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
14962 and record its result.
14963
14964 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
14965
14966 * class.c (finish_struct_anon): Switch around code to not move anon
14967 union elements around, nor mess up their contexts, nor offsets,
14968 instead we now build up the right number of COMPONENT_REFs for all
14969 the anon unions that may be present at build_component_ref time.
14970 * typeck.c (lookup_anon_field): New routine to handle field lookup
14971 on fields without names. We find them, based upon their unique type
14972 instead.
14973 * typeck.c (build_component_ref): Allow FIELD_DECL components.
14974 Handle finding components in anonymous unions, and ensure that a
14975 COMPONENT_REF is built for each level as necessary.
14976
14977 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
14978
14979 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
14980 code that ensures that copy ctors are used if appropriate.
14981
14982 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14983
14984 * init.c (build_vec_delete): Only give an error if base isn't an
14985 error_mark_node.
14986
14987 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
14988
14989 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
14990 (yylex): If we see `new', keep slurping.
14991
14992 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
14993
14994 * class.c (finish_struct_1): Move code for handling anon unions...
14995 (finish_struct_anon): to here. Fixup so that we do the offset
14996 calculations right, and so that the fields are physically moved to
14997 the containers's chain.
14998
14999 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15000
15001 * decl.c (grokdeclarator): Avoid trying to get an operand off an
15002 identifier node.
15003
15004 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
15005
15006 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
15007 POINTER_SIZE to agree with expr.c.
15008
15009 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
15010
15011 * search.c (lookup_field): Don't report ambiguities if protect is 0,
15012 instead return NULL_TREE.
15013
15014 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
15015
15016 * class.c (finish_struct_1): Call warn_hidden if we want warnings
15017 about overloaded virtual functions.
15018 (warn_hidden): New routine to warn of virtual functions that are
15019 hidden by other virtual functions, that are not overridden.
15020 (get_basefndecls): New routine, used by warn_hidden.
15021 (mark_overriders): New routine, used by warn_hidden.
15022 * search.c (get_matching_virtual): Remove old warning that just
15023 isn't very useful.
15024
15025 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15026
15027 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
15028
15029 * typeck.c (null_ptr_cst_p): Delete unused fn.
15030 (build_function_call_maybe): Delete unused fn.
15031
15032 * expr.c (extract_init): #if 0 the code after unconditional return 0
15033 for now.
15034
15035 Delete old cadillac code.
15036 * edsel.c: Remove file.
15037 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
15038 * Makefile.in (CXX_OBJS): Delete edsel.o.
15039 (edsel.o): Delete rule.
15040 * cp-tree.h (flag_cadillac): Delete var decl.
15041 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
15042 * decl2.c (flag_cadillac): Delete var definition.
15043 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
15044 (grokfield): Delete code depending on flag_cadillac.
15045 (finish_anon_union): Likewise.
15046 * class.c (finish_struct_1): Likewise.
15047 (pushclass): Likewise.
15048 (popclass): Likewise.
15049 (push_lang_context): Likewise.
15050 (pop_lang_context): Likewise.
15051 * decl.c (init_decl_processing): Likewise.
15052 (start_decl): Likewise.
15053 (cp_finish_decl): Likewise.
15054 (xref_tag): Likewise.
15055 (finish_enum): Likewise.
15056 (start_function): Likewise.
15057 (finish_function): Likewise.
15058 (finish_stmt): Likewise.
15059 * lex.c (lang_init): Likewise.
15060 (check_newline): Likewise.
15061
15062 * lex.c (do_pending_inlines): Delete synthesized method kludge.
15063
15064 Delete defunct, ancient garbage collection implementation.
15065 * rtti.c: New file with the RTTI stuff from gc.c.
15066 * gc.c: Removed file (moved the remaining stuff into rtti.c).
15067 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
15068 (rtti.o): New rule, replacing gc.o.
15069 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
15070 * cp-tree.h: Delete gc-related fn decls.
15071 (DECL_GC_OFFSET): Delete macro.
15072 (flag_gc): Delete extern decl.
15073 * decl.c (current_function_obstack_index): Delete var decl.
15074 (current_function_obstack_usage): Delete var decl.
15075 (start_function): Delete clearing of current_function_obstack_index
15076 and current_function_obstack_usage.
15077 (init_decl_processing): Delete code relying on -fgc.
15078 Delete call to init_gc_processing.
15079 (cp_finish_decl): Delete calls to build_static_gc_entry and
15080 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
15081 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
15082 and to expand_expr of a __gc_main call.
15083 (maybe_gc_cleanup): Delete var decl.
15084 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
15085 * decl2.c (flag_gc): Delete var decl.
15086 (lang_f_options): Delete offering of -fgc.
15087 (lang_decode_option): Delete -fgc and -fno-gc handling.
15088 (get_temp_regvar): Delete gc code.
15089 * init.c (build_new): Delete gc code.
15090 * lex.c (init_lex): Delete checking of flag_gc.
15091
15092 * typeck.c (convert_arguments): Delete gc code.
15093 (build_component_addr): Delete -fgc warning.
15094 (build_modify_expr): Delete gc code.
15095
15096 * decl2.c (build_push_scope): Delete fn.
15097 * cp-tree.h (build_push_scope): Delete decl.
15098
15099 * search.c (clear_search_slots): Delete fn.
15100 * cp-tree.h (clear_search_slots): Delete decl.
15101
15102 * search.c (tree_needs_constructor_p): Delete fn.
15103 * cp-tree.h (tree_needs_constructor_p): Delete decl.
15104
15105 * tree.c (id_cmp): Delete fn.
15106
15107 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
15108 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
15109
15110 * tree.c (decl_value_member): Delete fn.
15111 * cp-tree.h (decl_value_member): Delete decl.
15112
15113 * tree.c (list_hash_lookup_or_cons): Delete fn.
15114 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
15115
15116 * method.c (cplus_exception_name): Delete fn.
15117 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
15118
15119 * spew.c (shift_tokens): Delete fn.
15120
15121 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
15122
15123 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
15124 to cp_finish_decl.
15125 * parse.y: Likewise.
15126
15127 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15128
15129 * tree.c (build_cplus_staticfn_type): Delete function definition;
15130 never used.
15131 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
15132
15133 * tree.c (virtual_member): Delete function definition; never used.
15134 * cp-tree.h (virtual_member): Delete decl.
15135
15136 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
15137
15138 * typeck.c (build_component_ref): Handle getting vbase pointers
15139 out of complex multiple inheritance better.
15140
15141 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
15142
15143 * typeck.c (build_object_ref): Make sure we use the real type, not
15144 any reference type.
15145
15146 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
15147
15148 * tree.c (build_exception_variant): Don't create new types if we
15149 don't have to, also build new types on the right obstack.
15150
15151 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
15152
15153 * decl.c (store_bindings): Split out from push_to_top_level.
15154 (push_to_top_level): Call it for b->type_shadowed on class binding
15155 levels.
15156
15157 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
15158
15159 * search.c (expand_upcast_fixups): Fix so that offsets stored in
15160 vbase_offsets are always right. Fixes a problem where virtual base
15161 upcasting and downcasting could be wrong during conversions on this
15162 during virtual function dispatch at ctor/dtor time when dynamic
15163 vtable fixups for deltas are needed. This only sounds easier than
15164 it is. :-)
15165 (fixup_virtual_upcast_offsets): Change to reflect new calling
15166 convention for expand_upcast_fixups.
15167
15168 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15169
15170 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
15171 check that it's usable as the bitfield width.
15172
15173 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15174
15175 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
15176 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
15177 only ever used for functions in it.
15178
15179 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
15180
15181 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
15182 (nested_type): Likewise.
15183 (nested_name_specifier): Use lastiddecl.
15184
15185 * decl.c (grokdeclarator): Adjust accordingly.
15186 * init.c (expand_member_init): Likewise.
15187 * parse.y (base_class): Likewise.
15188 * typeck2.c (build_functional_cast): Likewise.
15189
15190 * typeck2.c (build_functional_cast): Fill in name after we've
15191 checked for non-aggr type.
15192
15193 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
15194
15195 * decl2.c (warn_pointer_arith): Default to on.
15196
15197 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
15198
15199 * lex.c (is_rid): New function.
15200 * decl.c (grokdeclarator): Diagnose reserved words used as
15201 declarator-ids.
15202
15203 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
15204
15205 * tree.c (get_decl_list): Don't lose cv-quals.
15206
15207 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
15208 typespecs used as declarator-ids.
15209
15210 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
15211
15212 * decl.c (poplevel): When poping a level, don't give a warning for
15213 any subblocks that already exist.
15214
15215 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
15216
15217 * typeck.c (build_object_ref): Finish what I started.
15218
15219 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
15220
15221 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
15222
15223 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
15224 scope.
15225
15226 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
15227
15228 * decl.c (xref_tag): Handle passing a type in directly.
15229
15230 * parse.y (qualified_type_name): Pull out the type.
15231 (nested_type): Likewise.
15232 Take types directly instead of as identifiers.
15233 * call.c (build_scoped_method_call): Take types directly instead of
15234 as identifiers.
15235 * decl.c (xref_basetypes): Likewise.
15236 * init.c (expand_member_init): Likewise.
15237 (build_member_call): Likewise.
15238 (build_offset_ref): Likewise.
15239 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
15240 * method.c (do_build_assign_ref): Likewise.
15241 * decl.c (grokdeclarator): Handle a type appearing as the
15242 declarator-id for constructors.
15243 * method.c (do_build_copy_constructor): current_base_init_list now
15244 uses the types directly, not their names.
15245 * init.c (sort_base_init): Likewise.
15246 (expand_member_init): Likewise.
15247 * init.c (is_aggr_type): New function, like is_aggr_typedef.
15248
15249 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
15250
15251 * tree.c (layout_basetypes): Call build_lang_field_decl instead
15252 of build_lang_decl if first arg is a FIELD_DECL.
15253
15254 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15255
15256 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
15257 non-empty.
15258 * except.c (expand_start_catch_block): Set TREE_USED to avoid
15259 warnings about the catch handler.
15260
15261 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
15262
15263 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
15264 expand_target_expr.
15265
15266 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15267
15268 Fix access control to use trees rather than integers.
15269 * class.c (access_{default, public, protected, private,
15270 default_virtual, public_virtual, private_virtual}_node): Add
15271 definitions.
15272 (init_class_processing): Do creation of those nodes.
15273 * cp-tree.h (access_type): Delete enum decl.
15274 (access_{default, public, protected, private, default_virtual,
15275 public_virtual, private_virtual}_node): Add decls.
15276 (compute_access): Change return type.
15277 * search.c (compute_access): Have tree return type, instead of enum.
15278 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
15279 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
15280 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
15281 * parse.y (VISSPEC): Make ttype rather than itype.
15282 (base_class_access_list): Likewise.
15283 * *.[cy]: Change all refs of `access_public' to `access_public_node',
15284 etc.
15285 * call.c (build_method_call): Make ACCESS be a tree.
15286 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
15287 * cvt.c (convert_to_aggr): Likewise.
15288 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
15289 Likewise.
15290 * method.c (hack_identifier): Likewise.
15291 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
15292
15293 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
15294
15295 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
15296 frontend, and make it more consistent with respect to
15297 warn_pointer_arith.
15298
15299 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
15300
15301 * decl.c (pushdecl): Check for duplicate parameter names.
15302
15303 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
15304
15305 * decl.c (expand_static_init): Call assemble_external for atexit.
15306
15307 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
15308
15309 * except.c (do_unwind): Remove some generated dead code.
15310 (eh_outer_context): New routine, factor out some common code from
15311 expand_builtin_throw and end_eh_unwinder. Add code to do return
15312 address masking for the PA.
15313 (expand_builtin_throw): Use eh_outer_context instead of open coding
15314 it here.
15315 (end_eh_unwinder): Likewise.
15316
15317 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
15318
15319 * except.c (expand_throw): Call assemble_external for __empty, if we
15320 use it.
15321
15322 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
15323
15324 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
15325 NORMAL_RETURN_ADDR_OFFSET.
15326 (end_eh_unwinder): Likewise.
15327
15328 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
15329
15330 * gc.c (build_dynamic_cast): Make sure we don't cast away const
15331 when dealing with references, and make sure we handle dynamic
15332 casting to a cv qualified reference.
15333
15334 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
15335
15336 * except.c (struct eh_context): New structure top hold eh context
15337 information.
15338 (push_eh_context): New routine.
15339 (pop_eh_context): Likewise.
15340 * decl.c (push_cp_function_context): Use them.
15341 (pop_cp_function_context): Likewise.
15342
15343 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
15344
15345 * decl2.c (finish_file): Also prune uninteresting functions in the
15346 inline emission loop.
15347
15348 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
15349
15350 * sig.c (build_signature_table_constructor): Mark functions
15351 in the signature as referenced.
15352
15353 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
15354
15355 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
15356 the inline emission stuff.
15357
15358 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
15359
15360 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
15361 weak symbols.
15362 * lang-options.h: Add -f{no-,}weak.
15363 * decl.c (init_decl_processing): If the target does not support weak
15364 symbols, don't use them.
15365 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
15366
15367 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
15368
15369 * init.c (expand_member_init): warning for base init after members.
15370
15371 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
15372
15373 * cvt.c (build_expr_type_conversion): Don't convert to a reference
15374 type.
15375
15376 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
15377
15378 * method.c (report_type_mismatch): Improve wording for volatile
15379 mismatches.
15380
15381 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
15382
15383 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
15384 expand_assignment, as the later doesn't handle things that have
15385 copy constructors well. The compiler would do bitwise copying,
15386 instead of ctor calling in some cases.
15387
15388 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
15389
15390 * g++.c (my_strerror): Return "cannot access" if errno is 0.
15391 (pfatal_with_name, perror_exec): Don't assume that
15392 the returned value from my_strerror contains no '%'s.
15393 (concat): Remove.
15394 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
15395
15396 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
15397
15398 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
15399 TYPE_METHODS/TREE_CHAIN mean what they used to.
15400 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
15401 instead of TYPE_METHODS.
15402 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
15403 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
15404 * cp-tree.h (CLASSTYPE_METHODS): Lose.
15405 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
15406 TYPE_METHODS.
15407 (struct lang_decl): Lose next_method field.
15408 (DECL_NEXT_METHOD): Lose.
15409 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
15410 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
15411 anymore.
15412 (finish_struct_methods): Don't mess with the TREE_CHAINs in
15413 fn_fields.
15414
15415 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
15416 vector.
15417
15418 * call.c (build_method_call): Synthesize here even when not inlining.
15419 * typeck.c (build_function_call_real): Likewise.
15420
15421 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
15422
15423 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
15424 == DBX_DEBUG, call dbxout_start_new_source_file and
15425 dbxout_resume_previous_source_file when appropriate.
15426
15427 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
15428
15429 * except.c (start_anon_func): Push to the top level.
15430 (end_anon_func): Pop from the top level.
15431
15432 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
15433
15434 * cp-tree.h (build_cleanup): New routine to build cleanups.
15435 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
15436 call at ctor time and use atexit to run it later.
15437 * decl2.c (build_cleanup): New routine, taken from finish_file.
15438 (finish_file): Use build_cleanup instead, and don't put function
15439 local statics in global dtor list.
15440
15441 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
15442
15443 * except.c (expand_throw): Ensure that we have cleanups, if we try
15444 and expand cleanups.
15445
15446 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
15447
15448 * except.c (expand_throw): Add logic to manage dynamic cleanups for
15449 the EH object.
15450 (expand_end_catch_block): Use the magic of expand_goto, instead of
15451 emit_jump so that we get the cleanup for any catch clause parameter
15452 and the cleanup for the exception object. Update to reflect label
15453 changes.
15454 (push_eh_cleanup): New routine to register a cleanup for an
15455 exception object.
15456 (empty_fndecl): Used to default cleanup actions to
15457 nothing.
15458 (init_exception_processing): Setup empty_fndecl. Setup
15459 saved_cleanup.
15460 (expand_start_catch_block): Update to reflect label changes. Call
15461 push_eh_object to register the cleanup for the EH object.
15462 (start_anon_func): New routine to start building lambda expressions
15463 from trees.
15464 (end_anon_func): New routine to end them.
15465 (struct labelNode): Change so that we can use tree labels, or rtx
15466 labels.
15467 (saved_cleanup): Object to check for dynamic cleanups for the
15468 exception handling object.
15469 (push_label_entry): Change so that we can use tree labels, or rtx
15470 labels.
15471 (pop_label_entry): Likewise.
15472 (top_label_entry): Likewise.
15473 (expand_start_all_catch): Use tree label instead of rtx label, so
15474 that we can get the magic of expand_goto.
15475 (expand_end_all_catch): Update to reflect label changes.
15476
15477 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
15478 use UNSAVE_EXPRs.
15479 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
15480 building_cleanup logic, as we now use UNSAVE_EXPRs.
15481 * cp-tree.h (unsave_expr): Declare it.
15482 * decl.c (building_cleanup): Remove.
15483 (maybe_build_cleanup): Remove building_cleanup logic, and use
15484 UNSAVE_EXPR instead.
15485
15486 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
15487
15488 * gc.c (build_t_desc): Update error message to say <typeinfo>.
15489
15490 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
15491
15492 * decl.c (pushdecl): Only warn about shadowing a local variable if
15493 warn_shadow is true.
15494
15495 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
15496
15497 * typeck.c (build_binary_op_nodefault): Added warning about
15498 comparisons between different enum types with -Wall, unless
15499 -fenum-int-equiv set.
15500
15501 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
15502
15503 * class.c (finish_struct_1): Skip down to the inner type in
15504 multidimensional arrays. Ensures ctors will be made for types that
15505 need constructing.
15506
15507 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
15508
15509 * decl.c (last_dtor_insn): New to track the last compiler generated
15510 insn in a dtor.
15511 (store_parm_decls): Set it.
15512 (finish_function): Use it to see if the dtor is empty. Avoid doing
15513 vtable setup all the time, if we can.
15514 (struct cp_function): Add last_dtor_insn.
15515 (push_cp_function_context): Save it.
15516 (pop_cp_function_context): Restore it.
15517
15518 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
15519
15520 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
15521 warnings.
15522
15523 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
15524
15525 * typeck.c (expand_target_expr): Make sure targets get put into the
15526 current temp_slot_level, so that the free_temp_slots call will reuse
15527 them.
15528
15529 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
15530
15531 * class.c (finish_struct_1): Delay delta fixups for virtual bases
15532 until after we have done the hard virtuals, to avoid a bogus `every
15533 virtual function must have a unique final overrider' for virtual
15534 functions that are only overridden by hard virtuals.
15535
15536 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
15537
15538 * pt.c (do_function_instantiation): Don't try to find a file-scope
15539 template for a member function.
15540
15541 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
15542
15543 * g++.c (main): Add handling of -nodefaultlibs.
15544
15545 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
15546
15547 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
15548 distinguish between direct bindings of reference variables, and
15549 indirect bindings of reference variables.
15550 * cvt.c (build_up_reference): Use it.
15551 * typeck.c (convert_arguments): Use it to indicate this is an
15552 indirect binding.
15553 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
15554 as they are unused.
15555 (expand_static_init): Likewise.
15556 (cplus_expand_expr_stmt): Likewise.
15557 * decl2.c (finish_file): Likewise.
15558 * init.c (perform_member_init): Likewise.
15559 (emit_base_init): Likewise.
15560 (expand_aggr_vbase_init_1): Likewise.
15561
15562 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
15563
15564 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
15565 get a DECL_LANG_SPECIFIC node.
15566 * cp-tree.h (lang_decl_flags): Add new member `level'.
15567 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
15568 decl_flags level member.
15569
15570 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
15571
15572 * call.c (build_method_call): Make sure instance has a
15573 TYPE_LANG_SPECIFIC node before we dive into it.
15574
15575 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
15576
15577 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
15578
15579 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
15580
15581 * decl.c (duplicate_decls): When smashing decls, smash staticness in
15582 the usual way.
15583
15584 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
15585
15586 * decl.c (poplevel): Handle the merging of subblocks of cleanups
15587 when finishing blocks that have already been created (usually due to
15588 the fixup goto code). Fixes bad debugging information.
15589
15590 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
15591
15592 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
15593 that's not a list of overloaded functions.
15594
15595 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
15596
15597 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
15598 before trying to use DECL_ABSTRACT_VIRTUAL_P.
15599
15600 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
15601
15602 * decl2.c (mark_used): New function for hooking into setting of
15603 TREE_USED on decls.
15604 * call.c (build_method_call): Use it.
15605 * class.c (instantiate_type): Likewise.
15606 * init.c (build_offset_ref): Likewise. Don't call assemble_external
15607 for all like-named functions.
15608 * method.c (hack_identifier): Likewise.
15609 (emit_thunk): Don't call assemble_external.
15610 (make_thunk): Create thunk as a FUNCTION_DECL so that it
15611 gets the right mode and ENCODE_SECTION_INFO works.
15612
15613 * parse.y: Use mark_used. Pass operator names to do_identifier.
15614 * lex.c (do_identifier): Handle operator names.
15615
15616 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
15617
15618 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
15619
15620 * errfn.c: Include stdio.h.
15621 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
15622
15623 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
15624
15625 * typeck2.c (digest_init): Always convert initializers to the
15626 right type.
15627
15628 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
15629
15630 * init.c (member_init_ok_or_else): Don't allow member initializers
15631 for indirect members, as it is invalid.
15632
15633 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
15634
15635 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
15636
15637 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
15638
15639 * parse.y (for.init.statement): Catch compound statements inside for
15640 initializations, if we're being pedantic.
15641
15642 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
15643
15644 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
15645 looking for.
15646
15647 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
15648
15649 * error.c (dump_expr): Don't core dump when a boolean expression is
15650 used as a default argument.
15651
15652 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
15653
15654 * class.c (finish_struct_bits): Check aggregate_value_p instead of
15655 RETURN_IN_MEMORY.
15656
15657 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
15658
15659 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
15660 BLKmode type that would otherwise be returned in registers.
15661
15662 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
15663
15664 * g++.c (WITHLIBC): New macro.
15665 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
15666 saw_libc and pass it at the end if it was set.
15667
15668 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
15669
15670 * parse.y (fn.def1): Call split_specs_attrs in
15671 declmods notype_declarator case.
This page took 0.75872 seconds and 5 git commands to generate.