]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
lex.c (check_newline): Use push_srcloc and pop_srcloc, rather than duplicating functi...
[gcc.git] / gcc / cp / ChangeLog
1 2000-02-24 Mark Mitchell <mark@codesourcery.com>
2
3 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
4 than duplicating functionality here.
5 * optimize.c: Include input.h.
6 (expand_call_inline): Use push_srcloc and pop_srcloc.
7 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
8 * parse.c: Regenerated.
9 * Makefile.in (lex.o): Depend on input.h.
10 (optimize.o): Likewise.
11
12 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
13
14 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
15 function type, rather than ICE.
16
17 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
18
19 * decl.c (grokdeclarator): Call decl_type_access_control.
20 * parse.y (parse_end_decl): Don't call decl_type_access_control if
21 decl is null.
22
23 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
24
25 * decl.c (decls_match): Remove obsolete static member nadgering.
26
27 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
28
29 * decl.c (grokdeclarator): Change ANSI to ISO.
30 * lex.c (consume_string, readescape, do_identifier): Likewise.
31 (parse_float, real_yylex): Likewise.
32 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
33 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
34 new_type_id, maybe_label_decls, simple_stmt,
35 for.init.statement): Likewise.
36 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
37 * semantics.c (finish_named_return_value): Likewise.
38 * parse.c: Regenerate.
39
40 2000-02-21 Mark Mitchell <mark@codesourcery.com>
41
42 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
43 (CPTI_CLASS_STAR_TYPE): Remove.
44 (vtable_index_type): Likewise.
45 (class_star_type_node): Remove.
46 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
47 (build_binary_op_nodefault): Remove.
48 * call.c (build_new_op): Use build_binary_op instead of
49 build_binary_op_nodefault.
50 * decl.c (init_decl_processing): Remove class_star_type_node
51 initialization. Make delta_type_node ptrdiff_type_node under the
52 new ABI. Initialize vtable_index_type.
53 (build_ptrmemfunc_type): Build different structures for the new
54 ABI.
55 (build_enumerator): Use build_binary_op instead of
56 build_binary_op_nodefault.
57 * method.c (build_overload_value): Mangle pointers-to-members
58 appropriately under the new ABI.
59 * typeck.c (build_array_ref): Use build_binary_op instead of
60 build_binary_op_nodefault.
61 (get_member_function_from_ptrfunc): Adjust for the new ABI.
62 (build_binary_op_nodefault): Rename to ...
63 (build_binary_op): ... this. Remove old version. Adjust for
64 pointer-to-member comparisons under the new ABI.
65 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
66 (build_ptrmemfunc): Adjust for the new ABI.
67 (expand_ptrmemfunc_cst): Likewise.
68 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
69 (pfn_from_ptrmemfunc): Adjust for the new ABI.
70
71 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
72
73 * call.c (build_object_call): Compress consecutive calls to
74 cp_error.
75 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
76 (build_op_delete_call): Adjust message formatting.
77
78 * class.c (check_bases): Compress consecutive calls to
79 cp_pedwarn.
80 (finish_struct_anon): Say 'ISO C++'.
81
82 * decl.c (start_decl): Same here.
83 (grok_reference_init): Likewise.
84 (grokfndecl): Correct message formatting.
85 (grokfndecl): Improve diagnostic.
86 (check_static_variable_definition): Likewise. Say 'ISO C++'
87 (compute_array_index_type): Say 'ISO C++'
88 (create_array_type_for_decl): Compress consecutive calls to
89 cp_error.
90 (grokdeclarator): Say 'ISO C++'
91 (grok_op_properties): Likewise.
92
93 * decl2.c (delete_sanity): Clairify diagnostic.
94 (check_member_template): Same here.
95 (grok_function_init): Use consistent terminology.
96
97 * expr.c (do_case): Say 'ISO C++'
98
99 * friend.c (do_friend): Compress consecutive calls to warning.
100
101 2000-02-20 Mark Mitchell <mark@codesourcery.com>
102
103 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
104 * class.c (build_secondary_vtable): Reorganize. Don't create a
105 new vtable under the new ABI.
106 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
107 computing the size.
108 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
109 the initializing elements.
110 (initialize_vtable): New function.
111 (dfs_finish_vtbls): Use it.
112 (dfs_accumulate_vtbl_inits): New function.
113 (finish_vtbls): Merge primary and secondary vtables under the new
114 ABI.
115 (finish_struct_1): Remove redundant call to layout_vtable_decl.
116 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
117 aren't VAR_DECLs.
118
119 * class.c (build_vtable): New function, split out from ...
120 (get_vtable_decl): ... here, and ...
121 (build_secondary_vtable): ... here.
122
123 * pt.c (tsubst_decl): Fix formatting.
124
125 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
126
127 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
128 (avoid_overlap, build_base_field): Likewise.
129 (build_base_field, build_base_fields, is_empty_class):
130 Test DECL_SIZE with integer_zero.
131 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
132 * cp-tree.h (struct lang_type): New field size_unit.
133 (CLASSTYPE_SIZE_UNIT): New macro.
134 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
135 (cp_finish_decl): Delete -Wlarger-than processing.
136 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
137 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
138 * tree.c (make_binfo): binfo vector is one entry longer.
139 (walk_tree): Walk DECL_SIZE_UNIT.
140
141 2000-02-19 Mark Mitchell <mark@codesourcery.com>
142
143 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
144 comment.
145 (build_vtable_entry): Don't assume all vtable entries are
146 functions.
147 (build_vtbl_initializer): Adjust accordingly.
148 (get_vtable_decl): Fix formatting.
149
150 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
151
152 * semantics.c (deferred_type_access_control): Walk the entire
153 type_lookups list.
154 (save_type_access_control): Rename from
155 initial_deferred_type_access_control. Just remember the value.
156 (decl_type_access_control): New fn.
157 (begin_function_definition): Use deferred_type_access_control, after
158 we've started the function. Set type_lookups to error_mark_node.
159 * parse.y (frob_specs, fn.def1): Adjust.
160 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
161 (parse_end_decl, parse_bitfield0, parse_method): New fns.
162 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
163 (after_type_component_declarator0): Likewise.
164 (after_type_component_declarator): Likewise.
165 (notype_component_declarator): Likewise.
166 * cp-tree.h: Adjust.
167
168 * decl.c (redeclaration_error_message): Allow redeclaration of
169 namespace-scope decls.
170
171 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
172
173 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
174
175 2000-02-17 Mark Mitchell <mark@codesourcery.com>
176
177 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
178 * decl2.c (grokclassfn): Likewise.
179
180 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
181
182 * decl2.c (lang_decode_option): Don't set default message length
183 here.
184 * lex.c (lang_init_options): Set it here.
185
186 2000-02-16 Mark Mitchell <mark@codesourcery.com>
187
188 Make DECL_CONTEXT mean the class in which a member function was
189 declared, even for a virtual function.
190 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
191 (DECL_FRIEND_CONTEXT): New macro.
192 (DECL_REAL_CONTEXT): Remove.
193 (SET_DECL_FRIEND_CONTEXT): Likewise.
194 (DECL_VIRTUAL_CONTEXT): Adjust.
195 (DECL_CLASS_SCOPE_P): Use TYPE_P.
196 (add_friends): Remove.
197 (hack_decl_function_context): Likewise.
198 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
199 CP_DECL_CONTEXT.
200 (build_over_call): Fix indentation. Use DECL_CONTEXT
201 instead of DECL_CLASS_CONTEXT.
202 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
203 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
204 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
205 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
206 (build_base_field): Likewise.
207 (finish_struct_1): Likewise.
208 (build_self_reference): Likewise.
209 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
210 DECL_REAL_CONTEXT.
211 (pushtag): Use decl_function_context, not
212 hack_decl_function_context.
213 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
214 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
215 (pushdecl): Remove bogus code.
216 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
217 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
218 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
219 Use decl_function_context, nothack_decl_function_context.
220 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
221 (grokdeclarator): Likewise. Use decl_function_context, not
222 hack_decl_function_context.
223 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
224 (start_function): Use DECL_FRIEND_CONTEXT, not
225 DECL_CLASS_CONTEXT. Use decl_function_context, not
226 hack_decl_function_context.
227 (finish_function): Use decl_function_context, not
228 hack_decl_function_context.
229 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
230 DECL_CLASS_CONTEXT.
231 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
232 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
233 (grokfield): Likewise.
234 (finish_builtin_type): Likewise.
235 (finish_vtable_vardec): Use decl_function_context, not
236 hack_decl_function_context.
237 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
238 (start_static_initialization_or_destruction): Likewise.
239 (finish_static_initialization_or_destruction): Likewise.
240 (mark_used): Adjust logic for deciding when to synthesize methods.
241 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
242 DECL_REAL_CONTEXT.
243 * error.c (dump_function_decl): Use DECL_CONTEXT, not
244 DECL_CLASS_CONTEXT.
245 * friend.c (is_friend): Likewise.
246 (add_friends): Remove.
247 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
248 * lex.c (begin_definition_of_inclass_inline): Use
249 decl_function_context, not hack_decl_function_context.
250 (process_next_inline): Likewise.
251 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
252 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
253 DECL_CLASSS_CONTEXT.
254 (hack_identifier): Likewise.
255 (synthesize_method): Use decl_function_context, not
256 hack_decl_function_context.
257 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
258 DECL_REAL_CONTEXT.
259 (is_member_template): Use decl_function_context, not
260 hack_decl_function_context. Use DECL_CONTEXT, not
261 DECL_CLASS_CONTEXT.
262 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
263 DECL_CLASS_CONTEXT.
264 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
265 DECL_REAL_CONTEXT.
266 (push_template_decl_real): Likewise.
267 (instantiate_class_template): Don't call add_friends.
268 (tsubst_default_argument): Use DECL_CONTEXT, not
269 DECL_REAL_CONTEXT.
270 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
271 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
272 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
273 DECL_CLASS_CONTEXT.
274 * repo.c (repo_inline_used): Likewise.
275 * search.c (current_scope): Adjust for new _CONTEXT macros.
276 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
277 DECL_REAL_CONTEXT.
278 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
279 (lookup_fnfields_here):Likewise.
280 (check_final_overrider): Likewise.
281 (init_vbase_pointers): Likewise.
282 (virtual_context): Likewise.
283 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
284 (expand_body): Use decl_function_context, not
285 hack_decl_function_context.
286 * tree.c (hack_decl_function_context): Remove.
287 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
288 DECL_CLASS_CONTEXT.
289 * typeck2.c (error_not_base_type): Likewise.
290
291 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
292
293 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
294
295 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
296
297 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
298
299 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
300
301 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
302
303 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
304
305 * decl2.c (lang_decode_option): Enable automatic line wrapping.
306
307 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
308
309 * parse.y (frob_specs): Split out...
310 (parse_decl): From here.
311 (fn.def2): Call initial_deferred_type_access_control.
312 (after_type_component_declarator0): Call frob_specs.
313 (notype_component_declarator0): Likewise.
314 * search.c (friend_accessible_p): Nested classes are friends of their
315 enclosing classes.
316
317 2000-02-10 Mark Mitchell <mark@codesourcery.com>
318
319 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
320 used to create an implicit temporary.
321
322 * class.c (dfs_modify_vtables): Tweak calculation of functions to
323 override.
324
325 2000-02-08 Nathan Sidwell <nathan@acm.org>
326
327 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
328 strip array element qualifiers too.
329
330 2000-02-07 Mark Mitchell <mark@codesourcery.com>
331
332 * decl.c (store_parm_decls): Don't build cleanups for parameters
333 while processing_template_decl.
334
335 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
336
337 * cp-tree.h (struct saved_scope): Add incomplete field.
338 (namespace_scope_incomplete): New macro.
339 * decl.c (pushdecl): Use it.
340 (hack_incomplete_structures): Use it. See through artificial
341 binding levels.
342 (mark_saved_scope): Mark it.
343
344 Implement access control for nested types.
345 * search.c (type_access_control): New fn.
346 (accessible_p): Now we do perform access control for types.
347 * semantics.c (deferred_type_access_control): New fn.
348 (initial_deferred_type_access_control): New fn.
349 (begin_function_definition): Call it. Add lookups parm.
350 * decl.c (struct binding_level): Add this_class field.
351 (pushlevel_class): Set it.
352 (mark_binding_level): Mark it.
353 (lookup_name_real): Use it. Call type_access_control.
354 (mark_saved_scope): Mark lookups field.
355 * cp-tree.h (flagged_type_tree): Add lookups field.
356 (struct saved_scope): Add lookups field.
357 (type_lookups): New macro.
358 * parse.y (declmods): Now <ftype>.
359 (parse_decl): Add lookups parm. Call
360 initial_deferred_type_access_control.
361 (lang_extdef): Clear type_lookups.
362 (typed_declspecs, declmods, typespec): Set lookups field.
363 (initdcl): Call deferred_type_access_control.
364 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
365 component_decl_1, named_parm): Adjust.
366 * friend.c (is_friend): Nested classes are friends of their
367 enclosing classes.
368
369 * class.c (currently_open_derived_class): New fn.
370 * method.c (hack_identifier): Use it.
371
372 * lex.c (do_identifier): Remove obsolete code.
373
374 * parse.y (typed_typespecs): Propagate new_type_flag properly.
375
376 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
377
378 * tinfo.h: Remove apostrophes from C++ comment (xgettext
379 thinks this file is plain C).
380
381 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
382
383 * Makefile.in (call.o): Depend on $(EXPR_H).
384
385 * call.c: Include "expr.h".
386
387 * class.c (dump_class_hierarchy): Add prototype.
388
389 * search.c (dfs_get_pure_virtuals): Likewise.
390
391 2000-02-1 Ulrich Drepper <drepper@redhat.com>
392
393 * parse.y (simple_stmt): Allow :: token in asm parameter list.
394 * parse.c: Rebuilt.
395
396 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
397
398 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
399 Store it in DECL_FCONTEXT.
400 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
401
402 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
403
404 * tinfo.h (old abi): #include "tconfig.h".
405 * tinfo.cc (convert_to_base): Move into old abi section.
406
407 2000-01-31 Mark Mitchell <mark@codesourcery.com>
408
409 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
410 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
411 (BINFO_PRIMARY_BINFO): New macro.
412 (BF_DELTA): Rename to ...
413 (BV_DELTA): ... this.
414 (BF_VCALL_INDEX): Rename to ...
415 (BV_VCALL_INDEX): ... this.
416 (BF_FN): Rename to ...
417 (BV_FN): ... this.
418 * class.c (build_vbase_path): Adjust for changes to reverse_path.
419 (set_rtti_entry): Rename BF_ macros to BV_ variants.
420 (modify_vtable_entry): Simplify.
421 (add_virtual_function): Rename BF_ macros to BV_ variants.
422 (build_vtable_initializer): Likewise.
423 (get_class_offset_1): Remove.
424 (dfs_get_class_offset): Likewise.
425 (get_class_offset): Likewise.
426 (dfs_find_final_overrider): New function.
427 (find_final_overrider): Likewise.
428 (modify_one_vtable): Remove.
429 (dfs_find_base): New function.
430 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
431 find_final_overrider.
432 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
433 virtuals.
434 (dfs_fixup_vtable_deltas): Remove.
435 (override_one_vtable): Remove.
436 (merge_overrides): Likewise.
437 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
438 unreal chilren of virtual bases.
439 (finish_struct_1): Don't use merge_overrides. Don't use
440 dfs_fixup_vtable_deltas.
441 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
442 BINFOs.
443
444 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
445 Jason Merrill <jason@yorick.cygnus.com>
446
447 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
448
449 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
450
451 * exception.cc (__throw_bad_typeid): Add missing std::.
452
453 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
454
455 * cp-tree.h (make_thunk): PROTO -> PARAMS.
456
457 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
458
459 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
460
461 Runtime support for new-abi rtti.
462 * inc/typeinfo (type_info::operator!=): Define in class.
463 (type_info::before, type_info::name, type_info::operator==,
464 type_info::operator!=): Define new ABI implementations.
465 (type_info::is_pointer_p, type_info::is_function_p): Declare
466 new virtual functions.
467 (type_info::do_catch, type_info::do_upcast): Likewise.
468
469 * tinfo.h (__base_class_info): Define new class.
470 (__class_type_info): Likewise.
471 (__si_class_type_info): Likewise.
472 (__vmi_class_type_info): Likewise.
473 (__dynamic_cast): Prototype.
474
475 * tinfo.cc: Conditionalize old and new rtti mechanisms.
476 (type_info::is_pointer_p): Define new function.
477 (type_info::is_function_p): Likewise.
478 (type_info::do_catch): Likewise.
479 (type_info::do_upcast): Likewise.
480 (vtable_prefix): New structure for vtable access.
481 (adjust_pointer): Define new template function.
482 (contained_p, public_p, virtual_p, contained_public_p,
483 contained_nonpublic_p, contained_nonvirtual_p): Define new
484 functions.
485 (nonvirtual_base_type): New local variable.
486 (__class_type_info::~__class_type_info): Define.
487 (__si_class_type_info::~__si_class_type_info): Likewise.
488 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
489 (__class_type_info::do_catch): Define new function.
490 (__class_type_info::do_upcast): Likewise.
491 (__class_type_info::find_public_src): Likewise.
492 (__class_type_info::do_find_public_src): Likewise.
493 (__si_class_type_info::do_find_public_src): Likewise.
494 (__vmi_class_type_info::do_find_public_src): Likewise.
495 (__class_type_info::do_dyncast): Likewise.
496 (__si_class_type_info::do_dyncast): Likewise.
497 (__vmi_class_type_info::do_dyncast): Likewise.
498 (__class_type_info::do_upcast): Likewise.
499 (__si_class_type_info::do_upcast): Likewise.
500 (__vmi_class_type_info::do_upcast): Likewise.
501 (__dynamic_cast): Likewise.
502
503 * tinfo2.cc (__fundamental_type_info): Define new class.
504 (__pointer_type_info): Likewise.
505 (__reference_type_info): Likewise.
506 (__array_type_info): Likewise.
507 (__function_type_info): Likewise.
508 (__enum_type_info): Likewise.
509 (__ptr_to_member_type_info): Likewise.
510 (__fundamental_type_info::~__fundamental_type_info): Define.
511 (__pointer_type_info::~__pointer_type_info): Likewise.
512 (__reference_type_info::~__reference_type_info): Likewise.
513 (__array_type_info::~__array_type_info): Likewise.
514 (__function_type_info::~__function_type_info): Likewise.
515 (__enum_type_info::~__enum_type_info): Likewise.
516 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
517 (__pointer_type_info::do_catch): Define new function.
518 (__ptr_to_member_type_info::do_catch): Define new function.
519
520 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
521 (__is_pointer): Likewise.
522
523 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
524
525 2000-01-30 Mark Mitchell <mark@codesourcery.com>
526
527 * cp/class.c (build_vtable): Rename to build_primary_vtable.
528 (prepare_fresh_vtable): Rename to build_secondary_vtable.
529 (make_new_vtable): New function.
530 (modify_vtable_entry): Handle generation of new vtables correctly.
531 (modify_one_vtable): Remove unused parameter.
532 (dfs_fixup_vtable_deltas): Likewise.
533 (override_one_vtable): Use build_secondary_vtable.
534 (finish_struct_1): Use build_primary_vtable and
535 build_secondary_vtable.
536
537 2000-01-28 Ulrich Drepper <drepper@redhat.com>
538
539 * cp/decl.c: Adjust variable names, comments, help strings.
540
541 2000-01-29 Nathan Sidwell <nathan@acm.org>
542
543 * new2.cc (operator delete[]): Use operator delete, don't assume
544 implementation.
545
546 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
547
548 * class.c (build_vtbl_initializer): Add argument to
549 build_vtable_entry call.
550
551 2000-01-27 Mark Mitchell <mark@codesourcery.com>
552
553 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
554 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
555 (BF_DELTA): New macro.
556 (BF_VCALL_INDEX): Likewise.
557 (BF_FN): Likewise.
558 (THUNK_VCALL_OFFSET): Likewise.
559 (make_thunk): Change prototype.
560 * class.c (build_vtable_entry): Integrate
561 build_vtable_entry_for_fn. Handle vcall indices.
562 (build_vtable_entry_for_fn): Remove.
563 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
564 BF_VCALL_INDEX, BF_FN.
565 (modify_vtable_entry): Integrate common code from
566 modify_one_vtable and dfs_fixup_vtable_deltas.
567 (add_virtual_function): Set BF_VCALL_INDEX.
568 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
569 and BF_FN.
570 (modify_one_vtable): Simplify.
571 (dfs_fixup_vtable_deltas): Likewise.
572 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
573 * method.c (make_thunk): Handle vcall indices.
574
575 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
576
577 Compiler side new abi rtti (not enabled).
578 * cp-tree.h (new_abi_rtti_p): New macro.
579 (emit_support_tinfos): Prototype new function.
580 (tinfo_decl_p): Likewise.
581 (emit_tinfo_decl): Likwise.
582 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
583 macros.
584 (doing_runtime): New local static.
585 (init_rtti_processing): Add new-abi initializer.
586 (get_tinfo_decl): Add new-abi logic.
587 (tinfo_from_decl): Likewise.
588 (build_dynamic_cast_1): Likewise.
589 (qualifier_flags): New static function.
590 (tinfo_base_init): Likewise.
591 (generic_initializer): Likewise.
592 (ptr_ref_initializer): Likewise.
593 (ptmd_initializer): Likewise.
594 (class_hint_flags): Likewise.
595 (class_initializer): Likewise.
596 (synthesize_tinfo_var): Likewise.
597 (create_real_tinfo_var): Likewise.
598 (create_pseudo_type_info): Likewise.
599 (get_vmi_pseudo_type_info): Likewise.
600 (create_tinfo_types): Likewise.
601 (emit_support_tinfos): New global function.
602 (tinfo_decl_p): New global predicate.
603 (emit_tinfo_decl): New global function.
604 * class.c (set_rtti_entry): Generalize for old and new rtti.
605 (build_vtbl_initializer): Likewise.
606 * decl2.c (finish_file): Likewise.
607
608 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
609
610 * cp/optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
611 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
612
613 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
614
615 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
616 for scopes.
617
618 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
619
620 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
621
622 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
623
624 * cp/optimize.c (calls_setjmp_r): Supply new argument
625 to special_function_p.
626
627 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
628
629 * call.c: PROTO -> PARAMS.
630 * class.c: Likewise.
631 * cp-tree.h: Likewise.
632 * cvt.c: Likewise.
633 * decl.c: Likewise.
634 * decl.h: Likewise.
635 * decl2.c: Likewise.
636 * dump.c: Likewise.
637 * errfn.c: Likewise.
638 * error.c: Likewise.
639 * except.c: Likewise.
640 * expr.c: Likewise.
641 * init.c: Likewise.
642 * input.c: Likewise.
643 * lex.c: Likewise.
644 * lex.h: Likewise.
645 * method.c: Likewise.
646 * optimize.c: Likewise.
647 * parse.y: Likewise.
648 * pt.c: Likewise.
649 * repo.c: Likewise.
650 * rtti.c: Likewise.
651 * search.c: Likewise.
652 * semantics.c: Likewise.
653 * spew.c: Likewise.
654 * tree.c: Likewise.
655 * typeck.c: Likewise.
656 * typeck2.c: Likewise.
657 * xref.c: Likewise.
658
659 2000-01-25 Richard Henderson <rth@cygnus.com>
660
661 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
662
663 2000-01-25 Mark Mitchell <mark@codesourcery.com>
664
665 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
666 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
667 (struct vcall_offset_data_s): New type.
668 (dfs_vcall_offset_queue_p): New function.
669 (dfs_build_vcall_offset_vtbl_entries): Likewise.
670 (build_vcall_offset_vtbl_entries): Likewise.
671 (layout_vtable_decl): Likewise.
672 (num_vfun_entries): Likewise.
673 (num_extra_vtbl_entries): Add the entries for vcall offsets.
674 (build_vtbl_initializer): Likewise.
675 (dfs_finish_vtabls): Use layout_vtable_decl.
676 (modify_one_vtables): Always duplicate vtables under the new ABI.
677 (finish_struct_1): Use layout_vtable_decl.
678
679 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
680
681 * decl.c (member_function_or_else): Change third arg from a format
682 specifier to an `enum overload_flags'. Callers changed.
683
684 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
685
686 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
687 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
688 build_const_cast, get_delta_difference, check_return_expr): Avoid
689 ANSI string concatenation usage.
690
691 2000-01-24 Mark Mitchell <mark@codesourcery.com>
692
693 * class.c (layout_class_type): Put the fields required to make a
694 class non-empty at the end, not the beginning, of the TYPE_FIELDs
695 list.
696
697 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
698
699 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
700 template.
701
702 * decl2.c (mark_used): Do instantiate inlines that have been
703 explicitly instantiated.
704
705 2000-01-24 Richard Henderson <rth@cygnus.com>
706
707 * call.c (build_over_call): Use expand_tree_builtin.
708 * typeck.c (build_function_call_real): Likewise.
709 (build_binary_op_nodefault): Handle unordered compares.
710
711 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
712
713 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
714 cp_tree_index values.
715 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
716 New global node #defines for them.
717 * rtti.c (call_void_fn): Replace with ...
718 (build_runtime_decl): ... new static function.
719 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
720 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
721 (build_dynamic_cast_1): Always produce correctly typed result.
722 Explicitly produce type_info addresses. Use dynamic_cast_node.
723 * exception.cc (__throw_bad_cast): Return `void *'.
724 (__throw_bad_typeid): Return `const type_info &'.
725
726 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
727
728 * cp-tree.h (get_vtable_decl): Prototype new function.
729 * class.c (get_vtable_decl): New function. Broken out from ...
730 (build_vtable): ... here. Use it.
731 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
732 by get_vtable_decl.
733
734 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
735
736 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
737 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
738 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
739 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
740 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
741 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
742 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
743 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
744 (CPTI_TINFO_VAR_ID): New enumeration.
745 (__tp_desc_type_node, __access_mode_type_node,
746 __bltn_desc_type_node, __user_desc_type_node,
747 __class_desc_type_node, __ptr_desc_type_node,
748 __attr_desc_type_node, __func_desc_type_node,
749 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
750 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
751 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
752 enum_desc_type_node, class_desc_type_node,
753 si_class_desc_type_node, vmi_class_desc_type_node,
754 ptmd_desc_type_node, base_desc_type_node): New #defines.
755 (tinfo_fn_id, tinfo_fn_type): Rename to ...
756 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
757 (tinfo_var_id): New enumeration.
758 (DECL_TINFO_FN_P): Augment comment.
759 * decl.c (cp_global_trees): Adjust documentation.
760 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
761 tinfo_decl_type and tinfo_var_id.
762 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
763 (build_typeid): Remove unused variable.
764 (get_tinfo_var): Use tinfo_var_id.
765 (tinfo_name): New static function.
766 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
767 (tinfo_from_decl): Likewise.
768 (get_base_offset): New static function, broken out of
769 expand_class_desc.
770 (expand_si_desc): Use tinfo_name.
771 (expand_class_desc): Likewise. Lose local static variable.
772 Use base_desc_type_node. Use get_base_offset.
773 (expand_ptr_desc): Use tinfo_name.
774 (expand_attr_desc): Likewise.
775 (expand_generic_desc): Likewise.
776
777 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
778 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
779
780 2000-01-23 Mark Mitchell <mark@codesourcery.com>
781
782 * cp-tree.h (__eprintf): Remove declaration.
783 * tree.c (__eprintf): Remove definition.
784
785 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
786 Mark Mitchell <mark@codesourcery.com>
787
788 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
789 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
790
791 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
792
793 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
794
795 2000-01-23 Mark Mitchell <mark@codesourcery.com>
796
797 * cp-tree.h (register_dtor_fn): New function.
798 * decl.c (destroy_local_static): Rename to ...
799 (register_dtor_fn): ... this. Give it external linkage.
800 (expand_static_init): Use it.
801 * decl2.c (do_static_initialization): Likewise, if using
802 __cxa_atexit.
803 (do_static_destruction): Check that __cxa_atexit is not in use.
804 (finish_file): Don't call do_static_destruction if using
805 __cxa_atexit.
806
807 * typeck.c (convert_arguments): Restore two-message error
808 reporting.
809
810 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
811
812 Remap dynamic cast hint values to be consistent across ABIs.
813 * search.c (dynamic_cast_base_recurse): Remap generated value.
814 (get_dynamic_cast_base_type): Adjust documentation.
815 * tinfo.h (__user_type_info::dyncast): Likewise.
816 (__user_type_info::find_public_subobj): Remap BOFF meaning.
817 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
818 (__class_type_info::do_dyncast): Likewise.
819 (__class_type_info::do_find_public_subobj): Likewise.
820 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
821
822 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.coom>
823
824 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
825
826 * typeck2.c (incomplete_type_error): Restore previous
827 cp_error and cp_error_at call sequence.
828
829 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
830
831 * class.c (dump_class_hierarchy): Make format agree with argument;
832 cast pointer to unsigned long and print with %lx.
833
834 2000-01-19 Gabriel Dos Reis <gdr@codesourcery>
835
836 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
837
838 * typeck.c (composite_pointer_type, common_type,
839 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
840 build_function_call_real, convert_arguments,
841 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
842 build_unary_op, mark_addressable, build_compound_expr,
843 build_static_cast, build_reinterpret_cast, build_const_cast,
844 build_c_cast, build_modify_expr, get_delta_difference,
845 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
846 'ISO C++'. Fusion consecutive calls to diagnotic message routines
847 into a single one.
848 * typeck2.c (readonly_error, abstract_virtuals_error,
849 process_init_constructor, check_for_new_type): Likewise.
850
851 2000-01-19 Mark Mitchell <mark@codesourcery.com>
852
853 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
854 VAR_DECLs.
855
856 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
857
858 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
859 (build_x_typeid): Likewise.
860 (get_tinfo_fn): Likewise.
861 (get_tinfo_fn_unused): Rename to ...
862 (get_tinfo_decl): ... here.
863 * rtti.c (build_headof): Replace logic error with assertion.
864 (get_tinfo_fn_dynamic): Rename to ...
865 (get_tinfo_decl_dynamic): ... here. Make static. Use
866 complete_type_or_else.
867 (build_x_typeid): Move into ...
868 (build_typeid): ... here. Adjust call to
869 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
870 throw_bad_typeid expression.
871 (get_tinfo_fn_unused): Rename to ...
872 (get_tinfo_decl): ... here. Adjust comment.
873 (get_tinfo_fn): Delete.
874 (tinfo_from_decl): New static function.
875 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
876 (get_typeid): Use complete_type_or_else.
877 (build_dynamic_cast_1): Adjust calls to
878 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
879 * parse.y (primary): Adjust call to build_typeid.
880 * except.c (build_eh_type_type_ref): Adjust call to
881 get_tinfo_decl. Mark as used.
882 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
883 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
884 * parse.c: Regenerated.
885
886 2000-01-17 Mark Mitchell <mark@codesourcery.com>
887
888 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
889 calling convention.
890 (resolves_to_fixed_type_p): Document calling convention.
891 * rtti.c (build_x_typeid): Initialize NONNULL.
892
893 * cp-tree.h (build_shared_int_cst): New function.
894 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
895 * class.c (modify_vtable_entry): Likewise.
896 (add_virtual_function): Split out code to generated shared
897 INTEGER_CSTs to build_share_int_cst.
898 (modify_all_vtables): Handle all the overridden functions here.
899 Add overridden functions from non-primary virtual bases to the
900 primary vtable.
901 (finish_struct_1): Adjust call to modify_all_vtables. Add
902 overridden functions from non-primary bases to the vtable.
903 * tree.c (build_shared_int_cst): New function.
904
905 * cp-tree.h (scratchalloc): Remove.
906 (build_scratch_list): Likewise.
907 * call.c (convert_class_to_reference): Replace build_scratch_list
908 and build_expr_list with build_tree_list.
909 (add_candidate): Replace scratchalloc with expralloc. Note memory
910 leak.
911 (build_user_type_conversion_1): Replace build_scratch_list
912 and build_expr_list with build_tree_list.
913 (build_new_op): Likewise.
914 (build_op_delete_call): Likewise.
915 (convert_like): Likewise.
916 * cvt.c (ocp_convert): Likewise.
917 * decl.c (start_decl): Likewise.
918 (start_function): Likewise.
919 (finish_destructor_body): Likewise.
920 (maybe_build_cleanup_1): Likewise.
921 * decl2.c (reparse_decl_as_expr): Likewise.
922 * init.c (perform_member_init): Likewise.
923 (expand_cleanup_for_base): Likewise.
924 (build_builtin_delete_call): Likewise.
925 (build_new_1): Likewise.
926 (build_delete): Likewise.
927 * method.c (do_build_assign_ref): Likewise.
928 * parse.y (already_scoped_stmt): Likewise.
929 (nontrivial_exprlist): Likewise.
930 (net_initializer): Likewise.
931 (initlist): Likewise.
932 * parse.c: Regenerated.
933 * rtti.c (build_x_typeid): Likewise.
934 (build_dynamic_cast_1): Likewise.
935 * typeck.c (build_x_compound_expr): Likewise.
936 (build_static_cast): Likewise.
937 (build_modify_expr): Likewise.
938
939 * cp-tree.h (DECL_VINDEX): Add documentation.
940 * class.c (build_vtable_entry): Likewise.
941 (start_vtable): Add comment.
942 (add_virtual_function): Replace pending_hard_virtuals with
943 overridden_virtuals and pending_virtuals with new_virtuals.
944 Replace redundant assignments with assertions.
945 (check_for_override): Add comment.
946 (check_bases_and_members): Replace pending_hard_virtuals with
947 overridden_virtuals and pending_virtuals with new_virtuals.
948 (create_vtbl_ptr): Likewise.
949 (layout_class_type): Likewise.
950 (finish_struct_1): Likewise. Add comments.
951
952 2000-01-16 Mark Mitchell <mark@codesourcery.com>
953
954 * class.c (finish_struct_1): Replace redundant code with
955 assertions.
956
957 * cp-tree.h (flag_new_abi): Move.
958 (flag_use_cxa_atexit): Likewise.
959 (flag_honor_std): Likewise.
960 (flag_rtti): Likewise.
961 (vbase_offsets_in_vtable_p): Define.
962 (vptrs_present_everywhere_p): Likewise.
963 (TYPE_CONTAINS_VPTR_P): Likewise.
964 (dfs_walk_real): Declare.
965 * class.c (build_vbase_pointer_fields): Check
966 vbase_offsets_in_vtable_p.
967 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
968 BINFO_VPTR_FIELD.
969 (build_vbase_offset_vtbl_entries): Simplify.
970 (build_vbase_offset_vtbl_entries): Adjust.
971 (build_vbase_pointer): Add ability to look up vbase offsets in
972 vtable.
973 (start_vtable): New function.
974 (add_virtual_function): Use it.
975 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
976 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
977 (build_vtbl_initializer): Take the type of the complete object as
978 input. Use it to correctly calculate vbase offsets.
979 (dfs_finish_vtbls): Pass the complete type to
980 build_vtbl_initializer.
981 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
982 (create_vtable_ptr): Create a vtable even if there are no
983 new virtual functions, under the new ABI.
984 (finish_struct_1): Likewise.
985 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
986 * decl.c (exapnd_static_init): Remove call to
987 preserve_initializer.
988 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
989 vtables.
990 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
991 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
992 (construct_virtual_bases): Don't initialize virtual base pointers
993 under the new ABI.
994 (build_aggr_init): Clean up comment.
995 (expand_aggr_init_1): Likewise.
996 * rtti.c (expand_class_desc): Store the virtual function table
997 index where the vbase offset lives in the offset field.
998 * search.c (dfs_walk_real): Make it global.
999 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
1000 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
1001
1002 * tinfo.h (USItype): Make it signed under the new ABI.
1003 * tinfo.cc (convert_to_base): New function. Encapsulate base
1004 conversion logic here.
1005 (__class_type_info::do_upcast): Use it.
1006 (__class_type_info::do_dyncast): Likewise.
1007 (__class_type_info::do_find_public_subobj): Likewise.
1008
1009 * init.c (construct_virtual_bases): Don't look up the addresses of
1010 virtual bases at run-time.
1011
1012 * class.c (build_vbase_pointer): Relocate.
1013 (build_vbase_pointer_fields): Likewise.
1014 (dfs_build_vbase_offset_vtbl_entries): Likewise.
1015 (build_vbase_offset_vtbl_entries): Likewise.
1016
1017 * decl.c (init_decl_processing): Complain if -fnew-abi
1018 -fno-vtable-thunks is used.
1019
1020 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
1021 flag_new_abi.
1022
1023 2000-01-15 Mark Mitchell <mark@codesourcery.com>
1024
1025 * cp-tree.h (num_extra_vtbl_entries): New function.
1026 (size_extra_vtbl_entries): Likewise.
1027 (dfs_vtable_path_unmark): Likewise.
1028 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
1029 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
1030 * class.c (num_extra_vtbl_entries): New function.
1031 (size_extra_vtbl_entries): Likewise.
1032 (dfs_build_vbase_offset_vtbl_entries): New function.
1033 (build_vbase_offset_vtbl_entries): Likewise.
1034 (build_vtbl_initializer): Use it.
1035 (finish_struct_1): Adjust vtable sizes (using
1036 num_extra_vtbl_entries).
1037 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
1038 THUNK_DECL is non-NULL before expanding it.
1039 * init.c (expand_virtual_init): Adjust the vtable pointer by
1040 size_extra_vtbl_entries before storing it.
1041 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
1042 Handle TREE_LIST parameters here, not in the dfs_* functions.
1043 (dfs_unmarked_real_bases_queue_p): Adjust.
1044 (dfs_marked_real_bases_queue_p): Likewise.
1045 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
1046 (dfs_vtable_path_marked_real_bases_queue_p): New function.
1047 (dfs_vtable_path_unmark): Likewise.
1048
1049 2000-01-14 Mark Mitchell <mark@codesourcery.com>
1050
1051 * optimize.c (copy_body_r): Clear the operand three of a
1052 TARGET_EXPR when copying it.
1053
1054 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1055
1056 * method.c (build_decl_overload_real): Check whether we are in ::
1057 before returning __builtin_new/delete.
1058
1059 2000-01-13 Mark Mitchell <mark@codesourcery.com>
1060
1061 * pt.c (tsubst_friend_function): Improve comment.
1062 (instantiate_decl): Avoid crashing when a "nested" function is
1063 instantiated from the top level.
1064
1065 * dump.c (dqeueue_and_dump): Dump
1066 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
1067
1068 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1069
1070 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
1071
1072 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
1073
1074 * g++spec.c (lang_specific_driver): Add -fnew-abi if
1075 ENABLE_NEW_GXX_ABI defined.
1076 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
1077 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
1078 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
1079
1080 2000-01-12 Mark Mitchell <mark@codesourcery.com>
1081
1082 * decl.c (start_cleanup_fn): Call pushdecl.
1083
1084 * call.c (convert_class_to_reference): Fix typos.
1085 (build_conditional_expr): Handle errors gracefully.
1086 * class.c (push_nested_class): Likewise.
1087 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
1088 (DECL_THIS_EXTERN): Use it.
1089 (DECL_THIS_STATIC): Likewise.
1090 * cvt.c (convert_to_void): Handle errors gracefully.
1091 (build_expr_type_conversion): Likewise.
1092 * decl.c (maybe_push_decl): Likewise.
1093 (start_decl_1): Likewise.
1094 (require_complete_types_for_parms): Likewise.
1095 * parse.y (structsp): Likewise.
1096 (base_class): Likewise.
1097 * parse.c: Regenerated.
1098 * pt.c (finish_member_template_decl): Likewise.
1099 * typeck.c (decay_conversion): Likewise.
1100
1101 * cp-tree.h (dfs_skip_vbases): New function.
1102 (find_vbase_instance): Likewise.
1103 * class.c (determine_primary_base): Allow a nearly empty base to
1104 serve as a primary base class under the new ABI.
1105 (get_class_offset_1): Rename to ...
1106 (dfs_get_class_offset): ... this. Simplify. Don't issue error
1107 messages here.
1108 (get_class_offset): Use it. Issue error messages here.
1109 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
1110 find the right copies of virtual bases.
1111 (fixup_vtable_deltas1): Rename to ...
1112 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
1113 bases as primary bases.
1114 (fixup_vtable_deltas): Remove.
1115 (override_one_vtable): Handle virtual bases as primary bases.
1116 (merge_overrides): Likewise.
1117 (finish_struct_1): Likewise.
1118 (dump_class_hierarchy): Dump primary-ness of bases as well.
1119 * search.c (mark_primary_bases): Use a pre-order traversal to
1120 handle primary virtual bases.
1121 (dfs_skip_vbases): New fiunction.
1122 (expand_upcast_fixups): Adjust to handle primary virtual bases.
1123 (fixup_virtual_upcast_offsets): Likewise.
1124 (fixup_all_virtual_upcast_offsets): Likewise.
1125 (dfs_find_vbase_instances): New function.
1126 (find_vbase_instance): Likewise.
1127
1128 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
1129
1130 * lex.c (DIR_SEPARATOR): Delete macro.
1131
1132 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
1133
1134 * decl2.c (lang_decode_option): Handle automatic line wrapping
1135 option.
1136
1137 2000-01-11 Mark Mitchell <mark@codesourcery.com>
1138
1139 * friend.c (do_friend): Don't resolve scopes when processing
1140 template declarations, even if the qualifying scope doesn't
1141 involve template parameters.
1142
1143 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
1144
1145 * class.c (dfs_modify_vtables_queue_p): Remove.
1146 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
1147 and dfs_marked_real_bases_queue_p instead of
1148 dfs_modify_vtables_queue_p.
1149
1150 * class.c (build_vbase_path): Simplify.
1151 (dfs_propagate_binfo_offsets): New function.
1152 (propagate_binfo_offsets): Use it.
1153 (remove_base_field): Simplify.
1154 (dfs_set_offset_for_vbases): Remove.
1155 (dfs_set_offset_for_shared_vbases): New function.
1156 (dfs_set_offset_for_unshared_vbases): Likewise.
1157 (layout_virtual_bases): Use them.
1158 (layout_basetypes): Don't call propagate_binfo_offsets.
1159 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
1160 for the vbases.
1161
1162 * class.c (build_base_field): New function, split out from ...
1163 (build_base_fields): ... here. Use it. Allocate primary bases
1164 first, under the new ABI.
1165 (get_vtable_entry): Remove.
1166 (remove_base_field): New function, split out from ...
1167 (remove_base_fields): ... here. Adjust since primary bases come
1168 first under the new ABI.
1169
1170 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
1171 (initialize_vtbl_ptrs): New function.
1172 (expand_indirect_vtbls_init): Change prototype.
1173 (convert_pointer_to_vbase): Declare.
1174 * init.c (expand_direct_vtbls_init): Remove.
1175 (dfs_initialize_vtbl_ptrs): New function.
1176 (initialize_vtbl_ptrs): Likewise.
1177 (emit_base_init): Use initialize_vtbl_ptrs.
1178 * search.c (convert_pointer_to_vbase): Make it global.
1179 (expand_indirect_vtbls_init): Remove vtable initialization code.
1180 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
1181
1182 * class.c (dfs_finish_vtbls): New function.
1183 (finish_vtbls): Use it.
1184 (dump_class_hierarchy): New function.
1185
1186 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
1187 (BINFO_VBASE_PRIMARY_P): New macro.
1188 (BINFO_VIRTUALS): Add to documentation.
1189 (SET_BINFO_PRIMARY_MARKED_P): Remove.
1190 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1191 (dfs_mark_primary_bases_queue_p): Likewise.
1192 (dfs_unmarked_real_bases_queue_p): New function.
1193 (dfs_marked_real_bases_queue_p): Likewise.
1194 * search.c (dfs_mark_primary_bases): Adjust.
1195 (mark_primary_bases): Likewise.
1196 (get_shared_vbase_if_not_primary): New function.
1197 (dfs_unmarked_real_bases_queue_p): Likewise.
1198 (dfs_marked_real_bases_queue_p): Likewise.
1199 (dfs_get_pure_virtuals): Simplify.
1200 (get_pure_virtuals): Likewise.
1201
1202 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1203
1204 * lex.c: Include tm_p.h.
1205
1206 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
1207
1208 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
1209
1210 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
1211
1212 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
1213 * pt.c (instantiate_decl): Defer comdat templates that might not be
1214 needed.
1215
1216 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
1217 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
1218 (finish_file): Likewise.
1219
1220 * decl2.c (import_export_class): Undo 12/14 change.
1221
1222 * error.c (dump_decl): operator new, not operatornew.
1223
1224 * class.c (field_decl_cmp): A nontype is "greater" than a type.
1225 * search.c (lookup_field_1): Look for the last field with the
1226 desired name.
1227
1228 2000-01-05 Nathan Sidwell <nathan@acm.org>
1229
1230 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
1231 FUNCTION_DECL.
1232
1233 2000-01-05 Nathan Sidwell <nathan@acm.org>
1234
1235 * typeck.c (build_static_cast): Don't strip target qualifiers
1236 when casting from a class.
1237
1238 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1239
1240 * class.c (warn_hidden): Initialize variable `fndecl'.
1241
1242 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
1243
1244 * decl.c (flag_isoc9x): New variable to be able to use code in
1245 c-common.c. For now always zero.
1246
1247 2000-01-03 Mark Mitchell <mark@codesourcery.com>
1248
1249 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
1250 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
1251 or unshare_base_binfos for virtual bases here.
1252 * search.c (dfs_get_vbase_types): Do it here.
1253 (get_vbase_types): Adjust.
1254
1255 2000-01-02 Mark Mitchell <mark@codesourcery.com>
1256
1257 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
1258 (BINFO_PRIMARY_MARKED_P): Use flag 5.
1259 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
1260 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1261 (unmark_primary_bases): Remove declaration.
1262 (unmarkedp): Declare.
1263 (dfs_vbase_unmark): Likewise.
1264 * class.c (determine_primary_base): Return immediately if there
1265 are no base classes. Call mark_primary_bases here.
1266 (modify_all_direct_vtables): Remove.
1267 (modify_all_indirect_vtables): Remove.
1268 (dfs_modify_vtables_queue_p): New function.
1269 (dfs_modify_vtables): New function.
1270 (modify_all_vtables): Use them.
1271 (build_base_fields): Build FIELD_DECLs for primary virtual base
1272 classes.
1273 (create_vtable_ptr): Don't call determine_primary_base here.
1274 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
1275 (dfs_set_offset_for_vbases): ... this.
1276 (layout_virtual_bases): Use it.
1277 (layout_class_type): Call determine_primary_base here.
1278 * search.c (unmarkedp): Make it global.
1279 (shared_marked_p): Simplify.
1280 (shared_unmarked_p): Likewise.
1281 (dfs_primary_bases_queue_p): Remove.
1282 (dfs_unmark_primary_bases): Likewise.
1283 (unmark_primary_bases): Likewise.
1284 (mark_primary_bases): Simplify.
1285 (get_pure_virtuals): Don't call mark_primary_bases here.
1286 (dfs_vbase_unmark): New function.
1287 (get_vbase_types): Simplify.
1288
1289 * class.c (struct base_info): Remove.
1290 (determine_primary_base): Take has_virtual_p rather than a
1291 base_info as input. Don't calculate max_has_virtual.
1292 (finish_struct_bits): Remove max_has_virtual argument.
1293 (create_vtable_ptr): Remove max_has_virtual_p argument.
1294 (layout_virtual_bases): Remove max argument.
1295 (layout_basetypes): Likewise.
1296 (layout_class_type): Remove max_has_virtual_p argument.
1297 (finish_struct_1): Remove max_has_virtual.
1298
1299 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
1300 (layout_basetypes): Remove.
1301 * class.c (propagate_binfo_offsets): Moved here from tree.c.
1302 Update to handle primary virtual bases.
1303 (remove_base_fields): New function, split out from
1304 layout_basetypes.
1305 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
1306 (layout_virtual_bases): New function, split out from
1307 layout_basetypes. Update to handle primary virtual bases.
1308 (layout_basetypes): Moved here from tree.c. Use
1309 remove_base_fields and layout_virtual_bases.
1310 * search.c (dfs_mark_primary_bases_queue_p): New function.
1311 (mark_primary_bases): Use it.
1312 * tree.c (CEIL): Remove.
1313 (propagate_binfo_offsets): Remove.
1314 (layout_basetypes): Remove.
1315
1316 2000-01-01 Mark Mitchell <mark@codesourcery.com>
1317
1318 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
1319 (BINFO_PRIMARY_MARKED_P): New macro.
1320 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
1321 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1322 (mark_primary_bases): New function.
1323 (unmark_primary_bases): Likewise.
1324 * search.c (get_abstract_virtuals_1): Remove.
1325 (dfs_mark_primary_bases): New function.
1326 (mark_primary_bases): Likewise.
1327 (dfs_unmark_primary_bases): Likewise.
1328 (unmark_primary_bases): Likewise.
1329 (dfs_get_pure_virtuals): Likewise.
1330
1331 2000-01-01 Mark Mitchell <mark@codesourcery.com>
1332
1333 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
1334 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
1335 (modify_one_vtable): Adjust.
1336 (fixup_vtable_deltas1): Likewise.
1337 (override_one_vtable): Likewise.
1338 * search.c (get_abstract_virtuals_1): Likewise.
1339 (get_pure_virtuals): Likewise.
1340 (expand_upcast_fixups): Likewise.
1341 * tree.c (debug_binfo): Likewise.
1342
1343 * class.c (build_vtable): Don't return a value. Don't rebuild
1344 vtables for bases that have already been handled.
1345 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
1346 already been handled.
1347 (modify_one_vtable): Adjust accordingly.
1348 (fixup_vtable_deltas1): Likewise.
1349 (finish_struct_1): Likewise.
1350
1351 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1352
1353 * call.c (build_new_method_call): Also check destructors.
1354
1355 1999-12-31 Mark Mitchell <mark@codesourcery.com>
1356
1357 * cp-tree.h (VF_NORMAL_VALUE): Remove.
1358 * class.c (struct base_info): Remove vfield, vfields, and rtti.
1359 (set_primary_base): New function, split out from ...
1360 (finish_base_struct): ... here. Rename to ...
1361 (determine_primary_base): ... this. Simplify.
1362 (create_vtable_ptr): Tweak accordingly.
1363 (finish_struct_1): Simplify.
1364
1365 * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
1366 (CLASSTYPE_N_BASECLASSES): Likewise.
1367 (BINFO_FOR_VBASE): New macro.
1368 (get_vbase_types): Change prototype.
1369 * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
1370 (prepare_fresh_vtable): Likewise.
1371 (finish_vtbls): Likewise.
1372 (get_class_offset_1): Likewise.
1373 (modify_all_indirect_vtables): Likewise.
1374 (build_vbase_pointer_fields): Likewise.
1375 * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
1376 * init.c (sort_base_init): Use BINFO_FOR_VBASE.
1377 (expand_member_init): Likewise.
1378 * search.c (get_base_distance): Likewise.
1379 (lookup_field_queue_p): Likewise.
1380 (virtual_context): Likewise.
1381 (get_vbase_types): Don't return a value. Set
1382 CLASSTYPE_VBASECLASSES here.
1383 * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
1384
1385 1999-12-30 Mark Mitchell <mark@codesourcery.com>
1386
1387 * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
1388
1389 1999-12-29 Mark Mitchell <mark@codesourcery.com>
1390
1391 * class.c (create_vtable_ptr): Put the vtable at the beginning of
1392 the class, not the end, in the new ABI.
1393 * tree.c (propagate_binfo_offsets): Do the right thing for the new
1394 ABI.
1395
1396 1999-12-29 Mark Mitchell <mark@codesourcery.com>
1397
1398 * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy.
1399 (CLASSTYPE_NEARLY_EMPTY_P): New macro.
1400 * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
1401 (check_field_decls): Likewise.
1402 (check_bases_and_members): Likewise.
1403
1404 1999-12-28 Mark Mitchell <mark@codesourcery.com>
1405
1406 * cp-tree.h (do_inline_function_hair): Remove.
1407 * class.c (layout_class_type): New function, split out from
1408 finish_struct_1.
1409 (fixup_pending_inline): Likewise.
1410 (fixup_inline_methods): New function.
1411 * method.c (fixup_pending_inline): Remove.
1412 (do_inline_function_hair): Likewise.
1413
1414 * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
1415 new ABI.
1416
1417 * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
1418 (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
1419 (CLASSTYPE_PURE_VIRTUALS): ... this.
1420 (lang_decl_flags): Replace abstract_virtual with pure_virtual.
1421 (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
1422 (DECL_PURE_VIRTUAL_P): ... this.
1423 (get_abstract_virtuals): Rename to ...
1424 (get_pure_virtuals): ... this.
1425 * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
1426 DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with
1427 CLASSTYPE_PURE_VIRTUALS.
1428 * class.c (build_vtable_entry): Likewise.
1429 (finish_struct_bits): Likewise. Call get_pure_virtuals, not
1430 get_abstract_virtuals.
1431 (build_vtbl_initializer): Likewise.
1432 (override_one_vtable): Likewise.
1433 (check_methods): Likewise.
1434 * decl.c (duplicate_decls): Likewise.
1435 (redeclaration_error_message): Likewise.
1436 (lang_mark_tree): Likewise.
1437 * decl2.c (grok_function_init): Likewise.
1438 (import_export_vtable): Likewise.
1439 (import_expor_class): Likewise.
1440 * typeck2.c (abstract_virtuals_error): Likewise.
1441 * xref.c (GNU_xref_member): Likewise.
1442 * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
1443
1444 1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
1445
1446 * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
1447 throughout.
1448
1449 1999-12-26 Mark Mitchell <mark@codesourcery.com>
1450
1451 * decl.c (store_return_init): Use mode of old RTL generated for
1452 DECL_RESULT, not the mode of DECL_RESULT itself.
1453 * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
1454 for functions that used named return values.
1455
1456 1999-12-24 Mark Mitchell <mark@codesourcery.com>
1457
1458 * semantics.c (expand_body): Use
1459 note_deferral_of_defined_inline_function.
1460
1461 1999-12-22 Mark Mitchell <mark@codesourcery.com>
1462
1463 * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
1464
1465 1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
1466
1467 * error.c (dump_decl): Support named return values.
1468
1469 1999-12-20 Mark Mitchell <mark@codesourcery.com>
1470
1471 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
1472 (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
1473 (CLASSTYPE_PRIMARY_BINFO): Likewise.
1474 * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
1475 TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
1476 (check_bases_and_members): Set them here instead.
1477 (create_vtable_ptr): New function, split out from ...
1478 (finish_struct_1): ... here. Use it. Tidy. Use
1479 CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
1480 * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
1481 the first field in the class.
1482 * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle
1483 seeing TYPE_VFIELD as the first field in the class.
1484
1485 * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
1486 (TYPE_POLYMORPHIC_P): ... this.
1487 (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
1488 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
1489 (TREE_CALLS_NEW): Remove.
1490 (TREE_MANGLED): Likewise.
1491 * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
1492 and TYPE_POLYMORPHIC_P.
1493 * class.c (check_bases): Likewise.
1494 (finish_base_struct): Likewise.
1495 (finish_struct_bits): Likewise.
1496 (check_for_override): Likewise.
1497 (finish_struct_1): Likewise.
1498 (get_vfield_name): Likewise.
1499 * decl.c (xref_basetypes): Likewise.
1500 * decl2.c (import_export_class): Likewise.
1501 (import_export_decl): Likewise.
1502 * error.c (dump_function_decl): Likewise.
1503 * pt.c (instantiate_class_template): Likewise.
1504 * repo.c (repo_inline_used): Likewise.
1505 * rtti.c (build_headof): Likewise.
1506 (get_tinfo_fn_dynamic): Likewise.
1507 (build_x_typeid): Likewise.
1508 (get_tinfo_var): Likewise.
1509 (build_dynamic_cast_1): Likewise.
1510 (synthesize_tinfo_fn): Likewise.
1511 * search.c (lookup_field_1): Likewise.
1512 (dfs_debug_mark): Likewise.
1513 (maybe_suppress_debug_info): Likewise.
1514 * typeck.c (build_component_ref): Likewise.
1515 (build_component_addr): Likewise.
1516 * typeck2.c (process_init_constructor): Likewise.
1517
1518 1999-12-20 Nathan Sidwell <nathan@acm.org>
1519
1520 * typeck.c (strip_all_pointer_quals): New static function.
1521 (build_static_cast): Use it. Don't use at_least_as_qualified_p.
1522
1523 1999-12-16 Mark Mitchell <mark@codesourcery.com>
1524
1525 * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
1526 (dso_handle_node): New macro.
1527 (flag_use_cxa_atexit): New variable.
1528 (declare_global_var): New function.
1529 (start_anon_func): Remove declaration.
1530 (end_anon_func): Likewise.
1531 * decl.c (get_atexit_node): New function, split out from
1532 destroy_local_static. Handle flag_use_cxa_atexit.
1533 (get_dso_handle_node): Likewise.
1534 (start_cleanup_fn): Renamed from start_anon_func. Moved here from
1535 except.c. Handle flag_use_cxa_atexit.
1536 (end_cleanup_fn): Renamed from end_anon_func. Moved here from
1537 except.c.
1538 (declare_global_var): New variable.
1539 (destroy_local_static): Handle flag_use_cxa_atexit.
1540 * decl2.c (flag_use_cxa_atexit): New variable.
1541 (lang_f_options): Likewise.
1542 * except.c (start_anon_func): Remove.
1543 (end_anon_func): Liekwise.
1544 * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
1545 * rtti.c (get_tinfo_var): Use declare_global_var.
1546
1547 1999-12-16 Mark Mitchell <mark@codesourcery.com>
1548
1549 * class.c (check_field_decls): Don't return a value.
1550 (avoid_overlap): Moved here from tree.c.
1551 (build_base_fields): Likewise.
1552 (check_bases): New function, split out from finish_base_struct.
1553 (check_bases_and_members): New function, split out from
1554 finish_struct_1.
1555 (struct base_info): Remove cant_have_default_ctor,
1556 cant_have_const_ctor, cant_have_asn_ref.
1557 (finish_base_struct): Split semantic analysis into check_bases.
1558 (finish_struct_methods): Fix bogus assertion.
1559 (check_field_decls): Call finish_struct_anon here.
1560 (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
1561 (finish_struct_1): Use check_bases_and_members. Reorganize.
1562 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
1563 (build_base_fields): Don't declare.
1564 * tree.c (avoid_overlap): Remove.
1565 (build_base_fields): Likewise.
1566
1567 * optimize.c (struct inline_data): Remove scope_stmt.
1568 (remap_block): Don't use insert_block_after_note. Don't update
1569 scope_stmt.
1570 (expand_call_inline): Don't update scope_stmt.
1571 (optimize_function): Don't initialize scope_stmt.
1572 * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
1573 NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
1574
1575 1999-12-15 Mark Mitchell <mark@codesourcery.com>
1576
1577 * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
1578 out of the class, rather than taking them as parameters.
1579 (build_vbase_pointer_fields): Move here from tree.c.
1580 (build_vtbl_or_vbase_field): New function.
1581 (check_methods): Likewise.
1582 (remove_zero_width_bitfields): Likewise.
1583 (add_virtual_function): Use tree_cons instead of temp_tree_cons.
1584 (delete_duplicate_fields_1): Tidy. Don't delete duplicate
1585 USING_DECLs here.
1586 (finish_struct_methods): Handle the case where there are no
1587 methods here.
1588 (get_basefndecls): Use tree_cons instead of temp_tree_cons.
1589 (check_field_decls): Call delete_duplicate_fields here.
1590 (finish_struct_1): Tidy. Use check_methods and
1591 remove_zero_width_bitfields.
1592 * cp-tree.h (build_vbase_pointer_fields): Remove.
1593 * decl.c (grokdeclarator): Use tree_cons instead of
1594 temp_tree_cons.
1595 * decl2.c (qualified_lookup_using_namespace): Use tree_cons
1596 instead of temp_tree_cons.
1597 * lex.c (cons_up_default_function): Remove dead code.
1598 * method.c (fixup_pending_inline): New function, split out from ...
1599 (do_inline_function_hair): ... here.
1600 * tree.c (build_vbase_pointer_fields): Remove.
1601
1602 1999-12-15 Jason Merrill <jason@casey.cygnus.com>
1603
1604 * tree.c (walk_tree): Walk operand subtrees in forward order.
1605 * optimize.c (expand_call_inline): Likewise.
1606 (optimize_function): Initialize id->scope_stmt to something useful.
1607 (remap_block): Assume id->scope_stmt has a useful value.
1608
1609 1999-12-15 Nathan Sidwell <nathan@acm.org>
1610
1611 * typeck.c (build_c_cast): Expand warning message. Move pointer
1612 alignment warning to after the cast. Don't warn about pointer
1613 alignment when given a pointer to incomplete.
1614
1615 1999-12-15 Richard Henderson <rth@cygnus.com>
1616
1617 * cp-tree.h (make_aggr_type): Declare.
1618 * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
1619 (make_aggr_type): New.
1620
1621 * decl.c (build_typename_type, init_decl_processing): Use it.
1622 (build_ptrmemfunc_type, xref_tag): Likewise.
1623 * except.c (call_eh_info): Likewise.
1624 * init.c (init_init_processing): Likewise.
1625 * pt.c (process_template_parm, lookup_template_class): Likewise.
1626 * rtti.c (expand_class_desc): Likewise.
1627 * semantics.c (begin_class_definition, finish_typeof): Likewise.
1628 * tree.c (copy_template_template_parm): Likewise.
1629
1630 1999-12-15 Jason Merrill <jason@yorick.cygnus.com>
1631
1632 * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
1633 sizeof (struct tree_common).
1634
1635 1999-12-14 Jason Merrill <jason@casey.cygnus.com>
1636
1637 * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
1638 outermost block to point to the inlined function decl.
1639
1640 * error.c (dump_decl): operator==, not operator ==.
1641 (op_to_string): Likewise.
1642
1643 * decl.c (compute_array_index_type): Handle null name.
1644
1645 * decl2.c (ambiguous_decl): Fix to match comment.
1646 (lookup_using_namespace): Adjust.
1647
1648 * decl2.c (import_export_class): Don't ignore dllimport.
1649
1650 1999-12-14 Mark Mitchell <mark@codesourcery.com>
1651
1652 * class.c (check_field_decls): Split out from ...
1653 (finish_struct_1): ... here. Use it. Tidy.
1654
1655 * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
1656 * optimize.c (copy_body_r): Pass it.
1657 * tree.c (remap_save_expr): Clear walk_subtrees for an
1658 already-handled SAVE_EXPR.
1659 (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
1660
1661 * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
1662 * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
1663
1664 * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
1665
1666 1999-12-14 Mumit Khan <khan@xraylith.wisc.edu>
1667
1668 * class.c (finish_base_struct): Allow multiple COM base classes
1669 as well as non-COM bases as long as it's not the leftmost.
1670
1671 1999-12-13 Mumit Khan <khan@xraylith.wisc.edu>
1672
1673 * lex.c (saving_parse_to_obstack): New global.
1674 (reinit_parse_for_block): Use.
1675 (reinit_parse_for_expr): Use.
1676 (check_newline): Use.
1677
1678 1999-12-13 Mark Mitchell <mark@codesourcery.com>
1679
1680 * optimize.c (initialize_inlined_parameters): Take FN to which the
1681 parameters belong as an argument.
1682 (expand_call_inline): Expand calls into the parameter
1683 initializations before pushing the function onto the list of
1684 functions we are presently expanding.
1685
1686 1999-12-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1687
1688 * class.c (get_vtable_name): Use a literal format string and
1689 VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
1690 (prepare_fresh_vtable): Likewise.
1691
1692 * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
1693 VTABLE_NAME_FORMAT.
1694
1695 * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
1696
1697 * init.c (build_vec_init): Initialize variable `try_body'.
1698
1699 * lex.c (yyerror): Don't call a variadic function with a
1700 non-literal format string.
1701
1702 * optimize.c (optimize_function): Call memset, not bzero.
1703
1704 * pt.c (for_each_template_parm_r): Add static prototype.
1705
1706 1999-12-09 Andreas Jaeger <aj@suse.de>
1707
1708 * except.c (expand_throw): Add static attribute to match
1709 prototype.
1710
1711 * Makefile.in (semantics.o): Add dependency on output.h.
1712 * semantics.c: Include output.h for declaration of
1713 make_function_rtl.
1714
1715 1999-12-09 Mark Mitchell <mark@codesourcery.com>
1716
1717 * decl.c (init_decl_processing): Reenable inlining on trees.
1718 (finish_function): Likewise.
1719 * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
1720 * semantics.c (simplify_aggr_init_exprs): New function.
1721 (expand_body): Use it.
1722 * tree.c (walk_tree): Special-case TARGET_EXPRs since they
1723 sometimes present the same sub-tree twice.
1724
1725 * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
1726 `csl'.
1727
1728 * semantics.c (finish_switch_cond): Do conversions here, not ...
1729 * typeck.c (c_expand_start_case): Here.
1730
1731 * semantics.c (do_poplevel): Remove unused variable.
1732
1733 1999-12-06 Mark Mitchell <mark@codesourcery.com>
1734
1735 * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
1736 unless we're declaring the variable in question.
1737
1738 1999-12-06 Mark Mitchell <mark@codesourcery.com>
1739
1740 * decl.c (init_decl_processing): #if 0 last patch.
1741 (finish_function): Likewise.
1742
1743 1999-12-05 Mark Mitchell <mark@codesourcery.com>
1744
1745 * decl.c (init_decl_processing): Set flag_inline_trees if
1746 !flag_no_inline.
1747
1748 * cp-tree.h (calls_setjmp_p): Declare.
1749 * decl.c (finish_function): Mark functions that call setjmp as
1750 uninlinable.
1751 * optimize.c (calls_setjmp_r): New function.
1752 (calls_setjmp_p): Likewise.
1753
1754 1999-12-04 Mark Mitchell <mark@codesourcery.com>
1755
1756 * optimize.c (expand_call_inline): Wrap the expanded call in an
1757 EXPR_WITH_FILE_LOCATION node to get correct line numbers for
1758 inlined functions.
1759
1760 * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add
1761 in_target_cleanup_p.
1762 (remap_decl): New function.
1763 (remap_block): Likewise.
1764 (copy_scope_stmt): Likewise.
1765 (copy_body_r): Use remap_decl and copy_scope_stmt.
1766 (copy_body): Use VARRAY_TOP_TREE.
1767 (initialize_inlined_parameters): Likewise.
1768 (declare_return_variable): Likewise.
1769 (inlinable_function_p): Check flag_inline_trees.
1770 (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
1771 specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the
1772 parameters of the inlined function.
1773 (optimize_function): Prevent recursion into partially complete
1774 functions.
1775
1776 * cp-tree.def (SCOPE_STMT): Take one operand.
1777 * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
1778 (SCOPE_NULLIFIED_P): Redefine.
1779 (SCOPE_NO_CLEANUPS_P): New macro.
1780 (add_scope_stmt): Change prototype.
1781 * decl.c (poplevel): Tidy. Warn about unused variables here.
1782 Record SCOPE_STMT_BLOCKs.
1783 (finish_function): Keep DECL_INITIAL for functions that might be
1784 inlined.
1785 * ir.texi: Document SCOPE_NO_CLEANUPS_P.
1786 * semantics.c: Include rtl.h.
1787 (add_scope_stmt): Return the new scope statement and, for an
1788 end-of-scope statement, its matching begin statement. Don't set
1789 SCOPE_NULLIFIED_P.
1790 (do_pushlevel): Simplify, now that we are always
1791 function-at-a-time.
1792 (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs.
1793 (expand_stmt): Don't call expand_start_bindings or
1794 expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
1795 * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
1796 SCOPE_NULLIFIED_P.
1797 * Makefile.in (semantics.o): Depend on RTL_H.
1798
1799 * decl2.c (pending_statics_used): Make it a macro.
1800 (saved_inlines_used): Likewise.
1801 (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
1802 (mark_inline_for_output): Likewise.
1803 (ssdf_decls_used): Remove.
1804 (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
1805 (generate_ctor_or_dtor_function): Adjust accordingly.
1806
1807 1999-11-24 Geoffrey Keating <geoffk@cygnus.com>
1808 Greg McGary <gkm@gnu.org>
1809
1810 * decl.c (duplicate_decls): Merge
1811 DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
1812 DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
1813
1814 1999-12-02 Mike Stump <mrs@wrs.com>
1815
1816 * init.c (perform_member_init): Handle parse errors better.
1817
1818 1999-12-01 Mark Mitchell <mark@codesourcery.com>
1819
1820 * cp-tree.h (min_tree_cons): Remove.
1821 (scratch_ovl_cons): Likewise.
1822 * decl.c (saveable_obstack): Don't declare.
1823 (duplicate_decls): Tweak error-message.
1824 (initialize_local_var): Explicitly mark the definition as static.
1825 (finish_function): Call permanent_allocation, just so
1826 that the middle-end sees the obstacks it expects.
1827 (mark_cp_function_context): Likewise.
1828 * init.c (build_new): Don't use min_tree_cons.
1829 * lex.c (permanent_obstack): Don't declare.
1830 (current_obstack, saveable_obstack): Likewise.
1831 * spew.c (current_obstack, saveable_obstack): Likewise.
1832 * tree.c (current_obstack, saveable_obstack): Likewise.
1833 (scratch_ovl_cons): Remove.
1834 (build_min_nt): Don't mess with obstacks.
1835 (build_min): Likewise.
1836 (min_tree_cons): Remove
1837 * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
1838 (build_x_function_call): Likewise.
1839 (build_c_cast): Don't use min_tree_cons.
1840
1841 1999-11-29 Mark Mitchell <mark@codesourcery.com>
1842
1843 * pt.c (tsubst_decl): Robustify.
1844
1845 1999-11-27 Mark Mitchell <mark@codesourcery.com>
1846
1847 * decl2.c (finish_file): Call expand_body for inline functions
1848 that will be written out but that do not yet have RTL.
1849 * semantics.c (expand_body): Do not generate RTL For inline
1850 functions that do not yet need to be written out.
1851
1852 1999-11-25 Mark Mitchell <mark@codesourcery.com>
1853
1854 * Make-lang.in (CXX_SRCS): Add optimize.c.
1855 * Makefile.in (CXX_OBJS): Add optimize.o.
1856 (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
1857 (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
1858 (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
1859 (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
1860 (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
1861 (dump.o): Likewise.
1862 (optimize.o): New target.
1863 * class.c: Don't include splay-tree.h.
1864 * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
1865 * cp-tree.h: Include splay-tree.h.
1866 (DECL_UNINLINABLE): New macro.
1867 (CTOR_BEGIN_P, CTOR_END_P): New macros.
1868 (flag_inline_trees): New variable.
1869 (local_variable_p): New function.
1870 (nonstatic_local_decl_p): Likewise.
1871 (optimize_function): Likewise.
1872 (cplus_unsave_expr_now): Remove.
1873 (copy_tree_r): Declare.
1874 (remap_save_expr): Likewise.
1875 * decl.c (local_variable_p): Don't
1876 make it static.
1877 (local_variable_p_walkfn): New function.
1878 (make_rtl_for_local_static): Remove code to try to avoid writing
1879 out static constants.
1880 (emit_local_var): Fix indentation.
1881 (nonstatic_local_decl_p): New function.
1882 (check_default_argument): Use local_variable_p_walkfn, not
1883 local_variable_p, when walking the tree.
1884 (start_function): Set the DECL_CONTEXT for automatically generated
1885 labels.
1886 (finish_constructor_body): Use CTOR_STMT to mark the end of a
1887 constructor.
1888 * decl2.c: Don't include splay-tree.h.
1889 (flag_inline_trees): Define.
1890 * dump.c: Don't include
1891 splay-tree.h.
1892 * except.c (expand_end_catch_block): Fix comment formatting.
1893 (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
1894 (expand_throw): Tidy comment.
1895 * init.c (build_vec_delete_1): Use create_temporary_var.
1896 * lex.c (cplus_tree_code_type): Make it static.
1897 (cplus_tree_code_length): Likewise.
1898 (cplus_tree_code_name): Likewise.
1899 * optimize.c: New file.
1900 * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
1901 with computed gotos.
1902 (setup_vtbl_ptr): Mark the beginnings of constructors with
1903 CTOR_STMT.
1904 (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
1905 (expand_body): Call optimize_function. Save bodies if we're doing
1906 inlining on trees.
1907 * tree.c: Don't include splay-tree.h. Include insn-config.h and
1908 integrate.h.
1909 (copy_tree_r): Make it public.
1910 (statement_code_p): New function.
1911 (mark_local_for_remap_r): Likewise.
1912 (cp_usave_r): Likewise.
1913 (cp_unsave): Likewise.
1914 (build_cplus_new): Set DECL_CONTEXT for temporary variables.
1915 (walk_tree): Walk into `s' class nodes. Walk statement chains.
1916 (copy_tree_r): Handle 's' class nodes. Restore chains for
1917 statements. Nullify scopes. Don't copy types.
1918 (init_tree): Set lang_unsave to cp_unsave.
1919 (remap_save_expr): Define.
1920 * ir.texi: Document CTOR_STMT.
1921
1922 1999-11-24 Jason Merrill <jason@casey.cygnus.com>
1923
1924 * search.c (note_debug_info_needed): Do perform this optimization
1925 for dwarf2.
1926 (maybe_suppress_debug_info): Likewise. Start by clearing
1927 TYPE_DECL_SUPPRESS_DEBUG.
1928
1929 1999-11-24 Mark Mitchell <mark@codesourcery.com>
1930
1931 * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
1932
1933 * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
1934
1935 1999-11-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1936
1937 * decl.c (pushdecl, grokdeclarator): Don't call a variadic
1938 function with a non-literal format string.
1939
1940 * lex.c (do_identifier): Likewise.
1941
1942 * typeck.c (build_unary_op): Likewise.
1943
1944 1999-11-23 Mark Mitchell <mark@codesourcery.com>
1945
1946 * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
1947
1948 1999-11-22 Mark Mitchell <mark@codesourcery.com>
1949
1950 * cp-tree.def (CTOR_COMPLETE): New tree node.
1951 * decl.c (finish_constructor_body): Add it, to mark the end of the
1952 constructor.
1953 (finish_function): Don't call end_protect_partials here.
1954 * ir.texi (CTOR_COMPLETE): Document it.
1955 * semantics.c (expand_stmt): Handle it.
1956
1957 * cp-tree.def (FUNCTION_NAME): New tree node.
1958 * cp-tree.h (current_function_name_declared): Tweak documentation.
1959 (lang_decl_flags): Add pretty_function_p, adjust dummy.
1960 (DECL_PRETTY_FUNCTION_P): New macro.
1961 * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
1962 etc., in a template function. Use at_function_scope_p instead of
1963 expanding it inline.
1964 * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
1965 specially.
1966 (tsubst): Handle FUNCTION_NAME.
1967 (tsubst_copy): Likewise.
1968 (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
1969 etc. in instantiation.
1970 * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
1971 even in template functions.
1972 (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
1973 conditional scope at the top of a destructor.
1974
1975 * error.c (dump_function_decl): Use `[ with ... ]' syntax for
1976 specializations too.
1977
1978 1999-11-22 Nathan Sidwell <nathan@acm.org>
1979
1980 * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
1981 when actually negative.
1982
1983 * typeck.c (convert_for_assignment): Expand comment about
1984 strange NULL check, moved from ...
1985 (convert_for_initialization): ... here. Remove unneeded
1986 code.
1987
1988 1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
1989
1990 * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
1991 * init.c (build_vec_delete, build_vec_delete_1): Likewise.
1992 Always destruct virtual bases of array components, but never
1993 delete them.
1994 (build_vec_init): Adjust invocations.
1995 (build_delete): Likewise.
1996 * decl2.c (delete_sanity): Likewise.
1997
1998 1999-11-19 Nathan Sidwell <nathan@acm.org>
1999
2000 * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
2001 * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
2002 * decl2.c (grok_method_quals): Accept `restrict' as applying to
2003 the object pointer. Return such qualifiers.
2004 (grokclassfn): Apply this pointer qualifiers. Cleanup unused
2005 variables.
2006
2007 1999-11-18 Mark Mitchell <mark@codesourcery.com>
2008
2009 * except.c (expand_end_catch_block): Fix typo.
2010 (expand_exception_blocks): Simplify. Don't call
2011 expand_leftover_cleanups.
2012
2013 1999-11-15 Jason Merrill <jason@casey.cygnus.com>
2014
2015 * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
2016 * pt.c (tsubst, case INTEGER_TYPE): Call it.
2017 Check uses_template_parms.
2018
2019 * class.c (finish_struct): If we're a local class in a template
2020 function, add a TAG_DEFN.
2021 * pt.c (lookup_template_class): If this is a local class in a
2022 template function, call pushtag.
2023 (tsubst_expr, case TAG_DEFN): Handle classes, too.
2024
2025 Emit debug info with the vtable.
2026 * search.c (maybe_suppress_debug_info): New function...
2027 * class.c (finish_struct_1): ...split out from here.
2028 * cp-tree.h: Declare it.
2029 * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
2030 if we're writing out the vtable.
2031 * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
2032 note_debug_info_needed): #if 0 out.
2033
2034 1999-11-14 Mark Mitchell <mark@codesourcery.com>
2035
2036 * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
2037 * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
2038 TREE_PERMANENT.
2039 * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
2040 * decl2.c (lookup_arg_dependent): Use it.
2041
2042 * cp-tree.h (cp_finish_decl): Change prototype.
2043 (finish_static_data_member_decl): Likewise.
2044 (push_permanent_obstack): Remove declaration.
2045 (push_expression_obstack): Likewise.
2046 (push_scratch_obstack): Likewise.
2047 (DECL_TEMPLATE_PARM_P): Robustify.
2048 (SET_DECL_TEMPLATE_PARM_P): New macro.
2049 * class.c (add_method): Don't manipulate obstacks.
2050 (finish_vtbls): Likewise.
2051 * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
2052 * decl.c (binding_for_name): Don't manipulate obstacks.
2053 (maybe_push_to_top_level): Likewise.
2054 (pop_from_top_level): Likewise.
2055 (duplicate_decls): Likewise.
2056 (pushdecl): Likewise.
2057 (implicitly_declare): Likewise.
2058 (build_typename_type): Likewise.
2059 (start_decl): Likewise.
2060 (cp_finish_decl): Likewise.
2061 (finish_decl): Likewise.
2062 (destroy_local_static): Likewise.
2063 (expand_static_init): Likewise.
2064 (complete_array_type): Likewise.
2065 (grokvardecl): Likewise.
2066 (build_ptrmemfnc_type): Likewise.
2067 (grokdeclarator): Likewise.
2068 (xref_tag): Likewise.
2069 (xref_basetypes): Likewise.
2070 (start_enum): Likewise.
2071 (finish_enum): Likewise.
2072 (start_function): Likewise.
2073 (finish_function): Likewise.
2074 (start_method): Adjust call to cp_finish_decl.
2075 * decl2.c (finish_static_data_member_decl): Don't manipulate
2076 obstacks.
2077 (grokfield): Likewise.
2078 (grokbitfield): Likewise.
2079 (get_temp_name): Likewise.
2080 (get_sentry): Likewise.
2081 (fnish_file): Likewise.
2082 (lookup_arg_dependent): Likewise.
2083 * except.c (call_eh_info): Likewise.
2084 (push_eh_info): Likewise.
2085 (do_pop_exception): Likewise.
2086 (initialize_handler_parm): Likewise.
2087 (expand_end_eh_spec): Likewise.
2088 (alloc_eh_object): Likewise.
2089 (expand_throw): Likewise.
2090 * expr.c (extract_scalar_init): Likewise.
2091 * init.c (build_java_class_ref): Likewise.
2092 * lex.c (get_time_identifier): Likewise.
2093 (snarf_defarg): Likewise.
2094 (add_defarg_fn): Likewise.
2095 (is_global): Simplify.
2096 (do_identifier): Don't check TREE_PERMANENT.
2097 * method.c (emit_thunk): Don't manipulate obstacks.
2098 * parse.y (condition): Adjust call to cp_finish_decl.
2099 (primary): Likewise.
2100 (initdcl): Likewise.
2101 (initdcl0_innards): Likewise.
2102 (nomods_initdcl0): Likewise.
2103 * pt.c (push_inline_template_parms_recursive): Use
2104 SET_DECL_TEMPLATE_PARM_P.
2105 (process_template_parm): Likewise.
2106 (lookup_template_class): Don't manipulate obstacks.
2107 (instantiate_class_template): Adjust call to
2108 finish_static_data_member_decl.
2109 (tsubst_decl): Don't manipulate obstacks.
2110 (tsubst_expr): Likewise.
2111 (instantiate_template): Likewise.
2112 (instantiate_decl): Adjust calls to cp_finish_decl.
2113 * rtti.c (call_void_fn): Don't manipulate obstacks.
2114 (get_tinfo_var): Likewise.
2115 (get_tinfo_fn_unused): Likewise.
2116 (build_dynamic_cast_1): Likewise.
2117 (expand_si_desc): Likewise.
2118 (expand_class_desc): Likewise.
2119 (expand_ptr_desc): Likewise.
2120 (expand_attr_desc): Likewise.
2121 (expand_generic_desc): Likewise.
2122 (synthesize_tinfo_fn): Likewise.
2123 * search.c (expand_upcast_fixups): Likewise.
2124 * semantics.c (finish_asm_stmt): Likewise.
2125 (finish_named_return_value): Likewise.
2126 (begin_class_definition): Likewise.
2127 (finish_class_definition): Likewise.
2128 (finish_typeof): Likewise.
2129 * tree.c (build_cplus_method_type): Likewise.
2130 (reverse_path): Likewise.
2131 (copy_template_template_parm): Likewise.
2132 (build_expr_ptr_wrapper): Likewise.
2133 (push_expression_obstack): Remove.
2134 (push_permanent_obstack): Likewise.
2135 * typeck.c (mark_addressable): Likewise.
2136
2137 1999-11-13 Mark Mitchell <mark@codesourcery.com>
2138
2139 * call.c (build_conditional_expr): Use build_target_expr_with_type.
2140 (convert_like): Likewise.
2141 (build_over_call): Likewise.
2142 * cp-tree.h (build_target_expr): Remove.
2143 (build_target_expr_with_type): New function.
2144 * cvt.c (build_up_reference): Use get_target_expr.
2145 * decl.c (build_target_expr): Move to ...
2146 * tree.c (build_target_expr): Here. Make it static.
2147 (build_target_expr_with_type): New function. Set DECL_CONTEXT on
2148 the temporary VAR_DECLs.
2149 (get_target_expr): Use it.
2150
2151 1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
2152
2153 * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
2154 * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
2155 * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
2156 * class.c (set_rtti_entry): Use it.
2157
2158 1999-11-12 Mark Mitchell <mark@codesourcery.com>
2159
2160 * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
2161 here.
2162 * semantics.c (finish_expr_stmt): Call it here instead. Move
2163 default_conversion logic to semantic-analysis time.
2164
2165 1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
2166
2167 * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
2168
2169 Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com>
2170
2171 * init.c (init_init_processing): Re-instated Nov 11 patch after
2172 approval.
2173
2174 Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com>
2175
2176 * init.c (init_init_processing): Undo patch from Nov 11, 1999.
2177 Patch had not been approved yet.
2178
2179 1999-11-12 Mark Mitchell <mark@codesourcery.com>
2180
2181 * decl.c (compute_array_index_type): New function, split out from
2182 grokdeclarator.
2183 (create_array_type_for_decl): Likewise.
2184 (grokdeclarator): Use them.
2185
2186 * semantics.c (expand_stmt): Don't suspend_momentary or
2187 resume_momentary.
2188
2189 Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
2190
2191 * init.c (init_init_processing): Header information for
2192 arrays allocated via `new' should have the same alignment used by
2193 malloc.
2194
2195 1999-11-10 Mark Mitchell <mark@codesourcery.com>
2196
2197 * error.c (dump_function_name): Don't crash if given a friend
2198 pseudo-instantiation.
2199
2200 * cp-tree.h (build_enumerator): Change prototype.
2201 * decl.c (enum_next_value): Remove.
2202 (enum_overflow): Likewise.
2203 (init_decl_processing): Don't register enum_next_value as a root.
2204 (start_enum): Clear TYPE_VALUES for a redefined enum.
2205 (finish_enum): Reset the type of enumeration constants.
2206 (build_enumerator): Fix indentation. Don't copy CONST_DECLs when
2207 we don't need to. Maintain the TYPE_VALUES list and look there
2208 for the previously defined enumeration constant. Let enumeration
2209 constants have the type of their values until the enumeration type
2210 is complete.
2211 * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
2212 (structsp): Adjust.
2213 * parse.c: Regenerated.
2214 * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
2215
2216 Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
2217 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2218
2219 * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
2220
2221 1999-11-09 Mark Mitchell <mark@codesourcery.com>
2222
2223 * cp-tree.h (language_function): Remove x_last_dtor_insn and
2224 x_last_parm_cleanup_insn.
2225 * decl.c (last_dtor_insn): Remove.
2226 (last_parm_cleanup_insn): Likewise.
2227 (expand_start_early_try_stmts): Don't set them.
2228 (store_parm_decls): Likewise.
2229 (save_function_data): Or save them.
2230 (mark_lang_function): Or mark them.
2231
2232 1999-11-08 Mark Mitchell <mark@codesourcery.com>
2233
2234 * decl.c (store_parm_decls): Generate cleanup code at
2235 semantic-analysis time. Destroy objects in the correct order.
2236
2237 1999-11-07 Mark Mitchell <mark@codesourcery.com>
2238
2239 * cp-tree.h (begin_new_placement): Remove.
2240 (finish_new_placement): Likewise.
2241 * class.c (finish_struct_1): Don't suspend_momentary or
2242 resume_momentary.
2243 * decl.c (grokdeclarator): Likewise.
2244 (maybe_build_cleanup_1): Likewise.
2245 * except.c (push_eh_cleanup): Likewise.
2246 (build_terminate_handler): Likewise.
2247 * init.c (build_new_1): Likewise.
2248 * parse.y (parse_decl): Change prototype.
2249 (initdecls, notype_initdecls, initdcl): Don't return int.
2250 (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
2251 (.begin_new_placement): Remove.
2252 (.finish_new_placement): Likewise.
2253 (nonmomentary_expr): Likewise.
2254 (suspend_mom): Likewise.
2255 (condition): Don't suspend_momentary, resume_momentary, or keep
2256 track of need to resume.
2257 (unary_expr): Likewise.
2258 (new_placement): Likewise.
2259 (decl): Likewise.
2260 (structsp): Likewise.
2261 (new_type_id): Likewise.
2262 (maybe_parmlist): Likewise.
2263 (direct_after_type_declaration): Likewise.
2264 (direct_new_declarator): Likewise.
2265 (direct_abstract_declaration): Likewise.
2266 * parse.c: Regenerated.
2267 * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
2268 * semantics.c (begin_new_placement): Remove.
2269 (finish_new_placement): Likewise.
2270
2271 1999-11-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2272
2273 * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
2274 (DECL_TEMPLATE_INFO): Use it.
2275 * decl.c (warn_extern_redeclared_static): Do nothing for
2276 TEMPLATE_DECLs.
2277 * decl2.c (mark_used): Explicitly check for function or variable.
2278 * semantics.c (finish_unary_op_expr): Check whether result is also
2279 an INTEGER_CST.
2280
2281 1999-11-05 Mark Mitchell <mark@codesourcery.com>
2282
2283 * Makefile.in (typeck2.o): Depend on output.h.
2284 * typeck2.c: Include output.h.
2285
2286 * decl.c (flag_ansi): Remove declaration.
2287
2288 * pt.c (tinst_level_tick): Make it static.
2289 (last_template_error_tick): Likewise.
2290
2291 * cp-tree.h (mapcar): Remove declaration.
2292 (search_tree): Likewise.
2293 (walk_tree_fn): New typedef.
2294 (walk_tree): New function.
2295 * tree.c (bot_manip): Change prototype. Adjust to be called via
2296 walk_tree.
2297 (bot_replace): Likewise.
2298 (no_linkage_helper): Likewise.
2299 (copy_tree_r): New function.
2300 (search_tree): Rename, and adjust, to become ...
2301 (walk_tree): New function.
2302 (mapcar): Remove.
2303 (target_remap): Remove.
2304 (target_remap_count): Likewise.
2305 (break_out_target_exprs): Use walk_tree.
2306 * decl.c (local_variable_p): Change prototype.
2307 (check_default_argument): Use walk_tree.
2308 * pt.c (for_each_template_parm_r): New function, split out from ...
2309 (for_each_template_parm): Here. Use it, via walk_tree.
2310
2311 1999-11-03 Mark Mitchell <mark@codesourcery.com>
2312
2313 * class.c (check_bitfield_decl): New function, split out from
2314 finish_stuct_1.
2315 (check_field_decl): Likewise. Recursively examine members of
2316 anonymous structs.
2317 (finish_struct_1): Use them.
2318 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
2319
2320 1999-11-02 Mark Mitchell <mark@codesourcery.com>
2321
2322 * decl.c (grokfndecl): Remove dead code.
2323
2324 * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
2325
2326 1999-11-02 Scott Snyder <snyder@fnal.gov>
2327
2328 * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
2329 IMAGPART_EXPR.
2330 * pt.c (tsubst_copy): Likewise.
2331
2332 1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
2333
2334 * decl2.c (maybe_make_one_only): Always make things comdat on
2335 ELF targets, too.
2336
2337 1999-10-31 Mark Mitchell <mark@codesourcery.com>
2338
2339 * decl.c (finish_function): Call free_after_parsing for functions
2340 we are not immediately turning into RTL.
2341
2342 1999-10-31 Brendan Kehoe <brendan@cygnus.com>
2343
2344 * cp-tree.h (flag_dump_translation_unit): Add decl.
2345
2346 Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net>
2347
2348 * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
2349
2350 1999-10-30 Mark Mitchell <mark@codesourcery.com>
2351
2352 * decl.c (pop_cp_function_context): Don't call free on a NULL
2353 pointer.
2354 * semantics.c: Include ggc.h.
2355 (expand_body): Do garbage-collection after processing a template
2356 function. Clear DECL_SAVED_TREE after generating RTL for a
2357 function.
2358 * Makefile.in (semantics.o): Depend on ggc.h.
2359
2360 1999-10-29 Mark Mitchell <mark@codesourcery.com>
2361
2362 * cp-tree.h (make_typename_type): Change prototype.
2363 * decl.c (make_typename_type): Only complain if so requested.
2364 * parse.y (nested_name_specifier): Adjust calls.
2365 (typename_sub0): Likewise.
2366 (typename_sub1): Likewise.
2367 * parse.c: Regenerated.
2368 * pt.c (convert_template_argument): Pass complain to
2369 make_typename_type.
2370 (tsubst): Likewise.
2371
2372 1999-10-28 Mark Mitchell <mark@codesourcery.com>
2373
2374 * semantics.c (finish_handler): End the scope of the handler
2375 before attaching it to the statement-tree.
2376
2377 1999-10-28 Ian Lance Taylor <ian@zembu.com>
2378
2379 * rtti.c (build_dynamic_cast_1): Give a better error message for
2380 an attempt to dynamic_cast from a non-polymorphic type.
2381
2382 1999-10-27 Mark Mitchell <mark@codesourcery.com>
2383
2384 * cp-tree.h (make_temp_vec): Remove.
2385 (make_scratch_vec): Likewise.
2386 * call.c (add_function_candidate): Use make_tree_vec.
2387 (add_conv_candidate): Likewise.
2388 (build_builtin_candidate): Likewise.
2389 (add_template_candidate_real): Likewise.
2390 * class.c (resolve_address_of_overloaded_function): Likewise.
2391 * decl.c (start_function): Don't fool with the momentary obstack.
2392 (finish_function): Likewise.
2393 * init.c (expand_direct_vtbls_init): Likewise.
2394 (begin_init_stmts): Likewise.
2395 (finish_init_stmts): Likewise.
2396 * pt.c (add_to_template_args): Use make_tree_vec.
2397 (check_explicit_specialization): Likewise.
2398 (coerce_template_parms): Likewise.
2399 (lookup_template_class): Don't fool with the momentary obstack.
2400 (instantiate_class_template): Likewise.
2401 (tsubst_template_arg_vector): Use make_tree_vec.
2402 (tsubst_aggr_type): Don't fool with the momentary obstack.
2403 (tsubst_decl): Likewise. Use make_tree_vec.
2404 (try_one_overload): Likewise.
2405 (try_class_unification): Don't fool with the momentary obstack.
2406 (get_bindings_real): Use make_tree_vec.
2407 (set_mangled_name_for_template_decl): Likewise.
2408 * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
2409 * semantics.c (finish_expr_stmt): Likewise.
2410 (finish_do_stmt): Likewise.
2411 (finish_for_expr): Likewise.
2412 (finish_switch_cond): Likewise.
2413 (do_pushlevel): Likewise.
2414 (do_poplevel): Likewise.
2415 * tree.c (make_temp_vec): Remove.
2416
2417 * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
2418 CLEANUP_P for a TRY_BLOCK.
2419 * ir.texi: Document SAVE_EXPR.
2420
2421 Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
2422
2423 * call.c (build_over_call): Check that the built-in function is
2424 of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
2425 * typeck.c (build_function_call_real): Similarly.
2426
2427 1999-10-26 Mark Mitchell <mark@codesourcery.com>
2428
2429 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call
2430 remember_end_note.
2431
2432 1999-10-24 Mark Mitchell <mark@codesourcery.com>
2433
2434 * decl.c (push_overloaded_decl_1): Use pushdecl.
2435
2436 * decl.c (auto_function): Replace #ifdef'd __inline with just
2437 plain inline.
2438 * lex.c (my_get_run_time): Likeise.
2439 (yyprint): Likewise.
2440 (identifier_type): Likewise.
2441 * method.c (start_squangling): Likewise.
2442 (end_squangling): Likewise.
2443 (icat): Likewise.
2444 (old_backref_index): Likewise.
2445 (flush_repeats): Likewise.
2446 (issue_ktype): Likewise.
2447 * parse.y (empty_parms): Likewise.
2448 * parse.c: Regenerated.
2449
2450 1999-10-21 Mark Mitchell <mark@codesourcery.com>
2451
2452 * dump.c (dequeue_and_dump): Replace several uses of
2453 queue_and_dump_index with dump_child.
2454
2455 1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2456
2457 * expr.c: Include tm_p.h.
2458
2459 1999-10-21 Mark Mitchell <mark@codesourcery.com>
2460
2461 * cp-tree.h (SCOPE_PARTIAL_P): New macro.
2462 (pushlevel_temporary): Remove.
2463 (add_scope_stmt): New function.
2464 * decl.c (pushlevel_temporary): Remove.
2465 (poplevel): Use add_scope_stmt.
2466 (start_decl_1): Likewise.
2467 * semantics.c (add_scope_stmt): New function.
2468 (do_pushlevel): Use it.
2469 (do_poplevel): Use it.
2470 (expand_stmt): Check SCOPE_PARTIAL_P.
2471
2472 * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
2473 * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
2474 * expr.c (cplus_expand_expr): Expand it.
2475 * ir.texi: Document EMPTY_CLASS_EXPR.
2476
2477 1999-10-20 Mark Mitchell <mark@codesourcery.com>
2478
2479 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
2480 parameters as having namespace scope.
2481
2482 1999-10-19 Mark Mitchell <mark@codesourcery.com>
2483
2484 * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
2485 (mangling_flags): New type.
2486 (build_overload_int): Change prototype.
2487 (build_overload_value): Likewise.
2488 (numeric_output_need_bar): Improve comment.
2489 (mangle_expression): New function, broken out from ...
2490 (build_overload_int): Here.
2491 (build_overload_value): Adjust for use of mangling flags. Don't
2492 warn about real-valued template parameters here. Do handle
2493 complex expressions involving real-valued template parameters.
2494 (build_template_parm_names): Encase non-type template parameters
2495 in underscores, if necessary.
2496 (process_overload_item): Remove conditional on
2497 PARM_CAN_BE_ARRAY_TYPE.
2498
2499 1999-10-17 Mark Mitchell <mark@codesourcery.com>
2500
2501 * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
2502
2503 * ir.texi: Clean up documentation of RETURN_INIT.
2504
2505 1999-10-15 Greg McGary <gkm@gnu.org>
2506
2507 * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
2508 (lang_init): Set default for flag_bounds_check if still "unspecified".
2509
2510 1999-10-13 Andrew Haley <aph@cygnus.com>
2511
2512 * class.c (finish_struct_1): Force alignment of non-bitfields to
2513 BITS_PER_UNIT.
2514
2515 Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
2516
2517 * typeck2.c (process_init_constructor): Handle empty constructors.
2518
2519 1999-10-13 Jason Merrill <jason@yorick.cygnus.com>
2520
2521 * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
2522
2523 * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
2524 array error.
2525
2526 1999-10-13 Mark Mitchell <mark@codesourcery.com>
2527
2528 * decl.c (make_rtl_for_local_static): Don't create register RTL
2529 for addressable constants.
2530
2531 1999-10-13 Nathan Sidwell <nathan@acm.org>
2532
2533 * cp-tree.h (build_x_va_arg): Prototype new function.
2534 * call.c (build_x_va_arg): Define it.
2535 * parse.y (unary_expr): Call build_x_va_arg.
2536
2537 * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
2538 * call.c (convert_type_from_ellipsis): Define it.
2539 * decl.c (init_decl_processing): Set lang_type_promotes_to.
2540
2541 * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
2542
2543 1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
2544
2545 * class.c (fixed_type_or_null): Always set *nonnull.
2546
2547 1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2548
2549 * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
2550 __GNUC__ and __GNUC_MINOR__.
2551
2552 1999-10-09 Mark Mitchell <mark@codesourcery.com>
2553
2554 * cp-tree.h (make_rtl_for_local_static): New function.
2555 * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
2556 local statics ...
2557 (make_rtl_for_local_static): Here.
2558 * semantics.c (expand_stmt): Use make_rtl_for_local_static.
2559
2560 1999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2561
2562 * method.c: Include tm_p.h.
2563
2564 1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
2565
2566 * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
2567 * lex.c (cp_make_lake_type): Likewise.
2568 * tree.c (init_tree): Init make_lang_type_fn.
2569
2570 1999-10-07 Mark Mitchell <mark@codesourcery.com>
2571
2572 * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
2573 paramter.
2574
2575 * semantics.c (expand_stmt): Don't pretend to have asmspecs for
2576 local statics if we don't really have them.
2577
2578 * ir.texi: Improve documentation for STMT_EXPR. Describe
2579 CLEANUP_POINT_EXPR.
2580
2581 1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
2582
2583 * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
2584
2585 1999-10-07 Greg McGary <gkm@gnu.org>
2586
2587 * class.c (finish_struct_1): Use simpler method of
2588 removing elements of a singly-linked list which doesn't
2589 lose for classes without data members.
2590
2591 1999-10-07 Mark Mitchell <mark@codesourcery.com>
2592
2593 * friend.c (make_friend_class): Robustify.
2594
2595 * semantics.c (finish_object_call_expr): Reject calls to template
2596 types.
2597
2598 1999-10-06 Mark Mitchell <mark@codesourcery.com>
2599
2600 * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
2601
2602 * cp-tree.h (CLASSTYPE_VFIELD): Remove.
2603 * call.c (build_vfield_ref): Use TYPE_VFIELD, not
2604 CLASSTYPE_VFIELD.
2605 * class.c (get_vfield_offset): Likewise.
2606 (finish_base_struct): Likewise.
2607 (modify_one_vtable): Likewise.
2608 (fixup_vtable_deltas): Likewise.
2609 (finish_struct_1): Likewise.
2610 * init.c (expand_virtual_init): Likewise.
2611 * search.c (lookup_field_1): Likewise.
2612 (expand_upcast_fixups): Likewise.
2613 * typeck.c (build_component_ref): Likewise.
2614 (build_binary_op_nodefault): Likewise.
2615
2616 * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
2617 * ir.texi: Document TYPE_VFIELD.
2618
2619 1999-10-06 Brendan Kehoe <brendan@cygnus.com>
2620
2621 * decl.c (grokdeclarator): Only warn about non-zero arrays if
2622 !in_system_header (linux socketbits.h can give this for
2623 __cmsg_data, which is using a GNU extension).
2624
2625 1999-10-05 Mark Mitchell <mark@codesourcery.com>
2626
2627 * decl2.c (start_static_storage_duration_function): Push the
2628 function declaration so it ends up in namespace scope.
2629
2630 * dump.c (DUMP_CHILDREN): Remove.
2631 (DUMP_BINFO): Adjust.
2632 (struct dump_node_info): Remove dump_children_p.
2633 (queue_and_dump_type): Remove dump_children_p parameter.
2634 (queue): Don't set dump_children_p.
2635 (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
2636 queue_and_dump_index.
2637 (dequeue_and_dump): Unconditionally print children. Adjust calls
2638 to functions mentioned above.
2639 (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
2640
2641 * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
2642 * dump.c (dequeue_and_dump): Dump them.
2643
2644 * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
2645
2646 * decl.c (start_function): Set current_in_charge_parm for
2647 constructors, too, where appropriate.
2648 * search.c (fixup_all_virtual_upcast_offsets): New function.
2649 (expand_indirect_vtbls_init): Use it.
2650
2651 1999-10-04 Nathan Sidwell <nathan@acm.org>
2652
2653 * decl2.c (grok_alignof): Don't decay lvalues.
2654
2655 * init.c (build_new): Remove unused variable.
2656
2657 1999-10-04 Mark Mitchell <mark@codesourcery.com>
2658
2659 * cp-tree.h (struct language_function): Remove static_labelno.
2660 (static_labelno): Remove macro.
2661 * method.c (build_overload_nested_name): Make static_labelno
2662 static here.
2663
2664 * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
2665 to decide whether or not a function is defined.
2666
2667 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
2668 situations where make_node will do it automatically.
2669 * decl.c (grok_reference_init): Likewise.
2670 (expand_static_init): Likewise.
2671 (do_static_initialization): Likewise.
2672 * init.c (perform_member_init): Likewise.
2673 (expand_aggr_init_1): Likewise.
2674 (build_new_1): Likewise.
2675 * method.c (do_build_copy_constructor): Likewise.
2676 (do_build_assign_ref): Likewise.
2677 * search.c (expand_upcast_fixups): Likewise.
2678 * semantics.c (finish_stmt_expr): Likewise.
2679 * typeck.c (build_unary_op): Likewise.
2680 (check_return_expr): Likewise.
2681
2682 1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
2683
2684 * init.c (build_vec_delete_1): Fold COND_EXPRs.
2685
2686 1999-10-03 Mark Mitchell <mark@codesourcery.com>
2687
2688 * cp-tree.def (VEC_INIT_EXPR): Remove.
2689 * cp-tree.h (struct stmt_tree): New type.
2690 (struct saved_scope): Remove firstobj. Add x_saved_tree,
2691 x_stmt_tree.
2692 (class_cache_firstobj): Remove.
2693 (struct language_function): Remove stmts_are_full_exprs_p,
2694 x_last_tree, and x_last_expr_type. Add x_stmt_tree.
2695 (current_stmt_tree): New macro.
2696 (last_tree): Adjust.
2697 (last_expr_type): Likewise.
2698 (doing_semantic_analysis_p): Simplify.
2699 (stmts_are_full_exprs_p): Adjust.
2700 (begin_tree): Remove prototype.
2701 (end_tree): Likewise.
2702 (begin_stmt_tree): Change prototype.
2703 (finish_stmt_tree): Likewise.
2704 (building_stmt_tree): Simplify.
2705 * decl.c (mark_stmt_tree): New function.
2706 (mark_saved_scope): Use it.
2707 (start_function): Rearrange slightly to call begin_stmt_tree
2708 earlier.
2709 (save_function_data): Tweak.
2710 (finish_function): Adjust call to finish_stmt_tree.
2711 (mark_lang_function): Use mark_stmt_tree.
2712 * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
2713 * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
2714 (build_vec_init): Remove creation of stand-in intializer.
2715 * pt.c (begin_tree): Remove.
2716 (end_tree): Likewise.
2717 * semantics.c (SET_LAST_STMT): New macro. Use it throughout.
2718 (begin_compound_stmt): Handle a compound-statement outside of a
2719 function.
2720 (begin_stmt_expr): Handle a statement-expression outsidef of a
2721 function.
2722 (finish_stmt_expr): Likewise.
2723 (begin_class_definition): Don't call begin_tree.
2724 (finish_inline_definitions): Don't call end_tree.
2725 (begin_stmt_tree): Take a pointer to tree, not a function as input.
2726 (finish_stmt_tree): Likewise.
2727 * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
2728 (mapcar): Likewise.
2729
2730 * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
2731 * parse.c: Regenerated.
2732
2733 * dump.c (dqueue_and_dump): Dump bitfieldness.
2734
2735 * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
2736 bitfields, rather than DECL_BIT_FIELD.
2737 * ir.texi: Document how to tell whether or not a field is a
2738 bitfield.
2739
2740 * lex.c (make_lang_type): Fix typo in comment.
2741
2742 1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
2743
2744 * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
2745
2746 1999-10-01 Mark Mitchell <mark@codesourcery.com>
2747
2748 * pt.c (tsubst_decl): If the type of a template instantiation is
2749 bogus, so is the whole instantiation.
2750
2751 1999-09-30 Mark Mitchell <mark@codesourcery.com>
2752
2753 * decl.c (initialize_local_var): Handle static variables here.
2754 (cp_finish_decl): Tweak handling of function-scope static
2755 variables.
2756 * semantics.c (expand_stmt): Handle DECL_STMTs for static
2757 variables.
2758
2759 * method.c (emit_thunk): Don't crash when -fsyntax-only.
2760
2761 * cp-tree.h (lang_decl_flags): Add global_ctor_p and
2762 global_dtor_p. Add init_priority.
2763 (DECL_ACCESS): Adjust accordingly.
2764 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
2765 (GLOBAL_INIT_PRIORITY): Likewise.
2766 * decl.c (lang_mark_tree): Adjust accordingly.
2767 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
2768 and GLOBAL_INIT_PRIORITY.
2769 * dump.c (dequeue_and_dump): Print them.
2770 * ir.texi: Document them.
2771
2772 * decl2.c (struct priority_info_s): Remove initialization_sequence
2773 and destruction_sequence.
2774 (start_static_storage_duration_function): Return the body of the
2775 function. Convert for function-at-a-time mode.
2776 (generate_inits_for_priority): Remove.
2777 (finish_static_storage_duration_function): Change prototype.
2778 Adjust for function-at-a-time mode.
2779 (do_static_initialization): Likewise.
2780 (do_static_destruction): Likewise.
2781 (do_static_initialization_and_destruction): Remove.
2782 (start_static_initialization_or_destruction): New function.
2783 (finish_static_initialization_or_destruction): Likewise.
2784 (get_priority_info): Don't manipulation initialization_sequence or
2785 destruction_sequence.
2786 (prune_vars_needing_no_initialization): New function.
2787 (write_out_vars): Likewise.
2788 (finish_file): Use the various new functions instead of the old.
2789
2790 Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
2791
2792 * cp-tree.h (warn_float_equal): Declare.
2793 * decl2.c (warn_float_equal): Define.
2794 (lang_decode_option): Recognize -W[no-]float-equal.
2795 * typeck.c (build_binary_op_nodefault): Conditionally warn
2796 about equality tests of floating point types.
2797
2798 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
2799
2800 Support normal type_info-based EH mechanisms with -fno-rtti.
2801 * except.c (build_eh_type_type): Remove special -fno-rtti handling.
2802 (build_eh_type_type_ref): Likewise.
2803 (build_eh_type): Remove.
2804 (expand_throw): Call build_eh_type_type, not build_eh_type.
2805 * decl2.c (import_export_decl): Don't associate the tinfo fn with
2806 the vtable if -fno-rtti.
2807 * decl.c (init_decl_processing): Always init_rtti_processing.
2808
2809 * rtti.c (get_typeid): Don't complain about -fno-rtti.
2810
2811 * class.c (class_cache_obstack, class_obstack): Remove.
2812 (init_class_processing): Don't initialize class_obstack.
2813 (push_cache_obstack): Remove.
2814 (pushclass): Don't call it.
2815 * cp-tree.h: Remove prototype for push_cache_obstack.
2816 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
2817 (pushlevel_class): Don't push_decl_level.
2818 (poplevel_class): Don't pop_stack_level.
2819 (push_class_level_binding): Don't push_cache_obstack.
2820 (init_decl_processing): Don't intialize decl_obstack.
2821 * search.c (push_class_decls): Don't push_cache_obstack.
2822 * tree.c (list_hash_add): Put hash node on permanent_obstack.
2823 (hash_tree_cons): Don't mess with obstacks.
2824 (print_lang_statistics): Don't print stats for class_obstack and
2825 decl_obstack.
2826
2827 1999-09-29 Mark Mitchell <mark@codesourcery.com>
2828
2829 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
2830 * ir.texi: Document DECL_EXTERNAL.
2831
2832 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
2833 * ir.texi: Document THUNK_DECLs.
2834
2835 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
2836 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
2837 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
2838 * error.c (dump_template_bindings): Remove unused parameter.
2839 Handle multiple levels of template parameters.
2840 (dump_template_decl): Use `parms', not `args', for template
2841 parameters. Fix thinko.
2842 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
2843 flags to dump_template_bindings.
2844 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
2845 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
2846 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
2847 (tsubst_copy): Clarify variable name.
2848 (most_general_template): Robustify.
2849
2850 1999-09-29 Nathan Sidwell <nathan@acm.org>
2851
2852 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
2853 to change primary template rendering.
2854
2855 1999-09-29 Mark Mitchell <mark@codesourcery.com>
2856
2857 * cp-tree.h (UPT_TEMPLATE): Remove.
2858 (UPT_PARMS): Likewise.
2859 (DECL_NEEDED_P): New macro.
2860 * decl2.c (finish_vtable_vardecl): Use it.
2861 (finish_objects): Don't crash with -fsyntax-only.
2862 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
2863 -fsyntax-only.
2864 * pt.c (tsubst_friend_function): Remove FIXME that talks about
2865 obstacks.
2866 (tsubst_expr): Correct handling of function try-blocks.
2867 * semantics.c: Include flags.h.
2868 (expand_body): Don't do RTL generation if -fsyntax-only.
2869 * Makefile.in (semantics.o): Depends on flags.h.
2870
2871 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
2872
2873 * pt.c (most_general_template): Adjust declaration.
2874
2875 * cp-tree.h: (most_general_template): Declare.
2876
2877 * error.c (dump_template_value): Rename to ...
2878 (dump_template_argument): This.
2879 (dump_template_argument_list): New function.
2880 (dump_type): Use it.
2881 (dump_template_parameter): New function.
2882 (dump_template_decl): Use it.
2883 (dump_template_bindings): New function.
2884 (dump_function_decl): Use it. Pretty print function template
2885 instantiations.
2886
2887 1999-09-28 Nathan Sidwell <nathan@acm.org>
2888
2889 * decl.c (grokdeclarator): Distinguish parameter context for
2890 diagnostics. Tidy up missing type diagnostic.
2891 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
2892
2893 1999-09-28 Mark Mitchell <mark@codesourcery.com>
2894
2895 * ir.texi: Improve documentation for TARGET_EXPR.
2896
2897 1999-09-27 Nathan Sidwell <nathan@acm.org>
2898
2899 Augment stringification of trees.
2900 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
2901 (fndecl_as_string, type_as_string_real, args_as_string,
2902 code_as_string, language_as_string, parm_as_string,
2903 op_as_string, assop_as_string, cv_as_string): Remove.
2904 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
2905 (context_as_string): Declare new function.
2906 * error.c (cp_printers): Move definition.
2907 (OB_UNPUT): Remove.
2908 (OB_END_TEMPLATE_ID): Adjust.
2909 (interesting_scope_p): Remove.
2910 (dump_scope): New static function.
2911 (dump_qualifiers): Adjust prototype, reimplement.
2912 (dump_template_value): Use tree_string_flags.
2913 (dump_type_real): Move back to dump_type.
2914 (dump_type): Adjust prototype. Use tree_string_flags.
2915 (dump_aggr_type): Likewise. Use dump_template_parms.
2916 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
2917 Return pad flag.
2918 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
2919 (dump_simple_decl): Likewise.
2920 (dump_decl): Likewise. Use dump_template_decl.
2921 (dump_template_decl): New static function broken out of dump_decl.
2922 (dump_function_decl): Adjust prototype. Use tree_string_flags.
2923 (dump_parameters): Likewise. Prefix space.
2924 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
2925 (dump_function_name): Likewise. Use dump_template_parms.
2926 (dump_template_parms): New static function broken out of
2927 dump_function_name.
2928 (dump_expr_list): Adjust prototype. Use tree_string_flags.
2929 (dump_expr): Likewise.
2930 (fndecl_as_string): Removed
2931 (type_as_string_real): Removed
2932 (dump_binary_op): Adjust prototype. Use tree_string_flags.
2933 (dump_unary_op): Likewise.
2934 (type_as_string): Likewise.
2935 (expr_as_string): Likewise.
2936 (decl_as_string): Likewise.
2937 (context_as_string): New function.
2938 (lang_decl_name): Adjust.
2939 (decl_to_string): New static print callback.
2940 (expr_to_string): Likewise.
2941 (fndecl_to_string): Likewise.
2942 (code_as_string): Renamed to ...
2943 (code_to_string): ... here. Adjust.
2944 (language_as_string): Renamed to ...
2945 (language_to_string): ... here. Adjust.
2946 (parm_as_string): Renamed to ...
2947 (parm_to_string): ... here.
2948 (op_as_string): Renamed to ...
2949 (op_to_string): ... here.
2950 (assop_as_string): Renamed to ...
2951 (assop_to_string): ... here.
2952 (type_to_string): New static print callback.
2953 (args_as_string): Renamed to ...
2954 (args_to_string): ... here. Adjust.
2955 (cv_as_string): Renamed to ...
2956 (cv_to_string): ... here. Adjust.
2957 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
2958 (print_template_context): Likewise.
2959
2960 1999-09-26 Mark Mitchell <mark@codesourcery.com>
2961
2962 * cp-tree.h (expand_throw): Remove prototype.
2963 * except.c (expand_throw): Make it static. Use tree-generation
2964 functions, rather than RTL-generation functions.
2965 (build_throw): Use it.
2966 * expr.c: Include except.h.
2967 (cplus_expand_expr): Don't call expand_throw here.
2968 * Makefile.in (expr.o): Depend on except.h.
2969 * ir.texi: Update documentation for THROW_EXPR.
2970
2971 * decl.c (start_function): Set x_dont_save_pending_sizes rather
2972 than calling get_pending_sizes.
2973 * init.c (build_new): Don't save and restore
2974 immediate_size_expand; instead, assert that it has the expected
2975 value already.
2976
2977 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2978
2979 * lex.c (compiler_error): Add missing call to va_end().
2980
2981 1999-09-25 Mark Mitchell <mark@codesourcery.com>
2982
2983 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
2984 * ir.texi: Document RESULT_DECL and DECL_RESULT.
2985
2986 * cp-tree.h (check_return_expr): New function.
2987 * decl.c (finish_constructor_body): New function.
2988 (pushdecl): Put global friend functions in namespace binding
2989 level, not the class binding level.
2990 (finish_destructor_body): Make sure the dtor_label is always
2991 defined. Fix typo in comment.
2992 (finish_function): Move generation of constructor-termination code
2993 to semantic-analysis time. Move generation of implicit `main'
2994 return value to semantic-analysis time.
2995 * semantics.c (finish_return_stmt): Generate goto's to
2996 ctor_label/dtor_label here. Use check_return_expr to do semantic
2997 analysis on the returned expression.
2998 * typeck.c (maybe_warn_about_returning_address_of_local): New
2999 function split out from c_expand_return.
3000 (check_return_expr): Likewise.
3001 (c_expand_return): Just generate the RTL for the return.
3002
3003 1999-09-24 Mark Mitchell <mark@codesourcery.com>
3004
3005 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
3006 (cleanup_type): Likewise.
3007 (search_tree): Change prototype.
3008 * decl.c (local_variable_p): Adjust for new interface to
3009 search_tree.
3010 (check_default_argument): Likewise.
3011 * error.c (dump_expr): Handle INIT_EXPR.
3012 * except.c (expand_throw): Don't make cleanup_type a local static.
3013 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
3014 * init.c (build_new): Call build_new_1 directly, rather than
3015 building a NEW_EXPR.
3016 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
3017 processing file-scope initializers.
3018 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
3019 * tree.c: Include splay-tree.h
3020 (no_linkage_helper): Adjust for new interface to search_tree.
3021 (search_tree): Pass around pointers to tree nodes, rather than the
3022 nodes themselves. Handle VEC_INIT_EXPR.
3023 (no_linkage_check): Adjust for new interface to search_tree.
3024 (mapcar): Handle VEC_INIT_EXPR.
3025 (target_remap): New variable.
3026 (bot_manip): Use it.
3027 (bot_replace): New function.
3028 (break_out_target_exprs): Use it to remap all variables used in a
3029 default argument expression.
3030 * typeck.c (build_modify_expr): Don't crash when outside a
3031 function and presented with an INIT_EXPR assignment
3032 * Makefile.in (tree.o): Depend on splay-tree.h.
3033
3034 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
3035
3036 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
3037 DECL_BUILT_IN.
3038 (builtin_function): New arg CLASS. Arg CODE now of type int. All
3039 callers changed.
3040 Set the builtin's DECL_BUILT_IN_CLASS.
3041
3042 1999-09-24 Mark Mitchell <mark@codesourcery.com>
3043
3044 * decl.c (pushdecl): Don't make local declarations of extern
3045 variables give the variable a DECL_CONTEXT for the function.
3046 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
3047 Don't accidentally make RTL for local declarations.
3048 (emit_local_var): Handle declarations with asm-specifiers here.
3049
3050 1999-09-23 Mark Mitchell <mark@codesourcery.com>
3051
3052 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
3053 STMT_IS_FULL_EXPR_P.
3054
3055 * cp-tree.h (language_function): Add cannot_inline.
3056 * decl.c (start_function): Restore current_function_cannot_inline
3057 from the saved value.
3058 (save_function_data): Save current_function_cannot_inline.
3059 * decl2.c (start_objects): Change prototype. Build the function
3060 in function-at-a-time mode.
3061 (finish_objects): Likewise.
3062 (generate_ctor_or_dtor_function): Adjust accordingly.
3063
3064 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
3065 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
3066 Don't call expand_anon_union_decl here
3067 * semantics.c (exapnd_stmt): Call it here, instead.
3068 * typeck.c (mark_addressable): Addressed variables are implicitly
3069 used.
3070
3071 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3072
3073 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
3074 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
3075 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
3076 * cp-tree.h: Add tree checking macros to various tree access
3077 macros.
3078 * ptree.c (print_lang_decl): Test for function or variable
3079 before accessing template info.
3080
3081 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
3082
3083 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
3084 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
3085 * decl2.c (lang_f_options): Add -fshort-wchar.
3086 * cp-tree.h: Declare flag_short_wchar.
3087 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
3088 int' for wchar_t.
3089
3090 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3091
3092 * ir.texi: Fix formatting errors and typos.
3093
3094 1999-09-22 Mark Mitchell <mark@codesourcery.com>
3095
3096 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
3097
3098 * decl.c (pushdecl): Do create a binding for extern "C" functions,
3099 but not for their DECL_ASSEMBLER_NAMEs.
3100 (lookup_name_current_level): Fix formatting.
3101 (xref_tag): Likewise.
3102 * decl2.c (start_objects): Mark static constructors and
3103 destructors as used.
3104
3105 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
3106
3107 * decl.c (define_case_label): Don't crash if we're not in a switch.
3108
3109 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
3110 * lang-options.h: Restore -fthis-is-variable. Remove help strings
3111 for unsupported flags.
3112
3113 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
3114
3115 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
3116 Accept and warn about -fthis-is-variable.
3117
3118 1999-09-21 Mark Mitchell <mark@codesourcery.com>
3119
3120 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
3121 CLEANUP_STMT, and SCOPE_STMT.
3122
3123 * decl2.c (lang_decode_option): Adjust, in the wake of recent
3124 changes to option processing.
3125
3126 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3127
3128 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
3129 function pointer from pmfs with no object given.
3130 (convert_for_assignment): Do not return error when converting
3131 pmfs.
3132
3133 1999-09-21 Alex Samuel <samuel@codesourcery.com>
3134
3135 * lex.c (internal_filename): New variable.
3136 (INTERNAL_FILENAME): New macro.
3137 (init_parse): Allocate internal_filename and mark as root. Use it
3138 instead of a string constant.
3139
3140 1999-09-21 Nathan Sidwell <nathan@acm.org>
3141
3142 Reimplement dynamic cast and catch matching.
3143 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
3144 * search.c (dynamic_cast_base_recurse): New function.
3145 (get_dynamic_cast_base_type): New function for dynamic cast.
3146 * rtti.c (build_dynamic_cast_1): Determine source and target
3147 class relationship. Call __dynamic_cast_2.
3148 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
3149 (__user_type_info::dyncast): New dynamic cast dispatcher.
3150 (__user_type_info::sub_kind): New nested enumeration.
3151 (__user_type_info::contained_p): sub_kind predicate.
3152 (__user_type_info::contained_public_p): Likewise.
3153 (__user_type_info::contained_nonpublic_p): Likewise.
3154 (__user_type_info::contained_nonvirtual_p: Likewise.
3155 (__user_type_info::upcast_result): New nested struct.
3156 (__user_type_info::dyncast_result): New nested struct.
3157 (*::do_upcast): New catch function.
3158 (*::do_dyncast): New dynamic cast function.
3159 (__user_type_info::find_public_subobj): New dynamic cast
3160 helper dispatcher.
3161 (*::do_find_public_subobj): New dynamic cast helper function.
3162 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
3163 (__user_type_info::dyncast): Define dynamic cast dispatcher.
3164 (*::do_upcast): Define catch function.
3165 (*::do_dyncast): Define dynamic cast function.
3166 (*::do_find_public_subobj): Define dynamic cast helper function.
3167 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
3168 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
3169 (__dynamic_cast_2): New dynamic cast runtime.
3170
3171 1999-09-20 Mark Mitchell <mark@codesourcery.com>
3172
3173 * cp-tree.h (finish_stmt_expr): Change prototype.
3174 * expr.c (cplus_expand_expr): Adjust call accordingly.
3175 * init.c (finish_init_stmts): Likewise.
3176 * parse.y (primary): Likewise.
3177 * pt.c (tsubst_copy): Likewise.
3178 * semantics.c (finish_stmt_expr): Don't take two parameters.
3179 Don't remove generated BLOCKs from the block-tree.
3180
3181 Remove support for assigning to `this'.
3182 * NEWS: Note that fact.
3183 * class.c (build_vbase_path): Don't check flag_this_is_variable.
3184 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
3185 (language_function): Remove assigns_this, just_assigned_this, and
3186 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
3187 (base_init_expr): Remove.
3188 (current_vcalls_possible_p): New macro.
3189 (vtbls_set_up_p): Likewise.
3190 (emit_base_init): Change prototype.
3191 * decl.c (finish_destructor_body): New function, split out from
3192 finish_function.
3193 (current_function_assigns_this): Remove.
3194 (current_function_just_assigned_this): Likewise.
3195 (start_function): Don't set them.
3196 (finish_function): Don't check them. Don't emit
3197 base-initialization code here. Generate code for destructors when
3198 doing semantic analysis.
3199 (finish_stmt): Don't check current_function_just_assigned_this.
3200 * decl2.c (lang_f_options): Remove this-is-variable.
3201 (lang_decode_option): Likewise.
3202 (grokclassfn): Don't check flag_this_is_variable.
3203 * init.c (emit_base_init): Return the expression generated.
3204 (construct_virtual_bases): Don't push/pop obstacks. Fix
3205 typo.
3206 (build_new_1): Don't check flag_this_is_variable.
3207 (get_temp_regvar): Don't set DECL_REGISTER.
3208 (build_vec_init): Don't call use_variable.
3209 * lang-options.h: Remove "-fthis-is-variable" and
3210 "-fno-this-is-variable".
3211 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
3212 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
3213 expand_expr_stmt.
3214 * semantics.c (finish_expr_stmt_real): Rename to ...
3215 (finish_expr_stmt): This. Remove assigned_this parameter.
3216 (begin_if_stmt): Call do_pushlevel before starting the statement.
3217 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
3218 blocks.
3219 (setup_vtbl_ptr): Emit initialization code for bases and members
3220 at semantic-analysis time. Emit code to initialize vtables in
3221 destructors here.
3222 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
3223 Don't handle CTOR_INITIALIZER any more.
3224 * typeck.c (build_modify_expr): Don't check for assignments to
3225 this.
3226 (c_expand_return): Don't suggest assigning to `this'.
3227
3228 * Makefile.in (decl.o): Depend on RTL_H.
3229 (decl2.o): Likewise.
3230 (class.o): Likewise.
3231 (call.o): Likewise.
3232 (method.o): Likewise.
3233 (search.o): Likewise.
3234 (tree.o): Likewise.
3235 (pt.o): Likewise.
3236
3237 * decl.c (duplicate_decls): When a builtin function is redeclared
3238 as static, make sure it is mangled correctly.
3239
3240 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
3241 detail about the statement-tree.
3242
3243 1999-09-20 Nathan Sidwell <nathan@acm.org>
3244
3245 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
3246
3247 1999-09-20 Nick Clifton <nickc@cygnus.com>
3248
3249 * decl2.c (lang_decode_option): Extend comment.
3250
3251 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
3252
3253 * typeck.c: Include "tm_p.h".
3254
3255 1999-09-19 Mark Mitchell <mark@codesourcery.com>
3256
3257 * ir.texi: New file.
3258
3259 1999-09-19 Paul Burchard <burchard@pobox.com>
3260
3261 * semantics.c (expand_stmt): Initialize return value.
3262
3263 1999-09-18 Paul Burchard <burchard@pobox.com>
3264
3265 * gxxint.texi: G++ now implements namespaces.
3266
3267 1999-09-18 Mark Mitchell <mark@codesourcery.com>
3268
3269 * decl.c (pop_label): Don't warn about unused labels more than
3270 once.
3271 * semantics.c (finish_goto_stmt): Always marked used labels as
3272 used.
3273
3274 * decl.c (layout_var_decl): Change prototype. Call layout_decl
3275 even when the declaration is external.
3276 (cp_finish_decl): Adjust call to layout_var_decl.
3277 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
3278
3279 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
3280
3281 * typeck.c (get_member_function_from_ptrfunc): Always consider
3282 virtuality inside member pointer.
3283
3284 1999-09-17 Mark Mitchell <mark@codesourcery.com>
3285
3286 Turn on function-at-a-time processing.
3287 * cp-tree.h (doing_semantic_analysis_p): New macro.
3288 (SF_DEFAULT): Define to zero, not SF_EXPAND.
3289 (start_handler_parms): Change prototype.
3290 (expand_start_catch_block): Likewise.
3291 (expand_end_catch_block): Likewise.
3292 (expand_start_eh_spec): Likewise.
3293 (expand_end_eh_spec): Declare.
3294 (finish_handler_parms): Change prototype.
3295 (begin_catch_block): Declare.
3296 (finish_handler): Change prototype.
3297 (do_pushlevel): Declare.
3298 (do_poplevel): Likewise.
3299 * decl.c (pushlevel): Don't create
3300 binding levels when not doing semantic analysis.
3301 (poplevel): Don't pop them.
3302 (pushdecl): Assert that we are never called when not doing
3303 semantic analysis.
3304 (pushdecl_top_level): Use push_to_top_level.
3305 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
3306 label when expanding.
3307 (cp_finish_decl): Only inject for-scope variables when doing
3308 semantic analysis. Add comments.
3309 (start_handler_parms): Return the handler parm.
3310 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
3311 already set. Reinitialize from saved function data if available.
3312 Don't pushlevel when not doing semantic analysis.
3313 (store_parm_decls): Only generate RTL when expanding. Only
3314 pushdecl when doing semantic analysis. Set
3315 current_eh_spec_try_block if appropriate.
3316 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
3317 Combine common code. Don't poplevel when not doing semantic
3318 analysis.
3319 (push_cp_function_context): Don't expand functions without an
3320 explicit call to expand_body.
3321 (mark_lang_function): Make eh_spec_try_block and
3322 x_scope_stmt_stack.
3323 * except.c (expand_end_eh_spec): Don't
3324 declare.
3325 (process_start_catch_block): Likewise.
3326 (push_eh_cleanup): Use finish_decl_cleanup.
3327 (initialize_handler_parm): New function.
3328 (expand_start_catch_block): Use it.
3329 (expand_end_catch_block): Use tree-generation functions, not
3330 RTL-generation functions.
3331 (expand_start_eh_spec): Likewise.
3332 (expand_end_eh_spec): Likewise.
3333 (expand_exception_blocks): Simplify.
3334 (start_anon_func): Use do_pushlevel.
3335 (end_anon_func): Use do_poplvel. Call expand_body for the
3336 function.
3337 * expr.c (do_case): Don't call define_case_label.
3338 * init.c (create_temporary_var): Set DECL_CONTEXT for local
3339 variables.
3340 * method.c (emit_thunk): Call expand_body for the
3341 thunk.
3342 (sythesize_method): Likewise.
3343 * parse.y (handler_args): Give it ttype.
3344 (eat_saved_input): Call expand_body.
3345 (base_init): Use do_pushlevel.
3346 (pending_inline): Call expand_body.
3347 (handler): Adjust calls to finish_handler_parms and
3348 finish_handler.
3349 (handler_args): Don't call expand_start_catch_block. Return the
3350 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
3351 * parse.c: Regenerated.
3352 * rtti.c (synthesize_tinfo_fn): Call finish_function.
3353 * semantics.c (do_pushlevel): Give it external linkage. Build
3354 SCOPE_STMTs.
3355 (do_poplevel): Likewise.
3356 (finish_case_label): Call define_case_label when doing semantic
3357 analysis.
3358 (finish_goto_stmt): Create RTL for labels.
3359 (finish_function_try_block): Set in_function_try_handler
3360 unconditionally.
3361 (finish_function_handler_sequence): Unset it.
3362 (finish_handler_parms): Use expand_start_catch_block even when
3363 building a statement-tree.
3364 (begin_catch_block): New function.
3365 (finish_handler): Move a little RTL-generation logic here.
3366 (finish_decl_cleanup): Allow cleanups for empty declarations.
3367 (finish_named_return_value): Don't pushdecl when not doing
3368 semantic analysis.
3369 (expand_stmt): Don't do semantic analysis for variable
3370 declarations. Handle START_CATCH_STMT. Call expand_label
3371 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
3372 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
3373 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
3374 RETURN_INIT and function try blocks.
3375
3376 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
3377 x_scope_stmt_stack. Add x_in_charge_parm.
3378 (current_eh_spec_try_block): New macro.
3379 (current_scope_stmt_stack): Likewise.
3380 (current_in_charge_parm): Likewise.
3381 * decl.c (start_function): Initialize current_in_charge_parm.
3382 (finish_function): Use current_in_charge_parm rather than looking
3383 up __in_chrg.
3384 * search.c (expand_indirect_vtbls_init): Likewise.
3385
3386 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
3387 (TRY_BLOCK): Likewise.
3388 (HANDLER): Likewise.
3389 (START_CATCH_STMT): New tree node.
3390 (SCOPE_STMT): Likewise.
3391 * cp-tree.h (SCOPE_BEGIN_P): New macro.
3392 (SCOPE_NULLIFIED_P): Likewise.
3393 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
3394 (struct lang_decl): Add saved_language_function.
3395 (DECL_PENDING_INLINE_INFO): Adjust documentation.
3396 (DECL_PENDING_INLINE_P): New macro.
3397 (TYPE_TI_ARGS): Fix typo in comment.
3398 (DECL_SAVED_TREE): Add to documentation.
3399 (DECL_SAVED_FUNCTION_DATA): New macro.
3400 (START_CATCH_TYPE): Likewise.
3401 (SCOPE_END_P): New macro.
3402 (declare_parm_level): Don't declare.
3403 * decl.c (mark_lang_function): New function, split out from
3404 mark_cp_function_context.
3405 (save_function_data): New function.
3406 (declare_parm_level): Remove.
3407 (finish_function): Use save_function_data to squirrel away
3408 important stuff for later use.
3409 (mark_cp_function_context): Use mark_function_data.
3410 (lang_mark_tree): Likewise.
3411 * lex.c (begin_definition_of_inclass_inline): Set
3412 DECL_PENDING_INLINE_P.
3413 (store_pending_inline): Clear it.
3414 * pt.c (tsubst_decl): Likewise.
3415
3416 1999-09-17 Nathan Sidwell <nathan@acm.org>
3417
3418 * call.c (perform_implicit_conversion): Deal with error_mark_node.
3419
3420 1999-09-17 Mark Mitchell <mark@codesourcery.com>
3421
3422 * decl.c (warn_extern_redeclared_static): Don't get confused by
3423 static member functions.
3424 (duplicate_decls): Merge DECL_THIS_STATIC.
3425
3426 * decl.c (expand_static_init): Make sure assignments to local
3427 statics actually occur.
3428
3429 1999-09-17 Mark Mitchell <mark@codesourcery.com>
3430
3431 * cp-tree.h (poplevel_class): Declare.
3432 * class.c (popclass): Use poplevel_class, not poplevel.
3433 * decl.c (poplevel_class): Don't make it static. Don't return a
3434 value.
3435 (poplevel): Don't call poplevel_class; abort in a class
3436 binding level is seen.
3437 * semantics.c (finish_translation_unit): Use pop_everything.
3438 * parse.y (member_init): Allow errors.
3439 (pending_inline): Call finish_function.
3440 * parse.c: Regenerated.
3441 * Makefile.in (CONFLICTS): Adjust.
3442
3443 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
3444
3445 * error.c: Reduce code duplication.
3446 (dump_template_value): New function.
3447 (dump_type_real): Use it.
3448 (dump_decl): Likewise.
3449 (dump_function_name): Likewise.
3450 (dump_function_decl): Don't be too talkative about function return
3451 type variety.
3452
3453 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3454
3455 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
3456
3457 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
3458
3459 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
3460
3461 * decl2.c (finish_file): Also call check_global_declarations for
3462 the pending_statics list.
3463
3464 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
3465
3466 * lex.c (cp_pragma_implementation): Allow #pragma implementation
3467 in header files.
3468
3469 1999-09-15 Richard Henderson <rth@cygnus.com>
3470
3471 * lex.c (mark_impl_file_chain): Follow the next chain.
3472
3473 1999-09-15 Mark Mitchell <mark@codesourcery.com>
3474
3475 * decl.c (warn_extern_redeclared_static): Simplify. Catch
3476 problems with extern "C" functions redeclared as static.
3477 (duplicate_decls): When a builtin is redeclared static, make the
3478 new function have internal linkage.
3479
3480 1999-09-15 Mark Mitchell <mark@codesourcery.com>
3481
3482 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
3483 * pt.c (tsubst_copy): Likewise.
3484 * tree.c (search_tree): Likewise.
3485 (mapcar): Likewise.
3486
3487 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3488
3489 * typeck2.c (ack): Don't declare progname.
3490
3491 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
3492
3493 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
3494 filenames with ggc_alloc_string.
3495
3496 1999-09-14 Mark Mitchell <mark@codesourcery.com>
3497
3498 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
3499 TARGET_EXPR.
3500 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
3501 the TARGET_EXPR.
3502 * cvt.c (build_up_reference): Likewise.
3503 * tree.c (build_cplus_new): Likewise.
3504 (get_target_expr): Likewise.
3505
3506 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
3507
3508 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
3509
3510 1999-09-13 Mark Mitchell <mark@codesourcery.com>
3511
3512 * cp-tree.h (build_target_expr): New function.
3513 * call.c (build_conditional_expr): Use build_target_expr.
3514 (convert_like): Likewise.
3515 (build_over_call): Likewise.
3516 * cvt.c (build_up_reference): Likewise.
3517 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
3518 (destroy_local_var): Here.
3519 (build_target_expr): New function.
3520 * tree.c (build_cplus_new): Use it.
3521 (get_target_expr): Likewise.
3522
3523 1999-09-13 Nathan Sidwell <nathan@acm.org>
3524
3525 * typeck.c (expr_sizeof): Don't decay arrays and functions.
3526 Remove misleading comment.
3527 (build_compound_expr): Don't decay arrays.
3528
3529 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
3530
3531 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
3532 class rvalues again.
3533
3534 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3535
3536 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
3537
3538 * g++spec.c: Include gcc.h.
3539 (lang_specific_driver): Constify a char*. Call xcalloc, not
3540 xmalloc/bzero. All calls to the function pointer parameter now
3541 explicitly call `fatal'.
3542
3543 1999-09-12 Mark Mitchell <mark@codesourcery.com>
3544
3545 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
3546 * cvt.c (ocp_convert): Complete the from and destination types.
3547 Adjust warning about functions always being `true' in conditionals.
3548 * decl.c (duplicate_decls): Don't play funny games with abort.
3549 * error.c (dump_expr): Handle OVERLOADs.
3550 * spew.c (probe_obstack): Remove.
3551 * typeck.c (condition_conversion): Use perform_implicit_conversion.
3552
3553 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
3554
3555 * cp-tree.h (auto_function, define_function): Adjust prototypes.
3556 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
3557 changed.
3558 (auto_function): Likewise, for CODE arg.
3559 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
3560 (builtin_function): ... here.
3561
3562 1999-09-11 Mark Mitchell <mark@codesourcery.com>
3563
3564 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
3565 (init_decl_processing): Don't set TREE_PERMANENT for the
3566 error_mark_node.
3567 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
3568 (grokdeclarator): Likewise.
3569 (grokparms): Don't check TREE_PERMANENT when building up lists.
3570 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
3571 (mark_inline_for_output): Likewise.
3572 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
3573 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
3574 * lex.c (check_newline): Don't check ggc_p; it is always one.
3575 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
3576 * spew.c (yylex): Don't copy_node or probe_obstacks for
3577 non-permanent CONSTANTs and STRINGs.
3578 * tree.c (build_cplus_array_type_1): Don't fuss with
3579 TREE_PERMANENT on ARRAY_TYPEs.
3580
3581 * cp-tree.def (CLEANUP_STMT): New node.
3582 * cp-tree.h (language_function): Add name_declared.
3583 (current_function_name_declared): New macro.
3584 (CLEANUP_DECL): New macro.
3585 (CLEANUP_EXPR): Likewise.
3586 (emit_local_var): Likewise.
3587 (finish_decl_cleanup): New function.
3588 * cvt.c (build_up_reference): Simplify.
3589 (ocp_convert): Remove dead code.
3590 * decl.c (start_decl): Remove call to add_decl_stmt.
3591 (grok_reference_init): Adjust, to handle bindings temporaries to
3592 references. Remove dead code.
3593 (initialize_local_var): Don't generate RTL for
3594 declarations here, or build cleanups here. Don't fuss with
3595 obstacks. Replace expand_start_target_temps calls with explicit
3596 setting of stms_are_full_exprs_p.
3597 (destroy_local_var): New function.
3598 (emit_local_var): Likewise.
3599 (cp_finish_decl): Use them, as appropriate.
3600 (start_function): Announce template functions.
3601 (store_parm_decls): Don't call declare_function_name here.
3602 (finish_stmt): Don't start emit base-initialization code when just
3603 building the statement-tree.
3604 * init.c (create_temporary_var): Move add_decl_stmt call ...
3605 (get_temp_regvar): Here.
3606 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
3607 cp_finish_decl would expect. Don't call add_decl_stmt.
3608 * semantics.c (begin_compound_stmt): Call declare_function_name,
3609 if appropriate.
3610 (finish_decl_cleanup): New function.
3611 (expand_stmt): Use emit_local_var to output variables.
3612 (expand_body): Set current_funtion_name_declared.
3613
3614 1999-09-10 Mark Mitchell <mark@codesourcery.com>
3615
3616 * cp-tree.h (finish_cleanup_try_block): New function.
3617 * semantics.c (finish_cleanup_try_block): Add comment.
3618
3619 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
3620
3621 * cp-tree.h: Delete declarations for all tree nodes now moved to
3622 global_trees.
3623 * decl.c: Delete their definitions.
3624 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
3625 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
3626 provide defaults.
3627 (init_decl_processing): Call build_common_tree_nodes and
3628 build_common_tree_nodes_2 instead of building their nodes here.
3629 Don't add gc roots for them.
3630
3631 1999-09-10 Mark Mitchell <mark@codesourcery.com>
3632
3633 * cp-tree.h (language_function): Rename expanding_p to
3634 x_expanding_p. Rename named_label_uses to x_named_label_uses.
3635 (expanding_p): Adjust accordingly.
3636 (TREE_VIA_PRIVATE): Fix typo in comment.
3637 (DECL_REFERENCE_SLOT): Remove.
3638 (SET_DECL_REFERENCE_SLOT): Likewise.
3639 * decl.c (named_label_uses): Adjust. Remove chicken comment.
3640 (push_overloaded_decl): Don't truncate the chain of bindings when
3641 adding an overloaded function.
3642 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
3643 (initialize_local_var): Fix typo in comment.
3644 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
3645 * decl2.c (start_objects): Make the fact that we are expanding
3646 the generated function right away explicit.
3647 (start_static_storage_duration_function): Likewise.
3648 (finish_file): Fix typo in comment.
3649 * init.c (build_vec_init): Correct bugs in handling cleanups.
3650 * semantics.c (maybe_convert_cond): New function.
3651 (FINISH_COND): Always store the condition, even if there's
3652 a declaration.
3653 (finish_if_stmt_cond): Use maybe_convert_cond.
3654 (finish_while_stmt_cond): Likewise.
3655 (finish_do_stmt): Likewise.
3656 (finish_for_cond): Likewise.
3657 (expand_cond): Adjust.
3658
3659 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
3660 * init.c (perform_member_init): Remove obstack machinations.
3661 (expand_cleanup_for_base): Likewise.
3662 (finish_init_stmts): Mark the statement-expression as used.
3663 * method.c (emit_thunk): Use tree-generating functions, not
3664 RTL.
3665 (do_build_copy_constructor): Likewise.
3666 (do_build_assign_ref): Likewise.
3667 (synthesize_method): Likewise. Keep track of line numbers.
3668 * pt.c (tsubst_expr): Handle various kinds of try blocks.
3669 * semantics.c (expand_stmts): Remove.
3670 (begin_function_try_block): Set FN_TRY_BLOCK_P.
3671 (finish_function_try_block): Be careful rechaining
3672 function try blocks.
3673 (expand_stmt): Loop through all the statements at a given level.
3674 (exapnd_body): Be careful with line-numbers here too. Prepare for
3675 being called directly from the parser.
3676
3677 * cp-tree.h (finish_function): Adjust prototype.
3678 * decl.c (finish_function): Return the function compiled.
3679 * pt.c (instantiate_decl): Don't play games with obstacks.
3680 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
3681 (search_tree): Likewise.
3682 * typeck.c: Fix typo in comment.
3683 * typeck2.c (store_init_value): Add comment.
3684
3685 * cp-tree.h (CPTI_ATEXIT): New macro.
3686 (atexit_node): Likewise.
3687 * decl.c (destroy_local_static): New function, broken out from ...
3688 (expand_static_init): Here.
3689
3690 * rtti.c (get_tinfo_var): These should always be global
3691 (expand_si_desc): Use tree, not RTL, functions to generate code.
3692 (expand_class_desc): Likewise.
3693 (expand_ptr_desc): Likewise.
3694 (expand_attr_desc): Likewise.
3695 (expand_generic_desc): Likewise.
3696 (synthesize_tinfo_fn): Likewise.
3697
3698 1999-09-09 Mark Mitchell <mark@codesourcery.com>
3699
3700 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
3701 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
3702 RECHAIN_STMTS.
3703 (RECHAIN_STMST_FROM_CHAIN): Likewise.
3704
3705 * parse.y (simple_stmt): Fix typo in last change.
3706
3707 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
3708 (STMT_IS_FULL_EXPR_P): Likewise.
3709 (STMT_LINENO_FOR_FN_P): Likewise.
3710 (prep_stmt): New function.
3711 (building_stmt_tree): Tweak for safety.
3712 * pt.c (tsubst_expr): Use prep_stmt throughout.
3713 (add_tree): Move it to semantics.c
3714 * semantics.c (add_tree): Move it here.
3715 (finish_expr_stmt_real): New function.
3716 (finish_expr_stmt): Use it.
3717 (finish_if_stmt_cond): Use FINISH_COND.
3718 (finish_while_stmt_cond): Likewise.
3719 (finish_for_cond): Likewise.
3720 (finish_stmt_tree): Tweak line-number handling.
3721 (prep_stmt): New function.
3722 (expand_stmt): Use it.
3723
3724 * cp-tree.h (begin_switch_stmt): Adjust prototype.
3725 (finish_switch_cond): Likewise.
3726 * parse.y (simple_stmt): Adjust accordingly.
3727 * parse.c: Regenerated.
3728 * pt.c (tsubst_expr): Adjust accordingly.
3729 * semantics.c (expand_cond): New function.
3730 (FINISH_COND): New macro.
3731 (begin_switch_stmt): Build the SWITCH_STMT here.
3732 (finish_switch_stmt_cond): Not here.
3733 (expand_stmt): Adjust calls to begin_switch_stmt and
3734 finish_switch_cond. Use expand_cond throughout.
3735
3736 * dump.c (dequeue_and_dump): Dump types for constants.
3737 Describe DECL_ARG_TYPE more intuitively.
3738 Handle ARRAY_REF.
3739
3740 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
3741 (lang_cleanup_tree): Remove.
3742 * lex.c (make_lang_type): Use ggc_alloc to allocate
3743 TYPE_LANG_SPECIFIC.
3744
3745 Reorganize per-function data.
3746 * cp-tree.h (saved_scope): Add function_decl, bindings.
3747 (language_function): Rename binding_level to bindings.
3748 (cp_function_chain): Use the current_function, not the
3749 outer_function_chain.
3750 (current_class_ptr): Make it work, even when there's no
3751 current function.
3752 (current_class_ref): Likewise.
3753 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
3754 macros.
3755 (clear_temp_name): Remove.
3756 * decl.c (check_function_type): New function, broken out from
3757 start_function.
3758 (current_binding_level): Adjust definition.
3759 (pushlevel): Simplify.
3760 (poplevel): Don't use named_label_uses when we're outside
3761 a function scope.
3762 (mark_saved_scope): Mark function_decl and bindings.
3763 (maybe_push_to_top_level): Don't unconditionally push a new
3764 function context. Save bindings and the current_function_decl.
3765 Don't clear named_labels.
3766 (pop_from_top_level): Pop function context if appropriate.
3767 (init_decl_processing): Set init_lang_status and free_lang_status,
3768 rather than save_lang_status and restore_lang_status.
3769 (start_function): Take SF_* flags. Don't clear per-function data.
3770 Reorder and simplify to use new per-function data code. Add
3771 asserts.
3772 (store_parm_decls): Don't call init_function_start here.
3773 (finish_function): Adjust for new handling of per-function data.
3774 (push_cp_function_context): Simplify.
3775 (mark_cp_function_context): Change binding_level to bindings.
3776 * decl2.c (clear_temp_name): Remove.
3777 (start_objects): Use SF flags to start_function.
3778 (start_static_storage_duration_function): Likewise.
3779 * except.c (start_anon_func): Remove redundant calls to
3780 push_function_context_to. Use SF flags to start function.
3781 (end_anon_func): Remove redundant call to pop_function_context
3782 from.
3783 * lex.c (reinit_parse_for_function): Don't initialize per-function
3784 data.
3785 * method.c (emit_thunk): Clear current_function after calling
3786 assemble_end_function. Use SF flags for start_function.
3787 (synthesize_method): Use SF flags for start_function.
3788 * parse.c: Regenerated.
3789 * parse.y (fn.defpen): Likewise.
3790 (pending_inline): Clear current_function, even if something goes
3791 wrong.
3792 * pt.c (instantiate_decl): Use SF flags to start_function.
3793 Don't save and restore expanding_p.
3794 (add_tree): Handle the case where we are outside any function.
3795 (end_tree): Likewise.
3796 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
3797 * semantics.c (begin_function_definition): Likewise.
3798 (expand_body): Likewise.
3799
3800 1999-09-09 Nathan Sidwell <nathan@acm.org>
3801
3802 * cp-tree.h (convert_to_void): Prototype new function.
3803 (require_complete_type_in_void): Remove prototype.
3804 * cvt.c (convert_to_void): New function.
3805 (ocp_convert): Use convert_to_void.
3806 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
3807 expressions.
3808 * typeck.c (require_complete_type_in_void): Remove function.
3809 (build_compound_expr): Use convert_to_void.
3810 (build_static_cast): Likewise.
3811 (build_c_cast): Likewise.
3812 * semantics.c (finish_expr_stmt): Do not decay full expressions.
3813
3814 * typeck.c (build_x_compound_expr): Add FIXME.
3815
3816 1999-09-08 Mark Mitchell <mark@codesourcery.com>
3817
3818 * cp-tree.h (scratch_tree_cons): Remove.
3819 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
3820 and perm_tree_cons with plain tree_cons.
3821 * class.c: Likewise.
3822 * decl.c: Likewise.
3823 * decl2.c: Likewise.
3824 * except.c: Likewise.
3825 * expr.c: Likewise.
3826 * init.c: Likewise.
3827 * lex.c: Likewise.
3828 * method.c: Likewise.
3829 * parse.y: Likewise.
3830 * pt.c: Likewise.
3831 * repo.c: Likewise.
3832 * rtti.c: Likewise.
3833 * search.c: Likewise.
3834 * typeck.c: Likewise.
3835 * parse.c: Regenerated.
3836 * tree.c (build_srcloc): Simplify.
3837
3838 1999-09-08 Bruce Korb autogen@linuxbox.com
3839
3840 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
3841
3842 1999-09-08 Mark Mitchell <mark@codesourcery.com>
3843
3844 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
3845 Remove next.
3846 (LANG_DECL_PERMANENT): Remove.
3847 * decl.c (duplicate_decls): Don't mess about with obstacks trying
3848 to free memory.
3849 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
3850 * lex.c (free_lang_decl_chain): Remove.
3851 (build_lang_decl): Don't use obstacks.
3852 (retrofit_lang_decl): Likewise.
3853 (copy_lang_decl): Likewise.
3854
3855 * cp-tree.h (saved_scope): Remove old_binding_level and
3856 function_decl. Tidy up.
3857 * decl.c (mark_saved_scope): Don't set them.
3858 (maybe_push_to_top_level): Clear memory.
3859
3860 * decl.c (layout_var_decl): Change prototype. Don't complete
3861 types for external objects.
3862 (check_initializer): Likewise. Tidy.
3863 (initialize_local_var): Complete types here.
3864 (cp_finish_decl): Not here. Reorganize a little.
3865 (grokvardecl): Don't complete types here.
3866
3867 * decl.c (start_function): Clear last_dtor_insn and
3868 last_parm_cleanup_insn.
3869 (push_cp_function_context): Just copy over a little of
3870 the old context, not all of it.
3871
3872 * cp-tree.h (copy_to_permanent): Remove.
3873 (permanent_p): Likewise.
3874 * decl.c (building_typename_type): Don't use copy_to_permanent.
3875 (start_decl): Likewise.
3876 (grok_reference_init): Likewise.
3877 (cp_finish_decl): Likewise.
3878 * init.c (build_new_1): Don't use mapcar.
3879 (build_vec_delete_1): Don't use copy_to_permanent.
3880 (build_vec_init): Likewise.
3881 * parse.y (primary): Likewise.
3882 * parse.c: Regenerated.
3883 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
3884 (lookup_template_class): Likewise.
3885 (tsubst_friend_function): Likewise.
3886 (instantiate_class_template): Likewise.
3887 (tsubst_decl): Likewise.
3888 (tsubst): Likewise.
3889 (instantiate_template): Likewise.
3890 (unify): Likewise.
3891 * rtti.c (get_tinfo_fn): Likewise.
3892 (build_dynamic_cast): Likewise.
3893 * semantics.c (finish_if_stmt_cond): Likewise.
3894 (finish_while_stmt_cond): Likewise.
3895 (finish_do_stmt): Likewise.
3896 (finish_for_cond): Likewise.
3897 (finish_for_expr): Likewise.
3898 (finish_cleanup): Likewise.
3899 (add_decl_stmt): Likewise.
3900 (finish_named_return_value): Likewise.
3901 (finish_qualified_call_expr): Likewise.
3902 * tree.c (perm_manip): Remove.
3903 (build_exception_variant): Don't use copy_to_permanent.
3904 (permanent_p): Remove.
3905 (copy_to_permament): Remove.
3906 (build_min_nt): Don't use copy_to_permanent.
3907 (build_min): Likewise.
3908 (min_tree_cons): Likewise.
3909 * typeckc.c (build_static_cast): Likewise.
3910 (build_reinterpret_cast): Likewise.
3911 (build_const_cast): Likewise.
3912
3913 1999-09-07 Mark Mitchell <mark@codesourcery.com>
3914
3915 * decl.c (ggc_p): Set it to 1.
3916 (mark_saved_scope): Add prototype.
3917
3918 1999-09-07 Richard Henderson <rth@cygnus.com>
3919
3920 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
3921 * typeck.c (self_promoting_args_p): Delete.
3922
3923 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
3924
3925 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
3926 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
3927
3928 1999-09-07 Mark Mitchell <mark@codesourcery.com>
3929
3930 * Makefile.in (tree.o): Depend on ggc.h.
3931 * class.c (make_method_vec): Remove.
3932 (free_method_vec): Likewise.
3933 (free_method_vecs): Remove.
3934 (add_method): Don't use them.
3935 * cp-tree.def (PTRMEM_CST): Make it longer.
3936 (TEMPLATE_PARM_INDEX): Make it shorter.
3937 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
3938 (template_parm_index): Remove RTL field.
3939 (ptrmem_cst): Add RTL field.
3940 (finish_function): Removed parameter.
3941 (process_next_inline): Change prototype.
3942 (init_cplus_unsave): Rename to init_tree.
3943 (binding_init): Remove.
3944 * decl.c (free_binding_nodes): Remove.
3945 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
3946 (pop_binding): Don't use free_binding_nodes.
3947 (free_binding_vecs): Remove.
3948 (store_bindings): Don't use them.
3949 (pop_from_top_level): Likewise.
3950 (lookup_namespace_name): Simplify.
3951 (build_typename_type): Don't use obstack_free.
3952 (unqualified_namespace_lookup): Simplify.
3953 (lookup_name_real): Simplify.
3954 (start_function): Remove comment about leaks.
3955 (finish_function): Removed nested parameter. Call
3956 expand_end_bindings even when building_stmt_tree.
3957 Call ggc_push_context and ggc_pop_context around
3958 rest_of_compilation, if necessary.
3959 (mark_cp_function_context): Handle a NULL language-context.
3960 (lang_mark_false_label_stack): Fix typo.
3961 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
3962 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
3963 pointer to method types.
3964 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
3965 * decl2.c (finish_objects): Adjust call to finish_function.
3966 (finish_static_store_duration_function): Likewise.
3967 (do_nonmember_using_decl): Remove call to binding_init.
3968 * except.c (end_anon_func): Adjust call to finish_function.
3969 * lex.c (mark_impl_file_chain): New function.
3970 (init_parse): Call init_tree, not init_cplus_unsave.
3971 Add GC roots.
3972 (cp_pramga_interface): Use xmalloc, not permalloc.
3973 (cp_pragma_implementation): Likewise.
3974 (begin_definition_of_inclass_inline): Simplify.
3975 (process_next_inline): Adjust prototype.
3976 (do_scoped_id): Don't call binding_init.
3977 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
3978 * method.c (emit_thunk): Adjust call to finish_function.
3979 (synthesize_method): Likewise.
3980 * parse.y (%union): Add a new `pi' variant.
3981 (PRE_PARSED_FUNCTION_DECL): Use it.
3982 (fn.defpen): Likewise.
3983 (fndef): Adjust call to finish_function.
3984 * pt.c (instantiate_decl): Likewise.
3985 * rtti.c (syntheisze_tinfo_fn): Likewise.
3986 * semantics.c (expand_body): Likewise.
3987 * tree.c: Include ggc.h.
3988 (mark_list_hash): New function.
3989 (binding_init): Remove.
3990 (init_cplus_unsave): Rename to ...
3991 (init_tree): This. Add GC roots.
3992
3993 1999-09-05 Mark Mitchell <mark@codesourcery.com>
3994
3995 Get ready for garbage collection.
3996 * Makefile.in (CXX_TREE_H): Add varray.h
3997 (lex.o): Depend on ggc.h.
3998 (decl.o): Likewise.
3999 (decl2.o): Likewise.
4000 (method.o): Likewise.
4001 (search.o): Likewise.
4002 (pt.o): Likewise.
4003 (repo.o): Likewise.
4004 * class.c: Include ggc.h.
4005 (current_class_name): Remove.
4006 (current_class_type): Likewise.
4007 (current_access_specifier): Likewise.
4008 (previous_class_type): Likewise.
4009 (previous_class_values): Likewise.
4010 (class_cache_firstobj): Likewise.
4011 (current_lang_base): Likewise.
4012 (current_lang_stack): Likewise.
4013 (current_lang_stacksize): Likewise.
4014 (lang_name_c): Likewise.
4015 (lang_name_cplusplus): Likewise.
4016 (lang_name_java): Likewise.
4017 (current_lang_name): Likewise.
4018 (base_layout_decl): Likewise.
4019 (access_default_node): Likewise.
4020 (access_public_node): Likewise.
4021 (access_protected_node): Likewise.
4022 (access_private_node): Likewise.
4023 (access_default_virtual_node): Likewise.
4024 (access_public_virtual_node): Likewise.
4025 (access_protected_virtual_node): Likewise.
4026 (access_private_virtual_node): Likewise.
4027 (signed_zero_node): Likewise.
4028 (init_class_processing): Don't build base_layout_decl.
4029 (push_lang_context): Adjust now that current_lang_base is a varray.
4030 (pop_lang_context): Likewise.
4031 * cp-tree.h: Include varray.h.
4032 (cp_global_trees): Add access_default, access_public,
4033 access_protected, access_private, access_default_virtual,
4034 access_public_virtual, access_protected_virtual,
4035 access_private_virtual, ctor_identifier, delta2_identifier,
4036 delta_identifier, dtor_identifier, in_charge_identifier,
4037 index_identifier, nelts_identifier, this_identifier,
4038 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
4039 lang_name_c, lang_name_cplusplus, lang_name_java,
4040 empty_except_spec, null, jclass, minus_one, terminate.
4041 (saved_scope): Move here from decl.c. Define globals in terms of
4042 saved_scope: current_namespace, current_class_name,
4043 current_class_type, current_access_specifier, current_lang_stack,
4044 current_lang_base, current_lang_name, current_function_parms,
4045 current_template_parms, processing_template_decl,
4046 processing_specialization, processing_explicit_instantiation,
4047 previous_class_type, previous_class_values, class_cache_firstobj.
4048 (scope_chain): New variable.
4049 (init_pt): New function.
4050 * decl.c (current_namespace): Remove.
4051 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
4052 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
4053 (delta_identifier, delta2_identifier): Likewise.
4054 (pfn_or_delta2_identifier, tag_identifier): Likewise
4055 (vt_off_identifier, empty_except_spec, null_node): Likewise.
4056 (current_function_parms, current_lang_base): Remove.
4057 (current_lang_stack, previous_class_values): Remove.
4058 (class_binding_level): Macroize.
4059 (saved_scope): Remove.
4060 (current_saved_scope): Rename to scope_chain.
4061 (mark_saved_scope): Adjust for new scope structure.
4062 (maybe_push_to_top_level): Likewise.
4063 (pop_from_top_level): Likewise.
4064 (duplicate_decls): Adjust now that current_lang_base is a varray.
4065 (build_typename_type): Call ggc_add_tree_hash_table_root.
4066 (init_decl_processing): Call init_pt. Call push_to_top_level to
4067 set up globals. Add GC roots.
4068 (xref_basetypes): Adjust now that current_lang_base is a varray.
4069 * decl.h (this_identifier): Remove.
4070 (in_charge_identifier): Likewise.
4071 * decl2.c: Don't include varray.h.
4072 (current_namespace): Remove.
4073 (init_decl2): Add GC roots.
4074 * except.c (Terminate): Remove.
4075 (init_exception_processing): Use terminate_node instead.
4076 (build_terminate_handler): Likewise.
4077 * init.c (nc_nelts_field_id): Remove.
4078 (minus_one): Likewise.
4079 (init_init_processing): Use minus_one_node and nelts_identifier
4080 instead. Add GC roots.
4081 (jclass_node): Remove.
4082 (build_new_1): Use nelts_identifier.
4083 (build_vec_init): Likewise.
4084 (build_vec_delete): Likewise.
4085 * lex.c: Include ggc.h.
4086 (defarg_fn): Move declaration early.
4087 (defarg_parms): Likewise.
4088 (init_parse): Add GC roots.
4089 (handle_cp_pragma): Remove redundant declaration of
4090 pending_vtables.
4091 * method.c: Include ggc.h.
4092 (btypelist): Make it a varray. All uses changed.
4093 (ktypelist): Likewise.
4094 (init_method): Add GC roots.
4095 * pt.c: Don't include varray.h. Include ggc.h.
4096 (current_template_parms): Remove.
4097 (processing_template_decl): Likewise.
4098 (processing_specialization): Likewise.
4099 (processing_explicit_instantiation): Likewise.
4100 (init_pt): New function.
4101 * repo.c: Include ggc.h.
4102 (init_repo): Add GC roots.
4103 * search.c: Don't include varray.h.
4104 (_vptr_name): Remove.
4105 (lookup_field_1): Use vtpr_identifier instead.
4106 (expand_indirect_vtbls_init): Remove redundant declaration of
4107 in_charge_identifier.
4108 (init_search_processing): Use vptr_identifier.
4109
4110 1999-09-05 Richard Henderson <rth@cygnus.com>
4111 Bernd Schmidt <bernds@cygnus.co.uk>
4112 Mark Mitchell <mark@codesourcery.com>
4113
4114 * Makefile.in (parse.o): Depend on ggc.h.
4115 (decl2.o): Depend on ggc.h.
4116 (init.o): Depend on ggc.h.
4117 * cp-tree.h (init_decl2): Declare.
4118 (cp_parse_init): Likewise.
4119 * decl.c (ggc_p): Define to zero.
4120 (mark_saved_scope): New function.
4121 (init_decl_processing): Call cp_parse_init, and cp_decl2.
4122 Register GC roots.
4123 (expand_static_init): Add GC roots.
4124 * decl2.c: Include ggc.h.
4125 (init_decl2): New function.
4126 * init.c: Include ggc.h.
4127 (init_init_processing): Add GC roots.
4128 * parse.y: Include ggc.h.
4129 (cp_parse_init): New function.
4130
4131 1999-09-04 Mark Mitchell <mark@codesourcery.com>
4132
4133 * decl.c (init_decl_processing): Set mark_lang_status.
4134 (lang_mark_false_label_stack): Adjust prototype.
4135 * decl2.c (grok_function_init): Remove extraneous declaration of
4136 abort_fndecl.
4137
4138 * Make-lang.in (cc1plus): Remove dependency on GGC.
4139 * Makefile.in (OBJS): Don't mention ggc-simple.o.
4140 (OBJDEPS): Don't mention ggc-simple.o.
4141
4142 * Make-lang.in (cc1plus): Depend on $(GGC).
4143 * Makefile.in (OBJS): Add ggc-simple.o.
4144 (OBJDEPS): Likewise.
4145 * cp-tree.h (language_function): Rename members to `x_' versions;
4146 we now have x_named_labels, x_ctor_label, x_dtor_label,
4147 x_base_init_list, x_member_init_list, x_base_init_expr,
4148 x_current_class_ptr, x_current_class_ref, x_last_tree,
4149 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
4150 x_result_rtx.
4151 (dtor_label, ctor_label, current_base_init_list,
4152 current_member_init_list, base_init_expr, current_class_ptr,
4153 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
4154 * decl.c: Include ggc.h.
4155 (last_dtor_insn): Adjust to use x_ names.
4156 (last_parm_cleanup_insn): Likewise.
4157 (original_result_rtx): Likewise.
4158 (named_labels): Likewise.
4159 (mark_binding_level): New function.
4160 (mark_cp_function_context): Likewise.
4161 (mark_false_label_stack): Likewise.
4162 (lang_mark_tree): Likewise.
4163 (lang_cleanup_tree): Likewise.
4164
4165 1999-09-03 Mark Mitchell <mark@codesourcery.com>
4166
4167 * Makefile.in (CXX_TREE_H): Include function.h.
4168 (decl.o): Don't depend on function.h.
4169 (decl2.o): Likewise.
4170 (typeck.o): Likewise.
4171 (init.o): Likewise.
4172 (method.o): Likewise.
4173 * cp-tree.h: Include function.h.
4174 (cp_function): Rename to language_function. Remove next.
4175 (cp_function_chain): Make it a macro, not a variable.
4176 (push_cp_function_context): Don't declare.
4177 (pop_cp_function_context): Likewise.
4178 * decl.c: Don't include function.h.
4179 (push_cp_function_context): Make it static. Make it suitable for
4180 a save_lang_status callback.
4181 (pop_cp_function_context): Likewise.
4182 (maybe_push_to_top_level): Call push_function_context_to, not
4183 push_cp_function_context.
4184 (pop_from_top_level): Call pop_function_context_from, not
4185 pop_cp_function_context.
4186 (init_decl_processing): Set save_lang_status and
4187 restore_lang_status. Call push_function_context_to, not
4188 push_cp_function_context.
4189 (cp_function_chain): Remove.
4190 * decl2.c: Don't include function.h.
4191 * except.c: Don't include function.h.
4192 (start_anon_func): Call push_function_context_to, not
4193 push_cp_function_context.
4194 (end_anon_func): Call pop_function_context_from, not
4195 pop_cp_function_context.
4196 * init.c: Don't include function.h.
4197 * lex.c (begin_definition_of_inclass_inline): Call
4198 push_function_context_to, not push_cp_function_context.
4199 (process_next_inline): Call pop_function_context_from, not
4200 pop_cp_function_context.
4201 * method.c: Don't include function.h.
4202 (synthesize_method): Call push_function_context_to, not
4203 push_cp_function_context. Call pop_function_context_from, not
4204 pop_cp_function_context.
4205 * typeck.c: Don't include function.h.
4206
4207 * decl.c (expand_static_init): Tweak handling of static
4208 initializations for objects without constructors.
4209
4210 1999-09-03 Nathan Sidwell <nathan@acm.org>
4211
4212 * typeck.c (build_indirect_ref): Reject dereference of pointer to
4213 void.
4214
4215 1999-09-02 Mark Mitchell <mark@codesourcery.com>
4216
4217 * cp-tree.h (cp_function): Move here, from decl.c.
4218 (cp_function_chain): Declare.
4219 (dtor_label): New macro, instead of variable.
4220 (ctor_label): Likewise.
4221 (current_base_init_list): Likewise.
4222 (current_member_init_list): Likewise.
4223 (base_init_expr): Likewise.
4224 (current_class_ptr): Likewise.
4225 (current_class_ref): Likewise.
4226 (last_tree): Likewise.
4227 (last_expr_type): Likewise.
4228 (current_function_returns_value): Likewise.
4229 (current_function_returns_null): Likewise.
4230 (current_function_just_assigned_this): Likewise.
4231 (current_function_parms_stored): Likewise.
4232 (temp_name_counter): Likewise.
4233 (static_labelno): Likewise.
4234 (expanding_p): Likewise.
4235 (stmts_are_full_exprs_p): Likewise.
4236 (in_function_try_handler): Likewise.
4237 (lang_type): Remove nested type_flags. All uses changed.
4238 * call.c (ctor_label): Remove.
4239 (dtor_label): Likewise.
4240 * class.c (current_class_ptr): Remove.
4241 (current_class_ref): Likewise.
4242 * decl.c (static_labelno): Remove.
4243 (dtor_label): Likewise.
4244 (last_dtor_insn): New macro, instead of variable.
4245 (last_parm_cleanup_insn): Likewise.
4246 (original_result_rtx): Likewise.
4247 (in_function_try_handler): Remove.
4248 (named_label_uses): New macro, instead of variable.
4249 (named_labels): Likewise.
4250 (current_function_returns_value): Remove.
4251 (current_function_returns_null): Likewise.
4252 (current_function_assigns_this): New macro, instead of variable.
4253 (current_function_just_assigned_this): Likewise.
4254 (current_binding_level): Likewise.
4255 (init_decl_processing): Call push_cp_function_context.
4256 (cp_function): Move to cp-tree.h
4257 (cp_function_chain): Make it global.
4258 (temp_name_counter): Remove.
4259 (push_cp_function_context): Simplify.
4260 (pop_cp_function_context): Likewise.
4261 * decl2.c (temp_name_counter): Remove.
4262 * init_c (current_base_init_list): Likewise.
4263 (current_member_init_list): Likewise.
4264 (base_init_expr): Likewise.
4265 * method.c (static_labelno): Likewise.
4266 * pt.c (last_tree): Likewise.
4267 * semantics.c (expanding_p): Likewise.
4268 (stmts_are_full_exprs_p): Likewise.
4269 (last_expr_type): Likewise.
4270 * typeck.c (dtor_label): Likewise.
4271 (ctor_label): Likewise.
4272
4273 1999-09-01 Alex Samuel <samuel@codesourcery.com>
4274
4275 * decl2.c (arg_assoc_template_arg): New prototype. New function.
4276 (arg_assoc_class): Use arg_assoc_template_arg for template
4277 arguments.
4278 (arg_assoc): Likewise.
4279 * pt.c (mangle_class_name_for_template): Allow member template
4280 template arguments.
4281
4282 1999-09-02 Nathan Sidwell <nathan@acm.org>
4283
4284 * call.c (build_conditional_expr): Warn on enum mismatches.
4285 (convert_arg_to_ellipsis): Move non-pod check to after
4286 conversion.
4287
4288 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4289
4290 * gxx.gperf (hash, is_reserved_word): Add prototypes.
4291
4292 * init.c (build_vec_init): Initialize variable `try_block'.
4293
4294 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
4295 Likewise for bzero/memset.
4296 (token_getch, token_put_back): Add static prototypes. Remove
4297 `inline' from the definitions.
4298 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
4299
4300 1999-09-01 Mark Mitchell <mark@codesourcery.com>
4301
4302 * cp-tree.h (lang_type): Move align into type_flags.
4303 (CLASSTYPE_ALIGN): Adjust accordingly.
4304 * call.c (direct_reference_binding): Remove misleading comment.
4305
4306 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4307
4308 * parse.y (language_string): Constify.
4309
4310 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4311
4312 * repo.c (getpwd): Don't prototype.
4313 * xref.c (getpwd): Likewise
4314
4315 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4316
4317 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
4318 Remove hacks for stuff which now comes from libiberty.
4319
4320 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
4321
4322 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
4323
4324 1999-08-30 Mark Mitchell <mark@codesourcery.com>
4325
4326 * cp-tree.h (begin_init_stmts): Declare.
4327 (finish_init_stmts): Likewise.
4328 * cvt.c (build_up_reference): Wrap the declaration of a temporary
4329 in a statement-expression so that we will see it when expanding
4330 tree structure later.
4331 * init.c (begin_init_stmts): Don't make it static.
4332 (finish_init_stmts): Likewise.
4333
4334 * cp-tree.h (start_handler_parms): New function.
4335 (expand_start_catch_block): Take only one parameter.
4336 (start_handler_parms): New function.
4337 * decl.c (start_handler_parms): Define it.
4338 * except.c (process_start_catch_block): Take only one parameter.
4339 Don't call grokdeclarator here.
4340 (expand_start_catch_block): Don't call grokdeclarator here,
4341 either.
4342 * parse.y (handler_args): Adjust call to
4343 expand_start_catch_block. Use start_handler_parms.
4344 * pt.c (push_template_decl_real): Make permanent lists have
4345 permanent elements.
4346 (tsubst_expr): Adjust calls to expand_start_catch_block
4347 appropriately.
4348 * semantics.c (expand_stmt): Likewise.
4349
4350 1999-08-29 Alex Samuel <samuel@codesourcery.com>
4351
4352 * pt.c (push_template_decl_real): Use template declaration from
4353 class type if it exists.
4354
4355 1999-08-29 Mark Mitchell <mark@codesourcery.com>
4356
4357 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
4358 (maybe_inject_for_scope_var): Declare it.
4359 (initialize_local_var): Likewise.
4360 * decl.c (maybe_inject_for_scope_var): Make it global.
4361 (initialize_local_var): Likewise. Move cleanup handling here,
4362 from cp_finish_decl.
4363 (make_rtl_for_nonlocal_decl): Use
4364 push_obstacks_nochange/pop_obstacks, rather than
4365 end_temporary_allocation/resume_temporary_allocation.
4366 (cp_finish_decl): Try to complete the type of a variable when it
4367 is declared. Move cleanup-handling to initialize_local_var.
4368 (expand_static_init): Use tree-building code, rather than
4369 RTL-building code.
4370 * decl2.c (get_temp_name): Assert non-initializedness of
4371 temporaries.
4372 * init.c (create_temporary_var): Move RTL-assigning code to ...
4373 (get_temp_regvar): Here.
4374 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
4375 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
4376 call initialize_local_var to generate initialization code.
4377
4378 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4379
4380 * cp-tree.h (fndecl_as_string, type_as_string,
4381 type_as_string_real, args_as_string, decl_as_string,
4382 expr_as_string, code_as_string, language_as_string,
4383 parm_as_string, op_as_string, assop_as_string, cv_as_string,
4384 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
4385
4386 * errfn.c (cp_printer): Likewise.
4387
4388 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
4389 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
4390 cp_file_of, code_as_string, language_as_string, parm_as_string,
4391 op_as_string, assop_as_string, args_as_string, cv_as_string):
4392 Likewise.
4393
4394 * tree.c (lang_printable_name): Likewise.
4395
4396 1999-08-28 Richard Henderson <rth@cygnus.com>
4397
4398 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
4399
4400 1999-08-28 Mark Mitchell <mark@codesourcery.com>
4401
4402 * cp-tree.h (strip_array_types): New function.
4403 * decl.c (maybe_deduce_size_from_array_init): New function, split
4404 out from cp_finish_decl.
4405 (layout_var_decl): Likewise.
4406 (maybe_commonize_var): Likewise.
4407 (maybe_inject_for_scope_var): Likewise.
4408 (initialize_local_var): Likewise.
4409 (build_cleanup_on_safe_obstack): Likewise.
4410 (check_initializer): Likewise.
4411 (make_rtl_for_nonlocal_decl): Likewise.
4412 (cp_finish_decl): Use them.
4413 * typeck.c (strip_array_types): New function.
4414
4415 * cp-tree.def (LABEL_STMT): New tree node.
4416 * cp-tree.h (LABEL_STMT_LABEL): New macro.
4417 (shadow_label): Remove.
4418 (declare_local_label): New function.
4419 (finish_label_decl): Likewise.
4420 * decl.c (make_label_decl): New function, split out from
4421 lookup_label.
4422 (shadowed_labels): Remove.
4423 (binding_level): Add shadowed_labels.
4424 (clear_binding_level): Remove.
4425 (push_binding_level): Just bzero the new binding level.
4426 (pushlevel): Fix indentation.
4427 (pop_label): New function.
4428 (pop_labels): Likewise, split out from poplevel.
4429 (poplevel): Pop local labels. Use pop_labels.
4430 (maybe_push_to_top_level): Don't clear shadowed_labels.
4431 (lookup_label): Use make_label_decl.
4432 (shadow_label): Remove.
4433 (declare_local_label): New function.
4434 (define_label): Simplify.
4435 (start_function): Don't clear shadowed_labels.
4436 (cp_function): Remove shadowed_labels.
4437 (push_cp_function_context): Don't save shadowed_labels.
4438 (pop_cp_function_context): Don't restore it.
4439 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
4440 * parse.y (label_decl): Use finish_label_decl.
4441 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
4442 declarations.
4443 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
4444 building_stmt_tree.
4445 (finish_label_decl): New function.
4446 (expand_stmt): Handle LABEL_STMTs and local label declarations.
4447
4448 1999-08-26 Mark Mitchell <mark@codesourcery.com>
4449
4450 * decl.c (lookup_label): Build labels on the permanent obstack
4451 when building statement trees. Don't build RTL for labels when
4452 building statement trees.
4453 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
4454 building statement trees.
4455 (finish_label_stmt): Likewise.
4456 (expand_stmt): Adjust accordingly.
4457 * pt.c (tsubst_expr); Likewise.
4458 (do_decl_instantiation): Robustify.
4459
4460 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
4461 * tree.c (build_cplus_new): Set it.
4462 * expr.c (cplus_expand_expr): Use it.
4463 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
4464
4465 * decl.c (store_parm_decls): Reset immediate_size_expand.
4466 (finish_function): Likewise.
4467
4468 * tree.c (cplus_unsave_expr_now): Don't return a value.
4469
4470 * semantics.c (do_poplevel): Always initialize the return value.
4471
4472 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
4473
4474 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
4475 * tree.h (cplus_unsave_expr_now) : Same.
4476
4477 1999-08-25 Mark Mitchell <mark@codesourcery.com>
4478
4479 * decl.c (grokdeclarator): Amend comment.
4480 * except.c (expand_start_catch_block): Call push_template_decl for
4481 catch-block parameters.
4482 * method.c (synthesize_method): Build an empty compound statement
4483 for the body of a constructor.
4484
4485 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
4486
4487 * tree.c (cp_build_qualified_type_real): If we're asking for the
4488 same quals we already have, just return.
4489
4490 1999-08-25 Mark Mitchell <mark@codesourcery.com>
4491
4492 * cp-tree.def (SUBOBJECT): New tree node.
4493 * cp-tree.h (CLEANUP_P): New macro.
4494 (SUBOBJECT_CLEANUP): Likewise.
4495 (keep_next_level): Add parameter.
4496 (get_temp_regvar): Don't declare.
4497 (emit_base_init): Remove parameter.
4498 (expand_aggr_init): Rename to build_aggr_init.
4499 (expand_vec_init): Rename to build_vec_init.
4500 (do_pushlevel): Remove.
4501 (do_poplevel): Likewise.
4502 (finish_cleanup): New function.
4503 (finish_subobject): Likewise.
4504 (stmts_are_full_exprs_p): New variable.
4505 * decl.c (keep_next_level): Add parameter.
4506 (cp_finish_decl): Use build_aggr_init, not
4507 expand_aggr_init. Use finish_expr_stmt to expand the code.
4508 (expand_static_init): Use tree-generating, not RTL-generating,
4509 functions to handle the initialization.
4510 (start_function): Remove dead code. Always have a momentary
4511 obstack inside the function, even before hitting the first curly
4512 brace.
4513 (cplus_expand_expr_stmt): Move calls to
4514 expand_{start,end}_target_temps into semantics.c.
4515 (cp_function): Add stmts_are_full_exprs_p.
4516 (push_cp_function_context): Save it.
4517 (pop_cp_function_context): Restore it.
4518 * decl2.c (get_temp_regvar): Move to init.c.
4519 (do_static_initialization): Use build_{aggr,vec}_init.
4520 (do_static_destruction): Fix typo in comment.
4521 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
4522 * except.c (expand_throw): Use create_temporary_var.
4523 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
4524 * init.c (expand_vec_init_try_block): Remove.
4525 (expand_vec_init_catch_clause): Likewise.
4526 (get_temp_regvar): New function.
4527 (begin_init_stmts): Likewise.
4528 (finish_init_stmts): Likewise.
4529 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
4530 structure here.
4531 (emit_base_init): Likewise. Remove unused parameter.
4532 (expand_virtual_init): Likewise.
4533 (expand_cleanup_for_base): Use finish_subobject.
4534 (expand_aggr_vbase_init_1): Simplify.
4535 (construct_virtual_bases): Use tree-generating functions to build
4536 up initialization.
4537 (expand_aggr_init): Likewise. Rename to build_aggr_init.
4538 (expand_default_init): Likewise.
4539 (expand_aggr_init_1): Likewise.
4540 (expand_vec_init): Rename to build_vec_init.
4541 * method.c (do_build_copy_constructor): Use tree-generating
4542 functions. Don't call clear_last_expr.
4543 (do_build_assign_ref): Likewise.
4544 (synthesize_method): Call clear_last_expr here.
4545 * parse.y (base_init): Don't call clear_last_expr here.
4546 (nodecls): Likewise.
4547 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
4548 * semantics.c (do_pushlevel): Move to here.
4549 (do_poplevel): Likewise.
4550 (stmts_are_full_exprs_p): New variable.
4551 (finish_expr_stmt): Handle logic for temoprary cleanup here.
4552 (finish_for_stmt): Use finish_expr_stmt.
4553 (finish_cleanup): New function.
4554 (finish_function_try_block): Fix indentation.
4555 (finish_subobject): New function.
4556 (setup_vtbl_ptr): Call keep_next_level here.
4557 (finish_stmt_expr): Handle a block with no scope inside the
4558 statement-expression.
4559 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
4560 SUBOBJECT.
4561 * tree.c (search_tree): Handle INIT_EXPR.
4562 (mapcar): Likewise.
4563 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
4564 * typeck2.c (store_init_value): Change expand_aggr_init to
4565 build_aggr_init in comment.
4566
4567 1999-08-25 Mark Mitchell <mark@codesourcery.com>
4568
4569 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
4570
4571 1999-08-25 Nathan Sidwell <nathan@acm.org>
4572
4573 * decl2.c (handle_class_head): Be graceful about additional
4574 scope qualifiers. Adjust comments to reflect reality.
4575
4576 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
4577
4578 * call.c (build_conditional_expr): Fix typo.
4579 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
4580 lvalue before trying to mess with the sides.
4581
4582 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
4583
4584 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
4585
4586 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
4587
4588 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
4589
4590 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
4591 Return arbitrary pointer or NULL.
4592 (check_eh_spec): Call __throw_type_match_rtti_2.
4593 * tinfo.h (*::dcast): Return int. Add valp parm.
4594 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
4595 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
4596 (__throw_type_match_rtti): Now just a wrapper.
4597
4598 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
4599 (init_exception_processing): Don't initialize them.
4600
4601 1999-08-23 Paul Burchard <burchard@pobox.com>
4602
4603 * decl.c (check_default_argument): Fix typo.
4604
4605 1999-08-22 Mark Mitchell <mark@codesourcery.com>
4606
4607 * cp-tree.def (STMT_EXPR): Fix typo in node name.
4608
4609 * dump.c (dump_next_stmt): New function.
4610 (dequeue_and_dump): Use it.
4611
4612 * pt.c (tsubst_copy): Make sure to initialize return value for a
4613 STMT_EXPR, even when processing_template_decl.
4614 * semantics.c (finish_stmt_expr): A statement-expression whose
4615 last statement is not an expression-statement has type `void'.
4616
4617 1999-08-20 Mark Mitchell <mark@codesourcery.com>
4618
4619 * semantics.c (finish_stmt_expr): Fix typo in comment.
4620 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
4621 (mapcar): Likewise.
4622 * init.c (build_vec_delete_1): Make the children of a permanent
4623 BIND_EXPR permanent.
4624 * pt.c (register_specialization): Don't register a specialization
4625 more than once.
4626
4627 1999-08-18 Andrew Haley <aph@cygnus.com>
4628
4629 * method.c (process_overload_item): Call build_mangled_C9x_name ()
4630 for all integer parameter types larger than long long.
4631
4632 1999-08-19 Mark Mitchell <mark@codesourcery.com>
4633
4634 * pt.c (redeclare_class_template): Merge default template
4635 arguments in both directions.
4636
4637 * typeck.c (common_type): Undo 1999-08-18 change. Remove
4638 compiler_error message.
4639
4640 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
4641
4642 * cp-tree.h: Declare flag_use_repository.
4643 * pt.c (do_decl_instantiation): Don't complain about duplicate
4644 instantiation with -frepo.
4645 (do_type_instantiation): Likewise.
4646
4647 * pt.c (push_template_decl_real): Complain about everything
4648 that isn't a valid template.
4649
4650 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
4651 affect inlines.
4652
4653 1999-08-19 Mark Mitchell <mark@codesourcery.com>
4654
4655 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
4656 * decl2.c (build_expr_from_tree): Handle it.
4657 * error.c (dump_expr): Likewise.
4658 * pt.c (for_each_template_parm): Likewise.
4659 (tsubst_copy): Likewise.
4660 * tree.c (search_tree): Likewise.
4661 * semantics.c (finish_pseudo_destructor_call): Create it.
4662
4663 1999-08-18 Mark Mitchell <mark@codesourcery.com>
4664
4665 * search.c (setup_class_bindings): Robustify.
4666 * typeck.c (common_type): Use same_type_p, not pointer equality,
4667 to compare types.
4668
4669 * cp-tree.h (build_lang_field_decl): Remove.
4670 * class.c (build_vtable): Replace calls to build_lang_field_decl
4671 with build_lang_decl.
4672 (prepare_fresh_vtable): Likewise.
4673 (finish_struct_1): Likewise.
4674 (init_class_processing): Likewise.
4675 * decl.c (push_using_decl): Likewise.
4676 (init_decl_processsing): Likewise.
4677 (grokvardecl): Likewise.
4678 (build_ptrmemfunc_type): Likewise.
4679 (grokdeclarator): Likewise.
4680 (build_enumerator): Likewise.
4681 * decl2.c (grok_x_components): Likewise.
4682 (do_class_using_decl): Likewise.
4683 * except.c (call_eh_info): Likewise.
4684 * init.c (init_init_processing): Likewise.
4685 * rtti.c (expand_class_decl): Likewise.
4686 * tree.c (build_base_fields): Likewise.
4687 (build_vbase_pointer_fields): Likewise.
4688 * lex.c (build_lang_decl): Build declarations on the permanent
4689 obstack if we're building statmeent trees.
4690 (retrofit_lang_decl): Handle both the full lang_decl and also the
4691 smaller lang_decl_flags here.
4692 (build_lang_field_decl): Remove.
4693 * pt.c (push_template_decl_real): Issue errors for variable
4694 declarations that are not static members.
4695
4696 1999-08-18 Richard Henderson <rth@cygnus.com>
4697
4698 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
4699 (mapcar): Likewise.
4700
4701 1999-08-17 Mark Mitchell <mark@codesourcery.com>
4702
4703 * cp-tree.h (back_end_hook): New variable.
4704 * decl2.c (back_end_hook): Define it.
4705 (finish_file): If it's non-NULL, call it.
4706
4707 * decl.c (add_decl_to_level): New function.
4708 (push_local_binding): Use it.
4709 (find_binding): Fix typo in comment.
4710 (pushdecl): Use add_decl_to_level. Put templates on the
4711 corresponding namespace-scope binding levels.
4712 * dump.c (dequeue_and_dump): Print the specializations of a
4713 template.
4714 * pt.c (push_template_decl_real): Don't push a template multiple
4715 times.
4716
4717 1999-08-17 Mark Mitchell <mark@codesourcery.com>
4718
4719 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
4720 (CALL_DECLARATOR_QUALS): Likewise.
4721 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
4722 * decl.c (grokdeclarator): Adjust to use them.
4723 * decl2.c (grokfield): Likewise.
4724 (reparse_absdcl_as_casts): Likewise.
4725 * lex.c (make_call_declarator): Likewise.
4726 (set_quals_and_spec): Likewise.
4727 * pt.c (tsubst): Likewise.
4728 * tree.c (mapcar): Remove special hack to handle third operand of
4729 a CALL_EXPR.
4730
4731 1999-08-16 Mark Mitchell <mark@codesourcery.com>
4732
4733 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
4734 * class.c (build_vtable): Use build_lang_field_decl to build the
4735 VAR_DECLs for vtables.
4736 (prepare_fresh_vtable): Likewise.
4737 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
4738 CAN_HAVE_FULL_LANG_DECL_P.
4739 (push_using_decl): Use build_lang_decl to build USING_DECLs.
4740 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
4741 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
4742 (build_lang_field_decl): Likewise.
4743 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
4744 to copy.
4745
4746 * cp-tree.def (STMT_EXPR): New tree node.
4747 * cp-tree.h (STMT_EXPR_STMT): New macro.
4748 (store_return_init): Change prototype.
4749 (finish_named_return_value): New function.
4750 (expand_stmt): Likewise.
4751 (expand_body): Likewise.
4752 (begin_stmt_tree): Likewise.
4753 (finish_stmt_tree): Likewise.
4754 (expanding_p): New variable.
4755 (last_expr_type): Likewise.
4756 (building_stmt_tree): New macro.
4757 * decl.c (start_function): Use building_stmt_tree, not
4758 processing_template_decl, where appropriate.
4759 (store_parm_decls): Likewise.
4760 (store_return_init): Move most of the body to semantics.c.
4761 (finish_function): Use building_stmt_tree.
4762 (finish_stmt): Clear last_expr_type here.
4763 (cp_function): Add expanding_p, last_tree, last_expr_type.
4764 (push_cp_function_context): Save them.
4765 (pop_cp_function_context): Restore them.
4766 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
4767 * error.c (dump_expr): Handle STMT_EXPR.
4768 * except.c (expand_start_catch_block): Use building_stmt_tree.
4769 Use add_decl_stmt.
4770 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
4771 (do_case): Move add_tree call to semantics.c.
4772 * parse.y (return_init): Use finish_named_return_value.
4773 (for.init.statement): Use finish_expr_stmt.
4774 * parse.c: Regenerated.
4775 * pt.c (do_pushlevel): Move to semantics.c.
4776 (do_poplevel): Likewise.
4777 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
4778 (tsubst_expr): Don't expand all the way to RTL here. Handle
4779 RETURN_INIT and CTOR_INITIALIZER.
4780 (instantiate_decl): Call expand_body after tsubst'ing into
4781 DECL_SAVED_TREE.
4782 * semantics.c (expand_stmts): New function.
4783 (expanding_p): New variable.
4784 (last_expr_type): Likewise.
4785 (finish_expr_stmt): Use building_stmt_tree.
4786 (begin_if_stmt): Likewise.
4787 (finish_if_stmt_cond): Likewise.
4788 (finish_then_clause): Likewise.
4789 (begin_else_clause): Likewise.
4790 (finish_else_clause): Likewise.
4791 (begin_while_stmt): Likewise.
4792 (finish_while_stmt_cond): Likewise.
4793 (finish_while_stmt): Likewise.
4794 (finish_do_body): Likewise.
4795 (finish_do_stmt): Likewise.
4796 (finish_return_stmt): Likewise.
4797 (begin_for_stmt): Likewise.
4798 (fnish_for_init_stmt): Likewise.
4799 (finish_for_cond): Likewise.
4800 (finish_for_expr): Likewise.
4801 (finish_for_stmt): Likewise.
4802 (finish_break_stmt): Likewise.
4803 (finish_continue_stmt): Likewise.
4804 (finish_switch_cond): Likewise.
4805 (finish_switch_stmt): Likewise.
4806 (finish_case_label): Call add_tree here if necessary.
4807 (finish_goto_statement): Use building_stmt_tree.
4808 (begin_try_block): Likewise.
4809 (begin_function_try_block): Likewise.
4810 (finish_try_block): Likewise.
4811 (finish_function_try_block): Likewise.
4812 (finish_handler_sequence): Likewise.
4813 (finish_function_handler_sequence): Likewise.
4814 (begin_handler): Likewise.
4815 (finish_handler_parms): Likewise.
4816 (finish_handler): Likewise.
4817 (begin_compound_stmt): Likewise.
4818 (finish_compound_stmt): Likewise.
4819 (finish_asm_stmt): Likewise.
4820 (finish_label_stmt): Likewise.
4821 (finish_named_return_value): New function.
4822 (setup_vtbl_ptr): Moved here from decl2.c.
4823 (do_pushlevel): Moved here from pt.c.
4824 (do_poplevel): Likewise.
4825 (begin_stmt_expr): Use building_stmt_tree.
4826 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
4827 when building_stmt_tree.
4828 (begin_stmt_tree): New function.
4829 (finish_stmt_tree): Likewise.
4830 (expand_stmt): Likewise.
4831 (expand_body): Likewise.
4832 * tree.c (build_cplus_method_type): Make sure the argument types
4833 end up on the same obstack as the METHOD_TYPE.
4834 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
4835 THROW_EXPR, STMT_EXPR.
4836 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
4837 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
4838 sorry, if an unsupported node is encountered.
4839 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
4840 (c_expand_return): Don't call add_tree here.
4841
4842 1999-08-15 Mark Mitchell <mark@codesourcery.com>
4843
4844 * pt.c (check_default_tmpl_args): Don't check in local scopes.
4845 (tsubst_decl): Make sure the declaration is on a saveable
4846 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
4847 variable.
4848 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
4849
4850 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
4851
4852 Speed up Koenig lookup.
4853 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
4854 to return namespaces we've looked at.
4855 * decl2.c (lookup_using_namespace): Likewise.
4856 (add_function): Don't call ovl_member.
4857 (lookup_arg_dependent): Initialize k.namespaces to the list of
4858 namespaces seen in unqualified lookup.
4859 * call.c (equal_functions): Move here from tree.c.
4860 (joust): Use it to handle duplicate candidates.
4861 * tree.c (ovl_member): Use ==.
4862
4863 1999-08-13 Mark Mitchell <mark@codesourcery.com>
4864
4865 * cp-tree.def (DECL_STMT): Make it smaller.
4866 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
4867 (lang_decl): ... here. Add next.
4868 (DECL_SAVED_TREE): Adjust accordingly.
4869 (DECL_IMPLICIT_TYPEDEF_P): New macro.
4870 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
4871 (DECL_STMT_DECL): Likewise.
4872 (create_implicit_typedef): New function.
4873 (maybe_push_decl): Likewise.
4874 (tsubst_default_argument): New function.
4875 (at_function_scope_p): Likewise.
4876 (add_decl_stmt): Likewise.
4877 (push_permanent_obstack): Likewise.
4878 * call.c (convert_default_arg): Use tsubst_default_argument.
4879 * class.c (add_method): Use push_permanent_obstack.
4880 (build_self_reference): Create a TEMPLATE_DECL for the
4881 self-reference, if necessary.
4882 * decl.c (pseudo_global_level_p): Only look at the current binding
4883 level.
4884 (push_binding): Use push_permanent_obstack.
4885 (create_implicit_typedef): New function.
4886 (pushtag): Use it.
4887 (duplicate_decls): Use push_permanent_obstack.
4888 (maybe_push_decl): New function.
4889 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
4890 (start_decl_1): Remove dead code.
4891 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
4892 pseudo_global_level_p.
4893 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
4894 template.
4895 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
4896 pseudo_global_level_p.
4897 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
4898 a template.
4899 (get_sentry): Use push_permanent_obstack.
4900 * dump.c (dequeue_and_dump): Enable DECL_STMT.
4901 * except.c (call_eh_info): Use push_permanent_obstack.
4902 (build_eh_type_ref): Likewise.
4903 (do_pop_exception): Likewise.
4904 (expand_eh_spec): Likewise.
4905 (alloc_eh_object): Likewise.
4906 (expand_throw): Likewise.
4907 * init.c (build_java_class_ref): Likewise.
4908 * lex.c (get_time_identifier): Likewise.
4909 (free_lang_decl_chain): Correct type.
4910 (retrofit_lang_decl): Adjust accordingly.
4911 (build_lang_field_decl): Likewise.
4912 * lex.h (free_lang_decl_chain): Likewise.
4913 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
4914 * parse.c: Regenerated.
4915 * pt.c (tsubst_default_arguments): New function.
4916 (retrieve_local_specialization): Likewise.
4917 (register_local_specialization): Likewise.
4918 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
4919 pseudo_global_level_p to determine whether or not a template is
4920 primary.
4921 (lookup_template_class): Likewise. Use create_implicit_typedef.
4922 (instantiate_class_template): Call tsubst_default_arguments for
4923 member functions, if appropriate.
4924 (tsubst_default_argument): New function.
4925 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
4926 * search.c (at_function_scope_p): New function.
4927 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
4928 (finish_label_stmt): Likewise.
4929 (add_decl_stmt): New function.
4930 (begin_class_definition): Likewise.
4931 (finish_typeof): Likewise.
4932 * tree.c (copy_template_template_parm): Likewise.
4933 (copy_to_permanent): Likewise.
4934 (push_permanent_obstack): Define.
4935 (mark_addressable): Use it.
4936 * typeck.c (mark_addressable): Likewise.
4937
4938 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
4939
4940 * cp-tree.h (init_cplus_unsave): New.
4941 (cplus_unsave_expr_now): New.
4942 * lex.c (init_parse): Call init_cplus_unsave.
4943 * tree.c (init_cplus_unsave): New.
4944 (cplus_unsave_expr_now): New.
4945
4946 1999-08-13 Mark Mitchell <mark@codesourcery.com>
4947
4948 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
4949 decl_constant_value to simplify array bounds.
4950
4951 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
4952
4953 * lang-options.h: Add -fms-extensions.
4954 * cp-tree.h: Declare flag_ms_extensions.
4955 * decl2.c: Define it.
4956 * class.c (instantiate_type): Don't complain about taking the address
4957 of a bound member function if -fms-extensions.
4958 * typeck.c (build_unary_op): Likewise.
4959 * decl.c (grokdeclarator): Or about implicit int.
4960 * init.c (resolve_offset_ref): Or about implicit '&'.
4961
4962 1999-08-11 Mark Mitchell <mark@codesourcery.com>
4963
4964 * cp-tree.h (minimal_parse_mode): Remove.
4965 (finish_label_stmt): New function.
4966 * decl.c (saved_scope): Remove minimal parse mode.
4967 (maybe_push_to_top_level): Don't save it.
4968 (pop_from_top_level): Don't restore it.
4969 (define_label): Split out template-handling code to semantics.c.
4970 (start_decl): Don't use minimal_parse_mode.
4971 (cp_finish_decl): Likewise.
4972 (start_function): Don't increment it.
4973 (store_return_init): Don't use it.
4974 (finish_function): Don't decrement it.
4975 * parse.y (label_colon): Use finish_label_stmt throughout.
4976 * parse.c: Regenerated.
4977 * pt.c (minimal_parse_mode): Don't define it.
4978 (tsubst_expr): Use finish_label_stmt.
4979 * semantics.c (finish_label_stmt): New function.
4980
4981 * dump.c (queue): Be careful when computing bitmasks.
4982 (dequeue_and_dump): Describe binfos as binfos, not as
4983 vectors.
4984
4985 * parse.y (pedantic): Give it itype. Adjust usage accordingly
4986 throughout.
4987 * parse.c: Regenerated.
4988
4989 * Make-lang.in (CXX_SRCS): Remove sig.c.
4990 * Makefile.in (CXX_OBJS): Remove sig.o.
4991 (sig.o): Remove.
4992 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
4993 (CPTI_SIGNATURE_TYPE): Likewise.
4994 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
4995 (opaque_type_node): Likewise.
4996 (signature_type_node): Likewise.
4997 (sigtable_entry_type): Likewise.
4998 (flag_handle_signatures): Likewise.
4999 (lang_type): Remove is_signature, is_signature_pointer,
5000 is_signature_reference, has_opaque_typedecls,
5001 sigtables_has_been_generated. Adjust dummy. Remove signature,
5002 signature_pointer_to, signature_reference_to.
5003 (IS_SIGNATURE): Remove.
5004 (SET_SIGNATURE): Remove.
5005 (CLEAR_SIGNATURE): Remove.
5006 (IS_SIGNATURE_POINTER): Remove.
5007 (IS_SIGNATURE_REFERENCE): Remove.
5008 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
5009 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
5010 (CLASSTYPE_SIGNATURE): Remove.
5011 (SIGNATURE_TYPE): Remove.
5012 (SIGNATURE_METHOD_VEC): Remove.
5013 (SIGNATURE_POINTER_TO): Remove.
5014 (SIGNATURE_REFERENCE_TO): Remove.
5015 (lang_decl_flags): Remove is_default_implementation. Rename
5016 memfunc_pointer_to to saved_tree.
5017 (IS_DEFAULT_IMPLEMENTATION): Remove.
5018 (DECL_MEMFUNC_POINTER_TO): Remove.
5019 (DECL_MEMFUNC_POINTING_TO): Remove.
5020 (DECL_SAVED_TREE): Adjust definition.
5021 (tag_types): Remove signature_type_node.
5022 (SIGNATURE_FIELD_NAME): Remove.
5023 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
5024 (SIGNATURE_OPTR_NAME): Likewise.
5025 (SIGNATURE_SPTR_NAME): Likewise.
5026 (SIGNATURE_POINTER_NAME): Likewise.
5027 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
5028 (SIGNATURE_REFERENCE_NAME): Likewise.
5029 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
5030 (SIGTABLE_PTR_TYPE): Likewise.
5031 (SIGTABLE_NAME_FORMAT): Likewise.
5032 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
5033 (SIGTABLE_TAG_NAME): Likewise.
5034 (SIGTABLE_VB_OFF_NAME): Likewise.
5035 (SIGTABLE_VT_OFF_NAME): Likewise.
5036 (finish_base_specifiers): Change prototype.
5037 (build_signature_pointer_type): Remove.
5038 (build_signature_reference_type): Remove.
5039 (build_signature_pointer_constructor): Remove.
5040 (build_signature_method_call): Remove.
5041 (build_optr_ref): Likewise.
5042 (append_signature_fields): Likewise.
5043 (signature_error): Likewise.
5044 * call.c (build_this): Remove signature support.
5045 (build_over_call): Likewise.
5046 (build_new_method_call): Likewise.
5047 * class.c (add_implicitly_declared_members): Likewise.
5048 (finish_struct_1): Likewise.
5049 (finish_struct): Likewise.
5050 * cvt.c (cp_convert_to_pointer): Likewise.
5051 (convert_to_pointer_force): Likewise.
5052 (ocp_convert): Likewise.
5053 * decl.c (sigtable_decl_p): Remove.
5054 (init_decl_processing): Remove support for signatures.
5055 (cp_finish_decl): Likewise.
5056 (grokdeclarator): Likewise.
5057 (grokparms): Likewise.
5058 (xref_tag): Likewise.
5059 (start_function): Likewise.
5060 (start_method): Likewise.
5061 * decl2.c (finish_sigtable_vardecl): Remove.
5062 (flag_handle_signatures): Remove.
5063 (lang_f_options): Remove handle-signatures.
5064 (grokfield): Remove support for signatures.
5065 (grokbitfield): Likewise.
5066 (finish_file): Likewise.
5067 (reparse_absdcl_as_casts): Likewise.
5068 * error.c (dump_type_real): Likewise.
5069 (dump_function_decl): Likewise.
5070 * friend.c (make_friend_class): Likewise.
5071 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
5072 * hash.h: Regenerated.
5073 * init.c (build_new_1): Remove support for signatures.
5074 * lang-options.h: Remove -fhandle-signatures,
5075 -fno-handle-signatures.
5076 * lex.c (init_parse): Remove support for signatures.
5077 (yyprint): Likewise.
5078 * lex.h (rid): Remove RID_SIGNATURE.
5079 * method.c (build_decl_overload_real): Remove support for
5080 signatures.
5081 (hack_identifier): Likewise.
5082 * parse.y (base_class): Likewise.
5083 (base_class.1): Likewise.
5084 (access_specifier): Likewise.
5085 * search.c (lookup_member): Likewise.
5086 * semantics.c (finish_qualified_object_call_expr): Likewise.
5087 (finish_template_type_parm): Likewise.
5088 (begin_class_definition): Likewise.
5089 (finish_base_specifier): Likewise.
5090 * sig.c: Remove.
5091 * tree.c (build_cplus_method_type): Remove support for signatures.
5092 * typeck.c (require_complete_type): Likewise.
5093 (c_sizeof): Likewise.
5094 (c_alignof): Likewise.
5095 (build_object_ref): Likewise.
5096 (build_component_ref): Likewise.
5097 (build_indirect_ref): Likewise.
5098 (build_c_cast): Likewise.
5099 (build_modify_expr): Likewise.
5100 (convert_for_initialization): Likewise.
5101 * typeck2.c (signature_error): Remove.
5102 (store_init_value): Remove support for signatures.
5103 (digest_init): Likewise.
5104 (build_x_arrow): Likewise.
5105 (build_functional_cast): Likewise.
5106 * xref.c (GNU_xref_decl): Likewise.
5107
5108 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
5109
5110 * lex.c (do_identifier): Remove unnecessary lookup of class field.
5111
5112 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
5113
5114 * decl2.c (set_decl_namespace): Do not complain about non-matching
5115 decls if processing a template.
5116
5117 1999-08-09 Mark Mitchell <mark@codesourcery.com>
5118
5119 * decl.c (build_ptrmemfunc_type): Handle qualified
5120 pointer-to-member types here.
5121 * tree.c (cp_build_qualified_type_real): Simplify handling here.
5122
5123 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5124
5125 * lex.c (lang_identify): Likewise.
5126
5127 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
5128
5129 * Makefile.in: Update dependencies.
5130 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
5131 NULL_RTX.
5132 * decl.c: Include "function.h"
5133 (cleanup_label, return_label): Delete declarations.
5134 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
5135 (finish_function): Rename last_parm_insn variable to
5136 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
5137 * decl2.c: Include "function.h".
5138 (rtl_expr_chain): Delete declaration.
5139 * method.c: Include "function.h"
5140 * tree.c (build_vbase_pointer_fields): Don't initialize
5141 DECL_SAVED_INSNS with NULL_RTX.
5142 * typeck.c: Include "function.h"
5143
5144 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
5145
5146 * semantics.c (begin_function_try_block, finish_function_try_block,
5147 finish_function_handler_sequence): New fns.
5148 * parse.y (function_try_block): Use them.
5149 * pt.c (instantiate_decl): Likewise.
5150
5151 * cp-tree.h: Declare in_function_try_handler.
5152 * decl.c: Define it.
5153 (start_function): Clear it.
5154 (struct cp_function, push_cp_function_context): Save it.
5155 (pop_cp_function_context): Restore it.
5156 * parse.y (function_try_block): Set and clear it.
5157 * except.c (expand_end_catch_block): Rethrow if we reach the end
5158 of a function-try-block handler in a ctor or dtor.
5159 * typeck.c (c_expand_return): Complain about returning from a
5160 function-try-block handler of a ctor.
5161
5162 * parse.y (function_try_block): Call end_protect_partials
5163 before expand_start_all_catch.
5164
5165 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
5166
5167 * decl.c (struct binding_level): Add eh_region field.
5168 (push_binding_level): Set it.
5169 (define_label): Complain about jumping into an EH block.
5170
5171 * ptree.c (print_lang_type): Print the real type of a PMF.
5172 Print what exceptions a fn type throws.
5173
5174 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5175
5176 * class.c (count_fields, add_fields_to_vec): Add static prototype.
5177
5178 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
5179 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
5180 char*.
5181
5182 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
5183 Constify a char*.
5184
5185 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
5186 char*.
5187
5188 * dump.c (queue_and_dump_index, dump_int, dump_string,
5189 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
5190 a char*.
5191 (dump_stmt): Add static prototype.
5192
5193 * errfn.c (cp_thing): Constify a char*.
5194
5195 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
5196 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
5197 dump_expr): Constify a char*.
5198
5199 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
5200 read_line_number): Add static prototype.
5201 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
5202 (real_yylex): Move label `letter' into the scope where it is used.
5203
5204 * method.c (build_mangled_template_parm_index, build_overload_int,
5205 build_decl_overload_real, get_id_2): Constify a char*.
5206
5207 * search.c (check_final_overrider): Make static.
5208
5209 * typeck.c (composite_pointer_type): Constify a char*.
5210
5211 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
5212
5213 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
5214 we're looking at a class.
5215
5216 * decl.c (lookup_name_real): Set the complain flag if we're
5217 looking for a namespace member.
5218
5219 * lex.c (real_yylex): We can have a number with no digits.
5220
5221 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
5222
5223 * search.c (binfo_from_vbase): New fn.
5224 * cp-tree.h: Declare it.
5225 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
5226 from pointer to member of virtual base.
5227 * typeck.c (get_delta_difference): Likewise.
5228
5229 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
5230
5231 * pt.c (tsubst): Use build_index_type to build in-template array
5232 index type. Fixes g++.oliva/dwarf1.C.
5233 * decl.c (grokdeclarator): Likewise, just for consistency, as it
5234 doesn't seem to trigger the bug without it.
5235
5236 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
5237
5238 * typeck2.c (add_exception_specifier): Use complete_type.
5239
5240 1999-08-06 Mark Mitchell <mark@codesourcery.com>
5241
5242 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
5243 (dump_binary_op): Bulletproof.
5244 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
5245 * tree.c (search_tree): Don't enumerate all the nodes of classes
5246 `1', `2', and `<'; handle them generically. Don't be sorry about
5247 "unrecognized tree codes"; just abort.
5248 (no_linkage_check): Don't do linkage checks for templates.
5249
5250 * tree.c (cp_build_qualified_type_real): Handle
5251 pointer-to-member-function types correctly.
5252
5253 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
5254
5255 * decl.c (pushdecl): Only give an error for shadowing a parm
5256 from *this* function.
5257
5258 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
5259
5260 * typeck2.c: Update URLs and mail addresses.
5261
5262 1999-08-04 Nathan Sidwell <nathan@acm.org>
5263
5264 * cp-tree.h (empty_except_spec): New global var.
5265 (compexcepttypes): Remove prototype.
5266 (comp_except_specs): Prototype new global function.
5267 (add_exception_specifier): Prototype new global function.
5268 * decl.c (empty_except_spec): Define new global var.
5269 (duplicate_decls): Use comp_except_specs, reword error message.
5270 (init_decl_processing): Initialize empty_except_spec.
5271 Adjust build_exception_variant calls.
5272 * parse.y (exception_specification_opt): Use empty_except_spec.
5273 (ansi_raise_identifier): Call check_for_new_type.
5274 (ansi_raise_identifiers): Use add_exception_specifier.
5275 * pt.c (tsubst): Use add_exception_specifier to build exception
5276 specifier.
5277 * search.c (check_final_overrider): New static function, broken
5278 out of get_matching_virtual. Check throw specifiers, reword
5279 diagnostics.
5280 (get_matching_virtual): Use check_final_overrider.
5281 * tree.c (build_exception_variant): Use comp_except_specs.
5282 * typeck.c (compexcepttypes): Remove.
5283 (comp_except_types): New static function, helper for
5284 comp_except_specs. Compare two types as exception specifiers.
5285 (comp_except_specs): New global function, compare two exception
5286 specifiers.
5287 (comptypes): Adjust for comp_except_specs.
5288 * typeck2.c (add_exception_specifier): New global function.
5289
5290 * class.c (check_for_override): Reword error message.
5291
5292 1999-08-03 Nathan Sidwell <nathan@acm.org>
5293
5294 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
5295 * cp-tree.h (struct lang_type): Added non_pod_class flag.
5296 (CLASSTYPE_NON_POD_P): New macro to access it.
5297 * class.c (finish_struct_1): Determine non-PODness.
5298 Check for arrays of pointers (-Weffc++).
5299 Remove array inspection duplicated code.
5300 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
5301 Use CLASSTYPE_NON_POD_P.
5302
5303 1999-08-03 Nathan Sidwell <nathan@acm.org>
5304
5305 * class.c (duplicate_tag_error): Preserve template information.
5306
5307 1999-08-03 Nathan Sidwell <nathan@acm.org>
5308
5309 * decl.c (start_enum): Show location of previous definition.
5310 * parse.y (enumlist_opt): New reduction.
5311 (structsp): Simplify enum rules to use enumlist_opt.
5312
5313 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
5314
5315 * lex.c (yyprint): Handle PFUNCNAME.
5316
5317 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
5318 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
5319
5320 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
5321
5322 * decl.c (start_decl): Set attributes before duplicate_decls call.
5323
5324 1999-08-02 Mark Mitchell <mark@codesourcery.com>
5325
5326 * Make-lang.in (CXX_SRCS): Add dump.c.
5327 * Makefile.in (CXX_OBJS): Add dump.o.
5328 (dump.o): New target.
5329 * cp-tree.h (DECL_CONV_FN_P): Document.
5330 (DECL_OVERLOADED_OPERATOR_P): New function.
5331 (TYPE_PTRMEM_CLASS_TYPE): New macro.
5332 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5333 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
5334 (ASM_VOLATILE_P): New macro.
5335 (STMT_LINENO): Likewise.
5336 (cp_namespace_decls): New function.
5337 (dump_node_to_file): New function.
5338 * decl.c (cp_namespace_decls): New function.
5339 (walk_namespaces_r): Use it.
5340 (wrapup_globals_for_namespace): Likewise.
5341 * decl2.c (flag_dump_translation_unit): New variable.
5342 (lang_decode_option): Handle -fdump-translation-unit.
5343 (finish_file): If flag_dump_translation_unit is set, dump the
5344 translation unit.
5345 * dump.c: New file.
5346 * lang-options.h: Add -fdump-translation-unit.
5347 * pt.c (tsubst_template_parms): Robustify.
5348 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
5349 (tsubst_expr): Use STMT_LINENO.
5350 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
5351 for invalid cv-qualifiers even while building templates.
5352
5353 1999-08-02 Richard Henderson <rth@cygnus.com>
5354
5355 * call.c: Include defaults.h instead of expr.h.
5356 * decl.c: Likewise.
5357 * pt.c: Likewise.
5358 * typeck.c: Include defaults.h.
5359
5360 1999-08-02 Mark Mitchell <mark@codesourcery.com>
5361
5362 * lex.c (errorcount, sorrycount): Don't declare.
5363 * repo.c (errorcount, sorrycount): Likewise.
5364 * typeck2.c (errorcount, sorrycount): Likewise.
5365
5366 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
5367
5368 * call.c (convert_default_arg, build_over_call): Change all uses of
5369 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
5370 Ensure expr.h is included.
5371 * decl.c (grokparams): Ditto.
5372 * pt.c (tsubst_decl): Ditto.
5373 * typeck.c (convert_arguments): Ditto.
5374
5375 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
5376
5377 * class.c (mark_overriders): Fix order of args to overrides.
5378 (warn_hidden): Likewise. Fix for having virtual and non-virtual
5379 functions with the same name.
5380
5381 1999-08-02 Richard Henderson <rth@cygnus.com>
5382
5383 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
5384
5385 1999-08-01 Mark Mitchell <mark@codesourcery.com>
5386
5387 * call.c (build_conditional_expr): Fix typo in comment.
5388
5389 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
5390
5391 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
5392 case_stack; use in_control_zone_p.
5393 * typeck.c (c_expand_return): Likewise.
5394
5395 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
5396
5397 * except.c (catch_clauses): Delete declaration.
5398
5399 1999-07-30 Mark Mitchell <mark@codesourcery.com>
5400
5401 * call.c (build_conditional_expr): Call convert_from_reference to
5402 avoid reference/non-reference type confusion. Fix typo.
5403
5404 1999-07-30 Richard Henderson <rth@cygnus.com>
5405
5406 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
5407 * cp-tree.h (initializer_constant_valid_p): Remove.
5408
5409 1999-07-28 Mark Mitchell <mark@codesourcery.com>
5410
5411 * call.c (conditional_conversion): Don't build BASE_CONVs for
5412 conversions between things that have the same type.
5413 (build_conditional_expr): Tweak.
5414 (convert_like): Some BASE_CONVs really do require the generation
5415 of code.
5416
5417 * init.c (perform_member_init): Don't go through build_modify_expr
5418 for simple initializations.
5419
5420 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
5421
5422 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
5423 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
5424 virtual functions and MI. Simplify.
5425
5426 * method.c: Remove prototype for largest_union_member.
5427 * pt.c (determine_specialization): Fix uninitialized warning.
5428 * lex.c (real_yylex): Likewise.
5429
5430 1999-07-27 Mark Mitchell <mark@codesourcery.com>
5431
5432 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
5433 here too.
5434
5435 * cp-tree.h (BINFO_VIRTUALS): Document new format.
5436 * class.c (modify_one_vtable): Change prototype accordingly.
5437 (modify_all_vtables): Likewise.
5438 (modify_all_direct_vtables): Likewise.
5439 (modify_all_indirect_vtables): Likewise.
5440 (build_vtable_entry_for_fn): New function.
5441 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
5442 (modify_vtable_entry): Likewise.
5443 (add_virtual_function): Likewise.
5444 (build_vtbl_initializer): New function.
5445 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
5446 (fixup_vtable_deltas1): Likewise.
5447 (fixup_vtable_deltas): Likewise.
5448 (override_one_vtable): Likewise.
5449 (finish_struct_1): Likewise.
5450
5451 * error.c (dump_expr): Likewise.
5452 * search.c (get_abstract_virtuals_1): Likewise.
5453 (get_abstract_virtuals): Likewise.
5454 (expand_upcast_fixups): Likewise.
5455 * tree.c (debug_binfo): Likewise.
5456 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
5457 __pure_virtual here.
5458
5459 1999-07-26 Mark Mitchell <mark@codesourcery.com>
5460
5461 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
5462 as per 1999-07-26 change.
5463
5464 * typeck.c (c_sizeof): Don't allow non-static data members.
5465 (expr_sizeof): Likewise.
5466
5467 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
5468
5469 * input.c (feed_input): Only touch lineno and input_filename
5470 if !USE_CPPLIB. Save the old values before setting the new ones.
5471
5472 * input.c (feed_input): Add file, line parms.
5473 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
5474 (real_yylex): Check linemode before input_redirected().
5475
5476 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
5477 from op new to warning.
5478
5479 1999-07-26 Mark Mitchell <mark@codesourcery.com>
5480
5481 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
5482 * call.c: All uses changed.
5483 * typeck.c: Likewise.
5484
5485 1999-07-26 Nathan Sidwell <nathan@acm.org>
5486
5487 * exception.cc (__cplus_type_matcher): Match __eh_matcher
5488 prototype.
5489
5490 1999-07-26 Mark Mitchell <mark@codesourcery.com>
5491
5492 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
5493 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
5494 (strip_top_quals): Declare.
5495 (ncp_convert): Likewise.
5496 (type_after_usual_arithmetic_converions): Likewise.
5497 (composite_pointer_type): Likewise.
5498 * call.c (strip_top_quals): Don't make it static.
5499 (promoted_arithmetic_type_p): New function.
5500 (conditional_conversion): Likewise.
5501 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
5502 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
5503 for converting a type to itself.
5504 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
5505 (implicit_conversion): Make sure the from and to types are
5506 complete.
5507 (add_builtin_candidate): Correct handling of ?: operator.
5508 (add_builtin_candidates): Improve documentation.
5509 (build_conditional_expr): New function.
5510 (can_convert): Implement in terms of can_convert_arg.
5511 (ncp_convert): New function.
5512 * typeck.c (type_after_usual_arithmetic_conversions): New
5513 function, split out from common_type.
5514 (composite_pointer_type): New function, split out from
5515 build_conditional_expr.
5516 (common_type): Use type_after_usual_arithmetic_conversions.
5517 Remove redundant attribute merging.
5518 (comptypes): Tidy. Handle COMPLEX_TYPE.
5519 (build_binary_op_nodefault): Use null_ptr_cst_p.
5520 (build_conditional_expr): Remove.
5521 (convert_for_assignment): Use new conversion functions.
5522
5523 * cp-tree.h (abstract_virtuals_error): Change declaration.
5524 * typeck2.c (abstract_virtuals_error): Check to see if an error
5525 ocurred, and return a boolean value accordingly.
5526 (build_functional_cast): Adjust accordingly.
5527 * class.c (finish_struct_1): Likewise.
5528 * cvt.c (ocp_convert): Likewise.
5529 * decl.c (cp_finish_decl): Likewise.
5530 (grokparams): Likewise.
5531 (grok_op_properties): Likewise.
5532 (start_function): Likewise.
5533 * init.c (build_new_1): Likewise.
5534
5535 * pt.c (unify): Don't get confused by pointers-to-member functions.
5536
5537 * search.c (build_cplus_new): Robustify.
5538
5539 1999-07-24 Richard Henderson <rth@cygnus.com>
5540
5541 * gxx.gperf (__builtin_va_arg): New.
5542 * parse.y (VA_ARG): New token.
5543 (unary_expr): Recognize it.
5544
5545 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
5546
5547 * g++FAQ.texi: Deleted per Joe Buck's request.
5548 * Makefile.in: Corresponding changes.
5549
5550 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
5551
5552 * lex.c: Sync with C frontend.
5553 (whitespace_cr): New fn.
5554 (skip_white_space): Use it.
5555 (init_parse): Reorder.
5556 (yyprint): Support CONSTANT.
5557 (pragma_getc, pragma_ungetc): Bring back.
5558 (read_line_number): Change in_system_header directly.
5559 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
5560 (parse_float): Update to C version.
5561 (yylex): Handle '$' under the letter case.
5562 Remove looking_for_typename handling.
5563 Support hex floating point constants.
5564 Follow C's lead for choosing type of integer constants.
5565 Rearrange stuff to match C frontend.
5566 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
5567 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
5568
5569 1999-07-23 Mark Mitchell <mark@codesourcery.com>
5570
5571 * call.c (reference_binding): Tweak.
5572 (mayble_handle_implicit_object): Use direct_reference_binding to
5573 create the right implicit conversion sequence.
5574
5575 1999-07-22 Mark Mitchell <mark@codesourcery.com>
5576
5577 * pt.c (convert_nontype_argument): Don't call decl_constant_value
5578 if we're converting to a reference type.
5579
5580 * call.c (NEED_TEMPORARY_P): New macro.
5581 (standard_conversion): Set it, for derived-to-base conversions.
5582 (reference_related_p): New function.
5583 (reference_compatible_p): Likewise.
5584 (convert_class_to_reference): Likewise.
5585 (direct_reference_binding): Likewise.
5586 (reference_binding): Rework for standards-compliance.
5587 (convert_like): Adjust accordingly.
5588 (maybe_handle_ref_bind): Simplify; the right conversion sequences
5589 are now built up in reference_binding.
5590 (initialize_reference): New function.
5591 * cp-tree.h (ICS_USER_FLAG): Document.
5592 (ICS_THIS_FLAG): Likewise.
5593 (ICS_BAD_FLAG): Likewise.
5594 (NEED_TEMPORARY_P): Likewise.
5595 (cp_lvalue_kind): New type.
5596 (real_lvalue_p): Return it.
5597 * error.c (dump_expr): Provide more accurate representation for
5598 AGGR_INIT_EXPRs.
5599 * init.c (expand_default_init): Do not try to perform implicit
5600 conversions for a brace-enclosed initializer.
5601 * search.c (lookup_conversions): Document.
5602 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
5603 appropriately.
5604 (real_lvalue_p): Adjust accordingly.
5605 (lvalue_p): Likewise.
5606 (build_cplus_new): Don't allow the creation of an abstract class.
5607 * typeck.c (convert_for_initialization): Use initialize_reference.
5608
5609 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
5610
5611 * lex.c (real_yylex) : Correct the test for overflow when lexing
5612 integer literals.
5613
5614 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
5615
5616 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
5617 not DECL_BUILT_IN, to determine if a function is internally declared.
5618 (duplicate_decls): Likewise. Improve handling of builtins.
5619 (push_overloaded_decl): Remove special handling of builtins.
5620
5621 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
5622
5623 * decl.c (grokdeclarator): Pull out decl_constant_value in
5624 templates, too.
5625
5626 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
5627 * cp-tree.h, pt.c, semantics.c: Adjust.
5628 * method.c (largest_union_member): Remove.
5629
5630 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
5631
5632 * lex.c (token_getch, token_put_back): New fns.
5633 (real_yylex): Use them.
5634
5635 * lex.c (lang_init): Generalize.
5636 (lang_init_options): Tell cpplib this is C++.
5637 (nextchar): Remove. Replace uses with put_back.
5638 (skip_white_space): Handle linemode here. Optimize for cpplib.
5639 (extend_token_buffer_to): New fn.
5640 (extend_token_buffer): Use it.
5641 (read_line_number, check_newline): Just deal with tokens.
5642 (real_yylex): More cpplib optimizations. Simplify. Don't produce
5643 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
5644 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
5645 * parse.y (PAREN_STAR_PAREN): Remove.
5646 * input.c: Don't use the putback machinery with cpplib.
5647 (sub_getch): Fold back into getch.
5648 (getch): Don't handle linemode here.
5649 (feed_input): Unget any text in the token buffer.
5650
5651 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
5652 nextyychar, nextyylval): Remove.
5653
5654 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
5655 Jason Merrill <jason@yorick.cygnus.com>
5656
5657 * lex.c (indent_level): New variable.
5658 (init_parse): Set cpp_token to CPP_DIRECTIVE.
5659 (consume_string): Make this smart about USE_CPPLIB.
5660 (yyungetc): Use put_back function.
5661 (pragma_getc, pragma_ungetc): Functions deleted.
5662 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
5663 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
5664 pragma_ungetc.
5665 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
5666 Also, clean up cases where we redundantly set token_buffer[0].
5667 (read_line_number): New fn.
5668 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
5669 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
5670 (sub_getch): Conditionalize out code that's not appropriate if
5671 USE_CPPLIB.
5672 (put_back): Rewrite in case USE_CPPLIB is defined.
5673 (input_redirected): Ditto.
5674
5675 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
5676
5677 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
5678 c_global_trees and accessor macros defined in c-common.h.
5679 (cp_tree_index): New enumeration.
5680 (cp_global_trees): Declare new array. Add accessor macros for it, and
5681 delete declarations of tree nodes replaced by it.
5682 (builtin_function): Delete macro, add declaration for new function.
5683 Include c-common.h.
5684 * decl.c: Delete definitions for tree nodes that were replaced by
5685 cp_global_trees and c_global_trees.
5686 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
5687 to generate the common builtins here.
5688 (builtin_function): New function.
5689 * decl2.c (abort_fndecl): Delete declaration.
5690 * except.c (expand_builtin_return_address): Delete declaration.
5691 (builtin_return_address_fndecl): Delete variable.
5692 (const_ptr_type_node): Delete declaration.
5693 * lex.c (cons_up_default_function): Delete declaration of
5694 void_list_node.
5695 * parse.y (void_list_node): Delete declaration.
5696 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
5697 Delete variables.
5698 (const_string_type_node): Delete declaration.
5699 * search.c (abort_fndecl): Delete declaration.
5700 * Makefile.in: Update dependencies.
5701
5702 1999-07-19 Mark Mitchell <mark@codesourcery.com>
5703
5704 * pt.c (check_default_tmpl_args): Move test for missing default
5705 arguments here, from ...
5706 (end_template_parm_list): Here.
5707
5708 1999-07-18 Mark Mitchell <mark@codesourcery.com>
5709
5710 * decl.c (lookup_nested_type): Remove.
5711 (pushtag): Don't call it.
5712
5713 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
5714
5715 * Makefile.in (INTERFACE): Bump to 2.
5716
5717 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
5718
5719 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
5720 instructions to gcc.gnu.org. Removed e-mail address.
5721
5722 1999-07-17 Mark Mitchell <mark@codesourcery.com>
5723
5724 * pt.c (determine_specialization): Tighten error-checking.
5725 (end_template_parm_list): Likewise.
5726
5727 1999-07-14 Mark Mitchell <mark@codesourcery.com>
5728
5729 * pt.c (check_default_tmpl_args): Handle friends defined in the
5730 class just like member functions defined in the class.
5731
5732 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
5733 Jason Merrill <jason@yorick.cygnus.com>
5734
5735 * cp-tree.h (struct lang_decl): Added field for storing sorted
5736 FIELD_DECLs (used in TYPE_DECLs).
5737 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
5738 (DECL_SORTED_FIELDS): New macro.
5739 * class.c (method_name_cmp): New function.
5740 (finish_struct_methods): Modified to support sorting and searching
5741 methods.
5742 (finish_struct_anon): Changed code in inner loop to use ELT rather
5743 than UELT (which required an extra indirection for every reference).
5744 (field_decl_cmp): New function to support sorting FIELD_DECLs.
5745 (finish_struct_1): Sort fields.
5746 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
5747 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
5748 Also, switch to using array indexing rather than a changing pointer.
5749 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
5750 DECL_SORTED_FIELDS.
5751
5752 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
5753
5754 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
5755 casts in system headers or extern "C" blocks.
5756
5757 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
5758 errors to pedwarn.
5759
5760 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
5761
5762 * decl2.c (write_virtuals): Deleted declaration.
5763 * cp-tree.h (write_virtuals): Deleted extern declaration.
5764 * class.c (finish_struct_1): Removed #if 0'd code that mentions
5765 write_virtuals.
5766 * semantics.c (begin_class_definition): Rewrite code to not depend
5767 on write_virtuals.
5768
5769 * lex.c (cp_pragma_interface): New function.
5770 (cp_pragma_implementation): Likewise.
5771 (handle_cp_pragma): Call them.
5772
5773 * typeck.c (comptypes): Simplify C code in look_hard.
5774
5775 * xref.c (PALLOC): Use xcalloc, not calloc.
5776 (SALLOC): Use xmalloc, not malloc.
5777
5778 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
5779
5780 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
5781 is NO_DEBUG.
5782
5783 * decl.c (duplicate_decls): If a redeclaration doesn't match the
5784 initial declaration, then don't save the inline info and by all
5785 means don't mark the function as a builtin function.
5786
5787 * decl.c (lookup_name_real): Set NONCLASS to 1 if
5788 CURRENT_CLASS_TYPE is 0.
5789
5790 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
5791 NULL_TREE.
5792
5793 * ptree.c (print_lang_type): Added vtable-needs-writing.
5794
5795 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
5796
5797 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
5798
5799 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
5800
5801 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
5802 Merged into c-common.
5803
5804 1999-07-05 Dave Brolley <brolley@cygnus.com>
5805
5806 * lex.c (errorcount): Declare it.
5807 (finish_parse): Update errorcount for when using CPPLIB.
5808
5809 1999-07-05 Mark Mitchell <mark@codesourcery.com>
5810
5811 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
5812 parameters.
5813 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
5814 * decl.c (push_class_binding): Use it.
5815 (lookup_name_real): Likewise.
5816
5817 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
5818
5819 * cp-tree.h (widest_integer_literal_type_node,
5820 widest_unsigned_literal_type) : New.
5821 * decl.c (widest_integer_literal_type_node,
5822 widest_unsigned_literal_type) : New.
5823 (init_decl_processing): Handle/use the two new types.
5824 * lex.c (real_yylex): Same.
5825 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
5826 Same.
5827
5828 1999-07-01 Mark Mitchell <mark@codesourcery.com>
5829
5830 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
5831 to anonymous cv-qualified types.
5832
5833 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
5834
5835 * lex.c (real_yylex) : Change integer literal overflow handling to
5836 be like c-lex.c.
5837
5838 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
5839
5840 1999-06-28 Richard Henderson <rth@cygnus.com>
5841
5842 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
5843
5844 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
5845
5846 * error.c (dump_type_real): Handle TREE_LIST again.
5847
5848 * typeck.c (comp_target_parms): Don't complain about
5849 converting from () to (...) if !flag_strict_prototype.
5850
5851 * decl.c (grokdeclarator): Update the names of all variants when
5852 de-anonymizing.
5853
5854 1999-06-21 Mark Mitchell <mark@codesourcery.com>
5855
5856 * init.c (expand_aggr_vbase_init): Rename to
5857 construct_virtual_bases. Conditionalize construction here,
5858 rather than ...
5859 (emit_base_init): Here.
5860
5861 1999-06-19 Mark Mitchell <mark@codesourcery.com>
5862
5863 * semantics.c (finish_asm_stmt): Apply decay conversions to
5864 input operands.
5865
5866 * decl.c (expand_static_init): When building an anonymous function
5867 for use with atexit, compute its body before and after entering
5868 the function.
5869
5870 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
5871 EXIT_EXPR.
5872
5873 1999-06-18 Mark Mitchell <mark@codesourcery.com>
5874
5875 * init.c (expand_aggr_vbase_init): Add flag parameter.
5876 (build_partial_cleanup_for): Remove, inlining into ..
5877 (expand_cleanup_for_base): ... here. Take flag parameter.
5878 (emit_base_init): Pass the in_chrg parameter to
5879 emit_aggr_vbase_init.
5880 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
5881
5882 1999-06-16 Mark Mitchell <mark@codesourcery.com>
5883
5884 * decl2.c (import_export_decl): Use same_type_p, rather than
5885 relying on pointer-equality for types.
5886
5887 * method.c (do_build_copy_constructor): Simplify.
5888
5889 * call.c (build_method_call): Remove bogus code for two-argument
5890 delete.
5891 * init.c (build_new_1): Expand on comment, and remove dead code.
5892
5893 * init.c (expand_cleanup_for_base): New function, split out
5894 from ...
5895 (emit_base_init): Here.
5896 (expand_aggr_vbase_init): Use it.
5897
5898 1999-06-15 Mark Mitchell <mark@codesourcery.com>
5899
5900 * cp-tree.h (class_cache_firstobj): Declare.
5901 (maybe_push_cache_obstack): Rename to push_cache_obstack.
5902 * class.c (permanent_obstack): Remove declaration.
5903 (class_cache_firstobj): Make it global.
5904 (add_method): Don't use permanent_obstack directly.
5905 (pushclass): Only free the class_cache_obstack if we know how far
5906 back to free it.
5907 (maybe_push_cache_obstack): Rename to push_cache_obstack.
5908 * decl.c: Remove dead comment.
5909 (saved_scope): Add class_cache_firstobj.
5910 (push_to_top_level): Save it.
5911 (pop_from_top_level): Restore it.
5912 (push_class_level_binding): Use push_cache_obstack, not
5913 maybe_push_cache_obstack.
5914 * search.c (push_class_decls): Likewise.
5915
5916 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
5917
5918 * pt.c (tsubst_friend_function): Push into namespace of friend
5919 function before pushdecl'ing it.
5920
5921 1999-06-14 Nathan Sidwell <nathan@acm.org>
5922
5923 * call.c (build_new_op): Remove REF_BIND from all operands.
5924
5925 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
5926
5927 * init.c (build_new_1): Look up operator delete even if there was
5928 no explicit new placement.
5929
5930 1999-06-08 Nathan Sidwell <nathan@acm.org>
5931
5932 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
5933 of ...
5934 (build_throw): ... here. Call it.
5935 (process_start_catch_block): Call it.
5936
5937 1999-06-07 Mark Mitchell <mark@codesourcery.com>
5938
5939 * search.c (convert_pointer_to_single_level): Reimplement without
5940 using get_binfo.
5941
5942 1999-06-06 Mark Mitchell <mark@codesourcery.com>
5943
5944 * method.c (is_back_referenceable_type): Back-reference bools when
5945 not squangling.
5946
5947 1999-06-07 Dave Brolley <brolley@cygnus.com>
5948
5949 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
5950 * input.c (putback_buffer): New structure type.
5951 (putback): Replaces putback_char member.
5952 (putback): Replaces putback_char static variable.
5953 (feed_input): Use putback.
5954 (end_input): Use putback.
5955 (sub_getch): Use putback.
5956 (put_back): Use putback.
5957
5958 1999-06-05 Mark Mitchell <mark@codesourcery.com>
5959
5960 * decl.c (grokdeclarator): Fix typo in last change.
5961
5962 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
5963
5964 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
5965 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
5966
5967 1999-06-04 Nathan Sidwell <nathan@acm.org>
5968
5969 * except.c (build_throw): Check throw expression validity.
5970
5971 1999-06-03 Mark Mitchell <mark@codesourcery.com>
5972
5973 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
5974 just because flag_signed_bitfields is false.
5975
5976 1999-06-03 Nathan Sidwell <nathan@acm.org>
5977
5978 * semantics.c (begin_class_definition): Update the struct's
5979 location here ...
5980 * class.c (finish_struct): ... rather than here.
5981
5982 * decl.c (make_typename_type): Don't rely on uninitialized
5983 variable.
5984
5985 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5986
5987 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
5988
5989 1999-05-31 Mark Mitchell <mark@codesourcery.com>
5990
5991 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
5992 and friends rather than messing with current_obstack directly.
5993 (cp_build_qualified_type_real): Rework ARRAY_TYPE
5994 allocation to match practice throughout the rest of the
5995 compiler.
5996
5997 1999-05-30 Mark Mitchell <mark@codesourcery.com>
5998
5999 * lex.c (make_lang_type): Create TYPE_BINFO for
6000 TEMPLATE_TYPE_PARMs just like for non-template types.
6001
6002 * decl.c (start_decl): Move checks on initialization to ...
6003 (cp_finish_decl): Here. Tidy formatting slightly.
6004
6005 1999-05-28 Mark Mitchell <mark@codesourcery.com>
6006
6007 * decl.c (add_binding): Don't complain about a redeclaration of a
6008 semantically identical typedef in a local scope.
6009
6010 1999-05-28 Nathan Sidwell <nathan@acm.org>
6011
6012 * decl.c (complete_array_type): Allocate off same obstack. Fix
6013 DO_DEFAULT comment to match reality.
6014
6015 * friend.c (make_friend_class): Fix diagnostic typo.
6016
6017 1999-05-28 Mark Mitchell <mark@codesourcery.com>
6018
6019 * decl.c (lookup_namespace_name): Handle getting a
6020 TEMPLATE_ID_EXPR.
6021 (expand_static_init): Don't call pushdecl for implicitly declared
6022 `atexit' used to register destructors.
6023
6024 1999-05-25 Mark Mitchell <mark@codesourcery.com>
6025
6026 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
6027 intialize a vtable.
6028
6029 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
6030 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
6031 by combining TEMPLATE_INFO and LEVEL into a single union.
6032 (DECL_TEMPLATE_INFO): Reformat.
6033 (DECL_SAVED_TREE): Document.
6034 (DECL_TEMPLATE_INJECT): Remove.
6035 * class.c (finish_struct): Remove code to deal with
6036 DECL_TEMPLATE_INJECT.
6037
6038 * decl.c (maybe_process_template_type_declaration): Handle all new
6039 types in templates uniformly.
6040 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
6041 DECL_CONTEXT.
6042 * pt.c (lookup_template_class): Inject template instantiations of
6043 forward-declarations.
6044 (instantiate_class_template): Remove code processing
6045 DECL_TEMPLATE_INJECT.
6046
6047 * pt.c (lookup_template_class): Tweak lookup to find member
6048 templates.
6049
6050 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
6051 ASM_CV_QUAL.
6052 * semantics.c (finish_asm_stmt): Make strings permanent if they're
6053 used in a template.
6054
6055 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
6056
6057 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
6058 parts of pointer to data member types.
6059
6060 1999-05-24 Mark Mitchell <mark@codesourcery.com>
6061
6062 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
6063 and then make it look like `abort'. Just use `abort' instead.
6064
6065 * typeck.c (build_static_cast): Don't allow static_casts that cast
6066 away constness.
6067 (casts_away_constness_r): New function.
6068 (casts_away_constness): Likewise.
6069
6070 * decl.c (lookup_tag): Remove code no longer needed after
6071 name-lookup improvements.
6072 * decl2.c (handle_class_head): Make error-recovery more robust.
6073 * friend.c (make_friend_class): Reject templated typename types.
6074 * lex.c (is_global): A template parameter isn't global.
6075 * parse.y (class_head): Robustify.
6076 * parse.c: Regenerated.
6077
6078 1999-05-22 Mark Mitchell <mark@codesourcery.com>
6079
6080 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
6081 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
6082
6083 * cp-tree.h (push_nested_namespace): Declare.
6084 (pop_nested_namespace): Likewise.
6085 * decl.c (push_nested_namespace): New function.
6086 (pop_nested_namespace): Likewise.
6087 * pt.c (instantiate_class_template): Use them.
6088
6089 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
6090
6091 * cp-tree.h (cplus_expand_constant): Declare.
6092 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
6093 converted from one pointer-to-object type to another.
6094 * expr.c (cplus_expand_constant): Don't make it static.
6095 * typeck.c (build_component_ref): Don't crash when presented with
6096 a component which is a TEMPLATE_DECL.
6097 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
6098 cast from a pointer-to-member constant to its own type does not
6099 result in a valid non-type template argument.
6100
6101 1999-05-21 Mark Mitchell <mark@codesourcery.com>
6102 Nathan Sidwell <nathan@acm.org>
6103
6104 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
6105 * cp-tree.h: Fix typo in documentation on pointers-to-members.
6106 (cp_build_qualified_type): Make it a macro.
6107 (cp_build_qualified_type_real): Declare.
6108 * decl.c (grokdeclarator): Remove misleading comment. Avoid
6109 problem with template parameters and restrict-qualification.
6110 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
6111 * hash.h: Regenerated.
6112 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
6113 the enumeration.
6114 (NORID): Remove definition.
6115 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
6116 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
6117 (fn_type_unification): Check that the function type resulting from
6118 the deduction is legal.
6119 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
6120 (unify): Use cp_build_qualified_type_real.
6121 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
6122 (cp_build_qualified_type): Rename to ...
6123 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
6124 and modify appropriately.
6125
6126 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
6127 reveal optimization opportunities.
6128
6129 * pt.c (tsubst): Don't issue error messages when we're not
6130 complaining, even if we see a qualified function type.
6131 (check_cv_quals_for_unify): Don't allow a qualified function
6132 type.
6133
6134 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
6135
6136 * class.c (instantiate_type): Downgrade errors for object-dependent
6137 memfn refs to pedwarn.
6138
6139 1999-05-20 Mark Mitchell <mark@codesourcery.com>
6140
6141 * decl.c (grokdeclarator): Don't treat [] as indicating a
6142 zero-sized array in a typedef.
6143
6144 * call.c (build_object_call): Don't look at DECL_NAME for a type.
6145 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
6146 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
6147
6148 * pt.c (for_each_template_parm): Rework to match documentation.
6149 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
6150
6151 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
6152
6153 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
6154
6155 * class.c (finish_base_struct): Allow non-COM bases for COM classes
6156 except at the leftmost position.
6157 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
6158 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
6159 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
6160
6161 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
6162 (build_cplus_new): Make sure that what we return is of the right type.
6163
6164 1999-05-20 Mark Mitchell <mark@codesourcery.com>
6165
6166 * cp-tree.h (make_ptrmem_cst): New function.
6167 * expr.c (cplus_expand_constant): Split out from ...
6168 (cplus_expand_expr): Here. Use cplus_expand_constant.
6169 (init_cplus_expand): Set lang_expand_constant.
6170 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
6171
6172 * tree.c (make_ptrmem_cst): Define.
6173 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
6174 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
6175
6176 1999-05-19 Mark Mitchell <mark@codesourcery.com>
6177
6178 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
6179
6180 * decl2.c (start_static_storage_duration_function): Fix comment.
6181 (finish_file): Create static storage duration functions lazily.
6182
6183 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
6184
6185 Implement anonymous structs.
6186 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
6187 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
6188 * class.c (finish_struct_1): Remove redundant check for anon struct.
6189 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
6190 (check_tag_decl): Check for anonymous struct here.
6191 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
6192 * init.c (sort_member_init, emit_base_init): Handle getting fields
6193 as well as names in current_member_init_list.
6194 (perform_member_init): Handle getting an anon aggr.
6195 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
6196 (do_build_copy_constructor): Likewise.
6197
6198 1999-05-19 Mark Mitchell <mark@codesourcery.com>
6199
6200 * tree.c (cp_build_qualified_type): Don't allow qualified function
6201 types.
6202
6203 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
6204
6205 * gxxint.texi: Fix typo.
6206
6207 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
6208
6209 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
6210 * class.c (finish_struct_1): Use CLASS_TYPE_P.
6211 * ptree.c (print_lang_type): Likewise.
6212 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
6213 IS_AGGR_TYPE_CODE.
6214 * typeck2.c (digest_init): Likewise.
6215
6216 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
6217
6218 * call.c (joust): Compare the types of the conv ops, not the
6219 target types of the conversions.
6220
6221 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
6222
6223 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
6224 was not given.
6225
6226 1999-05-17 Mark Mitchell <mark@codesourcery.com>
6227
6228 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
6229 * decl.c (grokfndecl): Don't allow inline declarations of friend
6230 template specializations, or friend template specializations with
6231 default arguments.
6232 * pt.c (tsubst): Handle substitution into array types that does
6233 not yield a fixed upper bound, even when not processing a
6234 template.
6235 (tsubst_copy): Deal with the fact that the second operand to a
6236 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
6237 * search.c (marked_pushdecls_p): Don't descend into
6238 TEMPLATE_TYPE_PARMs and the like.
6239 (unmarked_pushdecls_p): Likewise.
6240
6241 * call.c (build_over_call): Don't throw away
6242 initializations/copies of empty classes; use MODIFY_EXPR and
6243 INIT_EXPR as for non-empty classes.
6244 * class.c (finish_struct_1): Put the padding byte for an empty
6245 class on the TYPE_NONCOPIED_PARTS list for the class.
6246
6247 1999-05-16 Mark Mitchell <mark@codesourcery.com>
6248
6249 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
6250 indicate a reference to a field that is a qualified name.
6251
6252 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
6253
6254 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
6255 ASM_OUTPUT_CONSTRUCTOR.
6256
6257 * friend.c (do_friend): Add attrlist arg. Remove support for
6258 getting a non-decl as 'decl'.
6259 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
6260 rtl.
6261 (grokdeclarator): Adjust.
6262 * cp-tree.h: Adjust.
6263
6264 1999-05-16 Mark Mitchell <mark@codesourcery.com>
6265
6266 * cp-tree.h (permanent_p): New function.
6267 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
6268 possibly complex tree node.
6269 * tree.c (mapcar): Adjust comments, and follow coding standards in
6270 conditional.
6271 (permanent_p): New function.
6272
6273 1999-05-13 Per Bothner <bothner@cygnus.com>
6274
6275 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
6276 primitive Java types, if we actually see `extern "Java"'.
6277
6278 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
6279
6280 * lang-specs.h: Pass -$ to the preprocessor.
6281
6282 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
6283
6284 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
6285 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
6286 (resolve_offset_ref): Don't handle a raw baselink.
6287 * cvt.c (build_expr_type_conversion): Likewise.
6288 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
6289 convert_for_initialization): Likewise.
6290 * class.c (instantiate_type): Handle seeing a baselink under an
6291 OFFSET_REF.
6292 * error.c (dump_expr): Likewise.
6293 * pt.c (for_each_template_parm): Likewise.
6294 (resolve_overloaded_unification): Likewise.
6295 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
6296 * typeck.c (expr_sizeof): Also complain about other permutations
6297 of overloaded functions.
6298
6299 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
6300
6301 * init.c (resolve_offset_ref): Don't return a raw method.
6302 Use BASELINK_P.
6303 * typeck.c (decay_conversion): Don't handle a raw method.
6304 Resolve all OFFSET_REFs.
6305 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
6306 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
6307 same_type_p for pmf bits. Don't use build_binary_op to compare
6308 raw pointers to methods.
6309 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
6310 to decide when to call resolve_offset_ref.
6311 (build_c_cast, convert_for_initialization): Likewise.
6312 * cvt.c (build_expr_type_conversion): Likewise.
6313
6314 1999-05-06 Nathan Sidwell <nathan@acm.org>
6315
6316 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
6317
6318 1999-05-05 Mark Mitchell <mark@codesourcery.com>
6319
6320 * decl2.c (start_objects): Don't let static constructors and
6321 destructors get inlined.
6322
6323 * parse.y (nested_name_specifier): Make sure ordinary types are
6324 complete, just like template types.
6325 * parse.c: Regenerated.
6326
6327 * pt.c (check_explicit_specialization): Improve error messages.
6328
6329 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
6330
6331 * typeck.c (string_conv_p): Use same_type_p to check whether we
6332 try to convert between char and wchar_t.
6333
6334 1999-05-03 Mark Mitchell <mark@codesourcery.com>
6335
6336 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
6337 lookup to error_mark_node here.
6338 (lookup_member): Revise documentation. Add comments. Don't set
6339 the TREE_TYPE to error_mark_node here, and don't build up an extra
6340 TREE_LIST for ambiguous lookups.
6341 (setup_class_bindings): Adjust accordingly.
6342 (push_class_decls): Revise out-of-date comments.
6343
6344 * typeck.c (build_const_cast): Tighten checks for legality.
6345
6346 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
6347
6348 * init.c (build_member_call): Lookup names coming from
6349 namespace-scoped LOOKUP_EXPR.
6350
6351 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
6352
6353 * gxxint.texi: Add documentation for 'I'.
6354
6355 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
6356
6357 * tinfo.cc (operator==): Qualify type_info with std::.
6358
6359 1999-05-02 Mark Mitchell <mark@codesourcery.com>
6360
6361 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
6362 (DECL_COMDAT): Remove definition.
6363
6364 1999-05-01 Mark Mitchell <mark@codesourcery.com>
6365
6366 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
6367 change.
6368
6369 1999-04-30 Mark Mitchell <mark@codesourcery.com>
6370
6371 * class.c (build_vtable): Use build_lang_decl when building
6372 vtables, not just build_decl.
6373 (prepare_fresh_vtable): Likewise.
6374 * decl.c (wrapup_globals_for_namespace): Mark vtables as
6375 DECL_EXTERNAL when calling wrapup_global_declarations.
6376 * decl2.c (priority_info_s): Add initializations_p and
6377 destructions_p members.
6378 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
6379 when deciding what vtables to write out.
6380 (ssdf_decls): New variable.
6381 (ssdf_decls_used): Likewise.
6382 (start_static_storage_duration_function): Deal with being called
6383 multiple times. Avoid inlining this function.
6384 (generate_inits_for_priority): Deal with reuse of priority map.
6385 (get_priority_info): Clear initializations_p and destructions_p.
6386 (do_static_initialization): Tweak comment.
6387 (do_static_destruction): Likewise. Fix condition on sentries for
6388 destruction.
6389 (generate_ctor_or_dtor_function): Call all of the static storage
6390 duration functions.
6391 (generate_ctor_or_dtor_function_for_priority): Check
6392 initializations_p and destructions_p to see what priorities need
6393 initialization functions.
6394 (finish_file): Rework to generate multiple static storage duration
6395 functions, rather than just one.
6396
6397 * typeck.c (build_const_cast): Tweak last change to handle
6398 templates correctly.
6399
6400 * typeck.c (build_const_cast): Disallow use of const_cast to
6401 anything but a pointer or reference type.
6402
6403 1999-04-30 Nathan Sidwell <nathan@acm.org>
6404
6405 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
6406 signature type.
6407
6408 1999-04-29 Mark Mitchell <mark@codesourcery.com>
6409
6410 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
6411 (finish_file): Indent comments properly.
6412
6413 1999-04-29 Richard Henderson <rth@cygnus.com>
6414
6415 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
6416 (do_static_destruction): Likewise.
6417
6418 1999-04-29 Nathan Sidwell <nathan@acm.org>
6419
6420 * cp-tree.h (TYPE_NOTHROW_P): New macro.
6421 * decl2.c (delete_sanity): Warn on deleting void *.
6422 * init.c (build_new_1): Use TYPE_NOTHROW_P.
6423 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
6424 throwing operator new.
6425
6426 1999-04-28 Nathan Sidwell <nathan@acm.org>
6427
6428 * cp-tree.h (build_component_addr): Remove prototype.
6429 * typeck.c (build_component_addr): Make static. Remove MSG
6430 argument.
6431 (build_component_addr): Remove MSG parameter, clean up
6432 comment.
6433 (build_x_function_call): Use cp_error.
6434 (build_unary_op): Adjust call of build_component_addr.
6435
6436 1999-04-28 Mark Mitchell <mark@codesourcery.com>
6437
6438 * pt.c (tsubst_friend_class): Check for NULL.
6439
6440 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
6441
6442 * search.c (binfo_for_vtable): Initialize bfvi.var.
6443
6444 1999-04-27 Nathan Sidwell <nathan@acm.org>
6445
6446 * rtti.c (build_x_typeid): Check rtti is enabled.
6447
6448 1999-04-26 Mark Mitchell <mark@codesourcery.com>
6449
6450 * search.c (is_subobject_of_p): Make sure we're looking at the
6451 right baseclasses.
6452
6453 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
6454
6455 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
6456
6457 1999-04-23 Mark Mitchell <mark@codesourcery.com>
6458
6459 * decl2.c (finish_file): Tweak handling of extern inlines so that
6460 they are not unnecessarily put out.
6461
6462 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
6463 such as base classes.
6464
6465 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
6466
6467 * tree.c (build_exception_variant): Fix typo: use the chain of U,
6468 not trying V, while cycling through U.
6469
6470 1999-04-22 Mark Mitchell <mark@codesourcery.com>
6471
6472 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
6473 preserves_first_arg. Enlarge dummy accordingly.
6474 (DECL_TINFO_FN_P): New macro.
6475 (SET_DECL_TINFO_FN_P): Likeiwse.
6476 (DECL_RETURNS_FIRST_ARG): Remove.
6477 (DECL_PRESERVES_THIS): Likewise.
6478 (DECL_INIT_PRIORITY): New macro.
6479 (finish_struct_1): Change prototype.
6480 (cat_namespace_levels): Remove prototype.
6481 (vtable_decl_p): New prototype.
6482 (vtype_decl_p): Likewise.
6483 (sigtable_decl_p): Likewise.
6484 (walk_globals_pred): New typedef.
6485 (walk_globals_fn): Likewise.
6486 (walk_globals): New prototype.
6487 (walk_namespaces_fn): New typedef.
6488 (walk_namespaces): New prototype.
6489 (wrapup_globals_for_namespace): Likewise.
6490 (walk_vtables): Remove prototype.
6491 (walk_sigtables): Likewise.
6492 (instantiate_pending_templates): New prototype.
6493 * class.c (finish_struct_1): Don't return a value.
6494 * decl.h (pending_statics): Remove declaration.
6495 * decl.c (walk_namespaces_r): New function.
6496 (walk_globals_r): Likewise.
6497 (vtable_decl_p): Likewise.
6498 (vtype_decl_p): Likewise.
6499 (sigtable_decl_p): Likewise.
6500 (walk_namespaces): Likewise.
6501 (walk_globals_data): New type.
6502 (walk_globals): New function.
6503 (wrapup_globals_for_namespace): Likewise.
6504 (expand_static_init): Remove assertion. Remove redundancy in
6505 conditional. Don't put static data members in static_aggregates
6506 Tidy.
6507 (finish_function): Remove redundancy in conditional. Don't set
6508 DECL_RETURNS_FIRST_ARG.
6509 (cat_namespace_levels): Remove.
6510 * decl2.c: Include splay-tree.h and varray.h.
6511 (priority_info_s): New structure.
6512 (finish_vtable_vardecl): Change prototype. Adjust for new calling
6513 conventions.
6514 (prune_vtable_vardecl): Likewise.
6515 (finish_sigtable_vardecl): Likewise.
6516 (setup_initp): Remove.
6517 (do_dtors): Remove.
6518 (do_ctors): Remove.
6519 (start_static_storage_duration_function): New function.
6520 (generate_inits_for_priority): Likewise.
6521 (finish_static_storage_duration_function): Likewise.
6522 (get_priority_info): Likewise.
6523 (do_static_initialization): Likewise.
6524 (do_static_destruction): Likewise.
6525 (do_static_initialization_and_destruction): Likewise.
6526 (generate_ctor_or_dtor_function): Likewise.
6527 (generate_ctor_and_dtor_functions_for_priority): Likewise.
6528 (pending_statics): Make it a varray.
6529 (pending_statics_used): New variable.
6530 (saved_inlines): Make it a varray.
6531 (saved_inlines_used): New variable.
6532 (finish_static_data_member): Change method of updating
6533 pending_statics.
6534 (mark_inline_for_output): Remove #if 0'd code. Change method of
6535 updating saved_inlines.
6536 (walk_vtables): Remove.
6537 (walk_sigtables): Likewise.
6538 (import_export_decl): Use DECL_TINFO_FN_P.
6539 (pending_templates): Remove declaration.
6540 (maybe_templates): Likewise.
6541 (static_aggregates_initp): Likewise.
6542 (setup_initp): Likewise.
6543 (finish_objects): Simplify.
6544 (INITIALIZE_P_IDENTIFIER): New macro.
6545 (PRIORITY_IDENTIFIER): New macro.
6546 (SSDF_IDENTIFIER): New macro.
6547 (initialize_p_decl): New variable.
6548 (priority_decl): Likewise.
6549 (ssdf_decl): Likewise.
6550 (priority_info_map): Likewise.
6551 (finish_file): Recode output of static intializers and other
6552 file-scope finalization tasks.
6553 * error.c (OB_END_TEMPLATE_ID): New macro.
6554 (dump_type_real): Use it.
6555 (dump_decl): Likewise.
6556 (dump_function_name): Likewise.
6557 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
6558 interface.
6559 (check_newline): Use walk_globals, not walk_vtables.
6560 * pt.c (pending_tempalte_expansions): Remove.
6561 (set_vardecl_interface_info): Likewise.
6562 (pending_templates): Make static.
6563 (maybe_templates): Likewise.
6564 (instantiate_class_template): Adjust call to finish_struct_1.
6565 (instantiate_pending_templates): New function.
6566 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
6567 * tree.c (static_aggregates_initp): Remove.
6568 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
6569 instead.
6570 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
6571
6572 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
6573 with the RTL code RETURN.
6574 * hash.h: Regenerated.
6575 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
6576 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
6577 * parse.c: Regenerated.
6578 * pt.c: Include varray.h. Include rtl.h since varray.h requires
6579 it.
6580 (inline_parm_levels): New variable.
6581 (inline_parm_levels_used): Likewise.
6582 (maybe_begin_member_template_processing): Update them.
6583 (maybe_end_member_template_processing): Use them, rather than
6584 guessing how many levels to pop.
6585
6586 * decl.c (make_typename_type): Tighten error-checking.
6587
6588 1999-04-20 Mark Mitchell <mark@codesourcery.com>
6589
6590 * cp-tree.h (build_binary_op): Remove unneeded parameter.
6591 * class.c (build_vrable_entry_ref): Adjust call to
6592 build_binary_op.
6593 * decl.c (expand_static_init): Likewise.
6594 (grokdeclarator): Likewise.
6595 (finish_function): Likewise.
6596 * decl2.c (delete_sanity): Likewise.
6597 (do_dtors): Likewise.
6598 (do_ctors): Likewise.
6599 * error.c (dump_type_suffix): Likewise.
6600 * expr.c (cplus_expand_expr): Likewise.
6601 * init.c (resolve_offset_ref): Likewise.
6602 (build_new): Likewise.
6603 (build_new_1): Likewise.
6604 (build_vec_delete_1): Likewise.
6605 (expand_vec_init_catch_clause): Likewise.
6606 (build_delete): Likewise.
6607 * pt.c (tsubst): Likewise.
6608 * rtti.c (synthesize_tinfo_fn): Likewise.
6609 * search.c (expand_upcast_fixups): Likewise.
6610 (expand_direct_vtbls_init): Likewise.
6611 * typeck.c (get_member_function_from_ptrfunc): Likewise.
6612 (build_binary_op_nodefault): Likewise.
6613 (point_int_sum): Likewise.
6614 (pointer_diff): Likewise.
6615 (build_unary_op): Likewise.
6616 (build_modify_expr): Likewise.
6617 (get_delta_difference): Likewise.
6618 (build_ptrmemfunc): Likewise.
6619 (expand_ptrmemfunc_cst): Likewise.
6620
6621 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
6622
6623 * decl.c (grokfndecl): Always call cplus_decl_attributes.
6624 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
6625
6626 1999-04-19 Mark Mitchell <mark@codesourcery.com>
6627
6628 * cp-tree.h (finish_static_data_member_decl): New function.
6629 * decl2.c (finish_static_data_member_decl): Split out from ...
6630 (grokfield): Here.
6631 * pt.c (instantiate_class_template): Use it here instead of
6632 trying to fake it.
6633 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
6634 finish_static_data_member_decl will do that. Explicit set
6635 DECL_EXTERNAL to match non-template processing.
6636
6637 1999-04-18 Mark Mitchell <mark@codesourcery.com>
6638
6639 * cp-tree.h (finish_class_definition): Add parameter.
6640 * parse.y (structsp): Use it. Don't call pop_scope here.
6641 * parse.c: Regenerated.
6642 * semantics.c (finish_class_definition): Pop it here.
6643
6644 1999-04-17 Mark Mitchell <mark@codesourcery.com>
6645
6646 * decl.c (xref_tag): Revise handling of nested template
6647 declarations.
6648 * pt.c (check_explicit_specialization): Tweak handling of friend
6649 templates in template classes.
6650 (tsubst_friend_class): Handle friend declarations for nested
6651 member template classes.
6652
6653 1999-04-16 Mark Mitchell <mark@codesourcery.com>
6654
6655 * class.c (finish_struct): Remove unused variable.
6656 (pushclass): Likewise.
6657 (invalidate_class_lookup_cache): Likewise.
6658 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
6659 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
6660 doesn't get obliterated.
6661 (make_typename_type): Handle template classes correctly.
6662
6663 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
6664 (storetags): Declare.
6665 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
6666 (pushclass): Likewise. Use storetags to install tag declarations,
6667 not pushtag.
6668 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
6669 * decl.c (storetags): Make it global.
6670 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
6671 implicit typename declaration.
6672 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
6673 * method.c (hack_identifier): Likewise.
6674 * search.c (lookup_member): Likewise.
6675
6676 * decl.c (warn_about_implicit_typename_lookup): New function.
6677 (lookup_name_real): Use it. Rework handling of implicit typename
6678 extension.
6679
6680 1999-04-15 Mark Mitchell <mark@codesourcery.com>
6681
6682 * cp-tree.h (lookup_nested_field): Remove.
6683 * class.c (push_nested_class): Handle UNION_TYPEs.
6684 (pop_nested_class): Likewise.
6685 * decl.c (lookup_name_real): Don't call lookup_nested_field.
6686 (start_decl): Use push_nested_class, not just pushclass.
6687 (cp_finish_decl): Use pop_nested_class, not just popclass.
6688 * search.c (lookup_nested_field): Remove.
6689
6690 * cp-tree.h (lang_type): Add documentation.
6691 * decl2.c (handle_class_head): Create template declarations here,
6692 as appropriate.
6693 * parse.y (class_head): Return whether or not we entered a new
6694 scope, as well as the type named.
6695 (named_class_head): Likewise.
6696 (named_complex_class_head_sans_basetype): Likewise.
6697 (structsp): Adjust accordingly. Pop scope when required.
6698 * parse.c: Regenerated.
6699 * pt.c (check_default_tmpl_args): Robustify.
6700 (redeclare_class_template): Likewise.
6701 (instantiate_class_template): An instantiation of an
6702 anonymous union is itself an anonymous union.
6703 * semantics.c (begin_class_definition): Don't create template
6704 declarations here.
6705
6706 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
6707
6708 * parse.y (after_type_declarator_intern): New nonterminal.
6709 (after_type_declarator): Use it.
6710 (direct_after_type_declarator): Likewise. Move above
6711 nonnested_type to fix reduce/reduce conflict resolution.
6712 (declmods): Reducing from just 'attributes' has EMPTY precedence.
6713 * Makefile.in (CONFLICTS): Update.
6714
6715 * decl.c (define_label): Downgrade error for jumping over a
6716 non-POD decl to pedwarn.
6717
6718 1999-04-14 Mark Mitchell <mark@codesourcery.com>
6719
6720 * cp-tree.h (popclass): Change declaration.
6721 (pop_nested_class): Likewise.
6722 (poplevel_class): Remove declaration.
6723 * call.c (convert_default_argument): Pass no arguments to
6724 popclass.
6725 * class.c (finish_struct_1): Likewise.
6726 (finish_struct): Likewise.
6727 (popclass): Remove argument. Simplify code accordingly.
6728 (pop_nested_class): Likewise.
6729 * decl.c (poplevel_class): Declare it here, and make it static.
6730 (poplevel): Handle class scopes.
6731 (poplevel_class): Don't take an rgument. Simplify.
6732 (pop_everything): Pass no arguments to pop_nested_class.
6733 (cp_finish_decl): Pass no arguments to popclass.
6734 (grokdeclarator): Pass no arguments to pop_nested_class.
6735 (finish_function): Likewise.
6736 * decl2.c (grokfield): Likewise.
6737 (pop_scope): Pass no arguments to popclass.
6738 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
6739 * pt.c (instantiate_class_template): Move call to pushclass, and
6740 document. Pass no arguments to popclass.
6741 (regenerate_decl_from_template): Likewise.
6742
6743 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
6744
6745 * typeck.c (build_unary_op): Handle taking the address of a unique
6746 bound non-static member function.
6747
6748 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
6749
6750 * lang-options.h (-Wdeprecated): New flag.
6751 * decl2.c (warn_deprecated): New flag.
6752 (lang_decode_option): Deprecated this-is-variable,
6753 external-templates, alt-external-templates.
6754 Support -Wdeprecated.
6755 * errfn.c (cp_deprecated): New function.
6756
6757 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
6758
6759 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
6760 of the decls themselves.
6761
6762 * pt.c (tsubst_function_type): Copy attributes over.
6763
6764 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
6765 and com_interface.
6766 * cp-tree.h: Add prototype.
6767 * decl.c (init_decl_processing): Set valid_lang_attribute.
6768
6769 1999-04-13 Mark Mitchell <mark@codesourcery.com>
6770
6771 * class.c (finish_struct_1): Look at the const-ness of the field's
6772 type, not the TREE_READONLY-ness of the declaration.
6773 * method.c (synthesize_method): Likewise.
6774 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
6775 creating new declarations.
6776
6777 1999-04-13 Mike Stump <mrs@wrs.com>
6778
6779 * decl2.c (import_export_decl): Because vtables always reference
6780 virtual functions, even if they are inlined, don't allow
6781 -fno-implement-inlines to not emit them, instead, emit them with
6782 the vtable.
6783 * decl.c (start_function): Likewise.
6784
6785 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
6786
6787 * cp-tree.h (struct lang_type): Add com_interface.
6788 (CLASSTYPE_COM_INTERFACE): New macro.
6789 * class.c (set_rtti_entry): COM interface classes have no RTTI
6790 entries in their vtables; adjust.
6791 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
6792 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
6793 finish_struct_1): Likewise.
6794 * decl2.c (mark_vtable_entries): Likewise.
6795 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
6796 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
6797 expand_upcast_fixups): Likewise.
6798 * tree.c (debug_binfo): Likewise.
6799
6800 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
6801 * typeck.c (comptypes): If we get it, ignore attributes.
6802 * class.c (instantiate_type): Use BASELINK_P. Change complain
6803 parameter to flags; 2 means ignore attributes.
6804 * call.c (build_op_delete_call): Pass it.
6805
6806 * decl.c (xref_tag): Only complain once about using a typedef-name
6807 with 'struct'. Downgrade to pedwarn.
6808
6809 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
6810
6811 * parse.y (absdcl_intern): New nonterminal.
6812 (absdcl, direct_abstract_declarator): Use it.
6813
6814 * pt.c (lookup_template_class): Look through implict typename.
6815
6816 1999-04-11 Mark Mitchell <mark@codesourcery.com>
6817
6818 * friend.c (add_friend): Deal gracefully with error_mark_node.
6819 * method.c (build_overload_value): Handle pointers-to-members as
6820 template parameters.
6821
6822 * decl.c (push_binding): Fix typo in comment.
6823
6824 1999-04-10 Mark Mitchell <mark@codesourcery.com>
6825
6826 * error.c (dump_type_real): If a typename is a template-id, put
6827 out the template arguments.
6828 (dump_expr): Handle TEMPLATE_ID_EXPR.
6829 * pt.c (lookup_template_class): Now that full arguments are
6830 available everywhere, remove code that tried to guess them.
6831
6832 1999-04-09 Mark Mitchell <mark@codesourcery.com>
6833
6834 * decl.c (make_typename_type): Complain if we don't find a type
6835 when trying to make a typename type for a non-template type.
6836
6837 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
6838
6839 * decl.c (start_decl): Pass attributes to grokdeclarator.
6840 (grokdeclarator): Handle attributes on constructor-syntax
6841 initializers.
6842
6843 1999-04-08 Mark Mitchell <mark@codesourcery.com>
6844
6845 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
6846 don't have types.
6847
6848 * search.c (template_self_reference_p): Tweak.
6849
6850 1999-04-07 Mark Mitchell <mark@codesourcery.com>
6851
6852 * init.c (build_offset_ref): Don't build yet another weird data
6853 structure to describe overloaded functions.
6854
6855 1999-04-06 Mark Mitchell <mark@codesourcery.com>
6856
6857 * cp-tree.h (BASELINK_P): New macro.
6858 (SET_BASELINK_P): Likewise.
6859 * init.c (build_member_call): Remove needless assignment in if
6860 statement.
6861 * search.c (lookup_field_r): Fix handling when we are looking
6862 specifically for a type; these are not hidden by functions and
6863 variables.
6864 (lookup_member): Use SET_BASELINK_P.
6865 * tree.c (is_overloaded_fn): Use BASELINK_P.
6866 (really_overloaed_fn): Likewise.
6867 (get_first_fn): Likewise.
6868
6869 1999-04-05 Mark Mitchell <mark@codesourcery.com>
6870
6871 * decl.c (lookup_name_current_level): Tweak, and improve
6872 documentation.
6873
6874 * class.c (maybe_fixup_vptrs): Remove declaration.
6875 (build_class_init_list): Likewise.
6876 * decl.c (pushdecl_class_level): Call check_template_shadow here
6877 ...
6878 (push_class_level_binding): ... not here.
6879 * search.c (dfs_push_type_decls): Only avoid
6880 template-self-reference TYPE_DECLs if they are from base classes.
6881
6882 1999-04-04 Mark Mitchell <mark@codesourcery.com>
6883
6884 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
6885 nodes. Tidy.
6886
6887 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
6888
6889 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
6890 (finish_struct_1): Don't call build_class_init_list.
6891
6892 1999-04-02 Mark Mitchell <mark@codesourcery.com>
6893
6894 * tinfo.h (__class_type_info): Fix illegal declaration.
6895
6896 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
6897 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
6898 (IDENTIFIER_CLASS_VALUE): Improve documentation.
6899 (is_properly_derived_from): Declare.
6900 (invalidate_class_lookup_cache): Likewise.
6901 (maybe_maybe_note_name_used_in_class): Likewise.
6902 (note_name_declared_in_class): Likewise.
6903 (push_using_decl): Remove duplicate declaration.
6904 (id_in_current_class): Remove declaration.
6905 (push_class_binding): Change prototype.
6906 (clear_identitifer_class_values): Declare.
6907 * call.c (is_properly_derived_from): Make it global.
6908 (build_new_function_call): Be careful about updating candidates.
6909 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
6910 asked to make illegal calls.
6911 * class.c: Include splay-tree.h.
6912 (class_stack_node): Add names_used slot.
6913 (check_member_decl_is_same_in_complete_scope): Remove.
6914 (add_method): Fix comment. Push the declaration into class
6915 scope.
6916 (finish_struct_1): When popping the class, pop the bindings too.
6917 Remove check for data member/function member conflict.
6918 (finish_struct): Remove calls to
6919 check_member_decl_is_same_in_complete_scope. Change calls to
6920 popclass.
6921 (pushclass): Clear names_used in the class stack entry.
6922 Use invalidate_class_lookup_cache to remove cached entries, rather
6923 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
6924 before entering a new class. Remove dead code. Don't mess with
6925 current_function_decl when pushing declarations.
6926 (invalidate_class_lookup_cache): New function, split out from ...
6927 (popclass): Here. Clean up names_used on our way out.
6928 (instantiate_type): Adjust.
6929 (build_self_reference): Don't push the declaration here.
6930 (maybe_note_name_used_in_class): New function.
6931 (note_name_declared_in_class): Likewise.
6932 * decl.c (add_binding): Change prototype.
6933 (find_class_binding_level): New function.
6934 (innermost_nonclass_level): Likewise.
6935 (current_binding_level): Update documentation.
6936 (inner_binding_level): Remove. Replace with current_binding_level
6937 throughout.
6938 (push_binding_level): Remove special handling of
6939 class_binding_level.
6940 (pop_binding_level): Likewise. Use find_class_binding_level.
6941 (suspend_binding_level): Likewise.
6942 (global_bindings_p): Use innermost_nonclass_level.
6943 (toplevel_bindings_p): Likewise.
6944 (namespace_bindings_p): Likewise.
6945 (pseudo_global_level_p): Likewise.
6946 (push_binding): Clear INHERITED_VALUE_BINDING_P.
6947 (add_binding): Check for illegal multiple declarations. Return a
6948 value indicating whether or not the new binding was legal.
6949 (push_local_binding): Skip over class binding levels. Check
6950 return value from add_binding.
6951 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
6952 note_name_declared_in_class.
6953 (pushlevel_class): Remove "fake out the rest of the compiler"
6954 code.
6955 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
6956 (clear_identifier_class_values): New function.
6957 (pop_from_top_level): Use it.
6958 (pop_everything): Tweak.
6959 (maybe_process_template_type_declaration): Don't push the
6960 declaration for the template here.
6961 (pushtag): Don't push tag declarations into class scope here.
6962 (pushdecl): Apply DeMorgan's law for readability.
6963 (pushdecl_class_level): Remove special-case code for
6964 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
6965 (push_class_level_bindng): Deal with inherited bindings.
6966 (lookup_name_real): Remove special-case code for
6967 TYPE_BEING_DEFINED, and some implicit typename magic.
6968 (grokdeclarator): Handle COMPONENT_REF for a template function.
6969 (build_enumerator): Don't call pushdecl_class_level here.
6970 (id_in_current_class): Remove.
6971 * decl2.c (grokfield): Don't call pushdecl_class_level or
6972 check_template_shadow.
6973 * errfn.c (cp_file_of): Don't declare.
6974 (cp_line_of): Likewise.
6975 * error.c (dump_decl): Handle an OVERLOAD.
6976 (cp_file_of): Likewise.
6977 (cp_line_of): Likewise.
6978 * init.c (build_member_call): Handle a COMPONENT_REF.
6979 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
6980 pushdecl_class_level.
6981 * method.c (hack_identifier): Build COMPONENT_REFs for references
6982 to member templates as well as member functions. Remove dead
6983 code.
6984 * parse.y (left_curly): Remove.
6985 (nonnested_type): Call maybe_note_name_used_in_class, not
6986 pushdecl_class_level.
6987 * parse.c: Regenerated.
6988 (nested_name_specifier_1): Likewise.
6989 * pt.c (check_explicit_specialization): Adjust, for robustness.
6990 (check_template_shadow): Handle OVERLOADs.
6991 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
6992 TEMPLATE_DECL, if appropriate.
6993 * search.c (envelope_add_decl): Remove.
6994 (dfs_pushdecls): Likewise.
6995 (dfs_compress_decls): Likewise.
6996 (dfs_push_decls): New function.
6997 (dfs_push_type_decls): Likewise.
6998 (setup_class_bindings): Likewise.
6999 (template_self_reference_p): Likewise.
7000 (lookup_field_r): Use it.
7001 (looup_member): Remove old comment. Deal with ambiguity.
7002 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
7003 and remove envelope processing.
7004 * semantics.c (begin_class_definition): Let pushclass push
7005 declarations for base classes.
7006 (finish_member_declaration): Push declarations into class scope.
7007 * typeck.c (build_component_ref): Just put an OVERLOAD into the
7008 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
7009 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
7010 * Makefile.in (class.o): Depend on splay-tree.h.
7011
7012 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
7013
7014 * cvt.c (convert_pointer_to_real): Use same_type_p.
7015 * typeck.c (comp_target_types): Use same_type_p.
7016
7017 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
7018
7019 * semantics.c (begin_inline_definitions,
7020 finish_inline_definitions): Rename from finish_default_args and
7021 begin_inline_definitions, respectively, to something that isn't a
7022 total lie. :)
7023 * parse.y (structsp): Adjust.
7024
7025 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
7026 (list_hash_lookup): Likewise.
7027 (hash_tree_chain): Adjust.
7028 * pt.c (tsubst): Adjust.
7029 (tsubst_arg_types): Use plain hash_tree_cons.
7030 * cp-tree.h (hash_tree_cons_simple): Lose.
7031 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
7032
7033 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7034
7035 * Makefile.in (hash.h): Generate using gperf language 'C', not
7036 'KR-C', so gperf uses the `const' keyword on strings.
7037
7038 * gxx.gperf (resword): Const-ify a char*.
7039
7040 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
7041
7042 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
7043 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
7044 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
7045 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
7046 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
7047 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
7048 tree.c: Adjust.
7049
7050 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
7051
7052 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
7053
7054 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
7055
7056 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
7057
7058 1999-03-27 Mark Mitchell <mark@codesourcery.com>
7059
7060 * cp-tree.h (add_friend): Declare.
7061 (add_friends): Likewise.
7062 * friend.c (add_friend): Make it global. Don't add to
7063 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
7064 (add_friends): Make it global.
7065 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
7066 befriending class is a template.
7067 * parse.y (component_decl_1): Fix typo in comment.
7068 * parse.c: Regenerated.
7069 * pt.c (instantiate_class_template): Use add_friend and
7070 add_friends rather that duplicating some of their functionality
7071 here.
7072
7073 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
7074
7075 * call.c (build_field_call): Unify 'this' and non-'this' cases.
7076
7077 * typeck.c (build_indirect_ref): Check for 'this' sooner.
7078
7079 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7080
7081 * call.c (op_error): Const-ify a char*.
7082 (add_candidate, source_type, add_warning): Add static prototype.
7083 (print_z_candidates): Const-ify a char*.
7084
7085 * class.c (resolve_address_of_overloaded_function,
7086 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
7087 (get_vtable_name, finish_struct_1): Const-ify a char*.
7088
7089 * cvt.c (convert_to_reference): Likewise.
7090
7091 * decl.c (redeclaration_error_message, record_builtin_type,
7092 record_unknown_type, member_function_or_else, bad_specifiers):
7093 Likewise.
7094 (find_binding, select_decl, unqualified_namespace_lookup,
7095 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
7096 Add static prototype.
7097 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
7098 implicitly_declare, record_builtin_java_type, define_function,
7099 grok_op_properties, tag_name): Const-ify a char*.
7100
7101 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
7102 (define_function, finish_builtin_type): Const-ify a char*.
7103 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
7104 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
7105 (file_name_nondirectory): Const-ify a char*.
7106 (init_filename_times): Don't prototype.
7107 (compiler_error): Prototype.
7108 (yyerror, init_repo): Const-ify a char*.
7109 (build_srcloc): Don't prototype.
7110 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
7111 Const-ify a char*.
7112 (warn_for_assignment): Don't prototype.
7113 (convert_for_initialization, readonly_error, check_for_new_type,
7114 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
7115 Const-ify a char*.
7116
7117 * decl2.c (acceptable_java_type, output_vtable_inherit,
7118 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
7119 merge_functions, decl_namespace, validate_nonmember_using_decl,
7120 do_nonmember_using_decl): Add static prototype.
7121 (lang_f_options): Const-ify a char*.
7122 (finish_builtin_type): Likewise.
7123 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
7124 prototype.
7125
7126 * errfn.c: Include cp-tree.h.
7127 (cp_thing): Add static prototype.
7128 (compiler_error): Don't protoptype.
7129 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
7130 passing it to `cp_thing'.
7131
7132 * error.c (interesting_scope_p): Add static prototype.
7133
7134 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
7135 a char*.
7136
7137 * init.c (compiler_error): Don't prototype.
7138 (member_init_ok_or_else): Const-ify a char*.
7139 (build_java_class_ref): Add static prototype.
7140
7141 * lex.c (compiler_error): Don't prototype.
7142 (get_time_identifier, interface_strcmp, extend_token_buffer,
7143 handle_cp_pragma): Const-ify a char*.
7144 (is_global, init_filename_times): Add static prototype.
7145 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
7146 (compiler_error): Change from fixed args to variable args.
7147 (yyerror): Const-ify a char*.
7148
7149 * parse.y (cond_stmt_keyword): Const-ify a char*.
7150 (parse_decl): Add static prototype.
7151
7152 * pt.c (template_args_equal, print_template_context): Likewise.
7153 (print_candidates, check_default_tmpl_args): Const-ify a char*.
7154 (instantiate_class_template): Likewise.
7155
7156 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
7157
7158 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
7159 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
7160
7161 * search.c (lookup_field_info, lookup_member): Likewise.
7162 (lookup_member): Cast the first argument of `bzero' to a PTR.
7163
7164 * sig.c (compiler_error): Don't prototype.
7165 (build_signature_pointer_or_reference_nam): Const-ify a char*.
7166 (get_sigtable_name, build_member_function_pointer): Likewise.
7167
7168 * tree.c (compiler_error): Don't prototype.
7169 (no_linkage_helper, build_srcloc): Add static prototype.
7170 (build_vbase_pointer_fields): Const-ify a char*.
7171 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
7172
7173 * typeck.c (compiler_error): Don't prototype.
7174 (convert_for_assignment): Const-ify a char*.
7175 (comp_cv_target_types): Add static prototype.
7176 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
7177 build_component_addr, build_unary_op, convert_for_initialization):
7178 Const-ify a char*.
7179
7180 * typeck2.c (ack): Add static prototype and change from fixed args
7181 to variable args.
7182 (readonly_error, check_for_new_type): Const-ify a char*.
7183
7184 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
7185 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
7186 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
7187 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
7188 gen_assign, GNU_xref_member): Const-ify a char*.
7189
7190 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
7191
7192 * gxxint.texi: Remove old discussion on copying virtual bases.
7193
7194 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
7195
7196 * Make-lang.in: Remove all references to g++.o/g++.c.
7197 Link g++ from gcc.o.
7198
7199 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
7200
7201 * decl2.c (comdat_linkage): Treat vtables like functions.
7202
7203 1999-03-25 Mark Mitchell <mark@codesourcery.com>
7204
7205 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
7206
7207 1999-03-25 Nathan Sidwell <nathan@acm.org>
7208
7209 * decl.c (init_decl_processing): Add `signed' type as a synonym
7210 for `int'.
7211
7212 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
7213
7214 * typeck.c (common_type): Handle cv-qual unification for pointers
7215 to members.
7216
7217 * decl.c (unqualified_namespace_lookup): Return error_mark_node
7218 on error.
7219 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
7220 * lex.c (do_identifier): If we got error_mark_node, call
7221 lookup_name again.
7222
7223 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
7224
7225 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
7226 classes.
7227
7228 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
7229
7230 * decl.c (lookup_name_real): Do nested field lookup regardless of
7231 TYPE_BEING_DEFINED.
7232
7233 1999-03-24 Mark Mitchell <mark@codesourcery.com>
7234
7235 * cp-tree.h (lang_type): Remove has_assignment and
7236 has_real_assignment. Add befriending_classes.
7237 (TYPE_HAS_ASSIGNMENT): Remove.
7238 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
7239 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
7240 (lang_decl): Document.
7241 (DECL_BEFRIENDING_CLASSES): New macro.
7242 (FRIEND_NAME): Move declaration to more obvious location.
7243 (FRIEND_DECLS): Likewise.
7244 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
7245 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
7246 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
7247 (grok_op_properties): Likewise.
7248 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
7249 (add_friend): Likewise. Don't do weird things with assignment
7250 operators. Update DECL_BEFRIENDING_CLASSES.
7251 (add_friends): Don't do weird things with assignment operators.
7252 (make_friend_class): Likewise. Update
7253 CLASSTYPE_BEFRIENDING_CLASSES.
7254 * pt.c (instantiate_class_template): Don't set
7255 TYPE_HAS_ASSIGNMENT.
7256 (tsubst_copy): Substitute the TREE_TYPE for more unary
7257 expressions.
7258 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
7259 * search.c (protected_accessible_p): New function.
7260 (friend_accessible_p): Likewise.
7261 (accessible_p): Use them.
7262
7263 1999-03-23 Mark Mitchell <mark@codesourcery.com>
7264
7265 * pt.c (convert_nontype_argument): Don't create things that aren't
7266 PTRMEM_CSTs when applying a qualification conversion to a
7267 PTRMEM_CST.
7268
7269 1999-03-23 Mark Mitchell <mark@codesourcery.com>
7270
7271 * Makefile.in (OBJS): Don't mention hash.o.
7272 (OBJDEPS): Likewise.
7273
7274 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
7275
7276 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
7277 * decl.c (expand_static_init): Make sure we don't add any after
7278 then.
7279
7280 * decl.c (cp_finish_decl): Move intelligence about handling
7281 DECL_COMDAT for variables from here...
7282 * decl2.c (comdat_linkage): ...to here.
7283 (maybe_make_one_only): Tweak.
7284 (import_export_decl): Call comdat_linkage for variables, too.
7285 (finish_file): Handle template statics properly.
7286
7287 1999-03-22 Mark Mitchell <mark@codesourcery.com>
7288
7289 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
7290 Document internals of pointer-to-member-functions.
7291 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
7292 (PFN_FROM_PTRMEMFUNC): Likewise.
7293 (build_type_conversion): Remove unused parameter.
7294 (build_ptrmemfunc1): Declare.
7295 (expand_ptrmemfunc_cst): New function.
7296 (delta2_from_ptrmemfunc): Likewise.
7297 (pfn_from_ptrmemfunc): Likewise.
7298 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
7299 build_type_conversion. Use TYPE_PTRMEM_P for readability.
7300 (convert_to_reference): Remove unused parameter to
7301 build_type_conversion.
7302 (ocp_convert): Likewise.
7303 (build_user_type_conversion): Likewise.
7304 * error.c (dump_expr): Handle NULL pointer-to-member functions.
7305 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
7306 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
7307 open when handling pointer-to-member functions.
7308 * pt.c (convert_nontype_argument): Clean up error messages. Be
7309 more stringent with pointers-to-members.
7310 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
7311 (build_unary_op): Tidy ever-so-slightly.
7312 (build_conditional_expr): Remove extra parameter to
7313 build_type_conversion.
7314 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
7315 we're using.
7316 (expand_ptrmemfunc_cst): Define.
7317 (delta2_from_ptrmemfunc): Likewise.
7318 (pfn_from_ptrmemfunc): Likewise.
7319
7320 1999-03-19 Mark Mitchell <mark@codesourcery.com>
7321
7322 * init.c (build_member_call): Handle template-id expressions
7323 correctly.
7324 * typeck.c (build_x_function_call): Likewise.
7325
7326 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
7327
7328 * friend.c (make_friend_class): Avoid core dump when
7329 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
7330
7331 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
7332
7333 * decl.c (start_function): Suppress normal linkage heuristics
7334 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
7335
7336 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
7337
7338 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
7339 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
7340
7341 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
7342
7343 * parse.y (named_complex_class_head_sans_basetype):
7344 Do not push a scope for error_mark_node.
7345 (maybe_base_class_list): Likewise.
7346
7347 * decl.c (start_decl): Check for error_mark_node as a type.
7348 Detected by g++.brendan/array-refs.C.
7349 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
7350 (maybe_build_cleanup_1): Likewise. Detected by
7351 g++.jason/incomplete1.C.
7352
7353 * tree.c (build_dummy_object): Use void_zero_node instead of the
7354 error_mark_node.
7355 (is_dummy_object): Check for such a node.
7356 Detected by g++.bob/inherit1.C
7357
7358 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
7359
7360 * method.c (old_backref_index): Split out...
7361 (flush_repeats): From here. Rename back from try_old_backref.
7362 (build_mangled_name): Put back some old-style repeat handling.
7363
7364 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7365
7366 * lex.c: Don't include setjmp.h.
7367 (parse_float): New static function.
7368 (pf_args): New struct.
7369 (real_yylex): Use them in call to `do_float_handler'.
7370
7371 1999-03-15 Mark Mitchell <mark@markmitchell.com>
7372
7373 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
7374 * tree.c (layout_basetypes): Not here.
7375 * search.c (dfs_search): Remove; no longer used.
7376
7377 1999-03-12 Mark Mitchell <mark@markmitchell.com>
7378
7379 * decl2.c (validate_nonmember_using_decl): Issue sensible
7380 error-messages on bogus qualifiers.
7381
7382 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
7383
7384 * call.c (add_function_candidate): Fix uninitialized variable.
7385
7386 * Makefile.in (search.o): Add dependency on varray.h.
7387
7388 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
7389
7390 * decl.c (duplicate_decls): Use same_type_p.
7391 * method.c (try_old_backref): Renamed from flush_repeats. Use
7392 same_type_p. Don't try to handle repeats. Return success.
7393 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
7394 calls from old-style code, too.
7395 (check_ktype): Use same_type_p.
7396 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
7397 (build_qualified_name): Simplify logic.
7398 (process_overload_item): Strip typedefs and quals at the top.
7399 (build_mangled_name_for_type_with_Gcode): Remove call to
7400 type_canonical_variant.
7401 (build_mangled_name): Likewise. Remove support for old-style
7402 repeats, which have been disabled since 2.7.2. Don't mess with
7403 TREE_USED.
7404 (build_decl_overload_real): Don't mess with TREE_USED.
7405
7406 1999-03-13 Nathan Sidwell <nathan@acm.org>
7407
7408 * error.c (cp_printers): Add 'F' escape character.
7409 (dump_type_real): Remove TREE_LIST (fnargs) printing.
7410 Functionality moved to dump_parameters.
7411 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
7412 (dump_function_decl): Extend meaning of V parameter. Use
7413 dump_parameters and dump_exception_spec.
7414 (dump_parameters): New static function.
7415 (dump_exception_spec): New static function.
7416 (fndecl_as_string): Change argument semantics. Use
7417 dump_function_decl directly.
7418
7419 * sig.c (build_signature_table_constructor): Use cp_error.
7420
7421 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
7422
7423 * semantics.c (finish_switch_cond): Handle error cases gracefully.
7424 Detected by g++.law/enum5.C.
7425
7426 * typeck.c (build_modify_expr): Check for errors after resolving
7427 offsets. Detected by g++.brendan/static1.C.
7428
7429 * decl.c (complete_array_type): Ignore initial_value if it is an
7430 error. Detected by g++.benjamin/17930.C.
7431
7432 * typeck2.c (process_init_constructor): Return error if one argument
7433 is in error. Detected by g++.benjamin/13478.C.
7434
7435 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
7436
7437 * decl.c (select_decl): Allow class templates when we need types.
7438 * decl2.c (ambiguous_decl): Likewise.
7439
7440 1999-03-12 Mark Mitchell <mark@markmitchell.com>
7441
7442 * lex.c (do_identifier): Correct call to enforce_access.
7443 * search.c (accessible_p): Tweak comment.
7444
7445 1999-03-10 Mark Mitchell <mark@markmitchell.com>
7446
7447 * semantics.c (begin_class_definition): Call build_self_reference.
7448 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
7449
7450 * search.c (assert_canonical_unmarked): Fix typo in prototype.
7451
7452 * search.c (dfs_canonical_queue): New function.
7453 (dfs_assert_unmarked_p): Likewise.
7454 (assert_canonical_unmarked): Likewise.
7455 (access_in_type): Use it.
7456 (accessible_p): Likewise. Walk the whole tree when umarking.
7457
7458 * sig.c (build_signature_table_constructor): Use accessible_p
7459 instead of compute_access.
7460
7461 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
7462
7463 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
7464
7465 1999-03-09 Mark Mitchell <mark@markmitchell.com>
7466
7467 * cp-tree.h (flag_access_control): Declare.
7468 (TREE_VIA_PPUBLIC): Document.
7469 (DECL_NONSTATIC_MEMBER_P): New macro.
7470 (enforce_access): Return an indication of whether or not access
7471 was permitted.
7472 (build_self_reference): Change prototype.
7473 (compute_access): Replace with ...
7474 (accessible_p): New function.
7475 (dfs_walk): Change prototype.
7476 (dfs_unmark): Likewise.
7477 (markedp): Likewise.
7478 * call.c (enforce_access): Use accessible_p.
7479 * class.c (build_self_reference): Insert the declaration into the
7480 list of members for this type, and make it public.
7481 * decl.c (xref_basetypes): Avoid ill-timed recursion.
7482 * init.c (build_offset_ref): Use lookup_member, not three separate
7483 name-lookups. Call enforce_access rather than checking for
7484 illegal accesses here.
7485 (resolve_offset_ref): Likewise.
7486 * lex.c (do_identifier): Likewise.
7487 * method.c (hack_identifier): Likewise.
7488 * parse.y (self_reference): Remove.
7489 (opt_component_decl_list): Don't use it.
7490 * parse.c: Regenerated.
7491 * pt.c (print_candidates): Generalize to handle lists of
7492 overloaded functions.
7493 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
7494 not set.
7495 (get_template_base): Use new calling convention for dfs_walk.
7496 * search.c: Include varray.h. Add prototypes.
7497 (dfs_walk): Accept a data pointer to pass to the work functions.
7498 All callers changed. All work functions changed.
7499 (breadth_first_search): Rename to bfs_walk, and make consistent
7500 with dfs_walk.
7501 (dfs_walk_real): New function.
7502 (canonical_binfo): New function.
7503 (context_for_name_lookup): Likewise.
7504 (shared_marked_p): Likewise.
7505 (shared_unmarked_p): Likewise.
7506 (lokup_field_queue_p): Likewise.
7507 (lookup_field_r): Generalize to handle both functions and fields.
7508 (lookup_field): Just call lookup_member.
7509 (lookup_fnfields): Likewise.
7510 (lookup_member): Move body of lookup_field here and generalize.
7511 (dfs_accessible_queue_p): Likewise.
7512 (dfs_accessible_p): Likewise.
7513 (dfs_access_in_type): Likewise.
7514 (access_in_type): Likewise.
7515 (compute_access): Remove, and replace with ...
7516 (accessible_p): New function.
7517 (vbase_types): Remove.
7518 (vbase_decl_ptr_intermediate): Likewise.
7519 (vbase_decl_ptr): Likewise.
7520 (vbase_init_result): Likewise.
7521 (closed_envelopes): Likewise.
7522 (bvtable): Likewise.
7523
7524 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
7525
7526 * call.c (add_function_candidate): Check for proper number of args
7527 before checking the validity of those args.
7528
7529 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
7530
7531 * cp-tree.h (struct lang_type): Add anon_union field.
7532 (ANON_UNION_TYPE_P): Use it instead of examining type.
7533 (SET_ANON_UNION_TYPE_P): New macro.
7534 * decl.c (check_tag_decl): Use it.
7535
7536 * search.c (compute_access): Handle non-type contexts earlier, and
7537 handle NULL_TREE.
7538
7539 * tree.c (build_exception_variant): Use copy_to_permanent.
7540
7541 * decl2.c (setup_initp): Give statics with no priority the default
7542 priority here.
7543 (do_dtors, do_ctors, finish_file): Remove special handling of
7544 non-prioritized statics.
7545
7546 1999-03-05 Mark Mitchell <mark@markmitchell.com>
7547
7548 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
7549 * decl.c (make_typename_type): Don't issue an error if an
7550 immediate lookup fails; it migt be resolved later.
7551 * friend.c (is_friend): Add comment.
7552 * search.c (breadth_first_search): Add POSTFN and DATA
7553 parameters. Tidy. All callers changed.
7554 (lookup_field_queue_p): New function.
7555 (lookup_field_r): Likewise.
7556 (lookup_field_post): Likewise.
7557 (lookup_field): Use them, via breadth_first_search, instead of
7558 duplicating logic.
7559 (compute_access): Robustify.
7560 (lookup_fnfield_info): New structure.
7561
7562 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
7563
7564 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
7565
7566 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
7567
7568 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
7569 cc happy.
7570
7571 * decl2.c (import_export_class): Also return if
7572 CLASSTYPE_INTERFACE_ONLY is set.
7573
7574 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
7575
7576 * decl.c (push_overloaded_decl): Only overwrite the old binding if
7577 there was one.
7578 * decl2.c (do_local_using_decl): Fix loop termination.
7579
7580 1999-03-02 Mark Mitchell <mark@markmitchell.com>
7581
7582 * cp-tree.h (determine_specialization): Don't declare.
7583 * pt.c (determine_specialization): Make it static. Eliminate
7584 complain parameter. Note that decl is always non-NULL now, and
7585 simplify accordingly.
7586
7587 * decl.c (maybe_push_to_top_level): Always call
7588 push_cp_function_context.
7589 (pop_from_top_level): Always call pop_cp_function_context.
7590
7591 1999-02-26 Nathan Sidwell <nathan@acm.org>
7592
7593 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
7594 diagnostics.
7595 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
7596 * init.c (build_new_1): Extra arg to complete_type_or_else.
7597 (build_delete): Likewise.
7598 * typeck.c (require_complete_type): Likewise.
7599 (pointer_int_sum): Likewise.
7600 (pointer_diff): Likewise.
7601 (build_component_ref): Likewise.
7602
7603 * typeck2.c (incomplete_type_error): Always use cp_error.
7604 Show declaration of undefined type, if appropriate.
7605 Deal with UNKNOWN_TYPE nodes.
7606
7607 * typeck.c (require_complete_type): Use TYPE_SIZE as
7608 size_zero_node to mean incomplete type.
7609 (require_complete_type_in_void): New function.
7610 (build_compound_expr): Call complete_type_in_void for LHS.
7611 (build_c_cast): Call complete_type_in_void for void cast.
7612 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
7613 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
7614 require_complete_type_in_void. Call it.
7615 * cp-tree.h (require_complete_type_in_void): Prototype new function.
7616
7617 * typeck.c (convert_arguments): Use alternative format for
7618 function decls. Don't require_complete_type here. Simplify
7619 diagnostic printing.
7620 (convert_for_initialization): Don't require_complete_type on RHS yet.
7621 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
7622
7623 * call.c (build_over_call): Cope with qualified void return type.
7624 * semantics.c (finish_call_expr): Likewise.
7625 * typeck.c (build_function_call_real): Likewise.
7626 (c_expand_return): Likewise.
7627 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
7628
7629 * call.c (print_z_candidates): Use alternate print format, to be
7630 consistent with (pt.c) print_candidates.
7631 * method.c (hack_identifier): List candidate members.
7632 * search.c (lookup_field): Build ambiguous list, and show it, if
7633 ambiguous.
7634
7635 1999-02-26 Mark Mitchell <mark@markmitchell.com>
7636
7637 * typeck.c (decay_conversion): Don't confuse constant array
7638 variables with their initializers.
7639
7640 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
7641 merging decls.
7642 * pt.c (regenerate_decl_from_template): Tweak for clarity.
7643 (instantiate_decl): Mark a decl instantiated before regenerating
7644 it to avoid recursion.
7645 * tree.c (mapcar): Don't call decl_constant_value unless we know
7646 something is TREE_READONLY_DECL_P.
7647
7648 * class.c (check_for_override): Don't stop checking when we find
7649 the first overridden function. Delete #if 0'd code.
7650 * search.c (get_matching_virtual): Likewise.
7651
7652 1999-02-25 Richard Henderson <rth@cygnus.com>
7653
7654 * lang-specs.h: Define __FAST_MATH__ when appropriate.
7655
7656 1999-02-24 Mike Stump <mrs@wrs.com>
7657
7658 * typeck.c (convert_for_assignment): Allow boolean integral constant
7659 expressions to convert to null pointer.
7660
7661 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
7662
7663 * decl.c (lookup_namespace_name): Resolve namespace aliases.
7664
7665 * class.c (push_nested_class): Allow namespaces.
7666
7667 * decl2.c (set_decl_namespace): Add friendp parameter.
7668 * decl.c (grokfndecl): Pass it.
7669 (grokvardecl): Likewise.
7670 * cp-tree.h: Change declaration.
7671
7672 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
7673
7674 * pt.c (tsubst): Allow an array of explicit size zero.
7675
7676 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
7677
7678 * errfn.c: Change varargs code to look like toplev.c.
7679
7680 * method.c (process_modifiers): Don't prepend 'U' for char or
7681 wchar_t.
7682
7683 1999-02-20 Craig Burley <craig@jcb-sc.com>
7684
7685 * Make-lang.in (cplib2.ready): Don't consider updating
7686 cplib2 stuff if the current directory isn't writable, as
7687 it won't work (such as during a `make install').
7688
7689 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
7690
7691 * decl2.c (start_objects): Make file scope constructors and
7692 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
7693 ASM_OUTPUT_DESTRUCTOR are defined.
7694
7695 1999-02-19 Mark Mitchell <mark@markmitchell.com>
7696
7697 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
7698 (fn_type_unification): Adjust prototype.
7699 (lookup_fnfields_1): Declare.
7700 * call.c (add_template_candidate_real): Adjust call to
7701 fn_type_unification.
7702 * class.c (add_method): Don't allow duplicate declarations of
7703 constructors or destructors.
7704 (resolve_address_of_overloaded_function): Remove unused variable.
7705 Adjust call to fn_type_unification.
7706 * decl.c (grokfndecl): Be more robust in the face of illegal
7707 specializations.
7708 * decl2.c (check_classfn): Remove hokey handling of member
7709 templates.
7710 * pt.c (determine_specialization): Improve comments. Adjust to
7711 handle template argument deduction as per the standard.
7712 (check_explicit_specialization): Fix comment spacing. Handle
7713 type-conversion operators correctly. Improve error-recovery.
7714 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
7715 (get_bindings_real): Simplify handling of static members.
7716 * search.c (lookup_fnfields_1): Make it have external linkage.
7717 * typeck.c (compparms): Fix comment.
7718 (build_unary_op): Don't try to figure out which template
7719 specialization is being referred to when when the address-of
7720 operator is used with a template function.
7721
7722 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7723
7724 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
7725 keyword to match an analogous change at the top level.
7726
7727 * tree.c (lvalue_or_else): Likewise.
7728
7729 1999-02-17 Mark Mitchell <mark@markmitchell.com>
7730
7731 * decl.c (xref_basetypes): Comment.
7732 * pt.c (instantiate_class_template): Use xref_basetypes.
7733
7734 1999-02-16 Mark Mitchell <mark@markmitchell.com>
7735
7736 * cp-tree.h (tsubst): Change prototype.
7737 (tsubst_expr): Likewise.
7738 (tsubst_copy): Likewise.
7739 (type_unification): Remove prototype.
7740 * call.c (convert_default_arg): Adjust call to tsubst_expr.
7741 * class.c (resolve_address_of_overloaded_function): Just use
7742 fn_type_unification.
7743 * decl.c (grokdeclarator): Adjust call to tsubst.
7744 * method.c (build_template_parm_names): Likewise.
7745 * pt.c (GTB_VIA_VIRTUAL): New macro.
7746 (GTB_IGNORE_TYPE): Likewise.
7747 (resolve_overloaded_unification): Add `complain' parameter.
7748 (try_one_overload): Likewise.
7749 (tsubst_template_arg_vector): Likewise.
7750 (tsubst_template_parms): Likewise.
7751 (tsubst_aggr_type): Likewise.
7752 (tsubst_arg_types): Likewise.
7753 (tsubst_call_declarator_parms): Likewise.
7754 (unify): Remove explicit_mask.
7755 (type_unification_real): Likewise.
7756 (get_template_base_recursive): Likewise.
7757 (coerce_template_template_parms): Provide prototype.
7758 (tsubst_function_type): Likewise.
7759 (try_class_unification): New function.
7760 All callers changed to use new complain parameter.
7761 (get_template_base): Use try_class_unification.
7762 (unify): Adjust handling of classes derived from template types.
7763 (fn_type_unification): Substitute explicit arguments before
7764 unification.
7765
7766 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7767
7768 * decl.c (pushdecl): Remove dead code.
7769
7770 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
7771
7772 * decl2.c (finish_objects): Fix code I missed in previous change.
7773
7774 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
7775
7776 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
7777 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
7778
7779 * pt.c (maybe_process_partial_specialization): Complain about
7780 'template <>' on non-specialization.
7781
7782 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
7783
7784 * decl.c (grokdeclarator): Catch wierd declarators.
7785 * decl2.c (finish_file): Don't abort because of namespace parsing
7786 failure.
7787 (check_decl_namespace): Remove.
7788
7789 1999-02-09 Mark Mitchell <mark@markmitchell.com>
7790
7791 * cp-tree.h (get_template_base): Don't declare.
7792 (dfs_walk): Declare.
7793 (dfs_unmark): Likewise.
7794 (markedp): Likewise.
7795 * pt.c (unify): Remove duplicate declaration. Pass tparms and
7796 targs to get_template_base.
7797 (get_template_base_recursive): Move here from search.c. Check to
7798 see that the base found can be instantiated to form the desired
7799 type.
7800 (get_template_base): Likewise.
7801 (get_class_bindings): Simplify.
7802 * search.c (get_template_base_recursive): Move to pt.c.
7803 (get_template_base): Likewise.
7804 (markedp): Make it global.
7805 (dfs_walk): Likewise.
7806 (dfs_unmark): Likewise.
7807
7808 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
7809
7810 * pt.c (maybe_process_partial_specialization): Complain about
7811 specialization in wrong namespace.
7812 * tree.c (decl_namespace_context): New fn.
7813
7814 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7815
7816 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
7817 * pt.c (coerce_template_template_parms): Handle nested
7818 template template parameters.
7819
7820 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
7821
7822 * typeck2.c: Update email addresses.
7823
7824 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7825
7826 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
7827 turned off.
7828
7829 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
7830
7831 * lex.c (retrofit_lang_decl): Split out...
7832 (build_lang_decl): From here.
7833 * decl.c (pushdecl): Call it for functions generated by the middle
7834 end that don't have DECL_LANG_SPECIFIC.
7835 * cp-tree.h: Declare it.
7836
7837 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
7838 (start_objects, finish_objects): Only use special
7839 init_priority code if the user specified a priority.
7840 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
7841 objects.
7842
7843 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
7844
7845 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
7846 mkstemp.o. Get them from libiberty now.
7847 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
7848
7849 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7850
7851 * decl2.c (lang_decode_option): Use read_integral_parameter.
7852
7853 1999-02-01 Mark Mitchell <mark@markmitchell.com>
7854
7855 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
7856 before calling complete_type_or_else.
7857
7858 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7859
7860 * input.c (inline): Don't define, its handled by system.h.
7861
7862 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
7863
7864 * decl2.c: Don't define flag_no_ident here. Don't process
7865 -f(no-)ident here.
7866 * cp-tree.h: Don't declare flag_no_ident here.
7867 * lang-specs.h: Map -Qn to -fno-ident.
7868
7869 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
7870
7871 * cp-tree.h (struct tree_binding): Replace scope field with a union.
7872 (BINDING_SCOPE): Adjust.
7873 * decl.c (BINDING_LEVEL): Adjust.
7874
7875 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
7876
7877 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
7878 member constants.
7879
7880 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
7881 a ctor initializer.
7882
7883 * tree.c (equal_functions): Fix name in prototype.
7884
7885 * decl.c (push_local_binding): Add FLAGS argument.
7886 (pushdecl, push_overloaded_decl): Pass it.
7887 * decl2.c (do_local_using_decl): Likewise.
7888 * cp-tree.h: Adjust prototype.
7889 * decl.c (poplevel): Fix logic.
7890
7891 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
7892 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
7893 (cat_namespace_levels): Don't loop forever.
7894
7895 1999-01-25 Richard Henderson <rth@cygnus.com>
7896
7897 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
7898
7899 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
7900
7901 * class.c (resolve_address_of_overloaded_function): Mark the
7902 chosen function used.
7903
7904 * call.c (build_call): Make sure that a function coming in has
7905 been marked used already.
7906 * decl.c (expand_static_init): Call mark_used instead of
7907 assemble_external.
7908 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
7909 alloc_eh_object, expand_throw): Likewise.
7910 * init.c (build_builtin_delete_call): Likewise.
7911 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
7912 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
7913 expand_generic_desc): Likewise.
7914
7915 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
7916
7917 * tree.c (equal_functions): New function.
7918 (ovl_member): Call it.
7919
7920 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
7921
7922 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
7923
7924 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
7925
7926 * decl.c (decls_match): Return 1 if old and new are identical.
7927 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
7928
7929 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
7930
7931 * decl.c (start_function): Make member functions one_only on windows.
7932 * decl2.c (import_export_decl): Likewise.
7933
7934 * decl.c (grokdeclarator): Don't complain about implicit int in
7935 a system header. Change same-name field check to not complain in
7936 a system header instead of within extern "C".
7937
7938 1999-01-21 Mark Mitchell <mark@markmitchell.com>
7939
7940 * cp-tree.h (PUSH_GLOBAL): New macro.
7941 (PUSH_LOCAL): Likewise.
7942 (PUSH_USING): Likewise.
7943 (namespace_bindings_p): Declare.
7944 (push_overloaded_decl): Likewise.
7945 * decl.c (push_overloaded_decl): Don't make it static. Check for
7946 illegal declarations after using declarations here.
7947 (namespace_bindings_p): Likewise.
7948 (duplicate_decls): Don't consider declarations from different
7949 namespaces to be the same.
7950 (pushdecl): Use symbolic PUSH_ constants in calls to
7951 push_overloaded_decl.
7952 (push_overloaded_decl_1): Likewise.
7953 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
7954 (do_nonmember_using_decl): Check for illegal using declarations
7955 after ordinary declarations here.
7956 (do_local_using_decl): Call pushdecl to insert declarations.
7957
7958 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
7959
7960 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
7961
7962 1999-01-21 Mark Mitchell <mark@markmitchell.com>
7963
7964 * tree.c (build_cplus_array_type_1): Don't call build_array_type
7965 for types involving template parameters.
7966
7967 * cp-tree.h (PARM_DECL_EXPR): Delete.
7968 (convert_default_arg): Change prototype.
7969 (check_default_argument): Declare.
7970 (search_tree): Likewise.
7971 * call.c (convert_default_arg): Take the function to which the
7972 default argument belongs as a parameter, and do any necessary
7973 instantiation here, instead of ...
7974 (build_over_call): Here.
7975 * decl.c (local_variable_p): New function.
7976 (check_default_argument): Likewise, split out and tidied from ...
7977 (grokparms): Here.
7978 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
7979 * pt.c (tsubst_call_declarator_parms): New function.
7980 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
7981 with CALL_EXPRs, rather than trying to be clever.
7982 (tsubst): Use tsubst_call_declarator_parms.
7983 * tree.c (search_tree): Don't make it static.
7984 * typeck.c (convert_arguments): Use new interface to
7985 convert_default_arg.
7986
7987 1999-01-20 Mark Mitchell <mark@markmitchell.com>
7988
7989 * error.c (dump_function_decl): Don't print the argument types for
7990 a function when the verbosity level is negative.
7991
7992 * call.c (build_over_call): Check format attributes at call-time.
7993
7994 * pt.c (tsubst_copy): Fix comment.
7995 (unify): Don't allow unification with variable-sized arrays.
7996
7997 * semantics.c (finish_stmt_expr): When processing a template make
7998 the BIND_EXPR long-lived.
7999
8000 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
8001
8002 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
8003 (import_export_vtable): Not here.
8004
8005 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
8006
8007 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
8008 non-static member function.
8009
8010 1999-01-18 Nathan Sidwell <nathan@acm.org>
8011
8012 * class.c (instantiate_type): Only diagnose illegal address of member
8013 function if complaining.
8014
8015 * decl.c (lookup_name_real): Remove duplicate code.
8016
8017 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
8018
8019 * tree.c (copy_template_template_parm): Use permanent_obstack.
8020
8021 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8022
8023 * pt.c (unify): Remove restrictions on deduction of argument
8024 of template template parameters.
8025
8026 1999-01-18 Nathan Sidwell <nathan@acm.org>
8027
8028 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
8029
8030 * class.c (resolve_address_of_overloaded_function): Show list of
8031 all candidates, when none of them match.
8032
8033 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
8034
8035 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
8036 definition of 'casting away const' in reinterpret_cast<>.
8037
8038 1999-01-18 Graham <grahams@rcp.co.uk>
8039
8040 * cvt.c: Add include for decl.h, remove extern for
8041 static_aggregates which is now provided by decl.h.
8042
8043 * Makefile.in (cvt.o): Add dependency for decl.h and missing
8044 dependencies for convert.h and flags.h.
8045
8046 1999-01-18 Nathan Sidwell <nathan@acm.org>
8047
8048 * decl2.c (do_dtors): Set current location to that of the
8049 decl, for sensible diagnostics and debugging.
8050 (check_classfn): Issue `incomplete type' error, if
8051 class is not defined.
8052
8053 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
8054
8055 * cp-tree.h: Add prototype for bound_pmf_p.
8056
8057 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
8058 Manfred Hollstein <manfred@s-direktnet.de>
8059
8060 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
8061 -Wreturn-type.
8062
8063 1999-01-16 Nathan Sidwell <nathan@acm.org>
8064
8065 * cp-tree.h (struct lang_type): Added has_mutable flag.
8066 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
8067 (TYPE_HAS_MUTABLE_P): New macro to read it.
8068 (cp_has_mutable_p): Prototype for new function.
8069 * class.c (finish_struct_1): Set has_mutable from members.
8070 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
8071 it contains a mutable.
8072 * typeck.c (cp_has_mutable_p): New function.
8073
8074 1999-01-15 Mark Mitchell <mark@markmitchell.com>
8075
8076 * pt.c (process_template_parm): Ignore top-level qualifiers on
8077 non-type parameters.
8078
8079 * decl.c (start_function): Use current_function_parms in the call
8080 to require_complete_type_for_parms, not the probably empty
8081 DECL_ARGUMENTS.
8082
8083 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
8084
8085 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
8086
8087 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
8088 that we don't suppress the other copies.
8089 * lex.c (handle_cp_pragma): Likewise.
8090
8091 1999-01-13 Mark Mitchell <mark@markmitchell.com>
8092
8093 * decl.c (grokdeclarator): Undo 1998-12-14 change.
8094 * tree.c (build_cplus_array_type_1): Likewise.
8095 * pt.c (instantiate_class_template): Remove misleading comment.
8096 (tsubst_aggr_type): Substitute if there are template parameters,
8097 regardless of whether or not they use template arguments.
8098 (unify): Likewise, but for unification.
8099
8100 1999-01-12 Richard Henderson <rth@cygnus.com>
8101
8102 * cp-tree.h (flag_permissive): Declare extern.
8103
8104 1999-01-06 Mark Mitchell <mark@markmitchell.com>
8105
8106 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
8107 here.
8108 (lang_type): Add is_partial_instantiation. Decrease width of
8109 dummy.
8110 (PARTIAL_INSTANTIATION_P): New macro.
8111 (OPERATOR_TYPENAME_P): Remove.
8112 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
8113 OPERATOR_TYPENAME_P.
8114 (grok_op_properties): Likewise.
8115 * friend.c (do_friend): Handle friends that are member functions
8116 correctly.
8117 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
8118 * pt.c (instantiate_class_template): Rework for clarity. Avoid
8119 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
8120 any more partial instantiation than is absolutely necessary for
8121 implicit typename. Set PARTIAL_INSTANTIATION_P.
8122 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
8123 * semantics.c (begin_class_definition): Handle partial
8124 specializations of a type that was previously partially
8125 instantiated.
8126
8127 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
8128
8129 * g++spec.c (LIBSTDCXX): Provide default definition.
8130 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
8131
8132 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8133
8134 * Make-lang.in (g++.o): Depend on prefix.h.
8135
8136 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
8137
8138 * tree.c (bound_pmf_p): New fn.
8139 * typeck.c (build_c_cast): Use it.
8140
8141 * decl.c (grok_op_properties): Use same_type_p.
8142
8143 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8144
8145 * Makefile.in (cvt.o): Depend on toplev.h.
8146
8147 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
8148
8149 * cvt.c: Include toplev.h.
8150
8151 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
8152 definitions.
8153
8154 * init.c (expand_vec_init): Initialize variable `itype'.
8155
8156 * lex.c (yyerror): Cast the argument passed to a ctype function to
8157 an unsigned char.
8158
8159 * method.c (build_mangled_C9x_name): Wrap prototype and definition
8160 in "HOST_BITS_PER_WIDE_INT >= 64".
8161
8162 * typeck.c (build_binary_op): Mark parameter `convert_p' with
8163 ATTRIBUTE_UNUSED.
8164
8165 1998-12-22 Mark Mitchell <mark@markmitchell.com>
8166
8167 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
8168 * tree.c (build_exception_variant): Don't crash on empty throw
8169 specs.
8170
8171 1998-12-18 DJ Delorie <dj@cygnus.com>
8172
8173 * cvt.c (convert_to_reference): Check for both error_mark_node
8174 and NULL_NODE after call to convert_for_initialization.
8175
8176 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
8177
8178 * error.c (interesting_scope_p): New fn.
8179 (dump_simple_decl): Use it.
8180 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
8181 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
8182
8183 1998-12-16 Mark Mitchell <mark@markmitchell.com>
8184
8185 * class.c (resolve_address_of_overloaded_function): Do conversion
8186 to correct type here, rather than ...
8187 (instantiate_type): Here.
8188
8189 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
8190 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
8191 (decl_template_parm_p): Remove.
8192 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
8193 parameter.
8194 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
8195 * pt.c (push_inline_template_parms_recursive): Set it.
8196 (decl_template_parm_p): Remove.
8197 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
8198 (process_template_parm): Set it.
8199
8200 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
8201
8202 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
8203 if configured with cpplib.
8204
8205 1998-12-15 Mark Mitchell <mark@markmitchell.com>
8206
8207 * decl.c (poplevel): Make sure ns_binding is initialized.
8208
8209 * decl.c (finish_function): Undo inadvertent change in previous
8210 patch.
8211
8212 1998-12-14 Mark Mitchell <mark@markmitchell.com>
8213
8214 * class.c (pushclass): Tweak handling of class-level bindings.
8215 (resolve_address_of_overloaded_function): Update pointer-to-member
8216 handling.
8217 (instantiate_type): Likewise.
8218 * cvt.c (cp_convert_to_pointer): Likewise.
8219 * decl.c (pop_binding): Take the DECL to pop, not just the name.
8220 Deal with `struct stat' hack.
8221 (binding_level): Add to documentation.
8222 (push_binding): Clear BINDING_TYPE.
8223 (add_binding): New function.
8224 (push_local_binding): Use it.
8225 (push_class_binding): Likewise.
8226 (poplevel): Adjust calls to pop_binding.
8227 (poplevel_class): Likewise.
8228 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
8229 declarations to current binding level.
8230 (push_class_level_binding): Likewise.
8231 (push_overloaded_decl): Adjust handling of OVERLOADs in local
8232 bindings.
8233 (lookup_namespace_name): Don't crash when confronted with a
8234 TEMPLATE_DECL.
8235 (lookup_name_real): Do `struct stat' hack in local binding
8236 contexts.
8237 (build_ptrmemfunc_type): Adjust documentation.
8238 (grokdeclarator): Don't avoid building real array types when
8239 processing templates unless really necessary.
8240 (finish_method): Adjust calls to pop_binding.
8241 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
8242 not reparse_decl_as_expr.
8243 (build_expr_from_tree): Deal with a template-id as the function to
8244 call in a METHOD_CALL_EXPR.
8245 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
8246 (maybe_adjust_types_For_deduction): Don't do peculiar things with
8247 METHOD_TYPEs here.
8248 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
8249 pointer-to-member types where necessary.
8250 * tree.c (build_cplus_array_type_1): Don't avoid building real
8251 array types when processing templates unless really necessary.
8252 (build_exception_variant): Compare the exception lists correctly.
8253
8254 1998-12-13 Mark Mitchell <mark@markmitchell.com>
8255
8256 * cp-tree.def (CPLUS_BINDING): Update documentation.
8257 * cp-tree.h (LOCAL_BINDING_P): New macro.
8258 (lang_identifier): Rename local_value to bindings.
8259 (tree_binding): Make `scope' of type `void*', not `tree'.
8260 (BINDING_SCOPE): Update documentation.
8261 (IDENTIFIER_LOCAL_VALUE): Remove.
8262 (IDENTIFIER_CLASS_VALUE): Document.
8263 (IDENTIFIER_BINDING): New macro.
8264 (IDENTIFIER_VALUE): Likewise.
8265 (TIME_IDENTIFIER_TIME): Likewise.
8266 (TIME_IDENTIFIER_FILEINFO): Likewise.
8267 (IMPLICIT_TYPENAME_P): Likewise.
8268 (set_identifier_local_value): Remove.
8269 (push_local_binding): New function.
8270 (push_class_binding): Likewise.
8271 * class.c (pushclass): Update comments; use push_class_binding.
8272 * decl.c (set_identifier_local_value_with_scope): Remove.
8273 (set_identifier_local_value): Likewise.
8274 (push_binding): New function.
8275 (pop_binding): Likewise.
8276 (binding_level): Update documentation. Remove shadowed.
8277 (BINDING_LEVEL): New macro.
8278 (free_binding_nodes): New variable.
8279 (poplevel): Adjust for new name-lookup scheme. Don't mess up
8280 BLOCK_VARs when doing for-scope extension. Remove effectively
8281 dead code.
8282 (pushlevel_class): Tweak formatting.
8283 (poplevel_class): Adjust for new name-lookup scheme.
8284 (print_binding_level): Likewise.
8285 (store_bindings): Likewise.
8286 (pushdecl): Likewise.
8287 (pushdecl_class_level): Likewise.
8288 (push_class_level_binding): Likewise.
8289 (push_overloaded_decl): Update comments. Adjust for new
8290 name-lookup scheme.
8291 (lookup_name_real): Likewise.
8292 (lookup_name_current_level): Likewise.
8293 (cp_finish_decl): Likewise.
8294 (require_complete_types_for_parms): Likewise. Remove misleading
8295 #if 0'd code.
8296 (grok_parms): Likewise. Don't call
8297 require_complete_types_for_parms here.
8298 (grok_ctor_properties): Don't treat templates as copy
8299 constructors.
8300 (grop_op_properties): Or as assignment operators.
8301 (start_function): Document. Adjust for new name-lookup scheme.
8302 (finish_function): Likewise.
8303 * decl2.c (do_local_using_decl): Use push_local_binding.
8304 * lex.c (begin_definition_of_inclass_inline): New function, split
8305 out from ...
8306 (do_pending_inlines): Here, and ...
8307 (process_next_inline): Here.
8308 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
8309 (init_filename_times): Likewise.
8310 (extract_interface_info): Likewise.
8311 (ste_typedecl_interface_info): Likewise.
8312 (check_newline): Likewise.
8313 (dump_time_statistics): Likewise.
8314 (handle_cp_pragma): Likewise.
8315 (do_identifier): Adjust for new name-lookup scheme.
8316 * parse.y (function_try_block): Return ctor_initializer_opt value.
8317 (fndef): Use it.
8318 (fn.defpen): Pass appropriate values to start_function.
8319 (pending_inline): Use functor_try_block value, and pass
8320 appropriate values to finish_function.
8321 * pt.c (is_member_template): Update documentation; remove handling
8322 of FUNCTION_DECLs. As per name, this function should deal only in
8323 TEMPLATE_DECLs.
8324 (decl_template_parm_p): Change name of olddecl parameter to decl.
8325 (check_template_shadow): Adjust for new name-lookup scheme.
8326 (lookup_template_class): Likewise.
8327 (tsubst_decl): Tweak so as not to confuse member templates with
8328 copy constructors and assignment operators.
8329 (unify): Handle UNION_TYPEs.
8330 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
8331 (lang_print_xnode): Adjust for new name-lookup scheme.
8332 * typeck.c (mark_addressable): Likewise.
8333 (c_expand_return): Likewise.
8334
8335 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
8336
8337 * decl.c (grokdeclarator): Allow field with same name as class
8338 in extern "C".
8339
8340 * decl.c (lookup_name_real): Don't limit field lookup to types.
8341 * class.c (check_member_decl_is_same_in_complete_scope): No error
8342 if icv and x are the same.
8343 * lex.c (do_identifier): Tweak error message.
8344
8345 1998-12-10 Mark Mitchell <mark@markmitchell.com>
8346
8347 * decl.c (start_enum): Use push_obstacks, not
8348 end_temporary_allocation.
8349 (finish_enum): Call pop_obstacks.
8350
8351 1998-12-10 Mark Mitchell <mark@markmitchell.com>
8352
8353 * class.c (instantiate_type): Return error_mark_node rather than
8354 junk.
8355
8356 1998-12-09 Mark Mitchell <mark@markmitchell.com>
8357
8358 * cp-tree.h (most_specialized_instantiation): New function.
8359 (print_candidates): Likewise.
8360 * class.c (validate_lhs): Remove.
8361 (resolve_address_of_overloaded_function): New function, split out
8362 and then substantially reworked, from ...
8363 (instantiate_type): Use it. Simplify.
8364 * cvt.c (convert_to_reference): Complain when caller has indicated
8365 that's the right thing to do. Don't crash if instantiate_type
8366 fails.
8367 * pt.c: Substitute `parameters' for `paramters' throughout.
8368 (print_candidates): Don't make it static.
8369 (most_specialized_instantiation): Split out from ...
8370 (most_specialized): Here.
8371
8372 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
8373
8374 * lex.c (lang_init_options): Initialize cpplib.
8375 * decl2.c (parse_options,cpp_initialized): Removed.
8376 (lang_decode_option): Move initialization of cpplib to
8377 lang_init_options.
8378
8379 1998-12-09 Mark Mitchell <mark@markmitchell.com>
8380
8381 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
8382 well as the TYPE_DECL, when a typedef name is assigned to a
8383 previously anonymous type.
8384
8385 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
8386
8387 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
8388 __cp_eh_info for getting the eh info pointer. Add table_index to
8389 field list.
8390 (push_eh_cleanup): Don't increment 'handlers' data field.
8391 (process_start_catch_block): Don't set the 'caught' field.
8392
8393 * cp/exception.cc (CP_EH_INFO): New macro for getting the
8394 exception info pointer within library routines.
8395 (__cp_eh_info): Use CP_EH_INFO.
8396 (__start_cp_handler): Get exception info pointer, set caught field,
8397 and increment the handlers field. Avoids this being done by handlers.
8398 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
8399 (uncaught_exception): Use CP_EH_INFO macro.
8400
8401 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
8402
8403 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
8404
8405 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
8406
8407 * lex.c (check_newline): Add support for \ as `natural'
8408 characters in file names in #line to be consistent with #include
8409 handling. We support escape processing in the # 1 "..." version of
8410 the command. See also support in cp/lex.c.
8411
8412 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
8413
8414 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
8415 structure.
8416
8417 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
8418
8419 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
8420
8421 * error.c (dump_simple_decl): Also print namespace context.
8422 (dump_function_decl): Likewise.
8423
8424 * decl2.c (ambiguous_decl): Don't print old value if it's
8425 error_mark_node.
8426
8427 * decl.c (lookup_name_real): Fix handling of local types shadowed
8428 by a non-type decl. Remove obsolete code.
8429 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
8430
8431 * lang-options.h: Add -fpermissive.
8432 * decl2.c: Likewise.
8433 * cp-tree.h: Add flag_permissive.
8434 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
8435 were specified, set flag_pedantic_errors.
8436 * call.c (build_over_call): Turn dropped qualifier messages
8437 back into pedwarns.
8438 * cvt.c (convert_to_reference): Likewise.
8439 * typeck.c (convert_for_assignment): Likewise.
8440
8441 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
8442
8443 * decl2.c (coerce_new_type): Use same_type_p.
8444 (coerce_delete_type): Likewise.
8445
8446 * call.c (check_dtor_name): Return 1, not error_mark_node.
8447
8448 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
8449
8450 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
8451 if MULTIPLE_SYMBOL_SPACES.
8452
8453 * pt.c (check_template_shadow): New fn.
8454 * decl2.c (grokfield): Use it.
8455 * decl.c (pushdecl): Likewise.
8456 (pushdecl_class_level): Likewise.
8457 (start_method): Likewise.
8458 (xref_tag): Don't try to use 't' if we're defining.
8459
8460 * call.c (check_dtor_name): Just return an error_mark_node.
8461 * pt.c (lookup_template_class): Complain about using non-template here.
8462 * parse.y (apparent_template_type): Not here.
8463
8464 * pt.c (check_explicit_specialization): Complain about specialization
8465 with C linkage.
8466
8467 * lang-options.h: Add -f{no-,}implicit-inline-templates.
8468
8469 * pt.c (convert_nontype_argument): Don't assume that any integer
8470 argument is intended to be a constant-expression.
8471
8472 1998-12-03 Mark Mitchell <mark@markmitchell.com>
8473
8474 * class.c (handle_using_decl): Fix comment. Don't lookup
8475 constructors in base classes.
8476 (validate_lhs): Fix typo in comment.
8477 * search.c (lookup_field_1): Don't return a USING_DECL.
8478
8479 * cp-tree.h (DECL_ACCESS): Improve documentation.
8480
8481 * decl.c (expand_static_init): Don't set the initialization-done
8482 flag until the initialization is done.
8483
8484 1998-12-02 Mark Mitchell <mark@markmitchell.com>
8485
8486 * decl2.c (validate_nonmember_using_decl): Complain about using
8487 declarations for class members.
8488
8489 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
8490
8491 * typeck2.c (process_init_constructor): Use same_type_p.
8492
8493 * decl.c (check_tag_decl): Don't warn about null decl inside a
8494 class.
8495
8496 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
8497 UNIFY_ALLOW_NONE.
8498 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
8499 (resolve_overloaded_unification): Strip baselinks.
8500
8501 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8502
8503 * g++spec.c: Don't prototype xmalloc.
8504
8505 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
8506
8507 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
8508
8509 * decl.c (check_tag_decl): Do complain about null friend decl at
8510 file scope.
8511
8512 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
8513
8514 * lex.c (make_lang_type): Clear the whole struct lang_type, not
8515 only the first multiple of sizeof (int).
8516
8517 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
8518
8519 * decl.c (start_decl): An explicit specialization of a static data
8520 member is only a definition if it has an initializer.
8521
8522 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
8523 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
8524 cp_finish_decl.
8525 * init.c (expand_default_init): Check for DIRECT_BIND instead of
8526 DECL_ARTIFICIAL.
8527
8528 * call.c (build_over_call): Use build_decl.
8529
8530 * except.c (expand_throw): Just use convert, not
8531 build_reinterpret_cast.
8532
8533 * lex.c (handle_generic_pragma): Use token_buffer.
8534
8535 * decl.c (check_tag_decl): Don't complain about null friend decl.
8536
8537 1998-11-24 Dave Pitts <dpitts@cozx.com>
8538
8539 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
8540 first position.
8541 * lex.c (check_newline): Use ISALPHA.
8542 (readescape): Use ISGRAPH.
8543 (yyerror): Use ISGRAPH.
8544
8545 1998-11-24 Nathan Sidwell <nathan@acm.org>
8546
8547 * search.c (get_abstract_virtuals): Do not use initial
8548 CLASSTYPE_ABSTRACT_VIRTUALS.
8549 * typeck2.c (abstract_virtuals_error): Show location of abstract
8550 declaration.
8551 * call.c (build_new_method_call): Use
8552 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
8553 * class.c (finish_struct_bits): Don't bother working out whether
8554 get_abstract_virtuals will do anything, just do it.
8555
8556 1998-11-24 Graham <grahams@rcp.co.uk>
8557
8558 * typeck.c (build_component_ref): Remove unused statement.
8559
8560 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
8561
8562 * class.c (add_method): Catch invalid overloads.
8563
8564 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
8565 * search.c (lookup_conversions): Handle getting real OVERLOADs.
8566 (add_conversions): Likewise. Revert last change.
8567 * call.c (add_conv_candidate): Pass totype to add_candidate instead
8568 of fn. Don't add a new candidate if the last one was for the same
8569 type.
8570 (print_z_candidates): Handle getting a type as a function.
8571 (joust): If we got two conversion candidates to the same type,
8572 just pick one.
8573 (build_object_call): Lose 'templates'.
8574 (build_user_type_conversion_1): Handle getting real OVERLOADs.
8575
8576 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
8577
8578 * typeck2.c (process_init_constructor): If there are elements
8579 that don't have initializers and they need to have constructors
8580 run, supply them with initializers.
8581
8582 * class.c (finish_struct_1): A class with a 0-width bitfield is
8583 still empty.
8584
8585 1998-11-23 Mark Mitchell <mark@markmitchell.com>
8586
8587 * pt.c (instantiate_class_template): Don't try to figure out what
8588 specialization to use for a partial instantiation. Correct
8589 typos in a couple of comments. Avoid calling uses_template_parms
8590 multiple times.
8591
8592 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
8593
8594 * method.c (process_overload_item): Add call to
8595 build_mangled_C9x_name for intTI_type_nodes.
8596 (build_mangled_C9x_name): Add prototype, define.
8597 * decl.c (init_decl_processing): Add names for
8598 TImode_type_node.
8599
8600 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
8601
8602 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
8603
8604 * class.c (finish_struct_1): Set things up for 0-width bitfields
8605 like we do for others.
8606
8607 * decl.c (check_tag_decl): New fn.
8608 (shadow_tag): Split out from here.
8609 * decl2.c (grok_x_components): Call it.
8610
8611 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
8612
8613 * decl.c: Lose warn_about_return_type.
8614 (grokdeclarator): Always complain about implicit int, except for
8615 `main () { ... }'.
8616
8617 * decl.c (tag_name): New fn.
8618 (xref_tag): Complain about using typedef-name after class-key.
8619
8620 * init.c (expand_vec_init): Also keep going if from_array.
8621
8622 * tree.c (is_overloaded_fn): Also handle the output of
8623 build_offset_ref.
8624
8625 * decl.c (grokdeclarator): Use constructor_name when comparing
8626 field name against enclosing class.
8627 * class.c (finish_struct_anon): Likewise.
8628
8629 1998-11-22 Mark Mitchell <mark@markmitchell.com>
8630
8631 * decl.c (poplevel): Remove code to handle KEEP == 2.
8632 (finish_function): Don't confuse BLOCK-order when
8633 processing a destructor.
8634
8635 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
8636
8637 * decl.c (require_complete_types_for_parms): Call layout_decl
8638 after we've completed the type.
8639
8640 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
8641
8642 * decl2.c (validate_nonmember_using_decl): Allow using templates
8643 from the global namespace.
8644
8645 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
8646
8647 Handle specifying template args to member function templates.
8648 * tree.c (build_overload): Always create an OVERLOAD for a template.
8649 * search.c (add_conversions): Handle finding an OVERLOAD.
8650 * decl2.c (check_classfn): Likewise.
8651 * lex.c (identifier_type): See through a baselink.
8652 * parse.y (do_id): Don't call do_identifier if we got a baselink.
8653 * class.c (instantiate_type, case TREE_LIST): Recurse.
8654
8655 * decl.c (grokdeclarator): Allow a boolean constant for array
8656 bounds, odd as that sounds.
8657
8658 * pt.c (unify): Be more strict about non-type parms, except for
8659 array bounds.
8660 (UNIFY_ALLOW_INTEGER): New macro.
8661
8662 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
8663
8664 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
8665
8666 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
8667
8668 * semantics.c (begin_class_definition): Call
8669 maybe_process_partial_specialization before push_template_decl.
8670 Don't call push_template_decl for a specialization.
8671 * search.c (lookup_field): Do return a member template class.
8672 * decl2.c (handle_class_head): Handle member template classes.
8673
8674 * decl.c (grokdeclarator): A parm type need not be complete.
8675
8676 * pt.c (convert_nontype_argument): Fix thinko.
8677
8678 1998-11-18 Mark Mitchell <mark@markmitchell.com>
8679
8680 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
8681 (global_delete_fndecl): New variable.
8682 * decl.c (global_delete_fndecl): Define it.
8683 (init_decl_processing): Set it.
8684 * init.c (build_builtin_delete_call): Use it.
8685 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
8686 nodes.
8687
8688 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
8689
8690 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
8691 type.
8692
8693 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
8694 * call.c (build_object_call): Also support references to functions.
8695 * typeck.c (convert_for_initialization): Don't decay a function
8696 if the target is a reference to function.
8697
8698 * search.c (add_conversions): Get all the overloads from a class.
8699
8700 * decl.c (grok_ctor_properties): Complain about any constructor
8701 that will take a single arg of the class type by value.
8702
8703 * typeck2.c (build_functional_cast): Can't create objects of
8704 abstract classes this way.
8705 * cvt.c (ocp_convert): Likewise.
8706
8707 * decl.c (grokfndecl): Member functions of local classes are not
8708 public.
8709
8710 1998-11-18 Mark Mitchell <mark@markmitchell.com>
8711
8712 * Make-lang.in (cc1plus): Add dependency on hash.o.
8713
8714 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
8715
8716 * search.c (get_abstract_virtuals): Complain about virtuals with
8717 no final overrider.
8718 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
8719 with no final overrider.
8720 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
8721 on virtuals with no final overrider.
8722
8723 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
8724
8725 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
8726 after layout_type.
8727
8728 * friend.c (do_friend): Don't set_mangled_name_for_decl.
8729
8730 * class.c (finish_struct_anon): Complain about non-fields.
8731 * decl2.c (build_anon_union_vars): Likewise.
8732
8733 * decl.c (grokdeclarator): Normal data members can't have the same
8734 name as the class, either.
8735 * class.c (finish_struct_anon): Neither can members of an
8736 anonymous union.
8737
8738 1998-11-17 Mark Mitchell <mark@markmitchell.com>
8739
8740 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
8741 (TYPE_BINFO): Likewise.
8742 (IS_AGGR_TYPE): Tweak.
8743 (SET_IS_AGGR_TYPE): New macro.
8744 (CLASS_TYPE_P): Tweak.
8745 (lang_type): Group mark bitfields together. Remove linenum.
8746 (CLASSTYPE_SOURCE_LINE): Remove macro.
8747 (CLASSTYPE_MARKED_N): New macro.
8748 (SET_CLASSTYPE_MARKED_N): Likewise.
8749 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
8750 (CLASS_TYPE_MARKED_*): Use them.
8751 (SET_CLASSTYPE_MARKED_*): Likewise.
8752 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
8753 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
8754 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
8755 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
8756 * class.c (class_cache_obstack): New variable.
8757 (class_cache_firstobj): Likewise.
8758 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
8759 (pushclass): Free the cache, when appropriate.
8760 (popclass): Tidy.
8761 (maybe_push_cache_obstack): Use class_cache_obstack.
8762 * decl.c (include hash.h).
8763 (typename_hash): New function.
8764 (typename_compare): Likewise.
8765 (build_typename_type): Check the hash table to avoid creating
8766 duplicates.
8767 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
8768 (grokdeclarator): Use CLASS_TYPE_P.
8769 (xref_basetypes): Likewise.
8770 (start_function): Likewise. Don't put current_class_ref on the
8771 permanent obstack.
8772 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
8773 and TYPE_TI_ARGS.
8774 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
8775 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
8776 fields for types other than class types. Do clear TYPE_ALIAS_SET
8777 for types other than class types, though.
8778 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
8779 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8780 * pt.c (process_template_parm): Don't set
8781 CLASSTYPE_GOT_SEMICOLON.
8782 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8783 Coerce arguments on the momentary obstack.
8784 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8785 (instantiate_class_template): Calculate template arguments on the
8786 momentary obstack. Tidy.
8787 (tsubst_template_arg_vector): Use make_temp_vec.
8788 (tsubst_aggr_type): Put template arguments on the momentary
8789 obstack.
8790 (tsubst_decl): Likewise.
8791 (tsubst): Copy the array bounds index to the permanent obstack
8792 before building index types. Use new macros.
8793 (unify): Use new macros.
8794 (do_type_instantiation): Likewise.
8795 * search.c (lookup_fnfields_1): Use new macros.
8796 (dfs_pushdecls): Build envelopes on the cache obstack.
8797 (dfs_compress_decls): Use new macros.
8798 (push_class_decls): Build on the cache obstack.
8799 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
8800 * sign.c (build_signature_pointer_or_reference_type): Use
8801 SET_IS_AGGR_TYPE.
8802 * tree.c (make_binfo): Check CLASS_TYPE_P.
8803 (copy_template_template_parm): Adjust.
8804 (make_temp_vec): Use push_expression_obstack.
8805 * typeck.c (complete_type): Use new macros.
8806 (comptypes): Likewise.
8807
8808 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
8809
8810 * pt.c (tsubst): Add diagnostics for invalid array, reference
8811 and pointer to member types.
8812
8813 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
8814
8815 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
8816
8817 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
8818 Simplify.
8819
8820 * parse.y (structsp): Fix cut-and-paste error.
8821
8822 * init.c (build_new): Complain about non-integral size.
8823
8824 * parse.y (unary_expr): Complain about defining types in sizeof.
8825
8826 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
8827
8828 * rtti.c (build_x_typeid): Complain about typeid without
8829 including <typeinfo>.
8830 (get_typeid): Likewise. Complain about typeid of incomplete type.
8831 (get_tinfo_fn_dynamic): Likewise.
8832 (get_typeid_1): Not static anymore.
8833 * except.c (build_eh_type_type): Use get_typeid_1.
8834
8835 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
8836 ambiguous or private bases. Fix warning for reference cast.
8837
8838 1998-11-16 Mark Mitchell <mark@markmitchell.com>
8839
8840 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
8841 * decl.c (duplicate_decls): Remove special-case code to deal with
8842 template friends, and just do the obvious thing.
8843 * pt.c (register_specialization): Tweak for clarity, and also to
8844 clear DECL_INITIAL for an instantiation before it is merged with a
8845 specialization.
8846 (check_explicit_specialization): Fix indentation.
8847 (tsubst_friend_function): Handle both definitions in friend
8848 declaration and outside friend declarations.
8849 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
8850 (regenerate_decl_from_template): Tweak accordingly.
8851 (instantiate_decl): Likewise.
8852
8853 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
8854
8855 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
8856 member function reference to error.
8857 * cvt.c (ocp_convert): Complain about converting an overloaded
8858 function to void.
8859
8860 * init.c (build_offset_ref): Just return a lone static member
8861 function.
8862
8863 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
8864 not internal ones.
8865
8866 * typeck.c (build_binary_op_nodefault): Improve error handling.
8867
8868 * decl.c (grokfndecl): Complain about making 'main' a template.
8869
8870 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
8871
8872 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
8873 TYPE_DECL in a template.
8874
8875 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
8876
8877 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
8878
8879 * decl.c (struct cp_function): Add named_label_uses.
8880 (push_cp_function_context): Save it.
8881 (pop_cp_function_context): Restore it.
8882 (define_label): Also complain about jumping into the scope of
8883 non-POD objects that don't have constructors.
8884 * tree.c (pod_type_p): New fn.
8885
8886 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
8887 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
8888 (get_tinfo_fn): Not here.
8889 * repo.c (repo_get_id): Abort if we get called for an incomplete
8890 type.
8891
8892 1998-11-13 Mark Mitchell <mark@markmitchell.com>
8893
8894 * except.c (expand_throw): Make sure first argument to
8895 __cp_push_exception is of type `void*' to avoid spurious error
8896 messages.
8897
8898 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
8899
8900 * pt.c (try_one_overload): Take orig_targs again. Only check for
8901 mismatches against them; we don't care what a previous call found.
8902 (resolve_overloaded_unification): Adjust.
8903
8904 * search.c (lookup_field): Don't return anything for a non-type
8905 field from a dependent type.
8906 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
8907 in an array declarator.
8908 (start_decl): Push into the class before looking for the field.
8909
8910 1998-11-08 Mark Mitchell <mark@markmitchell.com>
8911
8912 * method.c (build_overload_value): Handle REFERENCE_TYPE.
8913
8914 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
8915
8916 * decl.c (grokdeclarator): Allow namespace-scoped members if they
8917 are friends.
8918
8919 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
8920
8921 * pt.c (tsubst_decl): Don't mess with the global value of an
8922 un-mangled DECL_ASSEMBLER_NAME.
8923
8924 1998-11-03 Christopher Faylor <cgf@cygnus.com>
8925
8926 * decl.c (init_decl_processing): Remove CYGWIN conditional
8927 since CYGWIN is now able to deal with trapping signals.
8928
8929 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8930
8931 * cp-tree.h: Don't include gansidecl.h.
8932 * exception.cc: Include gansidecl.h (since we don't include config.h)
8933 * g++spec.c: Don't include gansidecl.h.
8934
8935 1998-11-06 Mark Mitchell <mark@markmitchell.com>
8936
8937 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
8938 size of dummy.
8939 (DECL_DEFINED_IN_CLASS_P): New macro.
8940 (TEMPLATE_PARMS_FOR_INLINE): Document.
8941 (check_static_variable_definition): New function.
8942 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
8943 appropriate.
8944 (check_static_variable_definition): Split out from ...
8945 (grokdeclarator): Here.
8946 * pt.c (check_default_tmpl_args): New function, split out from ...
8947 (push_template_decl_real): Here.
8948 (instantiate_template): Fix comment.
8949
8950 1998-11-04 Mark Mitchell <mark@markmitchell.com>
8951
8952 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
8953 (CP_TYPE_VOLATILE_P): Likewise.
8954 (CP_TYPE_RESTRICT_P): Likewise.
8955
8956 1998-11-03 Mark Mitchell <mark@markmitchell.com>
8957
8958 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
8959
8960 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
8961
8962 * class.c (instantiate_type): Be more helpful.
8963
8964 * decl2.c (import_export_decl): Call import_export_class.
8965
8966 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
8967 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
8968 * pt.c (tsubst_copy): Likewise.
8969
8970 1998-11-02 Mark Mitchell <mark@markmitchell.com>
8971
8972 * init.c (expand_vec_init): Fix off-by-one error.
8973
8974 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
8975
8976 * parse.y (apparent_template_type): New type.
8977 (named_complex_class_head_sans_basetype): Use it.
8978 * Makefile.in (CONFLICTS): One new conflict.
8979 * parse.c: Regenerated.
8980
8981 1998-11-01 Mark Mitchell <mark@markmitchell.com>
8982
8983 * cp-tree.h (COMPARE_STRICT): New macro.
8984 (COMPARE_BASE): Likewise.
8985 (COMPARE_RELAXED): Likewise.
8986 (COMPARE_REDECLARATION): Likewise.
8987 (same_type_p): Likewise.
8988 (same_or_base_type_p): Likewise.
8989 * call.c (standard_conversion): Use them, in place of comptypes
8990 with numeric arguments.
8991 (reference_binding): Likewise.
8992 (convert_like): Likewise.
8993 (build_over_call): Likewise.
8994 (is_subseq): Likewise.
8995 (is_properly_derived_from): Likewise.
8996 (compare_ics): Likewise.
8997 (joust): Likewise.
8998 * class.c (delete_duplicate_fields_1): Likewise.
8999 (resolves_to_fixed_type_p): Likewise.
9000 (instantiate_type): Likewise. Remove #if 0'd code.
9001 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
9002 (pushdecl): Likewise.
9003 (lookup_name_real): Likewise.
9004 (grokdeclarator): Likewise. Check for illegal array declarations.
9005 (grokparms): Likewise.
9006 (grok_op_properties): Likewise.
9007 * decl2.c (check_classfn): Likewise.
9008 * friend.c (is_friend): Likewise.
9009 (make_friend_class): Likewise.
9010 * init.c (expand_aggr_init): Likewise.
9011 (expand_vec_init): Likewise.
9012 * pt.c (is_member_template_class): Remove declaration.
9013 (is_specialization_of): Use COMPARE_* and new macros.
9014 (comp_template_parms): Likewise.
9015 (convert_nontype_argument): Likewise.
9016 (coerce_template_template_parms): Likewise.
9017 (template_args_equal): Likewise.
9018 (lookup_template_class): Likewise.
9019 (type_unification_real): Likewise.
9020 (unify): Likewise.
9021 (get_bindings_real): Likewise.
9022 * search.c (covariant_return_p): Likewise.
9023 (get_matching_virtual): Likewise.
9024 * sig.c (match_method_types): Likewise.
9025 * tree.c (vec_binfo_member): Likewise.
9026 (cp_tree_equal): Likewise.
9027 * typeck.c (common_type): Likewise.
9028 (comp_array_types): Likewise. Get issues involving unknown array
9029 bounds right.
9030 (comptypes): Update comments. Use new flags.
9031 (comp_target_types): Use new macros.
9032 (compparms): Likewise.
9033 (comp_target_parms): Likewise.
9034 (string_conv_p): Likewise.
9035 (build_component_ref): Likewise.
9036 (build_indirect_ref): Likewise.
9037 (build_conditional_expr): Likewise.
9038 (build_static_cast): Likewise.
9039 (build_reinterpret_cast): Likewise.
9040 (build_const_cast): Likewise.
9041 (build_modify_expr): Likewise.
9042 (convert_for_assignment): Likewise.
9043 (comp_ptr_ttypes_real): Likewise.
9044 (ptr_reasonably_similar): Likewise.
9045 (comp_ptr_ttypes_const): Likewise.
9046
9047 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
9048
9049 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
9050
9051 1998-10-30 Mark Mitchell <mark@markmitchell.com>
9052
9053 * decl2.c (delete_sanity): Pass integer_zero_node, not
9054 integer_two_node, to build_vec_delete.
9055 * init.c (build_array_eh_cleanup): Remove.
9056 (expand_vec_init_try_block): New function.
9057 (expand_vec_init_catch_clause): Likewise.
9058 (build_vec_delete_1): Don't deal with case that auto_delete_vec
9059 might be integer_two_node anymore.
9060 (expand_vec_init): Rework for initialization-correctness and
9061 exception-correctness.
9062 * typeck2.c (process_init_constructor): Make mutual exclusivity
9063 of cases more obvious.
9064
9065 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
9066
9067 * decl.c (lookup_name_real): OK, only warn if not lexing.
9068 Simplify suggested fix.
9069
9070 * cp-tree.h (IDENTIFIER_MARKED): New macro.
9071 * search.c (lookup_conversions): Use breadth_first_search.
9072 (add_conversions): Avoid adding two conversions to the same type.
9073 (breadth_first_search): Work with base binfos, rather
9074 than binfos and base indices.
9075 (get_virtual_destructor): Adjust.
9076 (tree_has_any_destructor_p): Adjust.
9077 (get_matching_virtual): Adjust.
9078
9079 * pt.c (push_template_decl_real): Generalize check for incorrect
9080 number of template parms.
9081 (is_member_template_class): #if 0.
9082
9083 1998-10-29 Richard Henderson <rth@cygnus.com>
9084
9085 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
9086 last.
9087
9088 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
9089
9090 * lex.c: Call check_newline from lang_init always. After
9091 calling cpp_start_read, set yy_cur and yy_lim to read from the
9092 cpplib token buffer.
9093
9094 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
9095
9096 * class.c (instantiate_type): Don't consider templates for a normal
9097 match.
9098
9099 * class.c (finish_struct_1): Don't complain about non-copy
9100 assignment ops in union members.
9101
9102 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
9103 (prepare_fresh_vtable): Likewise.
9104 (finish_struct_1): Don't call import_export_class.
9105 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
9106 (finish_prevtable_vardecl): Lose.
9107 (finish_file): Don't call it.
9108 * pt.c (instantiate_class_template): Likewise.
9109 * cp-tree.h: Remove it.
9110
9111 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
9112 * decl.c (finish_function): Not here.
9113 (start_function): Do set DECL_INITIAL.
9114
9115 * pt.c (push_template_decl_real): Complain about default template
9116 args for enclosing classes.
9117
9118 * call.c (add_function_candidate): Treat conversion functions
9119 as coming from the argument's class.
9120 * cp-tree.h (DECL_CONV_FN_P): New fn.
9121 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
9122 * class.c (add_method): Use DECL_CONV_FN_P.
9123 * decl2.c (check_classfn): Likewise.
9124 * error.c (dump_function_name): Likewise.
9125 (dump_function_decl): Likewise.
9126 * pt.c (fn_type_unification): Likewise.
9127 * search.c (add_conversions): Likewise.
9128
9129 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
9130
9131 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
9132 * method.c (hack_identifier): Also check for using RESULT_DECL
9133 from outer context.
9134
9135 1998-10-27 Mark Mitchell <mark@markmitchell.com>
9136
9137 * decl.c (grokdeclarator): Use type_quals, rather than constp,
9138 consistently.
9139
9140 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
9141
9142 * call.c (standard_conversion): instantiate_type here.
9143 (reference_binding): And here.
9144 (implicit_conversion): Not here.
9145 (build_op_delete_call): No need to cons up an OVERLOAD.
9146 * cvt.c (cp_convert_to_pointer): instantiate_type here.
9147 (convert_to_reference): And here.
9148 * decl.c (grok_reference_init): Not here.
9149 (grokparms): Or here.
9150 * typeck2.c (digest_init): Or here.
9151 * typeck.c (decay_conversion): Take the address of overloaded
9152 functions, too.
9153 (require_instantiated_type): Lose.
9154 (convert_arguments): Don't handle unknown types here.
9155 (build_c_cast): Likewise.
9156 (build_binary_op): Gut.
9157 (build_conditional_expr): Don't require_instantiated_type.
9158 (build_modify_expr): Likewise.
9159 (build_static_cast): Don't instantiate_type.
9160 (build_reinterpret_cast): Likewise.
9161 (build_const_cast): Likewise.
9162 (convert_for_initialization): Likewise.
9163 (build_ptrmemfunc): Use type_unknown_p.
9164 (convert_for_assignment): Also do default_conversion on overloaded
9165 functions. Hand them off to ocp_convert.
9166
9167 1998-10-26 Mark Mitchell <mark@markmitchell.com>
9168
9169 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
9170 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
9171
9172 * class.c (finish_struct_1): Use build_cplus_array_type to build
9173 array types.
9174 * decl.c (init_decl_processing): Likewise.
9175 * except.c (expand_end_eh_spec): Likewise.
9176 * search.c (expand_upcast_fixups): Simplify very slightly.
9177
9178 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
9179
9180 * decl.c (grokdeclarator): Complain about a variable using
9181 constructor syntax coming back null from start_decl.
9182
9183 * friend.c (make_friend_class): Complain about trying to make
9184 a non-class type a friend.
9185
9186 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
9187 (start_function): Not here.
9188
9189 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
9190
9191 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
9192
9193 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
9194
9195 * typeck2.c (process_init_constructor): Only skip anonymous fields
9196 if they are bitfields.
9197
9198 * cp-tree.def (TYPEOF_TYPE): New code.
9199 * error.c (dump_type_real): Handle it.
9200 * pt.c (tsubst): Likewise.
9201 * tree.c (search_tree): Likewise.
9202 * semantics.c (finish_typeof): New fn.
9203 * parse.y (typespec): Use it.
9204 * cp-tree.h: Declare it.
9205
9206 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
9207
9208 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
9209
9210 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
9211
9212 * typeck.c (convert_arguments): Don't handle pmf references
9213 specially.
9214
9215 * init.c (build_member_call): Don't try to convert to the base type
9216 if it's ambiguous or pedantic.
9217
9218 * typeck2.c (check_for_new_type): Only depend on pedantic for
9219 C-style casts.
9220
9221 1998-10-25 Mark Mitchell <mark@markmitchell.com>
9222
9223 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
9224 non-converting constructors.
9225
9226 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
9227
9228 * gxxint.texi: Correct documentation for n, N, Q, and B.
9229
9230 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
9231
9232 * parse.y (condition): Convert VAR_DECL from reference to indirect
9233 reference.
9234
9235 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
9236
9237 * exception.cc (__cp_pop_exception): Free the original exception
9238 value, not the potentially coerced one.
9239
9240 1998-10-23 Mark Mitchell <mark@markmitchell.com>
9241
9242 * Makefile.in (hash.h): Run gperf when necessary.
9243
9244 * cp-tree.h (CP_TYPE_READONLY): Remove.
9245 (CP_TYPE_VOLATILE): Likewise.
9246 (CP_TYPE_QUALS): New macro.
9247 (CP_TYPE_CONST_P): Likewise.
9248 (CP_TYPE_VOLATILE_P): Likewise.
9249 (CP_TYPE_RESTRICT_P): Likewise.
9250 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
9251 (cp_build_type_variant): Rename to ...
9252 (cp_build_qualified_type): New function.
9253 (c_apply_type_quals_to_decl): Declare.
9254 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
9255 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
9256 (cp_type_qual_from_rid): New function.
9257 (compparms): Remove unused parameter. All callers changed.
9258 (cp_type_quals): New function.
9259 (at_least_as_qualified_p): Likewise.
9260 (more_qualified_p): Likewise.
9261
9262 * call.c (standard_conversion): Replace calls to
9263 cp_build_type_variant with cp_build_qualified_type. Use
9264 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
9265 compare them. Use CP_TYPE_* macros to check qualifiers.
9266 (reference_binding): Likewise.
9267 (implicit_conversion): Likewise.
9268 (add_builtin_candidates): Likewise.
9269 (build_over_call): Likewise.
9270 * class.c (overrides): Compare all qualifiers, not just `const',
9271 on method declarations.
9272 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
9273 (convert_pointer_to_real): Likewise.
9274 (type_promotes_to): Likewise.
9275 * decl.c (check_for_uninitialized_const_var): New function.
9276 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
9277 (cp_finish_decl): Use check_for_uninitialized_const_var.
9278 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
9279 handle `restrict'.
9280 (grok_ctor_properties): Likewise.
9281 (grok_op_properties): Likewise.
9282 (start_function): Likewise.
9283 (rever_static_member_fn): Likewise.
9284 * decl2.c (grok_method_quals): Likewise.
9285 (grokfield): Likewise.
9286 * error.c (dump_readonly_or_volatile): Rename to ...
9287 (dump_qualifiers): New function. Handle `restrict'.
9288 (dump_type_real): Use it.
9289 (dump_aggr_type): Likewise.
9290 (dump_type_prefix): Likewise.
9291 (dump_type_suffix): Likewise.
9292 (dump_function_decl): Likewise.
9293 (cv_as_string): Likewise.
9294 * gxx.gperf: Add __restrict and __restrict__.
9295 * gxxint.texi: Document `u' as used for `__restrict', and a few
9296 other previously undocumented codes.
9297 * hash.h: Regenerated.
9298 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
9299 (build_member_call): Likewise.
9300 (build_new_1): Likewise.
9301 * lex.c (init_parse): Add entry for RID_RESTRICT.
9302 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
9303 (cp_type_qual_from_rid): Define.
9304 * lex.h (enum rid): Add RID_RESTRICT.
9305 * method.c (process_modifiers): Deal with `restrict'.
9306 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
9307 * parse.c: Regenerated.
9308 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
9309 (tsubst_aggr_type): Likewise.
9310 (tsubst): Likewise.
9311 (check_cv_quals_for_unify): Likewise.
9312 (unify): Likewise.
9313 * rtti.c (init_rtti_processing): Likewise.
9314 (build_headof): Likewise.
9315 (get_tinfo_var): Likewise.
9316 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
9317 (expand_class_desc): Likewise.
9318 (expand_attr_desc): Likewise.
9319 (synthesize_tinfo_fn): Likewise.
9320 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
9321 (get_matching_virtual): Likewise.
9322 (expand_upcast_fixups): Likewise.
9323 * sig.c (build_signature_pointer_or_reference_name): Take
9324 type_quals, not constp and volatilep.
9325 (build_signature_pointer_or_reference_type): Likewise.
9326 (match_method_types): More CP_TYPE_QUALS conversion, etc.
9327 (build_signature_pointer_constructor): Likewise.
9328 (build_signature_method_call): Likewise.
9329 * tree.c (build_cplus_array_type): Likewise.
9330 (cp_build_type_variant): Rename to ...
9331 (cp_build_qualified_type): New function. Deal with `__restrict'.
9332 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
9333 (build_exception_variant): Likewise.
9334 (mapcar): Likewise.
9335 * typeck.c (qualif_type): Likewise.
9336 (common_type): Likewise.
9337 (comptypes): Likewise.
9338 (comp_cv_target_types): Likewise.
9339 (at_least_as_qualified_p): Define.
9340 (more_qualified_p): Likewise.
9341 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
9342 (compparms): Likewise.
9343 (inline_conversion): Likewise.
9344 (string_conv_p): Likewise.
9345 (build_component_ref): Likewise.
9346 (build_indirect_ref): Likewise.
9347 (build_array_ref): Likewise.
9348 (build_unary_op): Likewise.
9349 (build_conditional_expr): Likewise.
9350 (build_static_cast): Likewise.
9351 (build_c_cast): Likewise.
9352 (build_modify_expr): Likewise.
9353 (convert_For_assignment): Likewise.
9354 (comp_ptr_ttypes_real): Likewise.
9355 (cp_type_quals): New function.
9356
9357 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
9358
9359 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
9360 (CP_TYPE_VOLATILE): Likewise.
9361 * decl.c (grokdeclarator): Use them.
9362 * tree.c (canonical_type_variant): Likewise.
9363
9364 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
9365
9366 * parse.y (named_class_head): Push into class while parsing the
9367 base class list.
9368 * decl2.c (push_scope, pop_scope): New functions.
9369 * cp-tree.h: Declare them.
9370 * init.c (build_new_1): Delay cleanup until end of full expression.
9371
9372 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
9373
9374 * typeck.c (build_component_ref): Use of a type here is an error.
9375
9376 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
9377
9378 Revamp references to member functions.
9379 * method.c (hack_identifier): Call build_component_ref for a
9380 reference to a member function.
9381 * typeck.c (build_component_ref): Only return a single function
9382 if it's static. Otherwise, return a COMPONENT_REF.
9383 (build_x_function_call): Handle a COMPONENT_REF.
9384 (build_unary_op): Handle all unknown-type things.
9385 * decl2.c (arg_assoc): Handle COMPONENT_REF.
9386 * class.c (instantiate_type): Complain if the function we get is a
9387 nonstatic member function. Remove code for finding "compatible"
9388 functions.
9389 * pt.c (tsubst_copy): Handle NOP_EXPR.
9390 * tree.c (build_dummy_object): New fn.
9391 (maybe_dummy_object): New fn.
9392 (is_dummy_object): New fn.
9393 * cp-tree.h: Declare them.
9394 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
9395 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
9396 * init.c (build_member_call): Use maybe_dummy_object and
9397 is_dummy_object.
9398 (build_offset_ref): Use maybe_dummy_object.
9399 (resolve_offset_ref): Use is_dummy_object.
9400 * typeck.c (build_x_function_call): Call build_dummy_object.
9401 (unary_complex_lvalue): Call is_dummy_object.
9402
9403 * typeck.c (build_component_addr): Make sure field is a field.
9404
9405 * call.c (build_new_op): Delete obsolete code.
9406
9407 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
9408
9409 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
9410
9411 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
9412 std if std is ignored.
9413
9414 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
9415
9416 * decl.c (grokvardecl): Fix thinko.
9417
9418 * decl.c (grokdeclarator): Embedded attrs bind to the right,
9419 not the left.
9420
9421 * parse.y (fn.def2): Fix 'attrs' format.
9422
9423 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
9424
9425 * Makefile.in (CONFLICTS): Update.
9426 * parse.y (expr_or_declarator_intern): New rule.
9427 (expr_or_declarator, direct_notype_declarator, primary,
9428 functional_cast): Use it.
9429 (notype_declarator_intern): New rule.
9430 (notype_declarator, complex_notype_declarator): Use it.
9431
9432 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
9433
9434 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
9435 (grokvardecl): Likewise.
9436
9437 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9438
9439 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
9440 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
9441
9442 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
9443
9444 * pt.c (process_partial_specialization): Cast 1st argument of
9445 `bzero' to (PTR).
9446
9447 * tree.c (build_base_fields): Cast `base_align' to (int) when
9448 comparing against one.
9449
9450 1998-10-16 Mark Mitchell <mark@markmitchell.com>
9451
9452 * decl.c (lookup_name_real): Handle template parameters for member
9453 templates where said parameters have the same name as the
9454 surrounding class.
9455
9456 * decl.c (expand_static_init): Build cleanups before entering the
9457 anonymous function used to do them to avoid access-checking
9458 confusion.
9459
9460 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
9461 accidentally removed by previous change, and make DECL_RTL here.
9462 * class.c (add_method): Don't make DECL_RTL here.
9463
9464 * pt.c (for_each_template_parm): Don't examine uninstantiated
9465 default arguments.
9466
9467 1998-10-16 Dave Brolley <brolley@cygnus.com>
9468
9469 * lex.c (real_yylex): Fix unaligned access of wchar_t.
9470
9471 1998-10-16 Mark Mitchell <mark@markmitchell.com>
9472
9473 * class.c (add_method): Fix documentation to reflect previous
9474 changes. Check for duplicate method declarations here.
9475 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
9476 correctly; such things never match.
9477 (grokfndecl): Don't look for duplicate methods here.
9478 * decl2.c (check_classfn): Don't assume names are mangled.
9479 Don't add bogus member function declarations to a class before the
9480 class type is complete.
9481 (grokfield): Reformat error message.
9482 * method.c (set_mangled_name_for_decl): Don't mangle names while
9483 processing_template_decl.
9484
9485 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
9486
9487 * typeck.c (build_indirect_ref): Complain about a pointer to data
9488 member, too.
9489 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
9490 data member.
9491 * init.c (resolve_offset_ref): Don't undo the above.
9492
9493 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
9494 (struct lang_decl_flags): Add `bitfield'.
9495 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
9496 DECL_BIT_FIELD.
9497 * decl2.c (grokbitfield, grok_alignof): Likewise.
9498 * init.c (build_offset_ref): Likewise.
9499 * typeck.c (build_component_addr, expr_sizeof): Likewise.
9500 * cvt.c (build_up_reference): Don't crash if taking the address
9501 returns error_mark_node.
9502
9503 * decl.c (grokfndecl): Also check ctype when checking for ::main().
9504
9505 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
9506
9507 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
9508 Do mangling here.
9509 (grokdeclarator): Instead of here.
9510 * friend.c (do_friend): Lose special handling of ::main and
9511 __builtin_*.
9512 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
9513
9514 * spew.c (yylex): Clear looking_for_typename if we got
9515 'enum { ... };'.
9516
9517 1998-10-15 Mark Mitchell <mark@markmitchell.com>
9518
9519 * class.c (maybe_warn_about_overly_private_class): Improve error
9520 messages for class with only private constructors.
9521
9522 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
9523 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
9524 (build_typename_type): New function.
9525 * decl.c (build_typename_type): Broken out from ...
9526 (make_typename_type): Use it.
9527 * search.c (lookup_field): Likewise.
9528
9529 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9530
9531 * pt.c (convert_nontype_argument): Check against type_referred_to.
9532 * decl.c (grokvardecl): Check for declarator name before building
9533 DECL_ASSEMBLER_NAME.
9534
9535 1998-10-14 Mark Mitchell <mark@markmitchell.com>
9536
9537 * pt.c (lookup_template_class): Add comment.
9538 (instantiate_class_template): Don't mark the _TYPE node for
9539 member class templates as an instantiation.
9540
9541 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
9542
9543 * decl.c (grokfndecl): Fix my thinko.
9544
9545 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
9546
9547 * tinfo2.cc (fast_compare): Remove.
9548 (before): Just use strcmp.
9549 * tinfo.cc (operator==): Just use strcmp.
9550
9551 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
9552
9553 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
9554 declarations.
9555
9556 1998-10-13 Mark Mitchell <mark@markmitchell.com>
9557
9558 * cp-tree.h (specializations_of_same_template_p): Remove.
9559 * search.c (get_template_base): Don't use it.
9560 (get_template_base_recursive): Likewise.
9561 * pt.c (specializations_of_same_template_p): Remove.
9562 (unify): Don't use it.
9563 (lookup_template_class): Find the correct parent when setting
9564 CLASSTYPE_TI_TEMPLATE.
9565
9566 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
9567
9568 * tinfo.cc (operator==): Always compare names.
9569
9570 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
9571
9572 * decl.c (start_function): Fix cut-and-paste error.
9573
9574 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
9575
9576 * inc/typeinfo: Add #pragma interface.
9577 (operator!=): Just call operator==.
9578 * tinfo.cc: Add #pragma implementation.
9579 (operator==): Move from inc/typeinfo and tinfo2.cc.
9580 Check __COMMON_UNRELIABLE instead of _WIN32.
9581
9582 * typeck2.c (my_friendly_abort): Add URL.
9583
9584 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
9585
9586 * decl.c (start_method): Added extra parameter for attributes.
9587 * cp-tree.h (start_method): Update prototype.
9588 * parse.y (fn.def2): Update start_method parameter list.
9589
9590 1998-10-11 Mark Mitchell <mark@markmitchell.com>
9591
9592 * cp-tree.h (specializations_of_same_template_p): Declare.
9593 * pt.c (specializations_of_same_template_p): New function.
9594 (unify): Use it.
9595 * search.c (get_template_base): Use it.
9596 (get_template_base_recursive): Likewise.
9597
9598 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
9599
9600 * decl2.c (start_objects): Add new variable `joiner' and
9601 initialize it properly.
9602
9603 1998-10-09 Mark Mitchell <mark@markmitchell.com>
9604
9605 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
9606 change to vtable types.
9607
9608 * cvt.c (ocp_convert): Avoid infinite recursion caused by
9609 1998-10-03 change.
9610
9611 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
9612
9613 * pt.c (resolve_overloaded_unification): New fn.
9614 (try_one_overload): Likewise.
9615 (unify): Don't fail on unknown type.
9616 (type_unification_real): Likewise. Use resolve_overloaded_unification
9617 to handle an overloaded argument.
9618 (template_args_equal): Split out...
9619 (comp_template_args): From here.
9620 (determine_specialization): Also allow a template with more
9621 parms than were explicitly specified.
9622 * cp-tree.h: Add template_args_equal.
9623 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
9624
9625 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
9626
9627 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
9628 change.
9629
9630 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
9631
9632 * typeck.c (unsigned_type): Only return TItype nodes when
9633 HOST_BITS_PER_WIDE_INT is >= 64 bits.
9634 (signed_type): Likewise.
9635 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
9636 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
9637 (init_decl_processing): Only create TItype nodes when
9638 HOST_BITS_PER_WIDE_INT is >= 64 bits.
9639 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
9640 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
9641
9642 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9643
9644 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
9645 (gxx.gperf): Update comments describing invocation flags.
9646 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
9647
9648 1998-10-07 Mark Mitchell <mark@markmitchell.com>
9649
9650 * class.c (finish_struct_1): Add commentary on previous change.
9651
9652 * cp-tree.h (vtbl_ptr_type_node): New variable.
9653 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
9654 already of the right type.
9655 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
9656 Simplify code to grow vtable.
9657 * decl.c (vtbl_ptr_type_node): Define.
9658 (init_decl_processing): Initialize it.
9659
9660 1998-10-06 Mark Mitchell <mark@markmitchell.com>
9661
9662 * cp-tree.def (PTRMEM_CST): New tree node.
9663 * cp-tree.h (ptrmem_cst): New type.
9664 (lang_type): Remove local_typedecls.
9665 (dummy): Increase to 12 bits from 11.
9666 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
9667 (PTRMEM_CST_CLASS): New macro.
9668 (PTRMEM_CST_MEMBER): Likewise.
9669 (current_access_specifier): New variable.
9670 (current_class_type): Remove duplicate declaration.
9671 (finish_struct): Change prototype.
9672 (unreverse_member_declarations): New function.
9673 (pushdecl_class_level): Change prototype.
9674 (grok_enum_decls): Remove.
9675 (fixup_anonymous_union): New function.
9676 (grok_x_components): Change prototype.
9677 (tsubst_chain): Remove.
9678 (finish_member_template_decl): Likewise.
9679 (check_explicit_specialization): Fix indentation.
9680 (finish_class_definition): Change prototype.
9681 (finish_member_class_template): Likewise.
9682 (finish_member_declaration): New function.
9683 (check_multiple_declarators): Likewise.
9684 * class.c (class_stack_node_t): New type.
9685 (current_class_base): Remove.
9686 (current_class_stack): Change type.
9687 (current_access_specifier): New variable.
9688 (grow_method): Remove.
9689 (check_member_decl_is_same_in_complete_scope): Break out from
9690 finish_struct.
9691 (make_method_vec): New function.
9692 (free_method_vec): Likewise.
9693 (add_implicitly_declared_members): Break out from finish_struct_1.
9694 (free_method_vecs): New variable.
9695 (add_method): Rework for direct use from parser.
9696 (handle_using_decl): Watch for NULL_TREE while iterating through
9697 CLASSTYPE_METHOD_VEC.
9698 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
9699 just do some error-checking.
9700 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
9701 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
9702 (finish_struct): Change prototype. Simplify; fields and methods
9703 are already set up at this point.
9704 (init_class_processing): Set up current_class_stack.
9705 (pushclass): Save current_access_specifier.
9706 (popclass): Restore it.
9707 (currently_open_class): Simplify.
9708 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
9709 * decl.c (saved_scope): Add access_specifier.
9710 (maybe_push_to_top_level): Save it.
9711 (pop_from_top_level): Restore it.
9712 (maybe_process_template_type_declaration): Use
9713 finish_member_declaration.
9714 (pushtag): Likewise.
9715 (pushdecl_class_level): Don't return a value.
9716 (fixup_anonymous_union): Break out from grok_x_components.
9717 (shadow_tag): Use it.
9718 (xref_tag): Complain about using an elaborated type specifier to
9719 reference a template type parameter or typedef name.
9720 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
9721 (current_local_enum): Remove.
9722 (build_enumerator): Call finish_member_declaration.
9723 (grok_enum_decls): Remove.
9724 * decl2.c (grok_x_components): Simplify.
9725 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
9726 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
9727 (merge_functions): Add to comment.
9728 (arg_assoc_type): Prototype.
9729 (arg_assoc): Pass as many arguments as there are parameters.
9730 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
9731 OFFSET_REF.
9732 * expr.c (cpls_expand_expr): Remove dead code. Handle
9733 PTRMEM_CST.
9734 * friend.c (do_friend): Lookup friends when in nested classes.
9735 Change comments.
9736 * init.c (build_offset_ref): Do lookup even for classes that are
9737 only partially defined.
9738 (decl_constant_value): Remove dead code.
9739 * method.c (build_overload_value): Remove hack where by TYPE was
9740 not a TYPE. Handle PTRMEM_CST.
9741 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
9742 should go.
9743 * parse.y (components, notype_components, component_decl,
9744 component_decl_1, component_declarator, component_declarator0):
9745 Now all are itype rather than ttype. Rework to add members to
9746 classes on the fly.
9747 (typesqpecqual_reserved): Use check_multiple_declarators.
9748 (structsp): Update class to finish_class_definition.
9749 (do_xref_defn): Unsplit into named_class_head.
9750 (access_specifier): Set current_access_specifier.
9751 * pt.c (set_current_access_from_decl): New function.
9752 (finish_member_template_decl): Don't take the parameters.
9753 (comp_template_args): Make more robust.
9754 (lookup_template_class): Don't use current_local_enum.
9755 (for_each_template_parm): Handle PTRMEM_CST.
9756 (instantiate_class_template): Use set_current_access_from_decl,
9757 finish_member_declaration and unreverse_member_declarations. Set
9758 lineno/input_filename before generating implicit member functions.
9759 (type_unification_real): Don't assume back-unification happens
9760 only for the last argument.
9761 (regenerate_decl_from_template): Call pushclass a bit earlier.
9762 (tsubst_chain): Remove.
9763 (tsubst_enum): Use set_current_access_from_decl.
9764 (set_mangled_name_for_template_decl): Fix indentation.
9765 * search.c (lookup_fnfields_1): Change iteration through
9766 CLASSTYPE_METHOD_VEC.
9767 (dfs_pushdecls): Likewise.
9768 (dfs_compress_decls): Likewise.
9769 (add_conversions): Likewise.
9770 * semantics.c (finish_class_definition): Don't take components.
9771 Change call to finish_struct.
9772 (finish_member_declaration): New function.
9773 (finish_member_class_template): Don't take template parameters.
9774 Change call to grok_x_components. Call finish_member_template_decl.
9775 (check_multiple_declarators): New function.
9776 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
9777 a passed in fieldlist.
9778 * tree.c (search_tree): Handle PTRMEM_CST.
9779 (mapcar): Likewise.
9780 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
9781 INTEGER_CSTs, for pointer-to-data members.
9782
9783 * call.c (resolve_args): Resolve template specializations, if
9784 possible.
9785
9786 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9787
9788 * Makefile.in (spew.o): Depend on toplev.h.
9789
9790 * call.c (compare_ics): Initialize variables `deref_from_type2',
9791 `deref_to_type1' and `deref_to_type2'.
9792
9793 * except.c (get_eh_type): Hide prototype and definition.
9794 (process_start_catch_block_old): Remove unused static prototype.
9795
9796 * pt.c (tsubst_decl): Initialize variable `argvec'.
9797
9798 * spew.c: Include toplev.h.
9799
9800 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
9801
9802 * pt.c (instantiate_decl): Do save and restore file position.
9803
9804 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
9805
9806 * method.c (build_decl_overload_real): Clear
9807 numeric_output_need_bar after __.
9808
9809 1998-10-05 Nathan Sidwell <nathan@acm.org>
9810
9811 * call.c (build_new_method_call): Issue 'incomplete type' error,
9812 if class is not defined.
9813
9814 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9815
9816 * call.c (build_object_call): Move declaration of variable
9817 `fn' into the scope where it is used. Don't access variable
9818 `fn' when it is uninitialized, instead use `fns'.
9819
9820 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9821
9822 * errfn.c (cp_thing): Print buf as a string not as a printf format
9823 to avoid problems with the operator%. Consequently, `%%' sequences
9824 in format are copied as `%' in buf.
9825
9826 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
9827
9828 * pt.c (pop_tinst_level): Call extract_interface_info.
9829 (instantiate_decl): Don't save and restore file position.
9830
9831 * decl.c (cp_finish_decl): Make statics in extern inlines and
9832 templates common, if possible and the target doesn't support weak
9833 symbols.
9834
9835 * decl.c (grokdeclarator): Remove redundant calls to
9836 build_type_variant and some duplicated code.
9837 * sig.c (build_signature_reference_type): Only take the type parm.
9838 (build_signature_pointer_type): Likewise.
9839 * tree.c (build_cplus_method_type): Adjust.
9840 * cp-tree.h: Update.
9841
9842 1998-10-04 Mark Mitchell <mark@markmitchell.com>
9843
9844 * call.c (build_over_call): Make pedwarns about dropped qualifiers
9845 into full-fledged errors.
9846 * cvt.c (convert_to_reference): Likewise.
9847 * typeck.c (convert_for_assignment): Likewise.
9848
9849 * search.c (expand_upcast_vtables): In addition to unsetting
9850 TREE_READONLY, remove top-level const type qualifier.
9851
9852 1998-10-03 Mark Mitchell <mark@markmitchell.com>
9853
9854 * class.c (current_class_ptr, current_class_ref): Clarify
9855 documentation.
9856 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
9857 NOP type conversions.
9858 * decl.c (decls_match): Use comptypes directly; ignore
9859 qualifiers on the DECL.
9860 (duplicate_decls): Remove qualifier checks on DECL.
9861 (grokdeclarator): Make the type built up include top-level
9862 qualifiers.
9863 * decl2.c (do_dtors): Fix spelling error.
9864 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
9865 when printing type information.
9866 * init.c (build_new_1): Add documentation. Deal with the fact
9867 that type of allocated memory now contains qualifiers.
9868 * lex.c (is_global): Improve error-recovery.
9869 * sig.c (build_member_function_pointer): Don't cast away const
9870 on fields of sigtable_entry_type.
9871 * tree.c (lvalue_type): Don't look at top-level qualifiers on
9872 expressions.
9873 * typeck.c (decay_conversion): Likewise.
9874 (build_component_ref): Make sure the type of the COMPONENT_REF
9875 contains top-level qualifiers, as appropriate. Improve
9876 error-handling.
9877 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
9878 (build_array_ref): Likewise.
9879 (build_unary_op): Improve error-recovery.
9880 (unary_complex_lvalue): Make taking the address a bound member
9881 function an error, not a sorry.
9882 (build_conditional_expr): Look at the type qualifiers, not the
9883 qualifiers on the expression itself.
9884
9885 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
9886
9887 * decl2.c (merge_functions): Remove duplicates.
9888
9889 * decl2.c: Add -f{no-,}implicit-inline-templates.
9890 (import_export_decl): Check it.
9891
9892 * decl.c (lookup_name_real): Template parms also take precedence
9893 over implicit typename. Only warn if yylex.
9894
9895 * typeck.c (build_conditional_expr): Only fold if ifexp is an
9896 INTEGER_CST.
9897
9898 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
9899 instead of linkage.
9900
9901 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
9902
9903 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
9904 * class.c (build_vbase_pointer): Use it.
9905 * rtti.c (expand_class_desc): Likewise.
9906 * tree.c (build_vbase_pointer_fields): Likewise.
9907
9908 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
9909
9910 * decl.c (start_decl): Add invocation of
9911 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
9912 (start_function): Add invocation of
9913 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
9914
9915 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
9916 HANDLE_GENERIC_PRAGMAS.
9917
9918 1998-09-28 Anthony Green <green@cygnus.com>
9919
9920 * semantics.c (finish_asm_stmt): Always permit volatile asms.
9921
9922 1998-09-28 Mark Mitchell <mark@markmitchell.com>
9923
9924 * decl.c (grokdeclarator): Tighten checks for invalid
9925 destructors. Improve error-messages and error-recovery.
9926 * decl2.c (check_classfn): Don't assume that mangled destructor
9927 names contain type information.
9928
9929 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
9930
9931 * search.c (get_base_distance): Remove assert.
9932
9933 * decl2.c (build_anon_union_vars): Don't process a field with no
9934 name.
9935 (finish_anon_union): Also complain about local anon unions with no
9936 members.
9937
9938 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
9939
9940 * decl.c (lookup_namespace_name): If the name is a namespace,
9941 return it immediately.
9942
9943 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9944
9945 * cp-tree.h (define_case_label): Remove unused parameter.
9946 (check_java_method): Likewise.
9947 (grokclassfn): Likewise.
9948 (expand_aggr_init): Likewise.
9949 (build_x_delete): Likewise.
9950 (maybe_end_member_template_processing): Likewise.
9951 (unshare_base_binfos): Add prototype.
9952 (string_conv_p): Likewise.
9953 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
9954
9955 * cvt.c (build_up_reference): Remove unused parameter
9956 `checkconst', all callers changed.
9957 (build_type_conversion): Mark parameter `code' with
9958 ATTRIBUTE_UNUSED.
9959 (build_expr_type_conversion): Initialize variable `conv'.
9960
9961 * decl.c (push_namespace): Initialize variable `d'.
9962 (define_case_label): Remove unused parameter `decl', all callers
9963 changed.
9964
9965 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
9966 `argc' with ATTRIBUTE_UNUSED.
9967 (grokclassfn): Remove unused parameter `cname', all callers
9968 changed.
9969 (check_java_method): Likewise for parameter `ctype'.
9970 (copy_assignment_arg_p): Mark parameter `virtualp' with
9971 ATTRIBUTE_UNUSED.
9972 (finish_prevtable_vardecl): Likewise for parameter `prev'.
9973
9974 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
9975
9976 * init.c (expand_aggr_init_1): Remove unused parameter
9977 `alias_this', all callers changed.
9978 (expand_aggr_init): Likewise.
9979 (expand_default_init): Likewise.
9980 (build_new_1): Initialize variable `susp'.
9981 (build_x_delete): Remove unused parameter `type', all callers
9982 changed.
9983
9984 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
9985 ATTRIBUTE_UNUSED.
9986 (readescape): Use (unsigned) value in shift.
9987 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
9988 comparing to a signed quantity.
9989
9990 * pt.c (maybe_end_member_template_processing): Remove unused
9991 parameter `decl', all callers changed.
9992 (check_explicit_specialization): Add braces around empty body in
9993 an else-statement.
9994 (current_template_args): Initialize variable `args'.
9995 (lookup_template_class): Likewise for variable `prev_local_enum'.
9996 (tsubst_decl): Likewise for variable `r'.
9997 (set_mangled_name_for_template_decl): Initialize variable
9998 `context'.
9999
10000 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
10001 Likewise for variable `i'.
10002 (yylex): Initialize variable `trrr'.
10003
10004 * typeck.c (compparms): Mark variable `strict' with
10005 ATTRIBUTE_UNUSED.
10006
10007 * xref.c (simplify_type): Cast argument of ctype function to
10008 `unsigned char'.
10009
10010 1998-09-24 Mark Mitchell <mark@markmitchell.com>
10011
10012 * cp-tree.h (language_lvalue_valid): Remove.
10013 * decl.c (grokdeclarator): Don't disallow references to functions.
10014 * tree.c (lvalue_p_1): New function, combining duplicated
10015 code from ...
10016 (lvalue_p): Use it.
10017 (real_lvalue_p): Likewise.
10018 * typeck.c (language_lvalue_valid): Remove.
10019 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
10020 they don't have TREE_READONLY set.
10021 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
10022
10023 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
10024
10025 * spew.c (yylex): Give diagnostic.
10026 * hash.h (is_reserved_word): Add export.
10027 * gxx.gperf: Likewise.
10028 * lex.h (rid): Add RID_EXPORT.
10029 * lex.c (init_parse): Likewise.
10030
10031 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
10032
10033 * friend.c (do_friend): Make warning a full sentence.
10034
10035 1998-09-22 Mark Mitchell <mark@markmitchell.com>
10036
10037 * parse.y (component_decl_list): Improve error-recovery.
10038
10039 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
10040
10041 * decl.c (make_typename_type): Move error to point where name
10042 variable can be used by dump_type.
10043
10044 1998-09-22 Mark Mitchell <mark@markmitchell.com>
10045
10046 * decl.c (grokfndecl): Improve error-recovery.
10047 * decl2.c (grokfield): Likewise.
10048 * pt.c (finish_member_template_decl): Likewise.
10049
10050 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
10051
10052 * method.c (hack_identifier): Finding multiple members is always
10053 an error.
10054
10055 1998-09-21 Per Bothner <bothner@cygnus.com>
10056
10057 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
10058
10059 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
10060
10061 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
10062
10063 1998-09-20 Mark Mitchell <mark@markmitchell.com>
10064
10065 * class.c (maybe_warn_about_overly_private_class): Reformat.
10066
10067 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
10068
10069 * exception.cc (__cplus_type_matcher): Realign some code.
10070
10071 1998-09-16 Mark Mitchell <mark@markmitchell.com>
10072
10073 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
10074 (tinfo2.o): Likewise.
10075 (exception.o): Likewise.
10076 (new.o): Likewise.
10077 (opnew.o): Likewise.
10078 (opnewnt.o): Likewise.
10079 (opvnew.o): Likewise.
10080 (opvnewnt.o): Likewise.
10081 (opdel.o): Likewise.
10082 (opdelnt.o): Likewise.
10083 (opvdel.o): Likewise.
10084 (opvdelnt.o): Likewise.
10085
10086 1998-09-16 Richard Henderson <rth@cygnus.com>
10087
10088 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
10089
10090 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
10091
10092 * call.c (build_field_call): Handle static data members too.
10093
10094 * typeck.c (comptypes): When comparing pointer types, check
10095 whether referred types match even in strictest modes.
10096
10097 1998-09-15 Mark Mitchell <mark@markmitchell.com>
10098
10099 * cp-tree.h: Revert previous change.
10100 (finish_struct_methods): Remove declaration.
10101 * class.c: Revert previous change.
10102 (maybe_warn_about_overly_private_class): New function.
10103 (finish_struct_methods): Declare here, and make static. Remove
10104 unnecessary parameters. Tidy slightly. Use
10105 maybe_warn_about_overly_private_class.
10106 (finish_struct_1): Adjust. Remove check for private constructors,
10107 now done elsewhere.
10108 (finish_struct): Adjust.
10109
10110 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
10111
10112 * except.c (expand_start_catch_block): No need to check for new
10113 exception model.
10114 (process_start_catch_block_old): Deleted.
10115 (process_start_catch_block): Add call to start_decl_1().
10116 (expand_end_catch_block): Add call to end_catch_handler().
10117 * exception.cc (__cplus_type_matcher): Only check the exception
10118 language if there is an exception table.
10119
10120 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
10121
10122 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
10123 as used to prevent conflicts with virtual function tables.
10124
10125 1998-09-14 Mark Mitchell <mark@markmitchell.com>
10126
10127 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
10128 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
10129 * class.c (maybe_class_too_private_p): New function.
10130 (finish_struct_methods): Use it.
10131 (finish_struct_1): Likewise.
10132 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
10133 appropriate.
10134
10135 * pt.c (check_specialization_scope): Fix spelling error.
10136 (check_explicit_specialization): Remove code to handle explicit
10137 specializations in class scope; they are now correctly diagnosed
10138 as errors.
10139
10140 1998-09-10 Mark Mitchell <mark@markmitchell.com>
10141
10142 * decl.c (pushdecl): Don't copy types if the
10143 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
10144 type.
10145
10146 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10147
10148 * class.c (get_enclosing_class): New function.
10149 (is_base_of_enclosing_class): Likewise.
10150 * cp-tree.h (get_enclosing_class): Declare.
10151 (is_base_of_enclosing_class): Likewise.
10152 * pt.c (coerce_template_parms): Use them.
10153
10154 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
10155
10156 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
10157 null to decide whether to use it.
10158
10159 * error.c (dump_type_real): Handle NAMESPACE_DECL.
10160 * parse.y (base_class.1): Avoid crash on error.
10161
10162 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
10163
10164 * decl.c (make_typename_type): If context is a namespace, the code
10165 is in error.
10166
10167 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
10168
10169 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
10170
10171 1998-09-08 Mark Mitchell <mark@markmitchell.com>
10172
10173 * cp-tree.h (anonymous_namespace_name): Declare.
10174 * decl.c: Define it.
10175 (push_namespace): Use anonymous_namespace_name, rather than local
10176 static anon_name.
10177 * error.c (dump_decl): If a namespace is named
10178 anonymous_namespace_name, call it {anonymous}.
10179
10180 * decl.c (grokparms): Distinguish between references and pointers
10181 in error message.
10182
10183 1998-09-08 Richard Henderson <rth@cygnus.com>
10184 Mark Mitchell <mark@markmitchell.com>
10185
10186 * pt.c (process_partial_specialization): Consistently allocate
10187 and zero tpd.parms based on ntparms. Use tpd2.parms, not
10188 tpd.parms, where appropriate.
10189
10190 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
10191
10192 * Makefile.in (INCLUDES): Update after recent toplevel gcc
10193 reorganizations.
10194
10195 1998-09-05 Mark Mitchell <mark@markmitchell.com>
10196
10197 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
10198 * class.c (finish_struct): Remove hackery to deal with explicit
10199 specializations in class scope.
10200 * decl.c (grokfndecl): Improve error-recovery.
10201 * decl2.c (grokfield): Likewise.
10202 * pt.c (check_specialization_scope): New function.
10203 (begin_specialization): Call it.
10204 (process_partial_specialization): New function, split out from
10205 push_template_decl. Check partial specializations more
10206 stringently.
10207 (push_template_decl): Call it.
10208 (check_explicit_specialization): Don't attempt to handle explicit
10209 specializations in class scope.
10210 (template_parm_data): Document. Add current_arg and
10211 arg_uses_template_parms.
10212 (mark_template_parm): Set it.
10213 (tsubst_arg_types): Remove unused variable.
10214 * semantics.c (begin_class_definition): Tweak.
10215
10216 1998-09-04 Mark Mitchell <mark@markmitchell.com>
10217
10218 * inc/typeinfo (type_info::type_info(const char*)): Make
10219 `explicit'.
10220
10221 * cp-tree.h (hash_tree_cons_simple): New macro.
10222 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
10223 (coerce_template_parms): Use make_temp_vec, instead of
10224 make_tree_vec. Document this behavior.
10225 (lookup_template_class): Likewise.
10226 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
10227 Remove dead code (and add assertion to check its deadness). Fix
10228 bug w.r.t. exception specifications.
10229
10230 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
10231
10232 * decl2.c (import_export_vtable): Always make artificials comdat.
10233 (import_export_decl): Likewise.
10234 * pt.c (mark_decl_instantiated): Likewise.
10235
10236 1998-09-03 Mark Mitchell <mark@markmitchell.com>
10237
10238 * cp-tree.h (finish_globally_qualified_member_call_expr):
10239 Rename to ...
10240 (finish_qualified_call_expr).
10241 * semantics.c: Likewise.
10242 * parse.y (primary): Use it.
10243 * method.c (hack_identifier): Remove redundant code.
10244
10245 * init.c (resolve_offset_ref): Call convert_from_reference to
10246 handle members of reference type. Improve error recovery.
10247
10248 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
10249
10250 * cp-tree.h: Declare warn_nontemplate_friend.
10251 * decl2.c (lang_decode_option): Set.
10252 * lang-options.h: Add -Wnon-template-friend.
10253 * friend.c (do_friend): Use to toggle non-template function warning.
10254
10255 1998-09-03 Mark Mitchell <mark@markmitchell.com>
10256
10257 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
10258 corresponding INTEGER_CSTs when processing_template_decl.
10259 * pt.c (tsubst_enum): Tweak accordingly.
10260
10261 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10262
10263 * decl.c (pushdecl_class_level): Add warning here.
10264 (pushdecl): Tweak.
10265
10266 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
10267
10268 * cvt.c (convert_pointer_to_real): Tidy.
10269 * search.c (get_base_distance_recursive): Simplify.
10270 (get_base_distance): Likewise.
10271
10272 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
10273 parms.
10274
10275 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
10276
10277 * lex.c (check_newline): Call HANDLE_PRAGMA before
10278 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
10279 if unknown pragmas are encountered.
10280 (handle_sysv_pragma): Interpret return code from
10281 handle_pragma_token (). Return success/failure indication rather
10282 than next unprocessed character.
10283 (pragma_getc): New function: retrieves characters from the
10284 input stream. Defined when HANDLE_PRAGMA is defined.
10285 (pragma_ungetc): New function: replaces characters back into the
10286 input stream. Defined when HANDLE_PRAGMA is defined.
10287
10288 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
10289
10290 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
10291 * class.c (build_vtable_entry_ref): Likewise.
10292
10293 1998-09-01 Mark Mitchell <mark@markmitchell.com>
10294
10295 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
10296 * decl2.c (import_export_decl): Likewise.
10297 * pt.c (instantiate_decl): Use it.
10298
10299 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
10300
10301 * decl.c (lookup_name_real): Also do implicit typename thing for
10302 artificial TYPE_DECLs.
10303 * search.c (lookup_field): Likewise.
10304 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
10305 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
10306 (enter_scope_of): Extract type from implicit typename.
10307 (begin_class_definition): Likewise.
10308 * lex.c (identifier_type): Handle implicit typename when checking
10309 for SELFNAME.
10310
10311 * cp-tree.h: Declare flag_strict_prototype.
10312 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
10313 -fstrict-prototype.
10314 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
10315 specified, set it to the value of pedantic.
10316
10317 1998-09-01 Mark Mitchell <mark@markmitchell.com>
10318
10319 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
10320
10321 1998-08-31 Mark Mitchell <mark@markmitchell.com>
10322
10323 * decl.c (finish_enum): Handle member enums of classes declared in
10324 template functions.
10325
10326 * decl2.c (grok_x_components): Strip attributes before calling
10327 groktypename.
10328
10329 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
10330
10331 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
10332 -fenum-int-equivalence and -fno-nonnull-objects.
10333 * class.c (check_for_override): Remove support for -fall-virtual.
10334 (finish_struct_1): Likewise.
10335 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
10336 * typeck.c (build_binary_op_nodefault): Likewise.
10337 * cvt.c (ocp_convert): Likewise.
10338 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
10339 * class.c (build_vbase_path): Likewise.
10340
10341 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
10342
10343 * Makefile.in (INTERFACE): New, set to 1.
10344
10345 1998-08-30 Mark Mitchell <mark@markmitchell.com>
10346
10347 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
10348 comparing with global_namespace.
10349 (dump_aggr_type): Likewise.
10350
10351 * decl.c (grokfndecl): Issue error on declaration of friend
10352 templates with explicit template arguments.
10353
10354 * pt.c (convert_template_argument): New function, split out
10355 from...
10356 (coerce_template_parms): Here.
10357 (tsubst): Attempt better error-recovery.
10358
10359 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
10360
10361 * pt.c (decl_template_parm_p): Add checks for
10362 TEMPLATE_TEMPLATE_PARM.
10363
10364 1998-08-28 Mark Mitchell <mark@markmitchell.com>
10365
10366 * lex.c (do_identifier): Fix thinko in previous change.
10367
10368 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
10369
10370 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
10371 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
10372
10373 1998-08-28 Richard Henderson <rth@cygnus.com>
10374
10375 Add support for discarding unused virtual functions.
10376 * lang-options.h: Add -fvtable-gc.
10377 * cp-tree.h: Add flag_vtable_gc.
10378 * decl2.c (output_vtable_inherit): New fn.
10379 (finish_vtable_vardecl): Call it.
10380 * class.c (build_vtable_entry_ref): New fn.
10381 (build_vtbl_ref): Call it.
10382
10383 1998-08-28 Mark Mitchell <mark@markmitchell.com>
10384
10385 * cp-tree.h (build_enumerator): Take the enumeration type as a
10386 parameter.
10387 * decl.c (finish_enum): Don't set the TREE_TYPE for the
10388 enumeration constant values if we're processing_template_decls.
10389 Don't set the type for the CONST_DECLs either; that's done in
10390 build_enumerator.
10391 (build_enumerator): Take the enumeration type as a
10392 parameter.
10393 * lex.c (do_identifier): Don't resolve enumeration constants while
10394 processing template declarations, even if they happen to be
10395 TEMPLATE_PARM_INDEXs.
10396
10397 * parse.y (current_enum_type): New variable.
10398 (primary): Don't allow statement-expression in local classes just
10399 as we don't in global classes.
10400 (structsp): Use current_enum_type.
10401 (enum_list): Likewise.
10402 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
10403 finish_enum; they no longer occur.
10404
10405 * cp-tree.h (finish_base_specifier): New function.
10406 * parse.y (base_class): Use it.
10407 * semantics.c (finish_base_specifier): Define it.
10408
10409 * parse.y (structsp): Warn on use of typename outside of template
10410 declarations.
10411
10412 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
10413
10414 * lex.c (handle_cp_pragma): Remove #pragma vtable.
10415 * lang-options.h: Remove +e options.
10416 * decl2.c (lang_decode_option): Likewise.
10417 (import_export_vtable): Don't check write_virtuals.
10418 (finish_vtable_vardecl, finish_file): Likewise.
10419 * search.c (dfs_debug_mark): Likewise.
10420 * semantics.c (begin_class_definition): Likewise.
10421 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
10422
10423 * call.c (build_over_call): Check flag_elide_constructors.
10424 * decl2.c: flag_elide_constructors defaults to 1.
10425 * typeck.c (convert_arguments): Remove return_loc parm.
10426 (build_function_call_real): Adjust.
10427
10428 * search.c: Tear out all mi_matrix and memoize code.
10429 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
10430 * lang-options.h: Remove documentation for -fhandle-exceptions,
10431 -fmemoize-lookups and -fsave-memoized.
10432 * cp-tree.h: Lose mi_matrix and memoize support.
10433 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
10434 * class.c: Lose struct class_level.
10435 (pushclass, popclass): Lose memoize support.
10436 * init.c (build_offset_ref): Likewise.
10437
10438 Never change BINFO_INHERITANCE_CHAIN.
10439 * init.c (emit_base_init): Change modification of
10440 BINFO_INHERITANCE_CHAIN to an assert.
10441 * search.c (get_base_distance_recursive): Likewise.
10442 (get_base_distance): Likewise.
10443 (lookup_member): Likewise.
10444 (convert_pointer_to_single_level): Likewise.
10445 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
10446 (lookup_fnfields): Likewise.
10447 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
10448 (unshare_base_binfos): Don't call propagate_binfo_offsets.
10449 (layout_basetypes): Call propagate_binfo_offsets instead of
10450 unshare_base_binfos.
10451 * decl.c (xref_basetypes): Call unshare_base_binfos.
10452 * pt.c (instantiate_class_template): Likewise.
10453 * tree.c (reverse_path): Remove 'copy' parm; always make a
10454 temporary copy.
10455 * class.c (build_vbase_path): Just call it.
10456 * search.c (compute_access): Likewise. Don't re-reverse.
10457
10458 1998-08-27 Mark Mitchell <mark@markmitchell.com>
10459
10460 * class.c (build_vbase_path): Use reverse_path.
10461 (finish_base_struct): Move warnings for inaccessible bases to
10462 layout_basetypes.
10463 (modify_one_vtable): Remove check of TREE_USED (binfo).
10464 (fixup_vtable_deltas1): Likewise.
10465 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
10466 (xref_tag): Remove binfos parameter.
10467 (make_binfo): Remove chain parameter.
10468 (reverse_path): Add copy parameter.
10469 * decl.c (init_decl_processing): Change calls to xref_tag.
10470 (xref_tag): Remove binfos parameter.
10471 (xref_basetypes): Change calls to make_binfo.
10472 * decl2.c (grok_x_components): Change calls to xref_tag.
10473 (handle_class_head): Likewise.
10474 * friend.c (do_friend): Likewise.
10475 * lex.c (make_lang_type): Change calls to make_binfo.
10476 * parse.y (structsp): Change calls to xref_tag.
10477 (named_complex_class_head_sans_basetype): Likewise.
10478 (named_class_head): Likewise.
10479 * rtti.c (init_rtti_processing): Likewise.
10480 * search.c (compute_access): Change calls to reverse_path.
10481 (dfs_get_vbase_types): Change calls to make_binfo.
10482 (get_vbase_types): Remove dead code.
10483 * tree.c (unshare_base_binfos): Change calls to make_binfo.
10484 (layout_basetypes): Warn here about inaccessible bases.
10485 (make_binfo): Remove chain parameter.
10486 (reverse_path): Add copy parameter.
10487
10488 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
10489
10490 * class.c: #if 0 complete_type_p.
10491 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
10492 * method.c (process_overload_item): Likewise.
10493 * typeck.c (comp_target_types): Likewise.
10494
10495 Stop sharing binfos for indirect virtual bases.
10496 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
10497 (layout_basetypes): Likewise.
10498 (unshare_base_binfos): Copy vbases, too.
10499 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
10500 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
10501 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
10502 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
10503 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
10504 reference to BINFO_VIA_PUBLIC.
10505 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
10506 (push_class_decls): Use them.
10507 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
10508 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
10509
10510 1998-08-27 Mark Mitchell <mark@markmitchell.com>
10511
10512 * decl.c (build_enumerator): Set DECL_CONTEXT for the
10513 CONST_DECLs.
10514
10515 1998-08-26 Mark Mitchell <mark@markmitchell.com>
10516
10517 * cp-tree.h (finish_enum): Change prototype.
10518 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
10519 VALUES parameter. Don't try to compute mins/maxs if
10520 processing_template_decl.
10521 * parse.y (structsp): Use new calling sequence for finish_enum.
10522 * pt.c (tsubst_enum): Likewise. Take the new type as input.
10523 (lookup_template_class): Remove unused variables. Tweak.
10524 Register enums on instantiation list before substituting
10525 enumeration constants.
10526 (tsubst_decl): Remove unused variables.
10527 (regenerate_decl_from_template): Likewise.
10528
10529 * decl.c (duplicate_decls): Don't obliterate the
10530 DECL_TEMPLATE_INFO for a template if we're not replacing it with
10531 anything.
10532
10533 * lex.c (do_identifier): Fix typo in comment.
10534
10535 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10536
10537 * errfn.c: Remove stdarg.h/varargs.h.
10538 * tree.c: Likewise.
10539
10540 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
10541
10542 * pt.c (tsubst_copy): Only do typename overloading on an
10543 IDENTIFIER_NODE that happens to look like a typename if it actually
10544 has a type for us to use.
10545
10546 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
10547
10548 * typeck.c (comp_cv_target_types): Split out...
10549 (comp_target_types): From here. Don't allow cv-qual changes under
10550 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
10551 (build_ptrmemfunc): Pass 1 to nptrs.
10552 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
10553
10554 1998-08-25 Mark Mitchell <mark@markmitchell.com>
10555
10556 * search.c (dependent_base_p): Don't compare a binfo to
10557 current_class_type; use the TREE_TYPE of the binfo instead.
10558
10559 * cp-tree.h (CLASS_TYPE_P): Revise definition.
10560
10561 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
10562
10563 * decl.c (duplicate_decls): Don't complain about different
10564 exceptions from an internal decl even if pedantic.
10565
10566 * typeck.c (convert_for_assignment): Converting from pm of vbase
10567 to derived is an error, not a sorry.
10568
10569 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
10570 * class.c (fixed_type_or_null): Rename from
10571 resolves_to_fixed_type_p. Return the dynamic type of the
10572 expression, if fixed, or null.
10573 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
10574 does not match the static type.
10575 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
10576 resolves_to_fixed_type_p again.
10577
10578 1998-08-24 Mark Mitchell <mark@markmitchell.com>
10579
10580 * pt.c (tsubst_decl): Move special case code for dealing with
10581 tricky friend templates here from ...
10582 (regenerate_decl_from_template): Here.
10583
10584 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
10585
10586 * decl.c (start_decl): Remove redundant linkage check.
10587
10588 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
10589
10590 * typeck.c (c_expand_return): Handle the case that valtype
10591 is wider than the functions return type.
10592
10593 1998-08-24 Mark Mitchell <mark@markmitchell.com>
10594
10595 * cp-tree.h (CLASS_TYPE_P): New macro.
10596 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
10597 * pt.c (process_template_parm): Undo previous change.
10598
10599 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
10600
10601 * cp-tree.h: Declare.
10602 * pt.c (decl_template_parm_p): New function.
10603 * decl.c (pushdecl): Check decls for redeclaring template parms.
10604 (xref_tag): Make redeclaration an error, print decl.
10605 * decl2.c (grokfield): Check field_decls for redeclaration as well.
10606
10607 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
10608
10609 * parse.y (primary): Fix up the type of string constants.
10610
10611 1998-08-24 Mark Mitchell <mark@markmitchell.com>
10612
10613 * typeck.c (convert_for_initialization): Move check for odd uses
10614 of NULL to avoid duplicate warnings.
10615
10616 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
10617
10618 * tree.c (lvalue_type): Fix for arrays.
10619 * typeck.c (string_conv_p): New fn.
10620 (convert_for_assignment): Use it.
10621 (build_unary_op): Use lvalue_type.
10622 * call.c (standard_conversion, convert_like): Use string_conv_p.
10623 (add_function_candidate): Use lvalue_type.
10624 * cvt.c (convert_to_reference): Likewise.
10625 * decl2.c (lang_decode_option): Ignore -traditional.
10626 * decl.c (init_decl_processing): flag_writable_strings inhibits
10627 flag_const_strings.
10628
10629 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
10630
10631 * lang-options.h (lang_options): Add fconst-strings to the list
10632 of valid options.
10633 * decl2.c (lang_f_options, lang_decode_option): Likewise.
10634
10635 1998-08-24 Nathan Sidwell <nathan@acm.org>
10636
10637 * lex.c (real_yylex): Don't warn about long long constants if
10638 we're allowing long long.
10639
10640 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
10641
10642 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
10643 accessing bindings directly.
10644
10645 * search.c (my_tree_cons): Reimplement.
10646
10647 * lang-specs.h: Remove __HONOR_STD.
10648 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
10649
10650 1998-08-23 Mark Mitchell <mark@markmitchell.com>
10651
10652 * decl.c (grokdeclarator): Complain about in-class initialization
10653 of aggregates and/or references.
10654 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
10655 TEMPLATE_TYPE_PARMs.
10656
10657 * decl2.c (grok_array_decl): Add comment.
10658 (mark_used): Don't instantiate an explicit instantiation.
10659 * friend.c (make_friend_class): Remove bogus comment. Fix check
10660 for partial specializations.
10661 * pt.c (check_explicit_specialization): Don't
10662 SET_DECL_EXPLICIT_INSTANTIATION here.
10663 (mark_decl_instantiated): Or here.
10664 (do_decl_instantiation): Do it here, instead. Add checks for
10665 duplicate explicit instantiations, etc. Tidy.
10666 (do_type_instantiation): Likewise.
10667 (instantiate_decl): Improve comments. Complain about explicit
10668 instantiations where no definition is available.
10669
10670 * cp-tree.h (ansi_null_node): Remove.
10671 * call.c (build_over_call): Warn about converting NULL to an
10672 arithmetic type.
10673 * cvt.c (build_expr_type_conversion): Likewise. Use
10674 null_ptr_cst_p instead of expanding it inline.
10675 * decl.c (ansi_null_node): Remove.
10676 (init_decl_processing): Make null_node always have integral type.
10677 * except.c (build_throw): Warn about converting NULL to an
10678 arithmetic type.
10679 * lex.c (init_parse): Remove handling of ansi_null_node.
10680 * pt.c (type_unification_real): Don't convert NULL to void* type.
10681 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
10682 (convert_for_assignment): Warn about converting NULL to an
10683 arithmetic type.
10684 (convert_for_initialization): Likewise.
10685
10686 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
10687
10688 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
10689 * pt.c (coerce_template_parms): Use no_linkage_check.
10690 * decl.c (grokvardecl): Likewise.
10691 (grokfndecl): Likewise. Members of anonymous types have no linkage.
10692
10693 * method.c (process_overload_item): Remove useless code.
10694
10695 1998-08-20 Per Bothner <bothner@cygnus.com>
10696
10697 Handle new'ing of Java classes.
10698 * init.c (build_class_classref): New function.
10699 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
10700 constructor does not return this; don't need to exception-protect.
10701
10702 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
10703 * decl2.c (acceptable_java_type): Handle template-derived types.
10704
10705 1998-08-20 Per Bothner <bothner@cygnus.com>
10706
10707 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
10708
10709 1998-08-20 Mark Mitchell <mark@markmitchell.com>
10710
10711 * decl.c (duplicate_decls): Always merge the old and new patterns
10712 for templates, regardless of whether or not the new one has
10713 DECL_INITIAL. Don't throw away specializations. Merge
10714 DECL_SAVED_TREE.
10715 * pt.c (tsubst_decl): Use the right pattern when calculating the
10716 complete args for a new template instance.
10717 (do_decl_instantiation): Fix typo in comment.
10718 (regenerate_decl_from_template): Deal with tricky friend template
10719 case.
10720 (instantiate_decl): Likewise.
10721
10722 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
10723
10724 * init.c (build_builtin_delete_call): Add missing assemble_external
10725 call.
10726
10727 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
10728
10729 * parse.y (notype_unqualified_id): Also accept ~A<int>.
10730
10731 1998-08-19 Mark Mitchell <mark@markmitchell.com>
10732
10733 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
10734 arithmetic.
10735 * except.c (build_throw): Warn when NULL is thrown, even with
10736 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
10737 thrown expression.
10738
10739 * cp-tree.h (ansi_null_node): New variable.
10740 * decl.c (ansi_null_node): New variable.
10741 (init_decl_processing): Initialize its type.
10742 * lex.c (init_parse): Initialize its value. Use ansi_null_node
10743 for null_node in non-ANSI mode.
10744 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
10745 place of null_node to avoid spurious errors.
10746
10747 1998-08-17 Mark Mitchell <mark@markmitchell.com>
10748
10749 * cp-tree.h (enter_scope_of): New function.
10750 * parse.y (complex_direct_notype_declarator): Use it.
10751 * semantics.c (enter_scope_of): New function.
10752
10753 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
10754
10755 * decl.c (grokparms): No, here.
10756
10757 * decl.c (grokdeclarator): Catch parm with pointer to array of
10758 unknown bound here...
10759 * method.c (process_overload_item): ...not here.
10760
10761 * gxxint.texi: Remove obsolete documentation of overloading code.
10762
10763 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
10764 * class.c (finish_struct_bits): Likewise.
10765
10766 * tree.c (lvalue_type): Fix for arrays.
10767 * typeck.c (build_unary_op): Use lvalue_type.
10768 * call.c (add_function_candidate): Likewise.
10769 * cvt.c (convert_to_reference): Likewise.
10770
10771 * decl2.c (lang_decode_option): Ignore -traditional.
10772
10773 * init.c (build_offset_ref): Don't mess with error_mark_node.
10774 * lex.c (do_scoped_id): Use cp_error.
10775
10776 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
10777
10778 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
10779
10780 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
10781
10782 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
10783
10784 * cp-tree.h (set_identifier_local_value): Provide prototype.
10785
10786 * decl2.c (do_namespace_alias): Remove unused variables `binding'
10787 and `old'.
10788
10789 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
10790
10791 * Makefile.in: Rename BBISON to BISON so that it can be properly
10792 inherited from the parent makefile.
10793
10794 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
10795
10796 * lang-options.h: Add -finit-priority.
10797 * decl2.c: Likewise. Check flag_init_priority instead of
10798 USE_INIT_PRIORITY.
10799
10800 * decl2.c (setup_initp): New fn.
10801 (start_objects, finish_objects, do_ctors): Handle init_priority.
10802 (do_dtors, finish_file): Likewise.
10803
10804 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
10805
10806 * pt.c (tsubst_copy): Hush warning.
10807
10808 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
10809
10810 1998-08-12 Mark Mitchell <mark@markmitchell.com>
10811
10812 * pt.c (print_template_context): Don't abort when instantiating a
10813 synthesized method.
10814
10815 * decl.c (grokdeclarator): Issue errors on namespace qualified
10816 declarators in parameter lists or in class scope.
10817
10818 1998-08-09 Mark Mitchell <mark@markmitchell.com>
10819
10820 * pt.c (check_explicit_specialization): Don't abort on bogus
10821 explicit instantiations.
10822
10823 1998-08-07 Mark Mitchell <mark@markmitchell.com>
10824
10825 * typeck.c (require_complete_type): Use complete_type_or_else.
10826 (complete_type_or_else): Always return NULL_TREE on failure, as
10827 documented.
10828
10829 * pt.c (tsubst_aggr_type): Prototype.
10830 (tsubst_decl): New function, split out from tsubst. Set
10831 input_filename and lineno as appropriate.
10832 (pop_tinst_level): Restore the file and line number saved in
10833 push_tinst_level.
10834 (instantiate_class_template): Set input_filename and lineno as
10835 appropriate.
10836 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
10837 context for a TYPENAME_TYPE is complete.
10838
10839 * decl2.c (grokbitfield): Issue errors on bitfields declared with
10840 function type.
10841 (do_dtors): As in do_ctors, pretend to be a member of the same
10842 class as a static data member while generating a call to its
10843 destructor.
10844
10845 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
10846 conversions, even in complex virtual base class hierarchies.
10847
10848 1998-08-06 Mark Mitchell <mark@markmitchell.com>
10849
10850 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
10851 (TYPE_TEMPLATE_INFO): Likewise.
10852 (SET_TYPE_TEMPLATE_INFO): Likewise.
10853 (ENUM_TI_TEMPLATE): Likewise.
10854 (ENUM_TI_ARGS): Likewise.
10855 (lookup_nested_type_by_name): Remove.
10856 * decl.c (maybe_process_template_type_declaration): Handle enums.
10857 (start_enum): Don't check for primary-template enum declarations
10858 here.
10859 (finish_enum): Clean up, document. Make sure template enum
10860 constants get the correct type.
10861 (build_enumerator): Copy initializers for template enumerations,
10862 too.
10863 (grok_enum_decls): Document.
10864 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
10865 better. Build LOOKUP_EXPRs for local variables, even if they are
10866 TREE_PERMANENT.
10867 * pt.c (tsubst_enum): Remove field_chain parameter.
10868 (template_class_depth): Include the depth of surrounding function
10869 contexts.
10870 (push_template_decl): Check for primary-template enum declarations
10871 here. Deal with enumeration templates.
10872 (lookup_template_class): Likewise.
10873 (for_each_template_parm): Likewise.
10874 (instantiate_class_template): Don't call tsubst_enum directly,
10875 call tsubst instead, to instantiate enums. Deal with all
10876 field_chain issues here, not in tsubst_enum.
10877 (lookup_nested_type_by_name): Remove.
10878 (tsubst_aggr_type): Revise handling of enumeration types.
10879 (tsubst): Likewise.
10880 (tsubst_copy): Likewise.
10881 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
10882
10883 1998-08-04 Mark Mitchell <mark@markmitchell.com>
10884
10885 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
10886 uses template parameters.
10887 * method.c (build_template_parm_names): Use the full set of
10888 template arguments for tsubst'ing.
10889 (build_overload_identifier): Pass the full set of template
10890 arguments to build_template_parm_names, not just the
10891 innermost_args.
10892 * pt.c (TMPL_ARGS_DEPTH): Define using
10893 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
10894 (NUM_TMPL_ARGS): New macro.
10895 (add_outermost_template_args): Deal with the case where the outer
10896 args will be completely discarded.
10897 (coerce_template_parms): Use the full set of template arguments
10898 for tsubst'ing. Simplify. Add some asserts. Improve
10899 error messages.
10900 (lookup_template_class): Pass the full set of template arguments
10901 to coerce_template_parms.
10902 (tsubst): Add assertion.
10903 (do_type_instantiation): Don't instantiate member template
10904 classes.
10905
10906 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
10907 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
10908
10909 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
10910
10911 * method.c (set_mangled_name_for_decl): Change return type to void.
10912
10913 * decl.c (lookup_name_real): A namespace-level decl takes priority
10914 over implicit typename. Avoid doing the same lookup twice.
10915
10916 * search.c (dependent_base_p): New fn.
10917 (dfs_pushdecls, dfs_compress_decls): Use it.
10918
10919 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
10920 virtual functions if the type doesn't have any.
10921
10922 1998-08-03 Mark Mitchell <mark@markmitchell.com>
10923
10924 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
10925 uses template parameters.
10926
10927 1998-08-02 Mark Mitchell <mark@markmitchell.com>
10928
10929 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
10930 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
10931 * lex.c (do_identifier): Don't use a second argument, or a type,
10932 when building LOOKUP_EXPRs.
10933 (do_identifier): Likewise.
10934 (do_scoped_id): Likewise.
10935 * method.c (hack_identifier): Improve error message.
10936 * pt.c (lookup_template_function): Don't needlessly call
10937 copy_to_permanent or build_min.
10938 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
10939 necessary.
10940 (do_decl_instantiation): Improve error message.
10941 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
10942 (build_min): Copy the type to the permanent obstack, too.
10943
10944 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
10945
10946 * init.c (init_init_processing): Remove BI* handling.
10947 (build_builtin_call): Remove.
10948 (build_builtin_delete_call): New fn.
10949 (build_delete): Use it.
10950
10951 1998-07-31 Mark Mitchell <mark@markmitchell.com>
10952
10953 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
10954 (maybe_check_template_type): New function.
10955 * decl.c (maybe_process_template_type_declaration): New function,
10956 split out from pushtag Call maybe_check_template_type.
10957 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
10958 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
10959 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
10960 * pt.c (template_class_depth_real): Generalization of ...
10961 (template_class_depth): Use it.
10962 (register_specialization): Use duplicate_decls for duplicate
10963 declarations of specializations.
10964 (maybe_check_template_type): New function.
10965 (push_template_decl_real): Fix comment.
10966 (convert_nontype_argument): Likewise.
10967 (lookup_template_class): Likewise. Avoid an infinite loop on
10968 erroneous code.
10969 (tsubst_friend_function): Fix comment.
10970 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
10971 an IDENTIFIER_NODE.
10972 * semantics.c (begin_function_definition): Use
10973 reset_specialization to note that template headers don't apply
10974 directly to declarations after the opening curly for a function.
10975
10976 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
10977
10978 * decl.c (push_overloaded_decl): Use current_namespace instead of
10979 DECL_CONTEXT (decl) to determine where we go.
10980
10981 * decl.c (lookup_name_real): Fix typo.
10982
10983 1998-07-28 Mark Mitchell <mark@markmitchell.com>
10984
10985 * friend.c (is_friend): Be lenient with member functions to deal
10986 with nested friends.
10987
10988 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
10989
10990 * class.c (finish_struct_1): Convert integer_zero_node to
10991 ssizetype before passing it to set_rtti_entry.
10992 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
10993 of any size to a pointer.
10994
10995 1998-07-27 Mark Mitchell <mark@markmitchell.com>
10996
10997 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
10998 (build_template_decl_overload): Remove.
10999 (set_mangled_name_for_decl): New function.
11000 (innermost_args): Remove is_spec parameter.
11001 (most_specialized, most_specialized_class): Remove declarations.
11002 (lookup_template_class): Add entering_scope parameter.
11003 (maybe_process_partial_specialization): New function.
11004 (finish_template_decl): Likewise.
11005 (finish_template_type): Likewise.
11006 * class.c (finish_struct): Clean up processing of member template
11007 specializations.
11008 * decl.c (pushtag): Fix formatting.
11009 (lookup_tag): Improve handling of pseudo-global levels.
11010 (make_typename_type): Adjust call to lookup_template_class.
11011 (shadow_tag): Use maybe_process_partial_specialization.
11012 (xref_tag): Improve handling of member friends.
11013 (start_function): Call push_nested_class before
11014 push_template_decl. Don't call push_template_decl for
11015 specializations.
11016 * decl2.c (grok_x_components): Don't call xref_tag for
11017 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
11018 (grokclassfn): Use set_mangled_name_for_decl.
11019 (arg_assoc_class): Adjust call to innermost_args.
11020 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
11021 * error.c (dump_function_name): Improve printing of template
11022 function names.
11023 * friend.c (is_friend): Don't compare types of decls to determine
11024 friendship, unless flag_guiding_decls.
11025 (make_friend_class): Partial specializations cannot be friends.
11026 (do_friend): Use set_mangled_name_for_decl. Call
11027 push_template_decl_real instead of push_template_decl.
11028 * method.c (build_decl_overload_real): Remove prototype. Give it
11029 external linkage.
11030 (build_overload_identififer): Adjust call to innermost_args.
11031 (build_template_decl_overload): Remove.
11032 (set_mangled_name_for_decl): New function.
11033 * parse.y (.finish_template_type): New non-terminal.
11034 (template_def): Use finish_template_decl. Use template_extdef
11035 instead of extdef.
11036 (template_extdef, template_datadef): New non-terminals, containing
11037 only those rules for things which can be templates.
11038 (datadef): Tidy.
11039 (template_type, self_template_type): Use .finish_template_type.
11040 (named_class_head): Use maybe_process_partial_specialization.
11041 * pt.c (mangle_class_name_for_template): Remove context parameter.
11042 (get_class_bindings): Remove outer_args parameter.
11043 (complete_template_args): Remove.
11044 (add_outermost_template_args): New function.
11045 (register_specialization): Return the specialization.
11046 (unregister_specialization): New function.
11047 (tsubst_template_parms): Likewise.
11048 (most_specialized, most_specialized_class): Prototype here as
11049 static.
11050 (original_template): Rename to most_general_template.
11051 (tsubst_template_parms): New function.
11052 (set_mangled_name_for_template_decl): Likewise.
11053 (TMPL_ARGS_DEPTH): New macro.
11054 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
11055 (TMPL_ARGS_LEVEL): New macro.
11056 (SET_TMPL_ARGS_LEVEL): Likewise.
11057 (TMPL_ARG): Likewise.
11058 (SET_TMPL_ARG): Likewise.
11059 (TMPL_ARGS_DEPTH): Likewise.
11060 (finish_member_template_decl): Use finish_template_decl.
11061 (maybe_process_partial_specialization): New function, split out
11062 from tsubst.
11063 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
11064 (maybe_begin_member_template_processing): Use new macros.
11065 (is_member_template): Likewise.
11066 (is_member_template_class): Likewise.
11067 (add_to_template_args): Likewise. Deal with multiple levels of
11068 args.
11069 (maybe_process_partial_specialization): New function.
11070 (retrieve_specialization): Add consistency check.
11071 (determine_specialization): Return full argument list.
11072 (check_explicit_specialization): Tweak friend handling. Use full
11073 argument lists. Simplify.
11074 (current_template_args): Use new macros.
11075 (push_template_decl_real): Change ill-named mainargs to specargs.
11076 Check that a partial specialization actually specializes at least
11077 one parameter. Improve friend handling. Modify for full
11078 template arguments.
11079 (classtype_mangled_name): Don't mangle the names of
11080 specializations.
11081 (lookup_template_class): Add entering_scope parameter. Use it to
11082 avoid finding a template type when an instantiation is required.
11083 Simplify. Use full template arguments.
11084 (tsubst_friend_function): Use unregister_specialization. Use new
11085 macros. Use full template arguments.
11086 (tsubst_friend_class): Substitute, using tsubst_template_parms,
11087 into the template parameters before passing them to
11088 redeclare_class_template.
11089 (instantiate_class_template): Simplify. Use full template
11090 arguments. Adjust calls to get_class_bindings. Use
11091 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
11092 (innermost_args): Use new macros.
11093 (tsubst_aggr_type): New function, split out from tsubst.
11094 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
11095 conventions for lookup_template_class. Refine handling of partial
11096 instantiations. Remove calls to complete_template_args.
11097 Simplify. Add consistency checks. Use set_mangled_name_for_decl
11098 and set_mangled_name_for_template_decl.
11099 (tsubst_copy): Use tsubst_aggr_type.
11100 (instantiate_template): Use full template arguments.
11101 (more_specialized): Improve formatting.
11102 (more_specialized_class): Adjust calls to get_class_bindings.
11103 (get_bindings_real): Don't call complete_template_args.
11104 (most_specialized): Don't overwrite input; create a new list.
11105 (most_specialized_class): Use most_general_template.
11106 (regenerate_decl_from_template): Use unregister_specialization.
11107 Use full template arguments.
11108 (instantiate_decl): Use full template arguments.
11109 (set_mangled_name_for_template_decl): New function.
11110 * semantics.c (begin_class_definition): Use
11111 maybe_process_partial_specialization.
11112 (finish_member_class_template): New function.
11113 (finish_template_decl): Likewise.
11114 (finish_template_type): Likewise.
11115 (typeck.c): Don't crash after issuing a compiler_error.
11116 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
11117
11118 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
11119
11120 * typeck2.c (build_functional_cast): Handle default-initialization.
11121
11122 * call.c (build_over_call): Pass 1 to popclass.
11123
11124 * parse.y (direct_notype_declarator): Add precedence declaration
11125 to notype_unqualified_id case.
11126 * Makefile.in (EXPECT): Adjust.
11127
11128 * tree.c (ovl_member): Fix for single function in OVL.
11129
11130 1998-07-27 Dave Brolley <brolley@cygnus.com>
11131
11132 * c-lex.c (yylex): Fix boundary conditions in character literal and
11133 string literal loops.
11134
11135 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
11136
11137 * decl.c (lookup_name_real): OK, do return the from_obj value
11138 unless got_object depends on template parms.
11139
11140 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
11141
11142 * pt.c (coerce_template_parms): Also complain about local enums.
11143
11144 * cp-tree.h: Add prototype for set_identifier_local_value.
11145 * decl.c (set_identifier_local_value_with_scope): Make static,
11146 prototype.
11147 * search.c (covariant_return_p): Likewise.
11148 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
11149
11150 * call.c (build_method_call): Only pull out the type of a destructor
11151 if it's a template type parm.
11152 * decl.c (lookup_name_real): Never return the from_obj value.
11153
11154 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
11155
11156 * except.c (process_start_catch_block_old): Call start_decl_1 for
11157 catch parm.
11158 * decl.c (start_decl_1): Avoid duplicate error.
11159
11160 * init.c (expand_default_init): Only perform the initialization if
11161 it will do something.
11162
11163 1998-07-23 H.J. Lu (hjl@gnu.org)
11164
11165 * parse.y (base_class): Check for invalid base class.
11166
11167 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
11168
11169 * decl2.c (import_export_template): Fold in...
11170 (import_export_class): ...to here. Handle dllimport/export.
11171
11172 * class.c (build_vtable): Pass at_eof to import_export_vtable.
11173 (prepare_fresh_vtable): Likewise.
11174 * decl2.c (import_export_class): Split out...
11175 (finish_prevtable_vardecl): From here.
11176 * class.c (finish_struct_1): Call import_export_class if at_eof.
11177
11178 * decl.c (start_function): #if 0 mysterious code I wrote and have
11179 forgotten why.
11180 * rtti.c (get_tinfo_fn): If this is for a class type, set
11181 DECL_CONTEXT.
11182
11183 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
11184
11185 * inc/exception: Change terminate and unexpected to ().
11186
11187 * parse.y (named_class_head_sans_basetype_defn): A
11188 named_class_head_sans_basetype followed by '{' or ':' is a defn.
11189
11190 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
11191
11192 * tree.c (canonical_type_variant): New fn to handle arrays.
11193 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
11194 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
11195 * method.c (process_overload_item): Use build_overload_value for
11196 arrays.
11197
11198 1998-07-20 Dave Brolley <brolley@cygnus.com>
11199
11200 * lex.c (mbchar.h): #include it.
11201 (GET_ENVIRONMENT): New macro.
11202 (init_parse): Set character set based on LANG environment variable.
11203 (real_yylex): Handle multibyte characters in character literals.
11204 (real_yylex): Handle multibyte characters in string literals.
11205
11206 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
11207
11208 * lex.c (do_identifier): Look for class value even if we don't
11209 have a global value. Do implicit declaration if parsing is 2.
11210 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
11211 lookup.
11212
11213 1998-07-19 Mark Mitchell <mark@markmitchell.com>
11214
11215 * decl.c (pushtag): Revert previous change.
11216 * pt.c (lookup_template_class): Don't put out debugging
11217 information for types that use template parameters.
11218
11219 * decl.c (pushtag): Don't put out debugging information for
11220 compiler-generated typedefs.
11221
11222 * error.c (dump_type_real): Don't crash when presented with
11223 intQI_type_node or the like.
11224
11225 * semantics.c (finish_translation_unit): Fix spelling error in
11226 comment.
11227
11228 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
11229
11230 * decl.c (lookup_name_real): Pull out single function here.
11231 (select_decl): Not here.
11232 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
11233
11234 * decl.c (qualify_lookup): Tweak again.
11235
11236 * pt.c (lookup_template_class): Don't mess with the context of the
11237 instantiation.
11238 * decl2.c (current_decl_namespace): Remove special handling for
11239 templates.
11240
11241 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
11242 a member template specialization.
11243
11244 * tree.c (ovl_member): Use decls_match to compare functions.
11245 * decl.c (decls_match): Check the context of a function.
11246
11247 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
11248 in Koenig lookup support rules.
11249 * semantics.c (finish_call_expr): Handle the new cases.
11250
11251 * typeck.c (build_x_function_call): Handle overloaded methods.
11252
11253 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
11254
11255 1998-07-16 Mark Mitchell <mark@markmitchell.com>
11256
11257 * semantics.c (finish_object_call_expr): Revert previous change.
11258 * call.c (build_new_method_call): Likewise. Instead, convert
11259 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
11260
11261 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
11262
11263 * decl.c (qualify_lookup): Handle templates.
11264
11265 * decl2.c (do_using_directive): Don't pass ancestor.
11266 * decl.c (push_using_directive): Calculate ancestor.
11267
11268 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
11269 * decl.c (pushdecl): Move type shadowing handling from here...
11270 (duplicate_decls): ...to here.
11271 * decl.c (set_identifier_local_value_with_scope): New fn.
11272 (pushdecl): Use it.
11273 (set_identifier_local_value, lookup_type_current_level): New fns.
11274 * decl2.c (do_local_using_decl): Handle types and binding level
11275 stuff properly.
11276
11277 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
11278 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
11279 (lookup_namespace_name): Likewise.
11280 * typeck.c (build_unary_op): Not here anymore.
11281
11282 * decl2.c (do_class_using_decl): Make sure we get an identifier.
11283 * class.c (handle_using_decl): Ignore TYPE_DECLs.
11284
11285 * decl.c (qualify_lookup): New fn.
11286 (lookup_name_real): Use it.
11287
11288 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
11289
11290 * decl2.c (add_using_namespace): When directly using a namespace
11291 that was indirect before, promote it.
11292
11293 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
11294 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
11295 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
11296 * decl.c (select_decl): Replace two flag parameters by one.
11297 (unqualified_namespace_lookup): Likewise, pass flag.
11298 (lookup_flags): New function.
11299 (lookup_name_real): Compute flags, pass them.
11300 (lookup_namespace_name): Call with zero-flag.
11301 * decl2.c (ambiguous_decl): Add flag parameter, complain only
11302 according to flags.
11303 (lookup_using_namespace, qualified_lookup_using_namespace):
11304 Add flag parameter, pass them through.
11305 * lex.c (do_scoped_id): Call with zero-flag.
11306
11307 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
11308
11309 * typeck.c (convert_for_assignment): Use comptypes.
11310
11311 1998-07-16 Mark Mitchell <mark@markmitchell.com>
11312
11313 * semantics.c (finish_object_call_expr): Move test for the
11314 function called being a TYPE_DECL to ...
11315 * call.c (build_new_method_call): Here.
11316
11317 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
11318
11319 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
11320 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
11321
11322 * lex.c (looking_for_typename): Don't initialize.
11323
11324 * decl2.c (ambiguous_decl): Clarify error message.
11325
11326 * decl.c (push_using_directive): Iterate over namespaces used
11327 indirectly.
11328
11329 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11330
11331 * decl2.c (add_using_namespace): Iterate over namespaces used
11332 indirectly.
11333
11334 * decl.c (lookup_name_real): Accept namespace aliases as locals.
11335 (cat_namespace_levels): Ignore aliases.
11336 (duplicate_decls): Ignore duplicate aliases.
11337 * decl2.c (do_namespace_alias): Process block level namespace
11338 aliases. Store alias with pushdecl. Remove odr errors.
11339 * parse.y (namespace_alias): New non-terminal.
11340 (extdef): Use it.
11341
11342 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
11343
11344 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
11345 Handle TEMPLATE_TYPE_PARM.
11346 (arg_assoc): Rewrite.
11347
11348 * pt.c (complete_template_args): Don't look at the context unless
11349 we have to.
11350
11351 * method.c (build_decl_overload_real): Fix namespace handling.
11352
11353 * typeck.c (build_unary_op): Extract a lone function from an
11354 OVERLOAD.
11355
11356 * call.c (build_scoped_method_call): Handle getting a namespace
11357 for basetype in a destructor call.
11358 (check_dtor_name): Handle enums.
11359
11360 * parse.y (using_directive): New nonterminal.
11361 (extdef, simple_stmt): Use it.
11362
11363 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
11364
11365 * decl2.c (add_function): Move error message ...
11366 (arg_assoc_namespace): ... from here.
11367
11368 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
11369
11370 * parse.y (namespace_qualifier): Fix multiple level handling.
11371 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
11372 (arg_assoc): Don't skip the first argument of a function.
11373
11374 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
11375
11376 * search.c (my_tree_cons): Clean up.
11377
11378 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
11379
11380 * call.c (joust): Don't warn about "confusing" conversions to the
11381 same type.
11382
11383 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
11384
11385 * class.c (push_nested_class): Complain about namespaces.
11386 * decl.c (start_decl): Enter the object's namespace.
11387 (cp_finish_decl): Leave it.
11388 (grokdeclarator): Likewise.
11389 * decl2.c (check_decl_namespace): New function.
11390 (finish_file): Call it.
11391 * parse.y (complex_direct_notype_declarator): Set complexity
11392 of namespace-qualified ids to -1, enter the namespace.
11393
11394 * method.c (build_template_decl_overload): Expect _DECL as first
11395 parameter. Put context temporarily into current_namespace.
11396 * pt.c (check_explicit_specialization): Change caller.
11397 (tsubst): Likewise.
11398
11399 * init.c (build_offset_ref): Call mark_used and
11400 convert_from_reference for namespace members.
11401
11402 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
11403
11404 * search.c (my_tree_cons): The bitfield is at index 2.
11405
11406 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
11407
11408 * lang-options.h: Format changed to work with new --help support
11409 in gcc/toplev.c
11410
11411 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
11412
11413 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
11414 Do Koenig lookup in CALL_EXPR.
11415 (arg_assoc): Handle error_mark.
11416 * lex.c (is_global): New function.
11417 (do_identifier): Expect arguments for Koenig lookup.
11418 * parse.y (primary): Add rules for calls of unqualified function calls.
11419 (do_id): Change call of do_identifier.
11420 * pt.c (finish_stmt_expr): Likewise.
11421 * semantics.c (finish_id_expr): Likewise.
11422 (finish_call_expr): Add integer parameter to indicate
11423 argument-dependent lookup.
11424
11425 * decl.c (struct binding_level): New field using_directives.
11426 (push_using_decl): Not sorry anymore.
11427 (push_using_directive): New function.
11428 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
11429 (unqualified_namespace_lookup): New function, code from ...
11430 (lookup_name_real): ... here.
11431 * decl2.c (lookup_using_namespace): Pass using list instead of
11432 initial scope.
11433 (validate_nonmember_using_decl): New function.
11434 (do_nonmember_using_decl): New function.
11435 (do_toplevel_using_decl): Use them.
11436 (do_local_using_decl): New function.
11437 (do_using_directive): Support block-level directives.
11438 * parse.y (simple_stmt): Support using declarations and
11439 directives.
11440 (namespace_qualifier, namespace_using_decl): New non-terminals.
11441
11442 * xref.c (classname): New function.
11443 (GNU_xref_hier): Change class and base parameters to tree.
11444 * decl.c (xref_baseypes): Change caller.
11445 * friend.c (make_friend_class): Likewise.
11446
11447 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11448
11449 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
11450 comparison.
11451
11452 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
11453 template template parameter, record its use.
11454 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
11455 its template arguments if exists.
11456
11457 * pt.c (coerce_template_template_parms): New function equivalent
11458 to coerce_template_parms when IS_TMPL_PARM is true.
11459 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
11460 all callers changed.
11461
11462 (coerce_template_parms): Access ARGLIST properly when creating a
11463 new vector. Only accept implicit TYPE_DECL as valid argument for
11464 a template template parameter when it is a base class of
11465 current_class_type. Don't display error message when COMPLAIN is
11466 false.
11467
11468 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
11469
11470 * repo.c (get_base_filename): Use file_name_nondirectory.
11471 (open_repo_file): Likewise.
11472 * cp-tree.h (file_name_nondirectory): Add prototype.
11473
11474 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
11475
11476 * friend.c (do_friend): Pull the identifier out of declarator.
11477 Use cp_error and friends.
11478 * decl2.c (qualified_lookup_using_namespace): Fix call to
11479 purpose_member.
11480 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
11481 (grokvardecl): Use DECL_CLASS_SCOPE_P.
11482 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
11483 * class.c (warn_hidden): Fix for OVERLOAD.
11484 From grahams@rcp.co.uk:
11485 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
11486 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
11487
11488 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
11489
11490 * g++.1 (-traditional): Remove duplicated documentation.
11491
11492 1998-07-11 Mark Mitchell <mark@markmitchell.com>
11493
11494 * method.c (flush_repeats): Add nrepeats parameter.
11495 (issue_nrepeats): Likewise.
11496 (is_back_referenceable_type): New function. Don't back-reference
11497 TEMPLATE_TYPE_PARMs as well as simple types like integers.
11498 (build_mangled_name_for_type): Likewise.
11499 (build_mangled_name_for_type_with_Gcode): Likewise.
11500 (lasttype): Remove.
11501 (nrepeats): Likewise.
11502 (Nrepeats): Likewise.
11503 (start_squangling): Don't clear the variables removed above.
11504 (end_squangling): Likewise.
11505 (flush_repeats): Tidy. Use nrepeats parameter rather than
11506 Nrepeats global.
11507 (issue_nrepeats): Likewise, but with nrepeats global. Use
11508 is_backreferenceable_type.
11509 (build_overload_nested_name): Tidy. Add comment. Use
11510 build_mangled_name_for_type.
11511 (build_underscore_int): Comment.
11512 (build_overload_scope_ref): Use build_mangled_name_for_type.
11513 (build_overload_int): Likewise.
11514 (build_template_template_parm_names): Tidy.
11515 (build_template_parm_names): Use build_mangled_name_for_type.
11516 (build_overload_identifier): Add comments.
11517 (build_mangled_name_for_type_with_Gcode): Split out from
11518 build_mangled_name.
11519 (build_mangled_name_for_type): Use it.
11520 (build_mangled_name): Rework to use build_mangled_name_for_type
11521 and to not use global nrepeats/Nrepeats. Tidy.
11522 (process_modifiers): Tidy.
11523 (check_btype): Use is_backreferenceable_type. Add comment.
11524 Rename `node' to `type'.
11525 (process_overload_item): Set numeric_output_need_bar here.
11526 Use build_mangled_name_for_type. Tidy.
11527 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
11528 build_mangled_name_for_type.
11529
11530 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
11531 for TYPE_DECLs.
11532
11533 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
11534
11535 * cp-tree.h (warn_long_long): Define.
11536 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
11537 warning "ANSI C++ does not support `long long'".
11538 * decl2.c (warn_long_long): Define.
11539 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
11540
11541 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
11542
11543 * decl.c (xref_tag): Handle attributes between 'class' and name.
11544 * parse.y (aggr): Likewise.
11545 * semantics.c (finish_class_definition): Likewise.
11546 * Makefile.in (EXPECTED): Adjust.
11547
11548 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
11549 * decl2.c: Define them.
11550 (lang_decode_option): Handle them.
11551 * lang-options.h: Add -foptional-diags.
11552 * class.c (finish_struct): Don't complain about multiple meanings of
11553 name if -fno-optional-diags.
11554 * decl.c (pushdecl_class_level): Likewise.
11555 * lex.c (real_yylex): Check warn_multichar.
11556
11557 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
11558
11559 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
11560
11561 * tree.c (make_binfo): Fix length.
11562
11563 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
11564
11565 * decl2.c (lang_decode_option): Remove warn_template_debugging.
11566 * lang-options.h: Likewise.
11567
11568 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11569
11570 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
11571 (process_start_catch_block): Likewise for variables
11572 `false_label_rtx', `call_rtx' and `return_value_rtx'.
11573
11574 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
11575
11576 * tree.c (build_srcloc): Make sure we allocate this node on the
11577 permanent obstack.
11578
11579 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
11580
11581 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
11582 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
11583 (lang_specific_driver): Only add -lm automatically if need_math is
11584 nonzero.
11585
11586 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
11587
11588 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
11589
11590 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11591
11592 * Makefile.in (EXPR_H): New dependency variable.
11593 (decl2.o): Depend on $(EXPR_H).
11594 (typeck.o): Likewise.
11595 (init.o): Likewise.
11596 (expr.o): Likewise.
11597
11598 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
11599
11600 * decl.c (start_enum): Put local enums on permanent_obstack.
11601
11602 1998-06-25 Mark Mitchell <mark@markmitchell.com>
11603
11604 * cp-tree.h (c_get_alias_set): Declare.
11605 * decl.c (init_decl_processing): Set lang_get_alias_set.
11606
11607 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
11608
11609 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
11610 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
11611 flag for all function decls which are in the exception table.
11612 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
11613 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
11614 code is emitted for any referenced rtti function.
11615
11616 1998-06-25 Dave Brolley <brolley@cygnus.com>
11617
11618 * lang-specs.h: Use new | syntax to eliminate
11619 string concatenation.
11620
11621 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
11622
11623 * cp-tree.h (CP_DECL_CONTEXT): New macro.
11624 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
11625 * method.c (build_overload_nested_name): Likewise.
11626 * sig.c (build_signature_pointer_or_reference_type): Don't set
11627 DECL_CONTEXT.
11628
11629 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11630
11631 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
11632 * cp-tree.h (FROB_CONTEXT): New macro.
11633 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
11634 * decl.c (namespace_binding): Replace NULL_TREE with
11635 global_namespace.
11636 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
11637 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
11638 Likewise.
11639 * decl.c (pushtag): Use FROB_CONTEXT.
11640 (pushdecl, make_typename_type, define_function, grokdeclarator):
11641 Likewise.
11642 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
11643 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
11644 Likewise.
11645 * decl2.c (decl_namespace): Return global_namespace if no context.
11646 * method.c (build_overload_nested_name): Expect null as context.
11647 * pt.c (mangle_class_name_for_template): Do nothing for null
11648 contexts.
11649 (lookup_template_class): Allow for null id_context.
11650
11651 1998-06-25 Richard Henderson <rth@cygnus.com>
11652
11653 * method.c (emit_thunk): Set current_function_is_thunk for the
11654 ASM_OUTPUT_MI_THUNK case as well.
11655
11656 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
11657
11658 * exception.cc (__cplus_type_matcher): Get a match_info pointer
11659 instead of an exception table entry as a parameter.
11660
11661 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
11662
11663 * parse.y (function_try_block): Don't call start_catch_handler.
11664 * except.c (call_eh_info): Remove coerced field from declaration.
11665 (build_eh_type_type_ref): New function to create an address of a
11666 rtti function for the new style exception tables.
11667 (expand_start_catch_block): Split function, this contains the
11668 common part.
11669 (process_start_catch_block_old): New function to perform the rest
11670 of expand_start_catch_block under old style exceptions.
11671 (process_start_catch_block_old): New function to perform the rest
11672 of expand_start_catch_block under new style exceptions.
11673 (expand_end_catch_block): Only pop the false label off the stack under
11674 the old style of exceptions.
11675 * semantics.c (finish_try_block): Don't call start_catch_handler.
11676 * exception.cc (struct cp_eh_info): Add original_value field.
11677 (__cplus_type_matcher): Perform type matching on the original exception
11678 value, and if we have a match, set the current value.
11679 (__cp_push_exception): Set the original exception value.
11680
11681 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
11682
11683 * call.c (joust): Fix confusing conversion warning.
11684
11685 * call.c (build_op_delete_call): Add placement parm. Check
11686 LOOKUP_SPECULATIVELY.
11687 * cp-tree.h, decl2.c, init.c: Adjust.
11688 * decl.c (finish_function): Use it.
11689
11690 * pt.c (tsubst): Diagnose creating void fields or variables.
11691
11692 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11693
11694 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
11695
11696 * cp-tree.h (check_dtor_name): Add prototype.
11697
11698 * init.c (expand_member_init): Remove unused variables
11699 `ptr_type_node', `parm' and `rval'.
11700
11701 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
11702 in call to fprintf.
11703 (lang_print_xnode): Likewise.
11704
11705 * typeck2.c (enum_name_string): Cast argument to sprintf to long
11706 and use %ld specifier.
11707
11708 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
11709 specifier in call to fprintf.
11710 (GNU_xref_member): Cast argument to sprintf to int.
11711
11712 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11713
11714 * typeck2.c (pop_init_level): Warn about implicit zero initialization
11715 of struct members.
11716
11717 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11718
11719 * cp-tree.h: Prototype function `check_java_method'.
11720
11721 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
11722
11723 * class.c (finish_struct): Make conflicting use of id a pedwarn.
11724 * decl.c (pushdecl_class_level): Likewise.
11725
11726 1998-06-17 Mark Mitchell <mark@markmitchell.com>
11727
11728 * pt.c (convert_nontype_argument): Issue an error when presented
11729 with an integer (real) constant that cannot be simplified to an
11730 INT_CST (REAL_CST).
11731
11732 * cp-tree.h (c_get_alias_set): Remove declaration added in
11733 1998-06-13 change that should never have been checked in.
11734
11735 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
11736
11737 * typeck.c (build_binary_op_nodefault): Change % in format strings
11738 to %%.
11739
11740 * decl.c (grokvardecl): Don't build_static_name for decls that
11741 aren't at namespace scope.
11742
11743 * init.c (perform_member_init): Catch default-initialization of
11744 references.
11745
11746 1998-06-17 Mark Mitchell <mark@markmitchell.com>
11747
11748 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
11749
11750 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
11751
11752 * method.c (hack_identifier): Complain about getting a namespace
11753 or class template.
11754 * typeck.c (decay_conversion): Remove check for namespaces.
11755 * typeck2.c (incomplete_type_error): Likewise.
11756 * parse.y (template_arg): Add PTYPENAME expansion.
11757
11758 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
11759
11760 * decl.c (grokvardecl): Don't build external assembler names for
11761 TYPENAMEs in other namespaces as there is no declarator.
11762 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
11763 info from DECL_CONTEXT if it is NULL.
11764
11765 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
11766
11767 * call.c (check_dtor_name): Split out.
11768 (build_scoped_method_call): Use it.
11769 (build_method_call): Use it.
11770 * init.c (build_offset_ref): Use it.
11771
11772 * typeck.c (build_static_cast): Fix handling of pointers to members.
11773
11774 * decl.c (finish_function): Just return nothing from a constructor.
11775 * typeck.c (c_expand_return): Complain about returning a void
11776 expression from a destructor.
11777
11778 1998-06-13 Mark Mitchell <mark@markmitchell.com>
11779
11780 * class.c (alter_access): Accept a BINFO explaining how to get
11781 from the entity whose accessed is being altered to the type doing
11782 the altering.
11783 (handle_using_decl): New function containing code split out from ...
11784 (finish_struct_1): Here.
11785
11786 * cp-tree.h (complete_type_or_else): Declare.
11787 * init.c (build_new_1, build_delete): Use it.
11788 * typeck.c (require_complete_type): Use complete_type, rather than
11789 expanding it inline.
11790 (complete_type_or_else): New function.
11791 (build_component_ref): Use it.
11792 (pointer_int_sum): Make sure the type pointed to is complete.
11793 (pointer_diff): Likewise.
11794
11795 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
11796 types.
11797
11798 * search.c (get_matching_virtual): Note that member templates
11799 cannot override virtual functions.
11800
11801 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
11802
11803 * pt.c (check_explicit_specialization): If DECLARATOR turned into
11804 an error_mark_node from lookup_template_function, return the same.
11805 (determine_specialization): Also make sure TEMPLATE_ID isn't an
11806 error_mark_node, before we try to read its operands.
11807 * decl.c (grokdeclarator): If we got an error_mark_node from
11808 check_explicit_specialization, just return it right back.
11809
11810 1998-06-12 Mark Mitchell <mark@markmitchell.com>
11811
11812 * class.c (instantiate_type): Don't treat template-ids that don't
11813 specify any template arguments as equivalent to ordinary
11814 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
11815 pointer-to-members for member templates. Tidy slightly.
11816 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
11817 * init.c (build_offset_ref): Handle template-ids like ordinary
11818 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
11819 offset part of the OFFSET_REF.
11820 * typeck.c (build_unary_op): Change check for unknown types to
11821 look for OFFSET_REFs, not SCOPE_REFs.
11822
11823 1998-06-11 Mark Mitchell <mark@markmitchell.com>
11824
11825 * pt.c (is_member_template_class): New function.
11826 (push_template_decl_real): Use it.
11827
11828 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
11829
11830 * friend.c (do_friend): Add support for nested classes using
11831 member functions of the enclosing class as friends.
11832
11833 1998-06-10 Mark Mitchell <mark@markmitchell.com>
11834
11835 * call.c (convert_default_arg): Make global, not static.
11836 (convert_arg_for_ellipsis): Split out from ...
11837 (build_over_call): Here.
11838 * cp-tree.h (convert_default_arg); Declare.
11839 (convert_arg_to_ellipsis): Likewise.
11840 (do_member_init): Remove.
11841 * init.c (do_member_init): Remove; this code is dead.
11842 (expand_member_init): Remove much of this code; it is dead.
11843 * typeck.c (convert_arguments): Use convert_default_arg and
11844 convert_arg_for_ellipsis, rather than duplicating here.
11845
11846 * call.c (convert_like): Don't fail silently if
11847 build_user_type_conversion fails. Always return error_mark_node
11848 for failure.
11849
11850 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
11851
11852 * search.c (covariant_return_p): Complain about ambiguous base.
11853
11854 * typeck.c (build_component_ref): Diagnose ref to nested type.
11855
11856 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
11857
11858 * decl.c (grokparms): Check that INIT isn't an error_mark_node
11859 before giving error about invalid type for default arg.
11860
11861 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
11862
11863 * call.c (build_method_call): Fix thinko.
11864
11865 1998-06-10 Dave Brolley <brolley@cygnus.com>
11866
11867 * decl2.c (lang_decode_option): New argc/argv interface.
11868 * cp-tree.h (lang_decode_option): New argc/argv interface.
11869 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
11870 specified for cpplib-enabled compilers.
11871 * lex.c (lang_init): Don't check_newline for cpplib.
11872 (init_parse): Don't initialize cpplib here.
11873
11874 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
11875
11876 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
11877 piece before checking DECL_MUTABLE_P.
11878
11879 1998-06-10 John Carr <jfc@mit.edu>
11880
11881 * tree.c (debug_binfo): Make printf format match arguments.
11882
11883 * error.c (OB_PUTI): Make printf format match arguments.
11884
11885 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
11886
11887 * init.c (perform_member_init): Handle default-initialization.
11888
11889 * except.c (build_throw): Handle throwing NULL.
11890
11891 * typeck.c (build_x_function_call): Use resolve_offset_ref.
11892
11893 * search.c (compute_access): Only strip an anonymous union
11894 for a FIELD_DECL.
11895
11896 * call.c (add_builtin_candidates): Tweak.
11897
11898 * cvt.c (build_expr_type_conversion): Restore code for conversion
11899 from class types.
11900 * decl2.c (delete_sanity): Use it. Clean up.
11901
11902 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
11903
11904 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
11905
11906 * typeck.c (c_expand_return): Don't warn about void expressions on
11907 return statements in functions returning void.
11908
11909 1998-06-09 Mark Mitchell <mark@markmitchell.com>
11910
11911 * pt.c (fn_type_unification): Revise documentation. Tidy.
11912 (type_unification): Likewise.
11913
11914 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
11915
11916 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
11917 expand_end_catch.
11918 * parse.y (function_try_block): Rename expand_start_catch, and delete
11919 expand_end_catch.
11920 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
11921 expand_end_catch.
11922
11923 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
11924
11925 * search.c (lookup_member): New fn.
11926 * class.c (finish_struct_1): Use it.
11927 * decl.c (lookup_name_real): Use it.
11928
11929 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11930
11931 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
11932
11933 * cp-tree.h: Add prototype for `maybe_print_template_context' and
11934 `maybe_make_one_only'.
11935
11936 * decl.c (auto_function): Remove unused variable `decl'.
11937
11938 * decl2.c: Include dwarf2out.h and dwarfout.h.
11939
11940 * lex.c: Remove redundant declarations of `set_float_handler' and
11941 `asm_out_file'.
11942
11943 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
11944
11945 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
11946 time flag. Call __cp_eh_info instead of __cp_exception_info.
11947 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
11948 (__cp_exception_info): Return offset into cp_eh_info structure to
11949 match what use to be the start of this structure.
11950 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
11951 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
11952 compile time flag.
11953 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
11954 __cp_eh_info instead of __cp_exception_info.
11955
11956 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
11957
11958 * decl.c (cp_finish_decl): Disable inlining of extern inlines
11959 with static variables.
11960
11961 1998-06-08 Mark Mitchell <mark@markmitchell.com>
11962
11963 * init.c (build_offset_ref): Correct previous change to use build,
11964 not build_min.
11965
11966 1998-06-07 Mark Mitchell <mark@markmitchell.com>
11967
11968 * class.c (instantiate_type): Handle pointer-to-members where the
11969 member is a template.
11970 * init.c (build_offset_ref): Likewise.
11971 * typeck.c (build_unary_op): Likewise.
11972
11973 1998-06-07 Richard Henderson <rth@cygnus.com>
11974
11975 * lex.c (lang_init_options): New function.
11976 (lang_init): Remove flag_exceptions == 2 hack.
11977
11978 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
11979
11980 * search.c (envelope_add_decl): Tweak for implicit typename.
11981
11982 * call.c (joust): Also warn about confusing conversion op/constructor
11983 overload resolution.
11984
11985 * spew.c (yylex): Also return the TYPE_DECL if got_object.
11986 Don't clear got_object after '~'.
11987 * call.c (build_scoped_method_call): Tweak destructor handling.
11988 (build_method_call): Likewise.
11989 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
11990 TYPE_MAIN_VARIANT for destructors.
11991 * semantics.c (finish_object_call_expr): Complain about calling a
11992 TYPE_DECL.
11993
11994 1998-06-05 Per Bothner <bothner@cygnus.com>
11995
11996 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
11997 Define - update needed by gcc.c change.
11998
11999 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
12000
12001 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
12002
12003 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
12004
12005 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
12006 * decl.c (lookup_name_real): Add namespaces_only parameter.
12007 If set, return only NAMESPACE_DECLs.
12008 (select_decl): Likewise.
12009 (identifier_type_value): Give additional parameter.
12010 (lookup_name_nonclass): Likewise.
12011 (lookup_name): Likewise.
12012 (find_binding): Skip namespace aliases.
12013 (binding_for_name): Likewise.
12014 (push_namespace): Check for namespace aliases.
12015 (lookup_name_namespace_only): New function.
12016 (begin_only_namespace_names, end_only_namespace_names): New functions.
12017 * decl2.c (set_decl_namespace): Skip namespace aliases.
12018 (do_using_directive): Likewise.
12019 (do_namespace_alias): Produce namespace aliases, fix alias
12020 redeclaration.
12021 * error.c (dump_decl): Support SCOPE_REF.
12022 * parse.y (extdef): Wrap lookup with namespace_only for namespace
12023 aliases and using declarations.
12024
12025 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
12026
12027 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
12028
12029 * error.c (dump_expr): Clean up NEW_EXPR case.
12030
12031 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
12032
12033 Suggested by Brendan Kehoe
12034 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
12035 treat it as using ::decl.
12036
12037 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
12038
12039 * tree.c (mapcar): Support NEW_EXPR.
12040
12041 * error.c (dump_expr): Support NEW_EXPR.
12042
12043 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
12044
12045 * method.c (make_thunk): Use overload machinery to make name.
12046 * search.c (covariant_return_p): New fn.
12047 (get_matching_virtual): Use it.
12048
12049 * init.c (build_new_1): Fix check for void.
12050
12051 1998-06-01 Per Bothner <bothner@cygnus.com>
12052
12053 * cp-tree.h (TYPE_FOR_JAVA): New macro.
12054 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
12055 java_int_type_node, java_long_type_node, java_float_type_node,
12056 java_double_type_node, java_char_type_node, java_boolean_type_node):
12057 New "primitive" types, with predefined names __java_byte etc.
12058 (record_builtin_java_type): New function.
12059 (init_decl_processing): Make Java types with record_builtin_java_type.
12060 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
12061 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
12062 (grokfndecl): Call check_java_method for Java classes.
12063 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
12064 (process_overload_item): Match types against specific
12065 java_XX_type_node types, rather than using is_java_type.
12066 * class.c (finish_struct_1): Don't add default copy constructor
12067 or operator= if TYPE_FOR_JAVA.
12068 (pop_lang_conext): Restore strict_prototyp proper if Java.
12069 * decl2.c (acceptable_java_type, check_java_method): New functions.
12070 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
12071 (tsubst): Move common statement after if statement.
12072 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
12073
12074 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
12075
12076 * pt.c (for_each_template_parm): Use first_rtl_op.
12077
12078 * tree.c (build_cplus_array_type_1): Also check index_type for
12079 template parms.
12080
12081 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
12082
12083 * pt.c (tsubst): Always copy BINFO_BASETYPES.
12084
12085 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
12086
12087 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
12088 TYPE_SIZE_UNIT too.
12089
12090 1998-05-29 Mark Mitchell <mark@markmitchell.com>
12091
12092 * decl.c (grokdeclarator): Don't complain about in-class
12093 initialization of static consts if we don't really know the type
12094 of the variable.
12095
12096 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
12097
12098 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
12099 * method.c (build_destructor_name): New fn.
12100 * decl2.c (maybe_retrofit_in_chrg): Split out...
12101 (grokclassfn): From here. Reorganize.
12102 * decl.c (grok_ctor_properties): Make sure ctors for types with
12103 vbases have the in_chrg parm.
12104 * pt.c (instantiate_class_template): Update
12105 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
12106 grok_*_properties.
12107 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
12108
12109 1998-05-28 Mark Mitchell <mark@markmitchell.com>
12110
12111 * pt.c (instantiate_decl): Make test for whether or not static
12112 variables should be instantiated early match its comment.
12113
12114 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
12115
12116 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
12117 a member.
12118 (start_function): Call check_default_args.
12119 * decl2.c (grokfield): Don't call check_default_args.
12120 (check_default_args): Use cp_error_at.
12121 * lex.c (do_pending_defargs): Call check_default_args.
12122
12123 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
12124
12125 * call.c (build_method_call): Make sure get_type_value returns
12126 something before we try to use its TYPE_MAIN_VARIANT.
12127 (build_scoped_method_call): Likewise.
12128
12129 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
12130
12131 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
12132 initialize an array.
12133
12134 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
12135 DECL_VIRTUAL_P.
12136
12137 * friend.c (do_friend): Clarify template warning.
12138
12139 1998-05-27 Mark Mitchell <mark@markmitchell.com>
12140
12141 * decl.c (shadow_label): Don't treat decls as identifiers.
12142 (maybe_push_to_top_level): Clear shadowed_labels.
12143
12144 * pt.c (instantiate_decl): Reset lineno and filename after calling
12145 regenerate_decl_from_template.
12146
12147 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
12148 error_mark_node.
12149
12150 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
12151
12152 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
12153
12154 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12155
12156 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
12157 (convert_nontype_argument): Handle cases when nontype template
12158 parameters become classes after substitution.
12159
12160 1998-05-26 Mark Mitchell <mark@markmitchell.com>
12161
12162 * friend.c (is_friend): Use comptypes, rather than == to compare
12163 types. Modify for new representation of template friends.
12164 (make_friend_class): Likewise.
12165 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
12166 (instantiate_class_template): Deal with template friends.
12167
12168 * decl.c (store_parm_decls): Remove redundant call to
12169 expand_main_function.
12170
12171 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
12172
12173 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
12174 DECL_USE_TEMPLATE.
12175
12176 1998-05-26 Per Bothner <bothner@cygnus.com>
12177
12178 * language_as_string: Handle lang_java.
12179
12180 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
12181
12182 * decl.c (pushdecl): Don't copy the type_decl.
12183
12184 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12185
12186 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
12187 current_class_type.
12188 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
12189
12190 * parse.y (complex_direct_notype_declarator): Use $1 to access
12191 scope of notype_qualified_id.
12192
12193 1998-05-26 Dave Brolley <brolley@cygnus.com>
12194
12195 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
12196 (init_parse): Initialize cpplib interface.
12197
12198 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
12199 empty continuation.
12200
12201 1998-05-26 Mark Mitchell <mark@markmitchell.com>
12202
12203 * decl.c (pushtag): Avoid crashing on erroneous input.
12204
12205 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12206
12207 * decl.c (push_namespace): Only produce one unique name for
12208 anonymous namespaces.
12209 (get_unique_name): Remove.
12210
12211 1998-05-25 Mark Mitchell <mark@markmitchell.com>
12212
12213 * call.c (tourney): Don't do any extra comparisons.
12214
12215 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
12216
12217 * cp-tree.h (processing_template_parmlist): Declare.
12218 * decl.c (pushtag): Don't call push_template_decl when we
12219 shouldn't.
12220 * pt.c (processing_template_parmlist): New variable.
12221 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
12222 (complete_template_args): Use it.
12223 (add_to_template_args): Likewise.
12224 (innermost_args): Likewise.
12225 (tsubst): Likewise.
12226 (begin_template_parm_list): Use processing_template_parmlist.
12227 (end_template_parm_list): Likewise.
12228
12229 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
12230 * decl.c (grokdeclarator): Use it.
12231 * decl2.c (grok_x_components): Likewise.
12232 * init.c (initializing_context): Likewise.
12233 * method.c (do_build_copy_constructor): Likewise.
12234 (do_build_assign_ref): Likewise.
12235 * search.c (compute_access): Likewise.
12236 * typeck.c (build_component_ref): Likewise.
12237
12238 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
12239 unnamed type a typedef name "for linkage purposes".
12240
12241 * pt.c (lookup_template_class): Don't look at
12242 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
12243
12244 * method.c (build_overload_int): Handle error cases gracefully.
12245
12246 * pt.c (instantiate_decl): Handle static member variables
12247 correctly.
12248
12249 * pt.c (tsubst): Use the tsubst'd type when producing new
12250 TEMPLATE_PARM_INDEX nodes.
12251
12252 1998-05-24 Mark Mitchell <mark@markmitchell.com>
12253
12254 * tree.c (cp_tree_equal): Handle pointers to member functions.
12255
12256 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
12257 sure the type of the REF_BIND is a reference type.
12258 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
12259 target_type for clarity.
12260
12261 * parse.y (xcond): Move call to condition_conversion ...
12262 * semantics.c (finish_for_cond): Here.
12263 * parse.c: Regenerated.
12264
12265 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
12266
12267 * decl.c (push_namespace): Namespaces have type void.
12268 * typeck2.c (incomplete_type_error): Complain about namespace
12269 used as expression.
12270 * typeck.c (decay_conversion): Likewise.
12271
12272 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
12273
12274 * error.c (dump_expr): Support namespaces.
12275
12276 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
12277
12278 * cp-tree.def: Add SRCLOC.
12279 * cp-tree.h: Add struct tree_srcloc and accessor macros.
12280 * tree.c (build_srcloc, build_srcloc_here): New fns.
12281 * pt.c (add_pending_template): Use build_srcloc_here.
12282 (push_tinst_level): Update last_template_error_tick before erroring.
12283 (instantiate_decl): Restore lineno and input_filename before
12284 calling add_pending_template.
12285 * decl2.c (finish_file): Set up lineno and input_filename for
12286 pending templates.
12287
12288 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
12289
12290 * decl.c (lang_print_error_function): New fn.
12291 (init_decl_processing): Set print_error_function to use it.
12292 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
12293
12294 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
12295 ICS_BAD_FLAG.
12296
12297 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
12298 copy-initialization.
12299
12300 * class.c (build_vtable_entry): Use int_fits_type_p.
12301 (build_vtable): Pass a signed offset to build_vtable_entry.
12302 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
12303 set_rtti_entry): Likewise.
12304
12305 1998-05-22 Per Bothner <bothner@cygnus.com>
12306
12307 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
12308 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
12309
12310 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
12311
12312 * pt.c (print_template_context): Use fprintf instead of cp_error.
12313
12314 * pt.c (determine_specialization): Just return an error_mark_node.
12315 Also print the decl we want in error messages. If we complain,
12316 return error_mark_node.
12317 (tsubst_friend_function): Set lineno and input_filename so
12318 error messages will be useful.
12319 (instantiate_template): Just return an error_mark_node.
12320 (check_explicit_specialization): Don't mess with a returned
12321 error_mark_node.
12322
12323 * pt.c (print_template_context): Add new argument.
12324 (maybe_print_template_context): New fn.
12325 (push_tinst_level): Increment tinst_level_tick.
12326 (pop_tinst_level): Likewise.
12327 * errfn.c (cp_thing): Call maybe_print_template_context. Use
12328 xrealloc instead of xmalloc.
12329
12330 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
12331
12332 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
12333
12334 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
12335 if the template we looked up is the same as the one we already
12336 have.
12337
12338 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
12339
12340 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
12341 (cpp_reader,parse_in): Add for cpplib.
12342 (check_newline): Call handle_sysv_pragma with new interface.
12343 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
12344
12345 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
12346 (sub_getch): Call GETC for cpplib.
12347
12348 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
12349 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
12350
12351 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
12352
12353 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
12354
12355 * decl2.c (maybe_make_one_only): New fn.
12356 (import_export_vtable): Use it.
12357 (import_export_decl): Likewise.
12358 * pt.c (mark_decl_instantiated): Likewise.
12359
12360 1998-05-21 Mark Mitchell <mmitchell@usa.net>
12361
12362 * decl2.c (find_representative_member): Rename to ...
12363 (build_anon_union_vars): New function.
12364 (finish_anon_union): Fix stupidity of previous change.
12365
12366 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
12367
12368 * decl.c (grokfndecl): Handle definition of specialization in
12369 friend declaration.
12370
12371 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
12372
12373 1998-05-20 Mark Mitchell <mmitchell@usa.net>
12374
12375 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
12376 to look for type declarations.
12377 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
12378 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
12379 (finish_member_class_template): Declare.
12380 * decl.c (pushtag): Put member class templates on the
12381 CLASSTYPE_TAGS list, just as for ordinary member classes.
12382 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
12383 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
12384 IDENTIFIER_NAMESPACE_VALUEs.
12385 * parse.y (component_decl): Move code to ...
12386 * semantics.c (finish_member_class_template): New function.
12387 Don't put member class templates on the list of components for a
12388 class.
12389 * parse.c: Regenerated.
12390 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
12391 In fact, don't use DECL_CONTEXT at all here.
12392
12393 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
12394
12395 * decl.c (record_unknown_type): New function.
12396 (init_decl_processing): Call it for the unknown and global type
12397 nodes.
12398
12399 1998-05-20 Mark Mitchell <mmitchell@usa.net>
12400
12401 * decl2.c (find_representative_member): New function.
12402 (finish_anon_union): Use it.
12403
12404 * cp-tree.h (MAIN_NAME_P): New macro.
12405 (DECL_MAIN_P): Likwise.
12406 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
12407 (grokfndecl): Use the new macros.
12408 (grokdeclarator): Likewise.
12409 (start_function): Likewise.
12410 (store_parm_decls): Likewise.
12411 (finsh_function): Likewise.
12412 * friend.c (do_friend): Likewise.
12413 * typeck.c (build_function_call_real): Likewise.
12414 (build_unary_op): Likewise.
12415
12416 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
12417
12418 * decl2.c (start_objects, finish_objects, do_dtors,
12419 do_ctors): Split out from...
12420 (finish_file): ...here.
12421
12422 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
12423
12424 * tree.c (is_overloaded_fn): Don't abort on placeholders from
12425 push_class_decls.
12426
12427 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
12428
12429 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
12430
12431 * error.c (dump_expr): Handle an ARROW_EXPR.
12432
12433 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
12434
12435 * decl.c (saveable_obstack): Declare.
12436 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
12437 declare, if necessary.
12438
12439 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
12440
12441 * call.c (compare_qual): Remove.
12442 (is_subseq): Tweak.
12443 (is_properly_derived_from): New function.
12444 (maybe_handle_ref_bind): Likewise.
12445 (maybe_handle_implicit_object): Likewise.
12446 (compare_ics): Modify substantially to bring into conformance with
12447 the standard.
12448 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
12449 (comp_cv_qualification): Declare.
12450 (comp_cv_qual_signature): Likewise.
12451 * typeck.c (comp_cv_qualification): Likewise.
12452 (comp_cv_qual_signature): Likewise.
12453
12454 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12455
12456 * Makefile.in (parse.o): Depend on toplev.h.
12457
12458 * class.c (typecode_p): Remove prototype and definition.
12459
12460 * cp-tree.h (currently_open_class, is_empty_class, member_p):
12461 Add prototype.
12462
12463 * decl.c (push_overloaded_decl_top_level): Remove prototype and
12464 definition.
12465
12466 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
12467 in call to `cp_thing'.
12468 (cp_warning): Likewise for function pointer `warning'.
12469
12470 * except.c (do_function_call): Remove prototype and definition.
12471 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
12472
12473 * method.c (is_java_type): Add prototype and make it static.
12474
12475 * parse.y: Include toplev.h.
12476
12477 * pt.c (type_unification): Remove unused variable `arg'.
12478 (instantiate_decl): Likewise for `save_ti'.
12479
12480 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
12481
12482 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
12483
12484 * init.c (build_member_call): Handle template_ids.
12485 * parse.y (primary): Add global_scope template_id.
12486
12487 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
12488
12489 * decl2.c (get_sentry): Use end_temporary_allocation.
12490 Don't declare permanent_obstack.
12491
12492 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
12493
12494 * parse.y (.finish_new_placement): New non-terminal.
12495 (unary_expr, new_type_id): Use it.
12496 * parse.c: Regenerated.
12497
12498 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
12499
12500 * pt.c (redeclare_class_template): Say where the original definition
12501 of the template-parameter's default argument appeared.
12502
12503 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
12504
12505 * call.c (build_over_call): Tweak empty class handling.
12506
12507 * decl.c (make_typename_type): Use currently_open_class.
12508
12509 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
12510
12511 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
12512
12513 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
12514 for a type unless it is one.
12515
12516 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
12517
12518 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
12519
12520 * Makefile.in (program_transform_name, objdir): Define.
12521
12522 * Makefile.in (BISON): Use bison from the build tree if it exists.
12523 (FLEX): Likewise.
12524
12525 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
12526
12527 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
12528
12529 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
12530
12531 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
12532
12533 * call.c (build_scoped_method_call): Likewise.
12534
12535 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
12536
12537 * init.c (build_new_1): Call suspend_momentary around the creation
12538 of values that must be saved for exception handling.
12539 * parse.y (.build_new_placement): New non-terminal.
12540 (unary_expr, new_placement): Use it.
12541 * parse.c: Regenerated.
12542
12543 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
12544
12545 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
12546 old and new types.
12547
12548 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
12549 canonical type.
12550
12551 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
12552
12553 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
12554
12555 * decl.c (start_decl): Revert problem change.
12556
12557 * Makefile.in (CONFLICTS): Fix.
12558
12559 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12560
12561 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
12562
12563 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
12564
12565 * class.c (finish_struct_1): Use BINFO_SIZE.
12566
12567 * decl.c (start_decl): Use 'tem'.
12568
12569 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
12570
12571 * exception.cc: Include eh-common.h.
12572 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
12573 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
12574 (__cp_push_exception): Initialize eh_info struct as well.
12575 * except.c: Remove local structs and include eh-common.h.
12576 (init_exception_processing): Set language and version codes.
12577 (call_eh_info): Add presence of eh_info to runtime description of
12578 struct cp_eh_info.
12579 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
12580 * semantics.c (finish_try_block): Call start_catch_block() and
12581 end_catch_block().
12582 * parse.y (function_try_block): Call start_catch_block() and
12583 end_catch_block().
12584
12585 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
12586
12587 * typeck.c (original_type): New function.
12588 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
12589 to see if they're actually the same.
12590 * cp-tree.h (original_type): Declare.
12591
12592 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12593
12594 * Makefile.in (lex.o): Depend on output.h.
12595
12596 * call.c (add_function_candidate): Remove unused variable `cand'.
12597 (add_conv_candidate): Likewise.
12598 (build_builtin_candidate): Likewise.
12599
12600 * cp-tree.h: Add prototype for `types_overlap_p'.
12601
12602 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
12603
12604 * decl2.c (merge_functions): Remove unused variables `tmp' and
12605 `tempn'.
12606
12607 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
12608 (code_as_string): Likewise.
12609 (language_as_string): Likewise.
12610 (parm_as_string): Likewise.
12611 (op_as_string): Likewise.
12612 (assop_as_string): Likewise.
12613 (cv_as_string): Likewise.
12614
12615 * lex.c: Include output.h.
12616
12617 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
12618
12619 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
12620 ATTRIBUTE_UNUSED.
12621
12622 * tinfo.cc (__class_type_info::dcast): Change the type of variable
12623 `i' from int to size_t.
12624
12625 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
12626 ATTRIBUTE_UNUSED.
12627
12628 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
12629
12630 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
12631 DECL_NAMESPACE_SCOPE_P.
12632 (lang_decl_name): Likewise.
12633 * pt.c (tsubst_friend_function, tsubst): Likewise.
12634 * decl.c (pushdecl, redeclaration_error_message, start_decl,
12635 cp_finish_decl, start_function): Likewise.
12636 * class.c (finish_struct_1): Likewise.
12637 * call.c (build_over_call): Likewise.
12638 (compare_ics): Use DERIVED_FROM_P.
12639
12640 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
12641
12642 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
12643 * method.c (build_mangled_name): Use it.
12644 (build_decl_overload_real): Likewise.
12645
12646 * error.c (dump_simple_decl): New function, broken out from ...
12647 (dump_decl): Use it.
12648
12649 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
12650
12651 * ptree.c (lang_print_xnode): Add missing `break'.
12652
12653 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
12654
12655 * call.c (add_template_candidate): Adjust for changes to
12656 fn_type_unification.
12657 (add_template_candidate_real): Likewise.
12658 (add_template_conv_candidate): Likewise.
12659 (build_user_type_conversion_1): Likewise.
12660 (build_new_function_call): Likewise.
12661 (build_object_call): Likewise.
12662 (build_new_op): Likewise.
12663 (build_new_method_call): Likewise.
12664 * class.c (instantiate_type): Likewise.
12665 * cp-tree.h (unification_kind_t): New type.
12666 (fn_type_unification): Adjust prototype.
12667 (type_unificaiton): Likewise.
12668 * pt.c (UNIFY_ALLOW_NONE): New macro.
12669 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
12670 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
12671 (UNIFY_ALLOW_DERIVED): Likewise.
12672 (unify): Change prototype.
12673 (maybe_adjust_types_for_deduction): New function.
12674 (check_cv_quals_for_unify): Likewise.
12675 (determine_specialization): Adjust.
12676 (fn_type_unification): Likewise.
12677 (type_unification): Likewise.
12678 (type_unification_real): Likewise. Use
12679 maybe_adjust_types_for_deduction. Fix mishandling of
12680 back-unification of template functions passed as arguments. Pass
12681 appropriate combination of UNIFY_ALLOW_* to unify.
12682 (unify): Remove unused NTPARMS parameter. Use
12683 check_cv_quals_for_unify. Remove bogus code that allowed
12684 too-generous unification in order to adhere more closely to standard.
12685 (get_bindings_real): Adjust.
12686 (get_class_bindings): Likewise.
12687
12688 * method.c (build_overload_identifier): Only use the innermost
12689 template arguments when mangling.
12690 * pt.c (tsubst_template_argument_vector): New function.
12691 (complete_template_args): Deal with the situation where the
12692 extra_args contain more than one level of arguments.
12693 (lookup_template_class): Deal with member template classes, which
12694 may have more than one level of arguments.
12695 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
12696 Improve handling of member template classes. Use
12697 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
12698 tsubst_template_argument_vector where appropriate.
12699 (regenerate_decl_from_template): Break out from ...
12700 (instantiate_decl): Here.
12701
12702 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
12703 * parse.h: Regenerated.
12704 * parse.c: Really regenerated.
12705
12706 * cp-tree.h (finish_unary_op_expr): New function.
12707 (finish_id_expr): Likewise.
12708 (begin_new_placement): Likewise.
12709 (finish_new_placement): Likewise.
12710 (finish_declarator): Likewise.
12711 (finish_translation_unit): Likewise.
12712 (finish_parmlist): Likewise.
12713 (begin_class_definition): Likewise.
12714 (finish_class_definition): Likewise.
12715 (finish_default_args): Likewise.
12716 (finish_inline_definitions): Likewise.
12717 * parse.y (GCC_ASM_KEYWORD): Remove.
12718 (TYPENAME_ELLIPSIS): Likewise.
12719 * parse.c: Regenerated.
12720 Use new functions in semantics.c in the actions for many rules.
12721 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
12722 * hash.h: Regenerated.
12723 * semantics.c (finish_expr_stmt): Allow NULL expr.
12724 (finish_unary_op_expr): New function, containing
12725 code previously in parse.y.
12726 (finish_id_expr): Likewise.
12727 (begin_new_placement): Likewise.
12728 (finish_new_placement): Likewise.
12729 (finish_declarator): Likewise.
12730 (finish_translation_unit): Likewise.
12731 (finish_parmlist): Likewise.
12732 (begin_class_definition): Likewise.
12733 (finish_class_definition): Likewise.
12734 (finish_default_args): Likewise.
12735 (finish_inline_definitions): Likewise.
12736
12737 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
12738
12739 * typeck.c (build_c_cast): Don't decay arrays and functions to
12740 pointer type when converting to a class type.
12741
12742 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
12743
12744 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
12745 (DECL_CLASS_SCOPE_P): Likewise.
12746
12747 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
12748
12749 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
12750 * decl2.c (constructor_name_full): Likewise.
12751
12752 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
12753
12754 * tree.c (mapcar): Add OVERLOAD support.
12755
12756 * init.c (resolve_offset_ref): We must use basetype_path before we
12757 destroy it with a call to convert_pointer_to.
12758
12759 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
12760
12761 * class.c (currently_open_class): New fn.
12762 * decl.c (lookup_name_real): Use it.
12763 * search.c (lookup_field): Likewise.
12764
12765 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
12766
12767 * cp-tree.def (OVERLOAD): New node.
12768 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
12769 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
12770 (NAMESPACE_BINDING): Remove.
12771 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
12772 namespace_binding.
12773 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
12774 Define.
12775 (tree_overload): New struct.
12776 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
12777 (REAL_IDENTIFIER_TYPE_VALUE): Define.
12778 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
12779 (lang_decl_flags): Remove in_namespace.
12780 (lang_decl): Remove chain.
12781 (DECL_CHAIN, DECL_NAMESPACE): Remove.
12782 (flag_honor_std): Declare extern.
12783 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
12784 namespace_binding, set_namespace_binding,
12785 lookup_function_nonclass, cat_namespace_levels,
12786 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
12787 scratch_ovl_cons, ovl_member, build_overload): Declare.
12788 (decl_list_length, get_namespace_id, current_namespace_id,
12789 overloaded_globals_p): Remove.
12790 (lookup_using_namespace, qualified_lookup_using_namespace): Change
12791 return type.
12792 (push_scratch_obstack): New macro.
12793 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
12794 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
12795 convs, fns.
12796 (build_new_function_call): Iterate using OVL_CHAIN.
12797 Print DECL_NAME in when reporting ambiguities.
12798 (build_object_call): Iterate using OVL_NEXT for fns, convs.
12799 (build_new_op): Call lookup_function_nonclass.
12800 Iterate using OVL_NEXT.
12801 (build_op_delete_call): Change detection of members.
12802 Do not wrap TREE_LIST around fields and single global functions.
12803 (build_over_call): Don't push a class level if the context is a
12804 namespace.
12805 (build_new_method_call): Iterate using OVL_NEXT.
12806 * class.c (add_method): Chain overloaded members using
12807 build_overload. Remove copying of method.
12808 (grow_method): When iterating through the obstack, expect OVERLOAD
12809 nodes. Chain overload members.
12810 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
12811 nodes in call to get_baselinks.
12812 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
12813 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
12814 fdecls that are OVERLOAD nodes.
12815 (validate_lhs): New function.
12816 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
12817 code. Use DECL_NAME in error messages. Split code between global
12818 and member function processing.
12819 * decl.c (global_type_node): New static variable.
12820 (in_std): New global.
12821 (struct binding_level): New field usings.
12822 (resume_binding_level): Assert that we are not in a class.
12823 (toplevel_bindings_p): Just check for namespace_p or
12824 pseudo_global.
12825 (resume_level): Remove.
12826 (find_binding): New function.
12827 (binding_for_name): Call it.
12828 (namespace_binding, set_namespace_binding): New functions.
12829 (push_namespace): Associate binding level with new namespace,
12830 resume_binding_level for existing namespace. Remove old code.
12831 Fake std by counting.
12832 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
12833 (maybe_push_to_top_level): Save current namespace.
12834 (pop_from_top_level): Restore saved namespace.
12835 (pop_namespace): Call suspend_binding_level. Remove old code.
12836 (cat_namespace_levels): New function.
12837 (set_identifier_type_value_with_scope): For namespace bindings,
12838 set BINDING_TYPE, and use global_type_node.
12839 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
12840 (identifier_type_value): New function.
12841 (pushtag): If no context, use current_namespace.
12842 (duplicate_decls): Don't process DECL_CHAIN.
12843 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
12844 already set. Never reset it to NULL_TREE. Lookup global variables
12845 in their namespace. Push overloaded templates if they are on
12846 namespace level.
12847 (pushdecl_namespace_level): New function.
12848 (pushdecl_top_level): Implement using pushdecl_namespace_level.
12849 (pushdecl_using_decl): New function.
12850 (overloaded_globals_p): Remove.
12851 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
12852 them. Use namespace_binding and set_namespace_value.
12853 (redeclaration_error_message): Complain if the declarations come
12854 from different namespaces.
12855 (lookup_tag): On namespace level, look in the BINDING_TYPE.
12856 (lookup_namespace_name): Pass tree_bindings from stack. Remove
12857 old code.
12858 (select_decl): New function.
12859 (lookup_name_real): Call it for qualified and unqualified lookup.
12860 Pass tree_bindings from the stack.
12861 If prefer_type is 1, also accept namespaces.
12862 (lookup_function_nonclass): New function.
12863 (init_decl_processing): Set the binding level of the global
12864 namespace to global_binding_level.
12865 Build a proper type list for __builtin_apply.
12866 Initialize std_node to "fake std" if flag_honor_std is set.
12867 Initialize global_type_node.
12868 Allocated bad_alloc in namespace std if flag_honor_std.
12869 (define_function): Set the DECL_CONTEXT to the current_namespace.
12870 (start_decl): A namespace is not considered as a context here. If
12871 the DECL_CONTEXT is a namespace, push the decl.
12872 (cp_finish_decl): Check for namespaces used as initializers.
12873 (grokfndecl): Add namespace parameter. Remove processing of
12874 DECL_CHAIN.
12875 (grokvardecl): Add namespace parameter.
12876 (grokdeclarator): Process SCOPEs that are namespaces. For
12877 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
12878 (start_function): Check for contexts that are namespaces.
12879 Set context for declarations that have not been pushed.
12880 (store_parm_decls): Check for ::main only.
12881 (finish_function): Likewise.
12882 (start_method): Check for contexts that are namespaces.
12883 (start_method): Remove DECL_CHAIN processing.
12884 * decl2.c (flag_honor_std): Declare.
12885 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
12886 (decl_namespace_list): New static global.
12887 (grok_x_components): Ignore namespaces as type contexts.
12888 (check_classfn): Expect OVERLOAD nodes.
12889 (grokfield): Remove DECL_CHAIN processing.
12890 (finish_file): Call cat_namespace_levels.
12891 (merge_functions): New function.
12892 (ambiguous_decl): Rewrite.
12893 (lookup_using_namespace): Produce tree_bindings.
12894 (qualified_lookup_using_namespace): Likewise.
12895 (set_decl_namespace, decl_namespace, current_decl_namespace,
12896 push_decl_namespace, pop_decl_namespace): New functions.
12897 (arg_lookup): New struct.
12898 (add_function, arg_assoc_namespace, arg_assoc_class,
12899 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
12900 New functions.
12901 (get_namespace_id, current_namespace_id): Remove.
12902 (do_toplevel_using_decl): Rewrite.
12903 (do_class_using_decl): Complain about namespace qualifiers.
12904 (do_using_directive): Sorry if not on namespace level. Complain
12905 about unknown namespaces.
12906 * error.c (dump_aggr_type): Check for namespace contexts.
12907 * except.c (init_exception_processing): Push terminate into std.
12908 * friend.c (is_friend): A namespace is not a context, here.
12909 * init.c (expand_member_init): Remove DECL_CHAIN processing.
12910 (build_offset_ref): Process OVERLOAD nodes.
12911 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
12912 * lex.c (identifier_type): Loop using OVL_CHAIN.
12913 (see_typename): Set looking_for_typename to 2.
12914 (real_yylex): Likewise.
12915 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
12916 (do_scoped_id): Expect OVERLOAD nodes.
12917 Change calling convention for qualified_lookup_using_namespace.
12918 (build_lang_decl): Don't set in_namespace anymore.
12919 * method.c (typevec_size): New global.
12920 (build_overload_nested_name): Return if global_namespace.
12921 Otherwise, always expect a declaration context.
12922 (build_qualified_name): Likewise.
12923 Make sure we don't write beyond typevec_size.
12924 (build_decl_overload_real): Likewise.
12925 Allocate one extra slot for the namespace.
12926 (hack_identifier): Mark code dead.
12927 Process OVERLOAD and NAMESPACE_DECL nodes.
12928 * parse.y (program): Pop namespaces until in global namespace.
12929 (extdef): In a using-declaration, don't discard the identifier if
12930 there is no declaration.
12931 (left_curly): Ignore type contexts which are namespaces.
12932 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
12933 used as scope.
12934 * pt.c (template_class_depth): Expect types to be namespaces.
12935 (determine_specialization): Simplify by expecting OVERLOAD nodes.
12936 (push_template_decl): Push into namespace level.
12937 Reset ctx if it is a namespace.
12938 Set DECL_CONTEXT to current_namespace if not set already.
12939 Ignore real contexts that are namespaces.
12940 (mangle_class_name_for_template): Skip global_namespace.
12941 Mangle other namespaces as declarations.
12942 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
12943 (lookup_template_class): Push into namespace of context.
12944 If the context is a namespace, set it to global_namespace.
12945 Use id_context for mangling.
12946 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
12947 (tsubst_friend_function): Ignore namespace contexts.
12948 Push into namespace level.
12949 (tsubst): Handle NAMESPACE_DECL nodes.
12950 Remove DECL_CHAIN processing.
12951 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
12952 * ptree.c (print_lang_identifier): Print bindings.
12953 (lang_print_xnode): Print OVERLOAD nodes.
12954 * rtti.c (init_rtti_processing): Push type_info into std.
12955 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
12956 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
12957 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
12958 lookup_fnfields_here): Likewise.
12959 Process all nodes, instead of going through TREE_CHAIN.
12960 * sig.c (build_signature_pointer_or_reference_type): Set context
12961 to global_namespace.
12962 (build_signature_table_constructor): Expect OVERLOAD nodes.
12963 * spew.c (yylex): Save old setting of looking_for_typename.
12964 * tree.c (decl_list_length): Remove.
12965 (binding_init): New function.
12966 (count_functions): Rewrite.
12967 (is_overloaded_fn): Expect OVERLOAD nodes.
12968 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
12969 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
12970 ovl_member): New functions.
12971 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
12972 (type_unknown_p): Likewise.
12973 (require_instantiated_type): Likewise.
12974 (build_component_ref): Declare code dead.
12975 (build_x_function_call): Create and expect OVERLOAD nodes.
12976 (build_function_call_real): Check for ::main only.
12977 (build_unary_op): Likewise. Expect OVERLOAD nodes.
12978 (convert_for_assignment): Check for TREE_LIST before accessing
12979 TREE_VALUE.
12980 * decl.c (duplicate_decls): Check for namespace bindings instead
12981 of global bindings.
12982 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
12983 lookup_name_current_level, start_decl, xref_tag,
12984 finish_enum): Likewise.
12985 * init.c (build_offset_ref): Likewise.
12986 * search.c (lookup_field): Likewise.
12987 (lookup_fnfields): Likewise.
12988 (dfs_debug_mark): Likewise.
12989 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
12990 (poplevel_class, pop_from_top_level): Likewise.
12991 * decl2.c (finish_method): Likewise.
12992 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
12993 * decl.c (record_builtin_type): Likewise.
12994 (init_decl_processing, grokfndecl): Likewise.
12995 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
12996 (make_lang_type): Likewise.
12997 * parse.y (make_thunk): Likewise.
12998 * pt.c (tsubst): Likewise.
12999 * tree.c (debug_binfo): Likewise.
13000 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
13001 tinfo2.cc, inc/new.h: Add std qualifications.
13002 * inc/new: Wrap with namespace std if __HONOR_STD.
13003 * inc/typeinfo: Likewise.
13004
13005 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
13006
13007 * call.c (build_user_type_conversion_1): Handle second_conv
13008 properly for templates.
13009
13010 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
13011
13012 * method.c (build_decl_overload_real): Set TREE_USED flag to
13013 zero for build_type_variants nodes as well.
13014
13015 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
13016
13017 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
13018
13019 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
13020
13021 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
13022 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
13023 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
13024 xref.o): Add toplev.h dependencies.
13025
13026 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
13027
13028 * errfn.c (cp_error, cp_warning): Remove declarations for
13029 error and warning respectively.
13030
13031 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13032
13033 * error.c: Convert to using ctype macros defined in system.h.
13034 * method.c: Likewise.
13035 * xref.c: Likewise.
13036 * lex.c: Likewise. Also remove redundant system header stuff.
13037
13038 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
13039
13040 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
13041 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
13042 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
13043 xref.c: Add include of toplev.h.
13044
13045 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
13046
13047 * tree.c (perm_manip): Also regenerate the RTL of an extern.
13048 (copy_to_permanent): Use end_temporary_allocation.
13049
13050 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
13051
13052 * init.c (expand_vec_init): The initialization of each array
13053 element is a full-expression.
13054
13055 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
13056
13057 * method.c (build_mangled_name): Add a call to build_type_variant
13058 to get the right type.
13059
13060 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
13061
13062 * Makefile.in: Add .SUFFIXES.
13063
13064 * cp-tree.def: Remove NAMESPACE_DECL.
13065
13066 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
13067
13068 * call.c (build_over_call): Do evaluate arg even if it has empty
13069 class type.
13070 * decl.c (start_function): Don't push a member function.
13071
13072 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
13073
13074 * Makefile.in (g++FAQ.info): Put -o option before input file.
13075
13076 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
13077
13078 * gxxint.texi: Add info for squangling codes K and B.
13079
13080 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
13081
13082 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
13083 the expression in templates.
13084 (finish_stmt_expr): Likewise.
13085
13086 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
13087
13088 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
13089
13090 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
13091
13092 * decl.c (maybe_push_to_top_level): Always clear
13093 current_template_parms and processing_template_decl.
13094 (pushtag): Remove check of current_class_type and some comments,
13095 since maybe_push_to_top_level no longer creates confusion.
13096
13097 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
13098
13099 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
13100 (DECL_CLASS_TEMPLATE_P): Likewise.
13101 (DECL_PRIMARY_TEMPLATE): Likewise.
13102 (PRIMARY_TEMPLATE_P): Use it.
13103 (push_template_decl_real): New function.
13104 (redeclare_class_template): Take new template parameters as
13105 input.
13106 (is_specialization_of): New function.
13107 (comp_template_args): Declare.
13108 * decl.c (pushtag): Handle friend template classes.
13109 (xref_tag): Likewise. Use new calling convention for
13110 redeclare_class_template.
13111 * decl2.c (grok_x_components): Handle friend templates.
13112 * friend.c (is_friend): Use is_specialization_of where
13113 appropriate. Deal with friend class templates.
13114 (make_friend_class): Let a class template be friends with itself.
13115 * pt.c (comp_template_args): Remove declaration.
13116 (tsubst_friend_class): New function.
13117 (push_template_decl_real): New function.
13118 (push_template_decl): Use it.
13119 (redeclare_class_template): Adjust for new calling convention.
13120 (comp_template_args): Give it external linkage.
13121 (instantiate_class_type): Use tsubst_friend_class to deal
13122 with friend templates.
13123 * typeck.c (comptypes): Use comp_template_args, rather than
13124 expanding it inline.
13125 * parse.y (component_decl): Handle a nested template type
13126 like other component type declarations.
13127
13128 * pt.c (check_explicit_specialization): Handle overloaded
13129 constructors correctly.
13130
13131 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
13132 (lookup_template_class): Use it.
13133
13134 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
13135
13136 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
13137 * cp-tree.h: Add WRAPPER support.
13138 * call.c (add_candidate): Split out from add_*_candidate fns.
13139 (build_over_call): Take the candidate instead of function and args.
13140 Enforce access control here. Emit overload warnings here.
13141 (add_warning): New fn.
13142 (joust): Add WARN parm. If not set, call add_warning instead of
13143 printing a warning. Re-enable some warnings.
13144 (tourney): Pass it.
13145 (convert_like): Adjust.
13146 (build_new_op): Adjust.
13147 (build_new_function_call): Adjust.
13148 (build_user_type_conversion_1): Adjust.
13149 (USER_CONV_FN): Adjust.
13150 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
13151 build_int_wrapper): New fns.
13152
13153 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
13154
13155 * pt.c (unify): Fix typo in previous change.
13156
13157 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
13158
13159 * error.c (dump_type_real): Declare canonical_name.
13160
13161 * typeck.c (comp_target_types): Fix PMFs.
13162
13163 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
13164
13165 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
13166 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
13167 TEMPLATE_DECL.
13168
13169 * pt.c (tsubst): Decrease the template-level of
13170 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
13171 TEMPLATE_PARM_INDEX.
13172 (template_decl_level): New function.
13173 (unify): Make sure to record unifications for template
13174 parameters, even when the parameters exactly match the arguments.
13175 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
13176 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
13177 aren't from the level we're currently working on.
13178
13179 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
13180
13181 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
13182
13183 * decl2.c (check_member_template): Set DECL_IGNORED for member
13184 class templates, too.
13185
13186 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
13187
13188 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13189
13190 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
13191
13192 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
13193
13194 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
13195 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
13196 (init_decl_processing): Handle TI types.
13197 * typeck.c (unsigned_type, signed_type): Handle TI types.
13198
13199 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
13200
13201 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
13202 New local added_libraries. Increment count when add library to
13203 arglist.
13204
13205 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
13206
13207 * cp-tree.h (type_as_string_real): New function.
13208 * pt.c (mangle_class_name_for_template): Use it.
13209 * error.c (dump_aggr_type): Change prototype.
13210 (dump_type_prefix): Likewise.
13211 (dump_type_suffix): Likewise.
13212 (dump_type_real): Convert from dump_type. If desired, the
13213 "canonica" name of a typedef, i.e., the name of the underlying
13214 type, can be printed.
13215 (dump_type): Call dump_type_real.
13216
13217 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
13218
13219 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
13220
13221 * typeck.c (comp_target_types): Tweak pedantic case.
13222 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
13223 Return -1 or 1 instead of 1 or 2.
13224 (compparms): Remove STRICT handling.
13225 (convert_for_assignment): Fix handling of pmfs.
13226
13227 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
13228
13229 * typeck.c (comp_target_types): Handle references like pointers.
13230 (comp_target_parms): Note that return code from comp_target_types
13231 can be negative to indicate failure.
13232
13233 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13234
13235 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
13236 which requires a working target compiler to build.
13237
13238 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
13239
13240 * tree.c (avoid_overlap): Add prototype.
13241
13242 * spew.c (num_tokens): Add prototype.
13243 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
13244
13245 * search.c (dfs_check_overlap): Add prototype.
13246 (dfs_no_overlap_yet): Likewise.
13247
13248 * pt.c (original_template): Add prototype.
13249 (inline_needs_template_parms): Likewise.
13250 (push_inline_template_parms_recursive): Likewise.
13251 (retrieve_specialization, register_specialization): Likewise.
13252 (print_candidates, reduce_template_parm_level): Likewise.
13253 (build_template_decl, mark_template_parm): Likewise.
13254 (tsubst_friend_function, get_bindings_real): Likewise.
13255
13256 * method.c (start_squangling): Add prototype.
13257 (end_squangling, check_ktype, issue_ktype): Likewise.
13258 (build_overloaded_scope_ref, check_btype): Likewise.
13259 (build_mangled_template_parm_index): Likewise.
13260
13261 * lex.c (init_cpp_parse): Add prototype.
13262 (handle_cp_pragma, handle_sysv_pragma): Likewise.
13263 (reduce_cmp, token_cmp): Likewise.
13264
13265 * except.c (call_eh_info): Add prototype.
13266 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
13267 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
13268
13269 * decl2.c (is_namespace_ancestor): Add prototype.
13270 (namespace_ancestor, add_using_namespace): Likewise.
13271 (ambiguous_decl): Likewise.
13272
13273 * decl.c (indent): Add prototype.
13274
13275 * call.c (add_template_candidate_real): Add prototype.
13276
13277 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
13278
13279 * decl2.c (build_expr_from_tree): Just return a PMF.
13280
13281 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
13282
13283 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
13284 when doing initializations.
13285
13286 * pt.c (unify): Use comptypes to compare type args.
13287
13288 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
13289
13290 * decl.c (duplicate_decls): Fix check for when it's safe to free
13291 the new decl.
13292
13293 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
13294 to type_as_string.
13295
13296 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
13297
13298 * pt.c (build_template_parm_index): Add prototype.
13299
13300 * search.c (my_tree_cons): Don't clear words outside the
13301 newly allocated node.
13302
13303 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
13304
13305 * lex.c (init_parse): Now returns char* containing the filename.
13306
13307 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
13308 Jeff Law <law@cygnus.com>
13309
13310 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
13311 than a pointer.
13312
13313 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13314
13315 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
13316
13317 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
13318
13319 * decl.c (duplicate_decls): Don't warn for redundant decls if
13320 friend: let add_friend take care of it.
13321
13322 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
13323
13324 * sig.c (build_signature_pointer_constructor): Don't set
13325 TREE_HAS_CONSTRUCTOR for a signature pointer.
13326 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
13327 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
13328 here, too.
13329 * typeck.c (build_unary_op): Only allow taking the address of a
13330 real constructor.
13331 * typeck2.c (digest_init): Simplify.
13332 (store_init_value): Don't pedwarn about using { } for pmfs.
13333
13334 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
13335
13336 * cp-tree.h (start_decl): Update prototype.
13337 * decl.c (start_decl): Like the C version, new parameters
13338 for the attributes. Call cplus_decl_attributes here,
13339 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
13340 (grokdeclarator): Pass NULL for new start_decl arguments.
13341 * pt.c (tsubst_expr): Likewise.
13342 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
13343 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
13344 * lex.c (build_lang_decl): Add lang_name_java.
13345 * class.c (push_lang_context): Add lang_name_java.
13346 * method.c (build_mangled_name): Check for is_java_type.
13347
13348 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
13349
13350 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
13351 * call.c (build_scoped_method_call): Check for TREE_CODE for
13352 VOID_TYPE instead of type == void_type_node.
13353 (build_method_call): Likewise.
13354 * decl.c (lookup_name_real): Likewise.
13355 (grokdeclarator): Likewise.
13356 (start_decl): Likewise.
13357 (grokparms): Likewise.
13358 (start_function): Likewise.
13359 (finish_function): Likewise.
13360 (start_method): Likewise.
13361
13362 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
13363
13364 * lex.c (finput): New variable.
13365 (init_cpp_parse): Renamed from init_parse.
13366 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
13367 (finish_parse): New function.
13368 * cp-tree.h (init_lex, init_parse): Remove declarations.
13369
13370 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
13371
13372 * call.c (build_call): Still evaluate the actual argument.
13373 * class.c (is_empty_class): Update for -fnew-abi.
13374
13375 * decl2.c: -fnew-abi implies -fsquangle.
13376
13377 * method.c (do_build_assign_ref): Don't do anything to copy
13378 an empty class.
13379 (do_build_copy_constructor): Likewise.
13380 * call.c (build_over_call): Likewise.
13381
13382 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
13383
13384 * tree.c (avoid_overlap): Return a value.
13385
13386 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
13387
13388 * method.c (check_btype): Add missing argument to xrealloc.
13389 (check_ktype): Likewise.
13390
13391 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
13392
13393 Implement empty base optimization.
13394 * class.c (finish_struct_1): Add vbase fields earlier. Set
13395 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
13396 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
13397 (types_overlap_p): New fn.
13398 * tree.c (avoid_overlap): New fn.
13399 (build_base_fields): Use it to avoid overlapping empty bases.
13400 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
13401
13402 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
13403
13404 Re-implement allocation of base class subobjects.
13405 * tree.c (unshare_base_binfos): New fn.
13406 (layout_basetypes): Use it. Now handles offsets of both virtual and
13407 non-virtual bases, after layout_type.
13408 (layout_vbasetypes): Remove.
13409 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
13410 (build_vbase_pointer_fields): Split out from old layout_basetypes.
13411 * class.c (finish_base_struct): Lose offset handling code.
13412 Move nonvdtor warning here. Don't mess with t_binfo anymore.
13413 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
13414 * cp-tree.h: Adjust.
13415
13416 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
13417
13418 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
13419 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
13420 * class.c (duplicate_tag_error): Likewise.
13421 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
13422 * tree.c (layout_vbasetypes): Update from layout_record, remove
13423 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
13424 (layout_basetypes): Likewise.
13425
13426 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
13427
13428 * class.c, Make sure system.h is included just after config.h.
13429 Delete lingering stdio and errno references too.
13430 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
13431
13432 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
13433
13434 * friend.c (is_friend): Fix access control for local classes.
13435
13436 * class.c (is_empty_class): New fn.
13437 * call.c (build_call): Don't pass empty class objects to a function.
13438
13439 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
13440
13441 * call.c (build_over_call): Do name resolution for default
13442 arguments of function templates in the scope of the templates.
13443
13444 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
13445
13446 * call.c: Include system.h. Remove includes, declarations and
13447 defines provided by system.h.
13448 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
13449 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
13450 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
13451 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
13452 * typeck2.c, xref.c: Likewise.
13453 * Makefile.in: Dependencies updated as appropriate.
13454 * Make-lang.in: Likewise.
13455
13456 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
13457
13458 * pt.c (fn_type_unification): Allow incomplete unification without
13459 an immediate error message.
13460
13461 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
13462
13463 * tree.c (member_p): New fn.
13464 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
13465 initializing class members.
13466
13467 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
13468 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
13469
13470 * call.c (build_method_call): Handle non-scoped destructors, too.
13471 * pt.c (tsubst_copy): Likewise.
13472
13473 * pt.c (print_template_context): Split out...
13474 (push_tinst_level): ...from here.
13475
13476 * friend.c (is_friend): Don't pass a type to decl_function_context.
13477
13478 * typeck.c (convert_for_initialization): Always hand off
13479 conversions to class type.
13480
13481 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
13482
13483 * friend.c (is_friend): Local classes have the same access as the
13484 enclosing function.
13485
13486 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
13487
13488 * typeck.c (expand_target_expr): Delete dead function.
13489
13490 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
13491
13492 * repo.c (save_string): Delete dead function.
13493
13494 * method.c (thunk_printable_name): Delete dead function.
13495
13496 * lex.c (yynextch): Delete dead function.
13497
13498 * expr.c (tree_extract_aggr_init): #if 0 out.
13499
13500 * except.c (do_unwind): Delete dead function.
13501 (easy_expand_asm): Likewise.
13502
13503 * cvt.c (build_conversion_type_1): Delete dead function.
13504
13505 * cp-tree.h (push_expression_obstack): Declare.
13506
13507 * call.c (source_type): #if 0 out.
13508
13509 * class.c (alter_access): Remove unused label. Add braces
13510 around empty else clause.
13511
13512 * lex.c (yyprint): Fix argument to printf.
13513
13514 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
13515
13516 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
13517
13518 * pt.c (instantiate_class_template): Make sure template
13519 arguments are permanent.
13520 * init.c (resolve_offset_ref): Don't go looking around in
13521 template types.
13522
13523 * semantics.c: Add routines to handle expressions, and some
13524 declaration processing.
13525 * parse.y: Use them.
13526 (current_class_depth): Move declaration to cp-tree.h.
13527 * parse.c: Regenerated.
13528 * cp-tree.h: Use them.
13529 (current_class_depth): Declare.
13530 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
13531
13532 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
13533
13534 * error.c (dump_decl): Be a bit more explicit with template
13535 type arguments, when verbose.
13536
13537 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
13538
13539 * inc/exception: Reorder closing braces.
13540
13541 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
13542
13543 * pt.c (redeclare_class_template): New function.
13544 * cp_tree.h (redeclare_class_template): Declare it.
13545 * decl.c (xref_tag): Use it.
13546
13547 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
13548
13549 * call.c (build_over_call): Check IS_AGGR_TYPE, not
13550 TYPE_LANG_SPECIFIC.
13551 * typeck.c (convert_arguments): Likewise.
13552
13553 * decl.c (grokdeclarator): Remove const and volatile from type after
13554 setting constp and volatilep.
13555
13556 * class.c (finish_struct_1): Don't warn about bool bitfield larger
13557 than one bit.
13558
13559 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
13560
13561 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
13562
13563 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
13564
13565 * call.c (build_object_call): Complain about ambiguous operator(),
13566 rather that crashing.
13567 (build_new_op): Likewise.
13568 (build_op_delete_call): Likewise.
13569
13570 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
13571
13572 * cvt.c (perform_qualification_conversions): Use comp_target_types
13573 instead of comp_ptr_ttypes.
13574
13575 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
13576
13577 * cp-tree.h (enforce_access): Declare.
13578 * call.c (enforce_access): Make it extern, not static.
13579 * class.c (alter_access): Use enforce_access; modify code for ISO
13580 compliance, rather than ARM rules.
13581
13582 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13583
13584 * cp-tree.h: Fix typo.
13585
13586 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
13587
13588 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
13589 if (aggregate_value_p (type)).
13590
13591 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
13592
13593 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
13594
13595 * tree.c (mapcar): When dealing with a DECL, use it's constant
13596 value, if any.
13597 * pt.c (lookup_template_class): Don't mangle the names of template
13598 classes whose arguments are unknown.
13599
13600 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
13601
13602 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
13603
13604 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
13605
13606 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
13607
13608 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
13609 boolean_type_node to 1.
13610
13611 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
13612
13613 * error.c (dump_expr): Remove unused variable `l'.
13614
13615 * pt.c (for_each_template_parm): New function, created by
13616 converting uses_template_parms.
13617 (tree_fn_t): New typedef.
13618 (uses_template_parms): Use it.
13619 (mark_template_parm): New function.
13620 (push_template_decl): Check that the argument list of a partial
13621 specialization uses all the template parameters.
13622
13623 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
13624 with it; we might want it for debugging.
13625 * cp-tree.h (type_unification): Change interface.
13626 * class.c (finish_struct_1): Skip nested template types, just like
13627 ordinary nested types.
13628 (instantiate_type): Use new interface to type_unification.
13629 * lex.c (init_lex): Add __sz as opname for sizeof.
13630 * method.c (build_overload_scope_ref): New function.
13631 (build_overload_int): Handle complex expressions. Set
13632 numeric_output_need_bar if necessary.
13633 (build_overload_value): Handle non-PARM_DECL nodes; this
13634 routine is now used by build_overload_int. Remove some
13635 assignments to numeric_output_need_bar. Use
13636 build_overload_scope_ref.
13637 (build_qualified_name): Note that some template mangled names end
13638 with digits, and set numeric_output_need_bar appropriately. Use
13639 build_underscore_int.
13640 * pt.c (unify): Change interface.
13641 (type_unification_real): Likewise.
13642 (determine_specialization): Use new interfaces.
13643 (tsubst): Deal gracefully with situations in which the argument
13644 vector is not fully filled.
13645 (fn_type_unification): Use new interfaces.
13646 (type_unification): Likewise. Remove NOP_EXPR hack.
13647 (type_unification_real): Likewise.
13648 (unify): Likewise. Deal with unification of complex expressions.
13649
13650 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
13651
13652 * pt.c (complete_template_args): Initialize skip properly.
13653
13654 * decl.c (make_typename_type): Revert.
13655 (make_implicit_typename): Remove.
13656 (lookup_name_real): Don't call it. Call lookup_field if we see a
13657 TYPE_DECL from a template base.
13658 * search.c (lookup_field): Do implicit typename stuff.
13659
13660 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
13661 Geoff Noer <noer@cygnus.com>
13662
13663 * Makefile.in: Various fixes for building cygwin32 native toolchains.
13664 * Make-lang.in: Likewise.
13665
13666 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13667
13668 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
13669
13670 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
13671
13672 * decl.c (make_implicit_typename): Rewrite removed code.
13673 (make_typename_type): Call it if the type we look up comes from
13674 a base that uses template parms.
13675
13676 * pt.c (complete_template_args): Rewrite.
13677 (tsubst, FUNCTION_DECL): Use it.
13678
13679 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
13680
13681 * semantics.c (finish_asm_stmt): Fix combine strings. Call
13682 c_expand_asm_operands () if output_operands, input_operands or
13683 clobbers is not NULL_TREE.
13684
13685 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13686
13687 * pt.c (complete_template_args): New function.
13688 (get_bindings): Deal with specializations of function templates
13689 with return type containing parameters from outer class
13690 templates.
13691 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
13692 substitute arguments and compose a new type.
13693
13694 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
13695
13696 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
13697 FUNCTION_DECLs.
13698
13699 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
13700
13701 * decl.c (make_implicit_typename): Lose useless code.
13702
13703 * call.c (standard_conversion): Handle A* -> const A* properly.
13704
13705 * pt.c (get_bindings_real): Rename from get_bindings. Add
13706 check_rettype parm.
13707 (get_bindings): Pass 1.
13708 (get_bindings_overload): Pass 0.
13709
13710 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
13711
13712 * pt.c (check_explicit_specialization): When reverting a static
13713 member function, also remove the `this' parameter from
13714 last_function_parms.
13715
13716 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
13717
13718 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
13719 a function context.
13720
13721 * decl.c (store_bindings): Use free_binding_vecs.
13722 (pop_from_top_level): Likewise.
13723
13724 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
13725
13726 * decl.c (make_implicit_typename): Only change the type of a
13727 TYPENAME_TYPE.
13728
13729 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
13730
13731 * semantics.c: New file, containing routines to perform the
13732 semantic phase of parsing.
13733 * parse.y: Use it.
13734 * pt.c (tsubst_expr): Likewise.
13735 * cp-tree.h: Declare the various functions in semantics.c.
13736 Provide macros to access _STMT tree nodes.
13737 * cp-tree.def: Add ASM_STMT tree node.
13738 * Makefile.in, Make-lang.in: Add dependencies on and for
13739 semantics.c.
13740
13741 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
13742
13743 * pt.c (push_template_decl): Only check primary templates.
13744
13745 * pt.c (check_explicit_specialization): Complain about default args
13746 in explicit specialization.
13747
13748 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
13749 constructor_declarator.
13750
13751 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
13752
13753 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
13754 has no overloaded operator ->.
13755
13756 * call.c (build_field_call): Don't crash when presented with a
13757 field that is actually a nested type.
13758
13759 * decl.c (pushtag): Deal with friend class injection in local
13760 classes.
13761
13762 * call.c (build_object_call): Don't crash if OBJ is a
13763 pointer-to-member-function.
13764
13765 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
13766
13767 * pt.c (push_template_decl): Complain about template with C linkage,
13768 anonymous template class.
13769
13770 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
13771
13772 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
13773 * search.c: Likewise.
13774
13775 * lex.c (do_pending_defargs): Only call
13776 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
13777
13778 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
13779
13780 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
13781
13782 * parse.y: Deal with CONSTRUCTORS in new_initializers.
13783
13784 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
13785
13786 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
13787 closely mimics the behavior in parse.y.
13788 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
13789 into a compound statement.
13790
13791 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
13792
13793 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
13794 * pt.c (inline_needs_template_parms): New fn.
13795 (original_template): New fn.
13796 (push_inline_template_parms_recursive): New fn.
13797 (maybe_begin_member_template_processing): Use them.
13798 (maybe_end_member_template_processing): Likewise.
13799 (is_member_or_friend_template): Rename to is_member_template.
13800 Member functions of local classes are never member templates.
13801
13802 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13803
13804 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
13805 added in the class scope to catch redefinition error.
13806
13807 * pt.c (reduce_template_parm_level): Also copy
13808 the DECL_TEMPLATE_PARMS field.
13809
13810 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
13811
13812 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
13813 reduced-level template type parameter.
13814
13815 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
13816
13817 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
13818 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
13819 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
13820 * decl.c (duplicate_decls): Propagate it.
13821 * typeck2.c (abstract_virtuals_error): Use two loops to emit
13822 abstract virtual functions and virtual functions which need a
13823 final overrider separately.
13824
13825 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
13826
13827 * lang-specs.h: Properly put brackets around array elements in
13828 initializer.
13829
13830 * typeck.c (build_binary_op_nodefault): Correctly place parens around
13831 && and || in expression.
13832
13833 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
13834
13835 * call.c (default_parm_conversions): Remove prototype definition.
13836 (build_method_call): Remove unused variable result.
13837
13838 * cvt.c (ocp_convert): Remove unused variable conversion.
13839
13840 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
13841
13842 * except.c (do_unwind): #if 0 definition of unused variables fcall
13843 and next_pc.
13844
13845 * expr.c (extract_scalar_init): #if 0 prototype and function
13846 definition.
13847
13848 * init.c (expand_aggr_init_1): Remove unused variable init_type.
13849 (build_new_1): Remove unused variable t.
13850
13851 * pt.c (instantiate_class_template): Remove unused variable newtag;
13852 cast called function return value to void.
13853 (do_decl_instantiation): Remove unused variables name and fn.
13854
13855 * tree.c (get_type_decl): Add default return to shut up compiler from
13856 complaining control reaches end of non-void function.
13857
13858 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
13859
13860 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
13861
13862 * call.c (default_parm_conversions): Remove prototype definition.
13863 (build_method_call): Remove unused variable result.
13864 (build_over_call): Add default case in enumeration switch.
13865
13866 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
13867
13868 * decl2.c (lang_decode_option): Change j's type to size_t.
13869
13870 * tree.c (layout_vbasetypes): record_align and desired_align are of
13871 type unsigned int; const_size and nonvirtual_const_size likewise.
13872
13873 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
13874
13875 * parse.y (new_initializer): Make sure all initializers are
13876 lists.
13877
13878 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
13879
13880 * decl2.c (import_export_decl): Mark tinfo functions for
13881 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
13882
13883 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
13884
13885 * method.c: Fix typo.
13886
13887 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13888
13889 * method.c: Include "system.h" to get stdlib.h, stdio.h,
13890 ctype.h, string.h, etc.
13891 (issue_nrepeats): Add default case in enumeration switch.
13892 (check_btype): Likewise.
13893 (process_overload_item): Likewise.
13894
13895 * Makefile.in (method.o): Depend on system.h.
13896
13897 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13898
13899 * lex.c (do_scoped_id): Fix parenthesizing.
13900
13901 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
13902
13903 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
13904 FLAG_RTTI is unset, initialize type info machinery and continue
13905 with FLAG_RTTI enabled.
13906 (get_typeid): Likewise.
13907
13908 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
13909
13910 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
13911 from B.
13912
13913 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
13914
13915 * pt.c (finish_member_template_decl): Deal more gracefully with
13916 invalid declarations.
13917
13918 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
13919
13920 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
13921 cp-tree.h: Clean up more old overloading code, old RTTI code, and
13922 some formatting quirks.
13923
13924 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
13925 method.c, pt.c, ptree.c, typeck.c: Remove support for
13926 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
13927 * class.h: Remove.
13928 * Makefile.in: Adjust.
13929
13930 * pt.c (unify): Don't allow reduced cv-quals when strict.
13931
13932 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
13933 *type_unification* and unify.
13934
13935 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
13936
13937 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
13938 (nested_name_specifier): And add it before this use.
13939 (typename_sub0): And this use. Also add use without the keyword.
13940 (typename_sub1): Likewise.
13941 * pt.c (instantiate_class_template): Don't actually instantiate
13942 anything if our type uses template parms.
13943
13944 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
13945
13946 * decl.c (start_function): Don't call temporary_allocation for a
13947 nested function.
13948
13949 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
13950
13951 * pt.c (instantiate_class_template): Don't mess with friends if
13952 our type uses template parms.
13953
13954 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
13955
13956 * parse.y (nested_name_specifier): Use explicit_template_type.
13957 (typename_sub): Allow a template_type, an explicit_template_type,
13958 or an implicit template type at the end.
13959 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
13960 * decl.c (make_typename_type): Handle template-id where the name
13961 is a TEMPLATE_DECL.
13962 * call.c (build_scoped_method_call): Handle member template
13963 destructor call.
13964 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
13965 destructor is represented by the type.
13966
13967 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
13968 * parse.y (nested_name_specifier): Add 'template' case.
13969 (explicit_template_type): New rule.
13970 (typename_sub): Use it.
13971 * decl.c (make_typename_type): Handle getting a template-id for NAME.
13972 * pt.c (tsubst): Likewise.
13973
13974 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
13975
13976 * pt.c (add_to_template_args): Fix thinko.
13977 (instantiate_class_template): Call it later.
13978
13979 * pt.c (get_class_bindings): Add outer_args parm.
13980 (most_specialized_class): Likewise.
13981 (instantiate_class_template): Pass it.
13982 (more_specialized_class): Likewise.
13983 (lookup_template_class): Get context from template if none
13984 was specified.
13985 (finish_member_template_decl): Don't do anything with a
13986 partial specialization.
13987 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
13988 AGGREGATE_TYPE_P.
13989 * class.c (finish_struct): Member class templates have already been
13990 checked for name clashes.
13991 * decl.c (pushdecl_with_scope): Handle pushing at class level.
13992
13993 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
13994
13995 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
13996 (tsubst, *_PARM): Support multiple levels of template classes.
13997 (instantiate_class_template): Look up the pattern from the
13998 original template.
13999 (lookup_template_class): Handle getting a template for d1.
14000 (push_template_decl): Correct setting of 'primary'.
14001 (reduce_template_parm_level): Add 'levels' parm.
14002 (finish_member_template_decl): Support member class templates.
14003 (template_class_depth): Handle multiple levels.
14004 * parse.y (component_decl_1, fn.def2): Remove member template case.
14005 (component_decl): Add member template cases.
14006 * decl2.c (check_member_template): We now handle member template
14007 classes.
14008 * decl.c (pushtag): Handle member templates.
14009 * method.c (do_inline_function_hair): Don't touch
14010 IDENTIFIER_GLOBAL_VALUE.
14011 * init.c (build_offset_ref): If name isn't an identifier, just
14012 return it.
14013 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
14014
14015 * typeck.c (get_delta_difference): Do adjust for conversions to
14016 and from virtual base.
14017
14018 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
14019
14020 * typeck.c (get_delta_difference): Give hard error for conversion
14021 from virtual base.
14022
14023 * cp-tree.h: Tweak formatting.
14024
14025 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
14026
14027 * decl.c (push_namespace): Handle redeclaration error.
14028
14029 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
14030 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
14031 (NAMESPACE_BINDING): New macro.
14032 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
14033 * *.c: Use them.
14034
14035 * pt.c (push_template_decl): Use innermost_args.
14036
14037 * decl.c (get_unique_name): Tweak from earlier in the name.
14038
14039 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
14040
14041 * cp-tree.def: Add CPLUS_BINDING node.
14042 * cp-tree.h (tree_binding): New struct.
14043 (BINDING_SCOPE, BINDING_VALUE): New macros.
14044 (current_namespace, global_namespace): Declare extern.
14045 (struct lang_decl_flags): New field in_namespace.
14046 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
14047 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
14048 (TREE_INDIRECT_USING): New macro.
14049 * decl2.c (current_namespace, global_namespace): Declare. The
14050 value is a NAMESPACE_DECL now, not a TREE_LIST.
14051 (is_namespace_ancestor, namespace_ancestor): New static functions.
14052 (add_using_namespace, ambiguous_decl): Likewise.
14053 (lookup_using_namespace): New support function for lookup_name.
14054 (qualified_lookup_using_namespace): New support function for
14055 do_scoped_id and lookup_namespace_name.
14056 (get_namespace_id): Mark as obsolete.
14057 (current_namespace_id): Likewise.
14058 (do_namespace_alias): Implement.
14059 (do_using_directive): Implement as call to add_using_namespace.
14060 * decl.c (binding_for_name): New function.
14061 (push_namespace, pop_namespace): Implement.
14062 (push_decl): Don't install a FUNCTION_DECL in the global branch.
14063 (lookup_namespace_name): Implement using qualified lookup.
14064 (lookup_name_real): For global scoping, lookup in
14065 global_namespace. For namespace scoping, lookup in given
14066 namespace. For unscoped lookup, iterate over namespace,
14067 considering using directives.
14068 (init_decl_processing): Initialize global_namespace.
14069 (grokvardecl): Build assembler name as static name for globals.
14070 (grokdeclarator): Remove old namespace mangling.
14071 (xref_tag): When installing a global binding for the
14072 tag, make sure we have an identifier.
14073 * method.c (build_overload_nested_name): Mangle namespaces.
14074 (build_qualified_name): Likewise.
14075 (build_decl_overload_real): Likewise.
14076 * lex.c (build_lang_decl): Set namespace for new declaration to
14077 current_namespace.
14078 (do_scoped_id): Find global names in global or current
14079 namespace, or using qualified namespace lookup, depending on
14080 context.
14081 * init.c (build_member_call): When scope is namespace, use
14082 build_x_function_call instead.
14083 (build_offset_ref): When scope is namespace, collapse processing
14084 to lookup_namespace_name instead.
14085 * error.c (dump_decl): Support NAMESPACE_DECL.
14086 * decl.c (pushdecl): Bind globals to current namespace.
14087 (push_overloaded_decl): Likewise.
14088 (lookup_tag): Likewise.
14089 (lookup_name_current_level): Likewise.
14090 (xref_tag): Likewise.
14091 (start_function): Likewise.
14092 * lex.c (do_identifier): Likewise.
14093 (identifier_typedecl_value): Likewise.
14094 (real_yylex): Likewise.
14095 * method.c (do_inline_function_hair): Likewise.
14096 * parse.y (unscoped): Likewise.
14097 * pt.c (check_explicit_specialization): Likewise.
14098 (lookup_template_class): Likewise.
14099 * rtti.c (call_void_fn): Likewise.
14100 * sig.c (build_sigtable): Likewise.
14101 * ptree.c (lang_print_xnode): New function.
14102
14103 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
14104
14105 * pt.c (instantiate_class_template): Don't instantiate if pedantic
14106 and the args use template parms.
14107
14108 * pt.c (push_tinst_level): If the instantiation uses template parms,
14109 fail silently.
14110 * decl.c (xref_basetypes): Do call complete_type for basetypes
14111 that involve template parameters.
14112
14113 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
14114
14115 * typeck2.c (process_init_constructor): Fix labeled init check.
14116
14117 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
14118
14119 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
14120 argument to tsubst and friends.
14121
14122 * pt.c (tsubst, FUNCTION_DECL): Tidy.
14123
14124 * typeck.c (build_x_function_call): Handle static member function
14125 templates like non-templates. Handle friend templates like normal
14126 function templates.
14127 * pt.c (tsubst, *_PARM): Don't use orig_level.
14128 (get_bindings): Don't call add_to_template_args.
14129 (instantiate_template): Likewise.
14130 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
14131 * ptree.c (print_lang_type): Print index/level for template parms.
14132
14133 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
14134
14135 * Make-lang.in (cc1plus): Note that cc1plus depends on
14136 cp/cp-tree.h and cp/cp-tree.def.
14137
14138 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
14139 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
14140 position in a template parameter list.
14141 * cp-tree.h (template_parm_index): New structure, used as the tree
14142 structure for a TEMPLATE_PARM_INDEX.
14143 (TEMPLATE_PARM_IDX): New macro.
14144 (TEMPLATE_PARM_LEVEL): Likewise.
14145 (TEMPLATE_PARM_DESCENDANTS): Likewise.
14146 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
14147 (TEMPLATE_PARM_DECL): Likewise.
14148 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
14149 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
14150 (TEMPLATE_TYPE_DECL): Likewise.
14151 (TEMPLATE_CONST_IDX): Remove.
14152 (TEMPLATE_CONST_LEVEL): Likewise.
14153 (TEMPLATE_CONST_SET_INFO): Likewise.
14154 (TEMPLATE_TYPE_SET_INFO): Likewise.
14155 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
14156 node.
14157 (TEMPLATE_TYPE_LEVEL): Likewise.
14158 * decl.c (decls_match): Call comp_template_parms, rather than
14159 expanding it inline.
14160 (duplicate_decls): If two template declarations are being merged,
14161 then their TEMPLATE_INFOs should be merged as well.
14162 (grokfndecl): Save template-id information when declaring a friend
14163 with explicit template arguments. Pass arguments to
14164 check_explicit_specialization via correct convention; at some
14165 point check_explicit_specialization changed, but these call-sites
14166 did not.
14167 (grokdeclarator): Tidy up slightly.
14168 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
14169 two template functions with the same DECL_ASSEMBLER_NAME the same,
14170 since the names are not yet mangled.
14171 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
14172 TEMPLATE_CONST_PARM.
14173 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
14174 decl for a non-type parameter, rather than printing `<tparm ...>'.
14175 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
14176 (do_friend): Deal with template friends.
14177 * lex.c (do_pending_inlines): Call
14178 maybe_begin_member_template_processing, rather than
14179 conditionally calling begin_member_template_processing.
14180 (process_next_inline): Likewise. Call
14181 maybe_end_member_template_processing, rather than
14182 conditionally calling end_member_template_processing.
14183 (do_pending_defargs): Likewise.
14184 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
14185 TEMPLATE_CONST_PARM.
14186 * method.c (build_mangled_template_parm_index): New function.
14187 (build_overload_value): Use it.
14188 (build_overload_name): Likewise.
14189 * pt.c (finish_member_template_decl): Allow friend declarations.
14190 (template_class_depth): New function.
14191 (is_member_template): Rename, and modify, to become...
14192 (is_member_or_friend_template): New function.
14193 (end_member_template_processing): Rename, and modify, to become...
14194 (maybe_end_member_template_processing).
14195 (build_template_parm_index): New function.
14196 (reduce_template_parm_level): New function.
14197 (process_template_parm): Modify to use build_template_parm_index.
14198 (push_template_decl): Deal with friend templates.
14199 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
14200 TEMPLATE_CONST_PARM.
14201 (tsubst_friend_function): New function.
14202 (instantiate_class_template): Generate the DECL_FRIENDLIST
14203 for a new instantiation by using tsubst_friend_function rather
14204 than just tsubst.
14205 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
14206 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
14207 appropriate new macros. Use reduce_template_parm_level to
14208 generate lower-level template parameters. Handle tsubst'ing into
14209 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
14210 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
14211 templates. Similarly for the template parameters for a new
14212 template.
14213 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
14214 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
14215 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
14216 (get_bindings): Call add_to_template_args if necessary.
14217 (instantiate_decl): Handle instantiations of friend templates.
14218 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
14219 TEMPLATE_TYPE_PARM as a list of fields; it's not!
14220 * spew.c (yylex): Do a little manual constant propagation to
14221 clarify the code.
14222
14223 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
14224
14225 * error.c: Include sys/types.h.
14226
14227 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
14228
14229 * method.c (build_mangled_name): Start CPP directives in column zero.
14230
14231 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
14232
14233 * typeck2.c (process_init_constructor): Sorry about non-trivial
14234 labeled initializers.
14235 * parse.y (initlist): Re-enable labeled initializers.
14236
14237 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14238
14239 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
14240 all callers changed. Rely on the new parameter instead of arg
14241 being a TREE_LIST when determine whether we are working inside
14242 template template parameter. Clean up is_type test.
14243
14244 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
14245
14246 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
14247 * typeck2.c (initializer_constant_valid_p): Allow conversions
14248 between pointers and references.
14249
14250 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
14251
14252 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
14253 if pedantic || warn_pointer_arith.
14254
14255 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14256
14257 * pt.c (unify): Handle TEMPLATE_DECL.
14258
14259 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
14260
14261 * cp-tree.h (strip_attrs): Remove decl.
14262
14263 1998-02-18 Doug Evans <devans@cygnus.com>
14264
14265 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
14266 Update olddecl's attributes too.
14267 (strip_attrs): Remove function.
14268 * typeck.c (common_type): Call merge_machine_type_attributes.
14269
14270 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
14271
14272 * parse.y (initdcl0_innards): New grammar symbol.
14273 (nomods_initdecls, nomods_initdcl0): Change type from itype to
14274 none, since the resulting value is never used.
14275 (parse_decl): New function.
14276 (datadef): Remove redundant actions.
14277 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
14278 * parse.c: Regenerated.
14279
14280 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
14281
14282 * parse.y (simple_stmt): Use getdecls() to check for decl.
14283
14284 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
14285
14286 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
14287 macros.
14288 (c++.install-common): Install c++filt properly as native or as cross
14289 variant.
14290 (c++.uninstall): Add c++filt.
14291
14292 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
14293
14294 * call.c (standard_conversion): Fix multi-level ptr conversions.
14295
14296 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
14297
14298 * init.c (build_new): Propagate error_mark_node up.
14299
14300 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
14301
14302 * parse.y (simple_stmt): If the condition isn't a declaration,
14303 start the controlled block after the test.
14304
14305 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
14306
14307 * call.c (build_over_call): Convert builtin abs, labs and fabs to
14308 tree-codes.
14309 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
14310 builtins.
14311
14312 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
14313
14314 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
14315
14316 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
14317
14318 * cp-tree.h: Add access_protected_virtual_node.
14319 * class.c (init_class_processing): Initialize it.
14320 * decl.c (xref_basetypes): Use it.
14321 * parse.y (base_class_access_list): Likewise.
14322
14323 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
14324 (c++.install-common): Install c++filt.
14325
14326 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14327
14328 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
14329
14330 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
14331
14332 * call.c (reference_binding): Use comptypes when comparing
14333 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
14334
14335 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
14336
14337 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
14338 (really_overloaded_fn): Move check here from is_overloaded_fn.
14339 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
14340
14341 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
14342
14343 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
14344 conversions.
14345
14346 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
14347
14348 * cp-tree.h (push_template_decl): Return the decl passed in, or an
14349 equivalent duplicate.
14350 * decl.c (pushtag): Use the return value from push_template_decl.
14351 (duplicate_decls): When duplicating a template declaration, merge
14352 the DECL_TEMPLATE_RESULTs as well.
14353 (make_implicit_typename): Don't try to dive into typename types to
14354 find a context for making a new implicit typename.
14355 (start_decl): Use the return value from push_template_decl.
14356 (grokdeclarator): Complain about declarations list `const operator
14357 int'. Since we don't correctly handle in-class initializations of
14358 non-static data members, complain about this (now illegal)
14359 practice. Issue an error for initializations of non-const statics
14360 since that is illegal as well, and since we don't handle that case
14361 correctly either.
14362 (start_function): Use the return value from push_template_decl.
14363 (start_method): Likewise.
14364 * decl2.c (grokfield): Likewise. Since the change to
14365 grokdeclarator ensures that all initialized fields are in fact
14366 static, remove a redundant test for TREE_PUBLIC.
14367 * parse.y (initlist): Disable labeled initializers since they do
14368 not work as per the documentation, and since they do not use the
14369 same syntax as the C front end.
14370 * pt.c (push_template_decl): Return the decl passed in, or an
14371 equivalent duplicate.
14372 (lookup_template_class): When searching in a nested context,
14373 use the right arguments.
14374 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
14375 * typeck.c (build_component_ref): Assign the correct type to the
14376 result of build_vfn_ref.
14377
14378 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
14379
14380 * pt.c (convert_nontype_argument): Fix typo.
14381 (check_explicit_specialization): Allow old-style specialization
14382 of class template members.
14383
14384 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
14385 Manfred Hollstein <manfred@s-direktnet.de>
14386
14387 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
14388 when deciding to override DECL_ASSEMBLER_NAME.
14389
14390 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
14391
14392 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
14393 * cp-tree.h (flag_do_squangling): Add declaration.
14394 * lang-options.h: Add -fsquangle and -fno-squangle.
14395 * method.c: Add macros and static variables for squangling.
14396 (build_overload_name): Rename to build_mangled_name, add logic for B
14397 compression, and split into process_modifiers and
14398 process_overload_item.
14399 (process_modifiers): New function, to handle constant, reference,
14400 and pointer types.
14401 (process_overload_item): New function, handles issue of type codes.
14402 (build_overload_name): New function, start squangling and call
14403 build_mangled_name.
14404 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
14405 (start_squangling): New function to initialize squangling structs.
14406 (end_squangling): New function to destroy squangling structs.
14407 (nrepeats): Rename variable to Nrepeats.
14408 (issue_nrepeats): New function for issuing 'n' type repeats.
14409 (check_ktype): New function to check for type K name compression.
14410 (build_overload_nested_name): Add a check for K name compression.
14411 (build_qualified_name): Add a check for K name compression and don't
14412 use DECL_ASSEMBLER_NAME when squangling is on.
14413 (check_btype): New function, checks for B type compression.
14414 (build_static_name, build_decl_overload_real): Initiate squangling.
14415 (build_typename_overload, build_overload_with_type): Initiate
14416 squangling
14417
14418 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
14419
14420 * method.c (make_thunk): Avoid name buffer overflow.
14421
14422 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
14423
14424 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
14425 don't define them yet.
14426
14427 * parse.y (nomods_initdcl0): Add constructor_declarator case.
14428
14429 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14430
14431 * config-lang.in (diff_excludes): Use basename only.
14432
14433 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
14434
14435 * tinfo2.cc: Add tinfo for signed char.
14436
14437 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
14438
14439 * search.c (compute_access): Handle protected constructors in derived
14440 classes as accessible.
14441
14442 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
14443
14444 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
14445 Call convert_from_reference sooner.
14446
14447 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
14448
14449 * cvt.c (ocp_convert): Obtain the constant values from constant
14450 decls even if the destination type is the same as the type of the
14451 decl.
14452
14453 * decl2.c (finish_file): Make sure that static inlines with
14454 definitions are not marked DECL_EXTERNAL before returning.
14455
14456 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
14457
14458 * decl.c: Lose arg_looking_for_template.
14459 (lookup_name_real): Likewise.
14460 * parse.y: Lose processing_template_arg, template_arg1.
14461 (primary): Likewise.
14462 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
14463
14464 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14465
14466 * error.c (dump_decl): Fix type of default arguments for template
14467 template parameters and nontype template parameters.
14468 * parse.y (template_parm): Handle invalid default template
14469 template arguments here.
14470
14471 * parse.y (template_parm): Use template_arg instead of PTYPENAME
14472 for default template template argument.
14473 * pt.c (coerce_template_parms): Merge default template argument
14474 codes. Can treat RECORD_TYPE as template name if it is implicitly
14475 created. Fix argument index in error message.
14476 * typeck.c (comptypes): Merge template argument comparison codes in
14477 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
14478
14479 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
14480
14481 * lex.c (file_name_nondirectory): Also check for '/'.
14482
14483 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
14484
14485 * parse.y (primary): Deal with statement-expressions in
14486 templates.
14487 * pt.c (tsubst_copy): Handle BIND_EXPR.
14488 * tree.c (mapcar): Likewise.
14489
14490 * call.c (add_template_candidate_real): Pass extra parameter to
14491 fn_type_unification.
14492 * cp-tree.h (fn_type_unification): Add parameter.
14493 * pt.c (fn_type_unification): Add additional parameter to deal with
14494 static member functions.
14495 (get_bindings): Deal with static member functions.
14496
14497 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
14498 (revert_static_member_fn): Declare.
14499 * decl.c (revert_static_member_fn): Remove declaration. Change
14500 linkage from internal to external.
14501 (cp_finish_decl): Deal with virtual functions in classes local to
14502 template functions.
14503 * decl2.c (finish_file): Don't forget to emit increment/decrement
14504 expressions in initializers for file-scope variables.
14505 * parse.y (typename_sub2): If the typename doesn't names a
14506 template, rather than a type, issue an error message.
14507 * pt.c (check_explicit_specialization): Handle specializations of
14508 static member functions.
14509 (coerce_template_parms): Handle offset references to lists of
14510 member functions.
14511 * search.c (note_debug_info_needed): Don't crash when handed a
14512 type which is being defined.
14513 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
14514 that can happen with some illegal code.
14515
14516 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14517
14518 * call.c (user_harshness): Initialize `code' to 0.
14519 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
14520 (null_ptr_cst_p): Add parentheses around && within ||.
14521 (standard_conversion): Likewise.
14522 (z_candidate): Likewise.
14523 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
14524 (build_object_call): Likewise for `mem_args'.
14525 (build_new_op): Likewise for `mem_arglist'. Add `return' from
14526 default case in enumeration switch.
14527
14528 * class.c (build_vtable_entry): Add explicit braces to avoid
14529 ambiguous `else'.
14530 (build_class_init_list): Likewise.
14531 (finish_struct_1): Initialize `width' to 0.
14532 (instantiate_type): Initialize `name' to NULL_TREE. Add
14533 explicit braces to avoid ambiguous `else'.
14534
14535 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
14536 `else'.
14537
14538 * decl.c (grok_reference_init): Eliminate unused parameter, all
14539 callers changed.
14540 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
14541 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
14542 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
14543 (grokdeclarator): Add parentheses around && within ||. Add
14544 explicit braces to avoid ambiguous `else'.
14545 (grokparms): Initialize `type' to NULL_TREE.
14546 (xref_tag): Remove unused label `just_return'.
14547 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
14548 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
14549 (hack_incomplete_structures): Add parentheses around assignment
14550 used as truth value.
14551
14552 * decl2.c (coerce_delete_type): Hide definition of `e3'.
14553
14554 * error.c: Include <stdlib.h>.
14555 (dump_expr): Change the type of `i' to size_t. Remove unused
14556 label `error'.
14557
14558 * except.c (init_exception_processing): Remove unused variable `d'.
14559 (expand_throw): Likewise for `label'.
14560
14561 * friend.c (add_friends): Add explicit braces to avoid ambiguous
14562 `else'.
14563
14564 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
14565 (sort_base_init): Likewise for `binfo'.
14566 (expand_member_init): Likewise for `rval'.
14567 (build_member_call): Add parentheses around assignment used as
14568 truth value.
14569 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
14570 (build_new): Initialize `nelts' to NULL_TREE. Initialize
14571 `old_immediate_size_expand' to 0.
14572 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
14573 (build_vec_delete_1): Remove unused variable `block'.
14574 (expand_vec_init): Initialize `itype' to NULL_TREE.
14575
14576 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
14577 declaration of `index' and `rindex' with autoconf macros.
14578 (reinit_parse_for_expr): Remove unused variables
14579 `look_for_semicolon' and `look_for_lbrac'.
14580 (cons_up_default_function): Initialize `args' to NULL_TREE.
14581 (readescape): Initialize `firstdig' to 0.
14582 (real_yylex): Add parentheses around assignment used as truth value.
14583
14584 * method.c: Include <strings.h> if we don't have <string.h>.
14585 Protect declaration of `index' with autoconf macro.
14586
14587 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
14588 Initialize `type' to NULL_TREE.
14589 (structsp): Remove unused variable `id'.
14590
14591 * pt.c (coerce_template_parms): Add explicit braces to avoid
14592 ambiguous `else'.
14593 (lookup_template_class): Initialize `template' to NULL_TREE.
14594 (instantiate_class_template): Remove unused variable `name' and `e'.
14595 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
14596 (do_poplevel): Initialize `saved_warn_unused' to 0.
14597 (type_unification): Remove unused varable `parm'.
14598 (unify): Likewise for `j'.
14599
14600 * repo.c (init_repo): Add parentheses around assignment used as
14601 truth value.
14602 (finish_repo): Remove unused varable `p'.
14603
14604 * search.c (get_binfo): Initialize `type' to NULL_TREE.
14605 (get_base_distance): Likewise.
14606 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
14607 and `new_v' to NULL_TREE.
14608 (lookup_fnfields): Likewise for `rval_binfo_h'.
14609 (breadth_first_search): Add parentheses around assignment used as
14610 truth value.
14611 (get_template_base): Initialize `type' to NULL_TREE.
14612
14613 * sig.c (append_signature_fields): Initialize `last_mfptr' to
14614 NULL_TREE.
14615 (build_signature_table_constructor): Likewise for
14616 `last_rhs_field', `pfn' and `vt_off'.
14617 (build_sigtable): Likewise for `init'.
14618
14619 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
14620 (propagate_binfo_offsets): Likewise for `delta'.
14621 (hash_tree_cons): Initialize hashcode to 0.
14622 (can_free): Likewise for `size'.
14623 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
14624
14625 * typeck.c (convert_sequence): Hide prototype.
14626 (common_type): Add explicit braces to avoid ambiguous `else'.
14627 (comp_target_types): Likewise.
14628 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
14629 (build_function_call_real): Add explicit braces to avoid ambiguous
14630 `else'.
14631 (convert_arguments): Initialize `called_thing' to 0.
14632 (convert_for_initialization): Initialize `savew' and `savee' to 0.
14633
14634 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
14635 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
14636 (build_x_arrow): Likewise for `last_rval'.
14637
14638 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
14639
14640 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
14641
14642 * decl.c (init_decl_processing): Use set_sizetype.
14643 * decl2.c (sizetype): Don't declare.
14644 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
14645 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
14646 (build_component_addr, unary_complex_lvalue): Likewise.
14647 * rtti.c (expand_class_desc): Likewise.
14648 * class.c (get_vfield_offset): Likewise.
14649
14650 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
14651
14652 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
14653 early to avoid bogus error. Handle overloaded function
14654 names provided as template arguments correctly.
14655 (coerce_template_parms): Don't mishandle overloaded functions when
14656 dealing with template template parameters.
14657 (lookup_template_class): Issue an error message, rather than
14658 crashing, when the TYPE_DECL provided is not a template type.
14659
14660 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
14661
14662 * class.c (instantiate_type): Don't just return a known type if
14663 it's wrong.
14664
14665 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
14666
14667 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
14668 since that code could never be reached.
14669
14670 * error.c (dump_decl): Avoid aborting in the midst of printing an
14671 error message about an illegal template declaration.
14672
14673 * parse.y (structsp): Print an error message, rather than crashing,
14674 when a class-head does not name a class.
14675
14676 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
14677 template arguments as a g++ extension.
14678
14679 * cp-tree.def (ALIGNOF_EXPR): New tree code.
14680 * decl2.c (grok_alignof): If processing_template_decl, just store
14681 the expression.
14682 * typeck.c (c_alignof): Likewise.
14683 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
14684 * error.c (dump_expr): Likewise.
14685 * pt.c (tsubst_copy): Likewise.
14686 * tree.c (cp_tree_equal): Likewise.
14687 * pt.c (uses_template_parms): Correctly determine whether or not a
14688 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
14689 folding can be done.
14690
14691 * cp-tree.h (grok_enum_decls): Remove type parameter.
14692 * decl.c (grok_enum_decls): Likewise.
14693 * decl2.c (grok_x_components): Call grok_enum_decls
14694 unconditionally, since it will do nothing if there is no
14695 current_local_enum. Use the new calling sequence.
14696 * pt.c (tsubst_enum): Use the new calling sequence for
14697 grok_enum_decls.
14698
14699 * decl.c (start_function): Make member functions of local classes
14700 in extern inline functions have comdat linkage here...
14701 (grokdeclarator): Rather than here.
14702
14703 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
14704
14705 * pt.c (convert_nontype_argument): Use decl_constant_value.
14706
14707 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
14708
14709 * call.c (add_template_candidate_real): New function.
14710 (add_template_candidate): Use it.
14711 (add_template_conv_candidate): Likewise.
14712 (joust): Pass extra argument to more_specialized.
14713 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
14714 (is_local_class): Remove.
14715 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
14716 * cp-tree.h (is_local_class): Remove.
14717 (perform_array_to_pointer_conversion): Likewise.
14718 (finish_member_template_decl): Add.
14719 (check_explicit_specialization): Return a tree, not an int.
14720 (more_specialized): Take additional argument.
14721 (get_bindings): Likewise.
14722 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
14723 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
14724 (perform_array_to_pointer_conversion): Remove.
14725 * decl.c (saved_scope): Add processing_specialization,
14726 processing_explicit_instantiation fields.
14727 (maybe_push_to_top_level): Save them.
14728 (pop_from_top_level): Restore them.
14729 (grokfndecl): Use new return value from
14730 check_explicit_specialization.
14731 (start_decl): Don't check flag_guiding_decls before pushing
14732 decls.
14733 (cp_finish_decl): Remove previous (bogus) change.
14734 (grok_declarator): Use decl_function_context rather than
14735 is_local_class.
14736 * decl2.c (finish_file): Pass extra argument to get_bindings.
14737 (build_expr_from_tree): Let build_x_component_ref check
14738 validity of arguments rather than doing it here.
14739 * lex.c (cons_up_default_function): Remove code fooling with
14740 processing_specialization, processing_explicit_instantiation
14741 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
14742 * method.c (build_overload_identifier): Mangle local classes in
14743 template functions correctly.
14744 * parse.y (finish_member_template_decl): Move to pt.c.
14745 * pt.c (finish_member_template_decl): Moved here from parse.y.
14746 (print_candidates): New function.
14747 (determine_specialization): Change interface. Properly look for
14748 most specialized versions of template candidates.
14749 (check_explicit_specialization): Fully process explicit
14750 instantiations.
14751 (push_template_decl): Avoid looking at CLASSTYPE fields in
14752 FUNCTION_DECLS.
14753 (determine_overloaded_function): Remove.
14754 (convert_nontype_argument): Change name from
14755 convert_nontype_parameter. Use determine_overloaded_function
14756 instead of instantiate_type.
14757 (mangle_class_name_for_template): Handle type contexts as well as
14758 function contexts.
14759 (classtype_mangled_name): Likewise.
14760 (lookup_template_class): Likewise.
14761 (tsubst): Likewise.
14762 (more_specialized): Take explict template arguments as a
14763 parameter.
14764 (most_specialized): Likewise.
14765 (get_bindings): Likewise. Check that return types match before
14766 proclaiming a function a match.
14767 (do_decl_instantiation): Remove code searching for function to
14768 instantiate; that is now done in check_explicit_specialization.
14769 (add_maybe_template): Pass extra argument to get_bindings.
14770 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
14771 implementation.
14772 * typeck.c (build_component_ref): Check for invalid arguments.
14773
14774 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
14775
14776 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
14777 return_target and call_target are equivalent.
14778
14779 * pt.c (type_unification_real): Just accept function parms that
14780 don't use any template parms.
14781
14782 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
14783
14784 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
14785 unset DECL_NOT_REALLY_EXTERN.
14786
14787 * parse.y (typename_sub*): Fix std::.
14788
14789 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
14790
14791 * error.c (dump_decl): Fix type default template args.
14792 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
14793
14794 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
14795
14796 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
14797 (file_name_nondirectory): Use.
14798
14799 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14800
14801 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
14802 that are not really present. Substitute default arguments in
14803 template template arguments. Correctly convert TEMPLATE_DECL to
14804 TEMPLATE_TEMPLATE_PARM.
14805 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
14806 are no longer treated specially here.
14807 * parse.y (template_template_parm): Fix copy error.
14808 * decl.c (grokdeclarator): Warn about missing `typename' for nested
14809 type created from template template parameters.
14810 * parse.y (bad_parm): Likewise
14811
14812 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
14813 (push_nested_class): Likewise.
14814 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
14815 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
14816 (copy_template_template_parm): Declare.
14817 * decl.c (arg_looking_for_template): New variable.
14818 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
14819 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
14820 node if arg_looking_for_template is nonzero.
14821 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
14822 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
14823 (grokdeclarator): Handle TEMPLATE_DECL.
14824 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
14825 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
14826 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
14827 (dump_decl): Handle unnamed template type parameters.
14828 Handle template template parameters.
14829 (dump_function_name): Handle template template parameters.
14830 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
14831 Handle TEMPLATE_TEMPLATE_PARM.
14832 * method.c (build_template_template_parm_names): New function.
14833 (build_template_parm_names): Handle TEMPLATE_DECL.
14834 (build_overload_nested_name, build_overload_name):
14835 Handle TEMPLATE_TEMPLATE_PARM.
14836 * parse.y (maybe_identifier): New nonterminal.
14837 (template_type_parm): Use it.
14838 (template_template_parm, template_arg1): New nonterminal.
14839 (template_parm): Add template_template_parm rules.
14840 (template_arg): Set processing_template_arg.
14841 (template_arg1): Rules moved from template_arg.
14842 (primary, nonnested_type): Set arg_looking_for_template if we are
14843 processing template arguments.
14844 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
14845 (process_template_parm): Handle template template parameters.
14846 (coerce_template_parms, comp_template_args): Likewise.
14847 (mangle_class_name_for_template, lookup_template_class): Likewise.
14848 (uses_template_parms): Handle TEMPLATE_DECL and
14849 TEMPLATE_TEMPLATE_PARM.
14850 (current_template_args): Handle TEMPLATE_DECL.
14851 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
14852 * search.c (dfs_walk, dfs_record_inheritance):
14853 Handle TEMPLATE_TEMPLATE_PARM.
14854 * tree.c (copy_template_template_parm): New function.
14855 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
14856 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
14857
14858 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
14859
14860 * decl.c (start_decl): Don't allow duplicate definitions of static
14861 data members.
14862
14863 * call.c (build_user_type_conversion_1): Handle user-defined
14864 template conversion operators correctly.
14865
14866 * decl2.c (build_expr_from_tree): Issue an error message if the
14867 object in a COMPONENT_REF is a TEMPLATE_DECL.
14868
14869 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
14870
14871 * class.c (is_local_class): New function.
14872 * cp-tree.h (is_local_class): Declare it.
14873 (last_tree): Likewise.
14874 (begin_tree): Likewise.
14875 (end_tree): Likewise.
14876 (lookup_template_class): Change prototype.
14877 * decl.c (cp_finish_decl): Check for NULL where necessary.
14878 Consider FUNCTION_DECLS to declare objects with top-level binding,
14879 when calling make_decl_rtl.
14880 (grokdeclarator): Give members of local classes internal linkage.
14881 (start_function): Remove declaration of last_tree.
14882 (finish_function): Set flag_keep_inline_functions around call to
14883 rest_of_compilation if we are processing a member function in a
14884 local class.
14885 (start_method): Call push_template_decl for member functions of
14886 local classes in template functions.
14887 * decl2.c (import_export_decl): Don't give external linkage to
14888 instantiations of templates with internal linkage.
14889 * parse.y (last_tree): Remove declaration.
14890 (template_type): Pass extra parameter to lookup_template_class.
14891 (self_template_type): Likewise.
14892 (structsp): Move call to reset_specialization into left_curly.
14893 (left_curly): Call reset_specialization, and begin_tree.
14894 * pt.c (saved_trees): New variable.
14895 (mangle_class_name_for_template): Change prototype. Use
14896 additional function context to name local classes in templates
14897 correctly.
14898 (classtype_mangled_name): Pass the context.
14899 (push_template_decl): Handle local classes and templates, and
14900 member functions for such classes.
14901 (convert_nontype_parameter): Fix handling of pointer-to-member
14902 constants.
14903 (lookup_template_class): Handle local classes in templates.
14904 (tsubst): Likewise. Don't assume that template instantiations
14905 have external linkage; pay attention to the template declaration.
14906 (mark_decl_instantiated): Likewise.
14907 (begin_tree): New function.
14908 (end_tree): Likewise.
14909
14910 * decl.c (xref_basetypes): Don't call complete_type for basetypes
14911 that involve template parameters; that can lead to infinite
14912 recursion unnecessarily.
14913
14914 * pt.c (register_specialization): Do not register specializations
14915 that aren't ready to be registered yet.
14916 (check_explicit_specialization): Handle explicit specialization of
14917 constructors and destructors.
14918 (build_template_decl): New function.
14919 (push_template_delc): Handle out-of-class specializations of
14920 member templates.
14921
14922 * pt.c (check_explicit_specialization): Set up the template
14923 information before registering the specialization.
14924 (coerce_template_parms): Fix thinko.
14925 (tsubst): Handle specializations of member templates correctly.
14926
14927 * class.c (finish_struct_methods): Remove calls to
14928 check_explicit_specialization from here.
14929 (finish_struct): And insert them here.
14930 * cp-tree.h (perform_qualification_conversions): New function.
14931 (perform_array_to_pointer_conversion): Likewise.
14932 (begin_explicit_instantiation): Likewise.
14933 (end_explicit_instantiation): Likewise.
14934 (determine_specialization): Renamed from
14935 determine_explicit_specialization.
14936 (comp_template_parms): New function.
14937 (processing_explicit_instantiation): New variable.
14938 * cvt.c (perform_qualification_conversions): New function.
14939 (perform_array_to_pointer_conversion): Likewise.
14940 * decl.c (duplicate_decls): Don't consider template functions
14941 alike unless they have the same parameters. Refine handling of
14942 instantiation/specialization mismatches.
14943 (start_decl): Don't call pushdecl for template specializations,
14944 since they don't affect overloading.
14945 (start_function): Likewise.
14946 (grokfndecl): Call check_explicit_specialization a little later.
14947 Don't call duplicate_decls for memberm template specializations.
14948 (grokdeclarator): Don't update template_count for classes that are
14949 themselves specializations. Remove use of `2' as parameter to
14950 grokfndecl since that value isn't used.
14951 * lex.c (cons_up_default_function): Save and restore
14952 processing_explicit_instantiation around calls to grokfield.
14953 * parse.y (finish_member_template_decl): New function.
14954 (component_decl_1): Use it.
14955 (fn.def2): Likewise.
14956 (template_arg_list_opt): New nonterminal.
14957 (template_type): Use it.
14958 (self_template_type): Likewise.
14959 (template_id): Likewise.
14960 (object_template_id): Likewise.
14961 (notype_template_declarator): Likwise.
14962 (begin_explicit_instantiation): Likewise.
14963 (end_explicit_instantiation): Likewise.
14964 (explicit_instantiation): Use them.
14965 * pt.c (coerce_template_parms): Add parameters.
14966 (processing_explicit_instantiation): New variable.
14967 (convert_nontype_parameter): New function.
14968 (determine_overloaded_function): Likewise.
14969 (begin_explicit_instantiation): Likewise.
14970 (end_explicit_instantiation): Likewise.
14971 (retrieve_specialization): Likewise.
14972 (register_specialization): Likewise.
14973 (processing_explicit_specialization): Removed.
14974 (determine_specialization): Handle specializations of member
14975 functions of template class instantiations.
14976 (check_explicit_specialization): Refine to conform to standard.
14977 (comp_template_parms): New function.
14978 (coerce_template_parms): Call convert_nontype_parameter.
14979 (tsubst): Refine handling of member templates. Use
14980 register_specialization.
14981 (instantiate_template): Use retrieve_specialization.
14982 (do_decl_instantiation): Likewise.
14983 (instantiate_decl): Likewise.
14984 (type_unification): Improve handling of explict template
14985 arguments.
14986 * tree.c (mapcar): Return error_mark_node, rather than aborting,
14987 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
14988 * typeck.c (build_unary_op): Call determine_specialization, rather
14989 than determine_explicit_specialization.
14990
14991 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
14992
14993 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
14994
14995 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14996
14997 * error.c (dump_decl): For enum tags, output the tag, not its value.
14998
14999 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
15000
15001 * decl.c (init_decl_processing): Only call init_rtti_processing
15002 FLAG_RTTI is set.
15003
15004 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
15005
15006 * init.c (build_new_1): Split out from build_new.
15007 (build_new): Just return a NEW_EXPR.
15008 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
15009
15010 * decl2.c (get_temp_regvar): Tweak.
15011
15012 * cp-tree.h (TREE_CALLS_NEW): Comment out.
15013 * class.c (resolves_to_fixed_type_p): Remove use.
15014 * method.c (build_opfncall): Likewise.
15015 * call.c (build_new_op): Likewise.
15016
15017 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
15018
15019 * exception.cc (__eh_alloc, __eh_free): New fns.
15020 (__cp_push_exception, __cp_pop_exception): Use them.
15021 (__uncatch_exception): Call terminate here if no exception.
15022 * except.c (build_terminate_handler): New fn.
15023 (expand_start_catch_block): Use it.
15024 (expand_exception_blocks): Likewise.
15025 (alloc_eh_object): New fn.
15026 (expand_throw): Use it. Protect exception init with terminate.
15027 * typeck.c (build_modify_expr): Remove code that ignores trivial
15028 methods.
15029
15030 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15031
15032 * call.c (add_builtin_candidate): Add default case in enumeration
15033 switch.
15034 (build_new_op): Likewise.
15035 (convert_like): Likewise.
15036 * cvt.c (build_expr_type_conversion): Likewise.
15037 * tree.c (real_lvalue_p): Likewise.
15038 (lvalue_p): Likewise.
15039 (cp_tree_equal): Likewise.
15040 * typeck.c (comptypes): Likewise.
15041 (build_component_ref): Likewise.
15042 (build_function_call_real): Likewise.
15043 (build_binary_op_nodefault): Likewise.
15044 (build_unary_op): Likewise.
15045 (build_modify_expr): Likewise.
15046 * typeck2.c (initializer_constant_valid_p): Likewise.
15047
15048 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
15049
15050 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
15051
15052 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
15053
15054 * pt.c (coerce_template_parms): Make sure to digest_init if
15055 possible.
15056
15057 * decl.c (duplicate_decls): Make the newdecl virtual if the
15058 olddecl was, just as is done with other attributes of olddecl.
15059
15060 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
15061
15062 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
15063 address of an OFFSET_REF.
15064
15065 * cp-tree.def: Add AGGR_INIT_EXPR.
15066 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
15067 AGGR_INIT_EXPR where appropriate.
15068 * expr.c (cplus_expand_expr): Likewise. Simplify.
15069
15070 * decl2.c (finish_file): Remove call to register_exception_table.
15071
15072 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15073
15074 * pt.c (instantiate_class_template): Don't do injection when
15075 processing_template_decl is true, as pollutes current_binding_level
15076 for base classes.
15077
15078 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
15079
15080 * pt.c (maybe_fold_nontype_arg): Add prototype.
15081
15082 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
15083
15084 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
15085 * error.c (dump_expr): Likewise.
15086
15087 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
15088
15089 * typeck.c (build_function_call_real): Remove "inline called before
15090 definition" pedwarn.
15091
15092 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
15093
15094 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
15095
15096 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
15097
15098 * pt.c (type_unification_real): Change __null to type void* with
15099 a warning.
15100
15101 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
15102
15103 * call.c (implicit_conversion): Don't call
15104 build_user_type_conversion_1 with a NULL expr, since it will
15105 crash.
15106
15107 * pt.c (unify): Don't try to unify array bounds if either array is
15108 unbounded.
15109
15110 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15111
15112 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
15113 Replace extern decls with casts.
15114
15115 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
15116 Update last_parm_cleanup_insn.
15117 (store_after_parms): Remove.
15118 * cp-tree.h: Adjust.
15119
15120 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
15121
15122 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
15123 (finish_file): Check DECL_COMDAT instead of weak|one_only.
15124 (import_export_vtable): Use make_decl_one_only instead of
15125 comdat_linkage for win32 tweak.
15126 (import_export_decl): Likewise.
15127 * pt.c (mark_decl_instantiated): Likewise.
15128
15129 * decl2.c (finish_file): Lose handling of templates in pending_statics.
15130
15131 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
15132
15133 * decl2.c (finish_file): Lose call to expand_builtin_throw.
15134 * except.c (expand_builtin_throw): Remove.
15135 * cp-tree.h: Remove ptr_ptr_type_node.
15136 * decl.c: Likewise.
15137
15138 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
15139
15140 * decl.c (ptr_ptr_type_node): Define.
15141 (init_decl_processing): Initialize it.
15142 * cp-tree.h: Declare it.
15143 * exception.cc (__cp_exception_info): Use __get_eh_info.
15144 (__cp_push_exception): Likewise.
15145 (__cp_pop_exception): Likewise.
15146
15147 From Scott Snyder <snyder@d0sgif.fnal.gov>:
15148 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
15149 saved_pc.
15150 (init_exception_processing): Removed saved_pc initialization.
15151
15152 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
15153
15154 * pt.c (instantiate_decl): Defer all templates but inline functions.
15155
15156 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
15157
15158 * init.c (expand_vec_init): Don't fold a list of parameters.
15159
15160 * decl.c (copy_args_p): Handle copy elision for types with virtual
15161 bases.
15162 * call.c (build_over_call): Likewise.
15163
15164 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
15165
15166 * pt.c (lookup_template_function): Copy the template arguments,
15167 not just the list containing them, to the permanent obstack.
15168
15169 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
15170
15171 * except.c (expand_start_catch_block): suspend_momentary for the
15172 terminate handler.
15173
15174 * error.c (dump_decl): Handle LOOKUP_EXPR.
15175
15176 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
15177
15178 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
15179 permanent obstack if we are processing a template decl.
15180 * typeck.c (build_static_cast): Likewise.
15181 (build_const_cast): Likewise.
15182 (build_reinterpret_cast): Likewise.
15183
15184 * pt.c (coerce_template_parms): Coerce some expressions, even
15185 when processing_template_decl.
15186
15187 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15188
15189 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
15190 handling of pointer difference expressions.
15191
15192 * typeck.c (comp_target_types): Comparison of function/method types
15193 is independent of nptrs.
15194
15195 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
15196
15197 * pt.c (tsubst): Avoid creating pointer to reference and
15198 reference to reference types.
15199
15200 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
15201
15202 * parse.y (do_id): New nonterminal.
15203 (template_id): Use it.
15204
15205 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
15206
15207 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
15208 * spew.c (yylex): Don't do_identifier here.
15209 * decl2.c (build_expr_from_tree): Revert last change.
15210
15211 * decl2.c (build_expr_from_tree): Expand the name for a method call.
15212 * parse.y (object_template_id): Don't try to take the DECL_NAME.
15213
15214 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
15215
15216 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
15217 alloc_expr.
15218 * call.c (build_op_delete_call): Adjust.
15219
15220 * except.c (expand_end_catch_block): Lose rethrow region.
15221 (expand_start_catch_block): Likewise.
15222 (expand_end_catch_block): Don't expand_leftover_cleanups.
15223
15224 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15225
15226 * pt.c (tsubst): Remove tree_cons call (places redundant info into
15227 DECL_TEMPLATE_INSTANTIATION).
15228
15229 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
15230
15231 * tree.c (is_overloaded_fn): Handle getting a fn template.
15232 (really_overloaded_fn): Likewise.
15233 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
15234 * pt.c (check_explicit_specialization): Tweak.
15235 (determine_explicit_specialization): Tweak.
15236
15237 * tree.c, cp-tree.h (get_target_expr): New fn.
15238
15239 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
15240
15241 * pt.c (check_explicit_specialization): Fix misspelling in
15242 diagnostic: `preceeded'.
15243 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
15244 `conversiona'.
15245
15246 1997-12-02 Mark Mitchell <mmitchell@usa.net>
15247
15248 * pt.c (determine_explicit_specialization): Avoid an internal
15249 error for bad specializations.
15250
15251 * method.c (build_overload_value): Handle SCOPE_REF.
15252
15253 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
15254
15255 * class.c (prepare_fresh_vtable): Enable even more complex MI
15256 vtable names.
15257
15258 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
15259
15260 * exception.cc (__check_eh_spec): Optimize a bit.
15261
15262 * exception.cc (__cp_pop_exception): Lose handler arg.
15263 * except.c (do_pop_exception): Likewise.
15264 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
15265 (expand_end_catch_block): Likewise.
15266
15267 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15268
15269 * pt.c (check_explicit_specialization): Complain about using a
15270 template-id for a non-specialization.
15271
15272 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
15273
15274 * repo.c: Prototype rindex only if needed.
15275 * xref.c: Likewise.
15276
15277 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15278
15279 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
15280
15281 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
15282
15283 * typeck.c (build_const_cast): Handle references here instead of
15284 handing off to convert_to_reference.
15285
15286 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
15287 TerminateFunctionCall.
15288 (init_exception_processing): Likewise. Terminate et al are now
15289 the fns, not ADDR_EXPRs.
15290 (various): Lose redundant assemble_external calls.
15291 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
15292
15293 * cp-tree.h (struct lang_decl_flags): Add comdat.
15294 (DECL_COMDAT): New macro.
15295 * decl.c (duplicate_decls): Propagate it.
15296 (cp_finish_decl): Handle it.
15297 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
15298
15299 * class.c: Remove static pending_hard_virtuals.
15300 (add_virtual_function): Take pointers to pending_virtuals
15301 and pending_hard_virtuals.
15302 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
15303
15304 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
15305
15306 * decl2.c (import_export_vtable): If we support one_only but not
15307 weak symbols, mark instantiated template vtables one_only.
15308 (import_export_decl): Likewise for tinfo functions.
15309 (finish_vtable_vardecl): Also write out vtables from explicitly
15310 instantiated template classes.
15311 * pt.c (mark_class_instantiated): Revert last change.
15312
15313 * except.c (expand_throw): Call mark_used on the destructor.
15314
15315 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
15316
15317 * lex.c (lang_init): Enable flag_exceptions by default if no
15318 command line switch was specified.
15319
15320 1997-11-26 Mark Mitchell <mmitchell@usa.net>
15321
15322 * pt.c (unify): Handle `void' template parameters in
15323 specializations.
15324
15325 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
15326
15327 * rtti.c (build_dynamic_cast): Handle template case here.
15328 (build_dynamic_cast_1): Not here.
15329
15330 * typeck2.c (digest_init): Make copies where appropriate.
15331
15332 * decl2.c (delete_sanity): resolve_offset_ref.
15333
15334 * except.c: Call terminate without caching so many bits.
15335
15336 * except.c (expand_start_catch_block): Fix catching a reference
15337 to pointer.
15338
15339 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
15340
15341 * init.c (build_new): Copy size to the saveable obstack.
15342
15343 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
15344 TRY_CATCH_EXPR for now.
15345
15346 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
15347
15348 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
15349 has DECL_LANG_SPECIFIC.
15350
15351 * exception.cc (struct cp_eh_info): Add handlers field.
15352 (__cp_push_exception): Initialize it.
15353 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
15354 (__throw_bad_exception): Remove.
15355 * except.c (call_eh_info): Add handlers field.
15356 (get_eh_handlers): New fn.
15357 (push_eh_cleanup): Increment handlers.
15358
15359 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
15360
15361 * except.c (expand_start_eh_spec): Use the try/catch code.
15362 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
15363 doing everything inline.
15364 (init_exception_processing): throw_type_match now takes
15365 const void pointers.
15366 * exception.cc (__check_eh_spec): New fn.
15367 * inc/exception: Neither terminate nor unexpected return.
15368 * decl.c: Make const_ptr_type_node public.
15369 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
15370
15371 * except.c (expand_start_catch_block): We only need the rethrow
15372 region for non-sjlj exceptions.
15373 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
15374
15375 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
15376
15377 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
15378 (various.o): Likewise.
15379 * inc/new: Add placement deletes. Add throw specs for default new.
15380 * new.cc (set_new_handler): Move here from libgcc2.
15381 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
15382 (new): Move from libgcc2. Throw bad_alloc.
15383 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
15384 * decl.c (init_decl_processing): Update exception specs on new and
15385 delete.
15386
15387 * method.c (build_decl_overload_real): Don't mess with global
15388 placement delete.
15389
15390 * init.c (build_new): Check for null throw spec, not nothrow_t.
15391
15392 * decl.c (duplicate_decls): Don't complain about different exceptions
15393 from an internal declaration.
15394
15395 * call.c (build_op_delete_call): Fix check for member fns again.
15396
15397 * decl2.c (import_export_decl): Interface hackery affects
15398 virtual synthesized methods.
15399
15400 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15401
15402 * decl.c (start_decl): Don't just complain about a mismatched
15403 scope, fix it.
15404
15405 * decl.c (make_implicit_typename): Handle case where t is not
15406 actually from context.
15407 * tree.c (get_type_decl): Lose identifier case.
15408 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
15409 * parse.y (nonnested_type): Just use lookup_name.
15410 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
15411
15412 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
15413
15414 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
15415 T was built in C language context (for example, by
15416 output_func_start_profiler).
15417
15418 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
15419
15420 * decl.c (make_implicit_typename): New fn.
15421 (lookup_name_real): Use it. Use current_class_type as the context.
15422
15423 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
15424
15425 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
15426
15427 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
15428
15429 * friend.c (do_friend): Warn about non-template friends in templates.
15430
15431 * call.c (build_op_delete_call): Fix handling of inherited delete.
15432
15433 * search.c (dfs_record_inheritance): Ignore template type parms.
15434
15435 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
15436
15437 * call.c (build_new_op): Fix copy error.
15438 (build_op_new_call): New fn.
15439 (build_op_delete_call): New fn.
15440 * cp-tree.h: Declare them.
15441 * init.c (build_new): Use them. Support placement delete.
15442 (build_x_delete): Use build_op_delete_call.
15443 (build_delete): Likewise.
15444 * decl2.c (delete_sanity): Likewise.
15445 (coerce_delete_type): Don't complain about placement delete.
15446
15447 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
15448
15449 * call.c (build_new_function_call): Remove unused 'obj' parm.
15450 * cp-tree.h, typeck.c: Adjust.
15451
15452 * init.c (build_new): Make the cleanup last longer.
15453 (expand_vec_init): Call do_pending_stack_adjust.
15454
15455 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
15456
15457 * pt.c (do_type_instantiation): Fix typo.
15458 (mark_class_instantiated): If we support one_only but not weak
15459 symbols, don't mark this as known.
15460
15461 * init.c (build_new): Handle vec delete in EH cleanup.
15462
15463 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15464
15465 * call.c (build_method_call): Call complete_type before checking
15466 for destructor.
15467
15468 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
15469
15470 * decl.c (add_block_current_level): Delete.
15471 * init.c (build_vec_delete_1): Delete build_block and
15472 add_block_current_level calls.
15473
15474 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
15475
15476 * init.c (build_new): Handle freeing allocated memory when the
15477 constructor throws.
15478
15479 * call.c (build_new_method_call): Fix flags arg.
15480
15481 * pt.c (do_type_instantiation): Don't try to instantiate
15482 member templates.
15483 (mark_decl_instantiated): If we support one_only but not
15484 weak symbols, mark this one_only.
15485 * decl2.c (import_export_vtable): Don't defer handling of vtables
15486 if MULTIPLE_SYMBOL_SPACES.
15487
15488 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
15489
15490 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
15491
15492 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
15493
15494 * except.c (do_pop_exception): Return a value.
15495
15496 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
15497
15498 * call.c (build_new_method_call): Handle getting a
15499 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
15500 if we got template parms.
15501 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
15502 not just the args.
15503 * decl2.c (build_expr_from_tree): Tweak last change.
15504 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
15505 (maybe_fold_nontype_arg): Split out from tsubst_copy.
15506 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
15507
15508 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
15509
15510 * pt.c (tsubst_copy): Handle explicit template arguments in
15511 function calls.
15512 * typeck.c (build_x_function_call): Likewise.
15513 * decl2.c (build_expr_from_tree): Lookup function name if it
15514 hasn't been done.
15515
15516 * pt.c (tsubst): Instantiate template functions properly when
15517 template parameter does not appear in function arguments and return
15518 type.
15519 (comp_template_args): Handle member templates required by tsubst.
15520
15521 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
15522
15523 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
15524 previous change.
15525
15526 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15527
15528 * pt.c (coerce_template_parms): Tweak error message.
15529
15530 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
15531 return type defaults to `int', even if there are storage-class
15532 specifiers.
15533
15534 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
15535
15536 Complete nested exception support.
15537 * except.c (do_pop_exception): Split out...
15538 (push_eh_cleanup): From here. Handle the EH region by hand.
15539 (expand_start_catch_block): Add a new level for the catch parm.
15540 Move the rethrow region outside the two cleanup regions.
15541 Protect the initializer for the catch parm with terminate.
15542 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
15543 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
15544 popping off the middle of the stack.
15545 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
15546 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
15547 (build_cplus_new): Only wrap CALL_EXPRs.
15548 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
15549 the constructor call.
15550
15551 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15552
15553 * Make-lang.in (c++.distdir): Make inc subdirectory.
15554
15555 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
15556
15557 * decl2.c (finish_file): Put back some code.
15558
15559 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15560
15561 * decl2.c (finish_file): Remove redundant code.
15562 * method.c (emit_thunk): Don't let the backend defer generic thunks.
15563
15564 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
15565
15566 * except.c (call_eh_info): Split out...
15567 (push_eh_info): From here.
15568 (expand_builtin_throw): Use it.
15569 (expand_start_catch_block): Move region start back.
15570
15571 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
15572
15573 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
15574 (real_yylex): Record wide strings using target endianness, not host.
15575
15576 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
15577
15578 * repo.c (rindex): Add decl unconditionally.
15579 (get_base_filename, open_repo_file): Don't cast rindex.
15580 * xref.c (rindex): Add decl unconditionally.
15581 (index): Remove unused decl.
15582 (open_xref_file): Don't cast rindex.
15583
15584 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
15585
15586 * class.c (build_vbase_path): Propagate the result type properly.
15587
15588 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
15589
15590 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
15591 remaining use of saved_throw_type with a call to get_eh_type.
15592
15593 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
15594
15595 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
15596 (file_name_nondirectory): New function, doing the same as the macro.
15597 (set_typedecl_interface_info): Use it instead of the macro.
15598 (check_newline): Likewise.
15599 (handle_cp_pragma): Likewise.
15600
15601 * repo.c (get_base_filename): Cast result of rindex to char*.
15602 (open_repo_file): Likewise.
15603 * xref.c (open_xref_file): Likewise.
15604 * error.c (dump_char): Make its arg int, not char.
15605
15606 * except.c (push_eh_info): Pass the number of fields - 1 down, not
15607 the exact number of fields.
15608
15609 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
15610
15611 Support for nested exceptions.
15612 * tinfo2.cc (__is_pointer): New fn.
15613 * exception.cc (struct cp_eh_info): Define.
15614 (__cp_exception_info, __uncatch_exception): New fns.
15615 (__cp_push_exception, __cp_pop_exception): New fns.
15616 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
15617 Lose empty_fndecl.
15618 (init_exception_processing): Likewise. __eh_pc is now external.
15619 (push_eh_info): New fn.
15620 (get_eh_{info,value,type,caught}): New fns.
15621 (push_eh_cleanup): Just call __cp_pop_exception.
15622 (expand_start_catch_block): Use push_eh_info. Start the eh region
15623 sooner.
15624 (expand_end_eh_spec): Use push_eh_info.
15625 (expand_throw): Call __cp_push_exception to set up the exception info.
15626 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
15627 when we rethrow.
15628 (expand_builtin_throw): Don't refer to empty_fndecl.
15629
15630 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
15631
15632 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
15633
15634 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
15635
15636 * method.c (build_template_parm_names, build_decl_overload_real):
15637 Add static to definitions.
15638 * pt.c (add_to_template_args, note_template_header,
15639 processing_explicit_specialization, type_unification_real): Likewise.
15640 ({determine,check}_explicit_specialization): Use a single string for
15641 error messages.
15642
15643 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
15644
15645 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
15646 (expand_end_catch_block): Likewise.
15647 (expand_end_eh_spec): Likewise.
15648
15649 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
15650
15651 * decl.c (duplicate_decls): Handle template specializations
15652 correctly.
15653 * error.c (dump_function_name): Fix printing of specializations of
15654 member functions that are not member templates.
15655 * cp-tree.h (processing_specialization): Make global.
15656 * pt.c (processing_specialization): Likewise.
15657 * lex.c (cons_up_default_function): Save and restore
15658 processing_specialization to avoid confusion.
15659
15660 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
15661
15662 * decl.c (init_decl_processing): Give null_node unknown* type.
15663 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
15664 (common_type): Likewise.
15665 * error.c (args_as_string): Recognize null_node.
15666
15667 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15668
15669 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
15670 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
15671
15672 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
15673
15674 * Make-lang.in (g++): Include prefix.o.
15675
15676 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
15677
15678 * pt.c (determine_explicit_specialization): Initialize "dummy"
15679 to keep Purify quiet.
15680
15681 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
15682
15683 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
15684 (build_overload_int): Not here.
15685
15686 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
15687
15688 * class.c (build_type_pathname): Remove.
15689 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
15690
15691 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
15692
15693 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
15694 &&label GNU extension.
15695
15696 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
15697
15698 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
15699 so as to avoid incorrect manglings.
15700 * method.c (build_decl_overload_real): Don't mangle return types
15701 for constructors.
15702
15703 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15704
15705 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
15706 scratch_tree_cons): Define as macros for now.
15707 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
15708 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
15709 typeck2.c: Use them and the expression_obstack variants.
15710
15711 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15712
15713 * decl.c (store_return_init): Allow classes with explicit ctors to
15714 be used with the named return values extension.
15715
15716 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
15717
15718 * pt.c (instantiate_decl): Fix previous change.
15719
15720 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
15721
15722 * pt.c (tsubst): Fix thinko.
15723 (instantiate_decl): Really use the original template.
15724
15725 * call.c (build_new_method_call): Use simple constructor_name for
15726 error messages.
15727
15728 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
15729
15730 * method.c (build_underscore_int): Don't use ANSI specific
15731 features.
15732
15733 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
15734
15735 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
15736 for our key method; it might have been inlined by -O3.
15737
15738 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
15739
15740 * decl.c (make_typename_type): Do not try to call lookup_field for
15741 non-aggregate types.
15742
15743 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
15744
15745 * typeck.c (build_reinterpret_cast): Tweak.
15746
15747 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
15748
15749 * typeck.c (build_reinterpret_cast): Converting a void pointer
15750 to function pointer with a reinterpret_cast produces a warning
15751 if -pedantic is issued.
15752
15753 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15754
15755 * typeck.c (c_expand_return): Don't warn about returning a
15756 reference-type variable as a reference.
15757
15758 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
15759
15760 * method.c (build_static_name): Fix typo.
15761
15762 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
15763
15764 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
15765 OLDDECL before we try to do DECL_USE_TEMPLATE.
15766
15767 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
15768
15769 * decl.c (duplicate_decls): Don't warn about template instances.
15770
15771 * typeck.c (mark_addressable): Lose ancient code that unsets
15772 DECL_EXTERNAL.
15773
15774 * pt.c (do_decl_instantiation): Lose support for instantiating
15775 non-templates.
15776
15777 * call.c (build_new_function_call): Fix handling of null explicit
15778 template args.
15779 (build_new_method_call): Likewise.
15780
15781 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
15782
15783 * method.c (build_underscore_int): Fix typo.
15784
15785 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
15786
15787 * tree.c (print_lang_statistics): #if 0 call to
15788 print_inline_obstack_statistics until its definition is checked in.
15789
15790 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
15791
15792 * decl2.c (finish_file): Move dump_tree_statistics to end.
15793
15794 * pt.c (instantiate_decl): Look for the original template.
15795 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
15796 of member templates.
15797
15798 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
15799
15800 * Makefile.in (g++FAQ.*): New rules.
15801 (CONFLICTS): Update.
15802 * g++FAQ.texi: Moved from libg++.
15803
15804 * parse.y (PFUNCNAME): Only specify the type once.
15805
15806 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
15807
15808 * lex.c (real_yylex): Clean up the code to fully behave the way
15809 the c-lex.c parser does for complex and real numbers.
15810
15811 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
15812
15813 * method.c (build_decl_overload_real): Reformat.
15814
15815 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
15816
15817 * method.c (synthesize_method): If at_eof, determine our linkage.
15818
15819 1997-09-29 Paul Eggert <eggert@twinsun.com>
15820
15821 * lex.c (real_yylex): Treat `$' just like `_', except issue a
15822 diagnostic if !dollars_in_ident or if pedantic.
15823
15824 * lang-specs.h (@c++): -ansi no longer implies -$.
15825
15826 * decl2.c (lang_decode_option):
15827 -traditional and -ansi now do not mess with
15828 dollars_in_ident.
15829
15830 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
15831
15832 * Makefile.in (parse.o, decl.o): Also depend on
15833 $(srcdir)/../except.h $(srcdir)/../output.h.
15834 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
15835 $(srcdir)/../except.h $(srcdir)/../output.h.
15836 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
15837 ../insn-codes.h.
15838
15839 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
15840
15841 * expr.c (cplus_expand_expr): Make it static.
15842
15843 * decl2.c, init.c, typeck.c: Include "expr.h".
15844 (expand_expr): Use proper values when calling the function.
15845
15846 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
15847
15848 * lang-options.h: New -Wold-style-cast flag.
15849 * cp-tree.h (warn_old_style_cast): New variable.
15850 * decl2.c (warn_old_style_cast): Likewise.
15851 (lang_decode_option): Support -Wold-style-cast.
15852 (reparse_absdcl_as_casts): Produce old-style-cast warning.
15853
15854 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15855
15856 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
15857 TREE_USED, reset value based on already_used.
15858
15859 * init.c (expand_member_init): Revert change.
15860
15861 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
15862
15863 * cp-tree.h, decl.c, decl2.c, pt.c:
15864 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
15865
15866 * decl2.c (lang_decode_option): Add missing ;.
15867
15868 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
15869
15870 * friend.c (do_friend): Disable injection for all template-derived
15871 decls.
15872 * decl2.c (lang_decode_option): Handle -fguiding-decls.
15873 * parse.y (notype_template_declarator): New nonterminal.
15874 (direct_notype_declarator): Use it.
15875 (complex_direct_notype_declarator): Likewise.
15876 (object_template_id): Accept any kind of identifier after TEMPLATE.
15877 (notype_qualified_id): Don't add template declarators here.
15878
15879 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
15880
15881 * call.c (add_template_candidate): Add explicit_targs parameter.
15882 (build_scoped_method_call): Use it.
15883 (build_overload_call_real): Likewise.
15884 (build_user_type_conversion_1): Likewise.
15885 (build_new_function_call): Likewise.
15886 (build_object_call): Likewise.
15887 (build_new_op): Likewise.
15888 (build_new_method_call): Likewise.
15889 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
15890 (build_new_method_call): Likewise.
15891
15892 * class.c (finish_struct_methods): Add specialization pass to
15893 determine which methods were specializing which other methods.
15894 (instantiate_type): Handle TEMPLATE_ID_EXPR.
15895
15896 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
15897
15898 * cp-tree.h (name_mangling_version): New variable.
15899 (flag_guiding_decls): Likewise.
15900 (build_template_decl_overload): New function.
15901 (begin_specialization): Likewise.
15902 (reset_specialization): Likewise.
15903 (end_specialization): Likewise.
15904 (determine_explicit_specialization): Likewise.
15905 (check_explicit_specialization): Likewise.
15906 (lookup_template_function): Likewise.
15907 (fn_type_unification): Add explicit_targs parameter.
15908 (type_unification): Likewise.
15909
15910 * decl.c (duplicate_decls): Add smarts for explicit
15911 specializations.
15912 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
15913 specializations.
15914 (grokfndecl): Call check_explicit_specialization.
15915
15916 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
15917 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
15918 (check_classfn): Handle specializations.
15919
15920 * error.c (dump_function_name): Print specialization arguments.
15921
15922 * friend.c (do_friend): Don't call pushdecl for template
15923 instantiations.
15924
15925 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
15926
15927 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
15928 and -fno-guiding-decls.
15929
15930 * lex.c (identifier_type): Return PFUNCNAME for template function
15931 names.
15932
15933 * method.c (build_decl_overload_real): New function.
15934 (build_template_parm_names): New function.
15935 (build_overload_identifier): Use it.
15936 (build_underscore_int): New function.
15937 (build_overload_int): Use it. Add levels for template
15938 parameters.
15939 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
15940 (build_overload_nested_names): Handle template type parameters.
15941 (build_template_decl_overload): New function.
15942
15943 * parse.y (YYSTYPE): New ntype member.
15944 (nested_name_specifier): Use it.
15945 (nested_name_specifier_1): Likewise.
15946 (PFUNCNAME): New token.
15947 (template_id, object_template_id): New non-terminals.
15948 (template_parm_list): Note specializations.
15949 (template_def): Likewise.
15950 (structsp): Likewise.
15951 (fn.def2): Handle member template specializations.
15952 (component_decl_1): Likewise.
15953 (direct_notype_declarator): Handle template-ids.
15954 (component_decl_1): Likewise.
15955 (direct_notype_declarator): Handle template-ids.
15956 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
15957
15958 * pt.c (processing_specializations): New variable.
15959 (template_header_count): Likewise.
15960 (type_unification_real): New function.
15961 (processing_explicit_specialization): Likewise.
15962 (note_template_header): Likewise.
15963 (is_member_template): Handle specializations.
15964 (end_template_decl): Call reset_specialization.
15965 (push_template_decl): Handle member template specializations.
15966 (tsubst): Likewise.
15967 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
15968 (instantiate_template): Handle specializations.
15969 (instantiate_decl): Likewise.
15970 (fn_type_unification): Handle explicit_targs.
15971 (type_unification): Likewise. Allow incomplete unification
15972 without an error message, if allow_incomplete.
15973 (get_bindings): Use new calling sequence for fn_type_unification.
15974
15975 * spew.c (yylex): Handle PFUNCNAME.
15976
15977 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
15978 (really_overloaded_fn): Likewise.
15979 (get_first_fn): Handle function templates.
15980
15981 * typeck.c (build_x_function_call): Use really_overloaded_fn.
15982 Handle TEMPLATE_ID_EXPR.
15983 (build_x_unary_op): Likewise.
15984 (build_unary_op): Likewise.
15985 (mark_addressable): Templates whose address is taken are marked
15986 as used.
15987
15988 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
15989
15990 * decl.c (init_decl_processing): Declare __builtin_constant_p as
15991 accepting any kind of type, not only int.
15992
15993 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
15994
15995 * search.c (get_matching_virtual): Notice virtual bases when sorrying
15996 about covariant returns.
15997
15998 * parse.y (member_init): Also imply typename here. Remove ancient
15999 extension for initializing base members.
16000
16001 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
16002
16003 Handle multi-level typenames and implicit typename in base list.
16004 * parse.y (typename_sub{,[0-2]}): New rules.
16005 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
16006 (nonnested_type): New rule.
16007 (complete_type_name): Use it.
16008 (base_class.1): Use typename_sub and nonnested_type.
16009 (nested_name_specifier): Don't elide std:: here.
16010 * decl.c (make_typename_type): Handle getting a type for NAME.
16011 (lookup_name_real): Turn std:: into :: here.
16012
16013 Rvalue conversions were removed in London.
16014 * call.c (is_subseq): Don't consider lvalue transformations.
16015 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
16016 (joust): Re-enable ?: kludge.
16017
16018 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
16019
16020 * decl.c (start_function): Up warning of no return type to be a
16021 pedwarn.
16022
16023 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16024
16025 * init.c (expand_member_init): Don't set TREE_USED.
16026 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
16027 set,don't clear TREE_USED wholesale.
16028
16029 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
16030
16031 * call.c (build_over_call): Do require_complete_type before
16032 build_cplus_new.
16033
16034 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
16035
16036 * search.c (lookup_field): Call complete_type in all cases.
16037
16038 * decl.c (finish_function): Just warn about flowing off the end.
16039
16040 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16041
16042 * decl.c (grokparms): Don't bash a permanent list node if we're
16043 in a function.
16044
16045 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
16046
16047 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
16048
16049 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
16050
16051 * call.c (build_new_op): Give better error for syntactically
16052 correct, but semantically invalid, use of undeclared template.
16053
16054 * call.c (compare_qual): Handle pmfs.
16055
16056 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
16057 after the exception spec.
16058
16059 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
16060
16061 * call.c (null_ptr_cst_p): Integer type, not integral type.
16062
16063 * call.c (joust): Disable warnings until they can be moved to the
16064 right place.
16065
16066 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
16067
16068 * Makefile.in, config-lang.in: Convert to autoconf.
16069
16070 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
16071
16072 * decl.c (lookup_name_real): Add implicit 'typename' to types from
16073 base classes.
16074
16075 * pt.c (most_specialized_class): Fix typo.
16076 (tsubst): Move constant folding to TREE_VEC case.
16077
16078 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
16079
16080 * pt.c (do_poplevel): Don't warn about unused local variables
16081 while processing_template_decl since we don't always know whether
16082 or not they will need constructing/destructing.
16083
16084 * pt.c (uses_template_parms): Check the values of an enumeration
16085 type to make sure they don't depend on template parms.
16086
16087 * decl.c (make_typename_type): Don't lookup the field if the
16088 context uses template parms, even if we're not
16089 processing_template_decl at the moment.
16090
16091 * pt.c (coerce_template_parms): Avoid looking at the
16092 TYPE_LANG_DECL portion of a typename type, since there won't be
16093 one.
16094 (tsubst): Do constant folding as necessary to make sure that
16095 arguments passed to lookup_template_class really are constants.
16096
16097 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
16098
16099 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
16100 * decl2.c (finish_file): Only register exception tables if we
16101 need to.
16102
16103 * decl.c (init_decl_processing): Add __builtin_[fs]p.
16104
16105 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
16106
16107 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
16108
16109 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
16110
16111 * error.c (dump_decl): Avoid crashing when presented with a
16112 uninitialized constant, as can occur with a template parameter.
16113 (dump_expr): Make sure that there are enough levels of
16114 current_template_parms before we start diving through them.
16115
16116 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
16117
16118 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
16119 c-typeck.c.
16120
16121 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16122
16123 * except.c (expand_throw): Call build_delete for all
16124 exception types, not just objects with destructors.
16125
16126 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
16127
16128 * decl.c (current_local_enum): Remove static.
16129 * pt.c (tsubst_enum): Save and restore value of current_local_enum
16130 in case template is expanded in enum decl.
16131 (instantiate_class_template): Use new tsubst_enum signature.
16132 (tsubst_expr): Likewise.
16133
16134 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
16135
16136 * pt.c (begin_member_template_processing): Take a function as
16137 argument, not a set of template arguments. Use the template
16138 parameters, rather than the arguments. Handle non-type parameters
16139 correctly. Push a binding level for the parameters so that multiple
16140 member templates using the same parameter names can be declared.
16141 (end_member_template_processing): Pop the binding level.
16142 (push_template_decl): Mark member templates as static when
16143 appropriate.
16144
16145 * lex.c (do_pending_inlines): Pass the function, not its template
16146 arguments, to begin_member_template_processing.
16147 (process_next_inline): Likewise.
16148 (do_pending_defargs): Likewise.
16149
16150 * error.c (dump_expr): Obtain the correct declaration for a
16151 TEMPLATE_CONST_PARM.
16152
16153 * call.c (add_template_conv_candidate): New function.
16154 (build_object_call): Handle member templates, as done in the other
16155 build_ functions.
16156
16157 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
16158
16159 * decl.c (replace_defag): Undo previous change.
16160 * lex.c (do_pending_defargs): Deal with member templates.
16161
16162 * pt.c (is_member_template): Avoid crashing when passed a
16163 non-function argument.
16164
16165 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
16166
16167 * class.c (grow_method): Remove check for redeclaration.
16168
16169 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
16170
16171 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
16172 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
16173 (PRIMARY_TEMPLATE_P): Use it.
16174 * call.c (build_overload_call_real): Use it.
16175 * class.c (instantiate_type): Likewise.
16176 * decl.c (decls_match): Likewise.
16177 * method.c (build_overload_identifier): Likewise.
16178 * pt.c (push_template_decl): Likewise.
16179 (classtype_mangled_name): Likewise.
16180 (lookup_template_class): Likewise.
16181
16182 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
16183 DECL_NTPARMS to conform to usage elsewhere.
16184 * call.c (add_template_candidate): Likewise.
16185 * class.c (instantiate_type): Likewise.
16186 * pt.c (instantiate_template): Likewise.
16187 (get_bindings): Likewise.
16188
16189 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
16190 is_member_template.
16191
16192 * pt.c (unify): Undo changes to allow multiple levels of template
16193 parameters.
16194 (type_unification): Likewise.
16195 (fn_type_unification): Likewise.
16196 (get_class_bindings): Likewise.
16197 * cp-tree.h (Likewise).
16198
16199 * decl.c (replace_defarg): Check that the type of the default
16200 parameter does not invlove a template type before complaining
16201 about the initialization.
16202
16203 * error.c (dump_expr): Deal with template constant parameters in
16204 member templates correctly.
16205
16206 * pt.c (is_member_template): Deal with class specializations
16207 correctly.
16208 (tsubst): Handle "partial instantiation" of member templates
16209 correctly.
16210
16211 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
16212
16213 * pt.c (type_unification): Change calling sequence to allow for
16214 multiple levels of template parameters.
16215 (tsubst_expr): Likewise.
16216 (tsubst): Likewise.
16217 (tsubst_copy): Likewise.
16218 (instantiate_template): Likewise.
16219 (unify): Likewise.
16220 * call.c (build_overload_call_real): Use it.
16221 (add_builtin_candidate): Use it.
16222 (build_new_method_call): Use it.
16223 * class.c (instantiate_type): Use it.
16224 * decl.c (grokdeclarator): Use it.
16225 * decl2.c (finish_file): Use it.
16226 * method.c (build_overload_identifier): Use it.
16227
16228 * call.c (add_template_candidate): Add additional parameter for
16229 the function return type. Call fn_type_unification istead of
16230 type_unification.
16231 (build_user_type_conversion_1): Handle member templates.
16232 (build_new_function_call): Likewise.
16233 (build_new_op): Likewise.
16234 (build_new_method_call): Likewise.
16235
16236 * class.c (grow_method): Don't give an error message indicating
16237 that two member templates with the same name are ambiguous.
16238 (finish_struct): Treat member template functions just like member
16239 functions.
16240
16241 * cp-tree.h (check_member_template): Add declaration.
16242 (begin_member_template_processing): Likewise.
16243 (end_member_template_processing): Likewise.
16244 (fn_type_unification): Likewise.
16245 (is_member_template): Likewise.
16246 (tsubst): Change prototype.
16247 (tsubst_expr): Likewise.
16248 (tsubst_copy): Likewise.
16249 (instantiate_template): Likewise.
16250 (get_bindings): Likewise.
16251
16252 * decl.c (decls_match): Handle multiple levels of template
16253 parameters.
16254 (pushdecl): Handle template type params just like other type
16255 declarations.
16256 (push_class_level_binding): Return immediately if the
16257 class_binding_level is NULL.
16258 (grokfndecl): If check_classfn() returns a member_template, use
16259 the result of the template, not the template itself.
16260
16261 * decl2.c (check_member_template): New function. Check to see
16262 that the entity declared to be a member template can be one.
16263 (check_classfn): Allow redeclaration of member template functions
16264 with different types; the new functions can be specializations or
16265 explicit instantiations.
16266
16267 * error.c (dump_decl): Handle multiple levels of template
16268 parameters.
16269 (dump_function_decl): Update to handle function templates.
16270
16271 * lex.c (do_pending_inlines): Set up template parameter context
16272 for member templates.
16273 (process_next_inline): Likewise.
16274
16275 * method.c (build_overload_identifier): Adjust for multiple levels
16276 of template parameters.
16277
16278 * parse.y (fn.def2): Add member templates.
16279 (component_decl_1): Likewise.
16280
16281 * pt.c (begin_member_template_processing): New function.
16282 (end_member_template_processing): Likewise.
16283 (is_member_template): Likewise.
16284 (fn_type_unification): Likewise.
16285 (current_template_parms): Return a vector of all the template
16286 parms, not just the innermost level of parms.
16287 (push_template_decl): Deal with the possibility of member
16288 templates.
16289 (lookup_template_class): Likewise.
16290 (uses_template_parms): Likewise.
16291 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
16292 TEMPLATE_CONST_PARM to deal with multiple levels of template
16293 arguments. Add processing of TEMPLATE_DECL to produce new
16294 TEMPLATE_DECLs from old ones.
16295 (do_decl_instantiation): Handle member templates.
16296
16297 * search.c (lookup_fnfields_1): Handle member template conversion
16298 operators.
16299
16300 * tree.c (cp_tree_equal): Check the levels, as well as the
16301 indices, of TEMPLATE_CONST_PARMs.
16302
16303 * typeck.c (comptypes): Check the levels, as well as the indices,
16304 fo TEMPLATE_TYPE_PARMs.
16305 (build_x_function_call): Treat member templates like member
16306 functions.
16307
16308 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16309
16310 * typeck.c (c_expand_return): Always convert_for_initialization
16311 before checking for returning a pointer to local.
16312
16313 * pt.c (type_unification): If strict and the function parm doesn't
16314 use template parms, just compare types.
16315
16316 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
16317
16318 * method.c (build_overloaded_value): Replace direct call
16319 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
16320
16321 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
16322
16323 * typeck.c (convert_arguments): Don't arbitrarily choose the first
16324 of a set of overloaded functions.
16325
16326 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
16327
16328 * lex.c (real_yylex): Don't elide __FUNCTION__.
16329
16330 * method.c (build_overload_value): Add in_template parm.
16331 (build_overload_int): Likewise.
16332 (build_overload_identifier): Pass it.
16333
16334 * decl.c (duplicate_decls): Don't bash a previous template
16335 definition with a redeclaration.
16336
16337 * pt.c (unify): float doesn't match double.
16338
16339 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
16340 TYPE_DECL. Handle getting non-template types.
16341 * parse.y (explicit_instantiation): Use typespec instead of
16342 aggr template_type.
16343
16344 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
16345
16346 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
16347
16348 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
16349
16350 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
16351 (compare_ics): Likewise.
16352
16353 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
16354
16355 * call.c (joust): Warn about choosing one conversion op over
16356 another because of 'this' argument when the other return type is
16357 better.
16358 (source_type): New fn.
16359
16360 * call.c (build_new_op): Strip leading REF_BIND from first operand
16361 to builtin operator.
16362
16363 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
16364 use its RTL.
16365
16366 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
16367
16368 * call.c (null_ptr_cst_p): Remove support for (void*)0.
16369
16370 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
16371
16372 * typeck.c (expand_target_expr): Make definition match declaration.
16373
16374 * class.c (get_basefndecls): Make definition match declaration.
16375
16376 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
16377
16378 * input.c (sub_getch): Eventually give up and release the input file.
16379
16380 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
16381 right place.
16382
16383 * call.c (joust): Tweak message.
16384
16385 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
16386
16387 * error.c (type_as_string): Put const/volatile on template type
16388 parameters where appropriate.
16389
16390 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
16391
16392 * call.c (strictly_better): Make arguments unsigned ints.
16393
16394 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
16395
16396 * lex.c (real_yylex): Refer to __complex instead of complex.
16397
16398 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
16399
16400 * lex.c (real_yylex): Don't use getc directly.
16401
16402 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
16403
16404 * call.c (is_subseq): Don't try to be clever.
16405
16406 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
16407
16408 * parse.y, pt.c: Include "except.h".
16409 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
16410 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
16411 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
16412 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
16413 prototyping.
16414
16415 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
16416
16417 * decl2.c (mark_vtable_entries): Instead of replacing pure
16418 virtuals with a reference to __pure_virtual, copy the decl and
16419 change the RTL.
16420
16421 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
16422
16423 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
16424
16425 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
16426
16427 * pt.c (instantiate_class_template): Call repo_template_used
16428 before finish_prevtable_vardecl.
16429
16430 * call.c (is_subseq): New fn.
16431 (compare_ics): Use it.
16432
16433 * repo.c (finish_repo): Don't crash on no args.
16434
16435 * parse.y (named_complex_class_head_sans_basetype): Handle
16436 explicit global scope.
16437 * decl2.c (handle_class_head): New fn.
16438
16439 * pt.c (unify): Add CONST_DECL case.
16440
16441 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16442
16443 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
16444
16445 * cp-tree.h (report_type_mismatch): Add prototype.
16446 * call.c (build_overload_call_real): Remove erroneous fourth
16447 argument to report_type_mismatch.
16448 (build_user_type_conversion_1): Remove erroneous second arg to
16449 tourney.
16450 (build_new_function_call): Likewise.
16451 (build_object_call): Likewise.
16452 (build_new_op): Likewise.
16453 (build_new_method_call): Likewise.
16454
16455 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16456
16457 * error.c (dump_decl): Don't bother processing a function with no
16458 DECL_LANG_SPECIFIC.
16459
16460 * method.c (emit_thunk): Call init_function_start in the macro case.
16461
16462 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
16463
16464 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
16465 defined and used to set flag_vtable_thunks.
16466
16467 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
16468
16469 * parse.y: Don't clear the inlines from their obstack until they've
16470 all been processed.
16471
16472 * decl.c (duplicate_decls): Don't complain about exception
16473 specification mismatch if flag_exceptions is off.
16474
16475 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
16476
16477 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
16478
16479 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
16480
16481 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
16482 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
16483 Include <stdio.h> before include files that formerly used STDIO_PROTO.
16484
16485 * decl.c, g++spec.c, lex.c, method.c, repo.c:
16486 Include "config.h" first, as per autoconf manual.
16487
16488 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
16489
16490 * decl.c (duplicate_decls): Tweak wording.
16491 * lex.c (do_pending_defargs): Don't die if we see a default arg
16492 that isn't a DEFAULT_ARG.
16493 * error.c (dump_expr): Handle DEFAULT_ARG.
16494
16495 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
16496 * lang-options.h: Add -fhandle-exceptions.
16497
16498 * class.c (build_vtable): Vtables are artificial.
16499 (prepare_fresh_vtable): Likewise.
16500
16501 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
16502
16503 * cvt.c (ocp_convert): After converting to the target type, set
16504 LOOKUP_NO_CONVERSION.
16505
16506 * call.c (joust): Warn about potentially confusing promotion rules
16507 with -Wsign-promo.
16508 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
16509
16510 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
16511
16512 * exception.cc: Declare __terminate_func with noreturn attribute.
16513
16514 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
16515
16516 * parse.y: Break out eat_saved_input, handle errors.
16517 (function_try_block): Use compstmt instead of compstmt_or_error.
16518
16519 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
16520
16521 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
16522
16523 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16524
16525 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
16526 existence of cc1plus check whether $(LANGUAGES) contains C++.
16527
16528 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16529
16530 * method.c (do_build_copy_constructor): When copying an anonymous
16531 union member loop around to handle nested anonymous unions. Use
16532 the offset of the member relative to the outer structure, not the
16533 union.
16534
16535 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
16536
16537 * call.c (resolve_args): New fn.
16538 (build_new_function_call): Use it.
16539 (build_object_call): Likewise.
16540 (build_new_method_call): Likewise.
16541
16542 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
16543
16544 * call.c (build_over_call): tsubst all default parms from templates.
16545
16546 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16547
16548 * decl.c (struct cp_function): Add static_labelno.
16549 (push_cp_function_context): Save it.
16550 (pop_cp_function_context): Restore it.
16551
16552 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
16553
16554 * typeck.c (build_component_ref_1): Convert from reference.
16555
16556 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16557
16558 * parse.y (current_declspecs, prefix_attributes): Initialize to
16559 NULL_TREE.
16560
16561 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
16562 before we try to force it to be a TREE_LIST.
16563 (decl): Make sure $1.t is non-nil.
16564
16565 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
16566
16567 * pt.c (uses_template_parms): Handle template first-parse codes.
16568
16569 * decl.c (cp_finish_decl): Only warn about user-defined statics.
16570
16571 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
16572
16573 * pt.c (unify): Handle BOOLEAN_TYPE.
16574
16575 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
16576 * pt.c (tsubst): Don't set it.
16577 * call.c (build_over_call): Use uses_template_parms.
16578
16579 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
16580
16581 * method.c (build_overload_nested_name): Use static_labelno
16582 instead of var_labelno.
16583 (build_qualified_name): New fn.
16584 (build_overload_name): Split out from here.
16585 (build_static_name): Use build_qualified_name.
16586 * decl.c (cp_finish_decl): Statics in extern inline functions
16587 have comdat linkage.
16588 (start_function): Initialize static_labelno.
16589
16590 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16591
16592 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
16593 before "all member functions in class [] are private".
16594
16595 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
16596
16597 * lex.c (do_scoped_id): convert_from_reference.
16598 * init.c (build_offset_ref): Likewise.
16599
16600 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
16601
16602 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
16603
16604 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
16605
16606 * typeck.c (get_member_function_from_ptrfunc): Promote index
16607 before saving it.
16608
16609 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
16610
16611 * tree.c (layout_basetypes): Move non-virtual destructor warning.
16612 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
16613
16614 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
16615
16616 * decl.c (grokdeclarator): Call add_defarg_fn for the function
16617 type, too.
16618 * lex.c (add_defarg_fn): Adjust.
16619 (do_pending_defargs): Adjust. Don't skip the first parm.
16620
16621 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
16622
16623 * decl.c (build_enumerator): Global enumerators are also readonly.
16624
16625 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
16626 (build_dynamic_cast): Call it and convert_from_reference.
16627
16628 * lex.c (add_defarg_fn): New fn.
16629 (snarf_defarg): Don't add to defarg_types.
16630 (do_pending_defargs): Lose defarg_types. All fns we process now
16631 have defargs.
16632 * decl.c (grokfndecl): Call add_defarg_fn.
16633
16634 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
16635 * cp-tree.def: Add DEFAULT_ARG.
16636 * spew.c (yylex): Call snarf_defarg as appropriate.
16637 * parse.y: New tokens DEFARG and DEFARG_MARKER.
16638 (defarg_again, pending_defargs, defarg, defarg1): New rules.
16639 (structsp): Use pending_defargs.
16640 (parms, full_parm): Use defarg.
16641 * lex.c (init_lex): Initialize inline_text_firstobj.
16642 (do_pending_inlines): Never pass the obstack to feed_input.
16643 (process_next_inline): Call end_input instead of restore_pending_input.
16644 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
16645 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
16646 * input.c (end_input): New fn.
16647 (sub_getch): At the end of some fed input, just keep returning EOF
16648 until someone calls end_input.
16649 Remove 'obstack' field from struct input_source.
16650 * decl.c (grokparms): Handle DEFAULT_ARG.
16651 (replace_defarg): New fn.
16652 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
16653
16654 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
16655
16656 * call.c (implicit_conversion): If nothing else works, try binding
16657 an rvalue to a reference.
16658
16659 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
16660
16661 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
16662 ifndef for Cygwin32 to include SIGSEGV.
16663
16664 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
16665
16666 * class.c (finish_struct_1): Only complain about pointers without
16667 copy stuff if there are any constructors.
16668
16669 * rtti.c (build_dynamic_cast): Call complete_type on the types.
16670
16671 * decl.c (grokfndecl): If the function we chose doesn't actually
16672 match, die.
16673
16674 * decl2.c (grokclassfn): Don't specify 'const int' for the
16675 artificial destructor parm.
16676
16677 * pt.c (type_unification): If we are called recursively, nothing
16678 decays.
16679
16680 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
16681
16682 * decl.c (init_decl_processing): Stop trying to catch signals
16683 other than SIGABRT since the Cygwin32 library doesn't support
16684 them correctly yet. This fixes a situation in which g++ causes
16685 a hang on SIGSEGVs and other such signals in our Win32-hosted
16686 tools.
16687
16688 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
16689
16690 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
16691
16692 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
16693
16694 * typeck2.c (store_init_value): Always return the value if our
16695 type needs constructing.
16696
16697 * method.c (hack_identifier): Convert class statics from
16698 reference, too.
16699
16700 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
16701
16702 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
16703
16704 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
16705
16706 * typeck.c (c_expand_return): Make sure we clean up temporaries at
16707 the end of return x;
16708
16709 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16710
16711 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
16712
16713 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
16714
16715 * except.c (expand_builtin_throw): Add support
16716 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
16717
16718 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
16719
16720 * repo.c (extract_string): Null-terminate.
16721
16722 * cp-tree.h (TI_SPEC_INFO): New macro.
16723 (CLASSTYPE_TI_SPEC_INFO): New macro.
16724 * pt.c (push_template_decl): Correctly determine # of template parms
16725 for partial specs.
16726
16727 * call.c (compare_ics): Really fix 'this' conversions.
16728
16729 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
16730 non-template fn.
16731
16732 * pt.c (push_template_decl): Complain about mismatch in # of
16733 template parms between a class template and a member template.
16734
16735 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
16736
16737 * method.c (synthesize_method): You can't call
16738 function_cannot_inline_p after finish_function.
16739 * decl.c (finish_function): Turn on flag_inline_functions and turn
16740 off DECL_INLINE before handing a synthesized method to the
16741 backend.
16742
16743 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
16744
16745 * method.c (synthesize_method): Remove July 30 change to never set
16746 DECL_INLINE if at_eof.
16747
16748 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
16749
16750 * xref.c (GNU_xref_member): Ensure that the node has a
16751 decl_lang_specific part before checking DECL_FRIEND_P.
16752
16753 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
16754
16755 * pt.c (instantiate_class_template): Diagnose non-class types used
16756 as bases.
16757
16758 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
16759
16760 * typeck.c (build_conditional_expr): Use convert_for_initialization
16761 instead of convert_and_check.
16762
16763 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16764
16765 * parse.y (typespec): Don't pedwarn for typeof.
16766
16767 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
16768
16769 * repo.c (finish_repo): Only check changes if we would write a
16770 repo file.
16771
16772 * call.c (compare_ics): Fix handling of 'this' conversions.
16773
16774 * pt.c (do_decl_instantiation): Support static data too. Rename
16775 from do_function_instantiation.
16776 * cp-tree.h: Adjust.
16777 * parse.y: Adjust.
16778
16779 * repo.c (extract_string): New fn.
16780 (get_base_filename): Use it.
16781 (init_repo): Compare old args with current args.
16782
16783 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
16784
16785 * Makefile.in, Make-lang.in: Protect C-ls with a comment
16786 character, idea from Paul Eggert <eggert@twinsun.com>.
16787
16788 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
16789
16790 * typeck.c (c_expand_return): Be more persistent in looking for
16791 returned temps.
16792
16793 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
16794 pointer to reference.
16795
16796 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
16797
16798 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
16799
16800 * init.c (build_member_call, build_offset_ref):
16801 Use do_scoped_id instead of do_identifier.
16802
16803 * cvt.c (convert): Remove bogosity.
16804
16805 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16806
16807 * cvt.c (build_up_reference): Do checks of ARGTYPE and
16808 TARGET_TYPE before trying to use get_binfo.
16809
16810 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
16811
16812 * cvt.c (build_up_reference): Call get_binfo to get access control.
16813
16814 * decl2.c (import_export_decl): If we don't support weaks, leave
16815 statics undefined.
16816
16817 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
16818
16819 * except.c (expand_builtin_throw): Add support for machines that
16820 cannot access globals after throw's epilogue when
16821 -fno-sjlj-exceptions is used.
16822
16823 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
16824
16825 * parse.y: 'std::' becomes '::'.
16826 * lex.c (real_yylex): Remove 'namespace' warning.
16827 * init.c (build_member_call): Ignore 'std::'.
16828 (build_offset_ref): Likewise.
16829 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
16830 (do_toplevel_using_decl): Ignore 'using std::whatever'.
16831 * decl.c (push_namespace): Just sorry.
16832 (pop_namespace): Nop.
16833 (init_decl_processing): Declare std namespace.
16834
16835 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
16836
16837 * search.c (push_class_decls): A name which ambiguously refers to
16838 several instantiations of the same template just refers to the
16839 template.
16840
16841 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
16842
16843 * decl.c (build_enumerator): Fix problem with unsigned long
16844 enumerated values being smashed to ints, causing overflow
16845 when computing next enumerated value (for enum values around
16846 MAX_VAL).
16847
16848 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
16849
16850 * typeck.c (build_component_ref): Only call mark_used on a decl.
16851
16852 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16853
16854 * typeck.c (build_c_cast): Make the check for a ptr to function
16855 more specific before possible default_conversion call.
16856
16857 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
16858
16859 * except.c (expand_exception_blocks): Simplify and fix and make
16860 sure we don't end a region in a sequence, as expand_end_bindings
16861 doesn't like it.
16862
16863 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
16864
16865 * except.c (init_exception_processing): Mark terminate as not
16866 returning so that the optimizer can optimize better.
16867
16868 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
16869
16870 * cvt.c (convert): Don't do any extra work, if we can avoid it
16871 easily.
16872
16873 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
16874
16875 * *.[chy]: Change cp_convert to ocp_convert, change convert to
16876 cp_convert. convert is now reserved for the backend, and doesn't
16877 have the semantics a frontend person should ever want.
16878
16879 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
16880
16881 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
16882 Lose -traditional support.
16883
16884 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
16885
16886 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
16887
16888 * parse.y (self_reference): Do it for templates, too.
16889 * class.c (pushclass): Don't overload_template_name; the alias
16890 generated by build_self_reference serves the same purpose.
16891
16892 * tree.c (list_hash): Make static, take more args.
16893 (list_hash_lookup): Likewise.
16894 (list_hash_add): Make static.
16895 (list_hash_canon): Lose.
16896 (hash_tree_cons): Only build a new node if one isn't already in the
16897 hashtable.
16898 (hash_tree_chain): Use hash_tree_cons.
16899 * cp-tree.h: Adjust.
16900 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
16901 of calling lookup_name.
16902
16903 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
16904
16905 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
16906 doesn't refer to the CONST_DECLs.
16907
16908 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
16909
16910 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
16911 is bigger.
16912 (expand_class_desc): Convert the last argument to a sizetype.
16913
16914 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16915
16916 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
16917 __real__): Add reswords.
16918 * hash.h: Regenerate.
16919 * lex.h (rid): Add RID_COMPLEX.
16920 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
16921 * lex.c (init_lex): Add building of RID_COMPLEX.
16922 (real_yylex): General cleanup in line with what c-lex.c also has,
16923 sans the cruft for traditional; add handling of SPEC_IMAG, complex
16924 types, and imaginary numeric constants.
16925 * parse.y (REALPART, IMAGPART): Add tokens.
16926 (unary_expr): Add REALPART and IMAGPART rules.
16927 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
16928 * decl.c (complex_{integer,float,double,long}_type_node): Define
16929 types.
16930 (init_decl_processing): Set up the types.
16931 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
16932 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
16933 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
16934 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
16935 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
16936 COMPLEX_TYPE case.
16937 * method.c (build_overload_name): Add handling of the different
16938 COMPLEX_TYPEs, prefixing them with `J'.
16939 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
16940 as a template parm.
16941 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
16942 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
16943 (mapcar): Handle COMPLEX_CST.
16944 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
16945 (common_type): Add code for complex types.
16946 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
16947 (convert_for_assignment): Likewise.
16948 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
16949
16950 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
16951
16952 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
16953 tsubst_expr, as it might try to do overload resolution.
16954
16955 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
16956
16957 * pt.c (instantiate_class_template): Oops.
16958
16959 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
16960
16961 * cp-tree.def: Add TAG_DEFN.
16962 * pt.c (tsubst_enum): New fn.
16963 (instantiate_class_template): Use it.
16964 (tsubst_expr): Support TAG_DEFN.
16965 (tsubst): Support local enums.
16966 (tsubst_copy): Likewise.
16967 * decl.c (finish_enum): Likewise.
16968 (start_enum): If this is a local enum, switch to permanent_obstack.
16969
16970 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
16971
16972 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
16973 (finish_function): Put the base init code for constructors just
16974 after the parm cleanup insns.
16975 (struct cp_function): Add last_parm_cleanup_insn.
16976 (pu
This page took 0.665446 seconds and 6 git commands to generate.