]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/cp/ChangeLog
cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
1 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
2
3 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
4 * decl.c (create_implicit_typedef): Adjust.
5 * decl2.c (build_artificial_parm): Adjust.
6 * method.c (implicitly_declare_fn): Adjust.
7 * pt.c (push_inline_template_parms_recursive): Adjust.
8 (process_template_parm): Adjust.
9 (overloaded_template_name): Adjust.
10 * semantics.c (finish_template_template_parm): Adjust.
11
12 2000-06-28 Mark Mitchell <mark@codesourcery.com>
13
14 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
15 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
16 where to emit thunks.
17 (build_vtt): Adjust call to build_vtt_inits.
18 (build_vtt_inits): Add parameter to indicate whether or not
19 sub-VTTs for virtual bases should be included. Adjust handling of
20 construction vtables.
21 (get_matching_base): New function.
22 (dfs_build_vtt_inits): Rename to ...
23 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
24 construction vtables.
25 (dfs_fixup_binfo_vtbls): Likewise.
26 (build_ctor_vtbl_groups): Build construction vtables for virtual
27 bases, too.
28 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
29 to build construction vtbls.
30 (dfs_accumulate_vtbl_inits): Adjust handling of
31 construction vtables.
32
33 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
34 types correctly.
35
36 2000-06-27 Mark Mitchell <mark@codesourcery.com>
37
38 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
39
40 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
41
42 * search.c (hides): Remove.
43 (is_subobject_of_p): Add most_derived parameter. Use
44 CANONICAL_BINFO.
45 (lookup_field_queue_p): Adjust.
46 (lookup_field_r): Adjust.
47
48 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
49
50 * decl2.c (handle_class_head): Bash typedefs to the type's main
51 decl.
52
53 2000-06-25 Mark Mitchell <mark@codesourcery.com>
54
55 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
56 (begin_global_stmt_expr): ... this.
57 (genrtl_finish_stmt_expr): Rename to ...
58 (finish_global_stmt_expr): ... this.
59 * init.c (begin_init_stmts): Adjust calls.
60 (finish_init_stmts): Likewise.
61 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
62 (begin_global_stmt_expr): ... this.
63 (genrtl_finish_stmt_expr): Rename to ...
64 (finish_global_stmt_expr): ... this.
65
66 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
67
68 * search.c (lookup_member): Fix typo in comment.
69
70 2000-06-24 Jason Merrill <jason@redhat.com>
71
72 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
73 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
74
75 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
76
77 * parse.y (complex_direct_notype_declarator): Support global_scope.
78 * Makefile.in: Adjust conflict count.
79
80 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
81
82 * parse.y (template_arg): Convert TEMPLATE_DECL
83 that is a template template paramter to
84 TEMPLATE_TEMPLATE_PARM here.
85
86 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
87 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
88 (copy_template_template_parm): Adjust prototype.
89 * decl.c (grokdeclarator): Remove dead code.
90 * pt.c (process_template_parm): Tidy.
91 (lookup_template_class): Construct nodes in
92 copy_template_template_parm.
93 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
94 lookup_template_class. Use TYPE_TI_TEMPLATE.
95 * tree.c (copy_template_template_parm): Add NEWARGS
96 parameter.
97 (mapcar): Adjust call to copy_template_template_parm.
98 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
99 * method.c (build_template_template_parm_names): Change error
100 code to avoid compilation warning.
101
102 * gxxint.texi: Document template template parameter
103 name mangling.
104
105 2000-06-21 Alex Samuel <samuel@codesourcery.com>
106
107 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
108 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
109 (cp-demangle.o): New rule.
110 (dyn-string.o): Likewise.
111 * inc/cxxabi.h (__cxa_demangle): New declaration.
112
113 2000-06-22 Mark Mitchell <mark@codesourcery.com>
114
115 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
116 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
117 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
118 a tree, not an int.
119 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
120 (make_thunk): Change prototype.
121 (emit_thunk): Rename to use_thunk.
122 (mangle_thunk): Change prototype.
123 * class.c (get_derived_offset): Simplify.
124 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
125 BV_GENERATE_THUNK_WITH_VTABLE_P.
126 (build_primary_vtable): Simplify.
127 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
128 (dfs_find_base): Remove.
129 (update_vtable_entry_for_fn): Correct bug in finding the base
130 where a virtual function was first declared. Figure out whether
131 or not to emit a vcall-thunk with the vtables in which it appears.
132 Correct logic for deciding whether to use an ordinary thunk, or a
133 vcall thunk.
134 (finish_struct_1): Remove unnecssary code.
135 (build_vtbl_initializer): Use ssize_int for the running counter of
136 negative indices.
137 (build_vtbl_initializer): Only use vcall thunks where necessary.
138 Mark thunks as needing to be emitted with their vtables, or not.
139 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
140 indices. Use size_binop.
141 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
142 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
143 size_binop.
144 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
145 (build_vtable_entry): Mark thunks as needing to be emitted with
146 their vtables, or not.
147 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
148 * decl2.c (mark_vtable_entries): Use use_thunk instead of
149 emit_thunk.
150 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
151 information.
152 * error.c (dump_expr): Use BV_FN.
153 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
154 not an int.
155 * method.c (make_thunk): Likewise.
156 (emit_thunk): Rename to use_thunk. Allow callers to decide
157 whether or not to actually emit the thunk. Adjust for changes in
158 representation of vcall offsets.
159 * search.c (dfs_get_pure_virtuals): Use BV_FN.
160 * semantics.c (emit_associated_thunks): New function.
161 (expand_body): Use it.
162 * ir.texi: Adjust decriptions of thunks.
163
164 2000-06-22 Jason Merrill <jason@redhat.com>
165
166 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
167 (tsubst_friend_function): Copy it here.
168
169 * decl.c (grok_op_properties): Fix typo.
170
171 * decl2.c (delete_sanity): Clarify warning, avoid failure on
172 deleting void*.
173
174 * pt.c (check_explicit_specialization): Clarify error.
175
176 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
177 an old OVERLOAD when we're declaring a non-function.
178 (pushdecl, destroy_local_var): Check for error_mark_node.
179 (warn_extern_redeclared_static): Also bail early if
180 we're a CONST_DECL.
181 (push_overloaded_decl): Ignore an old error_mark_node.
182
183 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
184
185 * call.c (build_x_va_arg): Check if in a template decl.
186 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
187
188 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
189
190 * class.c (push_lang_context): TYPE_NAME gets you to the Java
191 types DECLs.
192 * decl.c (check_goto): Computed gotos assumed OK.
193
194 2000-06-20 Jason Merrill <jason@redhat.com>
195
196 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
197 for which we don't need to look for instantiations.
198
199 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
200
201 * parse.y (program): Always call finish_translation_unit.
202 * parse.c, parse.h: Rebuilt.
203
204 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
205
206 * method.c: Don't include hard-reg-set.h.
207
208 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
209
210 * rtti.c (get_base_offset): Cope when vbase field is in a base.
211
212 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
213
214 * call.c (build_conditional_expr): Use VOID_TYPE_P.
215 * cvt.c (cp_convert_to_pointer): Likewise.
216 (convert_to_void): Likewise.
217 * error.c (dump_expr): Likewise.
218 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
219 * init.c (build_delete): Likewise.
220 * method.c (emit_thunk): Likewise.
221 * optmize.c (declare_return_variable): Likewise.
222 * rtti.c (get_tinfo_decl_dynamic): Likewise.
223 (get_typeid): Likewise.
224 (build_dynamic_cast_1): Likewise.
225 * typeck.c (composite_pointer_type): Likewise.
226 (common_type): Likewise.
227 (build_indirect_ref): Likewise.
228 (build_binary_op): Likewise.
229 (build_x_compound_expr): Likewise.
230 (check_return_expr): Likewise.
231 * typeck2.c (add_exception_specifier): Likewise.
232
233 * mangle.c (write_method_parms): Use direct comparison for end
234 of parmlist.
235
236 2000-06-19 Benjamin Chelf <chelf@cabriolet.stanford.edu>
237
238 * cp-tree.h (genrtl_try_block): Declare function.
239 (genrtl_handler): Likewise.
240 (genrtl_catch_block): Likewise.
241 (genrtl_ctor_stmt): Likewise.
242 (genrtl_subobject): Likewise.
243 (genrtl_decl_cleanup): Likewise.
244 (genrtl_do_poplevel): Likewise.
245 (genrtl_do_pushlevel): Likewise.
246 (genrtl_clear_out_block): Likewise.
247 (genrtl_goto_stmt): Likewise.
248 (genrtl_expr_stmt): Likewise.
249 (genrtl_decl_stmt): Likewise.
250 (genrtl_if_stmt): Likewise.
251 (genrtl_while_stmt): Likewise.
252 (genrtl_do_stmt): Likewise.
253 (genrtl_return_stmt): Likewise.
254 (genrtl_for_stmt): Likewise.
255 (genrtl_break_stmt): Likewise.
256 (genrtl_continue_stmt): Likewise.
257 (genrtl_scope_stmt): Likewise.
258 (genrtl_switch_stmt): Likewise.
259 (genrtl_case_label): Likewise.
260 (genrtl_begin_compound_stmt): Likewise.
261 (genrtl_finish_compound_stmt): Likewise.
262 (genrtl_compound_stmt): Likewise.
263 (genrtl_asm_stmt): Likewise.
264 (genrtl_named_return_value): Likewise.
265 (genrtl_begin_stmt_expr): Likewise.
266 (genrtl_finish_stmt_expr): Likewise.
267 (finish_for_stmt): Removed first argument.
268 (finish_switch_stmt): Likewise.
269
270 * semantics.c (genrtl_try_block): Define function.
271 (genrtl_handler): Likewise.
272 (genrtl_catch_block): Likewise.
273 (genrtl_ctor_stmt): Likewise.
274 (genrtl_subobject): Likewise.
275 (genrtl_decl_cleanup): Likewise.
276 (genrtl_do_poplevel): Likewise.
277 (genrtl_do_pushlevel): Likewise.
278 (genrtl_clear_out_block): Likewise.
279 (genrtl_goto_stmt): Likewise.
280 (genrtl_expr_stmt): Likewise.
281 (genrtl_decl_stmt): Likewise.
282 (genrtl_if_stmt): Likewise.
283 (genrtl_while_stmt): Likewise.
284 (genrtl_do_stmt): Likewise.
285 (genrtl_return_stmt): Likewise.
286 (genrtl_for_stmt): Likewise.
287 (genrtl_break_stmt): Likewise.
288 (genrtl_continue_stmt): Likewise.
289 (genrtl_scope_stmt): Likewise.
290 (genrtl_switch_stmt): Likewise.
291 (genrtl_case_label): Likewise.
292 (genrtl_begin_compound_stmt): Likewise.
293 (genrtl_finish_compound_stmt): Likewise.
294 (genrtl_compound_stmt): Likewise.
295 (genrtl_asm_stmt): Likewise.
296 (genrtl_named_return_value): Likewise.
297 (genrtl_begin_stmt_expr): Likewise.
298 (genrtl_finish_stmt_expr): Likewise.
299 (finish_for_stmt): Removed first argument and generate rtl
300 specific code.
301 (finish_switch_stmt): Likewise.
302 (do_poplevel): Removed generate rtl specific code.
303 (do_pushlevel): Likewise.
304 (add_tree): Likewise.
305 (finish_goto_stmt): Likewise.
306 (finish_expr_stmt): Likewise.
307 (begin_if_stmt): Likewise.
308 (finish_if_stmt_cond): Likewise.
309 (finish_then_clause): Likewise.
310 (begin_else_clause): Likewise.
311 (finish_else_clause): Likewise.
312 (finish_if_stmt): Likewise.
313 (clear_out_block): Likewise.
314 (begin_while_stmt): Likewise.
315 (finish_while_stmt_cond): Likewise.
316 (finish_while_stmt): Likewise.
317 (begin_do_stmt): Likewise.
318 (finish_do_body): Likewise.
319 (finish_do_stmt): Likewise.
320 (finish_return_stmt): Likewise.
321 (begin_for_stmt): Likewise.
322 (finish_for_init_stmt): Likewise.
323 (finish_for_cond): Likewise.
324 (finish_for_expr): Likewise.
325 (finish_break_stmt): Likewise.
326 (finish_continue_stmt): Likewise.
327 (begin_switch_stmt): Likewise.
328 (finish_switch_cond): Likewise.
329 (finish_case_label): Likewise.
330 (begin_try_block): Likewise.
331 (begin_function_try_block): Likewise.
332 (finish_try_block): Likewise.
333 (finish_cleanup_try_block): Likewise.
334 (finish_cleanup): Likewise.
335 (finish_function_try_block): Likewise.
336 (finish_handler_sequence): Likewise.
337 (finish_function_handler_sequence): Likewise.
338 (begin_handler): Likewise.
339 (finish_handler_parms): Likewise.
340 (begin_catch_block): Likewise.
341 (finish_handler): Likewise.
342 (begin_compound_stmt): Likewise.
343 (finish_compound_stmt): Likewise.
344 (finish_asm_stmt): Likewise.
345 (finish_label_stmt): Likewise.
346 (finish_label_decl): Likewise.
347 (finish_subobject): Likewise.
348 (finish_decl_cleanup): Likewise.
349 (finish_named_return_value): Likewise.
350 (begin_stmt_expr): Likewise.
351 (finish_stmt_expr): Likewise.
352
353 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
354 to call genrtl_expr_stmt when appropriate.
355
356 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
357 begin_compound_expr to call genrtl_begin_stmt_expr and
358 genrtl_begin_compound_expr when appropriate.
359 (finish_init_stmts): Changed calls to finish_compound_expr and
360 finish_stmt_expr to call genrtl_finish_compound_expr and
361 genrtl_finish_stmt_expr when appropriate.
362 (expand_default_init): Changed call to finish_expr_stmt to call
363 genrtl_expr_stmt when appropriate.
364 (build_vec_init): Likewise.
365
366 * parse.y (simple_stmt): Removed first argument from call to
367 finish_for_stmt. Removed first argument from call to
368 finish_switch_stmt.
369
370 * parse.c: Regenerated.
371
372 * pt.c (tsubst_expr): Removed first argument from call to
373 finish_for_stmt. Removed first argument from call to
374 finish_switch_stmt.
375
376 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
377
378 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
379 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
380
381 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
382 (cplus_tree_code_length[]): Likewise.
383 (cplus_tree_code_name[]): Likewise.
384 (init_parse): Added call to add_c_tree_codes. Changed
385 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
386
387 2000-06-16 Mark Mitchell <mark@codesourcery.com>
388
389 * cp-tree.h (finish_mem_initializers): Declare.
390 (count_trees): Likewise.
391 * parse.y (base_init): Use finish_mem_initializers.
392 * semantics.c (finish_mem_initializers): New function.
393
394 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
395 the number of trees.
396 (n_trees): Remove.
397 (count_trees): Don't use it.
398
399 2000-06-15 Jason Merrill <jason@redhat.com>
400
401 * tree.c (count_trees): New debugging function.
402
403 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
404 * init.c (build_member_call): Pull out the name of a DECL.
405
406 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
407 * semantics.c (expand_body): Push to TV_INTEGRATION here.
408 * optimize.c (optimize_function): Not here.
409 * pt.c (instantiate_decl): Push to TV_PARSE.
410
411 2000-06-15 Mark Mitchell <mark@codesourcery.com>
412
413 * cp-tree.h (struct language_function): Remove x_base_init_list
414 and x_member_init_list.
415 (current_base_init_list): Remove.
416 (current_member_init_list): Likewise.
417 (setup_vtbl_ptr): Change prototype.
418 (emit_base_init): Likewise.
419 (expand_member_init): Likewise.
420 (reinit_parse_for_function): Remove.
421 * decl.c (save_function_data): Don't clear x_base_init_list and
422 x_member_init_list.
423 (mark_language_function): Don't mark them.
424 * init.c (perform_member_init): Tweak comment.
425 (sort_member_init): Take the list of initializers as an argument.
426 (sort_base_init): Likewise.
427 (emit_base_init): Likewise.
428 (expand_member_init): Return the initializer. Don't use global
429 variables.
430 * lex.c (reinit_parse_for_function): Remove.
431 * method.c (build_template_parm_names): Correct substitution.
432 (do_build_copy_constructor): Don't use current_member_init_list
433 and current_base_init_list.
434 (synthesize_method): Likewise.
435 * parse.y (base_init): Split mem-initializers into
436 base-initializers and field-initializers.
437 (member_init_list): Build up the list here.
438 (member_init): Return the initializer.
439 (fn.depfn): Don't use reinit_parse_for_function.
440 * parse.c: Regenerated.
441 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
442 ERROR_MARK.
443 (tsubst_expr): Don't use current_member_init_list
444 and current_base_init_list.
445 (tsubst_expr_values): Rename to ...
446 (tsubst_initializer_list): ... this. Use convert_from_reference.
447 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
448 and current_base_init_list.
449 (begin_function_definition): Don't call reinit_parse_for_function.
450
451 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
452
453 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
454 correctly.
455
456 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
457
458 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
459
460 * cp-tree.h (IF_COND): Move to c-common.h.
461 (THEN_CLAUSE): Likewise.
462 (ELSE_CLAUSE): Likewise.
463 (WHILE_COND): Likewise.
464 (WHILE_BODY): Likewise.
465 (DO_COND): Likewise.
466 (DO_BODY): Likewise.
467 (RETURN_EXPR): Likewise.
468 (EXPR_STMT_EXPR): Likewise.
469 (FOR_INIT_STMT): Likewise.
470 (FOR_COND): Likewise.
471 (FOR_EXPR): Likewise.
472 (FOR_BODY): Likewise.
473 (SWITCH_COND): Likewise.
474 (SWITCH_BODY): Likewise.
475 (CASE_LOW): Likewise.
476 (CASE_HIGH): Likewise.
477 (GOTO_DESTINATION): Likewise.
478 (COMPOUND_BODY): Likewise.
479 (ASM_CV_QUAL): Likewise.
480 (ASM_STRING): Likewise.
481 (ASM_OUTPUTS): Likewise.
482 (ASM_INPUTS): Likewise.
483 (ASM_CLOBBERS): Likewise.
484 (DECL_STMT_DECL): Likewise.
485 (STMT_EXPR_STMT): Likewise.
486 (LABEL_STMT_LABEL): Likewise.
487 (SCOPE_BEGIN_P): Likewise.
488 (SCOPE_END_P): Likewise.
489 (SCOPE_STMT_BLOCK): Likewise.
490 (SCOPE_NULLIFIED_P): Likewise.
491 (SCOPE_NO_CLEANUPS_P): Likewise.
492 (SCOPE_PARTIAL_P): Likewise.
493 (ASM_VOLATILE_P): Likewise.
494 (STMT_LINENO): Likewise.
495 (STMT_LINENO_FOR_FN_P): Likewise.
496
497 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
498 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
499 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
500 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
501 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
502
503 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
504
505 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
506 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
507
508 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
509 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
510 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
511
512 2000-06-14 Mark Mitchell <mark@codesourcery.com>
513
514 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
515 * class.c (dfs_find_final_overrider): Set it appropriately.
516 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
517 avoid unneeded secondary vptrs.
518
519 2000-06-13 Jakub Jelinek <jakub@redhat.com>
520
521 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
522 (check_bitfield_decl, check_field_decl): Likewise.
523 (build_vtbl_or_vbase_field, build_base_field): Likewise.
524 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
525 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
526 (xfer_tag, finish_enum): Likewise.
527 * decl2.c (finish_builtin_type): Likewise.
528 * init.c (init_init_processing): Likewise.
529 * pt.c (instantiate_class_template): Likewise.
530 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
531 * cp-tree.h (struct lang_type): Add user_align member.
532 (CLASSTYPE_USER_ALIGN): Define.
533
534 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
535
536 * Make-lang.in (c++.install-common): Install g++-cross in
537 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
538 $(target_alias)-g++ and $(target_alias)-c++.
539
540 2000-06-12 Mark Mitchell <mark@codesourcery.com>
541
542 * class.c (vcall_offset_data_s): Add last_init and fns.
543 (overrides): Rename to same_signature_p.
544 (dfs_find_final_overrider): Adjust accordingly.
545 (mark_overriders): Likewise.
546 (warn_hidden): Likewise.
547 (build_vtbl_initializer): Reorganize machinery for building things
548 at negative offsets.
549 (build_vcall_and_vbase_vtbl_entries): Likewise.
550 (build_vbase_offset_vtbl_entries): Likewise.
551 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
552 offset entries. Do not create two entries for functions with the
553 same signature.
554 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
555 (build_rtti_vtbl_entries): Reorganize machinery for building things
556 at negative offsets.
557
558 * optimize.c (expand_call_inline): Don't recurse into the code
559 used to initialize the parameters more than once.
560
561 2000-06-11 Mark Mitchell <mark@codesourcery.com>
562
563 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
564 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
565 (find_substitution): Only use the `Sa' substitution for
566 std::allocator, not instantiations of it.
567 (write_template_prefix): Move comment. Only use a TREE_LIST to
568 represent substitutions for a member template.
569 (write_array_type): Mangle array dimensions correctly.
570 * optimize.c (maybe_clone_body): Copy more information from the
571 cloned function.
572 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
573 on the regenerated declaration.
574
575 2000-06-11 Chip Salzenberg <chip@valinux.com>
576 Mark Mitchell <mark@codesourcery.com>
577
578 * class.c (build_vtable): Clarify comment.
579 (build_ctor_vtbl_group): Pass the most derived type to
580 build_vtable.
581
582 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
583
584 * decl2.c (compare_options): Don't needlessly cast away const-ness.
585
586 2000-06-10 Mark Mitchell <mark@codesourcery.com>
587
588 * decl.c (add_binding): Handle duplicate declarations of external
589 variables.
590
591 2000-06-09 Chip Salzenberg <chip@valinux.com>
592 Mark Mitchell <mark@codesourcery.com>
593
594 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
595 argument.
596 (write_signed_number): New macro.
597 (write_unsigned_number): Likewise.
598 (write_source_name): Use them.
599 (write_number): Handle signed and unsigned values.
600 (write_integer_cst): Use tree_int_cst_sgn, and use
601 write_unsigned_number or write_signed_number as appropriate.
602 (write_discriminator): Use write_unsigned_number or
603 write_signed_number as appropriate.
604 (write_template_arg_literal): Likewise.
605 (write_array_type): Use tree_low_cst.
606 (write_template_parm): Use write_unsigned_number or
607 write_signed_number as appropriate.
608 (write_substitution): Adjust call to write_number.
609 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
610 (write_expression): Handle non-type template arguments of
611 reference type correctly.
612 (mangle_thunk): Use write_signed_number.
613
614 2000-06-09 Chip Salzenberg <chip@valinux.com>
615
616 * mangle.c (find_substition): Don't mangle objects with typename
617 substitutions (e.g. "cin" as "Si").
618
619 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
620
621 * call.c (add_candidate): Use ggc_alloc_cleared.
622 * decl.c (lookup_label): Likewise.
623 * lex.c (retrofit_lang_decl): Likewise.
624
625 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
626
627 * semantics.c (expand_body): Push to TV_EXPAND.
628 * optimize.c (optimize_function): Push to TV_INTEGRATION.
629 * decl.c (start_function): Always call announce_function.
630
631 * tinfo2.cc: Just declare abort.
632
633 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
634
635 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
636 whenever @ is a symbolic name.
637
638 2000-06-08 Jakub Jelinek <jakub@redhat.com>
639
640 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
641
642 2000-06-07 Mark Mitchell <mark@codesourcery.com>
643
644 * decl.c (pushdecl): Look up functions by DECL_NAME, not
645 DECL_ASSEMBLER_NAME.
646
647 2000-06-06 Mark Mitchell <mark@codesourcery.com>
648
649 * decl2.c (c_language): Define.
650
651 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
652
653 * lex.c (lang_init_options): Tweak.
654
655 * decl2.c: Remove #inclusion of diagnostic.h
656 (lang_decode_option): Move diagnostic formatting options to
657 toplevel.
658
659 * lang-options.h: Remove documentation for diagnostic options.
660
661 * Makefile.in (lex.o): Depends upon diagnostic.h
662
663 2000-06-06 Mark Mitchell <mark@codesourcery.com>
664
665 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
666 the same DECL_RESULT, it's not a redefinition.
667 * pt.c (tsubst_decl): Remove code to handle illegal
668 specializations.
669
670 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
671
672 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
673
674 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
675
676 * search.c (maybe_suppress_debug_info): Don't check
677 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
678
679 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
680 here if extern_p.
681
682 Remember instantiation context in deferred instantiations.
683 * cp-tree.h (struct tinst_level): Remove.
684 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
685 * pt.c (current_tinst_level): Now a tree.
686 (print_template_context, push_tinst_level, pop_tinst_level,
687 tinst_for_decl): Adjust.
688 (reopen_tinst_level): New fn.
689 (init_pt): Register current_tinst_level as a root.
690 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
691 of the pending templates list.
692 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
693 * lex.c (extract_interface_info): Adjust.
694 * decl2.c (warn_if_unknown_interface): Adjust.
695
696 2000-06-05 Mark Mitchell <mark@codesourcery.com>
697
698 * class.c (indirect_primary_base_p): New function.
699 (determine_primary_base): Use it.
700
701 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
702
703 Update new-abi dynamic cast algorithm.
704 * tinfo.cc (__class_type_info::__dyncast_result): Add
705 whole_details. Adjust constructor.
706 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
707 Avoid unnecessary searching.
708 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
709
710 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
711
712 * decl.c (init_decl_processing): Don't call record_component_aliases.
713 * tree.c (build_cplus_array_type_1): Likewise.
714
715 2000-06-04 Mark Mitchell <mark@codesourcery.com>
716
717 * ir.texi: Correct typo.
718 * mangle.c (write_expression): Handle non-type template arguments
719 with reference type.
720 * method.c (build_overload_value): Likewise.
721 * pt.c (convert_nontype_argument): Explicitly represent conversion
722 to a reference with an ADDR_EXPR.
723 (unify): Always unify arguments in left-to-right order.
724
725 2000-06-03 Alex Samuel <samuel@codesourcery.com>
726 Mark Mitchell <mark@codesourcery.com>
727
728 * Make-lang.in (CXX_SRCS): Add mangle.c.
729 * Makefile.in (CXX_OBJS): Add mangle.o.
730 (mangle.o): New rule.
731
732 * class.c (local_classes): New variable.
733 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
734 (get_vtt_name): Use mangle_vtt_name for new ABI.
735 (init_class_processing): Initialize local_classes.
736 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
737 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
738 (std_identifier): New macro.
739 (DECL_VOLATILE_MEMFUNC_P): New macro.
740 (DECL_NAMESPACE_STD_P): Likewise.
741 (local_classes): Declare.
742 (get_mostly_instantiated_function_type): Declare.
743 (init_mangle): Declare.
744 (mangle_decl): Likewise.
745 (mangle_type_string): Likewise.
746 (mangle_type): Likewise.
747 (mangle_typeinfo_for_type): Likewise.
748 (mangle_typeinfo_string_for_type): Likewise.
749 (mangle_vtbl_for_type): Likewise.
750 (mangle_vtt_for_type): Likewise.
751 (mangle_ctor_vtbl_for_type): Likewise.
752 (mangle_thunk): Likewise.
753 (mangle_conv_op_name_for_type): Likewise.
754 (mangle_guard_variable): Likewise.
755 * decl.c (pushtag): Keep track of local classes.
756 (initialize_predefined_identifiers): Initialize std_identifier.
757 (init_decl_processing): Use std_identifier.
758 (start_decl): Don't treat instantiations as specializations.
759 (grokdeclarator): Likewise.
760 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
761 name for fully-instantiated templates.
762 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
763 destructors with the new ABI.
764 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
765 (grokfield): Use mangle_type for new ABI.
766 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
767 (get_sentry): Use mangle_guard_variable for new ABI.
768 (start_static_initialization_or_destruction): Likewise.
769 * expr.c (extract_aggr_init): Remove.
770 (extract_scalar_init): Likewise.
771 (extract_init): Remove #if 0'd code.
772 * mangle.c: New function.
773 * method.c (build_mangled_name): Assert not flag_new_abi.
774 (build_static_name): Likewise.
775 (build_decl_overload_real): Likewise.
776 (build_typename_overload): Likewise.
777 (build_overload_with_type): Likewise.
778 (build_overload_name): Likewise.
779 (get_ctor_vtbl_name): Likewise.
780 (start_squangling): Likewise.
781 (get_id_2): Likewise.
782 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
783 (init_method): Call init_mangle for new ABI.
784 (make_thunk): Call mangle_thunk for new ABI.
785 * operators.def: Correct new ABI manglings for the `%' operator.
786 Add `::' operator.
787 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
788 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
789 (lookup_template_class): Call mangle_decl for new ABI.
790 (get_mostly_instantiated_function_type): New function.
791 (set_mangled_name_for_template_decl): Use it.
792 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
793 the new ABI. Use mangle_conv_op_name_for_type for instantiated
794 conversion op names.
795 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
796 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
797 (tinfo_base_init): Likewise. Mangle typeinfo string name with
798 mangle_typeinfo_string_for_type.
799
800 2000-06-01 Richard Henderson <rth@cygnus.com>
801
802 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
803
804 2000-06-01 Richard Henderson <rth@cygnus.com>
805
806 * decl2.c (unsupported_options): Fix typo, make const.
807 (lang_decode_option): Fix bsearch argument order.
808
809 2000-06-01 Mark Mitchell <mark@codesourcery.com>
810
811 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
812 on FIELD_DECLs.
813
814 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
815
816 * cp-tree.h (c_get_alias_set): Deleted.
817 * Makefile.in (decl.o): Include ../expr.h.
818 * decl.c (expr.h): Include.
819 (init_decl_processing): Call record_component_aliases for arrays.
820 (grokdeclarator): Likewise.
821 Set TREE_ADDRESSABLE for fields that aren't bitfields.
822 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
823
824 2000-05-31 Mark Mitchell <mark@codesourcery.com>
825
826 Remove guiding declaration support.
827 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
828 (flag_guiding_decls): Remove.
829 * call.c (build_user_type_conversion_1): Remove support for
830 guiding decls.
831 (build_new_function_call): Likewise.
832 (build_new_op): Likewise.
833 (build_new_method_call): Likewise.
834 * decl.c (start_function): Likewise.
835 * friend.c (is_friend): Likewise.
836 (do_friend): Likewise.
837 * decl2.c ((flag_dump_translation_unit): Make it const.
838 (flag_guiding_decls): Remove.
839 (unsupported_options): New variable
840 (compare_options): New function.
841 (lang_decode_option): Use them.
842
843 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
844
845 * method.c (mangle_expression): Adjust test for legal expression
846 operators.
847
848 * pt.c (instantiate_decl): Save and restore the local
849 specializations list.
850
851 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
852
853 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
854
855 2000-05-30 Mark Mitchell <mark@codesourcery.com>
856
857 * call.c (add_template_candidate_real): Handle member template
858 constructors for classes with virtual bases.
859 (build_user_type_conversion_1): Use in_charge_arg_for_name.
860 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
861
862 * ir.texi: Update thunk documentation.
863
864 * call.c (joust): Fix handling of overloaded builtin operators.
865
866 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
867
868 * cp-tree.h (DECL_ANTICIPATED): New macro.
869 Document new use of DECL_LANG_FLAG_7.
870 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
871 in the user namespace.
872 * lex.c (do_identifier): If the identifier's declaration has
873 DECL_ANTICIPATED on, it has not yet been declared. But do not
874 replace it with an ordinary implicit declaration.
875
876 * tinfo2.cc: Include stdlib.h.
877
878 2000-05-29 Mark Mitchell <mark@codesourcery.com>
879
880 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
881 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
882 CLASSTYPE_ALIGN.
883
884 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
885
886 * decl2.c (lang_decode_option): Use skip_leading_substring instead
887 of plain strncmp.
888
889 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
890
891 * operators.def (<?): Duplicated, should have been...
892 (>?): this. Fixed.
893
894 2000-05-27 Alex Samuel <samuel@codesourcery.com>
895 Mark Mitchell <mark@codesourcery.com>
896
897 * cp-tree.h (ansi_opname): Make it a macro.
898 (ansi_assopname): Likewise.
899 (struct lang_decl_flags): Add assignment_operator_p.
900 (struct lang_decl): Add operator_code.
901 (DECL_VTT_PARM): Adjust.
902 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
903 overloaded operator.
904 (SET_OVERLOADED_OPERATOR_CODE): New macro.
905 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
906 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
907 (opname_tab): Remove.
908 (assignop_tab): Likewise.
909 (operator_name_info_t): New type.
910 (operator_name_info): New variable.
911 (assignment_operator_name_info): Likewise.
912 (build_cp_library_fn): Remove declaration.
913 (push_cp_library_fn): Likewise.
914 (operator_name_string): Likewise.
915 (build_decl_overload): Likewise.
916 * call.c (print_z_candidates): Simplify.
917 (build_object_call): Adjust usage of ansi_opname. Use
918 DECL_OVERLOADED_OPERATOR_P.
919 (op_error): Adjust operator name lookup.
920 (build_conditional_expr): Adjust usage of ansi_opname.
921 (build_new_op): Likewise.
922 (build_op_delete_call): Likewise.
923 (build_over_call): Likewise.
924 (joust): Use DECL_OVERLOADED_OPERATOR_P.
925 * decl.c (duplicate_decls): Copy operator_code.
926 (init_decl_processing): Adjust parameters to push_cp_library_fn.
927 (builtin_function): Adjust parameters to build_library_fn_1.
928 (build_library_fn_1): Accept an overloaded operator code.
929 (build_library_fn): Pass ERROR_MARK.
930 (build_cp_library_fn): Accept an overloaded operator code.
931 (push_cp_library_fn): Likewise.
932 (grokfndecl): Tweak.
933 (grokdeclarator): Simplify code to compute names of overloaded
934 operators. Adjust use of ansi_opname.
935 (ambi_op_p): Work on tree_codes, not identifiers.
936 (unary_op_p): Likewise.
937 (grok_op_properties): Likewise.
938 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
939 (lang_mark_tree): Don't try to mark the operator_code.
940 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
941 * error.c (dump_decl): Remove special handling for operator
942 names.
943 (dump_function_name): Likewise.
944 (dump_expr): Adjust name lookup of operators.
945 (op_to_string): Simplify.
946 (assop_to_string): Likewise.
947 * init.c (build_new_1): Adjust use of ansi_opname.
948 * lex.c (opname_tab): Remove.
949 (assignop_tab): Likewise.
950 (ansi_opname): Likewise.
951 (ansi_assopname): Likewise.
952 (operator_name_string): Likewise.
953 (reinit_lang_specific): Likewise.
954 (operator_name_info): New variable.
955 (assignment_operator_name_info): Likewise.
956 (init_operators): New function.
957 (init_parse): Use it.
958 (do_identifier): Adjust use of ansi_opname.
959 * method.c (mangle_expression): Don't use ansi_opname for
960 mangling.
961 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
962 (build_decl_overload): Remove.
963 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
964 (do_build_assign_ref): Adjust use of ansi_opname.
965 (synthesize_method): Likewise.
966 (implicitly_declare_fn): Likewise.
967 * operators.def: New file.
968 * parse.y (operator): Adjust use of ansi_opname.
969 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
970 (set_mangled_name_for_template_decl): Don't play games with
971 current_namespace.
972 (special_function_p): Adjust use of ansi_opname.
973 * typeck.c (check_return_expr): Likewise.
974 * Make-lang.in (cc1plus): Depend on operators.def.
975 * Makefile.in (lex.o): Likewise.
976 (decl.o): Likewise.
977
978 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
979
980 * Make-lang.in (cplib2.ready): Eradicate.
981
982 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
983
984 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
985 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
986 (built_min, cp_tree_equal): Likewise.
987
988 2000-05-26 Mark Mitchell <mark@codesourcery.com>
989
990 * class.c (layout_nonempty_base_or_field): Replace
991 `record_layout_info' with `record_layout_info_s'.
992
993 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
994
995 Fix goto checking.
996 * cp-tree.h (struct language_function): x_named_labels is now
997 a struct named_label_list*.
998 * decl.c (struct named_label_use_list): Renamed from...
999 (struct named_label_list): ...this. New struct.
1000 (push_binding_level): Don't set eh_region.
1001 (note_level_for_eh): New fn.
1002 (pop_label): Take label and old value directly.
1003 (pop_labels): Adjust for new named_labels format.
1004 (lookup_label): Likewise.
1005 (poplevel): Note characteristics of a binding level containing a
1006 named label. Mess with named label lists earlier.
1007 (mark_named_label_lists): New fn.
1008 (mark_lang_function): Call it.
1009 (use_label): New fn, split out from...
1010 (make_label_decl): ...here. Don't call it.
1011 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
1012 check_previous_gotos): New fns, split out from...
1013 (define_label): ...here.
1014 (check_switch_goto): New fn.
1015 (define_case_label): Call it.
1016 (check_goto): New fn.
1017 * semantics.c (finish_goto_stmt): Call it and use_label.
1018 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
1019 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
1020
1021 2000-05-26 Mark Mitchell <mark@codesourcery.com>
1022
1023 * class.c (build_vtable_entry_ref): Correct usage of
1024 get_vtbl_decl_for_binfo.
1025
1026 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
1027 * method.c (implicitly_declare_fn): Not here.
1028
1029 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
1030
1031 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
1032 (CPTI_PTMD_DESC_TYPE): ... here.
1033 (ptmd_desc_type_node): Rename to ...
1034 (ptm_desc_type_node): ... here.
1035 * decl.c: Likewise.
1036 * rtti.c (ptmd_initializer): Rename to ...
1037 (ptm_initializer): ... here.
1038 (sythesize_tinfo_var): Adjust. Deal with pointer to member
1039 function.
1040 (create_tinfo_types): Adjust.
1041
1042 2000-05-25 Mark Mitchell <mark@codesourcery.com>
1043
1044 Finish implementation of VTTs.
1045 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
1046 CPTI_VTT_PARM_IDENTIFIER.
1047 (vtt_parm_identifier): New macro.
1048 (vtt_parm_type): Likewise.
1049 (BINFO_SUBVTT_INDEX): Likewise.
1050 (BINFO_VPTR_INDEX): Likewise.
1051 (struct lang_decl): Add vtt_parm.
1052 (DECL_VTT_PARM): New macro.
1053 (DECL_USE_VTT_PARM): Likewise.
1054 (DECL_NEEDS_VTT_PARM_P): Likewise.
1055 (get_vtt_name): Declare.
1056 (build_artifical_parm): Likewise.
1057 (fixup_all_virtual_upcast_offsets): Likewise.
1058 (expand_indirect_vtbls_init): Remove.
1059 * call.c (build_new_method_call): Pass the vtt to subobject
1060 constructors and destructors.
1061 * class.c (get_vtt_name): Give it external linkage.
1062 (build_clone): Handle the magic VTT parameters for clones.
1063 (clone_function_decl): Fix typo in comment.
1064 (build_vtt): Keep track of the indices in the VTTs where various
1065 entities are stored.
1066 (build_vtt_inits): Likewise.
1067 (dfs_build_vtt_inits): Likewise.
1068 (build_ctor_vtbl_group): Tweak type of construction vtables.
1069 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
1070 primary bases, when building construction vtables.
1071 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
1072 (initialize_predefined_identifiers): Add vtt_parm_identifier.
1073 (init_decl_processing): Initialize vtt_parm_type.
1074 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
1075 (lang_mark_tree): Make vtt_parm.
1076 * decl2.c (build_artificial_parm): New function.
1077 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
1078 (grokclassfn): Use build_artificial_parm.
1079 * init.c (initialize_vtbl_ptrs): Call
1080 fixup_all_virtual_upcast_offsets directly.
1081 (perform_member_init): Use the complete subobject destructor for
1082 member cleanups.
1083 (build_vtbl_address): New function.
1084 (expand_virtual_init): Handle VTTs.
1085 * optimize (maybe_clone_body): Likewise.
1086 * search.c (fixup_all_virtual_upcast_offsets): Give it external
1087 linkage.
1088 (expand_indirect_vtbls_init): Remove.
1089 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
1090 * tree.c (make_binfo): Make them bigger.
1091
1092 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
1093
1094 * inc/cxxabi.h (__pbase_type_info): Define, based on
1095 __pointer_type_info.
1096 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
1097 (__pointer_to_member_type_info): Likewise.
1098 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
1099 (__pointer_to_member_type_info::__is_pointer_p): Remove.
1100 (__pointer_type_info::__do_catch): Rename to ...
1101 (__pbase_type_info::__do_catch): ... here. Adjust.
1102 (__pbase_type_info::__pointer_catch): Implement.
1103 (__pointer_type_info::__pointer_catch): Adjust.
1104 (__pointer_to_member_type_info::__pointer_catch): Adjust.
1105
1106 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
1107
1108 * tinfo.h (__user_type_info::contained_virtual_p): New
1109 predicate.
1110 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
1111 shaped heirarchy.
1112 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
1113 diamond shaped heirarchy. Add early out for mixed diamond and
1114 duplicate shaped heirarchy.
1115
1116 2000-05-24 Mark Mitchell <mark@codesourcery.com>
1117
1118 * cp-tree.h (build_delete): Change prototype.
1119 (build_vec_delete): Likewise.
1120 * call.c (build_scoped_method_call): Use special_function_kind
1121 values to indicate the kind of destruction to be done.
1122 (build_method_call): Likewise.
1123 * decl.c (finish_destructor_body): Likewise.
1124 (maybe_build_cleanup_1): Likewise. Rename to ...
1125 (maybe_build_cleanup): ... this.
1126 * decl2.c (delete_sanity): Use special_function_kind
1127 values to indicate the kind of destruction to be done.
1128 (build_cleanup): Likewise.
1129 * init.c (perform_member_init): Likewise.
1130 (build_vec_delete_1): Likewise.
1131 (build_dtor_call): Simplify.
1132 (build_delete): Use special_function_kind
1133 values to indicate the kind of destruction to be done.
1134 (build_vbase_delete): Likewise.
1135 (build_vec_delete): Likewise.
1136
1137 * init.c (sort_member_init): Fix typo in error message generation
1138 code.
1139
1140 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
1141
1142 * semantics.c (begin_class_definition): make the packed
1143 attribute be sensitive to the "-fpack-struct" command line flag
1144
1145 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
1146
1147 Update new-abi upcast algorithm.
1148 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
1149 prototype and meaning of return value.
1150 (__si_class_type_info::__do_upcast): Likewise.
1151 (__vmi_class_type_info::__do_upcast): Likewise.
1152 * tinfo.cc (__class_type_info::__upcast_result): Replace
1153 whole2dst with part2dst. Adjust ctor.
1154 (__class_type_info::__do_upcast): Adjust call of worker function.
1155 (__class_type_info::__do_upcast): Adjust.
1156 (__si_class_type_info::__do_upcast): Adjust. Use parent's
1157 __do_upcast.
1158 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
1159 virtual base in diamond heirarchy bug.
1160
1161 2000-05-23 Mark Mitchell <mark@codesourcery.com>
1162
1163 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
1164 and bitfield to tinfo_fn_p.
1165 (DECL_TINFO_FN_P): Adjust.
1166 (SET_DECL_TINFO_FN_P): Likewise.
1167 (DECL_MUTABLE_P): Likewise.
1168 (DECL_C_BIT_FIELD): Likewise.
1169 (SET_DECL_C_BIT_FIELD): Likewise.
1170 (CLEAR_DECL_C_BIT_FIELD): Likewise.
1171 (DECL_UNINLINABLE): Likewise.
1172 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
1173 (handle_using_decl): Remove assertion.
1174 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
1175 to build FIELD_DECLs.
1176 (build_base_field): Likewise.
1177 (layout_class_type): Likewise.
1178 * decl.c (init_decl_processing): Likewise.
1179 (build_ptrmemfunc_type): Likewise.
1180 (grokdeclarator): Likewise.
1181 * decl2.c (grok_x_components): Likewise.
1182 * except.c (call_eh_info): Likewise.
1183 * init.c (init_init_processing): Likewise.
1184 * rtti.c (expand_class_desc): Likewise.
1185 (create_pseudo_type_info): Likewise.
1186 (get_vmi_pseudo_type_info): Likewise.
1187 (create_tinfo_types): Likewise.
1188 * ptree.c (print_lang_decl): Adjust.
1189 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
1190 before checking DECL_MUTABLE_P.
1191
1192 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
1193 parameters for template functions.
1194 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
1195 destructors as well as constructors.
1196
1197 2000-05-22 Mark Mitchell <mark@codesourcery.com>
1198
1199 * class.c (build_ctor_vtbl_group): Set inits.
1200 * optimize.c (maybe_clone_body): Set DECL_INLINE and
1201 DECL_THIS_INLINE appropriately for clones.
1202
1203 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
1204 (DECL_CONV_FN_P): Simplify.
1205 (DECL_OPERATOR): Remove.
1206 (language_to_string): Declare.
1207 * decl.c (duplicate_decls): Fix typo in comment.
1208 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
1209 (grok_op_properties): Use DECL_CONV_FN_P instead of
1210 IDENTIFIER_TYPENAME_P.
1211 * dump.c (dequeue_and_dump): Dump the language linkage of
1212 declarations.
1213 * error.c (language_to_string): Give it external linkage.
1214 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
1215 (implicitly_declare_fn): Set DECL_LANGUAGE.
1216 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
1217 IDENTIFIER_TYPENAME_P.
1218 (tsubst_decl): Likewise.
1219 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
1220 * semantics.c (finish_member_declaration): Don't mark members of
1221 classes declared in an extern "C" region as extern "C".
1222
1223 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1224
1225 * decl2.c (qualified_lookup_using_namespace): Look through
1226 namespace aliases.
1227
1228 * decl.c (push_using_decl): Return the old decl on namespace level.
1229
1230 2000-05-21 Mark Mitchell <mark@codesourcery.com>
1231
1232 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
1233 (VTT_NAME_PREFIX): New macro.
1234 (CTOR_VTBL_NAME_PREFIX): Likewise.
1235 (get_ctor_vtbl_name): New function.
1236 * class.c (get_vtable_name): Simplify.
1237 (get_vtt_name): New function.
1238 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
1239 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
1240 when a virtual base becomes primary.
1241 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
1242 VTTs.
1243 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
1244 additional parameters.
1245 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
1246 (initialize_array): New function.
1247 (build_vtt): Likewise.
1248 (build_vtt_inits): Likewise.
1249 (dfs_build_vtt_inits): Likewise.
1250 (dfs_fixup_binfo_vtbls): Likewise.
1251 (build_ctor_vtbl_group): Likewise.
1252 (initialize_vtable): Use initialize_array.
1253 (accumulate_vtbl_inits): Reimplement to handle construction
1254 vtables.
1255 (dfs_accumulate_vtbl_inits): Likewise.
1256 (bulid_vtbl_initializer): Adjust parameter name.
1257 * method.c (build_typename_overload): Remove #if 0'd code.
1258 (get_ctor_vtbl_name): New function.
1259 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
1260 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
1261
1262 * cp-tree.h (struct lang_type): Remove search_slot.
1263 (CLASSTYPE_SEARCH_SLOT): Remove.
1264 (emit_base_init): Change prototype.
1265 (initialize_vtbl_ptrs): Likewise.
1266 (expand_indirect_vtbls_init): Likewise.
1267 (clear_search_slots): Remove.
1268 * decl.c (lang_mark_tree): Don't mark search_slot.
1269 * init.c (initialize_vtbl_ptrs): Simplify.
1270 (emit_base_init): Likewise.
1271 * search.c (struct vbase_info): Document decl_ptr.
1272 (convert_pointer_to_single_level): Remove.
1273 (dfs_find_vbases): Remove.
1274 (dfs_init_base_pointers): Simplify.
1275 (dfs_clear_vbase_slots): Remove.
1276 (dfs_vtable_path_unmark): New function.
1277 (init_vbase_pointers): Simplify.
1278 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
1279 (expand_indirect_vtbls_init): Simplify. Don't call
1280 mark_all_temps_used.
1281 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
1282 initialize_vtbl_ptrs.
1283
1284 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
1285
1286 * except.c: Add static prototypes.
1287
1288 2000-05-20 H.J. Lu <hjl@gnu.org>
1289
1290 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
1291
1292 2000-05-19 Mark Mitchell <mark@codesourcery.com>
1293
1294 Don't create a separate copy of virtual bases for the
1295 CLASSTYPE_VBASECLASSES list.
1296 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
1297 (BINFO_FOR_VBASE): Remove.
1298 (CANONICAL_BINFO): Adjust.
1299 (binfo_for_vbase): New function.
1300 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
1301 instead of BINFO_FOR_VBASE.
1302 (build_vbase_pointer): Likewise.
1303 (build_secondary_vtable): Likewise.
1304 (dfs_mark_primary_bases): Likewise.
1305 (mark_primary_bases): Likewise.
1306 (layout_nonempty_base_or_field): Likewise.
1307 (dfs_set_offset_for_shared_vbases): Likewise.
1308 (dfs_set_offset_for_unshared_vbases): Likewise.
1309 (layout_virtual_bases): Likewise. Adjust for changes to the
1310 CLASSTYPE_VBASECLASSES list.
1311 (dump_class_hierarchy_r): Use binfo_for_vbase
1312 instead of BINFO_FOR_VBASE.
1313 (dump_class_hierarchy): Likewise.
1314 (finish_vtbls): Likewise.
1315 (build_vtbl_initializer): Adjust for changes to the
1316 CLASSTYPE_VBASECLASSES list.
1317 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
1318 * decl.c (finish_destructor_body): Adjust for changes to the
1319 CLASSTYPE_VBASECLASSES list.
1320 * init.c (sort_base_init): Use binfo_for_vbase.
1321 (construct_virtual_bases): Adjust for changes to the
1322 CLASSTYPE_VBASECLASSES list.
1323 (expand_member_init): Use binfo_for_vbase.
1324 (build_vbase_delete): Adjust for changes to the
1325 CLASSTYPE_VBASECLASSES list.
1326 * method.c (do_build_copy_constructor): Likewise.
1327 * rtti.c (get_base_offset): Use binfo_for_vbase.
1328 (expand_class_desc): Remove #if 0'd code.
1329 * search.c (struct vbase_info): Remove vbase_types.
1330 (get_base_distance): Use binfo_for_vbase.
1331 (lookup_field_queue_p): Use CANONICAL_BINFO.
1332 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
1333 (get_pure_virtuals): Adjust for changes to the
1334 CLASSTYPE_VBASECLASSES list.
1335 (dfs_find_vbases): Use binfo_for_vbase.
1336 (dfs_init_vbase_pointers): Likewise.
1337 (init_vbase_pointers): Don't initialize vi.vbase_types.
1338 (virtual_context): Use binfo_for_vbase.
1339 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
1340 CLASSTYPE_VBASECLASSES list.
1341 (expand_indirect_vtbls_init): Simplify.
1342 (dfs_get_vbase_types): Don't replicate virtual bases.
1343 (find_vbase_instance): Use binfo_for_vbase.
1344 (binfo_for_vbase): New function.
1345 * typeck.c (get_delta_difference): Use binfo_for_vbase.
1346
1347 2000-05-17 Mark Mitchell <mark@codesourcery.com>
1348
1349 * decl2.c (finish_anon_union): Generalize error messages to handle
1350 anonymous structures.
1351 * init.c (perform_member_init): Remove `name' parameter.
1352 (build_field_list): New function.
1353 (sort_member_init): Handle anonymous union initialization order
1354 correctly. Check for multiple initializations of the same union.
1355 (emit_base_init): Don't look up fields by name here.
1356 (expand_member_init): Record the result of name lookup for future
1357 reference.
1358 * typeck.c (build_component_ref): Fix formatting.
1359
1360 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
1361
1362 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
1363 * typeck.c (build_x_compound_expr): Replace warn_unused with
1364 warn_unused_value.
1365
1366 * decl2.c (lang_decode_option): Update -Wall unused flags by
1367 calling set_Wunused.
1368
1369 2000-05-16 Mark Mitchell <mark@codesourcery.com>
1370
1371 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
1372 * init.c (dfs_vtable_path_unmark): Remove.
1373 * search.c (marked_new_vtable_p): Likewise.
1374 (unmarked_new_vtable_p): Likewise.
1375 (dfs_search_slot_nonempty_p): Likewise.
1376 (dfs_mark): Likewise.
1377 (dfs_vtable_path_unmark): Likewise.
1378 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
1379 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
1380 (dfs_init_vbase_pointers): Remove special-case new ABI code.
1381 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
1382 (init_vbase_pointers): Simplify.
1383 (expand_indirect_vtbls_init): Likewise.
1384
1385 * class.c (copy_virtuals): New function.
1386 (build_primary_table): Use it.
1387 (build_secondary_vtable): Likewise.
1388 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
1389 indicate that no vcall offset is required.
1390 (add_virtual_function): Likewise.
1391 (modify_all_vtables): Likewise.
1392 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
1393 (dfs_accumulate_vtbl_inits): Likewise.
1394 (build_vtbl_initializer): Make changes to handle construction
1395 vtables.
1396 (dfs_build_vcall_offset_vtbl_entries): Likewise.
1397 (build_rtti_vtbl_entries): Likewise.
1398 (build_vtable_entries): Handle a NULL vcall_index.
1399
1400 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
1401
1402 * decl2.c (lang_decode_option): Fix thinko.
1403
1404 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
1405
1406 * except.c (check_handlers): New fn.
1407 * cp-tree.h: Declare it.
1408 * semantics.c (finish_handler_sequence): Call it.
1409 (finish_function_handler_sequence): Likewise.
1410 (finish_handler_parms): Set TREE_TYPE on the handler.
1411 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
1412 * search.c (get_base_distance_recursive): If protect>1, ignore
1413 special access.
1414 (get_base_distance): Don't reduce watch_access.
1415
1416 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
1417
1418 * lex.c: #include diagnostic.h.
1419 (lang_init_options): Set default prefixing rules.
1420
1421 * lang-options.h: Add -fdiagnostics-show-location=.
1422
1423 * decl2.c: #include diagnostic.h.
1424 (lang_decode_option): Handle -fdiagnostics-show-location=.
1425
1426 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
1427
1428 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
1429 * vec.cc: Revert my 2000-05-07 change.
1430
1431 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
1432
1433 * class.c (check_field_decls): Complain about non-static data
1434 members with same name as class in class with constructor.
1435
1436 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
1437
1438 * decl.c (grokdeclarator): Allow non-static data members with
1439 same name as class.
1440
1441 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
1442
1443 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
1444 and pending_inline.filename. Update prototypes.
1445 * decl.c (define_label): Constify filename parameter.
1446 * decl2.c (warn_if_unknown_interface): Constify local char *.
1447 * input.c Constify input_source.filename. Don't declare
1448 input_filename or lineno. Constify filename parameter to feed_input.
1449 * lex.c (init_parse): Constify parameter and return value.
1450 (cp_pragma_interface, cp_pragma_implementation): Constify
1451 filename argument.
1452 (reinit_parse_for_method, reinit_parse_for_block,
1453 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
1454 Constify local char *.
1455 * pt.c: Don't declare lineno or input_filename.
1456 (print_template_context, tsubst_friend_function, tsubst_decl,
1457 tsubst, instantiate_decl): Constify local char *.
1458 * semantics.c (expand_body): Constify local char *.
1459 * tree.c (build_srcloc): Constify filename parameter.
1460 * typeck.c (c_expand_asm_operands): Constify filename
1461 parameter.
1462
1463 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
1464
1465 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
1466 offsetof expansion.
1467
1468 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
1469
1470 * inc/cxxabi.h: Fix typos in comment.
1471 (__base_class_info::__offset): Use a static_cast.
1472
1473 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
1474
1475 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
1476 of std::size_t and std::ptrdiff_t respectively.
1477 * tinfo.cc: Likewise.
1478 * vec.cc: Likewise.
1479
1480 2000-05-06 Richard Henderson <rth@cygnus.com>
1481
1482 * typeck.c (build_c_cast): Don't warn integer->pointer size
1483 mismatch for constants.
1484
1485 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
1486
1487 * rtti.c (ptmd_initializer): Set non-public, if class is
1488 incomplete.
1489
1490 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
1491 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
1492 __cxa_vec_delete): Likewise.
1493 * tinfo.cc (__dynamic_cast): Likewise.
1494 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
1495 __cxa_vec_delete): Likewise.
1496
1497 2000-05-04 Mark Mitchell <mark@codesourcery.com>
1498
1499 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
1500 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
1501 (lang_decl_flags): Add vcall_offset.
1502 (THUNK_VCALL_OFFSET): Use it.
1503 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
1504 * method.c (make_thunk): Create the lang_decl here, not in
1505 emit_thunk.
1506 (emit_thunk): Make generic thunks into ordinary functions once
1507 they have been fed to expand_body.
1508 * semantics.c (expand_body): Set current_function_is_thunk here.
1509
1510 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1511
1512 * class.c (update_vtable_entry_for_fn): Prototype.
1513
1514 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
1515 and `tmpl'.
1516
1517 * search.c (dfs_build_inheritance_graph_order): Prototype.
1518
1519 2000-05-04 Mark Mitchell <mark@codesourcery.com>
1520
1521 * cp-tree.h (special_function_kind): Add various kinds of
1522 destructors.
1523 (special_function_p): New function.
1524 * class.c (overrides): Don't let one kind of destructor override
1525 another.
1526 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
1527 whether or not to instantiate a template.
1528 * tree.c (special_function_p): Define.
1529
1530 2000-05-03 Mark Mitchell <mark@codesourcery.com>
1531
1532 * cp-tree.def (THUNK_DECL): Remove.
1533 * cp-tree.h (DECL_THUNK_P): New macro.
1534 (DECL_NON_THUNK_FUNCTION_P): Likewise.
1535 (DECL_EXTERN_C_FUNCTION_P): Likewise.
1536 (SET_DECL_THUNK_P): Likewise.
1537 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
1538 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
1539 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
1540 * decl.c (decls_match): Use DECL_EXTERN_C_P.
1541 (duplicate_decls): Likewise.
1542 (pushdecl): Likewise. Adjust thunk handling.
1543 (grokfndecl): Use DECL_EXTERN_C_P.
1544 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
1545 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
1546 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
1547 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
1548 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
1549 DECL_NO_STATIC_CHAIN.
1550 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
1551 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
1552 * search.c (covariant_return_p): Remove THUNK_DECL handling.
1553 * ir.texi: Update.
1554
1555 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
1556
1557 * tree.c (walk_tree): Set lineno.
1558
1559 2000-05-01 Mark Mitchell <mark@codesourcery.com>
1560
1561 * exception.cc: Update license notice.
1562 * new.cc: Likewise.
1563 * new1.cc: Likewise.
1564 * new2.cc: Likewise.
1565 * tinfo.cc: Likewise.
1566 * tinfo2.cc: Likewise.
1567 * vec.cc: Likewise.
1568 * inc/cxxabi.h: Likewise.
1569 * inc/exception: Likewise.
1570 * inc/new: Likewise.
1571 * inc/new.h: Likewise.
1572 * inc/typeinfo: Likewise.
1573
1574 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
1575
1576 * tree.c (build_target_expr_with_type): If we already have a
1577 TARGET_EXPR, just return it.
1578
1579 * optimize.c (initialize_inlined_parameters): Don't generate an
1580 EXPR_STMT if we can just use DECL_INITIAL.
1581 * decl.c (emit_local_var): Only make the initialization a
1582 full-expression if stmts_are_full_exprs_p.
1583
1584 2000-05-01 Mark Mitchell <mark@codesourcery.com>
1585
1586 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
1587 macro.
1588 * call.c (standard_conversion): Use it.
1589 (direct_reference_binding): Likewise.
1590 (build_over_call): Likewise.
1591 (is_properly_derived_from): Likewise.
1592 (compare_ics): Likewise.
1593 * class.c (resolves_to_fixed_type_p): Likewise.
1594 * optimize.c (declare_return_variable): Likewise.
1595 * pt.c (is_specialization_of): Likewise.
1596 (unify): Likewise.
1597 * typeck.c (comp_target_parms): Likeiwse.
1598 (build_static_cast): Likewise.
1599 (build_reinterpret_cast): Likewise.
1600 (build_const_cast): Likewise.
1601 (comp_ptr_ttypes_real): Likewise.
1602 (comp_ptr_ttypes_const): Likewise.
1603 * typeck2.c (process_init_constructor): Likewise.
1604
1605 2000-04-30 Scott Snyder <snyder@fnal.gov>
1606
1607 * decl.c (finish_destructor_body): Use the base destructor when
1608 destroying virtual bases.
1609
1610 2000-04-30 Mark Mitchell <mark@codesourcery.com>
1611
1612 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
1613 STMT_EXPRs.
1614 * optimize.c (struct inline_data): Add target_exprs field.
1615 (declare_return_variable): When a function returns an aggregate,
1616 use the variable declared in the TARGET_EXPR as the remapped
1617 DECL_RESULT.
1618 (expand_call_inline): Update the pending target_exprs stack.
1619 (optimize_function): Initialize the stack.
1620
1621 * decl2.c (finish_file): Fix typo in comment.
1622
1623 * method.c (emit_thunk): Don't try to return a `void' value.
1624
1625 * optimize.c (initialize_inlined_parameters): If the parameter is
1626 addressable, we need to make a new VAR_DECL, even if the
1627 initializer is constant.
1628
1629 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
1630
1631 * decl.c (grok_op_properties): Add an extra check of argtypes.
1632
1633 2000-04-27 Mark Mitchell <mark@codesourcery.com>
1634
1635 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
1636 variables.
1637 (initialize_inlined_parameters): Try to avoid creating new
1638 VAR_DECLs.
1639
1640 2000-04-27 Alex Samuel <samuel@codesourcery.com>
1641
1642 * lex.c (my_get_run_time): Remove.
1643 (init_filename_times): Use get_run_time instead of my_get_run_time.
1644 (check_newline): Likewise.
1645 (dump_time_statistics): Likewise.
1646 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
1647 of computing elapsed time explicitly.
1648
1649 2000-04-26 Mark Mitchell <mark@codesourcery.com>
1650
1651 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
1652 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
1653 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
1654 before calling decl_constant_value.
1655 * class.c (check_bitfield_decl): Likewise.
1656 * cvt.c (ocp_convert): Likewise.
1657 (convert): Likewise.
1658 * decl.c (compute_array_index_type): Likewise.
1659 (build_enumerator): Likewise.
1660 * decl2.c (check_cp_case_value): Likewise.
1661 * pt.c (convert_nontype_argument): Likewise.
1662 (tsubst): Likewise.
1663 * typeck.c (decay_conversion): Likewise.
1664 (build_compound_expr): Likewise.
1665 (build_reinterpret_cast): Likewise.
1666 (build_c_cast): Likewise.
1667 (convert_for_assignment): Likewise.
1668
1669 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
1670
1671 * decl.c (finish_function): Don't play games with DECL_INLINE.
1672
1673 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
1674
1675 * ir.texi: Correct typo.
1676
1677 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1678
1679 * decl.c (grokdeclarator): Reject VLAs as members.
1680
1681 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
1682
1683 * call.c (standard_conversion): Accept conversion between
1684 COMPLEX_TYPEs.
1685
1686 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
1687
1688 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
1689
1690 * decl2.c (finish_file): Remove double setup for accounting
1691 compile time.
1692
1693 2000-04-24 Robert Lipe <robertlipe@usa.net>
1694
1695 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
1696
1697 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
1698
1699 * new.cc (set_new_handler): Needs to be in std::.
1700
1701 2000-04-23 Mark Mitchell <mark@codesourcery.com>
1702
1703 * cp-tree.h (lang_decl): Remove pretty_function_p.
1704 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
1705 language-specific node.
1706 * decl.c (cp_make_fname_decl): Use build_decl, not
1707 build_lang_decl, to build the variables.
1708 (grokvardecl): Don't call build_lang_decl for local variables in
1709 templates.
1710 (grokdeclarator): Don't call build_lang_decl for local type
1711 declarations in templates.
1712 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
1713 zero'd memory, rather than calling memset.
1714 * pt.c: Include hashtab.h.
1715 (local_specializations): New variable.
1716 (retrieve_local_specialization): Use it.
1717 (register_local_specialization): Likewise.
1718 (tsubst_decl): Don't assume local variables have
1719 DECL_LANG_SPECIFIC.
1720 (instantiate_decl): Set up local_specializations.
1721 * Makefile.in (HTAB_H): New variable.
1722
1723 2000-04-23 Richard Henderson <rth@cygnus.com>
1724
1725 * typeck.c (c_expand_asm_operands): Restore the original
1726 contents of the output list.
1727
1728 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
1729
1730 * ir.texi: Document complex number representation.
1731
1732 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
1733
1734 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
1735 (target_incomplete_p): New function.
1736 (tinfo_base_init): Create comdat NTBS name variable.
1737 (ptr_initializer): Add non_public parameter. Calculate it.
1738 (ptmd_initializer): Likewise.
1739 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
1740 (create_real_tinfo_var): Add non_public parameter. Use it.
1741 Push proxy into global namespace.
1742 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
1743 New enumeration.
1744 * inc/typeinfo (type_info::before, type_info::operator==):
1745 Compare __name addresses.
1746
1747 * tinfo2.cc: Remove new-abi builtins comment.
1748
1749 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
1750
1751 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
1752
1753 * call.c (joust): Exit early if we get the same function, too.
1754
1755 * decl2.c (key_method): Return NULL_TREE for template classes.
1756 (import_export_class): Don't need to check for template classes.
1757
1758 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
1759
1760 * lex.c: Remove references to cccp.c.
1761
1762 2000-04-18 Mark Mitchell <mark@codesourcery.com>
1763
1764 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
1765 volatile_memfunc. Add destructor_attr. Adjust dummy.
1766 (DECL_DESTRUCTOR_P): Use destructor_attr.
1767 (DECL_CONST_MEMFUNC_P): Reimplement.
1768 (DECL_VOLATILE_MEMFUNC_P): Remove.
1769 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
1770 (overrides): Use DECL_DESTRUCTOR_P.
1771 (check_for_override): Likewise.
1772 * decl.c (start_function): Likewise.
1773 * decl2.c (grokfclassfn): Likewise.
1774 (check_classfn): Likewise.
1775 (grok_function_init): Likewise.
1776
1777 2000-04-17 Mark Mitchell <mark@codesourcery.com>
1778
1779 * decl2.c (grokfield): Issue error on illegal data member
1780 declaration.
1781
1782 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
1783
1784 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
1785
1786 2000-04-16 Mark Mitchell <mark@codesourcery.com>
1787
1788 * class.c (build_vtable_entry): Don't build thunks for type-info
1789 functions.
1790
1791 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
1792
1793 * decl.c (decls_match): Allow a redeclaration of a builtin to
1794 specify args while the builtin did not.
1795
1796 2000-04-15 Mark Mitchell <mark@codesourcery.com>
1797
1798 * cp-tree.def (THUNK_DECL): Add to documentation.
1799 * cp-tree.h (flag_huge_objects): Declare.
1800 * class.c (modify_vtable_entry): Tidy.
1801 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
1802 Calculate delta appropriately for the new ABI.
1803 (dfs_modify_vtables): Use it.
1804 (modify_all_vtables): Fix thinko in code to add overriding copies
1805 of functions to primary vtables.
1806 (build_clone): Fix typo in comment.
1807 (clone_function_decl): Correct order of destructors in vtable.
1808 (build_vbase_offset_vtbl_entries): Adjust comment.
1809 (dfs_vcall_offset_queue_p): Remove.
1810 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
1811 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
1812 (build_vtable_entry): Correct check for pure virtual functions.
1813 Don't declare flag_huge_objects.
1814 * decl.c (flag_huge_objects): Remove declaration.
1815 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
1816 Use int_size_in_bytes.
1817 (emit_thunk): Handle vcall offset thunks.
1818
1819 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1820
1821 * decl2.c (parse_time, varconst_time): Delete declarations.
1822 (finish_file): Delete LINENO declaration.
1823 START_TIME and THIS_TIME now long.
1824
1825 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
1826
1827 * class.c (build_base_field): Reformat comment.
1828
1829 * inc/cxxabi.h (stddef.h): Comment inclusion.
1830 (__base_class_info::__offset): Comment shift.
1831
1832 2000-04-12 Mark Mitchell <mark@codesourcery.com>
1833
1834 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
1835 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
1836 (cp_push_exception_identifier): New macro.
1837 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
1838 (DECL_BASE_DESTRUCTOR_P): Likewise.
1839 (DECL_DELETING_DESTRUCTOR_P): Likewise.
1840 (get_vtbl_decl_for_binfo): Fix formatting.
1841 (in_charge_arg_for_name): New macro.
1842 (maybe_build_cleanup_and_delete): Remove declaration.
1843 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
1844 (in_charge_arg_for_name): New function.
1845 (build_new_method_call): Use it. Handle cloned destructors.
1846 (build_clone): Don't make the base constructor virtual.
1847 Automatically defer generated functions.
1848 (clone_function_decl): Handle destructors, too.
1849 (clone_constructors_and_destructors): Likewise.
1850 (create_vtable_ptr): Don't create a vtable entry for a cloned
1851 function.
1852 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
1853 (initialize_predefined_identifiers): Update appropriately.
1854 (finish_destructor_body): Simplify.
1855 (maybe_build_cleanup_and_delete): Remove.
1856 * except.c (expand_throw): Handle new-ABI destructors.
1857 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
1858 (build_dtor_call): New function.
1859 (build_delete): Use it. Simplify.
1860 * optimize.c (maybe_clone_body): Handle destructors.
1861 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
1862
1863 * exception.cc (cleanup_fn): New typedef.
1864 (CALL_CLEANUP): New macro.
1865 (cp_eh_info): Use them.
1866 (__cp_push_exception): Likewise.
1867 (__cp_pop_exception): Likewise.
1868
1869 2000-04-11 Mark Mitchell <mark@codesourcery.com>
1870
1871 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
1872 (complete_dtor_identifier): New macro.
1873 (CLASSTYPE_FIRST_CONVERSION): Remove.
1874 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
1875 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
1876 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
1877 (CLASSTYPE_CONSTRUCTORS): Likewise.
1878 (CLASSTYPE_DESTRUCTORS): Likewise.
1879 (lang_decl): Add cloned_function.
1880 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
1881 (DECL_BASE_CONSTRUCTOR_P): Likewise.
1882 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
1883 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
1884 (DECL_CLONED_FUNCTION_P): Likewise.
1885 (DECL_CLONED_FUNCTION): Likewise.
1886 (clone_function_decl): Declare.
1887 (maybe_clone_body): Likewise.
1888 * call.c (build_user_type_conversion_1): Call complete object
1889 constructors in the new ABI.
1890 (build_new_method_call): Don't add in-charge parameters under the
1891 new ABI.
1892 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
1893 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
1894 CLASSTYPE_DESTRUCTOR_SLOT.
1895 (build_clone): New function.
1896 (clone_function_decl): Likewise.
1897 (clone_constructors_and_destructors): Likewise.
1898 (check_bases_and_members): Use it.
1899 * decl.c (iniitialize_predefined_identifiers): Initialize
1900 complete_dtor_identifier.
1901 (finish_function): Don't add extra code to a clone.
1902 (lang_mark_tree): Mark cloned_function.
1903 * decl2.c (mark_used): Don't bother trying to instantiate things
1904 we synthesized.
1905 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
1906 * method.c (set_mangled_name_for_decl): Don't treat clones as
1907 constructors.
1908 (synthesize_method): Sythesize cloned functions, not the clones.
1909 * optimize.c (inline_data): Update comment on ret_label.
1910 (remap_block): Don't assume DECL_INITIAL exists.
1911 (copy_body_r): Allow ret_label to be NULL.
1912 (maybe_clone_body): Define.
1913 * pt.c (tsubst_decl): Handle clones.
1914 (instantiate_clone): New function.
1915 (instantiate_template): Use it.
1916 (set_mangled_name_for_template_decl): Don't treat clones as
1917 constructors.
1918 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
1919 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
1920 * semantics.c (expand_body): Clone function bodies as necessary.
1921
1922 * optimize.c (remap_decl): Avoid sharing structure for arrays
1923 whose size is only known at run-time.
1924 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
1925
1926 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
1927 to has_in_charge_parm_p.
1928 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
1929 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
1930 (DECL_COPY_CONSTRUCTOR_P): New macro.
1931 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
1932 (build_user_type_conversion_1): Likewise.
1933 (convert_like_real): Likewise.
1934 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
1935 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
1936 (copy_args_p): Likewise.
1937 (grok_ctor_properties): Likewise.
1938 (start_function): Likewise.
1939 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
1940 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
1941 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
1942 * method.c (do_build_copy_constructor): Use
1943 DECL_HAS_IN_CHARGE_PARM_P.
1944 (synthesize_method): Likewise.
1945 * pt.c (instantiate_template): Remove goto.
1946 * tree.c (build_cplus_method_type): Remove mention of obstacks in
1947 comment.
1948
1949 * cp-tre.h (finish_function): Change prototype.
1950 * decl.c (end_cleanup_fn): Adjust caller.
1951 (finish_function): Take only one parameter.
1952 * decl2.c (finish_objects): Adjust caller.
1953 (finish_static_storage_duration_function): Likewise.
1954 * method.c (emit_thunk): Likewise.
1955 * parse.y: Likewise.
1956 * parse.c: Regenerated.
1957 * pt.c (instantiate_decl): Likewise.
1958 * rtti.c (synthesize_tinfo_fn): Likewise.
1959 * semantics.c (expand_body): Likewise.
1960
1961 * cp-tree.h (copy_decl): New function.
1962 * class.c (finish_struct_1): Use it.
1963 * lex.c (copy_decl): Define it.
1964 * pt.c (tsubst_decl): Likewise.
1965 * tree.c (copy_template_template_parm): Likewise.
1966
1967 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
1968 has_nonpublic_assign_ref.
1969 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
1970 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
1971 * class.c (finish_struct_methods): Don't set
1972 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
1973 (interface_only): Don't declare.
1974 (interface_unknown): Likewise.
1975
1976 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1977
1978 * tree.h (HAVE_TEMPLATES): Remove definition.
1979 * lang-options.h (-fthis-is-variable): Remove documentation.
1980
1981 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
1982
1983 * class.c (instantiate_type): Handle object-relative template-id.
1984
1985 * semantics.c (finish_expr_stmt): Call convert_to_void here.
1986 * decl.c (cplus_expand_expr_stmt): Not here.
1987
1988 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
1989 Initialize exprtype earlier.
1990
1991 * parse.y (fn.def1): Check for defining types in return types.
1992
1993 * decl.c (check_tag_decl): Notice extra fundamental types.
1994 Diagnose empty decls in classes, too.
1995
1996 * decl.c (grokdeclarator): Don't override an anonymous name if no
1997 declarator was given.
1998
1999 * cvt.c (convert_to_void): Call resolve_offset_ref.
2000
2001 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
2002
2003 * decl2.c (decl_namespace): Handle getting a type.
2004
2005 * typeck.c (build_c_cast): Re-enable warning for cast between
2006 pointer and integer of different size.
2007
2008 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
2009
2010 * inc/cxxabi.h (__pointer_type_info): Add restrict and
2011 incomplete flags.
2012 (__pointer_type_info::__pointer_catch): New virtual function.
2013 (__pointer_to_member_type_info): Derive from
2014 __pointer_type_info. Adjust.
2015 (__pointer_to_member_type_info::__do_catch): Remove.
2016 (__pointer_to_member_type_info::__is_pointer_p): Declare.
2017 (__pointer_to_member_type_info::__pointer_catch): Declare.
2018 * rtti.c (qualifier_flags): Add restrict flag.
2019 (ptmd_initializer): Reorder members.
2020 (create_tinfo_types): Expand comments. Reorder
2021 ptmd_desc_type_node members.
2022 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
2023 Implement.
2024 (__pointer_type_info::__do_catch): Move specific code into
2025 __pointer_catch. Call it.
2026 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
2027 specific catch checking. Fix void conversion check.
2028 (__pointer_to_member_type_info::__do_catch): Remove.
2029 (__pointer_to_member_type_info::__pointer_catch): Implement.
2030
2031 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2032
2033 * lex.c (init_parse): Remove traces of classof and headof.
2034 * decl2.c (flag_operator_names): Default to 1.
2035 (lang_decode_option): Do not set it for -ansi.
2036
2037 2000-04-09 Mark Mitchell <mark@codesourcery.com>
2038
2039 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
2040 (DECL_MAIN_VARIANT): Remove.
2041 * decl.c (duplicate_decls): Don't set it.
2042 (start_function): Likewise.
2043 (lang_mark_tree): Don't mark it.
2044 * decl2.c (defer_fn): Don't use it.
2045 * lex.c (retrofit_lang_decl): Don't set it.
2046 * pt.c (tsubst_decl): Likewise.
2047 * ptree.c (print_lang_decl): Don't print it.
2048 * typeck.c (mark_addressable): Don't use it.
2049
2050 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
2051
2052 * vec.cc: Include <new> and <exception>.
2053 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
2054 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
2055 terminate.
2056 (__cxa_vec_delete): Catch dtor exceptions.
2057
2058 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
2059
2060 Prepend __ to implementation defined names.
2061 * inc/typeinfo (type_info): Rename _name to __name.
2062 (type_info::type_info): Rename parameter.
2063 (type_info::operator==, type_info::operator!=,
2064 type_info::before): Likewise.
2065 (type_info::is_pointer_p, type_info::is_function_p,
2066 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
2067 parameters.
2068 * inc/cxxabi.h
2069 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
2070 (__pointer_type_info::__pointer_type_info): Likewise.
2071 (__pointer_type_info::is_pointer_p,
2072 __pointer_type_info::do_catch): Prepend __. Rename parameters.
2073 (__array_type_info::__array_type_info): Rename parameters.
2074 (__function_type_info::__function_type_info): Likewise.
2075 (__function_type_info::is_function_p): Prepend __.
2076 (__enum_type_info::__enum_type_info): Rename parameters.
2077 (__pointer_to_member_type_info::__pointer_to_member_type_info):
2078 Likewise.
2079 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
2080 parameters.
2081 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
2082 (__class_type_info::__class_type_info): Rename parameters.
2083 (__class_type_info::sub_kind): Prepend __. Adjust member names.
2084 (__class_type_info::upcast_result,
2085 __class_type_info::dyncast_result): Prepend __. Move definition
2086 into tinfo.cc.
2087 (__class_type_info::do_upcast, __class_type_info::do_catch,
2088 __class_type_info::find_public_src,
2089 __class_type_info::do_dyncast,
2090 __class_type_info::do_find_public_src): Prepend __. Rename
2091 parameters.
2092 (__si_class_type_info::__si_class_type_info): Rename parameters.
2093 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
2094 __si_class_type_info::do_find_public_src): Prepent __. Rename
2095 parameters.
2096 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
2097 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
2098 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
2099 parameters.
2100 (__dynamic_cast): Rename parameters.
2101 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
2102 type_info::do_catch, type_info::do_upcast): Prepend __.
2103 (contained_p, public_p, virtual_p, contained_public_p,
2104 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
2105 (__class_type_info::do_catch,
2106 __class_type_info::do_upcast): Prepend __. Adjust.
2107 (__class_type_info::__upcast_result,
2108 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
2109 Adjust.
2110 (__class_type_info::find_public_src): Prepend __. Adjust.
2111 (__class_type_info::do_find_public_src,
2112 __si_class_type_info::do_find_public_src,
2113 __vmi_class_type_info::do_find_public_src): Likewise.
2114 (__class_type_info::do_dyncast,
2115 __si_class_type_info::do_dyncast,
2116 __vmi_class_type_info::do_dyncast): Likewise.
2117 (__class_type_info::do_upcast,
2118 __si_class_type_info::do_upcast,
2119 __vmi_class_type_info::do_upcast): Likewise.
2120 (__dynamic_cast): Adjust.
2121 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
2122 (__function_type_info::is_function_p): Likewise.
2123 (__pointer_type_info::do_catch): Likewise. Adjust.
2124 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
2125 (__throw_type_match_rtti_2): Adjust.
2126 (__is_pointer): Adjust.
2127
2128 2000-04-08 Mark Mitchell <mark@codesourcery.com>
2129
2130 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
2131 (complete_ctor_identifier): New macro.
2132 (special_function_kind): Add sfk_copy_constructor and
2133 sfk_assignment_operator.
2134 (LOOKUP_HAS_IN_CHARGE): Remove.
2135 (cons_up_default_function): Rename to ...
2136 (implicitly_declare_fn): ... this.
2137 * call.c (build_new_method_call): Add in-charge parameters for
2138 constructors here.
2139 * class.c (add_implicitly_declared_members): Change parameter name
2140 from cant_have_assignment to cant_have_const_assignment.
2141 Replace calls to cons_up_default_function to implicitly_declare_fn.
2142 * cvt.c (ocp_convert): Use complete_ctor_identifier.
2143 * decl.c (initialize_predefined_identifiers): Initialize it.
2144 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
2145 complex expression.
2146 * init.c (expand_default_init): Don't calculate the in-charge
2147 parameter here.
2148 (build_new_1): Likewise.
2149 * lex.c (cons_up_default_function): Move to method.c.
2150 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
2151 (implicitly_declare_fn): New function.
2152 * typeck.c (build_static_cast): Use complete_ctor_identifier.
2153 (build_modify_expr): Likewise.
2154 * typeck2.c (build_functional_cast): Likewise.
2155
2156 Under the new ABI, constructors don't return `this'.
2157 * cp-tree.h (warn_reorder): Declare.
2158 (special_function_kind): New enum.
2159 (global_base_init_list): Remove declaration.
2160 (emit_base_init): Don't return a value.
2161 (check_base_init): Don't declare.
2162 (is_aggr_typedef): Likewise.
2163 * decl.c (check_special_function_return_type): New function.
2164 (return_types): Remove.
2165 (grokdeclarator): Use check_special_function_return_type.
2166 (start_function): Don't initialize ctor_label under the new ABI.
2167 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
2168 * init.c (begin_init_stmts): Move to top of file.
2169 (finish_init_stmts): Likewise.
2170 (warn_reorder): Don't declare.
2171 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
2172 value.
2173 (check_base_init): Remove.
2174 (is_aggr_typedef): Likewise.
2175 (build_new_1): Don't use the return value of a constructor.
2176 * semantics.c (setup_vtbl_ptr): Don't use the return value
2177 of emit_base_init.
2178 * typeck.c (check_return_expr): Don't magically convert return
2179 statements into `return this' in constructors under the new ABI.
2180
2181 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
2182 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
2183 (base_ctor_identifier): New macro.
2184 (base_dtor_identifier): Likewise.
2185 (deleting_dtor_identifier): Likewise.
2186 * decl.c: Don't include obstack.h.
2187 (obstack_chunk_alloc): Don't define.
2188 (obstack_chunk_free): Likewise.
2189 (struct predefined_identifier): New type.
2190 (initialize_predefined_identifiers): New function.
2191 (init_decl_processing): Use it.
2192 (debug_temp_inits): Remove.
2193 (start_method): Don't call preserve_data.
2194 (hack_incomplete_structures): Update comment.
2195 * init.c (init_init_processing): Don't initialize
2196 nelts_identifier.
2197 (build_offset_rf): Remove dead code.
2198 (build_delete): Use CLASSTYPE_N_BASECLASSES.
2199 * search.c (init_search_processing): Don't initialize
2200 vptr_identifier.
2201
2202 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2203
2204 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
2205 some sign_compare warnings.
2206
2207 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
2208
2209 Rename abi::__vmi_class_type_info members.
2210 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
2211 base_list, detail_masks members to vmi_flags, vmi_base_count,
2212 vmi_bases and vmi_flags_masks respectively.
2213 (__vmi_class_type_info::vmi_flags_masks): Rename
2214 details_unknown_mask to flags_unknown_mask.
2215 * tinfo.cc (__class_type_info::do_upcast): Adjust.
2216 (__vmi_class_type_info::do_find_public_src): Adjust.
2217 (__vmi_class_type_info::do_dyncast): Adjust.
2218 (__vmi_class_type_info::do_upcast): Adjust.
2219
2220 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
2221
2222 * tinfo.cc (convert_to_base): New function.
2223 (get_vbase_offset): Remove. Move into convert_to_base.
2224 (__vmi_class_type_info::do_find_public_src): Adjust.
2225 (__vmi_class_type_info::do_dyncast): Adjust.
2226 (__vmi_class_type_info::do_upcast): Adjust.
2227
2228 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
2229
2230 * tinfo.cc (operator=): Use __builtin_strcmp.
2231 * tinfo2.cc (before): Likewise.
2232
2233 2000-04-06 Mark Mitchell <mark@codesourcery.com>
2234
2235 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
2236 (DECL_SAVED_INLINE): Rename to ...
2237 (DECL_DEFERRED_FN): ... this.
2238 (in_function_p): Remove declaration.
2239 (mark_inline_for_output): Rename to ...
2240 (defer_fn): ... this.
2241 * decl.c (finish_function): Adjust call to mark_inline_for_output.
2242 (in_function_p): Remove definition.
2243 * decl2.c (saved_inlines): Rename to ...
2244 (deferred_fns): ... this.
2245 (saved_inlines_used): Rename to ...
2246 (deferred_fns_used): ... this.
2247 (mark_inline_for_output): Rename to ...
2248 (defer_fn): ... this.
2249 (finish_file): Adjust accordingly.
2250 (init_decl2): Likewise.
2251 * lex.c (cons_up_default_function): Likewise.
2252 * pt.c (mark_decl_instantiated): Likewise.
2253 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
2254 circumstances.
2255 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
2256 * semantics.c (expand_body): Defer more functions.
2257
2258 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
2259
2260 * vec.cc: New file.
2261 * Make-lang.in (CXX_LIB2FUNCS): Add it.
2262 (vec.o): Build it.
2263 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2264 __cxa_vec_delete): Declare.
2265
2266 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
2267
2268 * rtti.c (dfs_class_hint_mark): New static function.
2269 (dfs_class_hint_unmark): New static function.
2270 (class_hint_flags): Use them.
2271
2272 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
2273
2274 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
2275
2276 2000-04-05 Mark Mitchell <mark@codesourcery.com>
2277
2278 * cp-tree.h (instantiate_decl): Change prototype.
2279 * decl2.c (mark_used): Adjust call.
2280 * optimize.c (inlinable_function_p): Adjust handling of templates.
2281 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
2282 (do_type_instantiation): Likewise.
2283 (instantiate_decl): Defer more templates.
2284 (instantiate_pending_templates): Adjust logic to handle inline
2285 friend functions.
2286
2287 * Makefile.in (GGC_H): New variable. Use it throughout in place
2288 of ggc.h.
2289
2290 * call.c: Don't include obstack.h. Include ggc.h.
2291 (obstack_chunk_alloc): Don't define.
2292 (obstack_chunk_free): Likewise.
2293 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
2294 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
2295 (pop_switch): Free it.
2296
2297 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
2298
2299 * dump.c (dequeue_and_dump): Don't try to print the bit_position
2300 if we don't have a DECL_FIELD_OFFSET.
2301
2302 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
2303
2304 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
2305 special_function_p.
2306
2307 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2308
2309 * cfns.gperf (hash, libc_name_p): Prototype.
2310
2311 * rtti.c (build_dynamic_cast_1): Constification.
2312
2313 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
2314
2315 * semantics.c (deferred_type_access_control): Prototype.
2316
2317 2000-04-04 Mark Mitchell <mark@codesourcery.com>
2318
2319 Correct many new ABI issues regarding vbase and vcall offset
2320 layout.
2321 * cp-tree.h (BINFO_VTABLE): Document.
2322 (struct lang_type): Tweak formatting.
2323 (BINFO_PRIMARY_BINFO): Add to documentation.
2324 (CLASSTYPE_VSIZE): Fix typo in comment.
2325 (CLASSTYPE_VBASECLASSES): Update documentation.
2326 (BINFO_VBASE_MARKED): Remove.
2327 (SET_BINFO_VBASE_MARKED): Likewise.
2328 (CLEAR_BINFO_VBASE_MARKED): Likewise.
2329 (BINFO_FIELDS_MARKED): Remove.
2330 (SET_BINFO_FIELDS_MARKED): Likewise.
2331 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
2332 (enum access_kind): New enumeration.
2333 (num_extra_vtbl_entries): Remove declaration.
2334 (size_extra_vtbl_entries): Likewise.
2335 (get_vtbl_decl_for_binfo): New function.
2336 (dfs_vbase_unmark): Remove declaration.
2337 (mark_primary_bases): Likewise.
2338 * class.c (SAME_FN): Remove.
2339 (struct vcall_offset_data_s): Move definition.
2340 (build_vbase_pointer): Use `build', not `build_binary_op', to
2341 access the vbase pointer under the new ABI.
2342 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
2343 (build_primary_vtable): Likewise.
2344 (dfs_mark_primary_bases): Move here from search.c.
2345 (mark_primary_bases): Likewise.
2346 (determine_primary_bases): Under the new ABI, don't make a base
2347 class a primary base just because we don't yet have any virtual
2348 functions.
2349 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
2350 (num_vfun_entries): Remove.
2351 (dfs_count_virtuals): Likewise.
2352 (num_extra_vtbl_entries): Likewise.
2353 (size_extra_vtbl_entries): Likewise.
2354 (layout_virtual_bases): Iterate in inheritance graph order under
2355 the new ABI.
2356 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
2357 indicate that a vfield is present.
2358 (init_class_processing): Initialize access_public_node, etc., from
2359 ak_public, etc.
2360 (get_vtbl_decl_for_binfo): New function.
2361 (dump_class_hierarchy_r): Likewise.
2362 (dump_class_hierarchy): Use it.
2363 (finish_vtbls): Build the vtbls in inheritance graph order.
2364 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
2365 (initialize_vtable): Use get_vtbl_decl_for_binfo.
2366 (accumulate_vtbl_inits): Add comments explaining why a pre-order
2367 walk is required.
2368 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
2369 where the vptr points, even for primary vtables.
2370 (build_vtbl_initializer): Adjust handling of vbase and vcall
2371 offsets.
2372 (build_vcall_and_vbase_vtable_entries): New function.
2373 (dfs_build_vbase_offset_vtbl_entries): Remove.
2374 (build_vbase_offset_vtbl_entries): Reimplement.
2375 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
2376 were already handled in a primary base class vtable.
2377 (build_vcall_offset_vtbl_entries): Adjust.
2378 (build_rtti_vtbl_entries): Adjust.
2379 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
2380 * init.c (expand_virtual_init): Simplify.
2381 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
2382 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
2383 * search.c (BINFO_ACCESS): New macro.
2384 (SET_BINFO_ACCESS): Likewise.
2385 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
2386 (access_in_type): Likewise.
2387 (dfs_accessible_p): Likewise.
2388 (protected_accessible_p): Likewise.
2389 (lookup_fnfields_1): Adjust documentation.
2390 (dfs_mark_primary_bases): Move to class.c
2391 (mark_primary_bases): Likewise.
2392 (dfs_vbase_unmark): Remove.
2393 (virtual_context): Use BINFO_FOR_VBASE.
2394 (dfs_get_vbase_types): Simplify.
2395 (dfs_build_inheritance_graph_order): New function.
2396 (get_vbase_types): Use it.
2397 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
2398
2399 * tinfo.cc (get_vbase_offset): New function.
2400 (__vmi_class_type_info::do_find_public_src): Use it.
2401 (__vmi_class_type_info::do_dyncast): Likewise.
2402 (__vmi_class_type_info::do_upcast): Likewise.
2403
2404 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
2405
2406 * lang-specs.h: Pass -fno-show-column to the preprocessor.
2407
2408 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
2409
2410 * rtti.c (class_hint_flags): Rename flags.
2411 (class_initializer): Remove flags.
2412 (synthesize_tinfo_var): Combine offset and flags. Add flags
2413 for __vmi_class_type_info.
2414 (create_tinfo_types): Remove flags from __class_type_info and
2415 __si_class_type_info. Merge flags and offset from
2416 base_class_type_info.
2417 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
2418 (__base_class_info::is_virtual_p): Adjust.
2419 (__base_class_info::is_public_p): Adjust.
2420 (__base_class_info::offset): New accessor.
2421 (__class_type_info::details): Remove member.
2422 (__class_type_info::__class_type_info): Lose details.
2423 (__class_type_info::detail_masks): Remove.
2424 (__si_class_type_info::__si_class_type_info): Lose details.
2425 (__vmi_class_type_info::details): New member.
2426 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
2427 (__vmi_class_type_info::detail_masks): New member.
2428 * tinfo.cc (__class_type_info::do_upcast): Initialize result
2429 with unknown_details_mask.
2430 (__vmi_class_type_info::do_find_public_src): Adjust
2431 (__vmi_class_type_info::do_dyncast): Adjust.
2432 (__vmi_class_type_info::do_upcast): Set result details, if
2433 needed. Adjust.
2434 (__dynamic_cast): Temporarily #if out optimization.
2435
2436 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
2437
2438 * rtti.c (get_tinfo_decl): Mark used.
2439 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
2440 mark as dealt with, if we output it.
2441
2442 2000-03-28 Mark Mitchell <mark@codesourcery.com>
2443
2444 * class.c: Reorganize to put virtual function table initialization
2445 machinery at the end of the file.
2446
2447 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
2448
2449 * class.c (finish_struct): Use bitsize_zero_node.
2450 * pt.c (instantiate_class_template): Likewise.
2451
2452 2000-03-28 Mark Mitchell <mark@codesourcery.com>
2453
2454 Put RTTI entries at negative offsets in new ABI.
2455 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
2456 vbase offset at index -3, not -1.
2457 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
2458 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
2459 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
2460 (build_rtti_vtbl_entries): New function.
2461 (set_rtti_entry): Remove.
2462 (build_primary_vtable): Don't use it.
2463 (build_secondary_vtable): Likewise.
2464 (start_vtable): Remove.
2465 (first_vfun_index): New function.
2466 (set_vindex): Likewise.
2467 (add_virtual_function): Don't call start_vtable. Do call
2468 set_vindex.
2469 (set_primary_base): Rename parameter.
2470 (determine_primary_base): Likewise.
2471 (num_vfun_entries): Don't use skip_rtti_stuff.
2472 (num_extra_vtbl_entries): Include RTTI information.
2473 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
2474 (skip_rtti_stuff): Remove.
2475 (dfs_modify_vtables): Don't use it.
2476 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
2477 (layout_nonempty_base_or_field): Update size handling.
2478 (create_vtable_ptr): Tweak.
2479 (layout_class_type): Adjust parameter names.
2480 (finish_struct_1): Simplify.
2481 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
2482 (skip_rtti_stuff): Remove.
2483 (first_vfun_index): New function.
2484 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
2485 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
2486 (marked_vtable_pathp): Declare.
2487 (unmarked_vtable_pathp): Likewise.
2488 * error.c (dump_expr): Use first_vfun_index to calculate vtable
2489 offsets.
2490 * rtti.c (build_headof): Look for RTTI at negative offsets.
2491 (get_tinfo_decl_dynamic): Likewise.
2492 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
2493 here.
2494 (create_pseudo_type_info): Do it here instead. Adjust so that
2495 vptr points at first virtual function.
2496 * search.c (marked_vtable_pathp): Make it global.
2497 (unmarked_vtable_pathp): Likewise.
2498 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
2499 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
2500 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
2501 (get_pure_virtuals): Likewise.
2502 (expand_upcast_fixups): Likewise.
2503 * tree.c (debug_binfo): Likewise.
2504 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
2505 negative offset.
2506
2507 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2508
2509 * class.c (check_field_decl): Fix typo.
2510 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
2511 (check_methods): Likewise.
2512 (check_field_decls): Likewise.
2513 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
2514 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
2515 Use DECL_RESULT_FLD, not DECL_RESULT.
2516 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
2517 * lex.c (identifier_type): Likewise.
2518 * pt.c (determine_specialization, lookup_template_class): Likewise.
2519 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
2520 (resolve_overloaded_unification, more_specialized): Likewise.
2521 * semantics.c (finish_member_declaration): Likewise.
2522 * typeck.c (build_x_function_call): Likewise.
2523
2524 2000-03-26 Mark Mitchell <mark@codesourcery.com>
2525
2526 * class.c (layout_empty_base): Handle empty bases with non-byte
2527 alignment.
2528 (build_base_field): Likewise.
2529 (layout_virtual_bases): Likewise.
2530
2531 * class.c (finish_struct_1): Fix typo in this change:
2532
2533 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2534
2535 2000-03-25 Mark Mitchell <mark@codesourcery.com>
2536
2537 * decl.c (grokdeclarator): Count partial specializations when
2538 keeping track of how many template classes have been seen.
2539
2540 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
2541
2542 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2543
2544 * class.c (build_vbase_pointer_fields): layout_field now place_field.
2545 (get_vfield_offset): Use byte_position.
2546 (set_rtti_entry): Set OFFSET to ssizetype zero.
2547 (get_binfo_offset_as_int): Deleted.
2548 (dfs_record_base_offsets): Use tree_low_cst.
2549 (dfs_search_base_offsets): Likewise.
2550 (layout_nonempty_base_or_field): Reflect changes in RLI format
2551 and call byte_position.
2552 (layout_empty_base): Convert offset to ssizetype.
2553 (build_base_field): use rli_size_unit_so_far.
2554 (dfs_propagate_binfo_offsets): Do computation in proper type.
2555 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
2556 (layout_class_type): Reflect changes in RLI names and fields.
2557 (finish_struct_1): Set DECL_FIELD_OFFSET.
2558 * dump.c (dequeue_and_dump): Call bit_position.
2559 * expr.c (cplus_expand_constant): Use byte_position.
2560 * rtti.c (expand_class_desc): Use bitsize_one_node.
2561 * typeck.c (build_component_addr): Use byte_position and don't
2562 special case for zero offset.
2563
2564 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
2565
2566 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
2567
2568 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
2569 tinfo object.
2570 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
2571 vtable.
2572
2573 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2574
2575 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
2576 DECL_P macros.
2577 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
2578 make_typename_type, check_initializer, cp_finish_decl,
2579 xref_tag): Likewise.
2580 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
2581 decl_namespace, arg_assoc_template_arg, arg_assoc,
2582 validate_nonmember_using_decl, do_class_using_decl): Likewise.
2583 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
2584 args_to_string): Likewise.
2585 * friend.c (is_friend): Likewise.
2586 * lex.c (note_got_semicolon, note_list_got_semicolon,
2587 is_global): Likewise.
2588 * method.c (build_overload_nested_name, build_overload_value,
2589 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
2590 * parse.y (typename_sub, typename_sub1): Likewise.
2591 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
2592 process_partial_specialization, convert_template_argument,
2593 template_args_equal, add_pending_template, lookup_template_class,
2594 for_each_template_parm_r, maybe_fold_nontype_arg,
2595 tsubst, instantiate_template, type_unification_real, unify,
2596 instantiate_pending_templates, set_mangled_name_for_template_decl):
2597 Likewise.
2598 * repo.c (repo_get_id, repo_template_used): Likewise.
2599 * search.c (lookup_field_1): Likewise.
2600 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
2601 * xref.c (classname): Likewise.
2602
2603 2000-03-22 Mark Mitchell <mark@codesourcery.com>
2604
2605 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
2606 (CANONICAL_BINFO): New macro.
2607 (BINFO_NEW_VTABLE_MARKED): Use it.
2608 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
2609 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
2610 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
2611 not TREE_TYPE.
2612 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
2613 (build_secondary_vtable): Likewise.
2614 (dfs_finish_vtbls): Likewise.
2615 (dfs_accumulate_vtbl_inits): Likewise.
2616 (accumulate_vtbl_inits): New function.
2617 (finish_vtbls): Make sure that virtual bases come after
2618 non-virtual bases in the vtable group.
2619 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
2620 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
2621 * search.c (struct vbase_info): Move definition.
2622 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
2623 (unmarked_new_vtable_p): Likewise.
2624 (dfs_mark_vtable_path): Remove.
2625 (dfs_mark_new_vtable): Remove.
2626 (dfs_unmark_new_vtable): Likewise.
2627 (dfs_clear_search_slot): Likewise.
2628 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
2629 (dfs_clear_vbase_slots): Likewise.
2630 (init_vbase_pointers): LIkewise.
2631
2632 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
2633
2634 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
2635 SIZETYPE to a non-SIZETYPE.
2636
2637 2000-03-21 Mark Mitchell <mark@codesourcery.com>
2638
2639 * class.c (layout_virtual_bases): Adjust names in conditionally
2640 compiled code.
2641
2642 * class.c (record_base_offsets): New function.
2643 (layout_conflict_p): Likewise.
2644 (layout_nonempty_base_or_field): Use it.
2645 (layout_empty_base): New function.
2646 (build_base_field): Use it.
2647 (build_base_fields): Update comment.
2648 (layout_virtual_bases): Fold in a little code form
2649 layout_basetypes. Use layout_empty_base.
2650 (layout_basetypes): Remove.
2651 (end_of_class): New function.
2652 (layout_class_type): Use it. Adjust.
2653
2654 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
2655 (fntype_p): Remove.
2656 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
2657 comment.
2658 (dfs_skip_nonprimary_vbases_markedp): Likewise.
2659 * typeck.c (fntype_p): Remove.
2660
2661 * cp-tree.h (TI_SPEC_INFO): Remove.
2662 (CLASSTYPE_TI_SPEC_INFO): Likewise.
2663 * pt.c (process_partial_specialization): Likewise.
2664
2665 * class.c (build_base_field): Fix thinko in computation of binfo
2666 offsets.
2667
2668 * tree.c (mark_local_for_remap_p): Mark variables declared in
2669 TARGET_EXPRs as well.
2670
2671 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
2672
2673 * typeck.c (require_complete_type, complete_type,
2674 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
2675 build_array_ref, convert_arguments, pointer_diff,
2676 build_x_unary_op, build_unary_op, build_c_cast,
2677 build_modify_expr): Use COMPLETE_TYPE_P etc.
2678 * call.c (is_complete, convert_like_real,
2679 build_new_method_call): Likewise.
2680 * class.c (build_vbase_pointer_fields, check_bases,
2681 build_base_field, finish_struct_1, pushclass): Likewise.
2682 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
2683 * decl.c (maybe_process_template_type_declaration, pushtag,
2684 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
2685 layout_var_decl, check_initializer, cp_finish_decl,
2686 grokdeclarator, require_complete_types_for_parms,
2687 grok_op_properties, xref_tag, xref_basetypes,
2688 check_function_type): Likewise.
2689 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
2690 * friend.c (do_friend): Likewise.
2691 * init.c (build_offset_ref): Likewise.
2692 * parse.y (structsp): Likewise.
2693 * pt.c (maybe_process_partial_specialization,
2694 tsubst_friend_function, instantiate_class_template, tsubst,
2695 do_type_instantiation, instantiate_pending_templates): Likewise.
2696 * repo.c (repo_get_id): Likewise.
2697 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
2698 synthesize_tinfo_var, emit_support_tinfos): Likewise.
2699 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
2700 * semantics.c (begin_class_definition): Likewise.
2701 * tree.c (build_cplus_method_type): Likewise.
2702 * typeck2.c (digest_init, build_functional_cast,
2703 add_exception_specifier): Likewise.
2704 * parse.h, parse.c: Regenerated.
2705
2706 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
2707
2708 * inc/cxxabi.h: New header file. Define new-abi entry points.
2709 (__pointer_type_info::target): Rename member to ...
2710 (__pointer_type_info::type): ... here.
2711 (__base_class_info::type): Rename member to ...
2712 (__base_class_info::base): ... here.
2713 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
2714 * cp-tree.h (CPTI_ABI): New global tree enumeration.
2715 (abi_node): New global tree node.
2716 * decl.c (abi_node): Document.
2717 (init_decl_processing): Initialize abi_node.
2718 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
2719 (get_vmi_pseudo_type_info): Likewise.
2720 (create_tinfo_types): Likewise.
2721 (emit_support_tinfos): Likewise.
2722 * tinfo.h (cxxabi.h): Include for new-abi.
2723 Move rtti class definitions to new header file.
2724 * tinfo.cc (abi): Use the namespace.
2725 (std): Move new abi rtti classes from here ...
2726 (__cxxabiv1): ... to here.
2727 * tinfo2.cc (cxxabi.h): Include for new-abi.
2728 Move rtti class definitions to new header file.
2729 (std): Move new abi rtti classes from here ...
2730 (__cxxabiv1): ... to here.
2731 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
2732 namespace.
2733
2734 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
2735 Jason Merrill <jason@casey.cygnus.com>
2736
2737 * method.c (build_overload_int): Use host_integerp.
2738
2739 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2740
2741 * init.c (build_offset_ref): Handle the case of a templated member
2742 function.
2743
2744 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2745
2746 * except.c (expand_exception_blocks): Clear catch_clauses_last.
2747
2748 2000-03-18 Mark Mitchell <mark@codesourcery.com>
2749
2750 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
2751 * class.c (check_bitfield_decl): Turn illegal bitfields into
2752 non-bitfields.
2753 (dfs_propagate_binfo_offsets): Adjust for new size_binop
2754 semantics.
2755 (dfs_offset_for_unshared_vbases): Likewise.
2756 * cvt.c (cp_convert_to_pointer): Convert NULL to a
2757 pointer-to-member correctly under the new ABI.
2758 * expr.c (cplus_expand_constant): Don't use cp_convert when
2759 turning an offset into a pointer-to-member.
2760 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
2761 when dereferencing them under the new ABI.
2762 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
2763 of pointers-to-members under the new ABI.
2764
2765 * class.c (check_bitfield_decl): Remove restriction on really long
2766 bitfields.
2767 (layout_class_type): Implement new ABI handling of bitfields
2768 longer than their types.
2769
2770 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2771
2772 * parse.y (extdefs): Call ggc_collect.
2773 * parse.c: Regenerated.
2774
2775 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
2776
2777 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
2778 (note_name_declared_in_class): Use OVL_CURRENT to get at a
2779 potential overload.
2780
2781 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2782
2783 * class.c (build_vbase_path): Use integer_zerop.
2784 (build_vtable_entry): Use tree_low_cst.
2785 (get_vfield_offset): Use bit_position.
2786 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
2787 Use tree_low_cst.
2788 (check_bitfield_decl): Set DECL_SIZE using convert.
2789 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
2790 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
2791 Use tree_low_cst.
2792 (finish_struct_1): Use bit_position.
2793 (dump_class_hierarchy): Use tree_low_cst.
2794 * cp-tree.h (min_precision): Add declaration.
2795 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
2796 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
2797 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
2798 * expr.c (cplus_expand_constant): Use bit_position.
2799 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
2800 * rtti.c (get_base_offset): Use bit_position.
2801 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
2802 host_integerp, and tree_low_cst.
2803 (pointer_int_sum): Use integer_zerop.
2804 (build_component_addr): Use bit_position.
2805
2806 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
2807
2808 * typeck.c (require_complete_type): Don't assume size_zero_node.
2809 (complete_type_or_else): Likewise.
2810
2811 2000-03-16 Steven Grady <grady@digitaldeck.com>
2812 Jason Merrill <jason@casey.cygnus.com>
2813
2814 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
2815
2816 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
2817
2818 * decl2.c (grokfield): Bail out if type is error_mark_node.
2819
2820 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
2821
2822 * tinfo2.cc (__ptr_to_member_data): Rename to ...
2823 (__pointer_to_member_data): ... here. Adjust.
2824 * rtti.c (create_tinfo_types): Adjust.
2825
2826 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
2827
2828 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
2829 * decl.c (ref_desc_type_node): Undocument.
2830 * rtti.c (ptr_ref_initializer): Rename to ...
2831 (ptr_initializer): ... here. Adjust comments.
2832 (ptmd_initializer): Fix comment thinko.
2833 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
2834 (create_tinfo_types): Remove ref_desc_type_node init.
2835 * tinfo2.cc (__reference_type_info): Remove.
2836
2837 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
2838
2839 * decl.c (cp_finish_decl): Remove obsolete comment.
2840
2841 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
2842
2843 2000-03-14 Mark Mitchell <mark@codesourcery.com>
2844
2845 * cp-tree.h: Tweak documentation.
2846 * class.c (build_vbase_pointer_fields): Layout the fields, too.
2847 (avoid_overlap): Remove.
2848 (get_binfo_offset_as_int): New function.
2849 (dfs_serach_base_offsets): Likewise.
2850 (layout_nonempty_base_or_field): Likewise.
2851 (build_base_field): Layout fields here. Avoid placing two objects
2852 of the same type at the same address, under the new ABI.
2853 (build_base_fields): Adjust accordingly.
2854 (create_vtable_ptr): Return the new field, but don't attach it to
2855 TYPE_FIELDS.
2856 (remove_base_field): Remove.
2857 (remove_base_fields): Remove.
2858 (layout_basetypes): Adjust accordingly.
2859 (layout_class_type): Call layout_field for each field, rather than
2860 just making a wholesale call to layout_type.
2861
2862 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
2863
2864 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
2865
2866 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
2867
2868 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
2869
2870 * except.c (dtor_nothrow): New fn.
2871 (do_pop_exception): Use it. Take type parm.
2872 (push_eh_cleanup): Take type parm.
2873 (expand_start_catch_block): Pass it.
2874 (build_eh_type_type_ref): Accept null type.
2875
2876 2000-03-12 Mark Mitchell <mark@codesourcery.com>
2877
2878 * cp-tree.h (revert_static_member_fn): Change prototype.
2879 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
2880 (grok_op_properties): Likewise.
2881 (start_function): Likewise.
2882 (revert_static_member_fn): Simplify.
2883 * pt.c (check_explicit_specialization): Adjust call to
2884 revert_static_member_fn.
2885
2886 2000-03-11 Mark Mitchell <mark@codesourcery.com>
2887
2888 * cp-tree.h (scope_kind): New type.
2889 (tmpl_spec_kind): Likewise.
2890 (declare_pseudo_global_level): Remove.
2891 (pseudo_global_level_p): Rename to template_parm_scope_p.
2892 (pushlevel): Remove declaration.
2893 (begin_scope): New function.
2894 (finish_scope): Likewise.
2895 (current_tmpl_spec_kind): Likewise.
2896 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
2897 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
2898 Add template_spec_p.
2899 (toplevel_bindings_p): Adjust.
2900 (declare_pseudo_global_level): Remove.
2901 (pseudo_global_level_p): Rename to template_parm_scope_p.
2902 (current_tmpl_spec_kind): New function.
2903 (begin_scope): Likewise.
2904 (finish_scope): Likewise.
2905 (maybe_push_to_top_level): Adjust.
2906 (maybe_process_template_type_declaration): Likewise.
2907 (pushtag): Likewise.
2908 (pushdecl_nonclass_level): Likewise.
2909 (lookup_tag): Likewise.
2910 (grokfndecl): Handle member template specializations. Share
2911 constructor and non-constructor code.
2912 * decl2.c (check_classfn): Handle member template specializations.
2913 * pt.c (begin_template_parm_list): Use begin_scope.
2914 (begin_specialization): Likewise.
2915 (end_specialization): Likewise.
2916 (check_explicit_specialization): Use current_tmpl_spec_kind.
2917 Handle member template specializations.
2918 (end_template_decl): Use finish_scope. Remove call to
2919 get_pending_sizes.
2920 (push_template_decl_real): Remove bogus error message.
2921 (tsubst_decl): Fix typo in code contained in comment.
2922 (instantiate_template): Handle member template specializations.
2923 (most_general_template): Likewise.
2924
2925 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
2926
2927 * lex.c (whitespace_cr): Compress consecutive calls to warning().
2928 (do_identifier): Ditto for error().
2929
2930 * pt.c (convert_nontype_argument): Ditto for cp_error().
2931 (convert_template_argument): Ditto for cp_pedwarn().
2932
2933 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
2934
2935 * exception.cc (__check_null_eh_spec): New fn.
2936 * except.c (expand_end_eh_spec): Call it if the spec is throw().
2937
2938 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
2939
2940 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
2941 * except.c (expand_end_eh_spec): Add the return type.
2942 * rtti.c (throw_bad_cast): Add the parmtypes.
2943 (throw_bad_typeid): Likewise.
2944
2945 * semantics.c (expand_stmt): Only leave out rtl for unused
2946 artificials, and set DECL_IGNORED_P on them as well.
2947 * decl.c (wrapup_globals_for_namespace): Likewise.
2948
2949 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
2950
2951 * decl.c (maybe_commonize_var): Skip all artificial decls.
2952 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
2953
2954 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
2955
2956 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
2957 * cp-tree.h: Declare flag_enforce_eh_specs.
2958 * decl.c (store_parm_decls, finish_function): Check it.
2959
2960 C library functions don't throw.
2961 * Makefile.in (cfns.h): New target.
2962 (except.o): Depend on it.
2963 * Make-lang.in (cc1plus): Depend on cfns.gperf.
2964 * cfns.gperf: New file.
2965 * cfns.h: Generated.
2966 * except.c: Include it.
2967 (nothrow_libfn_p): New fn.
2968 * decl.c (grokfndecl): Use it.
2969 * cp-tree.h: Declare it.
2970
2971 * decl.c (push_overloaded_decl_1, auto_function,
2972 define_function): Lose.
2973 (build_library_fn_1): New static fn.
2974 (builtin_function): Use it.
2975 (get_atexit_node): Use build_library_fn_ptr.
2976 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
2977 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
2978 push_void_library_fn, push_throw_library_fn): New fns.
2979 * cp-tree.h: Declare them.
2980 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
2981 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
2982 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
2983 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
2984 * rtti.c (build_runtime_decl): Lose.
2985 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
2986 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
2987 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
2988
2989 * call.c (build_call): Remove result_type parm.
2990 Call mark_used on unused artificial fns.
2991 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
2992
2993 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
2994
2995 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
2996 appropriate.
2997 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
2998 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
2999 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
3000 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
3001 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
3002 expand_generic_desc): Likewise.
3003
3004 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
3005
3006 * exception.cc (__cp_pop_exception): Cleanup the original object.
3007
3008 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
3009
3010 * decl.c (grok_op_properties): Merge conversion to void warning
3011 with other silly op warnings.
3012
3013 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
3014
3015 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
3016 array CONSTRUCTOR elements. Don't use expr_tree_cons.
3017
3018 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
3019
3020 * decl.c (cp_make_fname_decl): New function.
3021 (wrapup_globals_for_namespace): Don't emit unused static vars.
3022 (init_decl_processing): Remove comment about use of
3023 array_domain_type. Set make_fname_decl.
3024 (cp_finish_decl): Remove __FUNCTION__ nadgering.
3025 * semantics.c (begin_compound_stmt): Remove
3026 current_function_name_declared flagging.
3027 (expand_stmt): Don't emit unused local statics.
3028 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
3029 specially.
3030
3031 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
3032
3033 * typeck.c (convert_for_assignment): Don't look at array
3034 initializer.
3035 * call.c (convert_like_real): Likewise.
3036
3037 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
3038
3039 Add initial support for '\uNNNN' specifier.
3040 * lex.c (read_ucs): New fn.
3041 (readescape, skip_white_space): Call it.
3042 (is_extended_char, is_extended_char_1): New fns.
3043 (utf8_extend_token): New fn, #if 0'd out.
3044 (real_yylex): Treat extended chars like letters.
3045
3046 * search.c (note_debug_info_needed): Walk the bases even if we
3047 weren't deferring the type itself.
3048
3049 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3050
3051 * decl2.c (finish_objects): Constify a char*.
3052
3053 * method.c (emit_thunk): Likewise.
3054
3055 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
3056
3057 * typeck.c (dubious_conversion_warnings): Look through
3058 REFERENCE_TYPE.
3059
3060 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3061
3062 * class.c (dfs_modify_vtables): I is now unsigned.
3063 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
3064 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
3065 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
3066 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
3067 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
3068 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
3069 Call integer_all_onesp.
3070 * typeck2.c (process_init_constructor): Use compare_tree_int.
3071
3072 * lang-specs.h (as): Don't call if -syntax-only.
3073
3074 2000-03-06 Mark Mitchell <mark@codesourcery.com>
3075
3076 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
3077 RTL_EXPR_HAS_NO_SCOPE after all.
3078
3079 2000-03-05 Mark Mitchell <mark@codesourcery.com>
3080
3081 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
3082 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
3083 RTL_EXPR_HAS_NO_SCOPE.
3084
3085 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
3086 later.
3087
3088 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
3089
3090 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
3091
3092 * call.c (convert_like): Macrofy.
3093 (convert_like_with_context): New macro.
3094 (convert_like_real): Renamed from convert_like. Add calling
3095 context parameters, for diagnostics. Add recursive flag. Call
3096 dubious_conversion_warnings for outer conversion.
3097 (build_user_type_conversion): Use convert_like_with_context.
3098 (build_over_call): Likewise. Don't warn about dubious
3099 conversions here. Adjust convert_default_arg calls.
3100 (convert_default_arg): Add context parameters for diagnostics.
3101 Pass throught to convert_like_with_context.
3102 * cp-tree.h (convert_default_arg): Add context parameters.
3103 (dubious_conversion_warnings): Prototype new function.
3104 * typeck.c (convert_arguments): Adjust convert_default_arg call.
3105 (dubious_conversion_warnings): New function, broken
3106 out of convert_for_assignment.
3107 (convert_for_assignment): Adjust.
3108
3109 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
3110
3111 * decl2.c (key_method): Break out from...
3112 (import_export_vtable, import_export_class): ...here.
3113
3114 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
3115 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
3116
3117 * search.c (note_debug_info_needed, dfs_debug_mark,
3118 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
3119 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
3120
3121 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
3122
3123 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
3124 typos.
3125
3126 2000-03-02 Mark Mitchell <mark@codesourcery.com>
3127
3128 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
3129 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
3130 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
3131 (lang_type): Split gets_new into has_new and has_array_new.
3132 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3133 (TYPE_GETS_NEW): Split into ...
3134 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
3135 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
3136 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
3137 (build_op_new_call): Don't declare.
3138 (build_new_1): Likewise.
3139 * call.c (build_op_new_call): Remove.
3140 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
3141 instead of TYPE_NEEDS_DESTRUCTOR.
3142 (finish_struct_bits): Likewise.
3143 (add_implicitly_declared_members): Likewise.
3144 (check_field_decl): Likewise.
3145 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
3146 correctly under the new ABI.
3147 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
3148 instead of TYPE_NEEDS_DESTRUCTOR.
3149 (initialize_local_var): Likewise.
3150 (destroy_local_var): Likewise.
3151 (cp_finish_decl): Likewise.
3152 (register_dtor_fn): Likewise.
3153 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
3154 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
3155 TYPE_VEC_DELETE_TAKES_SIZE here.
3156 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
3157 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
3158 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3159 (finish_destructor_body): Likewise.
3160 (maybe_build_cleanup_1): Likewise.
3161 * decl2.c (do_static_destruction): Likewise.
3162 * init.c (build_new_1): Make it static.
3163 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3164 (expand_cleanup_for_base): Likewise.
3165 (get_cookie_size): New function.
3166 (build_new_1): Handle array-new cookies correctly under the new
3167 ABI.
3168 (build_vec_delete_1): Likewise.
3169 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3170 (build_delete): Likewise.
3171 (build_vec_delete): Handle array-new cookies correctly under the new
3172 ABI.
3173 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3174 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
3175 TYPE_HAS_ARRAY_NEW_OPERATOR.
3176 * ptree.c (print_lang_type): Check them.
3177 * search.c (context_for_name_lookup): Fix typo in comment.
3178 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3179 * tree.c (break_out_cleanups): Likewise.
3180 (build_cplus_array_test_1): Likewise.
3181 (cp_build_qualified_type_real): Likewise.
3182 * typeck.c (complete_type): Likewise.
3183
3184 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
3185 the command-line, not the end.
3186
3187 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
3188
3189 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
3190
3191 2000-03-02 Tom Tromey <tromey@cygnus.com>
3192
3193 * cp-tree.h (build_java_class_ref): Declare.
3194 * init.c (build_java_class_ref): No longer static.
3195 * except.c (expand_throw): Generate a Java-style `throw' if the
3196 thrown object is a "Java" object.
3197 (initialize_handler_parm): Generate a Java-style lookup of
3198 exception info if the caught object is a "Java" object.
3199 (catch_language, catch_language_init): New globals.
3200 (decl_is_java_type): New function.
3201 (expand_start_catch_block): Don't call push_eh_info() or
3202 push_eh_cleanup() when handling a Java-style "catch". Pass Java
3203 class reference to build_catch_block.
3204
3205 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3206
3207 * typeck.c (comptypes): Treat sizetype like its language equivalent.
3208
3209 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
3210
3211 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
3212 to merge reference/pointer code and fix incorrect warnings.
3213
3214 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
3215
3216 * search.c (protected_accessible_p): Use context_for_name_lookup.
3217
3218 * init.c (construct_virtual_bases): Fix thinko.
3219 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
3220
3221 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
3222
3223 * decl.c (current_function_decl): Move to toplev.c.
3224
3225 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
3226
3227 * pt.c (fn_type_unification): Unify return type, whenever
3228 provided.
3229 (get_bindings_real): Only pass return type when necessary.
3230 Remove explicit return type check.
3231 * class.c (resolve_address_of_overloaded_function): Pass desired
3232 return type to fn_type_unification.
3233
3234 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3235
3236 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
3237 DECL_FIELD_SIZE.
3238 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
3239 DECL_FIELD_SIZE.
3240 * rtti.c (expand_class_desc): Likewise.
3241 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
3242 (THUNK_VCALL_OFFSET): Likewise.
3243 (THUNK_DELTA): Reflect changes in ../tree.h.
3244
3245 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
3246
3247 * search.c (protected_accessible_p): Also allow the access if
3248 the member is public in DERIVED. Lose TYPE parm.
3249 (friend_accessible_p): Lose TYPE parm.
3250 (accessible_p): Adjust.
3251
3252 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3253
3254 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
3255 on things that are not sizes; ssize_binop deleted.
3256 Call size_diffop when appropriate.
3257 (dfs_build_vcall_offset_vtbl_entries): Likewise.
3258 (build_primary_vtable, build_secondary_vtable): Likewise.
3259 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
3260 Variable I is HOST_WIDE_INT.
3261 (get_vfield_offset): Pass proper types to size_binop.
3262 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
3263 (finish_struct_1): Likewise.
3264 (skip_rtti_stuff): Arg N is now pointer to signed.
3265 (layout_class_type): Use size_zero_node.
3266 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
3267 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
3268 * decl.c (complete_arry_type): Pass proper types to size_binop.
3269 (xref_basetypes): BINFO_OFFSET is sizetype.
3270 * error.c (dump_expr): Don't use size_binop non-sizes.
3271 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
3272 * init.c (construct_virtual_bases): Fix type error.
3273 (build_vec_delete_1): Pass proper type to size_binop and don't
3274 fold result.
3275 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
3276 * rtti.c (get_base_offset): Pass proper type to size_binop.
3277 * search.c (dfs_find_vbases): Fix type error.
3278 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
3279 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
3280 * tree.c (debug_binfo): Variable N is signed.
3281 Use HOST_WIDE_INT_PRINT_DEC.
3282 * typeck.c (comptypes): sizetype is same as equivalent integer type.
3283 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
3284 size_one_node and size_zero_node.
3285 (c_alignof): Use size_one_node.
3286 (build_component_addr): Pass proper types to size_binop.
3287 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
3288
3289 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
3290
3291 Implement class scope using-declarations for functions.
3292 * class.c (handle_using_decl): Call add_method for used functions.
3293 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
3294 (add_method): Used functions are hidden by local functions.
3295 (check_bases_and_members): Handle using-decls before finalizing
3296 CLASSTYPE_METHOD_VEC.
3297 * call.c (add_function_candidate): Add ctype parm; if non-zero,
3298 override the type of 'this' accordingly.
3299 (add_template_candidate, add_template_candidate_real): Add ctype parm.
3300 (convert_class_to_reference, build_user_type_conversion_1,
3301 build_new_function_call, build_object_call, build_new_op,
3302 build_new_method_call): Pass ctype parm.
3303
3304 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
3305 the baselink.
3306 * call.c (convert_class_to_reference, build_user_type_conversion_1,
3307 build_new_function_call, build_object_call, build_new_op,
3308 build_new_method_call, build_op_delete_call): Don't get basetype_path
3309 from a baselink.
3310 * typeck.c (build_component_ref): Likewise.
3311 * init.c (build_offset_ref): Likewise.
3312 (resolve_offset_ref): Don't call enforce_access.
3313 Call build_scoped_ref.
3314 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
3315 would cause an error or if -pedantic.
3316 * class.c (alter_access): Lose binfo parm.
3317
3318 2000-02-26 Mark Mitchell <mark@codesourcery.com>
3319
3320 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
3321 types.
3322
3323 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
3324
3325 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
3326 pseudo_type_info creation into the std namespace
3327
3328 2000-02-26 Mark Mitchell <mark@codesourcery.com>
3329
3330 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
3331 (import_export_class): Remove declaration.
3332 * decl2.c (import_export_class): Make it static.
3333 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
3334 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
3335 EXPR_WITH_FILE_LOCATION.
3336 * lex.c (check_newline): Tweak filename/lineno setting.
3337 * semantics.c (begin_while_stmt): Fix typo in comment.
3338
3339 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3340
3341 * lang-options.h (-fmessage-length=): Add missing option.
3342
3343 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
3344
3345 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
3346
3347 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
3348
3349 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
3350
3351 * optimize.c (expand_call_inline): Emit the return label before
3352 evaluating the return value.
3353
3354 2000-02-24 Mark Mitchell <mark@codesourcery.com>
3355
3356 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
3357 than duplicating functionality here.
3358 * optimize.c: Include input.h.
3359 (expand_call_inline): Use push_srcloc and pop_srcloc.
3360 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
3361 * parse.c: Regenerated.
3362 * Makefile.in (lex.o): Depend on input.h.
3363 (optimize.o): Likewise.
3364
3365 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
3366
3367 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
3368 function type, rather than ICE.
3369
3370 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
3371
3372 * decl.c (grokdeclarator): Call decl_type_access_control.
3373 * parse.y (parse_end_decl): Don't call decl_type_access_control if
3374 decl is null.
3375
3376 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
3377
3378 * decl.c (decls_match): Remove obsolete static member nadgering.
3379
3380 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3381
3382 * decl.c (grokdeclarator): Change ANSI to ISO.
3383 * lex.c (consume_string, readescape, do_identifier): Likewise.
3384 (parse_float, real_yylex): Likewise.
3385 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
3386 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
3387 new_type_id, maybe_label_decls, simple_stmt,
3388 for.init.statement): Likewise.
3389 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
3390 * semantics.c (finish_named_return_value): Likewise.
3391 * parse.c: Regenerate.
3392
3393 2000-02-21 Mark Mitchell <mark@codesourcery.com>
3394
3395 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
3396 (CPTI_CLASS_STAR_TYPE): Remove.
3397 (vtable_index_type): Likewise.
3398 (class_star_type_node): Remove.
3399 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
3400 (build_binary_op_nodefault): Remove.
3401 * call.c (build_new_op): Use build_binary_op instead of
3402 build_binary_op_nodefault.
3403 * decl.c (init_decl_processing): Remove class_star_type_node
3404 initialization. Make delta_type_node ptrdiff_type_node under the
3405 new ABI. Initialize vtable_index_type.
3406 (build_ptrmemfunc_type): Build different structures for the new
3407 ABI.
3408 (build_enumerator): Use build_binary_op instead of
3409 build_binary_op_nodefault.
3410 * method.c (build_overload_value): Mangle pointers-to-members
3411 appropriately under the new ABI.
3412 * typeck.c (build_array_ref): Use build_binary_op instead of
3413 build_binary_op_nodefault.
3414 (get_member_function_from_ptrfunc): Adjust for the new ABI.
3415 (build_binary_op_nodefault): Rename to ...
3416 (build_binary_op): ... this. Remove old version. Adjust for
3417 pointer-to-member comparisons under the new ABI.
3418 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
3419 (build_ptrmemfunc): Adjust for the new ABI.
3420 (expand_ptrmemfunc_cst): Likewise.
3421 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
3422 (pfn_from_ptrmemfunc): Adjust for the new ABI.
3423
3424 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
3425
3426 * call.c (build_object_call): Compress consecutive calls to
3427 cp_error.
3428 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
3429 (build_op_delete_call): Adjust message formatting.
3430
3431 * class.c (check_bases): Compress consecutive calls to
3432 cp_pedwarn.
3433 (finish_struct_anon): Say 'ISO C++'.
3434
3435 * decl.c (start_decl): Same here.
3436 (grok_reference_init): Likewise.
3437 (grokfndecl): Correct message formatting.
3438 (grokfndecl): Improve diagnostic.
3439 (check_static_variable_definition): Likewise. Say 'ISO C++'
3440 (compute_array_index_type): Say 'ISO C++'
3441 (create_array_type_for_decl): Compress consecutive calls to
3442 cp_error.
3443 (grokdeclarator): Say 'ISO C++'
3444 (grok_op_properties): Likewise.
3445
3446 * decl2.c (delete_sanity): Clairify diagnostic.
3447 (check_member_template): Same here.
3448 (grok_function_init): Use consistent terminology.
3449
3450 * expr.c (do_case): Say 'ISO C++'
3451
3452 * friend.c (do_friend): Compress consecutive calls to warning.
3453
3454 2000-02-20 Mark Mitchell <mark@codesourcery.com>
3455
3456 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
3457 * class.c (build_secondary_vtable): Reorganize. Don't create a
3458 new vtable under the new ABI.
3459 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
3460 computing the size.
3461 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
3462 the initializing elements.
3463 (initialize_vtable): New function.
3464 (dfs_finish_vtbls): Use it.
3465 (dfs_accumulate_vtbl_inits): New function.
3466 (finish_vtbls): Merge primary and secondary vtables under the new
3467 ABI.
3468 (finish_struct_1): Remove redundant call to layout_vtable_decl.
3469 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
3470 aren't VAR_DECLs.
3471
3472 * class.c (build_vtable): New function, split out from ...
3473 (get_vtable_decl): ... here, and ...
3474 (build_secondary_vtable): ... here.
3475
3476 * pt.c (tsubst_decl): Fix formatting.
3477
3478 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3479
3480 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
3481 (avoid_overlap, build_base_field): Likewise.
3482 (build_base_field, build_base_fields, is_empty_class):
3483 Test DECL_SIZE with integer_zero.
3484 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
3485 * cp-tree.h (struct lang_type): New field size_unit.
3486 (CLASSTYPE_SIZE_UNIT): New macro.
3487 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
3488 (cp_finish_decl): Delete -Wlarger-than processing.
3489 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
3490 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
3491 * tree.c (make_binfo): binfo vector is one entry longer.
3492 (walk_tree): Walk DECL_SIZE_UNIT.
3493
3494 2000-02-19 Mark Mitchell <mark@codesourcery.com>
3495
3496 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
3497 comment.
3498 (build_vtable_entry): Don't assume all vtable entries are
3499 functions.
3500 (build_vtbl_initializer): Adjust accordingly.
3501 (get_vtable_decl): Fix formatting.
3502
3503 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
3504
3505 * semantics.c (deferred_type_access_control): Walk the entire
3506 type_lookups list.
3507 (save_type_access_control): Rename from
3508 initial_deferred_type_access_control. Just remember the value.
3509 (decl_type_access_control): New fn.
3510 (begin_function_definition): Use deferred_type_access_control, after
3511 we've started the function. Set type_lookups to error_mark_node.
3512 * parse.y (frob_specs, fn.def1): Adjust.
3513 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
3514 (parse_end_decl, parse_bitfield0, parse_method): New fns.
3515 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
3516 (after_type_component_declarator0): Likewise.
3517 (after_type_component_declarator): Likewise.
3518 (notype_component_declarator): Likewise.
3519 * cp-tree.h: Adjust.
3520
3521 * decl.c (redeclaration_error_message): Allow redeclaration of
3522 namespace-scope decls.
3523
3524 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
3525
3526 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
3527
3528 2000-02-17 Mark Mitchell <mark@codesourcery.com>
3529
3530 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
3531 * decl2.c (grokclassfn): Likewise.
3532
3533 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
3534
3535 * decl2.c (lang_decode_option): Don't set default message length
3536 here.
3537 * lex.c (lang_init_options): Set it here.
3538
3539 2000-02-16 Mark Mitchell <mark@codesourcery.com>
3540
3541 Make DECL_CONTEXT mean the class in which a member function was
3542 declared, even for a virtual function.
3543 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
3544 (DECL_FRIEND_CONTEXT): New macro.
3545 (DECL_REAL_CONTEXT): Remove.
3546 (SET_DECL_FRIEND_CONTEXT): Likewise.
3547 (DECL_VIRTUAL_CONTEXT): Adjust.
3548 (DECL_CLASS_SCOPE_P): Use TYPE_P.
3549 (add_friends): Remove.
3550 (hack_decl_function_context): Likewise.
3551 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
3552 CP_DECL_CONTEXT.
3553 (build_over_call): Fix indentation. Use DECL_CONTEXT
3554 instead of DECL_CLASS_CONTEXT.
3555 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
3556 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
3557 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3558 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
3559 (build_base_field): Likewise.
3560 (finish_struct_1): Likewise.
3561 (build_self_reference): Likewise.
3562 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
3563 DECL_REAL_CONTEXT.
3564 (pushtag): Use decl_function_context, not
3565 hack_decl_function_context.
3566 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
3567 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
3568 (pushdecl): Remove bogus code.
3569 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
3570 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
3571 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3572 Use decl_function_context, nothack_decl_function_context.
3573 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
3574 (grokdeclarator): Likewise. Use decl_function_context, not
3575 hack_decl_function_context.
3576 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
3577 (start_function): Use DECL_FRIEND_CONTEXT, not
3578 DECL_CLASS_CONTEXT. Use decl_function_context, not
3579 hack_decl_function_context.
3580 (finish_function): Use decl_function_context, not
3581 hack_decl_function_context.
3582 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
3583 DECL_CLASS_CONTEXT.
3584 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
3585 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
3586 (grokfield): Likewise.
3587 (finish_builtin_type): Likewise.
3588 (finish_vtable_vardec): Use decl_function_context, not
3589 hack_decl_function_context.
3590 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3591 (start_static_initialization_or_destruction): Likewise.
3592 (finish_static_initialization_or_destruction): Likewise.
3593 (mark_used): Adjust logic for deciding when to synthesize methods.
3594 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
3595 DECL_REAL_CONTEXT.
3596 * error.c (dump_function_decl): Use DECL_CONTEXT, not
3597 DECL_CLASS_CONTEXT.
3598 * friend.c (is_friend): Likewise.
3599 (add_friends): Remove.
3600 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
3601 * lex.c (begin_definition_of_inclass_inline): Use
3602 decl_function_context, not hack_decl_function_context.
3603 (process_next_inline): Likewise.
3604 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
3605 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
3606 DECL_CLASSS_CONTEXT.
3607 (hack_identifier): Likewise.
3608 (synthesize_method): Use decl_function_context, not
3609 hack_decl_function_context.
3610 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
3611 DECL_REAL_CONTEXT.
3612 (is_member_template): Use decl_function_context, not
3613 hack_decl_function_context. Use DECL_CONTEXT, not
3614 DECL_CLASS_CONTEXT.
3615 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
3616 DECL_CLASS_CONTEXT.
3617 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
3618 DECL_REAL_CONTEXT.
3619 (push_template_decl_real): Likewise.
3620 (instantiate_class_template): Don't call add_friends.
3621 (tsubst_default_argument): Use DECL_CONTEXT, not
3622 DECL_REAL_CONTEXT.
3623 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
3624 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3625 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
3626 DECL_CLASS_CONTEXT.
3627 * repo.c (repo_inline_used): Likewise.
3628 * search.c (current_scope): Adjust for new _CONTEXT macros.
3629 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
3630 DECL_REAL_CONTEXT.
3631 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3632 (lookup_fnfields_here):Likewise.
3633 (check_final_overrider): Likewise.
3634 (init_vbase_pointers): Likewise.
3635 (virtual_context): Likewise.
3636 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
3637 (expand_body): Use decl_function_context, not
3638 hack_decl_function_context.
3639 * tree.c (hack_decl_function_context): Remove.
3640 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
3641 DECL_CLASS_CONTEXT.
3642 * typeck2.c (error_not_base_type): Likewise.
3643
3644 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
3645
3646 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
3647
3648 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3649
3650 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
3651
3652 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
3653
3654 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
3655
3656 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
3657
3658 * decl2.c (lang_decode_option): Enable automatic line wrapping.
3659
3660 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
3661
3662 * parse.y (frob_specs): Split out...
3663 (parse_decl): From here.
3664 (fn.def2): Call initial_deferred_type_access_control.
3665 (after_type_component_declarator0): Call frob_specs.
3666 (notype_component_declarator0): Likewise.
3667 * search.c (friend_accessible_p): Nested classes are friends of their
3668 enclosing classes.
3669
3670 2000-02-10 Mark Mitchell <mark@codesourcery.com>
3671
3672 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
3673 used to create an implicit temporary.
3674
3675 * class.c (dfs_modify_vtables): Tweak calculation of functions to
3676 override.
3677
3678 2000-02-08 Nathan Sidwell <nathan@acm.org>
3679
3680 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
3681 strip array element qualifiers too.
3682
3683 2000-02-07 Mark Mitchell <mark@codesourcery.com>
3684
3685 * decl.c (store_parm_decls): Don't build cleanups for parameters
3686 while processing_template_decl.
3687
3688 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
3689
3690 * cp-tree.h (struct saved_scope): Add incomplete field.
3691 (namespace_scope_incomplete): New macro.
3692 * decl.c (pushdecl): Use it.
3693 (hack_incomplete_structures): Use it. See through artificial
3694 binding levels.
3695 (mark_saved_scope): Mark it.
3696
3697 Implement access control for nested types.
3698 * search.c (type_access_control): New fn.
3699 (accessible_p): Now we do perform access control for types.
3700 * semantics.c (deferred_type_access_control): New fn.
3701 (initial_deferred_type_access_control): New fn.
3702 (begin_function_definition): Call it. Add lookups parm.
3703 * decl.c (struct binding_level): Add this_class field.
3704 (pushlevel_class): Set it.
3705 (mark_binding_level): Mark it.
3706 (lookup_name_real): Use it. Call type_access_control.
3707 (mark_saved_scope): Mark lookups field.
3708 * cp-tree.h (flagged_type_tree): Add lookups field.
3709 (struct saved_scope): Add lookups field.
3710 (type_lookups): New macro.
3711 * parse.y (declmods): Now <ftype>.
3712 (parse_decl): Add lookups parm. Call
3713 initial_deferred_type_access_control.
3714 (lang_extdef): Clear type_lookups.
3715 (typed_declspecs, declmods, typespec): Set lookups field.
3716 (initdcl): Call deferred_type_access_control.
3717 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
3718 component_decl_1, named_parm): Adjust.
3719 * friend.c (is_friend): Nested classes are friends of their
3720 enclosing classes.
3721
3722 * class.c (currently_open_derived_class): New fn.
3723 * method.c (hack_identifier): Use it.
3724
3725 * lex.c (do_identifier): Remove obsolete code.
3726
3727 * parse.y (typed_typespecs): Propagate new_type_flag properly.
3728
3729 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
3730
3731 * tinfo.h: Remove apostrophes from C++ comment (xgettext
3732 thinks this file is plain C).
3733
3734 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3735
3736 * Makefile.in (call.o): Depend on $(EXPR_H).
3737
3738 * call.c: Include "expr.h".
3739
3740 * class.c (dump_class_hierarchy): Add prototype.
3741
3742 * search.c (dfs_get_pure_virtuals): Likewise.
3743
3744 2000-02-1 Ulrich Drepper <drepper@redhat.com>
3745
3746 * parse.y (simple_stmt): Allow :: token in asm parameter list.
3747 * parse.c: Rebuilt.
3748
3749 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
3750
3751 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
3752 Store it in DECL_FCONTEXT.
3753 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
3754
3755 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
3756
3757 * tinfo.h (old abi): #include "tconfig.h".
3758 * tinfo.cc (convert_to_base): Move into old abi section.
3759
3760 2000-01-31 Mark Mitchell <mark@codesourcery.com>
3761
3762 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
3763 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
3764 (BINFO_PRIMARY_BINFO): New macro.
3765 (BF_DELTA): Rename to ...
3766 (BV_DELTA): ... this.
3767 (BF_VCALL_INDEX): Rename to ...
3768 (BV_VCALL_INDEX): ... this.
3769 (BF_FN): Rename to ...
3770 (BV_FN): ... this.
3771 * class.c (build_vbase_path): Adjust for changes to reverse_path.
3772 (set_rtti_entry): Rename BF_ macros to BV_ variants.
3773 (modify_vtable_entry): Simplify.
3774 (add_virtual_function): Rename BF_ macros to BV_ variants.
3775 (build_vtable_initializer): Likewise.
3776 (get_class_offset_1): Remove.
3777 (dfs_get_class_offset): Likewise.
3778 (get_class_offset): Likewise.
3779 (dfs_find_final_overrider): New function.
3780 (find_final_overrider): Likewise.
3781 (modify_one_vtable): Remove.
3782 (dfs_find_base): New function.
3783 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
3784 find_final_overrider.
3785 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
3786 virtuals.
3787 (dfs_fixup_vtable_deltas): Remove.
3788 (override_one_vtable): Remove.
3789 (merge_overrides): Likewise.
3790 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
3791 unreal chilren of virtual bases.
3792 (finish_struct_1): Don't use merge_overrides. Don't use
3793 dfs_fixup_vtable_deltas.
3794 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
3795 BINFOs.
3796
3797 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
3798 Jason Merrill <jason@yorick.cygnus.com>
3799
3800 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
3801
3802 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
3803
3804 * exception.cc (__throw_bad_typeid): Add missing std::.
3805
3806 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3807
3808 * cp-tree.h (make_thunk): PROTO -> PARAMS.
3809
3810 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
3811
3812 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
3813
3814 Runtime support for new-abi rtti.
3815 * inc/typeinfo (type_info::operator!=): Define in class.
3816 (type_info::before, type_info::name, type_info::operator==,
3817 type_info::operator!=): Define new ABI implementations.
3818 (type_info::is_pointer_p, type_info::is_function_p): Declare
3819 new virtual functions.
3820 (type_info::do_catch, type_info::do_upcast): Likewise.
3821
3822 * tinfo.h (__base_class_info): Define new class.
3823 (__class_type_info): Likewise.
3824 (__si_class_type_info): Likewise.
3825 (__vmi_class_type_info): Likewise.
3826 (__dynamic_cast): Prototype.
3827
3828 * tinfo.cc: Conditionalize old and new rtti mechanisms.
3829 (type_info::is_pointer_p): Define new function.
3830 (type_info::is_function_p): Likewise.
3831 (type_info::do_catch): Likewise.
3832 (type_info::do_upcast): Likewise.
3833 (vtable_prefix): New structure for vtable access.
3834 (adjust_pointer): Define new template function.
3835 (contained_p, public_p, virtual_p, contained_public_p,
3836 contained_nonpublic_p, contained_nonvirtual_p): Define new
3837 functions.
3838 (nonvirtual_base_type): New local variable.
3839 (__class_type_info::~__class_type_info): Define.
3840 (__si_class_type_info::~__si_class_type_info): Likewise.
3841 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
3842 (__class_type_info::do_catch): Define new function.
3843 (__class_type_info::do_upcast): Likewise.
3844 (__class_type_info::find_public_src): Likewise.
3845 (__class_type_info::do_find_public_src): Likewise.
3846 (__si_class_type_info::do_find_public_src): Likewise.
3847 (__vmi_class_type_info::do_find_public_src): Likewise.
3848 (__class_type_info::do_dyncast): Likewise.
3849 (__si_class_type_info::do_dyncast): Likewise.
3850 (__vmi_class_type_info::do_dyncast): Likewise.
3851 (__class_type_info::do_upcast): Likewise.
3852 (__si_class_type_info::do_upcast): Likewise.
3853 (__vmi_class_type_info::do_upcast): Likewise.
3854 (__dynamic_cast): Likewise.
3855
3856 * tinfo2.cc (__fundamental_type_info): Define new class.
3857 (__pointer_type_info): Likewise.
3858 (__reference_type_info): Likewise.
3859 (__array_type_info): Likewise.
3860 (__function_type_info): Likewise.
3861 (__enum_type_info): Likewise.
3862 (__ptr_to_member_type_info): Likewise.
3863 (__fundamental_type_info::~__fundamental_type_info): Define.
3864 (__pointer_type_info::~__pointer_type_info): Likewise.
3865 (__reference_type_info::~__reference_type_info): Likewise.
3866 (__array_type_info::~__array_type_info): Likewise.
3867 (__function_type_info::~__function_type_info): Likewise.
3868 (__enum_type_info::~__enum_type_info): Likewise.
3869 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
3870 (__pointer_type_info::do_catch): Define new function.
3871 (__ptr_to_member_type_info::do_catch): Define new function.
3872
3873 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
3874 (__is_pointer): Likewise.
3875
3876 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
3877
3878 2000-01-30 Mark Mitchell <mark@codesourcery.com>
3879
3880 * cp/class.c (build_vtable): Rename to build_primary_vtable.
3881 (prepare_fresh_vtable): Rename to build_secondary_vtable.
3882 (make_new_vtable): New function.
3883 (modify_vtable_entry): Handle generation of new vtables correctly.
3884 (modify_one_vtable): Remove unused parameter.
3885 (dfs_fixup_vtable_deltas): Likewise.
3886 (override_one_vtable): Use build_secondary_vtable.
3887 (finish_struct_1): Use build_primary_vtable and
3888 build_secondary_vtable.
3889
3890 2000-01-28 Ulrich Drepper <drepper@redhat.com>
3891
3892 * cp/decl.c: Adjust variable names, comments, help strings.
3893
3894 2000-01-29 Nathan Sidwell <nathan@acm.org>
3895
3896 * new2.cc (operator delete[]): Use operator delete, don't assume
3897 implementation.
3898
3899 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
3900
3901 * class.c (build_vtbl_initializer): Add argument to
3902 build_vtable_entry call.
3903
3904 2000-01-27 Mark Mitchell <mark@codesourcery.com>
3905
3906 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
3907 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
3908 (BF_DELTA): New macro.
3909 (BF_VCALL_INDEX): Likewise.
3910 (BF_FN): Likewise.
3911 (THUNK_VCALL_OFFSET): Likewise.
3912 (make_thunk): Change prototype.
3913 * class.c (build_vtable_entry): Integrate
3914 build_vtable_entry_for_fn. Handle vcall indices.
3915 (build_vtable_entry_for_fn): Remove.
3916 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
3917 BF_VCALL_INDEX, BF_FN.
3918 (modify_vtable_entry): Integrate common code from
3919 modify_one_vtable and dfs_fixup_vtable_deltas.
3920 (add_virtual_function): Set BF_VCALL_INDEX.
3921 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
3922 and BF_FN.
3923 (modify_one_vtable): Simplify.
3924 (dfs_fixup_vtable_deltas): Likewise.
3925 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
3926 * method.c (make_thunk): Handle vcall indices.
3927
3928 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
3929
3930 Compiler side new abi rtti (not enabled).
3931 * cp-tree.h (new_abi_rtti_p): New macro.
3932 (emit_support_tinfos): Prototype new function.
3933 (tinfo_decl_p): Likewise.
3934 (emit_tinfo_decl): Likwise.
3935 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
3936 macros.
3937 (doing_runtime): New local static.
3938 (init_rtti_processing): Add new-abi initializer.
3939 (get_tinfo_decl): Add new-abi logic.
3940 (tinfo_from_decl): Likewise.
3941 (build_dynamic_cast_1): Likewise.
3942 (qualifier_flags): New static function.
3943 (tinfo_base_init): Likewise.
3944 (generic_initializer): Likewise.
3945 (ptr_ref_initializer): Likewise.
3946 (ptmd_initializer): Likewise.
3947 (class_hint_flags): Likewise.
3948 (class_initializer): Likewise.
3949 (synthesize_tinfo_var): Likewise.
3950 (create_real_tinfo_var): Likewise.
3951 (create_pseudo_type_info): Likewise.
3952 (get_vmi_pseudo_type_info): Likewise.
3953 (create_tinfo_types): Likewise.
3954 (emit_support_tinfos): New global function.
3955 (tinfo_decl_p): New global predicate.
3956 (emit_tinfo_decl): New global function.
3957 * class.c (set_rtti_entry): Generalize for old and new rtti.
3958 (build_vtbl_initializer): Likewise.
3959 * decl2.c (finish_file): Likewise.
3960
3961 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
3962
3963 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
3964 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
3965
3966 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
3967
3968 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
3969 for scopes.
3970
3971 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
3972
3973 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
3974
3975 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
3976
3977 * optimize.c (calls_setjmp_r): Supply new argument
3978 to special_function_p.
3979
3980 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3981
3982 * call.c: PROTO -> PARAMS.
3983 * class.c: Likewise.
3984 * cp-tree.h: Likewise.
3985 * cvt.c: Likewise.
3986 * decl.c: Likewise.
3987 * decl.h: Likewise.
3988 * decl2.c: Likewise.
3989 * dump.c: Likewise.
3990 * errfn.c: Likewise.
3991 * error.c: Likewise.
3992 * except.c: Likewise.
3993 * expr.c: Likewise.
3994 * init.c: Likewise.
3995 * input.c: Likewise.
3996 * lex.c: Likewise.
3997 * lex.h: Likewise.
3998 * method.c: Likewise.
3999 * optimize.c: Likewise.
4000 * parse.y: Likewise.
4001 * pt.c: Likewise.
4002 * repo.c: Likewise.
4003 * rtti.c: Likewise.
4004 * search.c: Likewise.
4005 * semantics.c: Likewise.
4006 * spew.c: Likewise.
4007 * tree.c: Likewise.
4008 * typeck.c: Likewise.
4009 * typeck2.c: Likewise.
4010 * xref.c: Likewise.
4011
4012 2000-01-25 Richard Henderson <rth@cygnus.com>
4013
4014 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
4015
4016 2000-01-25 Mark Mitchell <mark@codesourcery.com>
4017
4018 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
4019 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
4020 (struct vcall_offset_data_s): New type.
4021 (dfs_vcall_offset_queue_p): New function.
4022 (dfs_build_vcall_offset_vtbl_entries): Likewise.
4023 (build_vcall_offset_vtbl_entries): Likewise.
4024 (layout_vtable_decl): Likewise.
4025 (num_vfun_entries): Likewise.
4026 (num_extra_vtbl_entries): Add the entries for vcall offsets.
4027 (build_vtbl_initializer): Likewise.
4028 (dfs_finish_vtabls): Use layout_vtable_decl.
4029 (modify_one_vtables): Always duplicate vtables under the new ABI.
4030 (finish_struct_1): Use layout_vtable_decl.
4031
4032 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4033
4034 * decl.c (member_function_or_else): Change third arg from a format
4035 specifier to an `enum overload_flags'. Callers changed.
4036
4037 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
4038
4039 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
4040 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
4041 build_const_cast, get_delta_difference, check_return_expr): Avoid
4042 ANSI string concatenation usage.
4043
4044 2000-01-24 Mark Mitchell <mark@codesourcery.com>
4045
4046 * class.c (layout_class_type): Put the fields required to make a
4047 class non-empty at the end, not the beginning, of the TYPE_FIELDs
4048 list.
4049
4050 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
4051
4052 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
4053 template.
4054
4055 * decl2.c (mark_used): Do instantiate inlines that have been
4056 explicitly instantiated.
4057
4058 2000-01-24 Richard Henderson <rth@cygnus.com>
4059
4060 * call.c (build_over_call): Use expand_tree_builtin.
4061 * typeck.c (build_function_call_real): Likewise.
4062 (build_binary_op_nodefault): Handle unordered compares.
4063
4064 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
4065
4066 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
4067 cp_tree_index values.
4068 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
4069 New global node #defines for them.
4070 * rtti.c (call_void_fn): Replace with ...
4071 (build_runtime_decl): ... new static function.
4072 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
4073 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
4074 (build_dynamic_cast_1): Always produce correctly typed result.
4075 Explicitly produce type_info addresses. Use dynamic_cast_node.
4076 * exception.cc (__throw_bad_cast): Return `void *'.
4077 (__throw_bad_typeid): Return `const type_info &'.
4078
4079 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
4080
4081 * cp-tree.h (get_vtable_decl): Prototype new function.
4082 * class.c (get_vtable_decl): New function. Broken out from ...
4083 (build_vtable): ... here. Use it.
4084 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
4085 by get_vtable_decl.
4086
4087 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
4088
4089 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
4090 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
4091 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
4092 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
4093 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
4094 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
4095 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
4096 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
4097 (CPTI_TINFO_VAR_ID): New enumeration.
4098 (__tp_desc_type_node, __access_mode_type_node,
4099 __bltn_desc_type_node, __user_desc_type_node,
4100 __class_desc_type_node, __ptr_desc_type_node,
4101 __attr_desc_type_node, __func_desc_type_node,
4102 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
4103 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
4104 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
4105 enum_desc_type_node, class_desc_type_node,
4106 si_class_desc_type_node, vmi_class_desc_type_node,
4107 ptmd_desc_type_node, base_desc_type_node): New #defines.
4108 (tinfo_fn_id, tinfo_fn_type): Rename to ...
4109 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
4110 (tinfo_var_id): New enumeration.
4111 (DECL_TINFO_FN_P): Augment comment.
4112 * decl.c (cp_global_trees): Adjust documentation.
4113 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
4114 tinfo_decl_type and tinfo_var_id.
4115 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
4116 (build_typeid): Remove unused variable.
4117 (get_tinfo_var): Use tinfo_var_id.
4118 (tinfo_name): New static function.
4119 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
4120 (tinfo_from_decl): Likewise.
4121 (get_base_offset): New static function, broken out of
4122 expand_class_desc.
4123 (expand_si_desc): Use tinfo_name.
4124 (expand_class_desc): Likewise. Lose local static variable.
4125 Use base_desc_type_node. Use get_base_offset.
4126 (expand_ptr_desc): Use tinfo_name.
4127 (expand_attr_desc): Likewise.
4128 (expand_generic_desc): Likewise.
4129
4130 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
4131 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
4132
4133 2000-01-23 Mark Mitchell <mark@codesourcery.com>
4134
4135 * cp-tree.h (__eprintf): Remove declaration.
4136 * tree.c (__eprintf): Remove definition.
4137
4138 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
4139 Mark Mitchell <mark@codesourcery.com>
4140
4141 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
4142 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
4143
4144 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
4145
4146 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
4147
4148 2000-01-23 Mark Mitchell <mark@codesourcery.com>
4149
4150 * cp-tree.h (register_dtor_fn): New function.
4151 * decl.c (destroy_local_static): Rename to ...
4152 (register_dtor_fn): ... this. Give it external linkage.
4153 (expand_static_init): Use it.
4154 * decl2.c (do_static_initialization): Likewise, if using
4155 __cxa_atexit.
4156 (do_static_destruction): Check that __cxa_atexit is not in use.
4157 (finish_file): Don't call do_static_destruction if using
4158 __cxa_atexit.
4159
4160 * typeck.c (convert_arguments): Restore two-message error
4161 reporting.
4162
4163 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
4164
4165 Remap dynamic cast hint values to be consistent across ABIs.
4166 * search.c (dynamic_cast_base_recurse): Remap generated value.
4167 (get_dynamic_cast_base_type): Adjust documentation.
4168 * tinfo.h (__user_type_info::dyncast): Likewise.
4169 (__user_type_info::find_public_subobj): Remap BOFF meaning.
4170 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
4171 (__class_type_info::do_dyncast): Likewise.
4172 (__class_type_info::do_find_public_subobj): Likewise.
4173 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
4174
4175 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
4176
4177 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
4178
4179 * typeck2.c (incomplete_type_error): Restore previous
4180 cp_error and cp_error_at call sequence.
4181
4182 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
4183
4184 * class.c (dump_class_hierarchy): Make format agree with argument;
4185 cast pointer to unsigned long and print with %lx.
4186
4187 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
4188
4189 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
4190
4191 * typeck.c (composite_pointer_type, common_type,
4192 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
4193 build_function_call_real, convert_arguments,
4194 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
4195 build_unary_op, mark_addressable, build_compound_expr,
4196 build_static_cast, build_reinterpret_cast, build_const_cast,
4197 build_c_cast, build_modify_expr, get_delta_difference,
4198 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
4199 'ISO C++'. Fusion consecutive calls to diagnotic message routines
4200 into a single one.
4201 * typeck2.c (readonly_error, abstract_virtuals_error,
4202 process_init_constructor, check_for_new_type): Likewise.
4203
4204 2000-01-19 Mark Mitchell <mark@codesourcery.com>
4205
4206 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
4207 VAR_DECLs.
4208
4209 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
4210
4211 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
4212 (build_x_typeid): Likewise.
4213 (get_tinfo_fn): Likewise.
4214 (get_tinfo_fn_unused): Rename to ...
4215 (get_tinfo_decl): ... here.
4216 * rtti.c (build_headof): Replace logic error with assertion.
4217 (get_tinfo_fn_dynamic): Rename to ...
4218 (get_tinfo_decl_dynamic): ... here. Make static. Use
4219 complete_type_or_else.
4220 (build_x_typeid): Move into ...
4221 (build_typeid): ... here. Adjust call to
4222 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
4223 throw_bad_typeid expression.
4224 (get_tinfo_fn_unused): Rename to ...
4225 (get_tinfo_decl): ... here. Adjust comment.
4226 (get_tinfo_fn): Delete.
4227 (tinfo_from_decl): New static function.
4228 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
4229 (get_typeid): Use complete_type_or_else.
4230 (build_dynamic_cast_1): Adjust calls to
4231 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
4232 * parse.y (primary): Adjust call to build_typeid.
4233 * except.c (build_eh_type_type_ref): Adjust call to
4234 get_tinfo_decl. Mark as used.
4235 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
4236 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
4237 * parse.c: Regenerated.
4238
4239 2000-01-17 Mark Mitchell <mark@codesourcery.com>
4240
4241 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
4242 calling convention.
4243 (resolves_to_fixed_type_p): Document calling convention.
4244 * rtti.c (build_x_typeid): Initialize NONNULL.
4245
4246 * cp-tree.h (build_shared_int_cst): New function.
4247 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
4248 * class.c (modify_vtable_entry): Likewise.
4249 (add_virtual_function): Split out code to generated shared
4250 INTEGER_CSTs to build_share_int_cst.
4251 (modify_all_vtables): Handle all the overridden functions here.
4252 Add overridden functions from non-primary virtual bases to the
4253 primary vtable.
4254 (finish_struct_1): Adjust call to modify_all_vtables. Add
4255 overridden functions from non-primary bases to the vtable.
4256 * tree.c (build_shared_int_cst): New function.
4257
4258 * cp-tree.h (scratchalloc): Remove.
4259 (build_scratch_list): Likewise.
4260 * call.c (convert_class_to_reference): Replace build_scratch_list
4261 and build_expr_list with build_tree_list.
4262 (add_candidate): Replace scratchalloc with expralloc. Note memory
4263 leak.
4264 (build_user_type_conversion_1): Replace build_scratch_list
4265 and build_expr_list with build_tree_list.
4266 (build_new_op): Likewise.
4267 (build_op_delete_call): Likewise.
4268 (convert_like): Likewise.
4269 * cvt.c (ocp_convert): Likewise.
4270 * decl.c (start_decl): Likewise.
4271 (start_function): Likewise.
4272 (finish_destructor_body): Likewise.
4273 (maybe_build_cleanup_1): Likewise.
4274 * decl2.c (reparse_decl_as_expr): Likewise.
4275 * init.c (perform_member_init): Likewise.
4276 (expand_cleanup_for_base): Likewise.
4277 (build_builtin_delete_call): Likewise.
4278 (build_new_1): Likewise.
4279 (build_delete): Likewise.
4280 * method.c (do_build_assign_ref): Likewise.
4281 * parse.y (already_scoped_stmt): Likewise.
4282 (nontrivial_exprlist): Likewise.
4283 (net_initializer): Likewise.
4284 (initlist): Likewise.
4285 * parse.c: Regenerated.
4286 * rtti.c (build_x_typeid): Likewise.
4287 (build_dynamic_cast_1): Likewise.
4288 * typeck.c (build_x_compound_expr): Likewise.
4289 (build_static_cast): Likewise.
4290 (build_modify_expr): Likewise.
4291
4292 * cp-tree.h (DECL_VINDEX): Add documentation.
4293 * class.c (build_vtable_entry): Likewise.
4294 (start_vtable): Add comment.
4295 (add_virtual_function): Replace pending_hard_virtuals with
4296 overridden_virtuals and pending_virtuals with new_virtuals.
4297 Replace redundant assignments with assertions.
4298 (check_for_override): Add comment.
4299 (check_bases_and_members): Replace pending_hard_virtuals with
4300 overridden_virtuals and pending_virtuals with new_virtuals.
4301 (create_vtbl_ptr): Likewise.
4302 (layout_class_type): Likewise.
4303 (finish_struct_1): Likewise. Add comments.
4304
4305 2000-01-16 Mark Mitchell <mark@codesourcery.com>
4306
4307 * class.c (finish_struct_1): Replace redundant code with
4308 assertions.
4309
4310 * cp-tree.h (flag_new_abi): Move.
4311 (flag_use_cxa_atexit): Likewise.
4312 (flag_honor_std): Likewise.
4313 (flag_rtti): Likewise.
4314 (vbase_offsets_in_vtable_p): Define.
4315 (vptrs_present_everywhere_p): Likewise.
4316 (TYPE_CONTAINS_VPTR_P): Likewise.
4317 (dfs_walk_real): Declare.
4318 * class.c (build_vbase_pointer_fields): Check
4319 vbase_offsets_in_vtable_p.
4320 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
4321 BINFO_VPTR_FIELD.
4322 (build_vbase_offset_vtbl_entries): Simplify.
4323 (build_vbase_offset_vtbl_entries): Adjust.
4324 (build_vbase_pointer): Add ability to look up vbase offsets in
4325 vtable.
4326 (start_vtable): New function.
4327 (add_virtual_function): Use it.
4328 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
4329 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
4330 (build_vtbl_initializer): Take the type of the complete object as
4331 input. Use it to correctly calculate vbase offsets.
4332 (dfs_finish_vtbls): Pass the complete type to
4333 build_vtbl_initializer.
4334 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
4335 (create_vtable_ptr): Create a vtable even if there are no
4336 new virtual functions, under the new ABI.
4337 (finish_struct_1): Likewise.
4338 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
4339 * decl.c (exapnd_static_init): Remove call to
4340 preserve_initializer.
4341 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
4342 vtables.
4343 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
4344 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
4345 (construct_virtual_bases): Don't initialize virtual base pointers
4346 under the new ABI.
4347 (build_aggr_init): Clean up comment.
4348 (expand_aggr_init_1): Likewise.
4349 * rtti.c (expand_class_desc): Store the virtual function table
4350 index where the vbase offset lives in the offset field.
4351 * search.c (dfs_walk_real): Make it global.
4352 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
4353 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
4354
4355 * tinfo.h (USItype): Make it signed under the new ABI.
4356 * tinfo.cc (convert_to_base): New function. Encapsulate base
4357 conversion logic here.
4358 (__class_type_info::do_upcast): Use it.
4359 (__class_type_info::do_dyncast): Likewise.
4360 (__class_type_info::do_find_public_subobj): Likewise.
4361
4362 * init.c (construct_virtual_bases): Don't look up the addresses of
4363 virtual bases at run-time.
4364
4365 * class.c (build_vbase_pointer): Relocate.
4366 (build_vbase_pointer_fields): Likewise.
4367 (dfs_build_vbase_offset_vtbl_entries): Likewise.
4368 (build_vbase_offset_vtbl_entries): Likewise.
4369
4370 * decl.c (init_decl_processing): Complain if -fnew-abi
4371 -fno-vtable-thunks is used.
4372
4373 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
4374 flag_new_abi.
4375
4376 2000-01-15 Mark Mitchell <mark@codesourcery.com>
4377
4378 * cp-tree.h (num_extra_vtbl_entries): New function.
4379 (size_extra_vtbl_entries): Likewise.
4380 (dfs_vtable_path_unmark): Likewise.
4381 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
4382 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
4383 * class.c (num_extra_vtbl_entries): New function.
4384 (size_extra_vtbl_entries): Likewise.
4385 (dfs_build_vbase_offset_vtbl_entries): New function.
4386 (build_vbase_offset_vtbl_entries): Likewise.
4387 (build_vtbl_initializer): Use it.
4388 (finish_struct_1): Adjust vtable sizes (using
4389 num_extra_vtbl_entries).
4390 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
4391 THUNK_DECL is non-NULL before expanding it.
4392 * init.c (expand_virtual_init): Adjust the vtable pointer by
4393 size_extra_vtbl_entries before storing it.
4394 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
4395 Handle TREE_LIST parameters here, not in the dfs_* functions.
4396 (dfs_unmarked_real_bases_queue_p): Adjust.
4397 (dfs_marked_real_bases_queue_p): Likewise.
4398 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
4399 (dfs_vtable_path_marked_real_bases_queue_p): New function.
4400 (dfs_vtable_path_unmark): Likewise.
4401
4402 2000-01-14 Mark Mitchell <mark@codesourcery.com>
4403
4404 * optimize.c (copy_body_r): Clear the operand three of a
4405 TARGET_EXPR when copying it.
4406
4407 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4408
4409 * method.c (build_decl_overload_real): Check whether we are in ::
4410 before returning __builtin_new/delete.
4411
4412 2000-01-13 Mark Mitchell <mark@codesourcery.com>
4413
4414 * pt.c (tsubst_friend_function): Improve comment.
4415 (instantiate_decl): Avoid crashing when a "nested" function is
4416 instantiated from the top level.
4417
4418 * dump.c (dqeueue_and_dump): Dump
4419 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
4420
4421 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4422
4423 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
4424
4425 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
4426
4427 * g++spec.c (lang_specific_driver): Add -fnew-abi if
4428 ENABLE_NEW_GXX_ABI defined.
4429 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
4430 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
4431 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
4432
4433 2000-01-12 Mark Mitchell <mark@codesourcery.com>
4434
4435 * decl.c (start_cleanup_fn): Call pushdecl.
4436
4437 * call.c (convert_class_to_reference): Fix typos.
4438 (build_conditional_expr): Handle errors gracefully.
4439 * class.c (push_nested_class): Likewise.
4440 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
4441 (DECL_THIS_EXTERN): Use it.
4442 (DECL_THIS_STATIC): Likewise.
4443 * cvt.c (convert_to_void): Handle errors gracefully.
4444 (build_expr_type_conversion): Likewise.
4445 * decl.c (maybe_push_decl): Likewise.
4446 (start_decl_1): Likewise.
4447 (require_complete_types_for_parms): Likewise.
4448 * parse.y (structsp): Likewise.
4449 (base_class): Likewise.
4450 * parse.c: Regenerated.
4451 * pt.c (finish_member_template_decl): Likewise.
4452 * typeck.c (decay_conversion): Likewise.
4453
4454 * cp-tree.h (dfs_skip_vbases): New function.
4455 (find_vbase_instance): Likewise.
4456 * class.c (determine_primary_base): Allow a nearly empty base to
4457 serve as a primary base class under the new ABI.
4458 (get_class_offset_1): Rename to ...
4459 (dfs_get_class_offset): ... this. Simplify. Don't issue error
4460 messages here.
4461 (get_class_offset): Use it. Issue error messages here.
4462 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
4463 find the right copies of virtual bases.
4464 (fixup_vtable_deltas1): Rename to ...
4465 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
4466 bases as primary bases.
4467 (fixup_vtable_deltas): Remove.
4468 (override_one_vtable): Handle virtual bases as primary bases.
4469 (merge_overrides): Likewise.
4470 (finish_struct_1): Likewise.
4471 (dump_class_hierarchy): Dump primary-ness of bases as well.
4472 * search.c (mark_primary_bases): Use a pre-order traversal to
4473 handle primary virtual bases.
4474 (dfs_skip_vbases): New fiunction.
4475 (expand_upcast_fixups): Adjust to handle primary virtual bases.
4476 (fixup_virtual_upcast_offsets): Likewise.
4477 (fixup_all_virtual_upcast_offsets): Likewise.
4478 (dfs_find_vbase_instances): New function.
4479 (find_vbase_instance): Likewise.
4480
4481 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
4482
4483 * lex.c (DIR_SEPARATOR): Delete macro.
4484
4485 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
4486
4487 * decl2.c (lang_decode_option): Handle automatic line wrapping
4488 option.
4489
4490 2000-01-11 Mark Mitchell <mark@codesourcery.com>
4491
4492 * friend.c (do_friend): Don't resolve scopes when processing
4493 template declarations, even if the qualifying scope doesn't
4494 involve template parameters.
4495
4496 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
4497
4498 * class.c (dfs_modify_vtables_queue_p): Remove.
4499 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
4500 and dfs_marked_real_bases_queue_p instead of
4501 dfs_modify_vtables_queue_p.
4502
4503 * class.c (build_vbase_path): Simplify.
4504 (dfs_propagate_binfo_offsets): New function.
4505 (propagate_binfo_offsets): Use it.
4506 (remove_base_field): Simplify.
4507 (dfs_set_offset_for_vbases): Remove.
4508 (dfs_set_offset_for_shared_vbases): New function.
4509 (dfs_set_offset_for_unshared_vbases): Likewise.
4510 (layout_virtual_bases): Use them.
4511 (layout_basetypes): Don't call propagate_binfo_offsets.
4512 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
4513 for the vbases.
4514
4515 * class.c (build_base_field): New function, split out from ...
4516 (build_base_fields): ... here. Use it. Allocate primary bases
4517 first, under the new ABI.
4518 (get_vtable_entry): Remove.
4519 (remove_base_field): New function, split out from ...
4520 (remove_base_fields): ... here. Adjust since primary bases come
4521 first under the new ABI.
4522
4523 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
4524 (initialize_vtbl_ptrs): New function.
4525 (expand_indirect_vtbls_init): Change prototype.
4526 (convert_pointer_to_vbase): Declare.
4527 * init.c (expand_direct_vtbls_init): Remove.
4528 (dfs_initialize_vtbl_ptrs): New function.
4529 (initialize_vtbl_ptrs): Likewise.
4530 (emit_base_init): Use initialize_vtbl_ptrs.
4531 * search.c (convert_pointer_to_vbase): Make it global.
4532 (expand_indirect_vtbls_init): Remove vtable initialization code.
4533 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
4534
4535 * class.c (dfs_finish_vtbls): New function.
4536 (finish_vtbls): Use it.
4537 (dump_class_hierarchy): New function.
4538
4539 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
4540 (BINFO_VBASE_PRIMARY_P): New macro.
4541 (BINFO_VIRTUALS): Add to documentation.
4542 (SET_BINFO_PRIMARY_MARKED_P): Remove.
4543 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
4544 (dfs_mark_primary_bases_queue_p): Likewise.
4545 (dfs_unmarked_real_bases_queue_p): New function.
4546 (dfs_marked_real_bases_queue_p): Likewise.
4547 * search.c (dfs_mark_primary_bases): Adjust.
4548 (mark_primary_bases): Likewise.
4549 (get_shared_vbase_if_not_primary): New function.
4550 (dfs_unmarked_real_bases_queue_p): Likewise.
4551 (dfs_marked_real_bases_queue_p): Likewise.
4552 (dfs_get_pure_virtuals): Simplify.
4553 (get_pure_virtuals): Likewise.
4554
4555 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4556
4557 * lex.c: Include tm_p.h.
4558
4559 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
4560
4561 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
4562
4563 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
4564
4565 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
4566 * pt.c (instantiate_decl): Defer comdat templates that might not be
4567 needed.
4568
4569 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
4570 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
4571 (finish_file): Likewise.
4572
4573 * decl2.c (import_export_class): Undo 12/14 change.
4574
4575 * error.c (dump_decl): operator new, not operatornew.
4576
4577 * class.c (field_decl_cmp): A nontype is "greater" than a type.
4578 * search.c (lookup_field_1): Look for the last field with the
4579 desired name.
4580
4581 2000-01-05 Nathan Sidwell <nathan@acm.org>
4582
4583 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
4584 FUNCTION_DECL.
4585
4586 2000-01-05 Nathan Sidwell <nathan@acm.org>
4587
4588 * typeck.c (build_static_cast): Don't strip target qualifiers
4589 when casting from a class.
4590
4591 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4592
4593 * class.c (warn_hidden): Initialize variable `fndecl'.
4594
4595 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
4596
4597 * decl.c (flag_isoc9x): New variable to be able to use code in
4598 c-common.c. For now always zero.
4599
4600 2000-01-03 Mark Mitchell <mark@codesourcery.com>
4601
4602 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
4603 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
4604 or unshare_base_binfos for virtual bases here.
4605 * search.c (dfs_get_vbase_types): Do it here.
4606 (get_vbase_types): Adjust.
4607
4608 2000-01-02 Mark Mitchell <mark@codesourcery.com>
4609
4610 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
4611 (BINFO_PRIMARY_MARKED_P): Use flag 5.
4612 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
4613 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
4614 (unmark_primary_bases): Remove declaration.
4615 (unmarkedp): Declare.
4616 (dfs_vbase_unmark): Likewise.
4617 * class.c (determine_primary_base): Return immediately if there
4618 are no base classes. Call mark_primary_bases here.
4619 (modify_all_direct_vtables): Remove.
4620 (modify_all_indirect_vtables): Remove.
4621 (dfs_modify_vtables_queue_p): New function.
4622 (dfs_modify_vtables): New function.
4623 (modify_all_vtables): Use them.
4624 (build_base_fields): Build FIELD_DECLs for primary virtual base
4625 classes.
4626 (create_vtable_ptr): Don't call determine_primary_base here.
4627 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
4628 (dfs_set_offset_for_vbases): ... this.
4629 (layout_virtual_bases): Use it.
4630 (layout_class_type): Call determine_primary_base here.
4631 * search.c (unmarkedp): Make it global.
4632 (shared_marked_p): Simplify.
4633 (shared_unmarked_p): Likewise.
4634 (dfs_primary_bases_queue_p): Remove.
4635 (dfs_unmark_primary_bases): Likewise.
4636 (unmark_primary_bases): Likewise.
4637 (mark_primary_bases): Simplify.
4638 (get_pure_virtuals): Don't call mark_primary_bases here.
4639 (dfs_vbase_unmark): New function.
4640 (get_vbase_types): Simplify.
4641
4642 * class.c (struct base_info): Remove.
4643 (determine_primary_base): Take has_virtual_p rather than a
4644 base_info as input. Don't calculate max_has_virtual.
4645 (finish_struct_bits): Remove max_has_virtual argument.
4646 (create_vtable_ptr): Remove max_has_virtual_p argument.
4647 (layout_virtual_bases): Remove max argument.
4648 (layout_basetypes): Likewise.
4649 (layout_class_type): Remove max_has_virtual_p argument.
4650 (finish_struct_1): Remove max_has_virtual.
4651
4652 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
4653 (layout_basetypes): Remove.
4654 * class.c (propagate_binfo_offsets): Moved here from tree.c.
4655 Update to handle primary virtual bases.
4656 (remove_base_fields): New function, split out from
4657 layout_basetypes.
4658 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
4659 (layout_virtual_bases): New function, split out from
4660 layout_basetypes. Update to handle primary virtual bases.
4661 (layout_basetypes): Moved here from tree.c. Use
4662 remove_base_fields and layout_virtual_bases.
4663 * search.c (dfs_mark_primary_bases_queue_p): New function.
4664 (mark_primary_bases): Use it.
4665 * tree.c (CEIL): Remove.
4666 (propagate_binfo_offsets): Remove.
4667 (layout_basetypes): Remove.
4668
4669 2000-01-01 Mark Mitchell <mark@codesourcery.com>
4670
4671 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
4672 (BINFO_PRIMARY_MARKED_P): New macro.
4673 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
4674 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
4675 (mark_primary_bases): New function.
4676 (unmark_primary_bases): Likewise.
4677 * search.c (get_abstract_virtuals_1): Remove.
4678 (dfs_mark_primary_bases): New function.
4679 (mark_primary_bases): Likewise.
4680 (dfs_unmark_primary_bases): Likewise.
4681 (unmark_primary_bases): Likewise.
4682 (dfs_get_pure_virtuals): Likewise.
4683
4684 2000-01-01 Mark Mitchell <mark@codesourcery.com>
4685
4686 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
4687 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
4688 (modify_one_vtable): Adjust.
4689 (fixup_vtable_deltas1): Likewise.
4690 (override_one_vtable): Likewise.
4691 * search.c (get_abstract_virtuals_1): Likewise.
4692 (get_pure_virtuals): Likewise.
4693 (expand_upcast_fixups): Likewise.
4694 * tree.c (debug_binfo): Likewise.
4695
4696 * class.c (build_vtable): Don't return a value. Don't rebuild
4697 vtables for bases that have already been handled.
4698 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
4699 already been handled.
4700 (modify_one_vtable): Adjust accordingly.
4701 (fixup_vtable_deltas1): Likewise.
4702 (finish_struct_1): Likewise.
4703
4704 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4705
4706 * call.c (build_new_method_call): Also check destructors.
4707
4708 1999-12-31 Mark Mitchell <mark@codesourcery.com>
4709
4710 * cp-tree.h (VF_NORMAL_VALUE): Remove.
4711 * class.c (struct base_info): Remove vfield, vfields, and rtti.
4712 (set_primary_base): New function, split out from ...
4713 (finish_base_struct): ... here. Rename to ...
4714 (determine_primary_base): ... this. Simplify.
4715 (create_vtable_ptr): Tweak accordingly.
4716 (finish_struct_1): Simplify.
4717
4718 * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
4719 (CLASSTYPE_N_BASECLASSES): Likewise.
4720 (BINFO_FOR_VBASE): New macro.
4721 (get_vbase_types): Change prototype.
4722 * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
4723 (prepare_fresh_vtable): Likewise.
4724 (finish_vtbls): Likewise.
4725 (get_class_offset_1): Likewise.
4726 (modify_all_indirect_vtables): Likewise.
4727 (build_vbase_pointer_fields): Likewise.
4728 * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
4729 * init.c (sort_base_init): Use BINFO_FOR_VBASE.
4730 (expand_member_init): Likewise.
4731 * search.c (get_base_distance): Likewise.
4732 (lookup_field_queue_p): Likewise.
4733 (virtual_context): Likewise.
4734 (get_vbase_types): Don't return a value. Set
4735 CLASSTYPE_VBASECLASSES here.
4736 * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
4737
4738 1999-12-30 Mark Mitchell <mark@codesourcery.com>
4739
4740 * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
4741
4742 1999-12-29 Mark Mitchell <mark@codesourcery.com>
4743
4744 * class.c (create_vtable_ptr): Put the vtable at the beginning of
4745 the class, not the end, in the new ABI.
4746 * tree.c (propagate_binfo_offsets): Do the right thing for the new
4747 ABI.
4748
4749 1999-12-29 Mark Mitchell <mark@codesourcery.com>
4750
4751 * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy.
4752 (CLASSTYPE_NEARLY_EMPTY_P): New macro.
4753 * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
4754 (check_field_decls): Likewise.
4755 (check_bases_and_members): Likewise.
4756
4757 1999-12-28 Mark Mitchell <mark@codesourcery.com>
4758
4759 * cp-tree.h (do_inline_function_hair): Remove.
4760 * class.c (layout_class_type): New function, split out from
4761 finish_struct_1.
4762 (fixup_pending_inline): Likewise.
4763 (fixup_inline_methods): New function.
4764 * method.c (fixup_pending_inline): Remove.
4765 (do_inline_function_hair): Likewise.
4766
4767 * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
4768 new ABI.
4769
4770 * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
4771 (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
4772 (CLASSTYPE_PURE_VIRTUALS): ... this.
4773 (lang_decl_flags): Replace abstract_virtual with pure_virtual.
4774 (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
4775 (DECL_PURE_VIRTUAL_P): ... this.
4776 (get_abstract_virtuals): Rename to ...
4777 (get_pure_virtuals): ... this.
4778 * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
4779 DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with
4780 CLASSTYPE_PURE_VIRTUALS.
4781 * class.c (build_vtable_entry): Likewise.
4782 (finish_struct_bits): Likewise. Call get_pure_virtuals, not
4783 get_abstract_virtuals.
4784 (build_vtbl_initializer): Likewise.
4785 (override_one_vtable): Likewise.
4786 (check_methods): Likewise.
4787 * decl.c (duplicate_decls): Likewise.
4788 (redeclaration_error_message): Likewise.
4789 (lang_mark_tree): Likewise.
4790 * decl2.c (grok_function_init): Likewise.
4791 (import_export_vtable): Likewise.
4792 (import_expor_class): Likewise.
4793 * typeck2.c (abstract_virtuals_error): Likewise.
4794 * xref.c (GNU_xref_member): Likewise.
4795 * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
4796
4797 1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
4798
4799 * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
4800 throughout.
4801
4802 1999-12-26 Mark Mitchell <mark@codesourcery.com>
4803
4804 * decl.c (store_return_init): Use mode of old RTL generated for
4805 DECL_RESULT, not the mode of DECL_RESULT itself.
4806 * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
4807 for functions that used named return values.
4808
4809 1999-12-24 Mark Mitchell <mark@codesourcery.com>
4810
4811 * semantics.c (expand_body): Use
4812 note_deferral_of_defined_inline_function.
4813
4814 1999-12-22 Mark Mitchell <mark@codesourcery.com>
4815
4816 * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
4817
4818 1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
4819
4820 * error.c (dump_decl): Support named return values.
4821
4822 1999-12-20 Mark Mitchell <mark@codesourcery.com>
4823
4824 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
4825 (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
4826 (CLASSTYPE_PRIMARY_BINFO): Likewise.
4827 * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
4828 TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
4829 (check_bases_and_members): Set them here instead.
4830 (create_vtable_ptr): New function, split out from ...
4831 (finish_struct_1): ... here. Use it. Tidy. Use
4832 CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
4833 * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
4834 the first field in the class.
4835 * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle
4836 seeing TYPE_VFIELD as the first field in the class.
4837
4838 * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
4839 (TYPE_POLYMORPHIC_P): ... this.
4840 (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
4841 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
4842 (TREE_CALLS_NEW): Remove.
4843 (TREE_MANGLED): Likewise.
4844 * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
4845 and TYPE_POLYMORPHIC_P.
4846 * class.c (check_bases): Likewise.
4847 (finish_base_struct): Likewise.
4848 (finish_struct_bits): Likewise.
4849 (check_for_override): Likewise.
4850 (finish_struct_1): Likewise.
4851 (get_vfield_name): Likewise.
4852 * decl.c (xref_basetypes): Likewise.
4853 * decl2.c (import_export_class): Likewise.
4854 (import_export_decl): Likewise.
4855 * error.c (dump_function_decl): Likewise.
4856 * pt.c (instantiate_class_template): Likewise.
4857 * repo.c (repo_inline_used): Likewise.
4858 * rtti.c (build_headof): Likewise.
4859 (get_tinfo_fn_dynamic): Likewise.
4860 (build_x_typeid): Likewise.
4861 (get_tinfo_var): Likewise.
4862 (build_dynamic_cast_1): Likewise.
4863 (synthesize_tinfo_fn): Likewise.
4864 * search.c (lookup_field_1): Likewise.
4865 (dfs_debug_mark): Likewise.
4866 (maybe_suppress_debug_info): Likewise.
4867 * typeck.c (build_component_ref): Likewise.
4868 (build_component_addr): Likewise.
4869 * typeck2.c (process_init_constructor): Likewise.
4870
4871 1999-12-20 Nathan Sidwell <nathan@acm.org>
4872
4873 * typeck.c (strip_all_pointer_quals): New static function.
4874 (build_static_cast): Use it. Don't use at_least_as_qualified_p.
4875
4876 1999-12-16 Mark Mitchell <mark@codesourcery.com>
4877
4878 * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
4879 (dso_handle_node): New macro.
4880 (flag_use_cxa_atexit): New variable.
4881 (declare_global_var): New function.
4882 (start_anon_func): Remove declaration.
4883 (end_anon_func): Likewise.
4884 * decl.c (get_atexit_node): New function, split out from
4885 destroy_local_static. Handle flag_use_cxa_atexit.
4886 (get_dso_handle_node): Likewise.
4887 (start_cleanup_fn): Renamed from start_anon_func. Moved here from
4888 except.c. Handle flag_use_cxa_atexit.
4889 (end_cleanup_fn): Renamed from end_anon_func. Moved here from
4890 except.c.
4891 (declare_global_var): New variable.
4892 (destroy_local_static): Handle flag_use_cxa_atexit.
4893 * decl2.c (flag_use_cxa_atexit): New variable.
4894 (lang_f_options): Likewise.
4895 * except.c (start_anon_func): Remove.
4896 (end_anon_func): Liekwise.
4897 * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
4898 * rtti.c (get_tinfo_var): Use declare_global_var.
4899
4900 1999-12-16 Mark Mitchell <mark@codesourcery.com>
4901
4902 * class.c (check_field_decls): Don't return a value.
4903 (avoid_overlap): Moved here from tree.c.
4904 (build_base_fields): Likewise.
4905 (check_bases): New function, split out from finish_base_struct.
4906 (check_bases_and_members): New function, split out from
4907 finish_struct_1.
4908 (struct base_info): Remove cant_have_default_ctor,
4909 cant_have_const_ctor, cant_have_asn_ref.
4910 (finish_base_struct): Split semantic analysis into check_bases.
4911 (finish_struct_methods): Fix bogus assertion.
4912 (check_field_decls): Call finish_struct_anon here.
4913 (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
4914 (finish_struct_1): Use check_bases_and_members. Reorganize.
4915 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
4916 (build_base_fields): Don't declare.
4917 * tree.c (avoid_overlap): Remove.
4918 (build_base_fields): Likewise.
4919
4920 * optimize.c (struct inline_data): Remove scope_stmt.
4921 (remap_block): Don't use insert_block_after_note. Don't update
4922 scope_stmt.
4923 (expand_call_inline): Don't update scope_stmt.
4924 (optimize_function): Don't initialize scope_stmt.
4925 * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
4926 NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
4927
4928 1999-12-15 Mark Mitchell <mark@codesourcery.com>
4929
4930 * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
4931 out of the class, rather than taking them as parameters.
4932 (build_vbase_pointer_fields): Move here from tree.c.
4933 (build_vtbl_or_vbase_field): New function.
4934 (check_methods): Likewise.
4935 (remove_zero_width_bitfields): Likewise.
4936 (add_virtual_function): Use tree_cons instead of temp_tree_cons.
4937 (delete_duplicate_fields_1): Tidy. Don't delete duplicate
4938 USING_DECLs here.
4939 (finish_struct_methods): Handle the case where there are no
4940 methods here.
4941 (get_basefndecls): Use tree_cons instead of temp_tree_cons.
4942 (check_field_decls): Call delete_duplicate_fields here.
4943 (finish_struct_1): Tidy. Use check_methods and
4944 remove_zero_width_bitfields.
4945 * cp-tree.h (build_vbase_pointer_fields): Remove.
4946 * decl.c (grokdeclarator): Use tree_cons instead of
4947 temp_tree_cons.
4948 * decl2.c (qualified_lookup_using_namespace): Use tree_cons
4949 instead of temp_tree_cons.
4950 * lex.c (cons_up_default_function): Remove dead code.
4951 * method.c (fixup_pending_inline): New function, split out from ...
4952 (do_inline_function_hair): ... here.
4953 * tree.c (build_vbase_pointer_fields): Remove.
4954
4955 1999-12-15 Jason Merrill <jason@casey.cygnus.com>
4956
4957 * tree.c (walk_tree): Walk operand subtrees in forward order.
4958 * optimize.c (expand_call_inline): Likewise.
4959 (optimize_function): Initialize id->scope_stmt to something useful.
4960 (remap_block): Assume id->scope_stmt has a useful value.
4961
4962 1999-12-15 Nathan Sidwell <nathan@acm.org>
4963
4964 * typeck.c (build_c_cast): Expand warning message. Move pointer
4965 alignment warning to after the cast. Don't warn about pointer
4966 alignment when given a pointer to incomplete.
4967
4968 1999-12-15 Richard Henderson <rth@cygnus.com>
4969
4970 * cp-tree.h (make_aggr_type): Declare.
4971 * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
4972 (make_aggr_type): New.
4973
4974 * decl.c (build_typename_type, init_decl_processing): Use it.
4975 (build_ptrmemfunc_type, xref_tag): Likewise.
4976 * except.c (call_eh_info): Likewise.
4977 * init.c (init_init_processing): Likewise.
4978 * pt.c (process_template_parm, lookup_template_class): Likewise.
4979 * rtti.c (expand_class_desc): Likewise.
4980 * semantics.c (begin_class_definition, finish_typeof): Likewise.
4981 * tree.c (copy_template_template_parm): Likewise.
4982
4983 1999-12-15 Jason Merrill <jason@yorick.cygnus.com>
4984
4985 * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
4986 sizeof (struct tree_common).
4987
4988 1999-12-14 Jason Merrill <jason@casey.cygnus.com>
4989
4990 * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
4991 outermost block to point to the inlined function decl.
4992
4993 * error.c (dump_decl): operator==, not operator ==.
4994 (op_to_string): Likewise.
4995
4996 * decl.c (compute_array_index_type): Handle null name.
4997
4998 * decl2.c (ambiguous_decl): Fix to match comment.
4999 (lookup_using_namespace): Adjust.
5000
5001 * decl2.c (import_export_class): Don't ignore dllimport.
5002
5003 1999-12-14 Mark Mitchell <mark@codesourcery.com>
5004
5005 * class.c (check_field_decls): Split out from ...
5006 (finish_struct_1): ... here. Use it. Tidy.
5007
5008 * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
5009 * optimize.c (copy_body_r): Pass it.
5010 * tree.c (remap_save_expr): Clear walk_subtrees for an
5011 already-handled SAVE_EXPR.
5012 (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
5013
5014 * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
5015 * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
5016
5017 * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
5018
5019 1999-12-14 Mumit Khan <khan@xraylith.wisc.edu>
5020
5021 * class.c (finish_base_struct): Allow multiple COM base classes
5022 as well as non-COM bases as long as it's not the leftmost.
5023
5024 1999-12-13 Mumit Khan <khan@xraylith.wisc.edu>
5025
5026 * lex.c (saving_parse_to_obstack): New global.
5027 (reinit_parse_for_block): Use.
5028 (reinit_parse_for_expr): Use.
5029 (check_newline): Use.
5030
5031 1999-12-13 Mark Mitchell <mark@codesourcery.com>
5032
5033 * optimize.c (initialize_inlined_parameters): Take FN to which the
5034 parameters belong as an argument.
5035 (expand_call_inline): Expand calls into the parameter
5036 initializations before pushing the function onto the list of
5037 functions we are presently expanding.
5038
5039 1999-12-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5040
5041 * class.c (get_vtable_name): Use a literal format string and
5042 VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
5043 (prepare_fresh_vtable): Likewise.
5044
5045 * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
5046 VTABLE_NAME_FORMAT.
5047
5048 * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
5049
5050 * init.c (build_vec_init): Initialize variable `try_body'.
5051
5052 * lex.c (yyerror): Don't call a variadic function with a
5053 non-literal format string.
5054
5055 * optimize.c (optimize_function): Call memset, not bzero.
5056
5057 * pt.c (for_each_template_parm_r): Add static prototype.
5058
5059 1999-12-09 Andreas Jaeger <aj@suse.de>
5060
5061 * except.c (expand_throw): Add static attribute to match
5062 prototype.
5063
5064 * Makefile.in (semantics.o): Add dependency on output.h.
5065 * semantics.c: Include output.h for declaration of
5066 make_function_rtl.
5067
5068 1999-12-09 Mark Mitchell <mark@codesourcery.com>
5069
5070 * decl.c (init_decl_processing): Reenable inlining on trees.
5071 (finish_function): Likewise.
5072 * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
5073 * semantics.c (simplify_aggr_init_exprs): New function.
5074 (expand_body): Use it.
5075 * tree.c (walk_tree): Special-case TARGET_EXPRs since they
5076 sometimes present the same sub-tree twice.
5077
5078 * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
5079 `csl'.
5080
5081 * semantics.c (finish_switch_cond): Do conversions here, not ...
5082 * typeck.c (c_expand_start_case): Here.
5083
5084 * semantics.c (do_poplevel): Remove unused variable.
5085
5086 1999-12-06 Mark Mitchell <mark@codesourcery.com>
5087
5088 * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
5089 unless we're declaring the variable in question.
5090
5091 1999-12-06 Mark Mitchell <mark@codesourcery.com>
5092
5093 * decl.c (init_decl_processing): #if 0 last patch.
5094 (finish_function): Likewise.
5095
5096 1999-12-05 Mark Mitchell <mark@codesourcery.com>
5097
5098 * decl.c (init_decl_processing): Set flag_inline_trees if
5099 !flag_no_inline.
5100
5101 * cp-tree.h (calls_setjmp_p): Declare.
5102 * decl.c (finish_function): Mark functions that call setjmp as
5103 uninlinable.
5104 * optimize.c (calls_setjmp_r): New function.
5105 (calls_setjmp_p): Likewise.
5106
5107 1999-12-04 Mark Mitchell <mark@codesourcery.com>
5108
5109 * optimize.c (expand_call_inline): Wrap the expanded call in an
5110 EXPR_WITH_FILE_LOCATION node to get correct line numbers for
5111 inlined functions.
5112
5113 * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add
5114 in_target_cleanup_p.
5115 (remap_decl): New function.
5116 (remap_block): Likewise.
5117 (copy_scope_stmt): Likewise.
5118 (copy_body_r): Use remap_decl and copy_scope_stmt.
5119 (copy_body): Use VARRAY_TOP_TREE.
5120 (initialize_inlined_parameters): Likewise.
5121 (declare_return_variable): Likewise.
5122 (inlinable_function_p): Check flag_inline_trees.
5123 (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
5124 specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the
5125 parameters of the inlined function.
5126 (optimize_function): Prevent recursion into partially complete
5127 functions.
5128
5129 * cp-tree.def (SCOPE_STMT): Take one operand.
5130 * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
5131 (SCOPE_NULLIFIED_P): Redefine.
5132 (SCOPE_NO_CLEANUPS_P): New macro.
5133 (add_scope_stmt): Change prototype.
5134 * decl.c (poplevel): Tidy. Warn about unused variables here.
5135 Record SCOPE_STMT_BLOCKs.
5136 (finish_function): Keep DECL_INITIAL for functions that might be
5137 inlined.
5138 * ir.texi: Document SCOPE_NO_CLEANUPS_P.
5139 * semantics.c: Include rtl.h.
5140 (add_scope_stmt): Return the new scope statement and, for an
5141 end-of-scope statement, its matching begin statement. Don't set
5142 SCOPE_NULLIFIED_P.
5143 (do_pushlevel): Simplify, now that we are always
5144 function-at-a-time.
5145 (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs.
5146 (expand_stmt): Don't call expand_start_bindings or
5147 expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
5148 * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
5149 SCOPE_NULLIFIED_P.
5150 * Makefile.in (semantics.o): Depend on RTL_H.
5151
5152 * decl2.c (pending_statics_used): Make it a macro.
5153 (saved_inlines_used): Likewise.
5154 (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
5155 (mark_inline_for_output): Likewise.
5156 (ssdf_decls_used): Remove.
5157 (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
5158 (generate_ctor_or_dtor_function): Adjust accordingly.
5159
5160 1999-11-24 Geoffrey Keating <geoffk@cygnus.com>
5161 Greg McGary <gkm@gnu.org>
5162
5163 * decl.c (duplicate_decls): Merge
5164 DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
5165 DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
5166
5167 1999-12-02 Mike Stump <mrs@wrs.com>
5168
5169 * init.c (perform_member_init): Handle parse errors better.
5170
5171 1999-12-01 Mark Mitchell <mark@codesourcery.com>
5172
5173 * cp-tree.h (min_tree_cons): Remove.
5174 (scratch_ovl_cons): Likewise.
5175 * decl.c (saveable_obstack): Don't declare.
5176 (duplicate_decls): Tweak error-message.
5177 (initialize_local_var): Explicitly mark the definition as static.
5178 (finish_function): Call permanent_allocation, just so
5179 that the middle-end sees the obstacks it expects.
5180 (mark_cp_function_context): Likewise.
5181 * init.c (build_new): Don't use min_tree_cons.
5182 * lex.c (permanent_obstack): Don't declare.
5183 (current_obstack, saveable_obstack): Likewise.
5184 * spew.c (current_obstack, saveable_obstack): Likewise.
5185 * tree.c (current_obstack, saveable_obstack): Likewise.
5186 (scratch_ovl_cons): Remove.
5187 (build_min_nt): Don't mess with obstacks.
5188 (build_min): Likewise.
5189 (min_tree_cons): Remove
5190 * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
5191 (build_x_function_call): Likewise.
5192 (build_c_cast): Don't use min_tree_cons.
5193
5194 1999-11-29 Mark Mitchell <mark@codesourcery.com>
5195
5196 * pt.c (tsubst_decl): Robustify.
5197
5198 1999-11-27 Mark Mitchell <mark@codesourcery.com>
5199
5200 * decl2.c (finish_file): Call expand_body for inline functions
5201 that will be written out but that do not yet have RTL.
5202 * semantics.c (expand_body): Do not generate RTL For inline
5203 functions that do not yet need to be written out.
5204
5205 1999-11-25 Mark Mitchell <mark@codesourcery.com>
5206
5207 * Make-lang.in (CXX_SRCS): Add optimize.c.
5208 * Makefile.in (CXX_OBJS): Add optimize.o.
5209 (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
5210 (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
5211 (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
5212 (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
5213 (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
5214 (dump.o): Likewise.
5215 (optimize.o): New target.
5216 * class.c: Don't include splay-tree.h.
5217 * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
5218 * cp-tree.h: Include splay-tree.h.
5219 (DECL_UNINLINABLE): New macro.
5220 (CTOR_BEGIN_P, CTOR_END_P): New macros.
5221 (flag_inline_trees): New variable.
5222 (local_variable_p): New function.
5223 (nonstatic_local_decl_p): Likewise.
5224 (optimize_function): Likewise.
5225 (cplus_unsave_expr_now): Remove.
5226 (copy_tree_r): Declare.
5227 (remap_save_expr): Likewise.
5228 * decl.c (local_variable_p): Don't
5229 make it static.
5230 (local_variable_p_walkfn): New function.
5231 (make_rtl_for_local_static): Remove code to try to avoid writing
5232 out static constants.
5233 (emit_local_var): Fix indentation.
5234 (nonstatic_local_decl_p): New function.
5235 (check_default_argument): Use local_variable_p_walkfn, not
5236 local_variable_p, when walking the tree.
5237 (start_function): Set the DECL_CONTEXT for automatically generated
5238 labels.
5239 (finish_constructor_body): Use CTOR_STMT to mark the end of a
5240 constructor.
5241 * decl2.c: Don't include splay-tree.h.
5242 (flag_inline_trees): Define.
5243 * dump.c: Don't include
5244 splay-tree.h.
5245 * except.c (expand_end_catch_block): Fix comment formatting.
5246 (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
5247 (expand_throw): Tidy comment.
5248 * init.c (build_vec_delete_1): Use create_temporary_var.
5249 * lex.c (cplus_tree_code_type): Make it static.
5250 (cplus_tree_code_length): Likewise.
5251 (cplus_tree_code_name): Likewise.
5252 * optimize.c: New file.
5253 * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
5254 with computed gotos.
5255 (setup_vtbl_ptr): Mark the beginnings of constructors with
5256 CTOR_STMT.
5257 (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
5258 (expand_body): Call optimize_function. Save bodies if we're doing
5259 inlining on trees.
5260 * tree.c: Don't include splay-tree.h. Include insn-config.h and
5261 integrate.h.
5262 (copy_tree_r): Make it public.
5263 (statement_code_p): New function.
5264 (mark_local_for_remap_r): Likewise.
5265 (cp_usave_r): Likewise.
5266 (cp_unsave): Likewise.
5267 (build_cplus_new): Set DECL_CONTEXT for temporary variables.
5268 (walk_tree): Walk into `s' class nodes. Walk statement chains.
5269 (copy_tree_r): Handle 's' class nodes. Restore chains for
5270 statements. Nullify scopes. Don't copy types.
5271 (init_tree): Set lang_unsave to cp_unsave.
5272 (remap_save_expr): Define.
5273 * ir.texi: Document CTOR_STMT.
5274
5275 1999-11-24 Jason Merrill <jason@casey.cygnus.com>
5276
5277 * search.c (note_debug_info_needed): Do perform this optimization
5278 for dwarf2.
5279 (maybe_suppress_debug_info): Likewise. Start by clearing
5280 TYPE_DECL_SUPPRESS_DEBUG.
5281
5282 1999-11-24 Mark Mitchell <mark@codesourcery.com>
5283
5284 * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
5285
5286 * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
5287
5288 1999-11-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5289
5290 * decl.c (pushdecl, grokdeclarator): Don't call a variadic
5291 function with a non-literal format string.
5292
5293 * lex.c (do_identifier): Likewise.
5294
5295 * typeck.c (build_unary_op): Likewise.
5296
5297 1999-11-23 Mark Mitchell <mark@codesourcery.com>
5298
5299 * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
5300
5301 1999-11-22 Mark Mitchell <mark@codesourcery.com>
5302
5303 * cp-tree.def (CTOR_COMPLETE): New tree node.
5304 * decl.c (finish_constructor_body): Add it, to mark the end of the
5305 constructor.
5306 (finish_function): Don't call end_protect_partials here.
5307 * ir.texi (CTOR_COMPLETE): Document it.
5308 * semantics.c (expand_stmt): Handle it.
5309
5310 * cp-tree.def (FUNCTION_NAME): New tree node.
5311 * cp-tree.h (current_function_name_declared): Tweak documentation.
5312 (lang_decl_flags): Add pretty_function_p, adjust dummy.
5313 (DECL_PRETTY_FUNCTION_P): New macro.
5314 * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
5315 etc., in a template function. Use at_function_scope_p instead of
5316 expanding it inline.
5317 * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
5318 specially.
5319 (tsubst): Handle FUNCTION_NAME.
5320 (tsubst_copy): Likewise.
5321 (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
5322 etc. in instantiation.
5323 * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
5324 even in template functions.
5325 (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
5326 conditional scope at the top of a destructor.
5327
5328 * error.c (dump_function_decl): Use `[ with ... ]' syntax for
5329 specializations too.
5330
5331 1999-11-22 Nathan Sidwell <nathan@acm.org>
5332
5333 * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
5334 when actually negative.
5335
5336 * typeck.c (convert_for_assignment): Expand comment about
5337 strange NULL check, moved from ...
5338 (convert_for_initialization): ... here. Remove unneeded
5339 code.
5340
5341 1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
5342
5343 * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
5344 * init.c (build_vec_delete, build_vec_delete_1): Likewise.
5345 Always destruct virtual bases of array components, but never
5346 delete them.
5347 (build_vec_init): Adjust invocations.
5348 (build_delete): Likewise.
5349 * decl2.c (delete_sanity): Likewise.
5350
5351 1999-11-19 Nathan Sidwell <nathan@acm.org>
5352
5353 * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
5354 * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
5355 * decl2.c (grok_method_quals): Accept `restrict' as applying to
5356 the object pointer. Return such qualifiers.
5357 (grokclassfn): Apply this pointer qualifiers. Cleanup unused
5358 variables.
5359
5360 1999-11-18 Mark Mitchell <mark@codesourcery.com>
5361
5362 * except.c (expand_end_catch_block): Fix typo.
5363 (expand_exception_blocks): Simplify. Don't call
5364 expand_leftover_cleanups.
5365
5366 1999-11-15 Jason Merrill <jason@casey.cygnus.com>
5367
5368 * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
5369 * pt.c (tsubst, case INTEGER_TYPE): Call it.
5370 Check uses_template_parms.
5371
5372 * class.c (finish_struct): If we're a local class in a template
5373 function, add a TAG_DEFN.
5374 * pt.c (lookup_template_class): If this is a local class in a
5375 template function, call pushtag.
5376 (tsubst_expr, case TAG_DEFN): Handle classes, too.
5377
5378 Emit debug info with the vtable.
5379 * search.c (maybe_suppress_debug_info): New function...
5380 * class.c (finish_struct_1): ...split out from here.
5381 * cp-tree.h: Declare it.
5382 * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
5383 if we're writing out the vtable.
5384 * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
5385 note_debug_info_needed): #if 0 out.
5386
5387 1999-11-14 Mark Mitchell <mark@codesourcery.com>
5388
5389 * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
5390 * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
5391 TREE_PERMANENT.
5392 * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
5393 * decl2.c (lookup_arg_dependent): Use it.
5394
5395 * cp-tree.h (cp_finish_decl): Change prototype.
5396 (finish_static_data_member_decl): Likewise.
5397 (push_permanent_obstack): Remove declaration.
5398 (push_expression_obstack): Likewise.
5399 (push_scratch_obstack): Likewise.
5400 (DECL_TEMPLATE_PARM_P): Robustify.
5401 (SET_DECL_TEMPLATE_PARM_P): New macro.
5402 * class.c (add_method): Don't manipulate obstacks.
5403 (finish_vtbls): Likewise.
5404 * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
5405 * decl.c (binding_for_name): Don't manipulate obstacks.
5406 (maybe_push_to_top_level): Likewise.
5407 (pop_from_top_level): Likewise.
5408 (duplicate_decls): Likewise.
5409 (pushdecl): Likewise.
5410 (implicitly_declare): Likewise.
5411 (build_typename_type): Likewise.
5412 (start_decl): Likewise.
5413 (cp_finish_decl): Likewise.
5414 (finish_decl): Likewise.
5415 (destroy_local_static): Likewise.
5416 (expand_static_init): Likewise.
5417 (complete_array_type): Likewise.
5418 (grokvardecl): Likewise.
5419 (build_ptrmemfnc_type): Likewise.
5420 (grokdeclarator): Likewise.
5421 (xref_tag): Likewise.
5422 (xref_basetypes): Likewise.
5423 (start_enum): Likewise.
5424 (finish_enum): Likewise.
5425 (start_function): Likewise.
5426 (finish_function): Likewise.
5427 (start_method): Adjust call to cp_finish_decl.
5428 * decl2.c (finish_static_data_member_decl): Don't manipulate
5429 obstacks.
5430 (grokfield): Likewise.
5431 (grokbitfield): Likewise.
5432 (get_temp_name): Likewise.
5433 (get_sentry): Likewise.
5434 (fnish_file): Likewise.
5435 (lookup_arg_dependent): Likewise.
5436 * except.c (call_eh_info): Likewise.
5437 (push_eh_info): Likewise.
5438 (do_pop_exception): Likewise.
5439 (initialize_handler_parm): Likewise.
5440 (expand_end_eh_spec): Likewise.
5441 (alloc_eh_object): Likewise.
5442 (expand_throw): Likewise.
5443 * expr.c (extract_scalar_init): Likewise.
5444 * init.c (build_java_class_ref): Likewise.
5445 * lex.c (get_time_identifier): Likewise.
5446 (snarf_defarg): Likewise.
5447 (add_defarg_fn): Likewise.
5448 (is_global): Simplify.
5449 (do_identifier): Don't check TREE_PERMANENT.
5450 * method.c (emit_thunk): Don't manipulate obstacks.
5451 * parse.y (condition): Adjust call to cp_finish_decl.
5452 (primary): Likewise.
5453 (initdcl): Likewise.
5454 (initdcl0_innards): Likewise.
5455 (nomods_initdcl0): Likewise.
5456 * pt.c (push_inline_template_parms_recursive): Use
5457 SET_DECL_TEMPLATE_PARM_P.
5458 (process_template_parm): Likewise.
5459 (lookup_template_class): Don't manipulate obstacks.
5460 (instantiate_class_template): Adjust call to
5461 finish_static_data_member_decl.
5462 (tsubst_decl): Don't manipulate obstacks.
5463 (tsubst_expr): Likewise.
5464 (instantiate_template): Likewise.
5465 (instantiate_decl): Adjust calls to cp_finish_decl.
5466 * rtti.c (call_void_fn): Don't manipulate obstacks.
5467 (get_tinfo_var): Likewise.
5468 (get_tinfo_fn_unused): Likewise.
5469 (build_dynamic_cast_1): Likewise.
5470 (expand_si_desc): Likewise.
5471 (expand_class_desc): Likewise.
5472 (expand_ptr_desc): Likewise.
5473 (expand_attr_desc): Likewise.
5474 (expand_generic_desc): Likewise.
5475 (synthesize_tinfo_fn): Likewise.
5476 * search.c (expand_upcast_fixups): Likewise.
5477 * semantics.c (finish_asm_stmt): Likewise.
5478 (finish_named_return_value): Likewise.
5479 (begin_class_definition): Likewise.
5480 (finish_class_definition): Likewise.
5481 (finish_typeof): Likewise.
5482 * tree.c (build_cplus_method_type): Likewise.
5483 (reverse_path): Likewise.
5484 (copy_template_template_parm): Likewise.
5485 (build_expr_ptr_wrapper): Likewise.
5486 (push_expression_obstack): Remove.
5487 (push_permanent_obstack): Likewise.
5488 * typeck.c (mark_addressable): Likewise.
5489
5490 1999-11-13 Mark Mitchell <mark@codesourcery.com>
5491
5492 * call.c (build_conditional_expr): Use build_target_expr_with_type.
5493 (convert_like): Likewise.
5494 (build_over_call): Likewise.
5495 * cp-tree.h (build_target_expr): Remove.
5496 (build_target_expr_with_type): New function.
5497 * cvt.c (build_up_reference): Use get_target_expr.
5498 * decl.c (build_target_expr): Move to ...
5499 * tree.c (build_target_expr): Here. Make it static.
5500 (build_target_expr_with_type): New function. Set DECL_CONTEXT on
5501 the temporary VAR_DECLs.
5502 (get_target_expr): Use it.
5503
5504 1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
5505
5506 * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
5507 * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
5508 * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
5509 * class.c (set_rtti_entry): Use it.
5510
5511 1999-11-12 Mark Mitchell <mark@codesourcery.com>
5512
5513 * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
5514 here.
5515 * semantics.c (finish_expr_stmt): Call it here instead. Move
5516 default_conversion logic to semantic-analysis time.
5517
5518 1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
5519
5520 * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
5521
5522 Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com>
5523
5524 * init.c (init_init_processing): Re-instated Nov 11 patch after
5525 approval.
5526
5527 Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com>
5528
5529 * init.c (init_init_processing): Undo patch from Nov 11, 1999.
5530 Patch had not been approved yet.
5531
5532 1999-11-12 Mark Mitchell <mark@codesourcery.com>
5533
5534 * decl.c (compute_array_index_type): New function, split out from
5535 grokdeclarator.
5536 (create_array_type_for_decl): Likewise.
5537 (grokdeclarator): Use them.
5538
5539 * semantics.c (expand_stmt): Don't suspend_momentary or
5540 resume_momentary.
5541
5542 Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
5543
5544 * init.c (init_init_processing): Header information for
5545 arrays allocated via `new' should have the same alignment used by
5546 malloc.
5547
5548 1999-11-10 Mark Mitchell <mark@codesourcery.com>
5549
5550 * error.c (dump_function_name): Don't crash if given a friend
5551 pseudo-instantiation.
5552
5553 * cp-tree.h (build_enumerator): Change prototype.
5554 * decl.c (enum_next_value): Remove.
5555 (enum_overflow): Likewise.
5556 (init_decl_processing): Don't register enum_next_value as a root.
5557 (start_enum): Clear TYPE_VALUES for a redefined enum.
5558 (finish_enum): Reset the type of enumeration constants.
5559 (build_enumerator): Fix indentation. Don't copy CONST_DECLs when
5560 we don't need to. Maintain the TYPE_VALUES list and look there
5561 for the previously defined enumeration constant. Let enumeration
5562 constants have the type of their values until the enumeration type
5563 is complete.
5564 * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
5565 (structsp): Adjust.
5566 * parse.c: Regenerated.
5567 * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
5568
5569 Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
5570 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5571
5572 * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
5573
5574 1999-11-09 Mark Mitchell <mark@codesourcery.com>
5575
5576 * cp-tree.h (language_function): Remove x_last_dtor_insn and
5577 x_last_parm_cleanup_insn.
5578 * decl.c (last_dtor_insn): Remove.
5579 (last_parm_cleanup_insn): Likewise.
5580 (expand_start_early_try_stmts): Don't set them.
5581 (store_parm_decls): Likewise.
5582 (save_function_data): Or save them.
5583 (mark_lang_function): Or mark them.
5584
5585 1999-11-08 Mark Mitchell <mark@codesourcery.com>
5586
5587 * decl.c (store_parm_decls): Generate cleanup code at
5588 semantic-analysis time. Destroy objects in the correct order.
5589
5590 1999-11-07 Mark Mitchell <mark@codesourcery.com>
5591
5592 * cp-tree.h (begin_new_placement): Remove.
5593 (finish_new_placement): Likewise.
5594 * class.c (finish_struct_1): Don't suspend_momentary or
5595 resume_momentary.
5596 * decl.c (grokdeclarator): Likewise.
5597 (maybe_build_cleanup_1): Likewise.
5598 * except.c (push_eh_cleanup): Likewise.
5599 (build_terminate_handler): Likewise.
5600 * init.c (build_new_1): Likewise.
5601 * parse.y (parse_decl): Change prototype.
5602 (initdecls, notype_initdecls, initdcl): Don't return int.
5603 (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
5604 (.begin_new_placement): Remove.
5605 (.finish_new_placement): Likewise.
5606 (nonmomentary_expr): Likewise.
5607 (suspend_mom): Likewise.
5608 (condition): Don't suspend_momentary, resume_momentary, or keep
5609 track of need to resume.
5610 (unary_expr): Likewise.
5611 (new_placement): Likewise.
5612 (decl): Likewise.
5613 (structsp): Likewise.
5614 (new_type_id): Likewise.
5615 (maybe_parmlist): Likewise.
5616 (direct_after_type_declaration): Likewise.
5617 (direct_new_declarator): Likewise.
5618 (direct_abstract_declaration): Likewise.
5619 * parse.c: Regenerated.
5620 * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
5621 * semantics.c (begin_new_placement): Remove.
5622 (finish_new_placement): Likewise.
5623
5624 1999-11-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5625
5626 * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
5627 (DECL_TEMPLATE_INFO): Use it.
5628 * decl.c (warn_extern_redeclared_static): Do nothing for
5629 TEMPLATE_DECLs.
5630 * decl2.c (mark_used): Explicitly check for function or variable.
5631 * semantics.c (finish_unary_op_expr): Check whether result is also
5632 an INTEGER_CST.
5633
5634 1999-11-05 Mark Mitchell <mark@codesourcery.com>
5635
5636 * Makefile.in (typeck2.o): Depend on output.h.
5637 * typeck2.c: Include output.h.
5638
5639 * decl.c (flag_ansi): Remove declaration.
5640
5641 * pt.c (tinst_level_tick): Make it static.
5642 (last_template_error_tick): Likewise.
5643
5644 * cp-tree.h (mapcar): Remove declaration.
5645 (search_tree): Likewise.
5646 (walk_tree_fn): New typedef.
5647 (walk_tree): New function.
5648 * tree.c (bot_manip): Change prototype. Adjust to be called via
5649 walk_tree.
5650 (bot_replace): Likewise.
5651 (no_linkage_helper): Likewise.
5652 (copy_tree_r): New function.
5653 (search_tree): Rename, and adjust, to become ...
5654 (walk_tree): New function.
5655 (mapcar): Remove.
5656 (target_remap): Remove.
5657 (target_remap_count): Likewise.
5658 (break_out_target_exprs): Use walk_tree.
5659 * decl.c (local_variable_p): Change prototype.
5660 (check_default_argument): Use walk_tree.
5661 * pt.c (for_each_template_parm_r): New function, split out from ...
5662 (for_each_template_parm): Here. Use it, via walk_tree.
5663
5664 1999-11-03 Mark Mitchell <mark@codesourcery.com>
5665
5666 * class.c (check_bitfield_decl): New function, split out from
5667 finish_stuct_1.
5668 (check_field_decl): Likewise. Recursively examine members of
5669 anonymous structs.
5670 (finish_struct_1): Use them.
5671 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
5672
5673 1999-11-02 Mark Mitchell <mark@codesourcery.com>
5674
5675 * decl.c (grokfndecl): Remove dead code.
5676
5677 * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
5678
5679 1999-11-02 Scott Snyder <snyder@fnal.gov>
5680
5681 * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
5682 IMAGPART_EXPR.
5683 * pt.c (tsubst_copy): Likewise.
5684
5685 1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
5686
5687 * decl2.c (maybe_make_one_only): Always make things comdat on
5688 ELF targets, too.
5689
5690 1999-10-31 Mark Mitchell <mark@codesourcery.com>
5691
5692 * decl.c (finish_function): Call free_after_parsing for functions
5693 we are not immediately turning into RTL.
5694
5695 1999-10-31 Brendan Kehoe <brendan@cygnus.com>
5696
5697 * cp-tree.h (flag_dump_translation_unit): Add decl.
5698
5699 Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net>
5700
5701 * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
5702
5703 1999-10-30 Mark Mitchell <mark@codesourcery.com>
5704
5705 * decl.c (pop_cp_function_context): Don't call free on a NULL
5706 pointer.
5707 * semantics.c: Include ggc.h.
5708 (expand_body): Do garbage-collection after processing a template
5709 function. Clear DECL_SAVED_TREE after generating RTL for a
5710 function.
5711 * Makefile.in (semantics.o): Depend on ggc.h.
5712
5713 1999-10-29 Mark Mitchell <mark@codesourcery.com>
5714
5715 * cp-tree.h (make_typename_type): Change prototype.
5716 * decl.c (make_typename_type): Only complain if so requested.
5717 * parse.y (nested_name_specifier): Adjust calls.
5718 (typename_sub0): Likewise.
5719 (typename_sub1): Likewise.
5720 * parse.c: Regenerated.
5721 * pt.c (convert_template_argument): Pass complain to
5722 make_typename_type.
5723 (tsubst): Likewise.
5724
5725 1999-10-28 Mark Mitchell <mark@codesourcery.com>
5726
5727 * semantics.c (finish_handler): End the scope of the handler
5728 before attaching it to the statement-tree.
5729
5730 1999-10-28 Ian Lance Taylor <ian@zembu.com>
5731
5732 * rtti.c (build_dynamic_cast_1): Give a better error message for
5733 an attempt to dynamic_cast from a non-polymorphic type.
5734
5735 1999-10-27 Mark Mitchell <mark@codesourcery.com>
5736
5737 * cp-tree.h (make_temp_vec): Remove.
5738 (make_scratch_vec): Likewise.
5739 * call.c (add_function_candidate): Use make_tree_vec.
5740 (add_conv_candidate): Likewise.
5741 (build_builtin_candidate): Likewise.
5742 (add_template_candidate_real): Likewise.
5743 * class.c (resolve_address_of_overloaded_function): Likewise.
5744 * decl.c (start_function): Don't fool with the momentary obstack.
5745 (finish_function): Likewise.
5746 * init.c (expand_direct_vtbls_init): Likewise.
5747 (begin_init_stmts): Likewise.
5748 (finish_init_stmts): Likewise.
5749 * pt.c (add_to_template_args): Use make_tree_vec.
5750 (check_explicit_specialization): Likewise.
5751 (coerce_template_parms): Likewise.
5752 (lookup_template_class): Don't fool with the momentary obstack.
5753 (instantiate_class_template): Likewise.
5754 (tsubst_template_arg_vector): Use make_tree_vec.
5755 (tsubst_aggr_type): Don't fool with the momentary obstack.
5756 (tsubst_decl): Likewise. Use make_tree_vec.
5757 (try_one_overload): Likewise.
5758 (try_class_unification): Don't fool with the momentary obstack.
5759 (get_bindings_real): Use make_tree_vec.
5760 (set_mangled_name_for_template_decl): Likewise.
5761 * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
5762 * semantics.c (finish_expr_stmt): Likewise.
5763 (finish_do_stmt): Likewise.
5764 (finish_for_expr): Likewise.
5765 (finish_switch_cond): Likewise.
5766 (do_pushlevel): Likewise.
5767 (do_poplevel): Likewise.
5768 * tree.c (make_temp_vec): Remove.
5769
5770 * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
5771 CLEANUP_P for a TRY_BLOCK.
5772 * ir.texi: Document SAVE_EXPR.
5773
5774 Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
5775
5776 * call.c (build_over_call): Check that the built-in function is
5777 of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
5778 * typeck.c (build_function_call_real): Similarly.
5779
5780 1999-10-26 Mark Mitchell <mark@codesourcery.com>
5781
5782 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call
5783 remember_end_note.
5784
5785 1999-10-24 Mark Mitchell <mark@codesourcery.com>
5786
5787 * decl.c (push_overloaded_decl_1): Use pushdecl.
5788
5789 * decl.c (auto_function): Replace #ifdef'd __inline with just
5790 plain inline.
5791 * lex.c (my_get_run_time): Likeise.
5792 (yyprint): Likewise.
5793 (identifier_type): Likewise.
5794 * method.c (start_squangling): Likewise.
5795 (end_squangling): Likewise.
5796 (icat): Likewise.
5797 (old_backref_index): Likewise.
5798 (flush_repeats): Likewise.
5799 (issue_ktype): Likewise.
5800 * parse.y (empty_parms): Likewise.
5801 * parse.c: Regenerated.
5802
5803 1999-10-21 Mark Mitchell <mark@codesourcery.com>
5804
5805 * dump.c (dequeue_and_dump): Replace several uses of
5806 queue_and_dump_index with dump_child.
5807
5808 1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5809
5810 * expr.c: Include tm_p.h.
5811
5812 1999-10-21 Mark Mitchell <mark@codesourcery.com>
5813
5814 * cp-tree.h (SCOPE_PARTIAL_P): New macro.
5815 (pushlevel_temporary): Remove.
5816 (add_scope_stmt): New function.
5817 * decl.c (pushlevel_temporary): Remove.
5818 (poplevel): Use add_scope_stmt.
5819 (start_decl_1): Likewise.
5820 * semantics.c (add_scope_stmt): New function.
5821 (do_pushlevel): Use it.
5822 (do_poplevel): Use it.
5823 (expand_stmt): Check SCOPE_PARTIAL_P.
5824
5825 * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
5826 * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
5827 * expr.c (cplus_expand_expr): Expand it.
5828 * ir.texi: Document EMPTY_CLASS_EXPR.
5829
5830 1999-10-20 Mark Mitchell <mark@codesourcery.com>
5831
5832 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
5833 parameters as having namespace scope.
5834
5835 1999-10-19 Mark Mitchell <mark@codesourcery.com>
5836
5837 * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
5838 (mangling_flags): New type.
5839 (build_overload_int): Change prototype.
5840 (build_overload_value): Likewise.
5841 (numeric_output_need_bar): Improve comment.
5842 (mangle_expression): New function, broken out from ...
5843 (build_overload_int): Here.
5844 (build_overload_value): Adjust for use of mangling flags. Don't
5845 warn about real-valued template parameters here. Do handle
5846 complex expressions involving real-valued template parameters.
5847 (build_template_parm_names): Encase non-type template parameters
5848 in underscores, if necessary.
5849 (process_overload_item): Remove conditional on
5850 PARM_CAN_BE_ARRAY_TYPE.
5851
5852 1999-10-17 Mark Mitchell <mark@codesourcery.com>
5853
5854 * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
5855
5856 * ir.texi: Clean up documentation of RETURN_INIT.
5857
5858 1999-10-15 Greg McGary <gkm@gnu.org>
5859
5860 * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
5861 (lang_init): Set default for flag_bounds_check if still "unspecified".
5862
5863 1999-10-13 Andrew Haley <aph@cygnus.com>
5864
5865 * class.c (finish_struct_1): Force alignment of non-bitfields to
5866 BITS_PER_UNIT.
5867
5868 Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
5869
5870 * typeck2.c (process_init_constructor): Handle empty constructors.
5871
5872 1999-10-13 Jason Merrill <jason@yorick.cygnus.com>
5873
5874 * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
5875
5876 * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
5877 array error.
5878
5879 1999-10-13 Mark Mitchell <mark@codesourcery.com>
5880
5881 * decl.c (make_rtl_for_local_static): Don't create register RTL
5882 for addressable constants.
5883
5884 1999-10-13 Nathan Sidwell <nathan@acm.org>
5885
5886 * cp-tree.h (build_x_va_arg): Prototype new function.
5887 * call.c (build_x_va_arg): Define it.
5888 * parse.y (unary_expr): Call build_x_va_arg.
5889
5890 * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
5891 * call.c (convert_type_from_ellipsis): Define it.
5892 * decl.c (init_decl_processing): Set lang_type_promotes_to.
5893
5894 * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
5895
5896 1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
5897
5898 * class.c (fixed_type_or_null): Always set *nonnull.
5899
5900 1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5901
5902 * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
5903 __GNUC__ and __GNUC_MINOR__.
5904
5905 1999-10-09 Mark Mitchell <mark@codesourcery.com>
5906
5907 * cp-tree.h (make_rtl_for_local_static): New function.
5908 * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
5909 local statics ...
5910 (make_rtl_for_local_static): Here.
5911 * semantics.c (expand_stmt): Use make_rtl_for_local_static.
5912
5913 1999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5914
5915 * method.c: Include tm_p.h.
5916
5917 1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
5918
5919 * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
5920 * lex.c (cp_make_lake_type): Likewise.
5921 * tree.c (init_tree): Init make_lang_type_fn.
5922
5923 1999-10-07 Mark Mitchell <mark@codesourcery.com>
5924
5925 * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
5926 paramter.
5927
5928 * semantics.c (expand_stmt): Don't pretend to have asmspecs for
5929 local statics if we don't really have them.
5930
5931 * ir.texi: Improve documentation for STMT_EXPR. Describe
5932 CLEANUP_POINT_EXPR.
5933
5934 1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
5935
5936 * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
5937
5938 1999-10-07 Greg McGary <gkm@gnu.org>
5939
5940 * class.c (finish_struct_1): Use simpler method of
5941 removing elements of a singly-linked list which doesn't
5942 lose for classes without data members.
5943
5944 1999-10-07 Mark Mitchell <mark@codesourcery.com>
5945
5946 * friend.c (make_friend_class): Robustify.
5947
5948 * semantics.c (finish_object_call_expr): Reject calls to template
5949 types.
5950
5951 1999-10-06 Mark Mitchell <mark@codesourcery.com>
5952
5953 * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
5954
5955 * cp-tree.h (CLASSTYPE_VFIELD): Remove.
5956 * call.c (build_vfield_ref): Use TYPE_VFIELD, not
5957 CLASSTYPE_VFIELD.
5958 * class.c (get_vfield_offset): Likewise.
5959 (finish_base_struct): Likewise.
5960 (modify_one_vtable): Likewise.
5961 (fixup_vtable_deltas): Likewise.
5962 (finish_struct_1): Likewise.
5963 * init.c (expand_virtual_init): Likewise.
5964 * search.c (lookup_field_1): Likewise.
5965 (expand_upcast_fixups): Likewise.
5966 * typeck.c (build_component_ref): Likewise.
5967 (build_binary_op_nodefault): Likewise.
5968
5969 * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
5970 * ir.texi: Document TYPE_VFIELD.
5971
5972 1999-10-06 Brendan Kehoe <brendan@cygnus.com>
5973
5974 * decl.c (grokdeclarator): Only warn about non-zero arrays if
5975 !in_system_header (linux socketbits.h can give this for
5976 __cmsg_data, which is using a GNU extension).
5977
5978 1999-10-05 Mark Mitchell <mark@codesourcery.com>
5979
5980 * decl2.c (start_static_storage_duration_function): Push the
5981 function declaration so it ends up in namespace scope.
5982
5983 * dump.c (DUMP_CHILDREN): Remove.
5984 (DUMP_BINFO): Adjust.
5985 (struct dump_node_info): Remove dump_children_p.
5986 (queue_and_dump_type): Remove dump_children_p parameter.
5987 (queue): Don't set dump_children_p.
5988 (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
5989 queue_and_dump_index.
5990 (dequeue_and_dump): Unconditionally print children. Adjust calls
5991 to functions mentioned above.
5992 (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
5993
5994 * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
5995 * dump.c (dequeue_and_dump): Dump them.
5996
5997 * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
5998
5999 * decl.c (start_function): Set current_in_charge_parm for
6000 constructors, too, where appropriate.
6001 * search.c (fixup_all_virtual_upcast_offsets): New function.
6002 (expand_indirect_vtbls_init): Use it.
6003
6004 1999-10-04 Nathan Sidwell <nathan@acm.org>
6005
6006 * decl2.c (grok_alignof): Don't decay lvalues.
6007
6008 * init.c (build_new): Remove unused variable.
6009
6010 1999-10-04 Mark Mitchell <mark@codesourcery.com>
6011
6012 * cp-tree.h (struct language_function): Remove static_labelno.
6013 (static_labelno): Remove macro.
6014 * method.c (build_overload_nested_name): Make static_labelno
6015 static here.
6016
6017 * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
6018 to decide whether or not a function is defined.
6019
6020 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
6021 situations where make_node will do it automatically.
6022 * decl.c (grok_reference_init): Likewise.
6023 (expand_static_init): Likewise.
6024 (do_static_initialization): Likewise.
6025 * init.c (perform_member_init): Likewise.
6026 (expand_aggr_init_1): Likewise.
6027 (build_new_1): Likewise.
6028 * method.c (do_build_copy_constructor): Likewise.
6029 (do_build_assign_ref): Likewise.
6030 * search.c (expand_upcast_fixups): Likewise.
6031 * semantics.c (finish_stmt_expr): Likewise.
6032 * typeck.c (build_unary_op): Likewise.
6033 (check_return_expr): Likewise.
6034
6035 1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
6036
6037 * init.c (build_vec_delete_1): Fold COND_EXPRs.
6038
6039 1999-10-03 Mark Mitchell <mark@codesourcery.com>
6040
6041 * cp-tree.def (VEC_INIT_EXPR): Remove.
6042 * cp-tree.h (struct stmt_tree): New type.
6043 (struct saved_scope): Remove firstobj. Add x_saved_tree,
6044 x_stmt_tree.
6045 (class_cache_firstobj): Remove.
6046 (struct language_function): Remove stmts_are_full_exprs_p,
6047 x_last_tree, and x_last_expr_type. Add x_stmt_tree.
6048 (current_stmt_tree): New macro.
6049 (last_tree): Adjust.
6050 (last_expr_type): Likewise.
6051 (doing_semantic_analysis_p): Simplify.
6052 (stmts_are_full_exprs_p): Adjust.
6053 (begin_tree): Remove prototype.
6054 (end_tree): Likewise.
6055 (begin_stmt_tree): Change prototype.
6056 (finish_stmt_tree): Likewise.
6057 (building_stmt_tree): Simplify.
6058 * decl.c (mark_stmt_tree): New function.
6059 (mark_saved_scope): Use it.
6060 (start_function): Rearrange slightly to call begin_stmt_tree
6061 earlier.
6062 (save_function_data): Tweak.
6063 (finish_function): Adjust call to finish_stmt_tree.
6064 (mark_lang_function): Use mark_stmt_tree.
6065 * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
6066 * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
6067 (build_vec_init): Remove creation of stand-in intializer.
6068 * pt.c (begin_tree): Remove.
6069 (end_tree): Likewise.
6070 * semantics.c (SET_LAST_STMT): New macro. Use it throughout.
6071 (begin_compound_stmt): Handle a compound-statement outside of a
6072 function.
6073 (begin_stmt_expr): Handle a statement-expression outsidef of a
6074 function.
6075 (finish_stmt_expr): Likewise.
6076 (begin_class_definition): Don't call begin_tree.
6077 (finish_inline_definitions): Don't call end_tree.
6078 (begin_stmt_tree): Take a pointer to tree, not a function as input.
6079 (finish_stmt_tree): Likewise.
6080 * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
6081 (mapcar): Likewise.
6082
6083 * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
6084 * parse.c: Regenerated.
6085
6086 * dump.c (dqueue_and_dump): Dump bitfieldness.
6087
6088 * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
6089 bitfields, rather than DECL_BIT_FIELD.
6090 * ir.texi: Document how to tell whether or not a field is a
6091 bitfield.
6092
6093 * lex.c (make_lang_type): Fix typo in comment.
6094
6095 1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
6096
6097 * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
6098
6099 1999-10-01 Mark Mitchell <mark@codesourcery.com>
6100
6101 * pt.c (tsubst_decl): If the type of a template instantiation is
6102 bogus, so is the whole instantiation.
6103
6104 1999-09-30 Mark Mitchell <mark@codesourcery.com>
6105
6106 * decl.c (initialize_local_var): Handle static variables here.
6107 (cp_finish_decl): Tweak handling of function-scope static
6108 variables.
6109 * semantics.c (expand_stmt): Handle DECL_STMTs for static
6110 variables.
6111
6112 * method.c (emit_thunk): Don't crash when -fsyntax-only.
6113
6114 * cp-tree.h (lang_decl_flags): Add global_ctor_p and
6115 global_dtor_p. Add init_priority.
6116 (DECL_ACCESS): Adjust accordingly.
6117 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
6118 (GLOBAL_INIT_PRIORITY): Likewise.
6119 * decl.c (lang_mark_tree): Adjust accordingly.
6120 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
6121 and GLOBAL_INIT_PRIORITY.
6122 * dump.c (dequeue_and_dump): Print them.
6123 * ir.texi: Document them.
6124
6125 * decl2.c (struct priority_info_s): Remove initialization_sequence
6126 and destruction_sequence.
6127 (start_static_storage_duration_function): Return the body of the
6128 function. Convert for function-at-a-time mode.
6129 (generate_inits_for_priority): Remove.
6130 (finish_static_storage_duration_function): Change prototype.
6131 Adjust for function-at-a-time mode.
6132 (do_static_initialization): Likewise.
6133 (do_static_destruction): Likewise.
6134 (do_static_initialization_and_destruction): Remove.
6135 (start_static_initialization_or_destruction): New function.
6136 (finish_static_initialization_or_destruction): Likewise.
6137 (get_priority_info): Don't manipulation initialization_sequence or
6138 destruction_sequence.
6139 (prune_vars_needing_no_initialization): New function.
6140 (write_out_vars): Likewise.
6141 (finish_file): Use the various new functions instead of the old.
6142
6143 Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
6144
6145 * cp-tree.h (warn_float_equal): Declare.
6146 * decl2.c (warn_float_equal): Define.
6147 (lang_decode_option): Recognize -W[no-]float-equal.
6148 * typeck.c (build_binary_op_nodefault): Conditionally warn
6149 about equality tests of floating point types.
6150
6151 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
6152
6153 Support normal type_info-based EH mechanisms with -fno-rtti.
6154 * except.c (build_eh_type_type): Remove special -fno-rtti handling.
6155 (build_eh_type_type_ref): Likewise.
6156 (build_eh_type): Remove.
6157 (expand_throw): Call build_eh_type_type, not build_eh_type.
6158 * decl2.c (import_export_decl): Don't associate the tinfo fn with
6159 the vtable if -fno-rtti.
6160 * decl.c (init_decl_processing): Always init_rtti_processing.
6161
6162 * rtti.c (get_typeid): Don't complain about -fno-rtti.
6163
6164 * class.c (class_cache_obstack, class_obstack): Remove.
6165 (init_class_processing): Don't initialize class_obstack.
6166 (push_cache_obstack): Remove.
6167 (pushclass): Don't call it.
6168 * cp-tree.h: Remove prototype for push_cache_obstack.
6169 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
6170 (pushlevel_class): Don't push_decl_level.
6171 (poplevel_class): Don't pop_stack_level.
6172 (push_class_level_binding): Don't push_cache_obstack.
6173 (init_decl_processing): Don't intialize decl_obstack.
6174 * search.c (push_class_decls): Don't push_cache_obstack.
6175 * tree.c (list_hash_add): Put hash node on permanent_obstack.
6176 (hash_tree_cons): Don't mess with obstacks.
6177 (print_lang_statistics): Don't print stats for class_obstack and
6178 decl_obstack.
6179
6180 1999-09-29 Mark Mitchell <mark@codesourcery.com>
6181
6182 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
6183 * ir.texi: Document DECL_EXTERNAL.
6184
6185 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
6186 * ir.texi: Document THUNK_DECLs.
6187
6188 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
6189 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
6190 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
6191 * error.c (dump_template_bindings): Remove unused parameter.
6192 Handle multiple levels of template parameters.
6193 (dump_template_decl): Use `parms', not `args', for template
6194 parameters. Fix thinko.
6195 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
6196 flags to dump_template_bindings.
6197 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
6198 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
6199 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
6200 (tsubst_copy): Clarify variable name.
6201 (most_general_template): Robustify.
6202
6203 1999-09-29 Nathan Sidwell <nathan@acm.org>
6204
6205 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
6206 to change primary template rendering.
6207
6208 1999-09-29 Mark Mitchell <mark@codesourcery.com>
6209
6210 * cp-tree.h (UPT_TEMPLATE): Remove.
6211 (UPT_PARMS): Likewise.
6212 (DECL_NEEDED_P): New macro.
6213 * decl2.c (finish_vtable_vardecl): Use it.
6214 (finish_objects): Don't crash with -fsyntax-only.
6215 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
6216 -fsyntax-only.
6217 * pt.c (tsubst_friend_function): Remove FIXME that talks about
6218 obstacks.
6219 (tsubst_expr): Correct handling of function try-blocks.
6220 * semantics.c: Include flags.h.
6221 (expand_body): Don't do RTL generation if -fsyntax-only.
6222 * Makefile.in (semantics.o): Depends on flags.h.
6223
6224 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
6225
6226 * pt.c (most_general_template): Adjust declaration.
6227
6228 * cp-tree.h: (most_general_template): Declare.
6229
6230 * error.c (dump_template_value): Rename to ...
6231 (dump_template_argument): This.
6232 (dump_template_argument_list): New function.
6233 (dump_type): Use it.
6234 (dump_template_parameter): New function.
6235 (dump_template_decl): Use it.
6236 (dump_template_bindings): New function.
6237 (dump_function_decl): Use it. Pretty print function template
6238 instantiations.
6239
6240 1999-09-28 Nathan Sidwell <nathan@acm.org>
6241
6242 * decl.c (grokdeclarator): Distinguish parameter context for
6243 diagnostics. Tidy up missing type diagnostic.
6244 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
6245
6246 1999-09-28 Mark Mitchell <mark@codesourcery.com>
6247
6248 * ir.texi: Improve documentation for TARGET_EXPR.
6249
6250 1999-09-27 Nathan Sidwell <nathan@acm.org>
6251
6252 Augment stringification of trees.
6253 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
6254 (fndecl_as_string, type_as_string_real, args_as_string,
6255 code_as_string, language_as_string, parm_as_string,
6256 op_as_string, assop_as_string, cv_as_string): Remove.
6257 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
6258 (context_as_string): Declare new function.
6259 * error.c (cp_printers): Move definition.
6260 (OB_UNPUT): Remove.
6261 (OB_END_TEMPLATE_ID): Adjust.
6262 (interesting_scope_p): Remove.
6263 (dump_scope): New static function.
6264 (dump_qualifiers): Adjust prototype, reimplement.
6265 (dump_template_value): Use tree_string_flags.
6266 (dump_type_real): Move back to dump_type.
6267 (dump_type): Adjust prototype. Use tree_string_flags.
6268 (dump_aggr_type): Likewise. Use dump_template_parms.
6269 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
6270 Return pad flag.
6271 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
6272 (dump_simple_decl): Likewise.
6273 (dump_decl): Likewise. Use dump_template_decl.
6274 (dump_template_decl): New static function broken out of dump_decl.
6275 (dump_function_decl): Adjust prototype. Use tree_string_flags.
6276 (dump_parameters): Likewise. Prefix space.
6277 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
6278 (dump_function_name): Likewise. Use dump_template_parms.
6279 (dump_template_parms): New static function broken out of
6280 dump_function_name.
6281 (dump_expr_list): Adjust prototype. Use tree_string_flags.
6282 (dump_expr): Likewise.
6283 (fndecl_as_string): Removed
6284 (type_as_string_real): Removed
6285 (dump_binary_op): Adjust prototype. Use tree_string_flags.
6286 (dump_unary_op): Likewise.
6287 (type_as_string): Likewise.
6288 (expr_as_string): Likewise.
6289 (decl_as_string): Likewise.
6290 (context_as_string): New function.
6291 (lang_decl_name): Adjust.
6292 (decl_to_string): New static print callback.
6293 (expr_to_string): Likewise.
6294 (fndecl_to_string): Likewise.
6295 (code_as_string): Renamed to ...
6296 (code_to_string): ... here. Adjust.
6297 (language_as_string): Renamed to ...
6298 (language_to_string): ... here. Adjust.
6299 (parm_as_string): Renamed to ...
6300 (parm_to_string): ... here.
6301 (op_as_string): Renamed to ...
6302 (op_to_string): ... here.
6303 (assop_as_string): Renamed to ...
6304 (assop_to_string): ... here.
6305 (type_to_string): New static print callback.
6306 (args_as_string): Renamed to ...
6307 (args_to_string): ... here. Adjust.
6308 (cv_as_string): Renamed to ...
6309 (cv_to_string): ... here. Adjust.
6310 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
6311 (print_template_context): Likewise.
6312
6313 1999-09-26 Mark Mitchell <mark@codesourcery.com>
6314
6315 * cp-tree.h (expand_throw): Remove prototype.
6316 * except.c (expand_throw): Make it static. Use tree-generation
6317 functions, rather than RTL-generation functions.
6318 (build_throw): Use it.
6319 * expr.c: Include except.h.
6320 (cplus_expand_expr): Don't call expand_throw here.
6321 * Makefile.in (expr.o): Depend on except.h.
6322 * ir.texi: Update documentation for THROW_EXPR.
6323
6324 * decl.c (start_function): Set x_dont_save_pending_sizes rather
6325 than calling get_pending_sizes.
6326 * init.c (build_new): Don't save and restore
6327 immediate_size_expand; instead, assert that it has the expected
6328 value already.
6329
6330 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6331
6332 * lex.c (compiler_error): Add missing call to va_end().
6333
6334 1999-09-25 Mark Mitchell <mark@codesourcery.com>
6335
6336 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
6337 * ir.texi: Document RESULT_DECL and DECL_RESULT.
6338
6339 * cp-tree.h (check_return_expr): New function.
6340 * decl.c (finish_constructor_body): New function.
6341 (pushdecl): Put global friend functions in namespace binding
6342 level, not the class binding level.
6343 (finish_destructor_body): Make sure the dtor_label is always
6344 defined. Fix typo in comment.
6345 (finish_function): Move generation of constructor-termination code
6346 to semantic-analysis time. Move generation of implicit `main'
6347 return value to semantic-analysis time.
6348 * semantics.c (finish_return_stmt): Generate goto's to
6349 ctor_label/dtor_label here. Use check_return_expr to do semantic
6350 analysis on the returned expression.
6351 * typeck.c (maybe_warn_about_returning_address_of_local): New
6352 function split out from c_expand_return.
6353 (check_return_expr): Likewise.
6354 (c_expand_return): Just generate the RTL for the return.
6355
6356 1999-09-24 Mark Mitchell <mark@codesourcery.com>
6357
6358 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
6359 (cleanup_type): Likewise.
6360 (search_tree): Change prototype.
6361 * decl.c (local_variable_p): Adjust for new interface to
6362 search_tree.
6363 (check_default_argument): Likewise.
6364 * error.c (dump_expr): Handle INIT_EXPR.
6365 * except.c (expand_throw): Don't make cleanup_type a local static.
6366 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
6367 * init.c (build_new): Call build_new_1 directly, rather than
6368 building a NEW_EXPR.
6369 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
6370 processing file-scope initializers.
6371 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
6372 * tree.c: Include splay-tree.h
6373 (no_linkage_helper): Adjust for new interface to search_tree.
6374 (search_tree): Pass around pointers to tree nodes, rather than the
6375 nodes themselves. Handle VEC_INIT_EXPR.
6376 (no_linkage_check): Adjust for new interface to search_tree.
6377 (mapcar): Handle VEC_INIT_EXPR.
6378 (target_remap): New variable.
6379 (bot_manip): Use it.
6380 (bot_replace): New function.
6381 (break_out_target_exprs): Use it to remap all variables used in a
6382 default argument expression.
6383 * typeck.c (build_modify_expr): Don't crash when outside a
6384 function and presented with an INIT_EXPR assignment
6385 * Makefile.in (tree.o): Depend on splay-tree.h.
6386
6387 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
6388
6389 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
6390 DECL_BUILT_IN.
6391 (builtin_function): New arg CLASS. Arg CODE now of type int. All
6392 callers changed.
6393 Set the builtin's DECL_BUILT_IN_CLASS.
6394
6395 1999-09-24 Mark Mitchell <mark@codesourcery.com>
6396
6397 * decl.c (pushdecl): Don't make local declarations of extern
6398 variables give the variable a DECL_CONTEXT for the function.
6399 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
6400 Don't accidentally make RTL for local declarations.
6401 (emit_local_var): Handle declarations with asm-specifiers here.
6402
6403 1999-09-23 Mark Mitchell <mark@codesourcery.com>
6404
6405 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
6406 STMT_IS_FULL_EXPR_P.
6407
6408 * cp-tree.h (language_function): Add cannot_inline.
6409 * decl.c (start_function): Restore current_function_cannot_inline
6410 from the saved value.
6411 (save_function_data): Save current_function_cannot_inline.
6412 * decl2.c (start_objects): Change prototype. Build the function
6413 in function-at-a-time mode.
6414 (finish_objects): Likewise.
6415 (generate_ctor_or_dtor_function): Adjust accordingly.
6416
6417 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
6418 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
6419 Don't call expand_anon_union_decl here
6420 * semantics.c (exapnd_stmt): Call it here, instead.
6421 * typeck.c (mark_addressable): Addressed variables are implicitly
6422 used.
6423
6424 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6425
6426 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
6427 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
6428 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
6429 * cp-tree.h: Add tree checking macros to various tree access
6430 macros.
6431 * ptree.c (print_lang_decl): Test for function or variable
6432 before accessing template info.
6433
6434 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
6435
6436 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
6437 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
6438 * decl2.c (lang_f_options): Add -fshort-wchar.
6439 * cp-tree.h: Declare flag_short_wchar.
6440 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
6441 int' for wchar_t.
6442
6443 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6444
6445 * ir.texi: Fix formatting errors and typos.
6446
6447 1999-09-22 Mark Mitchell <mark@codesourcery.com>
6448
6449 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
6450
6451 * decl.c (pushdecl): Do create a binding for extern "C" functions,
6452 but not for their DECL_ASSEMBLER_NAMEs.
6453 (lookup_name_current_level): Fix formatting.
6454 (xref_tag): Likewise.
6455 * decl2.c (start_objects): Mark static constructors and
6456 destructors as used.
6457
6458 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
6459
6460 * decl.c (define_case_label): Don't crash if we're not in a switch.
6461
6462 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
6463 * lang-options.h: Restore -fthis-is-variable. Remove help strings
6464 for unsupported flags.
6465
6466 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
6467
6468 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
6469 Accept and warn about -fthis-is-variable.
6470
6471 1999-09-21 Mark Mitchell <mark@codesourcery.com>
6472
6473 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
6474 CLEANUP_STMT, and SCOPE_STMT.
6475
6476 * decl2.c (lang_decode_option): Adjust, in the wake of recent
6477 changes to option processing.
6478
6479 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6480
6481 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
6482 function pointer from pmfs with no object given.
6483 (convert_for_assignment): Do not return error when converting
6484 pmfs.
6485
6486 1999-09-21 Alex Samuel <samuel@codesourcery.com>
6487
6488 * lex.c (internal_filename): New variable.
6489 (INTERNAL_FILENAME): New macro.
6490 (init_parse): Allocate internal_filename and mark as root. Use it
6491 instead of a string constant.
6492
6493 1999-09-21 Nathan Sidwell <nathan@acm.org>
6494
6495 Reimplement dynamic cast and catch matching.
6496 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
6497 * search.c (dynamic_cast_base_recurse): New function.
6498 (get_dynamic_cast_base_type): New function for dynamic cast.
6499 * rtti.c (build_dynamic_cast_1): Determine source and target
6500 class relationship. Call __dynamic_cast_2.
6501 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
6502 (__user_type_info::dyncast): New dynamic cast dispatcher.
6503 (__user_type_info::sub_kind): New nested enumeration.
6504 (__user_type_info::contained_p): sub_kind predicate.
6505 (__user_type_info::contained_public_p): Likewise.
6506 (__user_type_info::contained_nonpublic_p): Likewise.
6507 (__user_type_info::contained_nonvirtual_p: Likewise.
6508 (__user_type_info::upcast_result): New nested struct.
6509 (__user_type_info::dyncast_result): New nested struct.
6510 (*::do_upcast): New catch function.
6511 (*::do_dyncast): New dynamic cast function.
6512 (__user_type_info::find_public_subobj): New dynamic cast
6513 helper dispatcher.
6514 (*::do_find_public_subobj): New dynamic cast helper function.
6515 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
6516 (__user_type_info::dyncast): Define dynamic cast dispatcher.
6517 (*::do_upcast): Define catch function.
6518 (*::do_dyncast): Define dynamic cast function.
6519 (*::do_find_public_subobj): Define dynamic cast helper function.
6520 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
6521 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
6522 (__dynamic_cast_2): New dynamic cast runtime.
6523
6524 1999-09-20 Mark Mitchell <mark@codesourcery.com>
6525
6526 * cp-tree.h (finish_stmt_expr): Change prototype.
6527 * expr.c (cplus_expand_expr): Adjust call accordingly.
6528 * init.c (finish_init_stmts): Likewise.
6529 * parse.y (primary): Likewise.
6530 * pt.c (tsubst_copy): Likewise.
6531 * semantics.c (finish_stmt_expr): Don't take two parameters.
6532 Don't remove generated BLOCKs from the block-tree.
6533
6534 Remove support for assigning to `this'.
6535 * NEWS: Note that fact.
6536 * class.c (build_vbase_path): Don't check flag_this_is_variable.
6537 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
6538 (language_function): Remove assigns_this, just_assigned_this, and
6539 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
6540 (base_init_expr): Remove.
6541 (current_vcalls_possible_p): New macro.
6542 (vtbls_set_up_p): Likewise.
6543 (emit_base_init): Change prototype.
6544 * decl.c (finish_destructor_body): New function, split out from
6545 finish_function.
6546 (current_function_assigns_this): Remove.
6547 (current_function_just_assigned_this): Likewise.
6548 (start_function): Don't set them.
6549 (finish_function): Don't check them. Don't emit
6550 base-initialization code here. Generate code for destructors when
6551 doing semantic analysis.
6552 (finish_stmt): Don't check current_function_just_assigned_this.
6553 * decl2.c (lang_f_options): Remove this-is-variable.
6554 (lang_decode_option): Likewise.
6555 (grokclassfn): Don't check flag_this_is_variable.
6556 * init.c (emit_base_init): Return the expression generated.
6557 (construct_virtual_bases): Don't push/pop obstacks. Fix
6558 typo.
6559 (build_new_1): Don't check flag_this_is_variable.
6560 (get_temp_regvar): Don't set DECL_REGISTER.
6561 (build_vec_init): Don't call use_variable.
6562 * lang-options.h: Remove "-fthis-is-variable" and
6563 "-fno-this-is-variable".
6564 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
6565 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
6566 expand_expr_stmt.
6567 * semantics.c (finish_expr_stmt_real): Rename to ...
6568 (finish_expr_stmt): This. Remove assigned_this parameter.
6569 (begin_if_stmt): Call do_pushlevel before starting the statement.
6570 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
6571 blocks.
6572 (setup_vtbl_ptr): Emit initialization code for bases and members
6573 at semantic-analysis time. Emit code to initialize vtables in
6574 destructors here.
6575 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
6576 Don't handle CTOR_INITIALIZER any more.
6577 * typeck.c (build_modify_expr): Don't check for assignments to
6578 this.
6579 (c_expand_return): Don't suggest assigning to `this'.
6580
6581 * Makefile.in (decl.o): Depend on RTL_H.
6582 (decl2.o): Likewise.
6583 (class.o): Likewise.
6584 (call.o): Likewise.
6585 (method.o): Likewise.
6586 (search.o): Likewise.
6587 (tree.o): Likewise.
6588 (pt.o): Likewise.
6589
6590 * decl.c (duplicate_decls): When a builtin function is redeclared
6591 as static, make sure it is mangled correctly.
6592
6593 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
6594 detail about the statement-tree.
6595
6596 1999-09-20 Nathan Sidwell <nathan@acm.org>
6597
6598 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
6599
6600 1999-09-20 Nick Clifton <nickc@cygnus.com>
6601
6602 * decl2.c (lang_decode_option): Extend comment.
6603
6604 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
6605
6606 * typeck.c: Include "tm_p.h".
6607
6608 1999-09-19 Mark Mitchell <mark@codesourcery.com>
6609
6610 * ir.texi: New file.
6611
6612 1999-09-19 Paul Burchard <burchard@pobox.com>
6613
6614 * semantics.c (expand_stmt): Initialize return value.
6615
6616 1999-09-18 Paul Burchard <burchard@pobox.com>
6617
6618 * gxxint.texi: G++ now implements namespaces.
6619
6620 1999-09-18 Mark Mitchell <mark@codesourcery.com>
6621
6622 * decl.c (pop_label): Don't warn about unused labels more than
6623 once.
6624 * semantics.c (finish_goto_stmt): Always marked used labels as
6625 used.
6626
6627 * decl.c (layout_var_decl): Change prototype. Call layout_decl
6628 even when the declaration is external.
6629 (cp_finish_decl): Adjust call to layout_var_decl.
6630 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
6631
6632 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
6633
6634 * typeck.c (get_member_function_from_ptrfunc): Always consider
6635 virtuality inside member pointer.
6636
6637 1999-09-17 Mark Mitchell <mark@codesourcery.com>
6638
6639 Turn on function-at-a-time processing.
6640 * cp-tree.h (doing_semantic_analysis_p): New macro.
6641 (SF_DEFAULT): Define to zero, not SF_EXPAND.
6642 (start_handler_parms): Change prototype.
6643 (expand_start_catch_block): Likewise.
6644 (expand_end_catch_block): Likewise.
6645 (expand_start_eh_spec): Likewise.
6646 (expand_end_eh_spec): Declare.
6647 (finish_handler_parms): Change prototype.
6648 (begin_catch_block): Declare.
6649 (finish_handler): Change prototype.
6650 (do_pushlevel): Declare.
6651 (do_poplevel): Likewise.
6652 * decl.c (pushlevel): Don't create
6653 binding levels when not doing semantic analysis.
6654 (poplevel): Don't pop them.
6655 (pushdecl): Assert that we are never called when not doing
6656 semantic analysis.
6657 (pushdecl_top_level): Use push_to_top_level.
6658 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
6659 label when expanding.
6660 (cp_finish_decl): Only inject for-scope variables when doing
6661 semantic analysis. Add comments.
6662 (start_handler_parms): Return the handler parm.
6663 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
6664 already set. Reinitialize from saved function data if available.
6665 Don't pushlevel when not doing semantic analysis.
6666 (store_parm_decls): Only generate RTL when expanding. Only
6667 pushdecl when doing semantic analysis. Set
6668 current_eh_spec_try_block if appropriate.
6669 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
6670 Combine common code. Don't poplevel when not doing semantic
6671 analysis.
6672 (push_cp_function_context): Don't expand functions without an
6673 explicit call to expand_body.
6674 (mark_lang_function): Make eh_spec_try_block and
6675 x_scope_stmt_stack.
6676 * except.c (expand_end_eh_spec): Don't
6677 declare.
6678 (process_start_catch_block): Likewise.
6679 (push_eh_cleanup): Use finish_decl_cleanup.
6680 (initialize_handler_parm): New function.
6681 (expand_start_catch_block): Use it.
6682 (expand_end_catch_block): Use tree-generation functions, not
6683 RTL-generation functions.
6684 (expand_start_eh_spec): Likewise.
6685 (expand_end_eh_spec): Likewise.
6686 (expand_exception_blocks): Simplify.
6687 (start_anon_func): Use do_pushlevel.
6688 (end_anon_func): Use do_poplvel. Call expand_body for the
6689 function.
6690 * expr.c (do_case): Don't call define_case_label.
6691 * init.c (create_temporary_var): Set DECL_CONTEXT for local
6692 variables.
6693 * method.c (emit_thunk): Call expand_body for the
6694 thunk.
6695 (sythesize_method): Likewise.
6696 * parse.y (handler_args): Give it ttype.
6697 (eat_saved_input): Call expand_body.
6698 (base_init): Use do_pushlevel.
6699 (pending_inline): Call expand_body.
6700 (handler): Adjust calls to finish_handler_parms and
6701 finish_handler.
6702 (handler_args): Don't call expand_start_catch_block. Return the
6703 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
6704 * parse.c: Regenerated.
6705 * rtti.c (synthesize_tinfo_fn): Call finish_function.
6706 * semantics.c (do_pushlevel): Give it external linkage. Build
6707 SCOPE_STMTs.
6708 (do_poplevel): Likewise.
6709 (finish_case_label): Call define_case_label when doing semantic
6710 analysis.
6711 (finish_goto_stmt): Create RTL for labels.
6712 (finish_function_try_block): Set in_function_try_handler
6713 unconditionally.
6714 (finish_function_handler_sequence): Unset it.
6715 (finish_handler_parms): Use expand_start_catch_block even when
6716 building a statement-tree.
6717 (begin_catch_block): New function.
6718 (finish_handler): Move a little RTL-generation logic here.
6719 (finish_decl_cleanup): Allow cleanups for empty declarations.
6720 (finish_named_return_value): Don't pushdecl when not doing
6721 semantic analysis.
6722 (expand_stmt): Don't do semantic analysis for variable
6723 declarations. Handle START_CATCH_STMT. Call expand_label
6724 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
6725 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
6726 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
6727 RETURN_INIT and function try blocks.
6728
6729 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
6730 x_scope_stmt_stack. Add x_in_charge_parm.
6731 (current_eh_spec_try_block): New macro.
6732 (current_scope_stmt_stack): Likewise.
6733 (current_in_charge_parm): Likewise.
6734 * decl.c (start_function): Initialize current_in_charge_parm.
6735 (finish_function): Use current_in_charge_parm rather than looking
6736 up __in_chrg.
6737 * search.c (expand_indirect_vtbls_init): Likewise.
6738
6739 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
6740 (TRY_BLOCK): Likewise.
6741 (HANDLER): Likewise.
6742 (START_CATCH_STMT): New tree node.
6743 (SCOPE_STMT): Likewise.
6744 * cp-tree.h (SCOPE_BEGIN_P): New macro.
6745 (SCOPE_NULLIFIED_P): Likewise.
6746 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
6747 (struct lang_decl): Add saved_language_function.
6748 (DECL_PENDING_INLINE_INFO): Adjust documentation.
6749 (DECL_PENDING_INLINE_P): New macro.
6750 (TYPE_TI_ARGS): Fix typo in comment.
6751 (DECL_SAVED_TREE): Add to documentation.
6752 (DECL_SAVED_FUNCTION_DATA): New macro.
6753 (START_CATCH_TYPE): Likewise.
6754 (SCOPE_END_P): New macro.
6755 (declare_parm_level): Don't declare.
6756 * decl.c (mark_lang_function): New function, split out from
6757 mark_cp_function_context.
6758 (save_function_data): New function.
6759 (declare_parm_level): Remove.
6760 (finish_function): Use save_function_data to squirrel away
6761 important stuff for later use.
6762 (mark_cp_function_context): Use mark_function_data.
6763 (lang_mark_tree): Likewise.
6764 * lex.c (begin_definition_of_inclass_inline): Set
6765 DECL_PENDING_INLINE_P.
6766 (store_pending_inline): Clear it.
6767 * pt.c (tsubst_decl): Likewise.
6768
6769 1999-09-17 Nathan Sidwell <nathan@acm.org>
6770
6771 * call.c (perform_implicit_conversion): Deal with error_mark_node.
6772
6773 1999-09-17 Mark Mitchell <mark@codesourcery.com>
6774
6775 * decl.c (warn_extern_redeclared_static): Don't get confused by
6776 static member functions.
6777 (duplicate_decls): Merge DECL_THIS_STATIC.
6778
6779 * decl.c (expand_static_init): Make sure assignments to local
6780 statics actually occur.
6781
6782 1999-09-17 Mark Mitchell <mark@codesourcery.com>
6783
6784 * cp-tree.h (poplevel_class): Declare.
6785 * class.c (popclass): Use poplevel_class, not poplevel.
6786 * decl.c (poplevel_class): Don't make it static. Don't return a
6787 value.
6788 (poplevel): Don't call poplevel_class; abort in a class
6789 binding level is seen.
6790 * semantics.c (finish_translation_unit): Use pop_everything.
6791 * parse.y (member_init): Allow errors.
6792 (pending_inline): Call finish_function.
6793 * parse.c: Regenerated.
6794 * Makefile.in (CONFLICTS): Adjust.
6795
6796 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
6797
6798 * error.c: Reduce code duplication.
6799 (dump_template_value): New function.
6800 (dump_type_real): Use it.
6801 (dump_decl): Likewise.
6802 (dump_function_name): Likewise.
6803 (dump_function_decl): Don't be too talkative about function return
6804 type variety.
6805
6806 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6807
6808 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
6809
6810 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
6811
6812 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
6813
6814 * decl2.c (finish_file): Also call check_global_declarations for
6815 the pending_statics list.
6816
6817 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
6818
6819 * lex.c (cp_pragma_implementation): Allow #pragma implementation
6820 in header files.
6821
6822 1999-09-15 Richard Henderson <rth@cygnus.com>
6823
6824 * lex.c (mark_impl_file_chain): Follow the next chain.
6825
6826 1999-09-15 Mark Mitchell <mark@codesourcery.com>
6827
6828 * decl.c (warn_extern_redeclared_static): Simplify. Catch
6829 problems with extern "C" functions redeclared as static.
6830 (duplicate_decls): When a builtin is redeclared static, make the
6831 new function have internal linkage.
6832
6833 1999-09-15 Mark Mitchell <mark@codesourcery.com>
6834
6835 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
6836 * pt.c (tsubst_copy): Likewise.
6837 * tree.c (search_tree): Likewise.
6838 (mapcar): Likewise.
6839
6840 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6841
6842 * typeck2.c (ack): Don't declare progname.
6843
6844 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
6845
6846 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
6847 filenames with ggc_alloc_string.
6848
6849 1999-09-14 Mark Mitchell <mark@codesourcery.com>
6850
6851 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
6852 TARGET_EXPR.
6853 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
6854 the TARGET_EXPR.
6855 * cvt.c (build_up_reference): Likewise.
6856 * tree.c (build_cplus_new): Likewise.
6857 (get_target_expr): Likewise.
6858
6859 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
6860
6861 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
6862
6863 1999-09-13 Mark Mitchell <mark@codesourcery.com>
6864
6865 * cp-tree.h (build_target_expr): New function.
6866 * call.c (build_conditional_expr): Use build_target_expr.
6867 (convert_like): Likewise.
6868 (build_over_call): Likewise.
6869 * cvt.c (build_up_reference): Likewise.
6870 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
6871 (destroy_local_var): Here.
6872 (build_target_expr): New function.
6873 * tree.c (build_cplus_new): Use it.
6874 (get_target_expr): Likewise.
6875
6876 1999-09-13 Nathan Sidwell <nathan@acm.org>
6877
6878 * typeck.c (expr_sizeof): Don't decay arrays and functions.
6879 Remove misleading comment.
6880 (build_compound_expr): Don't decay arrays.
6881
6882 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
6883
6884 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
6885 class rvalues again.
6886
6887 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6888
6889 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
6890
6891 * g++spec.c: Include gcc.h.
6892 (lang_specific_driver): Constify a char*. Call xcalloc, not
6893 xmalloc/bzero. All calls to the function pointer parameter now
6894 explicitly call `fatal'.
6895
6896 1999-09-12 Mark Mitchell <mark@codesourcery.com>
6897
6898 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
6899 * cvt.c (ocp_convert): Complete the from and destination types.
6900 Adjust warning about functions always being `true' in conditionals.
6901 * decl.c (duplicate_decls): Don't play funny games with abort.
6902 * error.c (dump_expr): Handle OVERLOADs.
6903 * spew.c (probe_obstack): Remove.
6904 * typeck.c (condition_conversion): Use perform_implicit_conversion.
6905
6906 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
6907
6908 * cp-tree.h (auto_function, define_function): Adjust prototypes.
6909 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
6910 changed.
6911 (auto_function): Likewise, for CODE arg.
6912 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
6913 (builtin_function): ... here.
6914
6915 1999-09-11 Mark Mitchell <mark@codesourcery.com>
6916
6917 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
6918 (init_decl_processing): Don't set TREE_PERMANENT for the
6919 error_mark_node.
6920 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
6921 (grokdeclarator): Likewise.
6922 (grokparms): Don't check TREE_PERMANENT when building up lists.
6923 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
6924 (mark_inline_for_output): Likewise.
6925 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
6926 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
6927 * lex.c (check_newline): Don't check ggc_p; it is always one.
6928 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
6929 * spew.c (yylex): Don't copy_node or probe_obstacks for
6930 non-permanent CONSTANTs and STRINGs.
6931 * tree.c (build_cplus_array_type_1): Don't fuss with
6932 TREE_PERMANENT on ARRAY_TYPEs.
6933
6934 * cp-tree.def (CLEANUP_STMT): New node.
6935 * cp-tree.h (language_function): Add name_declared.
6936 (current_function_name_declared): New macro.
6937 (CLEANUP_DECL): New macro.
6938 (CLEANUP_EXPR): Likewise.
6939 (emit_local_var): Likewise.
6940 (finish_decl_cleanup): New function.
6941 * cvt.c (build_up_reference): Simplify.
6942 (ocp_convert): Remove dead code.
6943 * decl.c (start_decl): Remove call to add_decl_stmt.
6944 (grok_reference_init): Adjust, to handle bindings temporaries to
6945 references. Remove dead code.
6946 (initialize_local_var): Don't generate RTL for
6947 declarations here, or build cleanups here. Don't fuss with
6948 obstacks. Replace expand_start_target_temps calls with explicit
6949 setting of stms_are_full_exprs_p.
6950 (destroy_local_var): New function.
6951 (emit_local_var): Likewise.
6952 (cp_finish_decl): Use them, as appropriate.
6953 (start_function): Announce template functions.
6954 (store_parm_decls): Don't call declare_function_name here.
6955 (finish_stmt): Don't start emit base-initialization code when just
6956 building the statement-tree.
6957 * init.c (create_temporary_var): Move add_decl_stmt call ...
6958 (get_temp_regvar): Here.
6959 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
6960 cp_finish_decl would expect. Don't call add_decl_stmt.
6961 * semantics.c (begin_compound_stmt): Call declare_function_name,
6962 if appropriate.
6963 (finish_decl_cleanup): New function.
6964 (expand_stmt): Use emit_local_var to output variables.
6965 (expand_body): Set current_funtion_name_declared.
6966
6967 1999-09-10 Mark Mitchell <mark@codesourcery.com>
6968
6969 * cp-tree.h (finish_cleanup_try_block): New function.
6970 * semantics.c (finish_cleanup_try_block): Add comment.
6971
6972 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
6973
6974 * cp-tree.h: Delete declarations for all tree nodes now moved to
6975 global_trees.
6976 * decl.c: Delete their definitions.
6977 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
6978 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
6979 provide defaults.
6980 (init_decl_processing): Call build_common_tree_nodes and
6981 build_common_tree_nodes_2 instead of building their nodes here.
6982 Don't add gc roots for them.
6983
6984 1999-09-10 Mark Mitchell <mark@codesourcery.com>
6985
6986 * cp-tree.h (language_function): Rename expanding_p to
6987 x_expanding_p. Rename named_label_uses to x_named_label_uses.
6988 (expanding_p): Adjust accordingly.
6989 (TREE_VIA_PRIVATE): Fix typo in comment.
6990 (DECL_REFERENCE_SLOT): Remove.
6991 (SET_DECL_REFERENCE_SLOT): Likewise.
6992 * decl.c (named_label_uses): Adjust. Remove chicken comment.
6993 (push_overloaded_decl): Don't truncate the chain of bindings when
6994 adding an overloaded function.
6995 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
6996 (initialize_local_var): Fix typo in comment.
6997 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
6998 * decl2.c (start_objects): Make the fact that we are expanding
6999 the generated function right away explicit.
7000 (start_static_storage_duration_function): Likewise.
7001 (finish_file): Fix typo in comment.
7002 * init.c (build_vec_init): Correct bugs in handling cleanups.
7003 * semantics.c (maybe_convert_cond): New function.
7004 (FINISH_COND): Always store the condition, even if there's
7005 a declaration.
7006 (finish_if_stmt_cond): Use maybe_convert_cond.
7007 (finish_while_stmt_cond): Likewise.
7008 (finish_do_stmt): Likewise.
7009 (finish_for_cond): Likewise.
7010 (expand_cond): Adjust.
7011
7012 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
7013 * init.c (perform_member_init): Remove obstack machinations.
7014 (expand_cleanup_for_base): Likewise.
7015 (finish_init_stmts): Mark the statement-expression as used.
7016 * method.c (emit_thunk): Use tree-generating functions, not
7017 RTL.
7018 (do_build_copy_constructor): Likewise.
7019 (do_build_assign_ref): Likewise.
7020 (synthesize_method): Likewise. Keep track of line numbers.
7021 * pt.c (tsubst_expr): Handle various kinds of try blocks.
7022 * semantics.c (expand_stmts): Remove.
7023 (begin_function_try_block): Set FN_TRY_BLOCK_P.
7024 (finish_function_try_block): Be careful rechaining
7025 function try blocks.
7026 (expand_stmt): Loop through all the statements at a given level.
7027 (exapnd_body): Be careful with line-numbers here too. Prepare for
7028 being called directly from the parser.
7029
7030 * cp-tree.h (finish_function): Adjust prototype.
7031 * decl.c (finish_function): Return the function compiled.
7032 * pt.c (instantiate_decl): Don't play games with obstacks.
7033 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
7034 (search_tree): Likewise.
7035 * typeck.c: Fix typo in comment.
7036 * typeck2.c (store_init_value): Add comment.
7037
7038 * cp-tree.h (CPTI_ATEXIT): New macro.
7039 (atexit_node): Likewise.
7040 * decl.c (destroy_local_static): New function, broken out from ...
7041 (expand_static_init): Here.
7042
7043 * rtti.c (get_tinfo_var): These should always be global
7044 (expand_si_desc): Use tree, not RTL, functions to generate code.
7045 (expand_class_desc): Likewise.
7046 (expand_ptr_desc): Likewise.
7047 (expand_attr_desc): Likewise.
7048 (expand_generic_desc): Likewise.
7049 (synthesize_tinfo_fn): Likewise.
7050
7051 1999-09-09 Mark Mitchell <mark@codesourcery.com>
7052
7053 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
7054 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
7055 RECHAIN_STMTS.
7056 (RECHAIN_STMST_FROM_CHAIN): Likewise.
7057
7058 * parse.y (simple_stmt): Fix typo in last change.
7059
7060 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
7061 (STMT_IS_FULL_EXPR_P): Likewise.
7062 (STMT_LINENO_FOR_FN_P): Likewise.
7063 (prep_stmt): New function.
7064 (building_stmt_tree): Tweak for safety.
7065 * pt.c (tsubst_expr): Use prep_stmt throughout.
7066 (add_tree): Move it to semantics.c
7067 * semantics.c (add_tree): Move it here.
7068 (finish_expr_stmt_real): New function.
7069 (finish_expr_stmt): Use it.
7070 (finish_if_stmt_cond): Use FINISH_COND.
7071 (finish_while_stmt_cond): Likewise.
7072 (finish_for_cond): Likewise.
7073 (finish_stmt_tree): Tweak line-number handling.
7074 (prep_stmt): New function.
7075 (expand_stmt): Use it.
7076
7077 * cp-tree.h (begin_switch_stmt): Adjust prototype.
7078 (finish_switch_cond): Likewise.
7079 * parse.y (simple_stmt): Adjust accordingly.
7080 * parse.c: Regenerated.
7081 * pt.c (tsubst_expr): Adjust accordingly.
7082 * semantics.c (expand_cond): New function.
7083 (FINISH_COND): New macro.
7084 (begin_switch_stmt): Build the SWITCH_STMT here.
7085 (finish_switch_stmt_cond): Not here.
7086 (expand_stmt): Adjust calls to begin_switch_stmt and
7087 finish_switch_cond. Use expand_cond throughout.
7088
7089 * dump.c (dequeue_and_dump): Dump types for constants.
7090 Describe DECL_ARG_TYPE more intuitively.
7091 Handle ARRAY_REF.
7092
7093 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
7094 (lang_cleanup_tree): Remove.
7095 * lex.c (make_lang_type): Use ggc_alloc to allocate
7096 TYPE_LANG_SPECIFIC.
7097
7098 Reorganize per-function data.
7099 * cp-tree.h (saved_scope): Add function_decl, bindings.
7100 (language_function): Rename binding_level to bindings.
7101 (cp_function_chain): Use the current_function, not the
7102 outer_function_chain.
7103 (current_class_ptr): Make it work, even when there's no
7104 current function.
7105 (current_class_ref): Likewise.
7106 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
7107 macros.
7108 (clear_temp_name): Remove.
7109 * decl.c (check_function_type): New function, broken out from
7110 start_function.
7111 (current_binding_level): Adjust definition.
7112 (pushlevel): Simplify.
7113 (poplevel): Don't use named_label_uses when we're outside
7114 a function scope.
7115 (mark_saved_scope): Mark function_decl and bindings.
7116 (maybe_push_to_top_level): Don't unconditionally push a new
7117 function context. Save bindings and the current_function_decl.
7118 Don't clear named_labels.
7119 (pop_from_top_level): Pop function context if appropriate.
7120 (init_decl_processing): Set init_lang_status and free_lang_status,
7121 rather than save_lang_status and restore_lang_status.
7122 (start_function): Take SF_* flags. Don't clear per-function data.
7123 Reorder and simplify to use new per-function data code. Add
7124 asserts.
7125 (store_parm_decls): Don't call init_function_start here.
7126 (finish_function): Adjust for new handling of per-function data.
7127 (push_cp_function_context): Simplify.
7128 (mark_cp_function_context): Change binding_level to bindings.
7129 * decl2.c (clear_temp_name): Remove.
7130 (start_objects): Use SF flags to start_function.
7131 (start_static_storage_duration_function): Likewise.
7132 * except.c (start_anon_func): Remove redundant calls to
7133 push_function_context_to. Use SF flags to start function.
7134 (end_anon_func): Remove redundant call to pop_function_context
7135 from.
7136 * lex.c (reinit_parse_for_function): Don't initialize per-function
7137 data.
7138 * method.c (emit_thunk): Clear current_function after calling
7139 assemble_end_function. Use SF flags for start_function.
7140 (synthesize_method): Use SF flags for start_function.
7141 * parse.c: Regenerated.
7142 * parse.y (fn.defpen): Likewise.
7143 (pending_inline): Clear current_function, even if something goes
7144 wrong.
7145 * pt.c (instantiate_decl): Use SF flags to start_function.
7146 Don't save and restore expanding_p.
7147 (add_tree): Handle the case where we are outside any function.
7148 (end_tree): Likewise.
7149 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
7150 * semantics.c (begin_function_definition): Likewise.
7151 (expand_body): Likewise.
7152
7153 1999-09-09 Nathan Sidwell <nathan@acm.org>
7154
7155 * cp-tree.h (convert_to_void): Prototype new function.
7156 (require_complete_type_in_void): Remove prototype.
7157 * cvt.c (convert_to_void): New function.
7158 (ocp_convert): Use convert_to_void.
7159 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
7160 expressions.
7161 * typeck.c (require_complete_type_in_void): Remove function.
7162 (build_compound_expr): Use convert_to_void.
7163 (build_static_cast): Likewise.
7164 (build_c_cast): Likewise.
7165 * semantics.c (finish_expr_stmt): Do not decay full expressions.
7166
7167 * typeck.c (build_x_compound_expr): Add FIXME.
7168
7169 1999-09-08 Mark Mitchell <mark@codesourcery.com>
7170
7171 * cp-tree.h (scratch_tree_cons): Remove.
7172 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
7173 and perm_tree_cons with plain tree_cons.
7174 * class.c: Likewise.
7175 * decl.c: Likewise.
7176 * decl2.c: Likewise.
7177 * except.c: Likewise.
7178 * expr.c: Likewise.
7179 * init.c: Likewise.
7180 * lex.c: Likewise.
7181 * method.c: Likewise.
7182 * parse.y: Likewise.
7183 * pt.c: Likewise.
7184 * repo.c: Likewise.
7185 * rtti.c: Likewise.
7186 * search.c: Likewise.
7187 * typeck.c: Likewise.
7188 * parse.c: Regenerated.
7189 * tree.c (build_srcloc): Simplify.
7190
7191 1999-09-08 Bruce Korb autogen@linuxbox.com
7192
7193 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
7194
7195 1999-09-08 Mark Mitchell <mark@codesourcery.com>
7196
7197 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
7198 Remove next.
7199 (LANG_DECL_PERMANENT): Remove.
7200 * decl.c (duplicate_decls): Don't mess about with obstacks trying
7201 to free memory.
7202 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
7203 * lex.c (free_lang_decl_chain): Remove.
7204 (build_lang_decl): Don't use obstacks.
7205 (retrofit_lang_decl): Likewise.
7206 (copy_lang_decl): Likewise.
7207
7208 * cp-tree.h (saved_scope): Remove old_binding_level and
7209 function_decl. Tidy up.
7210 * decl.c (mark_saved_scope): Don't set them.
7211 (maybe_push_to_top_level): Clear memory.
7212
7213 * decl.c (layout_var_decl): Change prototype. Don't complete
7214 types for external objects.
7215 (check_initializer): Likewise. Tidy.
7216 (initialize_local_var): Complete types here.
7217 (cp_finish_decl): Not here. Reorganize a little.
7218 (grokvardecl): Don't complete types here.
7219
7220 * decl.c (start_function): Clear last_dtor_insn and
7221 last_parm_cleanup_insn.
7222 (push_cp_function_context): Just copy over a little of
7223 the old context, not all of it.
7224
7225 * cp-tree.h (copy_to_permanent): Remove.
7226 (permanent_p): Likewise.
7227 * decl.c (building_typename_type): Don't use copy_to_permanent.
7228 (start_decl): Likewise.
7229 (grok_reference_init): Likewise.
7230 (cp_finish_decl): Likewise.
7231 * init.c (build_new_1): Don't use mapcar.
7232 (build_vec_delete_1): Don't use copy_to_permanent.
7233 (build_vec_init): Likewise.
7234 * parse.y (primary): Likewise.
7235 * parse.c: Regenerated.
7236 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
7237 (lookup_template_class): Likewise.
7238 (tsubst_friend_function): Likewise.
7239 (instantiate_class_template): Likewise.
7240 (tsubst_decl): Likewise.
7241 (tsubst): Likewise.
7242 (instantiate_template): Likewise.
7243 (unify): Likewise.
7244 * rtti.c (get_tinfo_fn): Likewise.
7245 (build_dynamic_cast): Likewise.
7246 * semantics.c (finish_if_stmt_cond): Likewise.
7247 (finish_while_stmt_cond): Likewise.
7248 (finish_do_stmt): Likewise.
7249 (finish_for_cond): Likewise.
7250 (finish_for_expr): Likewise.
7251 (finish_cleanup): Likewise.
7252 (add_decl_stmt): Likewise.
7253 (finish_named_return_value): Likewise.
7254 (finish_qualified_call_expr): Likewise.
7255 * tree.c (perm_manip): Remove.
7256 (build_exception_variant): Don't use copy_to_permanent.
7257 (permanent_p): Remove.
7258 (copy_to_permament): Remove.
7259 (build_min_nt): Don't use copy_to_permanent.
7260 (build_min): Likewise.
7261 (min_tree_cons): Likewise.
7262 * typeckc.c (build_static_cast): Likewise.
7263 (build_reinterpret_cast): Likewise.
7264 (build_const_cast): Likewise.
7265
7266 1999-09-07 Mark Mitchell <mark@codesourcery.com>
7267
7268 * decl.c (ggc_p): Set it to 1.
7269 (mark_saved_scope): Add prototype.
7270
7271 1999-09-07 Richard Henderson <rth@cygnus.com>
7272
7273 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
7274 * typeck.c (self_promoting_args_p): Delete.
7275
7276 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
7277
7278 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
7279 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
7280
7281 1999-09-07 Mark Mitchell <mark@codesourcery.com>
7282
7283 * Makefile.in (tree.o): Depend on ggc.h.
7284 * class.c (make_method_vec): Remove.
7285 (free_method_vec): Likewise.
7286 (free_method_vecs): Remove.
7287 (add_method): Don't use them.
7288 * cp-tree.def (PTRMEM_CST): Make it longer.
7289 (TEMPLATE_PARM_INDEX): Make it shorter.
7290 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
7291 (template_parm_index): Remove RTL field.
7292 (ptrmem_cst): Add RTL field.
7293 (finish_function): Removed parameter.
7294 (process_next_inline): Change prototype.
7295 (init_cplus_unsave): Rename to init_tree.
7296 (binding_init): Remove.
7297 * decl.c (free_binding_nodes): Remove.
7298 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
7299 (pop_binding): Don't use free_binding_nodes.
7300 (free_binding_vecs): Remove.
7301 (store_bindings): Don't use them.
7302 (pop_from_top_level): Likewise.
7303 (lookup_namespace_name): Simplify.
7304 (build_typename_type): Don't use obstack_free.
7305 (unqualified_namespace_lookup): Simplify.
7306 (lookup_name_real): Simplify.
7307 (start_function): Remove comment about leaks.
7308 (finish_function): Removed nested parameter. Call
7309 expand_end_bindings even when building_stmt_tree.
7310 Call ggc_push_context and ggc_pop_context around
7311 rest_of_compilation, if necessary.
7312 (mark_cp_function_context): Handle a NULL language-context.
7313 (lang_mark_false_label_stack): Fix typo.
7314 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
7315 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
7316 pointer to method types.
7317 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
7318 * decl2.c (finish_objects): Adjust call to finish_function.
7319 (finish_static_store_duration_function): Likewise.
7320 (do_nonmember_using_decl): Remove call to binding_init.
7321 * except.c (end_anon_func): Adjust call to finish_function.
7322 * lex.c (mark_impl_file_chain): New function.
7323 (init_parse): Call init_tree, not init_cplus_unsave.
7324 Add GC roots.
7325 (cp_pramga_interface): Use xmalloc, not permalloc.
7326 (cp_pragma_implementation): Likewise.
7327 (begin_definition_of_inclass_inline): Simplify.
7328 (process_next_inline): Adjust prototype.
7329 (do_scoped_id): Don't call binding_init.
7330 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
7331 * method.c (emit_thunk): Adjust call to finish_function.
7332 (synthesize_method): Likewise.
7333 * parse.y (%union): Add a new `pi' variant.
7334 (PRE_PARSED_FUNCTION_DECL): Use it.
7335 (fn.defpen): Likewise.
7336 (fndef): Adjust call to finish_function.
7337 * pt.c (instantiate_decl): Likewise.
7338 * rtti.c (syntheisze_tinfo_fn): Likewise.
7339 * semantics.c (expand_body): Likewise.
7340 * tree.c: Include ggc.h.
7341 (mark_list_hash): New function.
7342 (binding_init): Remove.
7343 (init_cplus_unsave): Rename to ...
7344 (init_tree): This. Add GC roots.
7345
7346 1999-09-05 Mark Mitchell <mark@codesourcery.com>
7347
7348 Get ready for garbage collection.
7349 * Makefile.in (CXX_TREE_H): Add varray.h
7350 (lex.o): Depend on ggc.h.
7351 (decl.o): Likewise.
7352 (decl2.o): Likewise.
7353 (method.o): Likewise.
7354 (search.o): Likewise.
7355 (pt.o): Likewise.
7356 (repo.o): Likewise.
7357 * class.c: Include ggc.h.
7358 (current_class_name): Remove.
7359 (current_class_type): Likewise.
7360 (current_access_specifier): Likewise.
7361 (previous_class_type): Likewise.
7362 (previous_class_values): Likewise.
7363 (class_cache_firstobj): Likewise.
7364 (current_lang_base): Likewise.
7365 (current_lang_stack): Likewise.
7366 (current_lang_stacksize): Likewise.
7367 (lang_name_c): Likewise.
7368 (lang_name_cplusplus): Likewise.
7369 (lang_name_java): Likewise.
7370 (current_lang_name): Likewise.
7371 (base_layout_decl): Likewise.
7372 (access_default_node): Likewise.
7373 (access_public_node): Likewise.
7374 (access_protected_node): Likewise.
7375 (access_private_node): Likewise.
7376 (access_default_virtual_node): Likewise.
7377 (access_public_virtual_node): Likewise.
7378 (access_protected_virtual_node): Likewise.
7379 (access_private_virtual_node): Likewise.
7380 (signed_zero_node): Likewise.
7381 (init_class_processing): Don't build base_layout_decl.
7382 (push_lang_context): Adjust now that current_lang_base is a varray.
7383 (pop_lang_context): Likewise.
7384 * cp-tree.h: Include varray.h.
7385 (cp_global_trees): Add access_default, access_public,
7386 access_protected, access_private, access_default_virtual,
7387 access_public_virtual, access_protected_virtual,
7388 access_private_virtual, ctor_identifier, delta2_identifier,
7389 delta_identifier, dtor_identifier, in_charge_identifier,
7390 index_identifier, nelts_identifier, this_identifier,
7391 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
7392 lang_name_c, lang_name_cplusplus, lang_name_java,
7393 empty_except_spec, null, jclass, minus_one, terminate.
7394 (saved_scope): Move here from decl.c. Define globals in terms of
7395 saved_scope: current_namespace, current_class_name,
7396 current_class_type, current_access_specifier, current_lang_stack,
7397 current_lang_base, current_lang_name, current_function_parms,
7398 current_template_parms, processing_template_decl,
7399 processing_specialization, processing_explicit_instantiation,
7400 previous_class_type, previous_class_values, class_cache_firstobj.
7401 (scope_chain): New variable.
7402 (init_pt): New function.
7403 * decl.c (current_namespace): Remove.
7404 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
7405 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
7406 (delta_identifier, delta2_identifier): Likewise.
7407 (pfn_or_delta2_identifier, tag_identifier): Likewise
7408 (vt_off_identifier, empty_except_spec, null_node): Likewise.
7409 (current_function_parms, current_lang_base): Remove.
7410 (current_lang_stack, previous_class_values): Remove.
7411 (class_binding_level): Macroize.
7412 (saved_scope): Remove.
7413 (current_saved_scope): Rename to scope_chain.
7414 (mark_saved_scope): Adjust for new scope structure.
7415 (maybe_push_to_top_level): Likewise.
7416 (pop_from_top_level): Likewise.
7417 (duplicate_decls): Adjust now that current_lang_base is a varray.
7418 (build_typename_type): Call ggc_add_tree_hash_table_root.
7419 (init_decl_processing): Call init_pt. Call push_to_top_level to
7420 set up globals. Add GC roots.
7421 (xref_basetypes): Adjust now that current_lang_base is a varray.
7422 * decl.h (this_identifier): Remove.
7423 (in_charge_identifier): Likewise.
7424 * decl2.c: Don't include varray.h.
7425 (current_namespace): Remove.
7426 (init_decl2): Add GC roots.
7427 * except.c (Terminate): Remove.
7428 (init_exception_processing): Use terminate_node instead.
7429 (build_terminate_handler): Likewise.
7430 * init.c (nc_nelts_field_id): Remove.
7431 (minus_one): Likewise.
7432 (init_init_processing): Use minus_one_node and nelts_identifier
7433 instead. Add GC roots.
7434 (jclass_node): Remove.
7435 (build_new_1): Use nelts_identifier.
7436 (build_vec_init): Likewise.
7437 (build_vec_delete): Likewise.
7438 * lex.c: Include ggc.h.
7439 (defarg_fn): Move declaration early.
7440 (defarg_parms): Likewise.
7441 (init_parse): Add GC roots.
7442 (handle_cp_pragma): Remove redundant declaration of
7443 pending_vtables.
7444 * method.c: Include ggc.h.
7445 (btypelist): Make it a varray. All uses changed.
7446 (ktypelist): Likewise.
7447 (init_method): Add GC roots.
7448 * pt.c: Don't include varray.h. Include ggc.h.
7449 (current_template_parms): Remove.
7450 (processing_template_decl): Likewise.
7451 (processing_specialization): Likewise.
7452 (processing_explicit_instantiation): Likewise.
7453 (init_pt): New function.
7454 * repo.c: Include ggc.h.
7455 (init_repo): Add GC roots.
7456 * search.c: Don't include varray.h.
7457 (_vptr_name): Remove.
7458 (lookup_field_1): Use vtpr_identifier instead.
7459 (expand_indirect_vtbls_init): Remove redundant declaration of
7460 in_charge_identifier.
7461 (init_search_processing): Use vptr_identifier.
7462
7463 1999-09-05 Richard Henderson <rth@cygnus.com>
7464 Bernd Schmidt <bernds@cygnus.co.uk>
7465 Mark Mitchell <mark@codesourcery.com>
7466
7467 * Makefile.in (parse.o): Depend on ggc.h.
7468 (decl2.o): Depend on ggc.h.
7469 (init.o): Depend on ggc.h.
7470 * cp-tree.h (init_decl2): Declare.
7471 (cp_parse_init): Likewise.
7472 * decl.c (ggc_p): Define to zero.
7473 (mark_saved_scope): New function.
7474 (init_decl_processing): Call cp_parse_init, and cp_decl2.
7475 Register GC roots.
7476 (expand_static_init): Add GC roots.
7477 * decl2.c: Include ggc.h.
7478 (init_decl2): New function.
7479 * init.c: Include ggc.h.
7480 (init_init_processing): Add GC roots.
7481 * parse.y: Include ggc.h.
7482 (cp_parse_init): New function.
7483
7484 1999-09-04 Mark Mitchell <mark@codesourcery.com>
7485
7486 * decl.c (init_decl_processing): Set mark_lang_status.
7487 (lang_mark_false_label_stack): Adjust prototype.
7488 * decl2.c (grok_function_init): Remove extraneous declaration of
7489 abort_fndecl.
7490
7491 * Make-lang.in (cc1plus): Remove dependency on GGC.
7492 * Makefile.in (OBJS): Don't mention ggc-simple.o.
7493 (OBJDEPS): Don't mention ggc-simple.o.
7494
7495 * Make-lang.in (cc1plus): Depend on $(GGC).
7496 * Makefile.in (OBJS): Add ggc-simple.o.
7497 (OBJDEPS): Likewise.
7498 * cp-tree.h (language_function): Rename members to `x_' versions;
7499 we now have x_named_labels, x_ctor_label, x_dtor_label,
7500 x_base_init_list, x_member_init_list, x_base_init_expr,
7501 x_current_class_ptr, x_current_class_ref, x_last_tree,
7502 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
7503 x_result_rtx.
7504 (dtor_label, ctor_label, current_base_init_list,
7505 current_member_init_list, base_init_expr, current_class_ptr,
7506 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
7507 * decl.c: Include ggc.h.
7508 (last_dtor_insn): Adjust to use x_ names.
7509 (last_parm_cleanup_insn): Likewise.
7510 (original_result_rtx): Likewise.
7511 (named_labels): Likewise.
7512 (mark_binding_level): New function.
7513 (mark_cp_function_context): Likewise.
7514 (mark_false_label_stack): Likewise.
7515 (lang_mark_tree): Likewise.
7516 (lang_cleanup_tree): Likewise.
7517
7518 1999-09-03 Mark Mitchell <mark@codesourcery.com>
7519
7520 * Makefile.in (CXX_TREE_H): Include function.h.
7521 (decl.o): Don't depend on function.h.
7522 (decl2.o): Likewise.
7523 (typeck.o): Likewise.
7524 (init.o): Likewise.
7525 (method.o): Likewise.
7526 * cp-tree.h: Include function.h.
7527 (cp_function): Rename to language_function. Remove next.
7528 (cp_function_chain): Make it a macro, not a variable.
7529 (push_cp_function_context): Don't declare.
7530 (pop_cp_function_context): Likewise.
7531 * decl.c: Don't include function.h.
7532 (push_cp_function_context): Make it static. Make it suitable for
7533 a save_lang_status callback.
7534 (pop_cp_function_context): Likewise.
7535 (maybe_push_to_top_level): Call push_function_context_to, not
7536 push_cp_function_context.
7537 (pop_from_top_level): Call pop_function_context_from, not
7538 pop_cp_function_context.
7539 (init_decl_processing): Set save_lang_status and
7540 restore_lang_status. Call push_function_context_to, not
7541 push_cp_function_context.
7542 (cp_function_chain): Remove.
7543 * decl2.c: Don't include function.h.
7544 * except.c: Don't include function.h.
7545 (start_anon_func): Call push_function_context_to, not
7546 push_cp_function_context.
7547 (end_anon_func): Call pop_function_context_from, not
7548 pop_cp_function_context.
7549 * init.c: Don't include function.h.
7550 * lex.c (begin_definition_of_inclass_inline): Call
7551 push_function_context_to, not push_cp_function_context.
7552 (process_next_inline): Call pop_function_context_from, not
7553 pop_cp_function_context.
7554 * method.c: Don't include function.h.
7555 (synthesize_method): Call push_function_context_to, not
7556 push_cp_function_context. Call pop_function_context_from, not
7557 pop_cp_function_context.
7558 * typeck.c: Don't include function.h.
7559
7560 * decl.c (expand_static_init): Tweak handling of static
7561 initializations for objects without constructors.
7562
7563 1999-09-03 Nathan Sidwell <nathan@acm.org>
7564
7565 * typeck.c (build_indirect_ref): Reject dereference of pointer to
7566 void.
7567
7568 1999-09-02 Mark Mitchell <mark@codesourcery.com>
7569
7570 * cp-tree.h (cp_function): Move here, from decl.c.
7571 (cp_function_chain): Declare.
7572 (dtor_label): New macro, instead of variable.
7573 (ctor_label): Likewise.
7574 (current_base_init_list): Likewise.
7575 (current_member_init_list): Likewise.
7576 (base_init_expr): Likewise.
7577 (current_class_ptr): Likewise.
7578 (current_class_ref): Likewise.
7579 (last_tree): Likewise.
7580 (last_expr_type): Likewise.
7581 (current_function_returns_value): Likewise.
7582 (current_function_returns_null): Likewise.
7583 (current_function_just_assigned_this): Likewise.
7584 (current_function_parms_stored): Likewise.
7585 (temp_name_counter): Likewise.
7586 (static_labelno): Likewise.
7587 (expanding_p): Likewise.
7588 (stmts_are_full_exprs_p): Likewise.
7589 (in_function_try_handler): Likewise.
7590 (lang_type): Remove nested type_flags. All uses changed.
7591 * call.c (ctor_label): Remove.
7592 (dtor_label): Likewise.
7593 * class.c (current_class_ptr): Remove.
7594 (current_class_ref): Likewise.
7595 * decl.c (static_labelno): Remove.
7596 (dtor_label): Likewise.
7597 (last_dtor_insn): New macro, instead of variable.
7598 (last_parm_cleanup_insn): Likewise.
7599 (original_result_rtx): Likewise.
7600 (in_function_try_handler): Remove.
7601 (named_label_uses): New macro, instead of variable.
7602 (named_labels): Likewise.
7603 (current_function_returns_value): Remove.
7604 (current_function_returns_null): Likewise.
7605 (current_function_assigns_this): New macro, instead of variable.
7606 (current_function_just_assigned_this): Likewise.
7607 (current_binding_level): Likewise.
7608 (init_decl_processing): Call push_cp_function_context.
7609 (cp_function): Move to cp-tree.h
7610 (cp_function_chain): Make it global.
7611 (temp_name_counter): Remove.
7612 (push_cp_function_context): Simplify.
7613 (pop_cp_function_context): Likewise.
7614 * decl2.c (temp_name_counter): Remove.
7615 * init_c (current_base_init_list): Likewise.
7616 (current_member_init_list): Likewise.
7617 (base_init_expr): Likewise.
7618 * method.c (static_labelno): Likewise.
7619 * pt.c (last_tree): Likewise.
7620 * semantics.c (expanding_p): Likewise.
7621 (stmts_are_full_exprs_p): Likewise.
7622 (last_expr_type): Likewise.
7623 * typeck.c (dtor_label): Likewise.
7624 (ctor_label): Likewise.
7625
7626 1999-09-01 Alex Samuel <samuel@codesourcery.com>
7627
7628 * decl2.c (arg_assoc_template_arg): New prototype. New function.
7629 (arg_assoc_class): Use arg_assoc_template_arg for template
7630 arguments.
7631 (arg_assoc): Likewise.
7632 * pt.c (mangle_class_name_for_template): Allow member template
7633 template arguments.
7634
7635 1999-09-02 Nathan Sidwell <nathan@acm.org>
7636
7637 * call.c (build_conditional_expr): Warn on enum mismatches.
7638 (convert_arg_to_ellipsis): Move non-pod check to after
7639 conversion.
7640
7641 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7642
7643 * gxx.gperf (hash, is_reserved_word): Add prototypes.
7644
7645 * init.c (build_vec_init): Initialize variable `try_block'.
7646
7647 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
7648 Likewise for bzero/memset.
7649 (token_getch, token_put_back): Add static prototypes. Remove
7650 `inline' from the definitions.
7651 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
7652
7653 1999-09-01 Mark Mitchell <mark@codesourcery.com>
7654
7655 * cp-tree.h (lang_type): Move align into type_flags.
7656 (CLASSTYPE_ALIGN): Adjust accordingly.
7657 * call.c (direct_reference_binding): Remove misleading comment.
7658
7659 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7660
7661 * parse.y (language_string): Constify.
7662
7663 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7664
7665 * repo.c (getpwd): Don't prototype.
7666 * xref.c (getpwd): Likewise
7667
7668 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7669
7670 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
7671 Remove hacks for stuff which now comes from libiberty.
7672
7673 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
7674
7675 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
7676
7677 1999-08-30 Mark Mitchell <mark@codesourcery.com>
7678
7679 * cp-tree.h (begin_init_stmts): Declare.
7680 (finish_init_stmts): Likewise.
7681 * cvt.c (build_up_reference): Wrap the declaration of a temporary
7682 in a statement-expression so that we will see it when expanding
7683 tree structure later.
7684 * init.c (begin_init_stmts): Don't make it static.
7685 (finish_init_stmts): Likewise.
7686
7687 * cp-tree.h (start_handler_parms): New function.
7688 (expand_start_catch_block): Take only one parameter.
7689 (start_handler_parms): New function.
7690 * decl.c (start_handler_parms): Define it.
7691 * except.c (process_start_catch_block): Take only one parameter.
7692 Don't call grokdeclarator here.
7693 (expand_start_catch_block): Don't call grokdeclarator here,
7694 either.
7695 * parse.y (handler_args): Adjust call to
7696 expand_start_catch_block. Use start_handler_parms.
7697 * pt.c (push_template_decl_real): Make permanent lists have
7698 permanent elements.
7699 (tsubst_expr): Adjust calls to expand_start_catch_block
7700 appropriately.
7701 * semantics.c (expand_stmt): Likewise.
7702
7703 1999-08-29 Alex Samuel <samuel@codesourcery.com>
7704
7705 * pt.c (push_template_decl_real): Use template declaration from
7706 class type if it exists.
7707
7708 1999-08-29 Mark Mitchell <mark@codesourcery.com>
7709
7710 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
7711 (maybe_inject_for_scope_var): Declare it.
7712 (initialize_local_var): Likewise.
7713 * decl.c (maybe_inject_for_scope_var): Make it global.
7714 (initialize_local_var): Likewise. Move cleanup handling here,
7715 from cp_finish_decl.
7716 (make_rtl_for_nonlocal_decl): Use
7717 push_obstacks_nochange/pop_obstacks, rather than
7718 end_temporary_allocation/resume_temporary_allocation.
7719 (cp_finish_decl): Try to complete the type of a variable when it
7720 is declared. Move cleanup-handling to initialize_local_var.
7721 (expand_static_init): Use tree-building code, rather than
7722 RTL-building code.
7723 * decl2.c (get_temp_name): Assert non-initializedness of
7724 temporaries.
7725 * init.c (create_temporary_var): Move RTL-assigning code to ...
7726 (get_temp_regvar): Here.
7727 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
7728 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
7729 call initialize_local_var to generate initialization code.
7730
7731 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7732
7733 * cp-tree.h (fndecl_as_string, type_as_string,
7734 type_as_string_real, args_as_string, decl_as_string,
7735 expr_as_string, code_as_string, language_as_string,
7736 parm_as_string, op_as_string, assop_as_string, cv_as_string,
7737 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
7738
7739 * errfn.c (cp_printer): Likewise.
7740
7741 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
7742 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
7743 cp_file_of, code_as_string, language_as_string, parm_as_string,
7744 op_as_string, assop_as_string, args_as_string, cv_as_string):
7745 Likewise.
7746
7747 * tree.c (lang_printable_name): Likewise.
7748
7749 1999-08-28 Richard Henderson <rth@cygnus.com>
7750
7751 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
7752
7753 1999-08-28 Mark Mitchell <mark@codesourcery.com>
7754
7755 * cp-tree.h (strip_array_types): New function.
7756 * decl.c (maybe_deduce_size_from_array_init): New function, split
7757 out from cp_finish_decl.
7758 (layout_var_decl): Likewise.
7759 (maybe_commonize_var): Likewise.
7760 (maybe_inject_for_scope_var): Likewise.
7761 (initialize_local_var): Likewise.
7762 (build_cleanup_on_safe_obstack): Likewise.
7763 (check_initializer): Likewise.
7764 (make_rtl_for_nonlocal_decl): Likewise.
7765 (cp_finish_decl): Use them.
7766 * typeck.c (strip_array_types): New function.
7767
7768 * cp-tree.def (LABEL_STMT): New tree node.
7769 * cp-tree.h (LABEL_STMT_LABEL): New macro.
7770 (shadow_label): Remove.
7771 (declare_local_label): New function.
7772 (finish_label_decl): Likewise.
7773 * decl.c (make_label_decl): New function, split out from
7774 lookup_label.
7775 (shadowed_labels): Remove.
7776 (binding_level): Add shadowed_labels.
7777 (clear_binding_level): Remove.
7778 (push_binding_level): Just bzero the new binding level.
7779 (pushlevel): Fix indentation.
7780 (pop_label): New function.
7781 (pop_labels): Likewise, split out from poplevel.
7782 (poplevel): Pop local labels. Use pop_labels.
7783 (maybe_push_to_top_level): Don't clear shadowed_labels.
7784 (lookup_label): Use make_label_decl.
7785 (shadow_label): Remove.
7786 (declare_local_label): New function.
7787 (define_label): Simplify.
7788 (start_function): Don't clear shadowed_labels.
7789 (cp_function): Remove shadowed_labels.
7790 (push_cp_function_context): Don't save shadowed_labels.
7791 (pop_cp_function_context): Don't restore it.
7792 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
7793 * parse.y (label_decl): Use finish_label_decl.
7794 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
7795 declarations.
7796 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
7797 building_stmt_tree.
7798 (finish_label_decl): New function.
7799 (expand_stmt): Handle LABEL_STMTs and local label declarations.
7800
7801 1999-08-26 Mark Mitchell <mark@codesourcery.com>
7802
7803 * decl.c (lookup_label): Build labels on the permanent obstack
7804 when building statement trees. Don't build RTL for labels when
7805 building statement trees.
7806 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
7807 building statement trees.
7808 (finish_label_stmt): Likewise.
7809 (expand_stmt): Adjust accordingly.
7810 * pt.c (tsubst_expr); Likewise.
7811 (do_decl_instantiation): Robustify.
7812
7813 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
7814 * tree.c (build_cplus_new): Set it.
7815 * expr.c (cplus_expand_expr): Use it.
7816 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
7817
7818 * decl.c (store_parm_decls): Reset immediate_size_expand.
7819 (finish_function): Likewise.
7820
7821 * tree.c (cplus_unsave_expr_now): Don't return a value.
7822
7823 * semantics.c (do_poplevel): Always initialize the return value.
7824
7825 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
7826
7827 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
7828 * tree.h (cplus_unsave_expr_now) : Same.
7829
7830 1999-08-25 Mark Mitchell <mark@codesourcery.com>
7831
7832 * decl.c (grokdeclarator): Amend comment.
7833 * except.c (expand_start_catch_block): Call push_template_decl for
7834 catch-block parameters.
7835 * method.c (synthesize_method): Build an empty compound statement
7836 for the body of a constructor.
7837
7838 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
7839
7840 * tree.c (cp_build_qualified_type_real): If we're asking for the
7841 same quals we already have, just return.
7842
7843 1999-08-25 Mark Mitchell <mark@codesourcery.com>
7844
7845 * cp-tree.def (SUBOBJECT): New tree node.
7846 * cp-tree.h (CLEANUP_P): New macro.
7847 (SUBOBJECT_CLEANUP): Likewise.
7848 (keep_next_level): Add parameter.
7849 (get_temp_regvar): Don't declare.
7850 (emit_base_init): Remove parameter.
7851 (expand_aggr_init): Rename to build_aggr_init.
7852 (expand_vec_init): Rename to build_vec_init.
7853 (do_pushlevel): Remove.
7854 (do_poplevel): Likewise.
7855 (finish_cleanup): New function.
7856 (finish_subobject): Likewise.
7857 (stmts_are_full_exprs_p): New variable.
7858 * decl.c (keep_next_level): Add parameter.
7859 (cp_finish_decl): Use build_aggr_init, not
7860 expand_aggr_init. Use finish_expr_stmt to expand the code.
7861 (expand_static_init): Use tree-generating, not RTL-generating,
7862 functions to handle the initialization.
7863 (start_function): Remove dead code. Always have a momentary
7864 obstack inside the function, even before hitting the first curly
7865 brace.
7866 (cplus_expand_expr_stmt): Move calls to
7867 expand_{start,end}_target_temps into semantics.c.
7868 (cp_function): Add stmts_are_full_exprs_p.
7869 (push_cp_function_context): Save it.
7870 (pop_cp_function_context): Restore it.
7871 * decl2.c (get_temp_regvar): Move to init.c.
7872 (do_static_initialization): Use build_{aggr,vec}_init.
7873 (do_static_destruction): Fix typo in comment.
7874 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
7875 * except.c (expand_throw): Use create_temporary_var.
7876 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
7877 * init.c (expand_vec_init_try_block): Remove.
7878 (expand_vec_init_catch_clause): Likewise.
7879 (get_temp_regvar): New function.
7880 (begin_init_stmts): Likewise.
7881 (finish_init_stmts): Likewise.
7882 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
7883 structure here.
7884 (emit_base_init): Likewise. Remove unused parameter.
7885 (expand_virtual_init): Likewise.
7886 (expand_cleanup_for_base): Use finish_subobject.
7887 (expand_aggr_vbase_init_1): Simplify.
7888 (construct_virtual_bases): Use tree-generating functions to build
7889 up initialization.
7890 (expand_aggr_init): Likewise. Rename to build_aggr_init.
7891 (expand_default_init): Likewise.
7892 (expand_aggr_init_1): Likewise.
7893 (expand_vec_init): Rename to build_vec_init.
7894 * method.c (do_build_copy_constructor): Use tree-generating
7895 functions. Don't call clear_last_expr.
7896 (do_build_assign_ref): Likewise.
7897 (synthesize_method): Call clear_last_expr here.
7898 * parse.y (base_init): Don't call clear_last_expr here.
7899 (nodecls): Likewise.
7900 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
7901 * semantics.c (do_pushlevel): Move to here.
7902 (do_poplevel): Likewise.
7903 (stmts_are_full_exprs_p): New variable.
7904 (finish_expr_stmt): Handle logic for temoprary cleanup here.
7905 (finish_for_stmt): Use finish_expr_stmt.
7906 (finish_cleanup): New function.
7907 (finish_function_try_block): Fix indentation.
7908 (finish_subobject): New function.
7909 (setup_vtbl_ptr): Call keep_next_level here.
7910 (finish_stmt_expr): Handle a block with no scope inside the
7911 statement-expression.
7912 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
7913 SUBOBJECT.
7914 * tree.c (search_tree): Handle INIT_EXPR.
7915 (mapcar): Likewise.
7916 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
7917 * typeck2.c (store_init_value): Change expand_aggr_init to
7918 build_aggr_init in comment.
7919
7920 1999-08-25 Mark Mitchell <mark@codesourcery.com>
7921
7922 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
7923
7924 1999-08-25 Nathan Sidwell <nathan@acm.org>
7925
7926 * decl2.c (handle_class_head): Be graceful about additional
7927 scope qualifiers. Adjust comments to reflect reality.
7928
7929 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
7930
7931 * call.c (build_conditional_expr): Fix typo.
7932 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
7933 lvalue before trying to mess with the sides.
7934
7935 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
7936
7937 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
7938
7939 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
7940
7941 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
7942
7943 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
7944 Return arbitrary pointer or NULL.
7945 (check_eh_spec): Call __throw_type_match_rtti_2.
7946 * tinfo.h (*::dcast): Return int. Add valp parm.
7947 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
7948 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
7949 (__throw_type_match_rtti): Now just a wrapper.
7950
7951 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
7952 (init_exception_processing): Don't initialize them.
7953
7954 1999-08-23 Paul Burchard <burchard@pobox.com>
7955
7956 * decl.c (check_default_argument): Fix typo.
7957
7958 1999-08-22 Mark Mitchell <mark@codesourcery.com>
7959
7960 * cp-tree.def (STMT_EXPR): Fix typo in node name.
7961
7962 * dump.c (dump_next_stmt): New function.
7963 (dequeue_and_dump): Use it.
7964
7965 * pt.c (tsubst_copy): Make sure to initialize return value for a
7966 STMT_EXPR, even when processing_template_decl.
7967 * semantics.c (finish_stmt_expr): A statement-expression whose
7968 last statement is not an expression-statement has type `void'.
7969
7970 1999-08-20 Mark Mitchell <mark@codesourcery.com>
7971
7972 * semantics.c (finish_stmt_expr): Fix typo in comment.
7973 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
7974 (mapcar): Likewise.
7975 * init.c (build_vec_delete_1): Make the children of a permanent
7976 BIND_EXPR permanent.
7977 * pt.c (register_specialization): Don't register a specialization
7978 more than once.
7979
7980 1999-08-18 Andrew Haley <aph@cygnus.com>
7981
7982 * method.c (process_overload_item): Call build_mangled_C9x_name ()
7983 for all integer parameter types larger than long long.
7984
7985 1999-08-19 Mark Mitchell <mark@codesourcery.com>
7986
7987 * pt.c (redeclare_class_template): Merge default template
7988 arguments in both directions.
7989
7990 * typeck.c (common_type): Undo 1999-08-18 change. Remove
7991 compiler_error message.
7992
7993 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
7994
7995 * cp-tree.h: Declare flag_use_repository.
7996 * pt.c (do_decl_instantiation): Don't complain about duplicate
7997 instantiation with -frepo.
7998 (do_type_instantiation): Likewise.
7999
8000 * pt.c (push_template_decl_real): Complain about everything
8001 that isn't a valid template.
8002
8003 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
8004 affect inlines.
8005
8006 1999-08-19 Mark Mitchell <mark@codesourcery.com>
8007
8008 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
8009 * decl2.c (build_expr_from_tree): Handle it.
8010 * error.c (dump_expr): Likewise.
8011 * pt.c (for_each_template_parm): Likewise.
8012 (tsubst_copy): Likewise.
8013 * tree.c (search_tree): Likewise.
8014 * semantics.c (finish_pseudo_destructor_call): Create it.
8015
8016 1999-08-18 Mark Mitchell <mark@codesourcery.com>
8017
8018 * search.c (setup_class_bindings): Robustify.
8019 * typeck.c (common_type): Use same_type_p, not pointer equality,
8020 to compare types.
8021
8022 * cp-tree.h (build_lang_field_decl): Remove.
8023 * class.c (build_vtable): Replace calls to build_lang_field_decl
8024 with build_lang_decl.
8025 (prepare_fresh_vtable): Likewise.
8026 (finish_struct_1): Likewise.
8027 (init_class_processing): Likewise.
8028 * decl.c (push_using_decl): Likewise.
8029 (init_decl_processsing): Likewise.
8030 (grokvardecl): Likewise.
8031 (build_ptrmemfunc_type): Likewise.
8032 (grokdeclarator): Likewise.
8033 (build_enumerator): Likewise.
8034 * decl2.c (grok_x_components): Likewise.
8035 (do_class_using_decl): Likewise.
8036 * except.c (call_eh_info): Likewise.
8037 * init.c (init_init_processing): Likewise.
8038 * rtti.c (expand_class_decl): Likewise.
8039 * tree.c (build_base_fields): Likewise.
8040 (build_vbase_pointer_fields): Likewise.
8041 * lex.c (build_lang_decl): Build declarations on the permanent
8042 obstack if we're building statmeent trees.
8043 (retrofit_lang_decl): Handle both the full lang_decl and also the
8044 smaller lang_decl_flags here.
8045 (build_lang_field_decl): Remove.
8046 * pt.c (push_template_decl_real): Issue errors for variable
8047 declarations that are not static members.
8048
8049 1999-08-18 Richard Henderson <rth@cygnus.com>
8050
8051 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
8052 (mapcar): Likewise.
8053
8054 1999-08-17 Mark Mitchell <mark@codesourcery.com>
8055
8056 * cp-tree.h (back_end_hook): New variable.
8057 * decl2.c (back_end_hook): Define it.
8058 (finish_file): If it's non-NULL, call it.
8059
8060 * decl.c (add_decl_to_level): New function.
8061 (push_local_binding): Use it.
8062 (find_binding): Fix typo in comment.
8063 (pushdecl): Use add_decl_to_level. Put templates on the
8064 corresponding namespace-scope binding levels.
8065 * dump.c (dequeue_and_dump): Print the specializations of a
8066 template.
8067 * pt.c (push_template_decl_real): Don't push a template multiple
8068 times.
8069
8070 1999-08-17 Mark Mitchell <mark@codesourcery.com>
8071
8072 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
8073 (CALL_DECLARATOR_QUALS): Likewise.
8074 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
8075 * decl.c (grokdeclarator): Adjust to use them.
8076 * decl2.c (grokfield): Likewise.
8077 (reparse_absdcl_as_casts): Likewise.
8078 * lex.c (make_call_declarator): Likewise.
8079 (set_quals_and_spec): Likewise.
8080 * pt.c (tsubst): Likewise.
8081 * tree.c (mapcar): Remove special hack to handle third operand of
8082 a CALL_EXPR.
8083
8084 1999-08-16 Mark Mitchell <mark@codesourcery.com>
8085
8086 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
8087 * class.c (build_vtable): Use build_lang_field_decl to build the
8088 VAR_DECLs for vtables.
8089 (prepare_fresh_vtable): Likewise.
8090 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
8091 CAN_HAVE_FULL_LANG_DECL_P.
8092 (push_using_decl): Use build_lang_decl to build USING_DECLs.
8093 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
8094 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
8095 (build_lang_field_decl): Likewise.
8096 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
8097 to copy.
8098
8099 * cp-tree.def (STMT_EXPR): New tree node.
8100 * cp-tree.h (STMT_EXPR_STMT): New macro.
8101 (store_return_init): Change prototype.
8102 (finish_named_return_value): New function.
8103 (expand_stmt): Likewise.
8104 (expand_body): Likewise.
8105 (begin_stmt_tree): Likewise.
8106 (finish_stmt_tree): Likewise.
8107 (expanding_p): New variable.
8108 (last_expr_type): Likewise.
8109 (building_stmt_tree): New macro.
8110 * decl.c (start_function): Use building_stmt_tree, not
8111 processing_template_decl, where appropriate.
8112 (store_parm_decls): Likewise.
8113 (store_return_init): Move most of the body to semantics.c.
8114 (finish_function): Use building_stmt_tree.
8115 (finish_stmt): Clear last_expr_type here.
8116 (cp_function): Add expanding_p, last_tree, last_expr_type.
8117 (push_cp_function_context): Save them.
8118 (pop_cp_function_context): Restore them.
8119 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
8120 * error.c (dump_expr): Handle STMT_EXPR.
8121 * except.c (expand_start_catch_block): Use building_stmt_tree.
8122 Use add_decl_stmt.
8123 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
8124 (do_case): Move add_tree call to semantics.c.
8125 * parse.y (return_init): Use finish_named_return_value.
8126 (for.init.statement): Use finish_expr_stmt.
8127 * parse.c: Regenerated.
8128 * pt.c (do_pushlevel): Move to semantics.c.
8129 (do_poplevel): Likewise.
8130 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
8131 (tsubst_expr): Don't expand all the way to RTL here. Handle
8132 RETURN_INIT and CTOR_INITIALIZER.
8133 (instantiate_decl): Call expand_body after tsubst'ing into
8134 DECL_SAVED_TREE.
8135 * semantics.c (expand_stmts): New function.
8136 (expanding_p): New variable.
8137 (last_expr_type): Likewise.
8138 (finish_expr_stmt): Use building_stmt_tree.
8139 (begin_if_stmt): Likewise.
8140 (finish_if_stmt_cond): Likewise.
8141 (finish_then_clause): Likewise.
8142 (begin_else_clause): Likewise.
8143 (finish_else_clause): Likewise.
8144 (begin_while_stmt): Likewise.
8145 (finish_while_stmt_cond): Likewise.
8146 (finish_while_stmt): Likewise.
8147 (finish_do_body): Likewise.
8148 (finish_do_stmt): Likewise.
8149 (finish_return_stmt): Likewise.
8150 (begin_for_stmt): Likewise.
8151 (fnish_for_init_stmt): Likewise.
8152 (finish_for_cond): Likewise.
8153 (finish_for_expr): Likewise.
8154 (finish_for_stmt): Likewise.
8155 (finish_break_stmt): Likewise.
8156 (finish_continue_stmt): Likewise.
8157 (finish_switch_cond): Likewise.
8158 (finish_switch_stmt): Likewise.
8159 (finish_case_label): Call add_tree here if necessary.
8160 (finish_goto_statement): Use building_stmt_tree.
8161 (begin_try_block): Likewise.
8162 (begin_function_try_block): Likewise.
8163 (finish_try_block): Likewise.
8164 (finish_function_try_block): Likewise.
8165 (finish_handler_sequence): Likewise.
8166 (finish_function_handler_sequence): Likewise.
8167 (begin_handler): Likewise.
8168 (finish_handler_parms): Likewise.
8169 (finish_handler): Likewise.
8170 (begin_compound_stmt): Likewise.
8171 (finish_compound_stmt): Likewise.
8172 (finish_asm_stmt): Likewise.
8173 (finish_label_stmt): Likewise.
8174 (finish_named_return_value): New function.
8175 (setup_vtbl_ptr): Moved here from decl2.c.
8176 (do_pushlevel): Moved here from pt.c.
8177 (do_poplevel): Likewise.
8178 (begin_stmt_expr): Use building_stmt_tree.
8179 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
8180 when building_stmt_tree.
8181 (begin_stmt_tree): New function.
8182 (finish_stmt_tree): Likewise.
8183 (expand_stmt): Likewise.
8184 (expand_body): Likewise.
8185 * tree.c (build_cplus_method_type): Make sure the argument types
8186 end up on the same obstack as the METHOD_TYPE.
8187 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
8188 THROW_EXPR, STMT_EXPR.
8189 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
8190 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
8191 sorry, if an unsupported node is encountered.
8192 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
8193 (c_expand_return): Don't call add_tree here.
8194
8195 1999-08-15 Mark Mitchell <mark@codesourcery.com>
8196
8197 * pt.c (check_default_tmpl_args): Don't check in local scopes.
8198 (tsubst_decl): Make sure the declaration is on a saveable
8199 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
8200 variable.
8201 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
8202
8203 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
8204
8205 Speed up Koenig lookup.
8206 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
8207 to return namespaces we've looked at.
8208 * decl2.c (lookup_using_namespace): Likewise.
8209 (add_function): Don't call ovl_member.
8210 (lookup_arg_dependent): Initialize k.namespaces to the list of
8211 namespaces seen in unqualified lookup.
8212 * call.c (equal_functions): Move here from tree.c.
8213 (joust): Use it to handle duplicate candidates.
8214 * tree.c (ovl_member): Use ==.
8215
8216 1999-08-13 Mark Mitchell <mark@codesourcery.com>
8217
8218 * cp-tree.def (DECL_STMT): Make it smaller.
8219 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
8220 (lang_decl): ... here. Add next.
8221 (DECL_SAVED_TREE): Adjust accordingly.
8222 (DECL_IMPLICIT_TYPEDEF_P): New macro.
8223 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
8224 (DECL_STMT_DECL): Likewise.
8225 (create_implicit_typedef): New function.
8226 (maybe_push_decl): Likewise.
8227 (tsubst_default_argument): New function.
8228 (at_function_scope_p): Likewise.
8229 (add_decl_stmt): Likewise.
8230 (push_permanent_obstack): Likewise.
8231 * call.c (convert_default_arg): Use tsubst_default_argument.
8232 * class.c (add_method): Use push_permanent_obstack.
8233 (build_self_reference): Create a TEMPLATE_DECL for the
8234 self-reference, if necessary.
8235 * decl.c (pseudo_global_level_p): Only look at the current binding
8236 level.
8237 (push_binding): Use push_permanent_obstack.
8238 (create_implicit_typedef): New function.
8239 (pushtag): Use it.
8240 (duplicate_decls): Use push_permanent_obstack.
8241 (maybe_push_decl): New function.
8242 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
8243 (start_decl_1): Remove dead code.
8244 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
8245 pseudo_global_level_p.
8246 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
8247 template.
8248 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
8249 pseudo_global_level_p.
8250 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
8251 a template.
8252 (get_sentry): Use push_permanent_obstack.
8253 * dump.c (dequeue_and_dump): Enable DECL_STMT.
8254 * except.c (call_eh_info): Use push_permanent_obstack.
8255 (build_eh_type_ref): Likewise.
8256 (do_pop_exception): Likewise.
8257 (expand_eh_spec): Likewise.
8258 (alloc_eh_object): Likewise.
8259 (expand_throw): Likewise.
8260 * init.c (build_java_class_ref): Likewise.
8261 * lex.c (get_time_identifier): Likewise.
8262 (free_lang_decl_chain): Correct type.
8263 (retrofit_lang_decl): Adjust accordingly.
8264 (build_lang_field_decl): Likewise.
8265 * lex.h (free_lang_decl_chain): Likewise.
8266 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
8267 * parse.c: Regenerated.
8268 * pt.c (tsubst_default_arguments): New function.
8269 (retrieve_local_specialization): Likewise.
8270 (register_local_specialization): Likewise.
8271 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
8272 pseudo_global_level_p to determine whether or not a template is
8273 primary.
8274 (lookup_template_class): Likewise. Use create_implicit_typedef.
8275 (instantiate_class_template): Call tsubst_default_arguments for
8276 member functions, if appropriate.
8277 (tsubst_default_argument): New function.
8278 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
8279 * search.c (at_function_scope_p): New function.
8280 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
8281 (finish_label_stmt): Likewise.
8282 (add_decl_stmt): New function.
8283 (begin_class_definition): Likewise.
8284 (finish_typeof): Likewise.
8285 * tree.c (copy_template_template_parm): Likewise.
8286 (copy_to_permanent): Likewise.
8287 (push_permanent_obstack): Define.
8288 (mark_addressable): Use it.
8289 * typeck.c (mark_addressable): Likewise.
8290
8291 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
8292
8293 * cp-tree.h (init_cplus_unsave): New.
8294 (cplus_unsave_expr_now): New.
8295 * lex.c (init_parse): Call init_cplus_unsave.
8296 * tree.c (init_cplus_unsave): New.
8297 (cplus_unsave_expr_now): New.
8298
8299 1999-08-13 Mark Mitchell <mark@codesourcery.com>
8300
8301 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
8302 decl_constant_value to simplify array bounds.
8303
8304 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
8305
8306 * lang-options.h: Add -fms-extensions.
8307 * cp-tree.h: Declare flag_ms_extensions.
8308 * decl2.c: Define it.
8309 * class.c (instantiate_type): Don't complain about taking the address
8310 of a bound member function if -fms-extensions.
8311 * typeck.c (build_unary_op): Likewise.
8312 * decl.c (grokdeclarator): Or about implicit int.
8313 * init.c (resolve_offset_ref): Or about implicit '&'.
8314
8315 1999-08-11 Mark Mitchell <mark@codesourcery.com>
8316
8317 * cp-tree.h (minimal_parse_mode): Remove.
8318 (finish_label_stmt): New function.
8319 * decl.c (saved_scope): Remove minimal parse mode.
8320 (maybe_push_to_top_level): Don't save it.
8321 (pop_from_top_level): Don't restore it.
8322 (define_label): Split out template-handling code to semantics.c.
8323 (start_decl): Don't use minimal_parse_mode.
8324 (cp_finish_decl): Likewise.
8325 (start_function): Don't increment it.
8326 (store_return_init): Don't use it.
8327 (finish_function): Don't decrement it.
8328 * parse.y (label_colon): Use finish_label_stmt throughout.
8329 * parse.c: Regenerated.
8330 * pt.c (minimal_parse_mode): Don't define it.
8331 (tsubst_expr): Use finish_label_stmt.
8332 * semantics.c (finish_label_stmt): New function.
8333
8334 * dump.c (queue): Be careful when computing bitmasks.
8335 (dequeue_and_dump): Describe binfos as binfos, not as
8336 vectors.
8337
8338 * parse.y (pedantic): Give it itype. Adjust usage accordingly
8339 throughout.
8340 * parse.c: Regenerated.
8341
8342 * Make-lang.in (CXX_SRCS): Remove sig.c.
8343 * Makefile.in (CXX_OBJS): Remove sig.o.
8344 (sig.o): Remove.
8345 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
8346 (CPTI_SIGNATURE_TYPE): Likewise.
8347 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
8348 (opaque_type_node): Likewise.
8349 (signature_type_node): Likewise.
8350 (sigtable_entry_type): Likewise.
8351 (flag_handle_signatures): Likewise.
8352 (lang_type): Remove is_signature, is_signature_pointer,
8353 is_signature_reference, has_opaque_typedecls,
8354 sigtables_has_been_generated. Adjust dummy. Remove signature,
8355 signature_pointer_to, signature_reference_to.
8356 (IS_SIGNATURE): Remove.
8357 (SET_SIGNATURE): Remove.
8358 (CLEAR_SIGNATURE): Remove.
8359 (IS_SIGNATURE_POINTER): Remove.
8360 (IS_SIGNATURE_REFERENCE): Remove.
8361 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
8362 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
8363 (CLASSTYPE_SIGNATURE): Remove.
8364 (SIGNATURE_TYPE): Remove.
8365 (SIGNATURE_METHOD_VEC): Remove.
8366 (SIGNATURE_POINTER_TO): Remove.
8367 (SIGNATURE_REFERENCE_TO): Remove.
8368 (lang_decl_flags): Remove is_default_implementation. Rename
8369 memfunc_pointer_to to saved_tree.
8370 (IS_DEFAULT_IMPLEMENTATION): Remove.
8371 (DECL_MEMFUNC_POINTER_TO): Remove.
8372 (DECL_MEMFUNC_POINTING_TO): Remove.
8373 (DECL_SAVED_TREE): Adjust definition.
8374 (tag_types): Remove signature_type_node.
8375 (SIGNATURE_FIELD_NAME): Remove.
8376 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
8377 (SIGNATURE_OPTR_NAME): Likewise.
8378 (SIGNATURE_SPTR_NAME): Likewise.
8379 (SIGNATURE_POINTER_NAME): Likewise.
8380 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
8381 (SIGNATURE_REFERENCE_NAME): Likewise.
8382 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
8383 (SIGTABLE_PTR_TYPE): Likewise.
8384 (SIGTABLE_NAME_FORMAT): Likewise.
8385 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
8386 (SIGTABLE_TAG_NAME): Likewise.
8387 (SIGTABLE_VB_OFF_NAME): Likewise.
8388 (SIGTABLE_VT_OFF_NAME): Likewise.
8389 (finish_base_specifiers): Change prototype.
8390 (build_signature_pointer_type): Remove.
8391 (build_signature_reference_type): Remove.
8392 (build_signature_pointer_constructor): Remove.
8393 (build_signature_method_call): Remove.
8394 (build_optr_ref): Likewise.
8395 (append_signature_fields): Likewise.
8396 (signature_error): Likewise.
8397 * call.c (build_this): Remove signature support.
8398 (build_over_call): Likewise.
8399 (build_new_method_call): Likewise.
8400 * class.c (add_implicitly_declared_members): Likewise.
8401 (finish_struct_1): Likewise.
8402 (finish_struct): Likewise.
8403 * cvt.c (cp_convert_to_pointer): Likewise.
8404 (convert_to_pointer_force): Likewise.
8405 (ocp_convert): Likewise.
8406 * decl.c (sigtable_decl_p): Remove.
8407 (init_decl_processing): Remove support for signatures.
8408 (cp_finish_decl): Likewise.
8409 (grokdeclarator): Likewise.
8410 (grokparms): Likewise.
8411 (xref_tag): Likewise.
8412 (start_function): Likewise.
8413 (start_method): Likewise.
8414 * decl2.c (finish_sigtable_vardecl): Remove.
8415 (flag_handle_signatures): Remove.
8416 (lang_f_options): Remove handle-signatures.
8417 (grokfield): Remove support for signatures.
8418 (grokbitfield): Likewise.
8419 (finish_file): Likewise.
8420 (reparse_absdcl_as_casts): Likewise.
8421 * error.c (dump_type_real): Likewise.
8422 (dump_function_decl): Likewise.
8423 * friend.c (make_friend_class): Likewise.
8424 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
8425 * hash.h: Regenerated.
8426 * init.c (build_new_1): Remove support for signatures.
8427 * lang-options.h: Remove -fhandle-signatures,
8428 -fno-handle-signatures.
8429 * lex.c (init_parse): Remove support for signatures.
8430 (yyprint): Likewise.
8431 * lex.h (rid): Remove RID_SIGNATURE.
8432 * method.c (build_decl_overload_real): Remove support for
8433 signatures.
8434 (hack_identifier): Likewise.
8435 * parse.y (base_class): Likewise.
8436 (base_class.1): Likewise.
8437 (access_specifier): Likewise.
8438 * search.c (lookup_member): Likewise.
8439 * semantics.c (finish_qualified_object_call_expr): Likewise.
8440 (finish_template_type_parm): Likewise.
8441 (begin_class_definition): Likewise.
8442 (finish_base_specifier): Likewise.
8443 * sig.c: Remove.
8444 * tree.c (build_cplus_method_type): Remove support for signatures.
8445 * typeck.c (require_complete_type): Likewise.
8446 (c_sizeof): Likewise.
8447 (c_alignof): Likewise.
8448 (build_object_ref): Likewise.
8449 (build_component_ref): Likewise.
8450 (build_indirect_ref): Likewise.
8451 (build_c_cast): Likewise.
8452 (build_modify_expr): Likewise.
8453 (convert_for_initialization): Likewise.
8454 * typeck2.c (signature_error): Remove.
8455 (store_init_value): Remove support for signatures.
8456 (digest_init): Likewise.
8457 (build_x_arrow): Likewise.
8458 (build_functional_cast): Likewise.
8459 * xref.c (GNU_xref_decl): Likewise.
8460
8461 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
8462
8463 * lex.c (do_identifier): Remove unnecessary lookup of class field.
8464
8465 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
8466
8467 * decl2.c (set_decl_namespace): Do not complain about non-matching
8468 decls if processing a template.
8469
8470 1999-08-09 Mark Mitchell <mark@codesourcery.com>
8471
8472 * decl.c (build_ptrmemfunc_type): Handle qualified
8473 pointer-to-member types here.
8474 * tree.c (cp_build_qualified_type_real): Simplify handling here.
8475
8476 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8477
8478 * lex.c (lang_identify): Likewise.
8479
8480 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
8481
8482 * Makefile.in: Update dependencies.
8483 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
8484 NULL_RTX.
8485 * decl.c: Include "function.h"
8486 (cleanup_label, return_label): Delete declarations.
8487 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
8488 (finish_function): Rename last_parm_insn variable to
8489 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
8490 * decl2.c: Include "function.h".
8491 (rtl_expr_chain): Delete declaration.
8492 * method.c: Include "function.h"
8493 * tree.c (build_vbase_pointer_fields): Don't initialize
8494 DECL_SAVED_INSNS with NULL_RTX.
8495 * typeck.c: Include "function.h"
8496
8497 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
8498
8499 * semantics.c (begin_function_try_block, finish_function_try_block,
8500 finish_function_handler_sequence): New fns.
8501 * parse.y (function_try_block): Use them.
8502 * pt.c (instantiate_decl): Likewise.
8503
8504 * cp-tree.h: Declare in_function_try_handler.
8505 * decl.c: Define it.
8506 (start_function): Clear it.
8507 (struct cp_function, push_cp_function_context): Save it.
8508 (pop_cp_function_context): Restore it.
8509 * parse.y (function_try_block): Set and clear it.
8510 * except.c (expand_end_catch_block): Rethrow if we reach the end
8511 of a function-try-block handler in a ctor or dtor.
8512 * typeck.c (c_expand_return): Complain about returning from a
8513 function-try-block handler of a ctor.
8514
8515 * parse.y (function_try_block): Call end_protect_partials
8516 before expand_start_all_catch.
8517
8518 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
8519
8520 * decl.c (struct binding_level): Add eh_region field.
8521 (push_binding_level): Set it.
8522 (define_label): Complain about jumping into an EH block.
8523
8524 * ptree.c (print_lang_type): Print the real type of a PMF.
8525 Print what exceptions a fn type throws.
8526
8527 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8528
8529 * class.c (count_fields, add_fields_to_vec): Add static prototype.
8530
8531 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
8532 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
8533 char*.
8534
8535 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
8536 Constify a char*.
8537
8538 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
8539 char*.
8540
8541 * dump.c (queue_and_dump_index, dump_int, dump_string,
8542 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
8543 a char*.
8544 (dump_stmt): Add static prototype.
8545
8546 * errfn.c (cp_thing): Constify a char*.
8547
8548 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
8549 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
8550 dump_expr): Constify a char*.
8551
8552 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
8553 read_line_number): Add static prototype.
8554 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
8555 (real_yylex): Move label `letter' into the scope where it is used.
8556
8557 * method.c (build_mangled_template_parm_index, build_overload_int,
8558 build_decl_overload_real, get_id_2): Constify a char*.
8559
8560 * search.c (check_final_overrider): Make static.
8561
8562 * typeck.c (composite_pointer_type): Constify a char*.
8563
8564 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
8565
8566 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
8567 we're looking at a class.
8568
8569 * decl.c (lookup_name_real): Set the complain flag if we're
8570 looking for a namespace member.
8571
8572 * lex.c (real_yylex): We can have a number with no digits.
8573
8574 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
8575
8576 * search.c (binfo_from_vbase): New fn.
8577 * cp-tree.h: Declare it.
8578 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
8579 from pointer to member of virtual base.
8580 * typeck.c (get_delta_difference): Likewise.
8581
8582 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
8583
8584 * pt.c (tsubst): Use build_index_type to build in-template array
8585 index type. Fixes g++.oliva/dwarf1.C.
8586 * decl.c (grokdeclarator): Likewise, just for consistency, as it
8587 doesn't seem to trigger the bug without it.
8588
8589 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
8590
8591 * typeck2.c (add_exception_specifier): Use complete_type.
8592
8593 1999-08-06 Mark Mitchell <mark@codesourcery.com>
8594
8595 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
8596 (dump_binary_op): Bulletproof.
8597 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
8598 * tree.c (search_tree): Don't enumerate all the nodes of classes
8599 `1', `2', and `<'; handle them generically. Don't be sorry about
8600 "unrecognized tree codes"; just abort.
8601 (no_linkage_check): Don't do linkage checks for templates.
8602
8603 * tree.c (cp_build_qualified_type_real): Handle
8604 pointer-to-member-function types correctly.
8605
8606 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
8607
8608 * decl.c (pushdecl): Only give an error for shadowing a parm
8609 from *this* function.
8610
8611 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
8612
8613 * typeck2.c: Update URLs and mail addresses.
8614
8615 1999-08-04 Nathan Sidwell <nathan@acm.org>
8616
8617 * cp-tree.h (empty_except_spec): New global var.
8618 (compexcepttypes): Remove prototype.
8619 (comp_except_specs): Prototype new global function.
8620 (add_exception_specifier): Prototype new global function.
8621 * decl.c (empty_except_spec): Define new global var.
8622 (duplicate_decls): Use comp_except_specs, reword error message.
8623 (init_decl_processing): Initialize empty_except_spec.
8624 Adjust build_exception_variant calls.
8625 * parse.y (exception_specification_opt): Use empty_except_spec.
8626 (ansi_raise_identifier): Call check_for_new_type.
8627 (ansi_raise_identifiers): Use add_exception_specifier.
8628 * pt.c (tsubst): Use add_exception_specifier to build exception
8629 specifier.
8630 * search.c (check_final_overrider): New static function, broken
8631 out of get_matching_virtual. Check throw specifiers, reword
8632 diagnostics.
8633 (get_matching_virtual): Use check_final_overrider.
8634 * tree.c (build_exception_variant): Use comp_except_specs.
8635 * typeck.c (compexcepttypes): Remove.
8636 (comp_except_types): New static function, helper for
8637 comp_except_specs. Compare two types as exception specifiers.
8638 (comp_except_specs): New global function, compare two exception
8639 specifiers.
8640 (comptypes): Adjust for comp_except_specs.
8641 * typeck2.c (add_exception_specifier): New global function.
8642
8643 * class.c (check_for_override): Reword error message.
8644
8645 1999-08-03 Nathan Sidwell <nathan@acm.org>
8646
8647 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
8648 * cp-tree.h (struct lang_type): Added non_pod_class flag.
8649 (CLASSTYPE_NON_POD_P): New macro to access it.
8650 * class.c (finish_struct_1): Determine non-PODness.
8651 Check for arrays of pointers (-Weffc++).
8652 Remove array inspection duplicated code.
8653 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
8654 Use CLASSTYPE_NON_POD_P.
8655
8656 1999-08-03 Nathan Sidwell <nathan@acm.org>
8657
8658 * class.c (duplicate_tag_error): Preserve template information.
8659
8660 1999-08-03 Nathan Sidwell <nathan@acm.org>
8661
8662 * decl.c (start_enum): Show location of previous definition.
8663 * parse.y (enumlist_opt): New reduction.
8664 (structsp): Simplify enum rules to use enumlist_opt.
8665
8666 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
8667
8668 * lex.c (yyprint): Handle PFUNCNAME.
8669
8670 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
8671 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
8672
8673 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
8674
8675 * decl.c (start_decl): Set attributes before duplicate_decls call.
8676
8677 1999-08-02 Mark Mitchell <mark@codesourcery.com>
8678
8679 * Make-lang.in (CXX_SRCS): Add dump.c.
8680 * Makefile.in (CXX_OBJS): Add dump.o.
8681 (dump.o): New target.
8682 * cp-tree.h (DECL_CONV_FN_P): Document.
8683 (DECL_OVERLOADED_OPERATOR_P): New function.
8684 (TYPE_PTRMEM_CLASS_TYPE): New macro.
8685 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
8686 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
8687 (ASM_VOLATILE_P): New macro.
8688 (STMT_LINENO): Likewise.
8689 (cp_namespace_decls): New function.
8690 (dump_node_to_file): New function.
8691 * decl.c (cp_namespace_decls): New function.
8692 (walk_namespaces_r): Use it.
8693 (wrapup_globals_for_namespace): Likewise.
8694 * decl2.c (flag_dump_translation_unit): New variable.
8695 (lang_decode_option): Handle -fdump-translation-unit.
8696 (finish_file): If flag_dump_translation_unit is set, dump the
8697 translation unit.
8698 * dump.c: New file.
8699 * lang-options.h: Add -fdump-translation-unit.
8700 * pt.c (tsubst_template_parms): Robustify.
8701 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
8702 (tsubst_expr): Use STMT_LINENO.
8703 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
8704 for invalid cv-qualifiers even while building templates.
8705
8706 1999-08-02 Richard Henderson <rth@cygnus.com>
8707
8708 * call.c: Include defaults.h instead of expr.h.
8709 * decl.c: Likewise.
8710 * pt.c: Likewise.
8711 * typeck.c: Include defaults.h.
8712
8713 1999-08-02 Mark Mitchell <mark@codesourcery.com>
8714
8715 * lex.c (errorcount, sorrycount): Don't declare.
8716 * repo.c (errorcount, sorrycount): Likewise.
8717 * typeck2.c (errorcount, sorrycount): Likewise.
8718
8719 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
8720
8721 * call.c (convert_default_arg, build_over_call): Change all uses of
8722 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
8723 Ensure expr.h is included.
8724 * decl.c (grokparams): Ditto.
8725 * pt.c (tsubst_decl): Ditto.
8726 * typeck.c (convert_arguments): Ditto.
8727
8728 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
8729
8730 * class.c (mark_overriders): Fix order of args to overrides.
8731 (warn_hidden): Likewise. Fix for having virtual and non-virtual
8732 functions with the same name.
8733
8734 1999-08-02 Richard Henderson <rth@cygnus.com>
8735
8736 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
8737
8738 1999-08-01 Mark Mitchell <mark@codesourcery.com>
8739
8740 * call.c (build_conditional_expr): Fix typo in comment.
8741
8742 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
8743
8744 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
8745 case_stack; use in_control_zone_p.
8746 * typeck.c (c_expand_return): Likewise.
8747
8748 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
8749
8750 * except.c (catch_clauses): Delete declaration.
8751
8752 1999-07-30 Mark Mitchell <mark@codesourcery.com>
8753
8754 * call.c (build_conditional_expr): Call convert_from_reference to
8755 avoid reference/non-reference type confusion. Fix typo.
8756
8757 1999-07-30 Richard Henderson <rth@cygnus.com>
8758
8759 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
8760 * cp-tree.h (initializer_constant_valid_p): Remove.
8761
8762 1999-07-28 Mark Mitchell <mark@codesourcery.com>
8763
8764 * call.c (conditional_conversion): Don't build BASE_CONVs for
8765 conversions between things that have the same type.
8766 (build_conditional_expr): Tweak.
8767 (convert_like): Some BASE_CONVs really do require the generation
8768 of code.
8769
8770 * init.c (perform_member_init): Don't go through build_modify_expr
8771 for simple initializations.
8772
8773 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
8774
8775 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
8776 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
8777 virtual functions and MI. Simplify.
8778
8779 * method.c: Remove prototype for largest_union_member.
8780 * pt.c (determine_specialization): Fix uninitialized warning.
8781 * lex.c (real_yylex): Likewise.
8782
8783 1999-07-27 Mark Mitchell <mark@codesourcery.com>
8784
8785 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
8786 here too.
8787
8788 * cp-tree.h (BINFO_VIRTUALS): Document new format.
8789 * class.c (modify_one_vtable): Change prototype accordingly.
8790 (modify_all_vtables): Likewise.
8791 (modify_all_direct_vtables): Likewise.
8792 (modify_all_indirect_vtables): Likewise.
8793 (build_vtable_entry_for_fn): New function.
8794 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
8795 (modify_vtable_entry): Likewise.
8796 (add_virtual_function): Likewise.
8797 (build_vtbl_initializer): New function.
8798 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
8799 (fixup_vtable_deltas1): Likewise.
8800 (fixup_vtable_deltas): Likewise.
8801 (override_one_vtable): Likewise.
8802 (finish_struct_1): Likewise.
8803
8804 * error.c (dump_expr): Likewise.
8805 * search.c (get_abstract_virtuals_1): Likewise.
8806 (get_abstract_virtuals): Likewise.
8807 (expand_upcast_fixups): Likewise.
8808 * tree.c (debug_binfo): Likewise.
8809 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
8810 __pure_virtual here.
8811
8812 1999-07-26 Mark Mitchell <mark@codesourcery.com>
8813
8814 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
8815 as per 1999-07-26 change.
8816
8817 * typeck.c (c_sizeof): Don't allow non-static data members.
8818 (expr_sizeof): Likewise.
8819
8820 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
8821
8822 * input.c (feed_input): Only touch lineno and input_filename
8823 if !USE_CPPLIB. Save the old values before setting the new ones.
8824
8825 * input.c (feed_input): Add file, line parms.
8826 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
8827 (real_yylex): Check linemode before input_redirected().
8828
8829 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
8830 from op new to warning.
8831
8832 1999-07-26 Mark Mitchell <mark@codesourcery.com>
8833
8834 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
8835 * call.c: All uses changed.
8836 * typeck.c: Likewise.
8837
8838 1999-07-26 Nathan Sidwell <nathan@acm.org>
8839
8840 * exception.cc (__cplus_type_matcher): Match __eh_matcher
8841 prototype.
8842
8843 1999-07-26 Mark Mitchell <mark@codesourcery.com>
8844
8845 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
8846 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
8847 (strip_top_quals): Declare.
8848 (ncp_convert): Likewise.
8849 (type_after_usual_arithmetic_converions): Likewise.
8850 (composite_pointer_type): Likewise.
8851 * call.c (strip_top_quals): Don't make it static.
8852 (promoted_arithmetic_type_p): New function.
8853 (conditional_conversion): Likewise.
8854 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
8855 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
8856 for converting a type to itself.
8857 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
8858 (implicit_conversion): Make sure the from and to types are
8859 complete.
8860 (add_builtin_candidate): Correct handling of ?: operator.
8861 (add_builtin_candidates): Improve documentation.
8862 (build_conditional_expr): New function.
8863 (can_convert): Implement in terms of can_convert_arg.
8864 (ncp_convert): New function.
8865 * typeck.c (type_after_usual_arithmetic_conversions): New
8866 function, split out from common_type.
8867 (composite_pointer_type): New function, split out from
8868 build_conditional_expr.
8869 (common_type): Use type_after_usual_arithmetic_conversions.
8870 Remove redundant attribute merging.
8871 (comptypes): Tidy. Handle COMPLEX_TYPE.
8872 (build_binary_op_nodefault): Use null_ptr_cst_p.
8873 (build_conditional_expr): Remove.
8874 (convert_for_assignment): Use new conversion functions.
8875
8876 * cp-tree.h (abstract_virtuals_error): Change declaration.
8877 * typeck2.c (abstract_virtuals_error): Check to see if an error
8878 ocurred, and return a boolean value accordingly.
8879 (build_functional_cast): Adjust accordingly.
8880 * class.c (finish_struct_1): Likewise.
8881 * cvt.c (ocp_convert): Likewise.
8882 * decl.c (cp_finish_decl): Likewise.
8883 (grokparams): Likewise.
8884 (grok_op_properties): Likewise.
8885 (start_function): Likewise.
8886 * init.c (build_new_1): Likewise.
8887
8888 * pt.c (unify): Don't get confused by pointers-to-member functions.
8889
8890 * search.c (build_cplus_new): Robustify.
8891
8892 1999-07-24 Richard Henderson <rth@cygnus.com>
8893
8894 * gxx.gperf (__builtin_va_arg): New.
8895 * parse.y (VA_ARG): New token.
8896 (unary_expr): Recognize it.
8897
8898 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
8899
8900 * g++FAQ.texi: Deleted per Joe Buck's request.
8901 * Makefile.in: Corresponding changes.
8902
8903 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
8904
8905 * lex.c: Sync with C frontend.
8906 (whitespace_cr): New fn.
8907 (skip_white_space): Use it.
8908 (init_parse): Reorder.
8909 (yyprint): Support CONSTANT.
8910 (pragma_getc, pragma_ungetc): Bring back.
8911 (read_line_number): Change in_system_header directly.
8912 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
8913 (parse_float): Update to C version.
8914 (yylex): Handle '$' under the letter case.
8915 Remove looking_for_typename handling.
8916 Support hex floating point constants.
8917 Follow C's lead for choosing type of integer constants.
8918 Rearrange stuff to match C frontend.
8919 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
8920 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
8921
8922 1999-07-23 Mark Mitchell <mark@codesourcery.com>
8923
8924 * call.c (reference_binding): Tweak.
8925 (mayble_handle_implicit_object): Use direct_reference_binding to
8926 create the right implicit conversion sequence.
8927
8928 1999-07-22 Mark Mitchell <mark@codesourcery.com>
8929
8930 * pt.c (convert_nontype_argument): Don't call decl_constant_value
8931 if we're converting to a reference type.
8932
8933 * call.c (NEED_TEMPORARY_P): New macro.
8934 (standard_conversion): Set it, for derived-to-base conversions.
8935 (reference_related_p): New function.
8936 (reference_compatible_p): Likewise.
8937 (convert_class_to_reference): Likewise.
8938 (direct_reference_binding): Likewise.
8939 (reference_binding): Rework for standards-compliance.
8940 (convert_like): Adjust accordingly.
8941 (maybe_handle_ref_bind): Simplify; the right conversion sequences
8942 are now built up in reference_binding.
8943 (initialize_reference): New function.
8944 * cp-tree.h (ICS_USER_FLAG): Document.
8945 (ICS_THIS_FLAG): Likewise.
8946 (ICS_BAD_FLAG): Likewise.
8947 (NEED_TEMPORARY_P): Likewise.
8948 (cp_lvalue_kind): New type.
8949 (real_lvalue_p): Return it.
8950 * error.c (dump_expr): Provide more accurate representation for
8951 AGGR_INIT_EXPRs.
8952 * init.c (expand_default_init): Do not try to perform implicit
8953 conversions for a brace-enclosed initializer.
8954 * search.c (lookup_conversions): Document.
8955 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
8956 appropriately.
8957 (real_lvalue_p): Adjust accordingly.
8958 (lvalue_p): Likewise.
8959 (build_cplus_new): Don't allow the creation of an abstract class.
8960 * typeck.c (convert_for_initialization): Use initialize_reference.
8961
8962 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
8963
8964 * lex.c (real_yylex) : Correct the test for overflow when lexing
8965 integer literals.
8966
8967 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
8968
8969 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
8970 not DECL_BUILT_IN, to determine if a function is internally declared.
8971 (duplicate_decls): Likewise. Improve handling of builtins.
8972 (push_overloaded_decl): Remove special handling of builtins.
8973
8974 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
8975
8976 * decl.c (grokdeclarator): Pull out decl_constant_value in
8977 templates, too.
8978
8979 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
8980 * cp-tree.h, pt.c, semantics.c: Adjust.
8981 * method.c (largest_union_member): Remove.
8982
8983 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
8984
8985 * lex.c (token_getch, token_put_back): New fns.
8986 (real_yylex): Use them.
8987
8988 * lex.c (lang_init): Generalize.
8989 (lang_init_options): Tell cpplib this is C++.
8990 (nextchar): Remove. Replace uses with put_back.
8991 (skip_white_space): Handle linemode here. Optimize for cpplib.
8992 (extend_token_buffer_to): New fn.
8993 (extend_token_buffer): Use it.
8994 (read_line_number, check_newline): Just deal with tokens.
8995 (real_yylex): More cpplib optimizations. Simplify. Don't produce
8996 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
8997 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
8998 * parse.y (PAREN_STAR_PAREN): Remove.
8999 * input.c: Don't use the putback machinery with cpplib.
9000 (sub_getch): Fold back into getch.
9001 (getch): Don't handle linemode here.
9002 (feed_input): Unget any text in the token buffer.
9003
9004 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
9005 nextyychar, nextyylval): Remove.
9006
9007 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
9008 Jason Merrill <jason@yorick.cygnus.com>
9009
9010 * lex.c (indent_level): New variable.
9011 (init_parse): Set cpp_token to CPP_DIRECTIVE.
9012 (consume_string): Make this smart about USE_CPPLIB.
9013 (yyungetc): Use put_back function.
9014 (pragma_getc, pragma_ungetc): Functions deleted.
9015 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
9016 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
9017 pragma_ungetc.
9018 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
9019 Also, clean up cases where we redundantly set token_buffer[0].
9020 (read_line_number): New fn.
9021 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
9022 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
9023 (sub_getch): Conditionalize out code that's not appropriate if
9024 USE_CPPLIB.
9025 (put_back): Rewrite in case USE_CPPLIB is defined.
9026 (input_redirected): Ditto.
9027
9028 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
9029
9030 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
9031 c_global_trees and accessor macros defined in c-common.h.
9032 (cp_tree_index): New enumeration.
9033 (cp_global_trees): Declare new array. Add accessor macros for it, and
9034 delete declarations of tree nodes replaced by it.
9035 (builtin_function): Delete macro, add declaration for new function.
9036 Include c-common.h.
9037 * decl.c: Delete definitions for tree nodes that were replaced by
9038 cp_global_trees and c_global_trees.
9039 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
9040 to generate the common builtins here.
9041 (builtin_function): New function.
9042 * decl2.c (abort_fndecl): Delete declaration.
9043 * except.c (expand_builtin_return_address): Delete declaration.
9044 (builtin_return_address_fndecl): Delete variable.
9045 (const_ptr_type_node): Delete declaration.
9046 * lex.c (cons_up_default_function): Delete declaration of
9047 void_list_node.
9048 * parse.y (void_list_node): Delete declaration.
9049 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
9050 Delete variables.
9051 (const_string_type_node): Delete declaration.
9052 * search.c (abort_fndecl): Delete declaration.
9053 * Makefile.in: Update dependencies.
9054
9055 1999-07-19 Mark Mitchell <mark@codesourcery.com>
9056
9057 * pt.c (check_default_tmpl_args): Move test for missing default
9058 arguments here, from ...
9059 (end_template_parm_list): Here.
9060
9061 1999-07-18 Mark Mitchell <mark@codesourcery.com>
9062
9063 * decl.c (lookup_nested_type): Remove.
9064 (pushtag): Don't call it.
9065
9066 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
9067
9068 * Makefile.in (INTERFACE): Bump to 2.
9069
9070 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
9071
9072 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
9073 instructions to gcc.gnu.org. Removed e-mail address.
9074
9075 1999-07-17 Mark Mitchell <mark@codesourcery.com>
9076
9077 * pt.c (determine_specialization): Tighten error-checking.
9078 (end_template_parm_list): Likewise.
9079
9080 1999-07-14 Mark Mitchell <mark@codesourcery.com>
9081
9082 * pt.c (check_default_tmpl_args): Handle friends defined in the
9083 class just like member functions defined in the class.
9084
9085 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
9086 Jason Merrill <jason@yorick.cygnus.com>
9087
9088 * cp-tree.h (struct lang_decl): Added field for storing sorted
9089 FIELD_DECLs (used in TYPE_DECLs).
9090 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
9091 (DECL_SORTED_FIELDS): New macro.
9092 * class.c (method_name_cmp): New function.
9093 (finish_struct_methods): Modified to support sorting and searching
9094 methods.
9095 (finish_struct_anon): Changed code in inner loop to use ELT rather
9096 than UELT (which required an extra indirection for every reference).
9097 (field_decl_cmp): New function to support sorting FIELD_DECLs.
9098 (finish_struct_1): Sort fields.
9099 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
9100 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
9101 Also, switch to using array indexing rather than a changing pointer.
9102 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
9103 DECL_SORTED_FIELDS.
9104
9105 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
9106
9107 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
9108 casts in system headers or extern "C" blocks.
9109
9110 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
9111 errors to pedwarn.
9112
9113 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
9114
9115 * decl2.c (write_virtuals): Deleted declaration.
9116 * cp-tree.h (write_virtuals): Deleted extern declaration.
9117 * class.c (finish_struct_1): Removed #if 0'd code that mentions
9118 write_virtuals.
9119 * semantics.c (begin_class_definition): Rewrite code to not depend
9120 on write_virtuals.
9121
9122 * lex.c (cp_pragma_interface): New function.
9123 (cp_pragma_implementation): Likewise.
9124 (handle_cp_pragma): Call them.
9125
9126 * typeck.c (comptypes): Simplify C code in look_hard.
9127
9128 * xref.c (PALLOC): Use xcalloc, not calloc.
9129 (SALLOC): Use xmalloc, not malloc.
9130
9131 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
9132
9133 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
9134 is NO_DEBUG.
9135
9136 * decl.c (duplicate_decls): If a redeclaration doesn't match the
9137 initial declaration, then don't save the inline info and by all
9138 means don't mark the function as a builtin function.
9139
9140 * decl.c (lookup_name_real): Set NONCLASS to 1 if
9141 CURRENT_CLASS_TYPE is 0.
9142
9143 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
9144 NULL_TREE.
9145
9146 * ptree.c (print_lang_type): Added vtable-needs-writing.
9147
9148 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
9149
9150 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
9151
9152 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
9153
9154 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
9155 Merged into c-common.
9156
9157 1999-07-05 Dave Brolley <brolley@cygnus.com>
9158
9159 * lex.c (errorcount): Declare it.
9160 (finish_parse): Update errorcount for when using CPPLIB.
9161
9162 1999-07-05 Mark Mitchell <mark@codesourcery.com>
9163
9164 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
9165 parameters.
9166 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
9167 * decl.c (push_class_binding): Use it.
9168 (lookup_name_real): Likewise.
9169
9170 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
9171
9172 * cp-tree.h (widest_integer_literal_type_node,
9173 widest_unsigned_literal_type) : New.
9174 * decl.c (widest_integer_literal_type_node,
9175 widest_unsigned_literal_type) : New.
9176 (init_decl_processing): Handle/use the two new types.
9177 * lex.c (real_yylex): Same.
9178 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
9179 Same.
9180
9181 1999-07-01 Mark Mitchell <mark@codesourcery.com>
9182
9183 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
9184 to anonymous cv-qualified types.
9185
9186 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
9187
9188 * lex.c (real_yylex) : Change integer literal overflow handling to
9189 be like c-lex.c.
9190
9191 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
9192
9193 1999-06-28 Richard Henderson <rth@cygnus.com>
9194
9195 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
9196
9197 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
9198
9199 * error.c (dump_type_real): Handle TREE_LIST again.
9200
9201 * typeck.c (comp_target_parms): Don't complain about
9202 converting from () to (...) if !flag_strict_prototype.
9203
9204 * decl.c (grokdeclarator): Update the names of all variants when
9205 de-anonymizing.
9206
9207 1999-06-21 Mark Mitchell <mark@codesourcery.com>
9208
9209 * init.c (expand_aggr_vbase_init): Rename to
9210 construct_virtual_bases. Conditionalize construction here,
9211 rather than ...
9212 (emit_base_init): Here.
9213
9214 1999-06-19 Mark Mitchell <mark@codesourcery.com>
9215
9216 * semantics.c (finish_asm_stmt): Apply decay conversions to
9217 input operands.
9218
9219 * decl.c (expand_static_init): When building an anonymous function
9220 for use with atexit, compute its body before and after entering
9221 the function.
9222
9223 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
9224 EXIT_EXPR.
9225
9226 1999-06-18 Mark Mitchell <mark@codesourcery.com>
9227
9228 * init.c (expand_aggr_vbase_init): Add flag parameter.
9229 (build_partial_cleanup_for): Remove, inlining into ..
9230 (expand_cleanup_for_base): ... here. Take flag parameter.
9231 (emit_base_init): Pass the in_chrg parameter to
9232 emit_aggr_vbase_init.
9233 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
9234
9235 1999-06-16 Mark Mitchell <mark@codesourcery.com>
9236
9237 * decl2.c (import_export_decl): Use same_type_p, rather than
9238 relying on pointer-equality for types.
9239
9240 * method.c (do_build_copy_constructor): Simplify.
9241
9242 * call.c (build_method_call): Remove bogus code for two-argument
9243 delete.
9244 * init.c (build_new_1): Expand on comment, and remove dead code.
9245
9246 * init.c (expand_cleanup_for_base): New function, split out
9247 from ...
9248 (emit_base_init): Here.
9249 (expand_aggr_vbase_init): Use it.
9250
9251 1999-06-15 Mark Mitchell <mark@codesourcery.com>
9252
9253 * cp-tree.h (class_cache_firstobj): Declare.
9254 (maybe_push_cache_obstack): Rename to push_cache_obstack.
9255 * class.c (permanent_obstack): Remove declaration.
9256 (class_cache_firstobj): Make it global.
9257 (add_method): Don't use permanent_obstack directly.
9258 (pushclass): Only free the class_cache_obstack if we know how far
9259 back to free it.
9260 (maybe_push_cache_obstack): Rename to push_cache_obstack.
9261 * decl.c: Remove dead comment.
9262 (saved_scope): Add class_cache_firstobj.
9263 (push_to_top_level): Save it.
9264 (pop_from_top_level): Restore it.
9265 (push_class_level_binding): Use push_cache_obstack, not
9266 maybe_push_cache_obstack.
9267 * search.c (push_class_decls): Likewise.
9268
9269 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
9270
9271 * pt.c (tsubst_friend_function): Push into namespace of friend
9272 function before pushdecl'ing it.
9273
9274 1999-06-14 Nathan Sidwell <nathan@acm.org>
9275
9276 * call.c (build_new_op): Remove REF_BIND from all operands.
9277
9278 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
9279
9280 * init.c (build_new_1): Look up operator delete even if there was
9281 no explicit new placement.
9282
9283 1999-06-08 Nathan Sidwell <nathan@acm.org>
9284
9285 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
9286 of ...
9287 (build_throw): ... here. Call it.
9288 (process_start_catch_block): Call it.
9289
9290 1999-06-07 Mark Mitchell <mark@codesourcery.com>
9291
9292 * search.c (convert_pointer_to_single_level): Reimplement without
9293 using get_binfo.
9294
9295 1999-06-06 Mark Mitchell <mark@codesourcery.com>
9296
9297 * method.c (is_back_referenceable_type): Back-reference bools when
9298 not squangling.
9299
9300 1999-06-07 Dave Brolley <brolley@cygnus.com>
9301
9302 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
9303 * input.c (putback_buffer): New structure type.
9304 (putback): Replaces putback_char member.
9305 (putback): Replaces putback_char static variable.
9306 (feed_input): Use putback.
9307 (end_input): Use putback.
9308 (sub_getch): Use putback.
9309 (put_back): Use putback.
9310
9311 1999-06-05 Mark Mitchell <mark@codesourcery.com>
9312
9313 * decl.c (grokdeclarator): Fix typo in last change.
9314
9315 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
9316
9317 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
9318 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
9319
9320 1999-06-04 Nathan Sidwell <nathan@acm.org>
9321
9322 * except.c (build_throw): Check throw expression validity.
9323
9324 1999-06-03 Mark Mitchell <mark@codesourcery.com>
9325
9326 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
9327 just because flag_signed_bitfields is false.
9328
9329 1999-06-03 Nathan Sidwell <nathan@acm.org>
9330
9331 * semantics.c (begin_class_definition): Update the struct's
9332 location here ...
9333 * class.c (finish_struct): ... rather than here.
9334
9335 * decl.c (make_typename_type): Don't rely on uninitialized
9336 variable.
9337
9338 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9339
9340 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
9341
9342 1999-05-31 Mark Mitchell <mark@codesourcery.com>
9343
9344 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
9345 and friends rather than messing with current_obstack directly.
9346 (cp_build_qualified_type_real): Rework ARRAY_TYPE
9347 allocation to match practice throughout the rest of the
9348 compiler.
9349
9350 1999-05-30 Mark Mitchell <mark@codesourcery.com>
9351
9352 * lex.c (make_lang_type): Create TYPE_BINFO for
9353 TEMPLATE_TYPE_PARMs just like for non-template types.
9354
9355 * decl.c (start_decl): Move checks on initialization to ...
9356 (cp_finish_decl): Here. Tidy formatting slightly.
9357
9358 1999-05-28 Mark Mitchell <mark@codesourcery.com>
9359
9360 * decl.c (add_binding): Don't complain about a redeclaration of a
9361 semantically identical typedef in a local scope.
9362
9363 1999-05-28 Nathan Sidwell <nathan@acm.org>
9364
9365 * decl.c (complete_array_type): Allocate off same obstack. Fix
9366 DO_DEFAULT comment to match reality.
9367
9368 * friend.c (make_friend_class): Fix diagnostic typo.
9369
9370 1999-05-28 Mark Mitchell <mark@codesourcery.com>
9371
9372 * decl.c (lookup_namespace_name): Handle getting a
9373 TEMPLATE_ID_EXPR.
9374 (expand_static_init): Don't call pushdecl for implicitly declared
9375 `atexit' used to register destructors.
9376
9377 1999-05-25 Mark Mitchell <mark@codesourcery.com>
9378
9379 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
9380 intialize a vtable.
9381
9382 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
9383 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
9384 by combining TEMPLATE_INFO and LEVEL into a single union.
9385 (DECL_TEMPLATE_INFO): Reformat.
9386 (DECL_SAVED_TREE): Document.
9387 (DECL_TEMPLATE_INJECT): Remove.
9388 * class.c (finish_struct): Remove code to deal with
9389 DECL_TEMPLATE_INJECT.
9390
9391 * decl.c (maybe_process_template_type_declaration): Handle all new
9392 types in templates uniformly.
9393 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
9394 DECL_CONTEXT.
9395 * pt.c (lookup_template_class): Inject template instantiations of
9396 forward-declarations.
9397 (instantiate_class_template): Remove code processing
9398 DECL_TEMPLATE_INJECT.
9399
9400 * pt.c (lookup_template_class): Tweak lookup to find member
9401 templates.
9402
9403 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
9404 ASM_CV_QUAL.
9405 * semantics.c (finish_asm_stmt): Make strings permanent if they're
9406 used in a template.
9407
9408 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
9409
9410 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
9411 parts of pointer to data member types.
9412
9413 1999-05-24 Mark Mitchell <mark@codesourcery.com>
9414
9415 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
9416 and then make it look like `abort'. Just use `abort' instead.
9417
9418 * typeck.c (build_static_cast): Don't allow static_casts that cast
9419 away constness.
9420 (casts_away_constness_r): New function.
9421 (casts_away_constness): Likewise.
9422
9423 * decl.c (lookup_tag): Remove code no longer needed after
9424 name-lookup improvements.
9425 * decl2.c (handle_class_head): Make error-recovery more robust.
9426 * friend.c (make_friend_class): Reject templated typename types.
9427 * lex.c (is_global): A template parameter isn't global.
9428 * parse.y (class_head): Robustify.
9429 * parse.c: Regenerated.
9430
9431 1999-05-22 Mark Mitchell <mark@codesourcery.com>
9432
9433 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
9434 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
9435
9436 * cp-tree.h (push_nested_namespace): Declare.
9437 (pop_nested_namespace): Likewise.
9438 * decl.c (push_nested_namespace): New function.
9439 (pop_nested_namespace): Likewise.
9440 * pt.c (instantiate_class_template): Use them.
9441
9442 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
9443
9444 * cp-tree.h (cplus_expand_constant): Declare.
9445 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
9446 converted from one pointer-to-object type to another.
9447 * expr.c (cplus_expand_constant): Don't make it static.
9448 * typeck.c (build_component_ref): Don't crash when presented with
9449 a component which is a TEMPLATE_DECL.
9450 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
9451 cast from a pointer-to-member constant to its own type does not
9452 result in a valid non-type template argument.
9453
9454 1999-05-21 Mark Mitchell <mark@codesourcery.com>
9455 Nathan Sidwell <nathan@acm.org>
9456
9457 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
9458 * cp-tree.h: Fix typo in documentation on pointers-to-members.
9459 (cp_build_qualified_type): Make it a macro.
9460 (cp_build_qualified_type_real): Declare.
9461 * decl.c (grokdeclarator): Remove misleading comment. Avoid
9462 problem with template parameters and restrict-qualification.
9463 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
9464 * hash.h: Regenerated.
9465 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
9466 the enumeration.
9467 (NORID): Remove definition.
9468 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
9469 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
9470 (fn_type_unification): Check that the function type resulting from
9471 the deduction is legal.
9472 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
9473 (unify): Use cp_build_qualified_type_real.
9474 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
9475 (cp_build_qualified_type): Rename to ...
9476 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
9477 and modify appropriately.
9478
9479 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
9480 reveal optimization opportunities.
9481
9482 * pt.c (tsubst): Don't issue error messages when we're not
9483 complaining, even if we see a qualified function type.
9484 (check_cv_quals_for_unify): Don't allow a qualified function
9485 type.
9486
9487 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
9488
9489 * class.c (instantiate_type): Downgrade errors for object-dependent
9490 memfn refs to pedwarn.
9491
9492 1999-05-20 Mark Mitchell <mark@codesourcery.com>
9493
9494 * decl.c (grokdeclarator): Don't treat [] as indicating a
9495 zero-sized array in a typedef.
9496
9497 * call.c (build_object_call): Don't look at DECL_NAME for a type.
9498 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
9499 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
9500
9501 * pt.c (for_each_template_parm): Rework to match documentation.
9502 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
9503
9504 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
9505
9506 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
9507
9508 * class.c (finish_base_struct): Allow non-COM bases for COM classes
9509 except at the leftmost position.
9510 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
9511 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
9512 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
9513
9514 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
9515 (build_cplus_new): Make sure that what we return is of the right type.
9516
9517 1999-05-20 Mark Mitchell <mark@codesourcery.com>
9518
9519 * cp-tree.h (make_ptrmem_cst): New function.
9520 * expr.c (cplus_expand_constant): Split out from ...
9521 (cplus_expand_expr): Here. Use cplus_expand_constant.
9522 (init_cplus_expand): Set lang_expand_constant.
9523 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
9524
9525 * tree.c (make_ptrmem_cst): Define.
9526 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
9527 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
9528
9529 1999-05-19 Mark Mitchell <mark@codesourcery.com>
9530
9531 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
9532
9533 * decl2.c (start_static_storage_duration_function): Fix comment.
9534 (finish_file): Create static storage duration functions lazily.
9535
9536 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
9537
9538 Implement anonymous structs.
9539 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
9540 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
9541 * class.c (finish_struct_1): Remove redundant check for anon struct.
9542 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
9543 (check_tag_decl): Check for anonymous struct here.
9544 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
9545 * init.c (sort_member_init, emit_base_init): Handle getting fields
9546 as well as names in current_member_init_list.
9547 (perform_member_init): Handle getting an anon aggr.
9548 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
9549 (do_build_copy_constructor): Likewise.
9550
9551 1999-05-19 Mark Mitchell <mark@codesourcery.com>
9552
9553 * tree.c (cp_build_qualified_type): Don't allow qualified function
9554 types.
9555
9556 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
9557
9558 * gxxint.texi: Fix typo.
9559
9560 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
9561
9562 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
9563 * class.c (finish_struct_1): Use CLASS_TYPE_P.
9564 * ptree.c (print_lang_type): Likewise.
9565 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
9566 IS_AGGR_TYPE_CODE.
9567 * typeck2.c (digest_init): Likewise.
9568
9569 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
9570
9571 * call.c (joust): Compare the types of the conv ops, not the
9572 target types of the conversions.
9573
9574 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
9575
9576 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
9577 was not given.
9578
9579 1999-05-17 Mark Mitchell <mark@codesourcery.com>
9580
9581 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
9582 * decl.c (grokfndecl): Don't allow inline declarations of friend
9583 template specializations, or friend template specializations with
9584 default arguments.
9585 * pt.c (tsubst): Handle substitution into array types that does
9586 not yield a fixed upper bound, even when not processing a
9587 template.
9588 (tsubst_copy): Deal with the fact that the second operand to a
9589 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
9590 * search.c (marked_pushdecls_p): Don't descend into
9591 TEMPLATE_TYPE_PARMs and the like.
9592 (unmarked_pushdecls_p): Likewise.
9593
9594 * call.c (build_over_call): Don't throw away
9595 initializations/copies of empty classes; use MODIFY_EXPR and
9596 INIT_EXPR as for non-empty classes.
9597 * class.c (finish_struct_1): Put the padding byte for an empty
9598 class on the TYPE_NONCOPIED_PARTS list for the class.
9599
9600 1999-05-16 Mark Mitchell <mark@codesourcery.com>
9601
9602 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
9603 indicate a reference to a field that is a qualified name.
9604
9605 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
9606
9607 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
9608 ASM_OUTPUT_CONSTRUCTOR.
9609
9610 * friend.c (do_friend): Add attrlist arg. Remove support for
9611 getting a non-decl as 'decl'.
9612 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
9613 rtl.
9614 (grokdeclarator): Adjust.
9615 * cp-tree.h: Adjust.
9616
9617 1999-05-16 Mark Mitchell <mark@codesourcery.com>
9618
9619 * cp-tree.h (permanent_p): New function.
9620 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
9621 possibly complex tree node.
9622 * tree.c (mapcar): Adjust comments, and follow coding standards in
9623 conditional.
9624 (permanent_p): New function.
9625
9626 1999-05-13 Per Bothner <bothner@cygnus.com>
9627
9628 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
9629 primitive Java types, if we actually see `extern "Java"'.
9630
9631 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
9632
9633 * lang-specs.h: Pass -$ to the preprocessor.
9634
9635 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
9636
9637 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
9638 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
9639 (resolve_offset_ref): Don't handle a raw baselink.
9640 * cvt.c (build_expr_type_conversion): Likewise.
9641 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
9642 convert_for_initialization): Likewise.
9643 * class.c (instantiate_type): Handle seeing a baselink under an
9644 OFFSET_REF.
9645 * error.c (dump_expr): Likewise.
9646 * pt.c (for_each_template_parm): Likewise.
9647 (resolve_overloaded_unification): Likewise.
9648 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
9649 * typeck.c (expr_sizeof): Also complain about other permutations
9650 of overloaded functions.
9651
9652 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
9653
9654 * init.c (resolve_offset_ref): Don't return a raw method.
9655 Use BASELINK_P.
9656 * typeck.c (decay_conversion): Don't handle a raw method.
9657 Resolve all OFFSET_REFs.
9658 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
9659 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
9660 same_type_p for pmf bits. Don't use build_binary_op to compare
9661 raw pointers to methods.
9662 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
9663 to decide when to call resolve_offset_ref.
9664 (build_c_cast, convert_for_initialization): Likewise.
9665 * cvt.c (build_expr_type_conversion): Likewise.
9666
9667 1999-05-06 Nathan Sidwell <nathan@acm.org>
9668
9669 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
9670
9671 1999-05-05 Mark Mitchell <mark@codesourcery.com>
9672
9673 * decl2.c (start_objects): Don't let static constructors and
9674 destructors get inlined.
9675
9676 * parse.y (nested_name_specifier): Make sure ordinary types are
9677 complete, just like template types.
9678 * parse.c: Regenerated.
9679
9680 * pt.c (check_explicit_specialization): Improve error messages.
9681
9682 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
9683
9684 * typeck.c (string_conv_p): Use same_type_p to check whether we
9685 try to convert between char and wchar_t.
9686
9687 1999-05-03 Mark Mitchell <mark@codesourcery.com>
9688
9689 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
9690 lookup to error_mark_node here.
9691 (lookup_member): Revise documentation. Add comments. Don't set
9692 the TREE_TYPE to error_mark_node here, and don't build up an extra
9693 TREE_LIST for ambiguous lookups.
9694 (setup_class_bindings): Adjust accordingly.
9695 (push_class_decls): Revise out-of-date comments.
9696
9697 * typeck.c (build_const_cast): Tighten checks for legality.
9698
9699 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
9700
9701 * init.c (build_member_call): Lookup names coming from
9702 namespace-scoped LOOKUP_EXPR.
9703
9704 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
9705
9706 * gxxint.texi: Add documentation for 'I'.
9707
9708 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
9709
9710 * tinfo.cc (operator==): Qualify type_info with std::.
9711
9712 1999-05-02 Mark Mitchell <mark@codesourcery.com>
9713
9714 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
9715 (DECL_COMDAT): Remove definition.
9716
9717 1999-05-01 Mark Mitchell <mark@codesourcery.com>
9718
9719 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
9720 change.
9721
9722 1999-04-30 Mark Mitchell <mark@codesourcery.com>
9723
9724 * class.c (build_vtable): Use build_lang_decl when building
9725 vtables, not just build_decl.
9726 (prepare_fresh_vtable): Likewise.
9727 * decl.c (wrapup_globals_for_namespace): Mark vtables as
9728 DECL_EXTERNAL when calling wrapup_global_declarations.
9729 * decl2.c (priority_info_s): Add initializations_p and
9730 destructions_p members.
9731 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
9732 when deciding what vtables to write out.
9733 (ssdf_decls): New variable.
9734 (ssdf_decls_used): Likewise.
9735 (start_static_storage_duration_function): Deal with being called
9736 multiple times. Avoid inlining this function.
9737 (generate_inits_for_priority): Deal with reuse of priority map.
9738 (get_priority_info): Clear initializations_p and destructions_p.
9739 (do_static_initialization): Tweak comment.
9740 (do_static_destruction): Likewise. Fix condition on sentries for
9741 destruction.
9742 (generate_ctor_or_dtor_function): Call all of the static storage
9743 duration functions.
9744 (generate_ctor_or_dtor_function_for_priority): Check
9745 initializations_p and destructions_p to see what priorities need
9746 initialization functions.
9747 (finish_file): Rework to generate multiple static storage duration
9748 functions, rather than just one.
9749
9750 * typeck.c (build_const_cast): Tweak last change to handle
9751 templates correctly.
9752
9753 * typeck.c (build_const_cast): Disallow use of const_cast to
9754 anything but a pointer or reference type.
9755
9756 1999-04-30 Nathan Sidwell <nathan@acm.org>
9757
9758 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
9759 signature type.
9760
9761 1999-04-29 Mark Mitchell <mark@codesourcery.com>
9762
9763 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
9764 (finish_file): Indent comments properly.
9765
9766 1999-04-29 Richard Henderson <rth@cygnus.com>
9767
9768 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
9769 (do_static_destruction): Likewise.
9770
9771 1999-04-29 Nathan Sidwell <nathan@acm.org>
9772
9773 * cp-tree.h (TYPE_NOTHROW_P): New macro.
9774 * decl2.c (delete_sanity): Warn on deleting void *.
9775 * init.c (build_new_1): Use TYPE_NOTHROW_P.
9776 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
9777 throwing operator new.
9778
9779 1999-04-28 Nathan Sidwell <nathan@acm.org>
9780
9781 * cp-tree.h (build_component_addr): Remove prototype.
9782 * typeck.c (build_component_addr): Make static. Remove MSG
9783 argument.
9784 (build_component_addr): Remove MSG parameter, clean up
9785 comment.
9786 (build_x_function_call): Use cp_error.
9787 (build_unary_op): Adjust call of build_component_addr.
9788
9789 1999-04-28 Mark Mitchell <mark@codesourcery.com>
9790
9791 * pt.c (tsubst_friend_class): Check for NULL.
9792
9793 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
9794
9795 * search.c (binfo_for_vtable): Initialize bfvi.var.
9796
9797 1999-04-27 Nathan Sidwell <nathan@acm.org>
9798
9799 * rtti.c (build_x_typeid): Check rtti is enabled.
9800
9801 1999-04-26 Mark Mitchell <mark@codesourcery.com>
9802
9803 * search.c (is_subobject_of_p): Make sure we're looking at the
9804 right baseclasses.
9805
9806 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
9807
9808 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
9809
9810 1999-04-23 Mark Mitchell <mark@codesourcery.com>
9811
9812 * decl2.c (finish_file): Tweak handling of extern inlines so that
9813 they are not unnecessarily put out.
9814
9815 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
9816 such as base classes.
9817
9818 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
9819
9820 * tree.c (build_exception_variant): Fix typo: use the chain of U,
9821 not trying V, while cycling through U.
9822
9823 1999-04-22 Mark Mitchell <mark@codesourcery.com>
9824
9825 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
9826 preserves_first_arg. Enlarge dummy accordingly.
9827 (DECL_TINFO_FN_P): New macro.
9828 (SET_DECL_TINFO_FN_P): Likeiwse.
9829 (DECL_RETURNS_FIRST_ARG): Remove.
9830 (DECL_PRESERVES_THIS): Likewise.
9831 (DECL_INIT_PRIORITY): New macro.
9832 (finish_struct_1): Change prototype.
9833 (cat_namespace_levels): Remove prototype.
9834 (vtable_decl_p): New prototype.
9835 (vtype_decl_p): Likewise.
9836 (sigtable_decl_p): Likewise.
9837 (walk_globals_pred): New typedef.
9838 (walk_globals_fn): Likewise.
9839 (walk_globals): New prototype.
9840 (walk_namespaces_fn): New typedef.
9841 (walk_namespaces): New prototype.
9842 (wrapup_globals_for_namespace): Likewise.
9843 (walk_vtables): Remove prototype.
9844 (walk_sigtables): Likewise.
9845 (instantiate_pending_templates): New prototype.
9846 * class.c (finish_struct_1): Don't return a value.
9847 * decl.h (pending_statics): Remove declaration.
9848 * decl.c (walk_namespaces_r): New function.
9849 (walk_globals_r): Likewise.
9850 (vtable_decl_p): Likewise.
9851 (vtype_decl_p): Likewise.
9852 (sigtable_decl_p): Likewise.
9853 (walk_namespaces): Likewise.
9854 (walk_globals_data): New type.
9855 (walk_globals): New function.
9856 (wrapup_globals_for_namespace): Likewise.
9857 (expand_static_init): Remove assertion. Remove redundancy in
9858 conditional. Don't put static data members in static_aggregates
9859 Tidy.
9860 (finish_function): Remove redundancy in conditional. Don't set
9861 DECL_RETURNS_FIRST_ARG.
9862 (cat_namespace_levels): Remove.
9863 * decl2.c: Include splay-tree.h and varray.h.
9864 (priority_info_s): New structure.
9865 (finish_vtable_vardecl): Change prototype. Adjust for new calling
9866 conventions.
9867 (prune_vtable_vardecl): Likewise.
9868 (finish_sigtable_vardecl): Likewise.
9869 (setup_initp): Remove.
9870 (do_dtors): Remove.
9871 (do_ctors): Remove.
9872 (start_static_storage_duration_function): New function.
9873 (generate_inits_for_priority): Likewise.
9874 (finish_static_storage_duration_function): Likewise.
9875 (get_priority_info): Likewise.
9876 (do_static_initialization): Likewise.
9877 (do_static_destruction): Likewise.
9878 (do_static_initialization_and_destruction): Likewise.
9879 (generate_ctor_or_dtor_function): Likewise.
9880 (generate_ctor_and_dtor_functions_for_priority): Likewise.
9881 (pending_statics): Make it a varray.
9882 (pending_statics_used): New variable.
9883 (saved_inlines): Make it a varray.
9884 (saved_inlines_used): New variable.
9885 (finish_static_data_member): Change method of updating
9886 pending_statics.
9887 (mark_inline_for_output): Remove #if 0'd code. Change method of
9888 updating saved_inlines.
9889 (walk_vtables): Remove.
9890 (walk_sigtables): Likewise.
9891 (import_export_decl): Use DECL_TINFO_FN_P.
9892 (pending_templates): Remove declaration.
9893 (maybe_templates): Likewise.
9894 (static_aggregates_initp): Likewise.
9895 (setup_initp): Likewise.
9896 (finish_objects): Simplify.
9897 (INITIALIZE_P_IDENTIFIER): New macro.
9898 (PRIORITY_IDENTIFIER): New macro.
9899 (SSDF_IDENTIFIER): New macro.
9900 (initialize_p_decl): New variable.
9901 (priority_decl): Likewise.
9902 (ssdf_decl): Likewise.
9903 (priority_info_map): Likewise.
9904 (finish_file): Recode output of static intializers and other
9905 file-scope finalization tasks.
9906 * error.c (OB_END_TEMPLATE_ID): New macro.
9907 (dump_type_real): Use it.
9908 (dump_decl): Likewise.
9909 (dump_function_name): Likewise.
9910 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
9911 interface.
9912 (check_newline): Use walk_globals, not walk_vtables.
9913 * pt.c (pending_tempalte_expansions): Remove.
9914 (set_vardecl_interface_info): Likewise.
9915 (pending_templates): Make static.
9916 (maybe_templates): Likewise.
9917 (instantiate_class_template): Adjust call to finish_struct_1.
9918 (instantiate_pending_templates): New function.
9919 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
9920 * tree.c (static_aggregates_initp): Remove.
9921 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
9922 instead.
9923 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
9924
9925 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
9926 with the RTL code RETURN.
9927 * hash.h: Regenerated.
9928 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
9929 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
9930 * parse.c: Regenerated.
9931 * pt.c: Include varray.h. Include rtl.h since varray.h requires
9932 it.
9933 (inline_parm_levels): New variable.
9934 (inline_parm_levels_used): Likewise.
9935 (maybe_begin_member_template_processing): Update them.
9936 (maybe_end_member_template_processing): Use them, rather than
9937 guessing how many levels to pop.
9938
9939 * decl.c (make_typename_type): Tighten error-checking.
9940
9941 1999-04-20 Mark Mitchell <mark@codesourcery.com>
9942
9943 * cp-tree.h (build_binary_op): Remove unneeded parameter.
9944 * class.c (build_vrable_entry_ref): Adjust call to
9945 build_binary_op.
9946 * decl.c (expand_static_init): Likewise.
9947 (grokdeclarator): Likewise.
9948 (finish_function): Likewise.
9949 * decl2.c (delete_sanity): Likewise.
9950 (do_dtors): Likewise.
9951 (do_ctors): Likewise.
9952 * error.c (dump_type_suffix): Likewise.
9953 * expr.c (cplus_expand_expr): Likewise.
9954 * init.c (resolve_offset_ref): Likewise.
9955 (build_new): Likewise.
9956 (build_new_1): Likewise.
9957 (build_vec_delete_1): Likewise.
9958 (expand_vec_init_catch_clause): Likewise.
9959 (build_delete): Likewise.
9960 * pt.c (tsubst): Likewise.
9961 * rtti.c (synthesize_tinfo_fn): Likewise.
9962 * search.c (expand_upcast_fixups): Likewise.
9963 (expand_direct_vtbls_init): Likewise.
9964 * typeck.c (get_member_function_from_ptrfunc): Likewise.
9965 (build_binary_op_nodefault): Likewise.
9966 (point_int_sum): Likewise.
9967 (pointer_diff): Likewise.
9968 (build_unary_op): Likewise.
9969 (build_modify_expr): Likewise.
9970 (get_delta_difference): Likewise.
9971 (build_ptrmemfunc): Likewise.
9972 (expand_ptrmemfunc_cst): Likewise.
9973
9974 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
9975
9976 * decl.c (grokfndecl): Always call cplus_decl_attributes.
9977 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
9978
9979 1999-04-19 Mark Mitchell <mark@codesourcery.com>
9980
9981 * cp-tree.h (finish_static_data_member_decl): New function.
9982 * decl2.c (finish_static_data_member_decl): Split out from ...
9983 (grokfield): Here.
9984 * pt.c (instantiate_class_template): Use it here instead of
9985 trying to fake it.
9986 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
9987 finish_static_data_member_decl will do that. Explicit set
9988 DECL_EXTERNAL to match non-template processing.
9989
9990 1999-04-18 Mark Mitchell <mark@codesourcery.com>
9991
9992 * cp-tree.h (finish_class_definition): Add parameter.
9993 * parse.y (structsp): Use it. Don't call pop_scope here.
9994 * parse.c: Regenerated.
9995 * semantics.c (finish_class_definition): Pop it here.
9996
9997 1999-04-17 Mark Mitchell <mark@codesourcery.com>
9998
9999 * decl.c (xref_tag): Revise handling of nested template
10000 declarations.
10001 * pt.c (check_explicit_specialization): Tweak handling of friend
10002 templates in template classes.
10003 (tsubst_friend_class): Handle friend declarations for nested
10004 member template classes.
10005
10006 1999-04-16 Mark Mitchell <mark@codesourcery.com>
10007
10008 * class.c (finish_struct): Remove unused variable.
10009 (pushclass): Likewise.
10010 (invalidate_class_lookup_cache): Likewise.
10011 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
10012 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
10013 doesn't get obliterated.
10014 (make_typename_type): Handle template classes correctly.
10015
10016 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
10017 (storetags): Declare.
10018 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
10019 (pushclass): Likewise. Use storetags to install tag declarations,
10020 not pushtag.
10021 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
10022 * decl.c (storetags): Make it global.
10023 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
10024 implicit typename declaration.
10025 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
10026 * method.c (hack_identifier): Likewise.
10027 * search.c (lookup_member): Likewise.
10028
10029 * decl.c (warn_about_implicit_typename_lookup): New function.
10030 (lookup_name_real): Use it. Rework handling of implicit typename
10031 extension.
10032
10033 1999-04-15 Mark Mitchell <mark@codesourcery.com>
10034
10035 * cp-tree.h (lookup_nested_field): Remove.
10036 * class.c (push_nested_class): Handle UNION_TYPEs.
10037 (pop_nested_class): Likewise.
10038 * decl.c (lookup_name_real): Don't call lookup_nested_field.
10039 (start_decl): Use push_nested_class, not just pushclass.
10040 (cp_finish_decl): Use pop_nested_class, not just popclass.
10041 * search.c (lookup_nested_field): Remove.
10042
10043 * cp-tree.h (lang_type): Add documentation.
10044 * decl2.c (handle_class_head): Create template declarations here,
10045 as appropriate.
10046 * parse.y (class_head): Return whether or not we entered a new
10047 scope, as well as the type named.
10048 (named_class_head): Likewise.
10049 (named_complex_class_head_sans_basetype): Likewise.
10050 (structsp): Adjust accordingly. Pop scope when required.
10051 * parse.c: Regenerated.
10052 * pt.c (check_default_tmpl_args): Robustify.
10053 (redeclare_class_template): Likewise.
10054 (instantiate_class_template): An instantiation of an
10055 anonymous union is itself an anonymous union.
10056 * semantics.c (begin_class_definition): Don't create template
10057 declarations here.
10058
10059 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
10060
10061 * parse.y (after_type_declarator_intern): New nonterminal.
10062 (after_type_declarator): Use it.
10063 (direct_after_type_declarator): Likewise. Move above
10064 nonnested_type to fix reduce/reduce conflict resolution.
10065 (declmods): Reducing from just 'attributes' has EMPTY precedence.
10066 * Makefile.in (CONFLICTS): Update.
10067
10068 * decl.c (define_label): Downgrade error for jumping over a
10069 non-POD decl to pedwarn.
10070
10071 1999-04-14 Mark Mitchell <mark@codesourcery.com>
10072
10073 * cp-tree.h (popclass): Change declaration.
10074 (pop_nested_class): Likewise.
10075 (poplevel_class): Remove declaration.
10076 * call.c (convert_default_argument): Pass no arguments to
10077 popclass.
10078 * class.c (finish_struct_1): Likewise.
10079 (finish_struct): Likewise.
10080 (popclass): Remove argument. Simplify code accordingly.
10081 (pop_nested_class): Likewise.
10082 * decl.c (poplevel_class): Declare it here, and make it static.
10083 (poplevel): Handle class scopes.
10084 (poplevel_class): Don't take an rgument. Simplify.
10085 (pop_everything): Pass no arguments to pop_nested_class.
10086 (cp_finish_decl): Pass no arguments to popclass.
10087 (grokdeclarator): Pass no arguments to pop_nested_class.
10088 (finish_function): Likewise.
10089 * decl2.c (grokfield): Likewise.
10090 (pop_scope): Pass no arguments to popclass.
10091 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
10092 * pt.c (instantiate_class_template): Move call to pushclass, and
10093 document. Pass no arguments to popclass.
10094 (regenerate_decl_from_template): Likewise.
10095
10096 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
10097
10098 * typeck.c (build_unary_op): Handle taking the address of a unique
10099 bound non-static member function.
10100
10101 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
10102
10103 * lang-options.h (-Wdeprecated): New flag.
10104 * decl2.c (warn_deprecated): New flag.
10105 (lang_decode_option): Deprecated this-is-variable,
10106 external-templates, alt-external-templates.
10107 Support -Wdeprecated.
10108 * errfn.c (cp_deprecated): New function.
10109
10110 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
10111
10112 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
10113 of the decls themselves.
10114
10115 * pt.c (tsubst_function_type): Copy attributes over.
10116
10117 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
10118 and com_interface.
10119 * cp-tree.h: Add prototype.
10120 * decl.c (init_decl_processing): Set valid_lang_attribute.
10121
10122 1999-04-13 Mark Mitchell <mark@codesourcery.com>
10123
10124 * class.c (finish_struct_1): Look at the const-ness of the field's
10125 type, not the TREE_READONLY-ness of the declaration.
10126 * method.c (synthesize_method): Likewise.
10127 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
10128 creating new declarations.
10129
10130 1999-04-13 Mike Stump <mrs@wrs.com>
10131
10132 * decl2.c (import_export_decl): Because vtables always reference
10133 virtual functions, even if they are inlined, don't allow
10134 -fno-implement-inlines to not emit them, instead, emit them with
10135 the vtable.
10136 * decl.c (start_function): Likewise.
10137
10138 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
10139
10140 * cp-tree.h (struct lang_type): Add com_interface.
10141 (CLASSTYPE_COM_INTERFACE): New macro.
10142 * class.c (set_rtti_entry): COM interface classes have no RTTI
10143 entries in their vtables; adjust.
10144 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
10145 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
10146 finish_struct_1): Likewise.
10147 * decl2.c (mark_vtable_entries): Likewise.
10148 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
10149 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
10150 expand_upcast_fixups): Likewise.
10151 * tree.c (debug_binfo): Likewise.
10152
10153 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
10154 * typeck.c (comptypes): If we get it, ignore attributes.
10155 * class.c (instantiate_type): Use BASELINK_P. Change complain
10156 parameter to flags; 2 means ignore attributes.
10157 * call.c (build_op_delete_call): Pass it.
10158
10159 * decl.c (xref_tag): Only complain once about using a typedef-name
10160 with 'struct'. Downgrade to pedwarn.
10161
10162 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
10163
10164 * parse.y (absdcl_intern): New nonterminal.
10165 (absdcl, direct_abstract_declarator): Use it.
10166
10167 * pt.c (lookup_template_class): Look through implict typename.
10168
10169 1999-04-11 Mark Mitchell <mark@codesourcery.com>
10170
10171 * friend.c (add_friend): Deal gracefully with error_mark_node.
10172 * method.c (build_overload_value): Handle pointers-to-members as
10173 template parameters.
10174
10175 * decl.c (push_binding): Fix typo in comment.
10176
10177 1999-04-10 Mark Mitchell <mark@codesourcery.com>
10178
10179 * error.c (dump_type_real): If a typename is a template-id, put
10180 out the template arguments.
10181 (dump_expr): Handle TEMPLATE_ID_EXPR.
10182 * pt.c (lookup_template_class): Now that full arguments are
10183 available everywhere, remove code that tried to guess them.
10184
10185 1999-04-09 Mark Mitchell <mark@codesourcery.com>
10186
10187 * decl.c (make_typename_type): Complain if we don't find a type
10188 when trying to make a typename type for a non-template type.
10189
10190 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
10191
10192 * decl.c (start_decl): Pass attributes to grokdeclarator.
10193 (grokdeclarator): Handle attributes on constructor-syntax
10194 initializers.
10195
10196 1999-04-08 Mark Mitchell <mark@codesourcery.com>
10197
10198 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
10199 don't have types.
10200
10201 * search.c (template_self_reference_p): Tweak.
10202
10203 1999-04-07 Mark Mitchell <mark@codesourcery.com>
10204
10205 * init.c (build_offset_ref): Don't build yet another weird data
10206 structure to describe overloaded functions.
10207
10208 1999-04-06 Mark Mitchell <mark@codesourcery.com>
10209
10210 * cp-tree.h (BASELINK_P): New macro.
10211 (SET_BASELINK_P): Likewise.
10212 * init.c (build_member_call): Remove needless assignment in if
10213 statement.
10214 * search.c (lookup_field_r): Fix handling when we are looking
10215 specifically for a type; these are not hidden by functions and
10216 variables.
10217 (lookup_member): Use SET_BASELINK_P.
10218 * tree.c (is_overloaded_fn): Use BASELINK_P.
10219 (really_overloaed_fn): Likewise.
10220 (get_first_fn): Likewise.
10221
10222 1999-04-05 Mark Mitchell <mark@codesourcery.com>
10223
10224 * decl.c (lookup_name_current_level): Tweak, and improve
10225 documentation.
10226
10227 * class.c (maybe_fixup_vptrs): Remove declaration.
10228 (build_class_init_list): Likewise.
10229 * decl.c (pushdecl_class_level): Call check_template_shadow here
10230 ...
10231 (push_class_level_binding): ... not here.
10232 * search.c (dfs_push_type_decls): Only avoid
10233 template-self-reference TYPE_DECLs if they are from base classes.
10234
10235 1999-04-04 Mark Mitchell <mark@codesourcery.com>
10236
10237 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
10238 nodes. Tidy.
10239
10240 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
10241
10242 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
10243 (finish_struct_1): Don't call build_class_init_list.
10244
10245 1999-04-02 Mark Mitchell <mark@codesourcery.com>
10246
10247 * tinfo.h (__class_type_info): Fix illegal declaration.
10248
10249 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
10250 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
10251 (IDENTIFIER_CLASS_VALUE): Improve documentation.
10252 (is_properly_derived_from): Declare.
10253 (invalidate_class_lookup_cache): Likewise.
10254 (maybe_maybe_note_name_used_in_class): Likewise.
10255 (note_name_declared_in_class): Likewise.
10256 (push_using_decl): Remove duplicate declaration.
10257 (id_in_current_class): Remove declaration.
10258 (push_class_binding): Change prototype.
10259 (clear_identitifer_class_values): Declare.
10260 * call.c (is_properly_derived_from): Make it global.
10261 (build_new_function_call): Be careful about updating candidates.
10262 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
10263 asked to make illegal calls.
10264 * class.c: Include splay-tree.h.
10265 (class_stack_node): Add names_used slot.
10266 (check_member_decl_is_same_in_complete_scope): Remove.
10267 (add_method): Fix comment. Push the declaration into class
10268 scope.
10269 (finish_struct_1): When popping the class, pop the bindings too.
10270 Remove check for data member/function member conflict.
10271 (finish_struct): Remove calls to
10272 check_member_decl_is_same_in_complete_scope. Change calls to
10273 popclass.
10274 (pushclass): Clear names_used in the class stack entry.
10275 Use invalidate_class_lookup_cache to remove cached entries, rather
10276 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
10277 before entering a new class. Remove dead code. Don't mess with
10278 current_function_decl when pushing declarations.
10279 (invalidate_class_lookup_cache): New function, split out from ...
10280 (popclass): Here. Clean up names_used on our way out.
10281 (instantiate_type): Adjust.
10282 (build_self_reference): Don't push the declaration here.
10283 (maybe_note_name_used_in_class): New function.
10284 (note_name_declared_in_class): Likewise.
10285 * decl.c (add_binding): Change prototype.
10286 (find_class_binding_level): New function.
10287 (innermost_nonclass_level): Likewise.
10288 (current_binding_level): Update documentation.
10289 (inner_binding_level): Remove. Replace with current_binding_level
10290 throughout.
10291 (push_binding_level): Remove special handling of
10292 class_binding_level.
10293 (pop_binding_level): Likewise. Use find_class_binding_level.
10294 (suspend_binding_level): Likewise.
10295 (global_bindings_p): Use innermost_nonclass_level.
10296 (toplevel_bindings_p): Likewise.
10297 (namespace_bindings_p): Likewise.
10298 (pseudo_global_level_p): Likewise.
10299 (push_binding): Clear INHERITED_VALUE_BINDING_P.
10300 (add_binding): Check for illegal multiple declarations. Return a
10301 value indicating whether or not the new binding was legal.
10302 (push_local_binding): Skip over class binding levels. Check
10303 return value from add_binding.
10304 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
10305 note_name_declared_in_class.
10306 (pushlevel_class): Remove "fake out the rest of the compiler"
10307 code.
10308 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
10309 (clear_identifier_class_values): New function.
10310 (pop_from_top_level): Use it.
10311 (pop_everything): Tweak.
10312 (maybe_process_template_type_declaration): Don't push the
10313 declaration for the template here.
10314 (pushtag): Don't push tag declarations into class scope here.
10315 (pushdecl): Apply DeMorgan's law for readability.
10316 (pushdecl_class_level): Remove special-case code for
10317 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
10318 (push_class_level_bindng): Deal with inherited bindings.
10319 (lookup_name_real): Remove special-case code for
10320 TYPE_BEING_DEFINED, and some implicit typename magic.
10321 (grokdeclarator): Handle COMPONENT_REF for a template function.
10322 (build_enumerator): Don't call pushdecl_class_level here.
10323 (id_in_current_class): Remove.
10324 * decl2.c (grokfield): Don't call pushdecl_class_level or
10325 check_template_shadow.
10326 * errfn.c (cp_file_of): Don't declare.
10327 (cp_line_of): Likewise.
10328 * error.c (dump_decl): Handle an OVERLOAD.
10329 (cp_file_of): Likewise.
10330 (cp_line_of): Likewise.
10331 * init.c (build_member_call): Handle a COMPONENT_REF.
10332 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
10333 pushdecl_class_level.
10334 * method.c (hack_identifier): Build COMPONENT_REFs for references
10335 to member templates as well as member functions. Remove dead
10336 code.
10337 * parse.y (left_curly): Remove.
10338 (nonnested_type): Call maybe_note_name_used_in_class, not
10339 pushdecl_class_level.
10340 * parse.c: Regenerated.
10341 (nested_name_specifier_1): Likewise.
10342 * pt.c (check_explicit_specialization): Adjust, for robustness.
10343 (check_template_shadow): Handle OVERLOADs.
10344 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
10345 TEMPLATE_DECL, if appropriate.
10346 * search.c (envelope_add_decl): Remove.
10347 (dfs_pushdecls): Likewise.
10348 (dfs_compress_decls): Likewise.
10349 (dfs_push_decls): New function.
10350 (dfs_push_type_decls): Likewise.
10351 (setup_class_bindings): Likewise.
10352 (template_self_reference_p): Likewise.
10353 (lookup_field_r): Use it.
10354 (looup_member): Remove old comment. Deal with ambiguity.
10355 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
10356 and remove envelope processing.
10357 * semantics.c (begin_class_definition): Let pushclass push
10358 declarations for base classes.
10359 (finish_member_declaration): Push declarations into class scope.
10360 * typeck.c (build_component_ref): Just put an OVERLOAD into the
10361 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
10362 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
10363 * Makefile.in (class.o): Depend on splay-tree.h.
10364
10365 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
10366
10367 * cvt.c (convert_pointer_to_real): Use same_type_p.
10368 * typeck.c (comp_target_types): Use same_type_p.
10369
10370 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
10371
10372 * semantics.c (begin_inline_definitions,
10373 finish_inline_definitions): Rename from finish_default_args and
10374 begin_inline_definitions, respectively, to something that isn't a
10375 total lie. :)
10376 * parse.y (structsp): Adjust.
10377
10378 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
10379 (list_hash_lookup): Likewise.
10380 (hash_tree_chain): Adjust.
10381 * pt.c (tsubst): Adjust.
10382 (tsubst_arg_types): Use plain hash_tree_cons.
10383 * cp-tree.h (hash_tree_cons_simple): Lose.
10384 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
10385
10386 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10387
10388 * Makefile.in (hash.h): Generate using gperf language 'C', not
10389 'KR-C', so gperf uses the `const' keyword on strings.
10390
10391 * gxx.gperf (resword): Const-ify a char*.
10392
10393 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
10394
10395 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
10396 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
10397 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
10398 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
10399 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
10400 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
10401 tree.c: Adjust.
10402
10403 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
10404
10405 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
10406
10407 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
10408
10409 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
10410
10411 1999-03-27 Mark Mitchell <mark@codesourcery.com>
10412
10413 * cp-tree.h (add_friend): Declare.
10414 (add_friends): Likewise.
10415 * friend.c (add_friend): Make it global. Don't add to
10416 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
10417 (add_friends): Make it global.
10418 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
10419 befriending class is a template.
10420 * parse.y (component_decl_1): Fix typo in comment.
10421 * parse.c: Regenerated.
10422 * pt.c (instantiate_class_template): Use add_friend and
10423 add_friends rather that duplicating some of their functionality
10424 here.
10425
10426 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
10427
10428 * call.c (build_field_call): Unify 'this' and non-'this' cases.
10429
10430 * typeck.c (build_indirect_ref): Check for 'this' sooner.
10431
10432 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10433
10434 * call.c (op_error): Const-ify a char*.
10435 (add_candidate, source_type, add_warning): Add static prototype.
10436 (print_z_candidates): Const-ify a char*.
10437
10438 * class.c (resolve_address_of_overloaded_function,
10439 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
10440 (get_vtable_name, finish_struct_1): Const-ify a char*.
10441
10442 * cvt.c (convert_to_reference): Likewise.
10443
10444 * decl.c (redeclaration_error_message, record_builtin_type,
10445 record_unknown_type, member_function_or_else, bad_specifiers):
10446 Likewise.
10447 (find_binding, select_decl, unqualified_namespace_lookup,
10448 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
10449 Add static prototype.
10450 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
10451 implicitly_declare, record_builtin_java_type, define_function,
10452 grok_op_properties, tag_name): Const-ify a char*.
10453
10454 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
10455 (define_function, finish_builtin_type): Const-ify a char*.
10456 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
10457 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
10458 (file_name_nondirectory): Const-ify a char*.
10459 (init_filename_times): Don't prototype.
10460 (compiler_error): Prototype.
10461 (yyerror, init_repo): Const-ify a char*.
10462 (build_srcloc): Don't prototype.
10463 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
10464 Const-ify a char*.
10465 (warn_for_assignment): Don't prototype.
10466 (convert_for_initialization, readonly_error, check_for_new_type,
10467 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
10468 Const-ify a char*.
10469
10470 * decl2.c (acceptable_java_type, output_vtable_inherit,
10471 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
10472 merge_functions, decl_namespace, validate_nonmember_using_decl,
10473 do_nonmember_using_decl): Add static prototype.
10474 (lang_f_options): Const-ify a char*.
10475 (finish_builtin_type): Likewise.
10476 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
10477 prototype.
10478
10479 * errfn.c: Include cp-tree.h.
10480 (cp_thing): Add static prototype.
10481 (compiler_error): Don't protoptype.
10482 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
10483 passing it to `cp_thing'.
10484
10485 * error.c (interesting_scope_p): Add static prototype.
10486
10487 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
10488 a char*.
10489
10490 * init.c (compiler_error): Don't prototype.
10491 (member_init_ok_or_else): Const-ify a char*.
10492 (build_java_class_ref): Add static prototype.
10493
10494 * lex.c (compiler_error): Don't prototype.
10495 (get_time_identifier, interface_strcmp, extend_token_buffer,
10496 handle_cp_pragma): Const-ify a char*.
10497 (is_global, init_filename_times): Add static prototype.
10498 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
10499 (compiler_error): Change from fixed args to variable args.
10500 (yyerror): Const-ify a char*.
10501
10502 * parse.y (cond_stmt_keyword): Const-ify a char*.
10503 (parse_decl): Add static prototype.
10504
10505 * pt.c (template_args_equal, print_template_context): Likewise.
10506 (print_candidates, check_default_tmpl_args): Const-ify a char*.
10507 (instantiate_class_template): Likewise.
10508
10509 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
10510
10511 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
10512 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
10513
10514 * search.c (lookup_field_info, lookup_member): Likewise.
10515 (lookup_member): Cast the first argument of `bzero' to a PTR.
10516
10517 * sig.c (compiler_error): Don't prototype.
10518 (build_signature_pointer_or_reference_nam): Const-ify a char*.
10519 (get_sigtable_name, build_member_function_pointer): Likewise.
10520
10521 * tree.c (compiler_error): Don't prototype.
10522 (no_linkage_helper, build_srcloc): Add static prototype.
10523 (build_vbase_pointer_fields): Const-ify a char*.
10524 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
10525
10526 * typeck.c (compiler_error): Don't prototype.
10527 (convert_for_assignment): Const-ify a char*.
10528 (comp_cv_target_types): Add static prototype.
10529 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
10530 build_component_addr, build_unary_op, convert_for_initialization):
10531 Const-ify a char*.
10532
10533 * typeck2.c (ack): Add static prototype and change from fixed args
10534 to variable args.
10535 (readonly_error, check_for_new_type): Const-ify a char*.
10536
10537 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
10538 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
10539 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
10540 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
10541 gen_assign, GNU_xref_member): Const-ify a char*.
10542
10543 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
10544
10545 * gxxint.texi: Remove old discussion on copying virtual bases.
10546
10547 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
10548
10549 * Make-lang.in: Remove all references to g++.o/g++.c.
10550 Link g++ from gcc.o.
10551
10552 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
10553
10554 * decl2.c (comdat_linkage): Treat vtables like functions.
10555
10556 1999-03-25 Mark Mitchell <mark@codesourcery.com>
10557
10558 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
10559
10560 1999-03-25 Nathan Sidwell <nathan@acm.org>
10561
10562 * decl.c (init_decl_processing): Add `signed' type as a synonym
10563 for `int'.
10564
10565 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
10566
10567 * typeck.c (common_type): Handle cv-qual unification for pointers
10568 to members.
10569
10570 * decl.c (unqualified_namespace_lookup): Return error_mark_node
10571 on error.
10572 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
10573 * lex.c (do_identifier): If we got error_mark_node, call
10574 lookup_name again.
10575
10576 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
10577
10578 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
10579 classes.
10580
10581 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
10582
10583 * decl.c (lookup_name_real): Do nested field lookup regardless of
10584 TYPE_BEING_DEFINED.
10585
10586 1999-03-24 Mark Mitchell <mark@codesourcery.com>
10587
10588 * cp-tree.h (lang_type): Remove has_assignment and
10589 has_real_assignment. Add befriending_classes.
10590 (TYPE_HAS_ASSIGNMENT): Remove.
10591 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
10592 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
10593 (lang_decl): Document.
10594 (DECL_BEFRIENDING_CLASSES): New macro.
10595 (FRIEND_NAME): Move declaration to more obvious location.
10596 (FRIEND_DECLS): Likewise.
10597 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
10598 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
10599 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
10600 (grok_op_properties): Likewise.
10601 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
10602 (add_friend): Likewise. Don't do weird things with assignment
10603 operators. Update DECL_BEFRIENDING_CLASSES.
10604 (add_friends): Don't do weird things with assignment operators.
10605 (make_friend_class): Likewise. Update
10606 CLASSTYPE_BEFRIENDING_CLASSES.
10607 * pt.c (instantiate_class_template): Don't set
10608 TYPE_HAS_ASSIGNMENT.
10609 (tsubst_copy): Substitute the TREE_TYPE for more unary
10610 expressions.
10611 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
10612 * search.c (protected_accessible_p): New function.
10613 (friend_accessible_p): Likewise.
10614 (accessible_p): Use them.
10615
10616 1999-03-23 Mark Mitchell <mark@codesourcery.com>
10617
10618 * pt.c (convert_nontype_argument): Don't create things that aren't
10619 PTRMEM_CSTs when applying a qualification conversion to a
10620 PTRMEM_CST.
10621
10622 1999-03-23 Mark Mitchell <mark@codesourcery.com>
10623
10624 * Makefile.in (OBJS): Don't mention hash.o.
10625 (OBJDEPS): Likewise.
10626
10627 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
10628
10629 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
10630 * decl.c (expand_static_init): Make sure we don't add any after
10631 then.
10632
10633 * decl.c (cp_finish_decl): Move intelligence about handling
10634 DECL_COMDAT for variables from here...
10635 * decl2.c (comdat_linkage): ...to here.
10636 (maybe_make_one_only): Tweak.
10637 (import_export_decl): Call comdat_linkage for variables, too.
10638 (finish_file): Handle template statics properly.
10639
10640 1999-03-22 Mark Mitchell <mark@codesourcery.com>
10641
10642 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
10643 Document internals of pointer-to-member-functions.
10644 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
10645 (PFN_FROM_PTRMEMFUNC): Likewise.
10646 (build_type_conversion): Remove unused parameter.
10647 (build_ptrmemfunc1): Declare.
10648 (expand_ptrmemfunc_cst): New function.
10649 (delta2_from_ptrmemfunc): Likewise.
10650 (pfn_from_ptrmemfunc): Likewise.
10651 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
10652 build_type_conversion. Use TYPE_PTRMEM_P for readability.
10653 (convert_to_reference): Remove unused parameter to
10654 build_type_conversion.
10655 (ocp_convert): Likewise.
10656 (build_user_type_conversion): Likewise.
10657 * error.c (dump_expr): Handle NULL pointer-to-member functions.
10658 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
10659 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
10660 open when handling pointer-to-member functions.
10661 * pt.c (convert_nontype_argument): Clean up error messages. Be
10662 more stringent with pointers-to-members.
10663 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
10664 (build_unary_op): Tidy ever-so-slightly.
10665 (build_conditional_expr): Remove extra parameter to
10666 build_type_conversion.
10667 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
10668 we're using.
10669 (expand_ptrmemfunc_cst): Define.
10670 (delta2_from_ptrmemfunc): Likewise.
10671 (pfn_from_ptrmemfunc): Likewise.
10672
10673 1999-03-19 Mark Mitchell <mark@codesourcery.com>
10674
10675 * init.c (build_member_call): Handle template-id expressions
10676 correctly.
10677 * typeck.c (build_x_function_call): Likewise.
10678
10679 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
10680
10681 * friend.c (make_friend_class): Avoid core dump when
10682 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
10683
10684 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
10685
10686 * decl.c (start_function): Suppress normal linkage heuristics
10687 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
10688
10689 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
10690
10691 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
10692 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
10693
10694 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
10695
10696 * parse.y (named_complex_class_head_sans_basetype):
10697 Do not push a scope for error_mark_node.
10698 (maybe_base_class_list): Likewise.
10699
10700 * decl.c (start_decl): Check for error_mark_node as a type.
10701 Detected by g++.brendan/array-refs.C.
10702 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
10703 (maybe_build_cleanup_1): Likewise. Detected by
10704 g++.jason/incomplete1.C.
10705
10706 * tree.c (build_dummy_object): Use void_zero_node instead of the
10707 error_mark_node.
10708 (is_dummy_object): Check for such a node.
10709 Detected by g++.bob/inherit1.C
10710
10711 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
10712
10713 * method.c (old_backref_index): Split out...
10714 (flush_repeats): From here. Rename back from try_old_backref.
10715 (build_mangled_name): Put back some old-style repeat handling.
10716
10717 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10718
10719 * lex.c: Don't include setjmp.h.
10720 (parse_float): New static function.
10721 (pf_args): New struct.
10722 (real_yylex): Use them in call to `do_float_handler'.
10723
10724 1999-03-15 Mark Mitchell <mark@markmitchell.com>
10725
10726 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
10727 * tree.c (layout_basetypes): Not here.
10728 * search.c (dfs_search): Remove; no longer used.
10729
10730 1999-03-12 Mark Mitchell <mark@markmitchell.com>
10731
10732 * decl2.c (validate_nonmember_using_decl): Issue sensible
10733 error-messages on bogus qualifiers.
10734
10735 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
10736
10737 * call.c (add_function_candidate): Fix uninitialized variable.
10738
10739 * Makefile.in (search.o): Add dependency on varray.h.
10740
10741 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
10742
10743 * decl.c (duplicate_decls): Use same_type_p.
10744 * method.c (try_old_backref): Renamed from flush_repeats. Use
10745 same_type_p. Don't try to handle repeats. Return success.
10746 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
10747 calls from old-style code, too.
10748 (check_ktype): Use same_type_p.
10749 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
10750 (build_qualified_name): Simplify logic.
10751 (process_overload_item): Strip typedefs and quals at the top.
10752 (build_mangled_name_for_type_with_Gcode): Remove call to
10753 type_canonical_variant.
10754 (build_mangled_name): Likewise. Remove support for old-style
10755 repeats, which have been disabled since 2.7.2. Don't mess with
10756 TREE_USED.
10757 (build_decl_overload_real): Don't mess with TREE_USED.
10758
10759 1999-03-13 Nathan Sidwell <nathan@acm.org>
10760
10761 * error.c (cp_printers): Add 'F' escape character.
10762 (dump_type_real): Remove TREE_LIST (fnargs) printing.
10763 Functionality moved to dump_parameters.
10764 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
10765 (dump_function_decl): Extend meaning of V parameter. Use
10766 dump_parameters and dump_exception_spec.
10767 (dump_parameters): New static function.
10768 (dump_exception_spec): New static function.
10769 (fndecl_as_string): Change argument semantics. Use
10770 dump_function_decl directly.
10771
10772 * sig.c (build_signature_table_constructor): Use cp_error.
10773
10774 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
10775
10776 * semantics.c (finish_switch_cond): Handle error cases gracefully.
10777 Detected by g++.law/enum5.C.
10778
10779 * typeck.c (build_modify_expr): Check for errors after resolving
10780 offsets. Detected by g++.brendan/static1.C.
10781
10782 * decl.c (complete_array_type): Ignore initial_value if it is an
10783 error. Detected by g++.benjamin/17930.C.
10784
10785 * typeck2.c (process_init_constructor): Return error if one argument
10786 is in error. Detected by g++.benjamin/13478.C.
10787
10788 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
10789
10790 * decl.c (select_decl): Allow class templates when we need types.
10791 * decl2.c (ambiguous_decl): Likewise.
10792
10793 1999-03-12 Mark Mitchell <mark@markmitchell.com>
10794
10795 * lex.c (do_identifier): Correct call to enforce_access.
10796 * search.c (accessible_p): Tweak comment.
10797
10798 1999-03-10 Mark Mitchell <mark@markmitchell.com>
10799
10800 * semantics.c (begin_class_definition): Call build_self_reference.
10801 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
10802
10803 * search.c (assert_canonical_unmarked): Fix typo in prototype.
10804
10805 * search.c (dfs_canonical_queue): New function.
10806 (dfs_assert_unmarked_p): Likewise.
10807 (assert_canonical_unmarked): Likewise.
10808 (access_in_type): Use it.
10809 (accessible_p): Likewise. Walk the whole tree when umarking.
10810
10811 * sig.c (build_signature_table_constructor): Use accessible_p
10812 instead of compute_access.
10813
10814 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
10815
10816 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
10817
10818 1999-03-09 Mark Mitchell <mark@markmitchell.com>
10819
10820 * cp-tree.h (flag_access_control): Declare.
10821 (TREE_VIA_PPUBLIC): Document.
10822 (DECL_NONSTATIC_MEMBER_P): New macro.
10823 (enforce_access): Return an indication of whether or not access
10824 was permitted.
10825 (build_self_reference): Change prototype.
10826 (compute_access): Replace with ...
10827 (accessible_p): New function.
10828 (dfs_walk): Change prototype.
10829 (dfs_unmark): Likewise.
10830 (markedp): Likewise.
10831 * call.c (enforce_access): Use accessible_p.
10832 * class.c (build_self_reference): Insert the declaration into the
10833 list of members for this type, and make it public.
10834 * decl.c (xref_basetypes): Avoid ill-timed recursion.
10835 * init.c (build_offset_ref): Use lookup_member, not three separate
10836 name-lookups. Call enforce_access rather than checking for
10837 illegal accesses here.
10838 (resolve_offset_ref): Likewise.
10839 * lex.c (do_identifier): Likewise.
10840 * method.c (hack_identifier): Likewise.
10841 * parse.y (self_reference): Remove.
10842 (opt_component_decl_list): Don't use it.
10843 * parse.c: Regenerated.
10844 * pt.c (print_candidates): Generalize to handle lists of
10845 overloaded functions.
10846 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
10847 not set.
10848 (get_template_base): Use new calling convention for dfs_walk.
10849 * search.c: Include varray.h. Add prototypes.
10850 (dfs_walk): Accept a data pointer to pass to the work functions.
10851 All callers changed. All work functions changed.
10852 (breadth_first_search): Rename to bfs_walk, and make consistent
10853 with dfs_walk.
10854 (dfs_walk_real): New function.
10855 (canonical_binfo): New function.
10856 (context_for_name_lookup): Likewise.
10857 (shared_marked_p): Likewise.
10858 (shared_unmarked_p): Likewise.
10859 (lokup_field_queue_p): Likewise.
10860 (lookup_field_r): Generalize to handle both functions and fields.
10861 (lookup_field): Just call lookup_member.
10862 (lookup_fnfields): Likewise.
10863 (lookup_member): Move body of lookup_field here and generalize.
10864 (dfs_accessible_queue_p): Likewise.
10865 (dfs_accessible_p): Likewise.
10866 (dfs_access_in_type): Likewise.
10867 (access_in_type): Likewise.
10868 (compute_access): Remove, and replace with ...
10869 (accessible_p): New function.
10870 (vbase_types): Remove.
10871 (vbase_decl_ptr_intermediate): Likewise.
10872 (vbase_decl_ptr): Likewise.
10873 (vbase_init_result): Likewise.
10874 (closed_envelopes): Likewise.
10875 (bvtable): Likewise.
10876
10877 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
10878
10879 * call.c (add_function_candidate): Check for proper number of args
10880 before checking the validity of those args.
10881
10882 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
10883
10884 * cp-tree.h (struct lang_type): Add anon_union field.
10885 (ANON_UNION_TYPE_P): Use it instead of examining type.
10886 (SET_ANON_UNION_TYPE_P): New macro.
10887 * decl.c (check_tag_decl): Use it.
10888
10889 * search.c (compute_access): Handle non-type contexts earlier, and
10890 handle NULL_TREE.
10891
10892 * tree.c (build_exception_variant): Use copy_to_permanent.
10893
10894 * decl2.c (setup_initp): Give statics with no priority the default
10895 priority here.
10896 (do_dtors, do_ctors, finish_file): Remove special handling of
10897 non-prioritized statics.
10898
10899 1999-03-05 Mark Mitchell <mark@markmitchell.com>
10900
10901 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
10902 * decl.c (make_typename_type): Don't issue an error if an
10903 immediate lookup fails; it migt be resolved later.
10904 * friend.c (is_friend): Add comment.
10905 * search.c (breadth_first_search): Add POSTFN and DATA
10906 parameters. Tidy. All callers changed.
10907 (lookup_field_queue_p): New function.
10908 (lookup_field_r): Likewise.
10909 (lookup_field_post): Likewise.
10910 (lookup_field): Use them, via breadth_first_search, instead of
10911 duplicating logic.
10912 (compute_access): Robustify.
10913 (lookup_fnfield_info): New structure.
10914
10915 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
10916
10917 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
10918
10919 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
10920
10921 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
10922 cc happy.
10923
10924 * decl2.c (import_export_class): Also return if
10925 CLASSTYPE_INTERFACE_ONLY is set.
10926
10927 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
10928
10929 * decl.c (push_overloaded_decl): Only overwrite the old binding if
10930 there was one.
10931 * decl2.c (do_local_using_decl): Fix loop termination.
10932
10933 1999-03-02 Mark Mitchell <mark@markmitchell.com>
10934
10935 * cp-tree.h (determine_specialization): Don't declare.
10936 * pt.c (determine_specialization): Make it static. Eliminate
10937 complain parameter. Note that decl is always non-NULL now, and
10938 simplify accordingly.
10939
10940 * decl.c (maybe_push_to_top_level): Always call
10941 push_cp_function_context.
10942 (pop_from_top_level): Always call pop_cp_function_context.
10943
10944 1999-02-26 Nathan Sidwell <nathan@acm.org>
10945
10946 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
10947 diagnostics.
10948 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
10949 * init.c (build_new_1): Extra arg to complete_type_or_else.
10950 (build_delete): Likewise.
10951 * typeck.c (require_complete_type): Likewise.
10952 (pointer_int_sum): Likewise.
10953 (pointer_diff): Likewise.
10954 (build_component_ref): Likewise.
10955
10956 * typeck2.c (incomplete_type_error): Always use cp_error.
10957 Show declaration of undefined type, if appropriate.
10958 Deal with UNKNOWN_TYPE nodes.
10959
10960 * typeck.c (require_complete_type): Use TYPE_SIZE as
10961 size_zero_node to mean incomplete type.
10962 (require_complete_type_in_void): New function.
10963 (build_compound_expr): Call complete_type_in_void for LHS.
10964 (build_c_cast): Call complete_type_in_void for void cast.
10965 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
10966 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
10967 require_complete_type_in_void. Call it.
10968 * cp-tree.h (require_complete_type_in_void): Prototype new function.
10969
10970 * typeck.c (convert_arguments): Use alternative format for
10971 function decls. Don't require_complete_type here. Simplify
10972 diagnostic printing.
10973 (convert_for_initialization): Don't require_complete_type on RHS yet.
10974 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
10975
10976 * call.c (build_over_call): Cope with qualified void return type.
10977 * semantics.c (finish_call_expr): Likewise.
10978 * typeck.c (build_function_call_real): Likewise.
10979 (c_expand_return): Likewise.
10980 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
10981
10982 * call.c (print_z_candidates): Use alternate print format, to be
10983 consistent with (pt.c) print_candidates.
10984 * method.c (hack_identifier): List candidate members.
10985 * search.c (lookup_field): Build ambiguous list, and show it, if
10986 ambiguous.
10987
10988 1999-02-26 Mark Mitchell <mark@markmitchell.com>
10989
10990 * typeck.c (decay_conversion): Don't confuse constant array
10991 variables with their initializers.
10992
10993 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
10994 merging decls.
10995 * pt.c (regenerate_decl_from_template): Tweak for clarity.
10996 (instantiate_decl): Mark a decl instantiated before regenerating
10997 it to avoid recursion.
10998 * tree.c (mapcar): Don't call decl_constant_value unless we know
10999 something is TREE_READONLY_DECL_P.
11000
11001 * class.c (check_for_override): Don't stop checking when we find
11002 the first overridden function. Delete #if 0'd code.
11003 * search.c (get_matching_virtual): Likewise.
11004
11005 1999-02-25 Richard Henderson <rth@cygnus.com>
11006
11007 * lang-specs.h: Define __FAST_MATH__ when appropriate.
11008
11009 1999-02-24 Mike Stump <mrs@wrs.com>
11010
11011 * typeck.c (convert_for_assignment): Allow boolean integral constant
11012 expressions to convert to null pointer.
11013
11014 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
11015
11016 * decl.c (lookup_namespace_name): Resolve namespace aliases.
11017
11018 * class.c (push_nested_class): Allow namespaces.
11019
11020 * decl2.c (set_decl_namespace): Add friendp parameter.
11021 * decl.c (grokfndecl): Pass it.
11022 (grokvardecl): Likewise.
11023 * cp-tree.h: Change declaration.
11024
11025 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
11026
11027 * pt.c (tsubst): Allow an array of explicit size zero.
11028
11029 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
11030
11031 * errfn.c: Change varargs code to look like toplev.c.
11032
11033 * method.c (process_modifiers): Don't prepend 'U' for char or
11034 wchar_t.
11035
11036 1999-02-20 Craig Burley <craig@jcb-sc.com>
11037
11038 * Make-lang.in (cplib2.ready): Don't consider updating
11039 cplib2 stuff if the current directory isn't writable, as
11040 it won't work (such as during a `make install').
11041
11042 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
11043
11044 * decl2.c (start_objects): Make file scope constructors and
11045 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
11046 ASM_OUTPUT_DESTRUCTOR are defined.
11047
11048 1999-02-19 Mark Mitchell <mark@markmitchell.com>
11049
11050 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
11051 (fn_type_unification): Adjust prototype.
11052 (lookup_fnfields_1): Declare.
11053 * call.c (add_template_candidate_real): Adjust call to
11054 fn_type_unification.
11055 * class.c (add_method): Don't allow duplicate declarations of
11056 constructors or destructors.
11057 (resolve_address_of_overloaded_function): Remove unused variable.
11058 Adjust call to fn_type_unification.
11059 * decl.c (grokfndecl): Be more robust in the face of illegal
11060 specializations.
11061 * decl2.c (check_classfn): Remove hokey handling of member
11062 templates.
11063 * pt.c (determine_specialization): Improve comments. Adjust to
11064 handle template argument deduction as per the standard.
11065 (check_explicit_specialization): Fix comment spacing. Handle
11066 type-conversion operators correctly. Improve error-recovery.
11067 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
11068 (get_bindings_real): Simplify handling of static members.
11069 * search.c (lookup_fnfields_1): Make it have external linkage.
11070 * typeck.c (compparms): Fix comment.
11071 (build_unary_op): Don't try to figure out which template
11072 specialization is being referred to when when the address-of
11073 operator is used with a template function.
11074
11075 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11076
11077 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
11078 keyword to match an analogous change at the top level.
11079
11080 * tree.c (lvalue_or_else): Likewise.
11081
11082 1999-02-17 Mark Mitchell <mark@markmitchell.com>
11083
11084 * decl.c (xref_basetypes): Comment.
11085 * pt.c (instantiate_class_template): Use xref_basetypes.
11086
11087 1999-02-16 Mark Mitchell <mark@markmitchell.com>
11088
11089 * cp-tree.h (tsubst): Change prototype.
11090 (tsubst_expr): Likewise.
11091 (tsubst_copy): Likewise.
11092 (type_unification): Remove prototype.
11093 * call.c (convert_default_arg): Adjust call to tsubst_expr.
11094 * class.c (resolve_address_of_overloaded_function): Just use
11095 fn_type_unification.
11096 * decl.c (grokdeclarator): Adjust call to tsubst.
11097 * method.c (build_template_parm_names): Likewise.
11098 * pt.c (GTB_VIA_VIRTUAL): New macro.
11099 (GTB_IGNORE_TYPE): Likewise.
11100 (resolve_overloaded_unification): Add `complain' parameter.
11101 (try_one_overload): Likewise.
11102 (tsubst_template_arg_vector): Likewise.
11103 (tsubst_template_parms): Likewise.
11104 (tsubst_aggr_type): Likewise.
11105 (tsubst_arg_types): Likewise.
11106 (tsubst_call_declarator_parms): Likewise.
11107 (unify): Remove explicit_mask.
11108 (type_unification_real): Likewise.
11109 (get_template_base_recursive): Likewise.
11110 (coerce_template_template_parms): Provide prototype.
11111 (tsubst_function_type): Likewise.
11112 (try_class_unification): New function.
11113 All callers changed to use new complain parameter.
11114 (get_template_base): Use try_class_unification.
11115 (unify): Adjust handling of classes derived from template types.
11116 (fn_type_unification): Substitute explicit arguments before
11117 unification.
11118
11119 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11120
11121 * decl.c (pushdecl): Remove dead code.
11122
11123 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
11124
11125 * decl2.c (finish_objects): Fix code I missed in previous change.
11126
11127 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
11128
11129 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
11130 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
11131
11132 * pt.c (maybe_process_partial_specialization): Complain about
11133 'template <>' on non-specialization.
11134
11135 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
11136
11137 * decl.c (grokdeclarator): Catch wierd declarators.
11138 * decl2.c (finish_file): Don't abort because of namespace parsing
11139 failure.
11140 (check_decl_namespace): Remove.
11141
11142 1999-02-09 Mark Mitchell <mark@markmitchell.com>
11143
11144 * cp-tree.h (get_template_base): Don't declare.
11145 (dfs_walk): Declare.
11146 (dfs_unmark): Likewise.
11147 (markedp): Likewise.
11148 * pt.c (unify): Remove duplicate declaration. Pass tparms and
11149 targs to get_template_base.
11150 (get_template_base_recursive): Move here from search.c. Check to
11151 see that the base found can be instantiated to form the desired
11152 type.
11153 (get_template_base): Likewise.
11154 (get_class_bindings): Simplify.
11155 * search.c (get_template_base_recursive): Move to pt.c.
11156 (get_template_base): Likewise.
11157 (markedp): Make it global.
11158 (dfs_walk): Likewise.
11159 (dfs_unmark): Likewise.
11160
11161 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
11162
11163 * pt.c (maybe_process_partial_specialization): Complain about
11164 specialization in wrong namespace.
11165 * tree.c (decl_namespace_context): New fn.
11166
11167 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11168
11169 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
11170 * pt.c (coerce_template_template_parms): Handle nested
11171 template template parameters.
11172
11173 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
11174
11175 * typeck2.c: Update email addresses.
11176
11177 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11178
11179 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
11180 turned off.
11181
11182 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
11183
11184 * lex.c (retrofit_lang_decl): Split out...
11185 (build_lang_decl): From here.
11186 * decl.c (pushdecl): Call it for functions generated by the middle
11187 end that don't have DECL_LANG_SPECIFIC.
11188 * cp-tree.h: Declare it.
11189
11190 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
11191 (start_objects, finish_objects): Only use special
11192 init_priority code if the user specified a priority.
11193 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
11194 objects.
11195
11196 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
11197
11198 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
11199 mkstemp.o. Get them from libiberty now.
11200 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
11201
11202 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11203
11204 * decl2.c (lang_decode_option): Use read_integral_parameter.
11205
11206 1999-02-01 Mark Mitchell <mark@markmitchell.com>
11207
11208 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
11209 before calling complete_type_or_else.
11210
11211 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11212
11213 * input.c (inline): Don't define, its handled by system.h.
11214
11215 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
11216
11217 * decl2.c: Don't define flag_no_ident here. Don't process
11218 -f(no-)ident here.
11219 * cp-tree.h: Don't declare flag_no_ident here.
11220 * lang-specs.h: Map -Qn to -fno-ident.
11221
11222 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
11223
11224 * cp-tree.h (struct tree_binding): Replace scope field with a union.
11225 (BINDING_SCOPE): Adjust.
11226 * decl.c (BINDING_LEVEL): Adjust.
11227
11228 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
11229
11230 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
11231 member constants.
11232
11233 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
11234 a ctor initializer.
11235
11236 * tree.c (equal_functions): Fix name in prototype.
11237
11238 * decl.c (push_local_binding): Add FLAGS argument.
11239 (pushdecl, push_overloaded_decl): Pass it.
11240 * decl2.c (do_local_using_decl): Likewise.
11241 * cp-tree.h: Adjust prototype.
11242 * decl.c (poplevel): Fix logic.
11243
11244 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
11245 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
11246 (cat_namespace_levels): Don't loop forever.
11247
11248 1999-01-25 Richard Henderson <rth@cygnus.com>
11249
11250 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
11251
11252 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
11253
11254 * class.c (resolve_address_of_overloaded_function): Mark the
11255 chosen function used.
11256
11257 * call.c (build_call): Make sure that a function coming in has
11258 been marked used already.
11259 * decl.c (expand_static_init): Call mark_used instead of
11260 assemble_external.
11261 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
11262 alloc_eh_object, expand_throw): Likewise.
11263 * init.c (build_builtin_delete_call): Likewise.
11264 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
11265 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
11266 expand_generic_desc): Likewise.
11267
11268 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
11269
11270 * tree.c (equal_functions): New function.
11271 (ovl_member): Call it.
11272
11273 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
11274
11275 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
11276
11277 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
11278
11279 * decl.c (decls_match): Return 1 if old and new are identical.
11280 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
11281
11282 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
11283
11284 * decl.c (start_function): Make member functions one_only on windows.
11285 * decl2.c (import_export_decl): Likewise.
11286
11287 * decl.c (grokdeclarator): Don't complain about implicit int in
11288 a system header. Change same-name field check to not complain in
11289 a system header instead of within extern "C".
11290
11291 1999-01-21 Mark Mitchell <mark@markmitchell.com>
11292
11293 * cp-tree.h (PUSH_GLOBAL): New macro.
11294 (PUSH_LOCAL): Likewise.
11295 (PUSH_USING): Likewise.
11296 (namespace_bindings_p): Declare.
11297 (push_overloaded_decl): Likewise.
11298 * decl.c (push_overloaded_decl): Don't make it static. Check for
11299 illegal declarations after using declarations here.
11300 (namespace_bindings_p): Likewise.
11301 (duplicate_decls): Don't consider declarations from different
11302 namespaces to be the same.
11303 (pushdecl): Use symbolic PUSH_ constants in calls to
11304 push_overloaded_decl.
11305 (push_overloaded_decl_1): Likewise.
11306 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
11307 (do_nonmember_using_decl): Check for illegal using declarations
11308 after ordinary declarations here.
11309 (do_local_using_decl): Call pushdecl to insert declarations.
11310
11311 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
11312
11313 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
11314
11315 1999-01-21 Mark Mitchell <mark@markmitchell.com>
11316
11317 * tree.c (build_cplus_array_type_1): Don't call build_array_type
11318 for types involving template parameters.
11319
11320 * cp-tree.h (PARM_DECL_EXPR): Delete.
11321 (convert_default_arg): Change prototype.
11322 (check_default_argument): Declare.
11323 (search_tree): Likewise.
11324 * call.c (convert_default_arg): Take the function to which the
11325 default argument belongs as a parameter, and do any necessary
11326 instantiation here, instead of ...
11327 (build_over_call): Here.
11328 * decl.c (local_variable_p): New function.
11329 (check_default_argument): Likewise, split out and tidied from ...
11330 (grokparms): Here.
11331 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
11332 * pt.c (tsubst_call_declarator_parms): New function.
11333 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
11334 with CALL_EXPRs, rather than trying to be clever.
11335 (tsubst): Use tsubst_call_declarator_parms.
11336 * tree.c (search_tree): Don't make it static.
11337 * typeck.c (convert_arguments): Use new interface to
11338 convert_default_arg.
11339
11340 1999-01-20 Mark Mitchell <mark@markmitchell.com>
11341
11342 * error.c (dump_function_decl): Don't print the argument types for
11343 a function when the verbosity level is negative.
11344
11345 * call.c (build_over_call): Check format attributes at call-time.
11346
11347 * pt.c (tsubst_copy): Fix comment.
11348 (unify): Don't allow unification with variable-sized arrays.
11349
11350 * semantics.c (finish_stmt_expr): When processing a template make
11351 the BIND_EXPR long-lived.
11352
11353 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
11354
11355 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
11356 (import_export_vtable): Not here.
11357
11358 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
11359
11360 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
11361 non-static member function.
11362
11363 1999-01-18 Nathan Sidwell <nathan@acm.org>
11364
11365 * class.c (instantiate_type): Only diagnose illegal address of member
11366 function if complaining.
11367
11368 * decl.c (lookup_name_real): Remove duplicate code.
11369
11370 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
11371
11372 * tree.c (copy_template_template_parm): Use permanent_obstack.
11373
11374 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11375
11376 * pt.c (unify): Remove restrictions on deduction of argument
11377 of template template parameters.
11378
11379 1999-01-18 Nathan Sidwell <nathan@acm.org>
11380
11381 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
11382
11383 * class.c (resolve_address_of_overloaded_function): Show list of
11384 all candidates, when none of them match.
11385
11386 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
11387
11388 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
11389 definition of 'casting away const' in reinterpret_cast<>.
11390
11391 1999-01-18 Graham <grahams@rcp.co.uk>
11392
11393 * cvt.c: Add include for decl.h, remove extern for
11394 static_aggregates which is now provided by decl.h.
11395
11396 * Makefile.in (cvt.o): Add dependency for decl.h and missing
11397 dependencies for convert.h and flags.h.
11398
11399 1999-01-18 Nathan Sidwell <nathan@acm.org>
11400
11401 * decl2.c (do_dtors): Set current location to that of the
11402 decl, for sensible diagnostics and debugging.
11403 (check_classfn): Issue `incomplete type' error, if
11404 class is not defined.
11405
11406 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
11407
11408 * cp-tree.h: Add prototype for bound_pmf_p.
11409
11410 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
11411 Manfred Hollstein <manfred@s-direktnet.de>
11412
11413 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
11414 -Wreturn-type.
11415
11416 1999-01-16 Nathan Sidwell <nathan@acm.org>
11417
11418 * cp-tree.h (struct lang_type): Added has_mutable flag.
11419 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
11420 (TYPE_HAS_MUTABLE_P): New macro to read it.
11421 (cp_has_mutable_p): Prototype for new function.
11422 * class.c (finish_struct_1): Set has_mutable from members.
11423 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
11424 it contains a mutable.
11425 * typeck.c (cp_has_mutable_p): New function.
11426
11427 1999-01-15 Mark Mitchell <mark@markmitchell.com>
11428
11429 * pt.c (process_template_parm): Ignore top-level qualifiers on
11430 non-type parameters.
11431
11432 * decl.c (start_function): Use current_function_parms in the call
11433 to require_complete_type_for_parms, not the probably empty
11434 DECL_ARGUMENTS.
11435
11436 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
11437
11438 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
11439
11440 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
11441 that we don't suppress the other copies.
11442 * lex.c (handle_cp_pragma): Likewise.
11443
11444 1999-01-13 Mark Mitchell <mark@markmitchell.com>
11445
11446 * decl.c (grokdeclarator): Undo 1998-12-14 change.
11447 * tree.c (build_cplus_array_type_1): Likewise.
11448 * pt.c (instantiate_class_template): Remove misleading comment.
11449 (tsubst_aggr_type): Substitute if there are template parameters,
11450 regardless of whether or not they use template arguments.
11451 (unify): Likewise, but for unification.
11452
11453 1999-01-12 Richard Henderson <rth@cygnus.com>
11454
11455 * cp-tree.h (flag_permissive): Declare extern.
11456
11457 1999-01-06 Mark Mitchell <mark@markmitchell.com>
11458
11459 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
11460 here.
11461 (lang_type): Add is_partial_instantiation. Decrease width of
11462 dummy.
11463 (PARTIAL_INSTANTIATION_P): New macro.
11464 (OPERATOR_TYPENAME_P): Remove.
11465 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
11466 OPERATOR_TYPENAME_P.
11467 (grok_op_properties): Likewise.
11468 * friend.c (do_friend): Handle friends that are member functions
11469 correctly.
11470 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
11471 * pt.c (instantiate_class_template): Rework for clarity. Avoid
11472 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
11473 any more partial instantiation than is absolutely necessary for
11474 implicit typename. Set PARTIAL_INSTANTIATION_P.
11475 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
11476 * semantics.c (begin_class_definition): Handle partial
11477 specializations of a type that was previously partially
11478 instantiated.
11479
11480 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
11481
11482 * g++spec.c (LIBSTDCXX): Provide default definition.
11483 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
11484
11485 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11486
11487 * Make-lang.in (g++.o): Depend on prefix.h.
11488
11489 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
11490
11491 * tree.c (bound_pmf_p): New fn.
11492 * typeck.c (build_c_cast): Use it.
11493
11494 * decl.c (grok_op_properties): Use same_type_p.
11495
11496 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11497
11498 * Makefile.in (cvt.o): Depend on toplev.h.
11499
11500 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
11501
11502 * cvt.c: Include toplev.h.
11503
11504 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
11505 definitions.
11506
11507 * init.c (expand_vec_init): Initialize variable `itype'.
11508
11509 * lex.c (yyerror): Cast the argument passed to a ctype function to
11510 an unsigned char.
11511
11512 * method.c (build_mangled_C9x_name): Wrap prototype and definition
11513 in "HOST_BITS_PER_WIDE_INT >= 64".
11514
11515 * typeck.c (build_binary_op): Mark parameter `convert_p' with
11516 ATTRIBUTE_UNUSED.
11517
11518 1998-12-22 Mark Mitchell <mark@markmitchell.com>
11519
11520 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
11521 * tree.c (build_exception_variant): Don't crash on empty throw
11522 specs.
11523
11524 1998-12-18 DJ Delorie <dj@cygnus.com>
11525
11526 * cvt.c (convert_to_reference): Check for both error_mark_node
11527 and NULL_NODE after call to convert_for_initialization.
11528
11529 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
11530
11531 * error.c (interesting_scope_p): New fn.
11532 (dump_simple_decl): Use it.
11533 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
11534 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
11535
11536 1998-12-16 Mark Mitchell <mark@markmitchell.com>
11537
11538 * class.c (resolve_address_of_overloaded_function): Do conversion
11539 to correct type here, rather than ...
11540 (instantiate_type): Here.
11541
11542 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
11543 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
11544 (decl_template_parm_p): Remove.
11545 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
11546 parameter.
11547 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
11548 * pt.c (push_inline_template_parms_recursive): Set it.
11549 (decl_template_parm_p): Remove.
11550 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
11551 (process_template_parm): Set it.
11552
11553 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
11554
11555 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
11556 if configured with cpplib.
11557
11558 1998-12-15 Mark Mitchell <mark@markmitchell.com>
11559
11560 * decl.c (poplevel): Make sure ns_binding is initialized.
11561
11562 * decl.c (finish_function): Undo inadvertent change in previous
11563 patch.
11564
11565 1998-12-14 Mark Mitchell <mark@markmitchell.com>
11566
11567 * class.c (pushclass): Tweak handling of class-level bindings.
11568 (resolve_address_of_overloaded_function): Update pointer-to-member
11569 handling.
11570 (instantiate_type): Likewise.
11571 * cvt.c (cp_convert_to_pointer): Likewise.
11572 * decl.c (pop_binding): Take the DECL to pop, not just the name.
11573 Deal with `struct stat' hack.
11574 (binding_level): Add to documentation.
11575 (push_binding): Clear BINDING_TYPE.
11576 (add_binding): New function.
11577 (push_local_binding): Use it.
11578 (push_class_binding): Likewise.
11579 (poplevel): Adjust calls to pop_binding.
11580 (poplevel_class): Likewise.
11581 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
11582 declarations to current binding level.
11583 (push_class_level_binding): Likewise.
11584 (push_overloaded_decl): Adjust handling of OVERLOADs in local
11585 bindings.
11586 (lookup_namespace_name): Don't crash when confronted with a
11587 TEMPLATE_DECL.
11588 (lookup_name_real): Do `struct stat' hack in local binding
11589 contexts.
11590 (build_ptrmemfunc_type): Adjust documentation.
11591 (grokdeclarator): Don't avoid building real array types when
11592 processing templates unless really necessary.
11593 (finish_method): Adjust calls to pop_binding.
11594 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
11595 not reparse_decl_as_expr.
11596 (build_expr_from_tree): Deal with a template-id as the function to
11597 call in a METHOD_CALL_EXPR.
11598 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
11599 (maybe_adjust_types_For_deduction): Don't do peculiar things with
11600 METHOD_TYPEs here.
11601 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
11602 pointer-to-member types where necessary.
11603 * tree.c (build_cplus_array_type_1): Don't avoid building real
11604 array types when processing templates unless really necessary.
11605 (build_exception_variant): Compare the exception lists correctly.
11606
11607 1998-12-13 Mark Mitchell <mark@markmitchell.com>
11608
11609 * cp-tree.def (CPLUS_BINDING): Update documentation.
11610 * cp-tree.h (LOCAL_BINDING_P): New macro.
11611 (lang_identifier): Rename local_value to bindings.
11612 (tree_binding): Make `scope' of type `void*', not `tree'.
11613 (BINDING_SCOPE): Update documentation.
11614 (IDENTIFIER_LOCAL_VALUE): Remove.
11615 (IDENTIFIER_CLASS_VALUE): Document.
11616 (IDENTIFIER_BINDING): New macro.
11617 (IDENTIFIER_VALUE): Likewise.
11618 (TIME_IDENTIFIER_TIME): Likewise.
11619 (TIME_IDENTIFIER_FILEINFO): Likewise.
11620 (IMPLICIT_TYPENAME_P): Likewise.
11621 (set_identifier_local_value): Remove.
11622 (push_local_binding): New function.
11623 (push_class_binding): Likewise.
11624 * class.c (pushclass): Update comments; use push_class_binding.
11625 * decl.c (set_identifier_local_value_with_scope): Remove.
11626 (set_identifier_local_value): Likewise.
11627 (push_binding): New function.
11628 (pop_binding): Likewise.
11629 (binding_level): Update documentation. Remove shadowed.
11630 (BINDING_LEVEL): New macro.
11631 (free_binding_nodes): New variable.
11632 (poplevel): Adjust for new name-lookup scheme. Don't mess up
11633 BLOCK_VARs when doing for-scope extension. Remove effectively
11634 dead code.
11635 (pushlevel_class): Tweak formatting.
11636 (poplevel_class): Adjust for new name-lookup scheme.
11637 (print_binding_level): Likewise.
11638 (store_bindings): Likewise.
11639 (pushdecl): Likewise.
11640 (pushdecl_class_level): Likewise.
11641 (push_class_level_binding): Likewise.
11642 (push_overloaded_decl): Update comments. Adjust for new
11643 name-lookup scheme.
11644 (lookup_name_real): Likewise.
11645 (lookup_name_current_level): Likewise.
11646 (cp_finish_decl): Likewise.
11647 (require_complete_types_for_parms): Likewise. Remove misleading
11648 #if 0'd code.
11649 (grok_parms): Likewise. Don't call
11650 require_complete_types_for_parms here.
11651 (grok_ctor_properties): Don't treat templates as copy
11652 constructors.
11653 (grop_op_properties): Or as assignment operators.
11654 (start_function): Document. Adjust for new name-lookup scheme.
11655 (finish_function): Likewise.
11656 * decl2.c (do_local_using_decl): Use push_local_binding.
11657 * lex.c (begin_definition_of_inclass_inline): New function, split
11658 out from ...
11659 (do_pending_inlines): Here, and ...
11660 (process_next_inline): Here.
11661 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
11662 (init_filename_times): Likewise.
11663 (extract_interface_info): Likewise.
11664 (ste_typedecl_interface_info): Likewise.
11665 (check_newline): Likewise.
11666 (dump_time_statistics): Likewise.
11667 (handle_cp_pragma): Likewise.
11668 (do_identifier): Adjust for new name-lookup scheme.
11669 * parse.y (function_try_block): Return ctor_initializer_opt value.
11670 (fndef): Use it.
11671 (fn.defpen): Pass appropriate values to start_function.
11672 (pending_inline): Use functor_try_block value, and pass
11673 appropriate values to finish_function.
11674 * pt.c (is_member_template): Update documentation; remove handling
11675 of FUNCTION_DECLs. As per name, this function should deal only in
11676 TEMPLATE_DECLs.
11677 (decl_template_parm_p): Change name of olddecl parameter to decl.
11678 (check_template_shadow): Adjust for new name-lookup scheme.
11679 (lookup_template_class): Likewise.
11680 (tsubst_decl): Tweak so as not to confuse member templates with
11681 copy constructors and assignment operators.
11682 (unify): Handle UNION_TYPEs.
11683 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
11684 (lang_print_xnode): Adjust for new name-lookup scheme.
11685 * typeck.c (mark_addressable): Likewise.
11686 (c_expand_return): Likewise.
11687
11688 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
11689
11690 * decl.c (grokdeclarator): Allow field with same name as class
11691 in extern "C".
11692
11693 * decl.c (lookup_name_real): Don't limit field lookup to types.
11694 * class.c (check_member_decl_is_same_in_complete_scope): No error
11695 if icv and x are the same.
11696 * lex.c (do_identifier): Tweak error message.
11697
11698 1998-12-10 Mark Mitchell <mark@markmitchell.com>
11699
11700 * decl.c (start_enum): Use push_obstacks, not
11701 end_temporary_allocation.
11702 (finish_enum): Call pop_obstacks.
11703
11704 1998-12-10 Mark Mitchell <mark@markmitchell.com>
11705
11706 * class.c (instantiate_type): Return error_mark_node rather than
11707 junk.
11708
11709 1998-12-09 Mark Mitchell <mark@markmitchell.com>
11710
11711 * cp-tree.h (most_specialized_instantiation): New function.
11712 (print_candidates): Likewise.
11713 * class.c (validate_lhs): Remove.
11714 (resolve_address_of_overloaded_function): New function, split out
11715 and then substantially reworked, from ...
11716 (instantiate_type): Use it. Simplify.
11717 * cvt.c (convert_to_reference): Complain when caller has indicated
11718 that's the right thing to do. Don't crash if instantiate_type
11719 fails.
11720 * pt.c: Substitute `parameters' for `paramters' throughout.
11721 (print_candidates): Don't make it static.
11722 (most_specialized_instantiation): Split out from ...
11723 (most_specialized): Here.
11724
11725 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
11726
11727 * lex.c (lang_init_options): Initialize cpplib.
11728 * decl2.c (parse_options,cpp_initialized): Removed.
11729 (lang_decode_option): Move initialization of cpplib to
11730 lang_init_options.
11731
11732 1998-12-09 Mark Mitchell <mark@markmitchell.com>
11733
11734 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
11735 well as the TYPE_DECL, when a typedef name is assigned to a
11736 previously anonymous type.
11737
11738 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
11739
11740 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
11741 __cp_eh_info for getting the eh info pointer. Add table_index to
11742 field list.
11743 (push_eh_cleanup): Don't increment 'handlers' data field.
11744 (process_start_catch_block): Don't set the 'caught' field.
11745
11746 * cp/exception.cc (CP_EH_INFO): New macro for getting the
11747 exception info pointer within library routines.
11748 (__cp_eh_info): Use CP_EH_INFO.
11749 (__start_cp_handler): Get exception info pointer, set caught field,
11750 and increment the handlers field. Avoids this being done by handlers.
11751 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
11752 (uncaught_exception): Use CP_EH_INFO macro.
11753
11754 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
11755
11756 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
11757
11758 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
11759
11760 * lex.c (check_newline): Add support for \ as `natural'
11761 characters in file names in #line to be consistent with #include
11762 handling. We support escape processing in the # 1 "..." version of
11763 the command. See also support in cp/lex.c.
11764
11765 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
11766
11767 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
11768 structure.
11769
11770 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
11771
11772 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
11773
11774 * error.c (dump_simple_decl): Also print namespace context.
11775 (dump_function_decl): Likewise.
11776
11777 * decl2.c (ambiguous_decl): Don't print old value if it's
11778 error_mark_node.
11779
11780 * decl.c (lookup_name_real): Fix handling of local types shadowed
11781 by a non-type decl. Remove obsolete code.
11782 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
11783
11784 * lang-options.h: Add -fpermissive.
11785 * decl2.c: Likewise.
11786 * cp-tree.h: Add flag_permissive.
11787 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
11788 were specified, set flag_pedantic_errors.
11789 * call.c (build_over_call): Turn dropped qualifier messages
11790 back into pedwarns.
11791 * cvt.c (convert_to_reference): Likewise.
11792 * typeck.c (convert_for_assignment): Likewise.
11793
11794 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
11795
11796 * decl2.c (coerce_new_type): Use same_type_p.
11797 (coerce_delete_type): Likewise.
11798
11799 * call.c (check_dtor_name): Return 1, not error_mark_node.
11800
11801 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
11802
11803 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
11804 if MULTIPLE_SYMBOL_SPACES.
11805
11806 * pt.c (check_template_shadow): New fn.
11807 * decl2.c (grokfield): Use it.
11808 * decl.c (pushdecl): Likewise.
11809 (pushdecl_class_level): Likewise.
11810 (start_method): Likewise.
11811 (xref_tag): Don't try to use 't' if we're defining.
11812
11813 * call.c (check_dtor_name): Just return an error_mark_node.
11814 * pt.c (lookup_template_class): Complain about using non-template here.
11815 * parse.y (apparent_template_type): Not here.
11816
11817 * pt.c (check_explicit_specialization): Complain about specialization
11818 with C linkage.
11819
11820 * lang-options.h: Add -f{no-,}implicit-inline-templates.
11821
11822 * pt.c (convert_nontype_argument): Don't assume that any integer
11823 argument is intended to be a constant-expression.
11824
11825 1998-12-03 Mark Mitchell <mark@markmitchell.com>
11826
11827 * class.c (handle_using_decl): Fix comment. Don't lookup
11828 constructors in base classes.
11829 (validate_lhs): Fix typo in comment.
11830 * search.c (lookup_field_1): Don't return a USING_DECL.
11831
11832 * cp-tree.h (DECL_ACCESS): Improve documentation.
11833
11834 * decl.c (expand_static_init): Don't set the initialization-done
11835 flag until the initialization is done.
11836
11837 1998-12-02 Mark Mitchell <mark@markmitchell.com>
11838
11839 * decl2.c (validate_nonmember_using_decl): Complain about using
11840 declarations for class members.
11841
11842 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
11843
11844 * typeck2.c (process_init_constructor): Use same_type_p.
11845
11846 * decl.c (check_tag_decl): Don't warn about null decl inside a
11847 class.
11848
11849 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
11850 UNIFY_ALLOW_NONE.
11851 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
11852 (resolve_overloaded_unification): Strip baselinks.
11853
11854 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11855
11856 * g++spec.c: Don't prototype xmalloc.
11857
11858 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
11859
11860 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
11861
11862 * decl.c (check_tag_decl): Do complain about null friend decl at
11863 file scope.
11864
11865 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
11866
11867 * lex.c (make_lang_type): Clear the whole struct lang_type, not
11868 only the first multiple of sizeof (int).
11869
11870 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
11871
11872 * decl.c (start_decl): An explicit specialization of a static data
11873 member is only a definition if it has an initializer.
11874
11875 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
11876 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
11877 cp_finish_decl.
11878 * init.c (expand_default_init): Check for DIRECT_BIND instead of
11879 DECL_ARTIFICIAL.
11880
11881 * call.c (build_over_call): Use build_decl.
11882
11883 * except.c (expand_throw): Just use convert, not
11884 build_reinterpret_cast.
11885
11886 * lex.c (handle_generic_pragma): Use token_buffer.
11887
11888 * decl.c (check_tag_decl): Don't complain about null friend decl.
11889
11890 1998-11-24 Dave Pitts <dpitts@cozx.com>
11891
11892 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
11893 first position.
11894 * lex.c (check_newline): Use ISALPHA.
11895 (readescape): Use ISGRAPH.
11896 (yyerror): Use ISGRAPH.
11897
11898 1998-11-24 Nathan Sidwell <nathan@acm.org>
11899
11900 * search.c (get_abstract_virtuals): Do not use initial
11901 CLASSTYPE_ABSTRACT_VIRTUALS.
11902 * typeck2.c (abstract_virtuals_error): Show location of abstract
11903 declaration.
11904 * call.c (build_new_method_call): Use
11905 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
11906 * class.c (finish_struct_bits): Don't bother working out whether
11907 get_abstract_virtuals will do anything, just do it.
11908
11909 1998-11-24 Graham <grahams@rcp.co.uk>
11910
11911 * typeck.c (build_component_ref): Remove unused statement.
11912
11913 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
11914
11915 * class.c (add_method): Catch invalid overloads.
11916
11917 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
11918 * search.c (lookup_conversions): Handle getting real OVERLOADs.
11919 (add_conversions): Likewise. Revert last change.
11920 * call.c (add_conv_candidate): Pass totype to add_candidate instead
11921 of fn. Don't add a new candidate if the last one was for the same
11922 type.
11923 (print_z_candidates): Handle getting a type as a function.
11924 (joust): If we got two conversion candidates to the same type,
11925 just pick one.
11926 (build_object_call): Lose 'templates'.
11927 (build_user_type_conversion_1): Handle getting real OVERLOADs.
11928
11929 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
11930
11931 * typeck2.c (process_init_constructor): If there are elements
11932 that don't have initializers and they need to have constructors
11933 run, supply them with initializers.
11934
11935 * class.c (finish_struct_1): A class with a 0-width bitfield is
11936 still empty.
11937
11938 1998-11-23 Mark Mitchell <mark@markmitchell.com>
11939
11940 * pt.c (instantiate_class_template): Don't try to figure out what
11941 specialization to use for a partial instantiation. Correct
11942 typos in a couple of comments. Avoid calling uses_template_parms
11943 multiple times.
11944
11945 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
11946
11947 * method.c (process_overload_item): Add call to
11948 build_mangled_C9x_name for intTI_type_nodes.
11949 (build_mangled_C9x_name): Add prototype, define.
11950 * decl.c (init_decl_processing): Add names for
11951 TImode_type_node.
11952
11953 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
11954
11955 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
11956
11957 * class.c (finish_struct_1): Set things up for 0-width bitfields
11958 like we do for others.
11959
11960 * decl.c (check_tag_decl): New fn.
11961 (shadow_tag): Split out from here.
11962 * decl2.c (grok_x_components): Call it.
11963
11964 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
11965
11966 * decl.c: Lose warn_about_return_type.
11967 (grokdeclarator): Always complain about implicit int, except for
11968 `main () { ... }'.
11969
11970 * decl.c (tag_name): New fn.
11971 (xref_tag): Complain about using typedef-name after class-key.
11972
11973 * init.c (expand_vec_init): Also keep going if from_array.
11974
11975 * tree.c (is_overloaded_fn): Also handle the output of
11976 build_offset_ref.
11977
11978 * decl.c (grokdeclarator): Use constructor_name when comparing
11979 field name against enclosing class.
11980 * class.c (finish_struct_anon): Likewise.
11981
11982 1998-11-22 Mark Mitchell <mark@markmitchell.com>
11983
11984 * decl.c (poplevel): Remove code to handle KEEP == 2.
11985 (finish_function): Don't confuse BLOCK-order when
11986 processing a destructor.
11987
11988 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
11989
11990 * decl.c (require_complete_types_for_parms): Call layout_decl
11991 after we've completed the type.
11992
11993 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
11994
11995 * decl2.c (validate_nonmember_using_decl): Allow using templates
11996 from the global namespace.
11997
11998 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
11999
12000 Handle specifying template args to member function templates.
12001 * tree.c (build_overload): Always create an OVERLOAD for a template.
12002 * search.c (add_conversions): Handle finding an OVERLOAD.
12003 * decl2.c (check_classfn): Likewise.
12004 * lex.c (identifier_type): See through a baselink.
12005 * parse.y (do_id): Don't call do_identifier if we got a baselink.
12006 * class.c (instantiate_type, case TREE_LIST): Recurse.
12007
12008 * decl.c (grokdeclarator): Allow a boolean constant for array
12009 bounds, odd as that sounds.
12010
12011 * pt.c (unify): Be more strict about non-type parms, except for
12012 array bounds.
12013 (UNIFY_ALLOW_INTEGER): New macro.
12014
12015 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
12016
12017 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
12018
12019 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
12020
12021 * semantics.c (begin_class_definition): Call
12022 maybe_process_partial_specialization before push_template_decl.
12023 Don't call push_template_decl for a specialization.
12024 * search.c (lookup_field): Do return a member template class.
12025 * decl2.c (handle_class_head): Handle member template classes.
12026
12027 * decl.c (grokdeclarator): A parm type need not be complete.
12028
12029 * pt.c (convert_nontype_argument): Fix thinko.
12030
12031 1998-11-18 Mark Mitchell <mark@markmitchell.com>
12032
12033 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
12034 (global_delete_fndecl): New variable.
12035 * decl.c (global_delete_fndecl): Define it.
12036 (init_decl_processing): Set it.
12037 * init.c (build_builtin_delete_call): Use it.
12038 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
12039 nodes.
12040
12041 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
12042
12043 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
12044 type.
12045
12046 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
12047 * call.c (build_object_call): Also support references to functions.
12048 * typeck.c (convert_for_initialization): Don't decay a function
12049 if the target is a reference to function.
12050
12051 * search.c (add_conversions): Get all the overloads from a class.
12052
12053 * decl.c (grok_ctor_properties): Complain about any constructor
12054 that will take a single arg of the class type by value.
12055
12056 * typeck2.c (build_functional_cast): Can't create objects of
12057 abstract classes this way.
12058 * cvt.c (ocp_convert): Likewise.
12059
12060 * decl.c (grokfndecl): Member functions of local classes are not
12061 public.
12062
12063 1998-11-18 Mark Mitchell <mark@markmitchell.com>
12064
12065 * Make-lang.in (cc1plus): Add dependency on hash.o.
12066
12067 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
12068
12069 * search.c (get_abstract_virtuals): Complain about virtuals with
12070 no final overrider.
12071 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
12072 with no final overrider.
12073 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
12074 on virtuals with no final overrider.
12075
12076 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
12077
12078 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
12079 after layout_type.
12080
12081 * friend.c (do_friend): Don't set_mangled_name_for_decl.
12082
12083 * class.c (finish_struct_anon): Complain about non-fields.
12084 * decl2.c (build_anon_union_vars): Likewise.
12085
12086 * decl.c (grokdeclarator): Normal data members can't have the same
12087 name as the class, either.
12088 * class.c (finish_struct_anon): Neither can members of an
12089 anonymous union.
12090
12091 1998-11-17 Mark Mitchell <mark@markmitchell.com>
12092
12093 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
12094 (TYPE_BINFO): Likewise.
12095 (IS_AGGR_TYPE): Tweak.
12096 (SET_IS_AGGR_TYPE): New macro.
12097 (CLASS_TYPE_P): Tweak.
12098 (lang_type): Group mark bitfields together. Remove linenum.
12099 (CLASSTYPE_SOURCE_LINE): Remove macro.
12100 (CLASSTYPE_MARKED_N): New macro.
12101 (SET_CLASSTYPE_MARKED_N): Likewise.
12102 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
12103 (CLASS_TYPE_MARKED_*): Use them.
12104 (SET_CLASSTYPE_MARKED_*): Likewise.
12105 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
12106 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
12107 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
12108 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
12109 * class.c (class_cache_obstack): New variable.
12110 (class_cache_firstobj): Likewise.
12111 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
12112 (pushclass): Free the cache, when appropriate.
12113 (popclass): Tidy.
12114 (maybe_push_cache_obstack): Use class_cache_obstack.
12115 * decl.c (include hash.h).
12116 (typename_hash): New function.
12117 (typename_compare): Likewise.
12118 (build_typename_type): Check the hash table to avoid creating
12119 duplicates.
12120 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
12121 (grokdeclarator): Use CLASS_TYPE_P.
12122 (xref_basetypes): Likewise.
12123 (start_function): Likewise. Don't put current_class_ref on the
12124 permanent obstack.
12125 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
12126 and TYPE_TI_ARGS.
12127 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
12128 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
12129 fields for types other than class types. Do clear TYPE_ALIAS_SET
12130 for types other than class types, though.
12131 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
12132 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12133 * pt.c (process_template_parm): Don't set
12134 CLASSTYPE_GOT_SEMICOLON.
12135 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12136 Coerce arguments on the momentary obstack.
12137 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12138 (instantiate_class_template): Calculate template arguments on the
12139 momentary obstack. Tidy.
12140 (tsubst_template_arg_vector): Use make_temp_vec.
12141 (tsubst_aggr_type): Put template arguments on the momentary
12142 obstack.
12143 (tsubst_decl): Likewise.
12144 (tsubst): Copy the array bounds index to the permanent obstack
12145 before building index types. Use new macros.
12146 (unify): Use new macros.
12147 (do_type_instantiation): Likewise.
12148 * search.c (lookup_fnfields_1): Use new macros.
12149 (dfs_pushdecls): Build envelopes on the cache obstack.
12150 (dfs_compress_decls): Use new macros.
12151 (push_class_decls): Build on the cache obstack.
12152 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
12153 * sign.c (build_signature_pointer_or_reference_type): Use
12154 SET_IS_AGGR_TYPE.
12155 * tree.c (make_binfo): Check CLASS_TYPE_P.
12156 (copy_template_template_parm): Adjust.
12157 (make_temp_vec): Use push_expression_obstack.
12158 * typeck.c (complete_type): Use new macros.
12159 (comptypes): Likewise.
12160
12161 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
12162
12163 * pt.c (tsubst): Add diagnostics for invalid array, reference
12164 and pointer to member types.
12165
12166 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
12167
12168 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
12169
12170 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
12171 Simplify.
12172
12173 * parse.y (structsp): Fix cut-and-paste error.
12174
12175 * init.c (build_new): Complain about non-integral size.
12176
12177 * parse.y (unary_expr): Complain about defining types in sizeof.
12178
12179 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
12180
12181 * rtti.c (build_x_typeid): Complain about typeid without
12182 including <typeinfo>.
12183 (get_typeid): Likewise. Complain about typeid of incomplete type.
12184 (get_tinfo_fn_dynamic): Likewise.
12185 (get_typeid_1): Not static anymore.
12186 * except.c (build_eh_type_type): Use get_typeid_1.
12187
12188 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
12189 ambiguous or private bases. Fix warning for reference cast.
12190
12191 1998-11-16 Mark Mitchell <mark@markmitchell.com>
12192
12193 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
12194 * decl.c (duplicate_decls): Remove special-case code to deal with
12195 template friends, and just do the obvious thing.
12196 * pt.c (register_specialization): Tweak for clarity, and also to
12197 clear DECL_INITIAL for an instantiation before it is merged with a
12198 specialization.
12199 (check_explicit_specialization): Fix indentation.
12200 (tsubst_friend_function): Handle both definitions in friend
12201 declaration and outside friend declarations.
12202 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
12203 (regenerate_decl_from_template): Tweak accordingly.
12204 (instantiate_decl): Likewise.
12205
12206 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
12207
12208 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
12209 member function reference to error.
12210 * cvt.c (ocp_convert): Complain about converting an overloaded
12211 function to void.
12212
12213 * init.c (build_offset_ref): Just return a lone static member
12214 function.
12215
12216 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
12217 not internal ones.
12218
12219 * typeck.c (build_binary_op_nodefault): Improve error handling.
12220
12221 * decl.c (grokfndecl): Complain about making 'main' a template.
12222
12223 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
12224
12225 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
12226 TYPE_DECL in a template.
12227
12228 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
12229
12230 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
12231
12232 * decl.c (struct cp_function): Add named_label_uses.
12233 (push_cp_function_context): Save it.
12234 (pop_cp_function_context): Restore it.
12235 (define_label): Also complain about jumping into the scope of
12236 non-POD objects that don't have constructors.
12237 * tree.c (pod_type_p): New fn.
12238
12239 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
12240 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
12241 (get_tinfo_fn): Not here.
12242 * repo.c (repo_get_id): Abort if we get called for an incomplete
12243 type.
12244
12245 1998-11-13 Mark Mitchell <mark@markmitchell.com>
12246
12247 * except.c (expand_throw): Make sure first argument to
12248 __cp_push_exception is of type `void*' to avoid spurious error
12249 messages.
12250
12251 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
12252
12253 * pt.c (try_one_overload): Take orig_targs again. Only check for
12254 mismatches against them; we don't care what a previous call found.
12255 (resolve_overloaded_unification): Adjust.
12256
12257 * search.c (lookup_field): Don't return anything for a non-type
12258 field from a dependent type.
12259 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
12260 in an array declarator.
12261 (start_decl): Push into the class before looking for the field.
12262
12263 1998-11-08 Mark Mitchell <mark@markmitchell.com>
12264
12265 * method.c (build_overload_value): Handle REFERENCE_TYPE.
12266
12267 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
12268
12269 * decl.c (grokdeclarator): Allow namespace-scoped members if they
12270 are friends.
12271
12272 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
12273
12274 * pt.c (tsubst_decl): Don't mess with the global value of an
12275 un-mangled DECL_ASSEMBLER_NAME.
12276
12277 1998-11-03 Christopher Faylor <cgf@cygnus.com>
12278
12279 * decl.c (init_decl_processing): Remove CYGWIN conditional
12280 since CYGWIN is now able to deal with trapping signals.
12281
12282 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12283
12284 * cp-tree.h: Don't include gansidecl.h.
12285 * exception.cc: Include gansidecl.h (since we don't include config.h)
12286 * g++spec.c: Don't include gansidecl.h.
12287
12288 1998-11-06 Mark Mitchell <mark@markmitchell.com>
12289
12290 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
12291 size of dummy.
12292 (DECL_DEFINED_IN_CLASS_P): New macro.
12293 (TEMPLATE_PARMS_FOR_INLINE): Document.
12294 (check_static_variable_definition): New function.
12295 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
12296 appropriate.
12297 (check_static_variable_definition): Split out from ...
12298 (grokdeclarator): Here.
12299 * pt.c (check_default_tmpl_args): New function, split out from ...
12300 (push_template_decl_real): Here.
12301 (instantiate_template): Fix comment.
12302
12303 1998-11-04 Mark Mitchell <mark@markmitchell.com>
12304
12305 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
12306 (CP_TYPE_VOLATILE_P): Likewise.
12307 (CP_TYPE_RESTRICT_P): Likewise.
12308
12309 1998-11-03 Mark Mitchell <mark@markmitchell.com>
12310
12311 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
12312
12313 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
12314
12315 * class.c (instantiate_type): Be more helpful.
12316
12317 * decl2.c (import_export_decl): Call import_export_class.
12318
12319 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
12320 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
12321 * pt.c (tsubst_copy): Likewise.
12322
12323 1998-11-02 Mark Mitchell <mark@markmitchell.com>
12324
12325 * init.c (expand_vec_init): Fix off-by-one error.
12326
12327 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
12328
12329 * parse.y (apparent_template_type): New type.
12330 (named_complex_class_head_sans_basetype): Use it.
12331 * Makefile.in (CONFLICTS): One new conflict.
12332 * parse.c: Regenerated.
12333
12334 1998-11-01 Mark Mitchell <mark@markmitchell.com>
12335
12336 * cp-tree.h (COMPARE_STRICT): New macro.
12337 (COMPARE_BASE): Likewise.
12338 (COMPARE_RELAXED): Likewise.
12339 (COMPARE_REDECLARATION): Likewise.
12340 (same_type_p): Likewise.
12341 (same_or_base_type_p): Likewise.
12342 * call.c (standard_conversion): Use them, in place of comptypes
12343 with numeric arguments.
12344 (reference_binding): Likewise.
12345 (convert_like): Likewise.
12346 (build_over_call): Likewise.
12347 (is_subseq): Likewise.
12348 (is_properly_derived_from): Likewise.
12349 (compare_ics): Likewise.
12350 (joust): Likewise.
12351 * class.c (delete_duplicate_fields_1): Likewise.
12352 (resolves_to_fixed_type_p): Likewise.
12353 (instantiate_type): Likewise. Remove #if 0'd code.
12354 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
12355 (pushdecl): Likewise.
12356 (lookup_name_real): Likewise.
12357 (grokdeclarator): Likewise. Check for illegal array declarations.
12358 (grokparms): Likewise.
12359 (grok_op_properties): Likewise.
12360 * decl2.c (check_classfn): Likewise.
12361 * friend.c (is_friend): Likewise.
12362 (make_friend_class): Likewise.
12363 * init.c (expand_aggr_init): Likewise.
12364 (expand_vec_init): Likewise.
12365 * pt.c (is_member_template_class): Remove declaration.
12366 (is_specialization_of): Use COMPARE_* and new macros.
12367 (comp_template_parms): Likewise.
12368 (convert_nontype_argument): Likewise.
12369 (coerce_template_template_parms): Likewise.
12370 (template_args_equal): Likewise.
12371 (lookup_template_class): Likewise.
12372 (type_unification_real): Likewise.
12373 (unify): Likewise.
12374 (get_bindings_real): Likewise.
12375 * search.c (covariant_return_p): Likewise.
12376 (get_matching_virtual): Likewise.
12377 * sig.c (match_method_types): Likewise.
12378 * tree.c (vec_binfo_member): Likewise.
12379 (cp_tree_equal): Likewise.
12380 * typeck.c (common_type): Likewise.
12381 (comp_array_types): Likewise. Get issues involving unknown array
12382 bounds right.
12383 (comptypes): Update comments. Use new flags.
12384 (comp_target_types): Use new macros.
12385 (compparms): Likewise.
12386 (comp_target_parms): Likewise.
12387 (string_conv_p): Likewise.
12388 (build_component_ref): Likewise.
12389 (build_indirect_ref): Likewise.
12390 (build_conditional_expr): Likewise.
12391 (build_static_cast): Likewise.
12392 (build_reinterpret_cast): Likewise.
12393 (build_const_cast): Likewise.
12394 (build_modify_expr): Likewise.
12395 (convert_for_assignment): Likewise.
12396 (comp_ptr_ttypes_real): Likewise.
12397 (ptr_reasonably_similar): Likewise.
12398 (comp_ptr_ttypes_const): Likewise.
12399
12400 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
12401
12402 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
12403
12404 1998-10-30 Mark Mitchell <mark@markmitchell.com>
12405
12406 * decl2.c (delete_sanity): Pass integer_zero_node, not
12407 integer_two_node, to build_vec_delete.
12408 * init.c (build_array_eh_cleanup): Remove.
12409 (expand_vec_init_try_block): New function.
12410 (expand_vec_init_catch_clause): Likewise.
12411 (build_vec_delete_1): Don't deal with case that auto_delete_vec
12412 might be integer_two_node anymore.
12413 (expand_vec_init): Rework for initialization-correctness and
12414 exception-correctness.
12415 * typeck2.c (process_init_constructor): Make mutual exclusivity
12416 of cases more obvious.
12417
12418 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
12419
12420 * decl.c (lookup_name_real): OK, only warn if not lexing.
12421 Simplify suggested fix.
12422
12423 * cp-tree.h (IDENTIFIER_MARKED): New macro.
12424 * search.c (lookup_conversions): Use breadth_first_search.
12425 (add_conversions): Avoid adding two conversions to the same type.
12426 (breadth_first_search): Work with base binfos, rather
12427 than binfos and base indices.
12428 (get_virtual_destructor): Adjust.
12429 (tree_has_any_destructor_p): Adjust.
12430 (get_matching_virtual): Adjust.
12431
12432 * pt.c (push_template_decl_real): Generalize check for incorrect
12433 number of template parms.
12434 (is_member_template_class): #if 0.
12435
12436 1998-10-29 Richard Henderson <rth@cygnus.com>
12437
12438 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
12439 last.
12440
12441 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
12442
12443 * lex.c: Call check_newline from lang_init always. After
12444 calling cpp_start_read, set yy_cur and yy_lim to read from the
12445 cpplib token buffer.
12446
12447 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
12448
12449 * class.c (instantiate_type): Don't consider templates for a normal
12450 match.
12451
12452 * class.c (finish_struct_1): Don't complain about non-copy
12453 assignment ops in union members.
12454
12455 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
12456 (prepare_fresh_vtable): Likewise.
12457 (finish_struct_1): Don't call import_export_class.
12458 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
12459 (finish_prevtable_vardecl): Lose.
12460 (finish_file): Don't call it.
12461 * pt.c (instantiate_class_template): Likewise.
12462 * cp-tree.h: Remove it.
12463
12464 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
12465 * decl.c (finish_function): Not here.
12466 (start_function): Do set DECL_INITIAL.
12467
12468 * pt.c (push_template_decl_real): Complain about default template
12469 args for enclosing classes.
12470
12471 * call.c (add_function_candidate): Treat conversion functions
12472 as coming from the argument's class.
12473 * cp-tree.h (DECL_CONV_FN_P): New fn.
12474 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
12475 * class.c (add_method): Use DECL_CONV_FN_P.
12476 * decl2.c (check_classfn): Likewise.
12477 * error.c (dump_function_name): Likewise.
12478 (dump_function_decl): Likewise.
12479 * pt.c (fn_type_unification): Likewise.
12480 * search.c (add_conversions): Likewise.
12481
12482 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
12483
12484 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
12485 * method.c (hack_identifier): Also check for using RESULT_DECL
12486 from outer context.
12487
12488 1998-10-27 Mark Mitchell <mark@markmitchell.com>
12489
12490 * decl.c (grokdeclarator): Use type_quals, rather than constp,
12491 consistently.
12492
12493 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
12494
12495 * call.c (standard_conversion): instantiate_type here.
12496 (reference_binding): And here.
12497 (implicit_conversion): Not here.
12498 (build_op_delete_call): No need to cons up an OVERLOAD.
12499 * cvt.c (cp_convert_to_pointer): instantiate_type here.
12500 (convert_to_reference): And here.
12501 * decl.c (grok_reference_init): Not here.
12502 (grokparms): Or here.
12503 * typeck2.c (digest_init): Or here.
12504 * typeck.c (decay_conversion): Take the address of overloaded
12505 functions, too.
12506 (require_instantiated_type): Lose.
12507 (convert_arguments): Don't handle unknown types here.
12508 (build_c_cast): Likewise.
12509 (build_binary_op): Gut.
12510 (build_conditional_expr): Don't require_instantiated_type.
12511 (build_modify_expr): Likewise.
12512 (build_static_cast): Don't instantiate_type.
12513 (build_reinterpret_cast): Likewise.
12514 (build_const_cast): Likewise.
12515 (convert_for_initialization): Likewise.
12516 (build_ptrmemfunc): Use type_unknown_p.
12517 (convert_for_assignment): Also do default_conversion on overloaded
12518 functions. Hand them off to ocp_convert.
12519
12520 1998-10-26 Mark Mitchell <mark@markmitchell.com>
12521
12522 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
12523 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
12524
12525 * class.c (finish_struct_1): Use build_cplus_array_type to build
12526 array types.
12527 * decl.c (init_decl_processing): Likewise.
12528 * except.c (expand_end_eh_spec): Likewise.
12529 * search.c (expand_upcast_fixups): Simplify very slightly.
12530
12531 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
12532
12533 * decl.c (grokdeclarator): Complain about a variable using
12534 constructor syntax coming back null from start_decl.
12535
12536 * friend.c (make_friend_class): Complain about trying to make
12537 a non-class type a friend.
12538
12539 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
12540 (start_function): Not here.
12541
12542 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
12543
12544 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
12545
12546 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
12547
12548 * typeck2.c (process_init_constructor): Only skip anonymous fields
12549 if they are bitfields.
12550
12551 * cp-tree.def (TYPEOF_TYPE): New code.
12552 * error.c (dump_type_real): Handle it.
12553 * pt.c (tsubst): Likewise.
12554 * tree.c (search_tree): Likewise.
12555 * semantics.c (finish_typeof): New fn.
12556 * parse.y (typespec): Use it.
12557 * cp-tree.h: Declare it.
12558
12559 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
12560
12561 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
12562
12563 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
12564
12565 * typeck.c (convert_arguments): Don't handle pmf references
12566 specially.
12567
12568 * init.c (build_member_call): Don't try to convert to the base type
12569 if it's ambiguous or pedantic.
12570
12571 * typeck2.c (check_for_new_type): Only depend on pedantic for
12572 C-style casts.
12573
12574 1998-10-25 Mark Mitchell <mark@markmitchell.com>
12575
12576 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
12577 non-converting constructors.
12578
12579 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
12580
12581 * gxxint.texi: Correct documentation for n, N, Q, and B.
12582
12583 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
12584
12585 * parse.y (condition): Convert VAR_DECL from reference to indirect
12586 reference.
12587
12588 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
12589
12590 * exception.cc (__cp_pop_exception): Free the original exception
12591 value, not the potentially coerced one.
12592
12593 1998-10-23 Mark Mitchell <mark@markmitchell.com>
12594
12595 * Makefile.in (hash.h): Run gperf when necessary.
12596
12597 * cp-tree.h (CP_TYPE_READONLY): Remove.
12598 (CP_TYPE_VOLATILE): Likewise.
12599 (CP_TYPE_QUALS): New macro.
12600 (CP_TYPE_CONST_P): Likewise.
12601 (CP_TYPE_VOLATILE_P): Likewise.
12602 (CP_TYPE_RESTRICT_P): Likewise.
12603 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
12604 (cp_build_type_variant): Rename to ...
12605 (cp_build_qualified_type): New function.
12606 (c_apply_type_quals_to_decl): Declare.
12607 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
12608 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
12609 (cp_type_qual_from_rid): New function.
12610 (compparms): Remove unused parameter. All callers changed.
12611 (cp_type_quals): New function.
12612 (at_least_as_qualified_p): Likewise.
12613 (more_qualified_p): Likewise.
12614
12615 * call.c (standard_conversion): Replace calls to
12616 cp_build_type_variant with cp_build_qualified_type. Use
12617 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
12618 compare them. Use CP_TYPE_* macros to check qualifiers.
12619 (reference_binding): Likewise.
12620 (implicit_conversion): Likewise.
12621 (add_builtin_candidates): Likewise.
12622 (build_over_call): Likewise.
12623 * class.c (overrides): Compare all qualifiers, not just `const',
12624 on method declarations.
12625 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
12626 (convert_pointer_to_real): Likewise.
12627 (type_promotes_to): Likewise.
12628 * decl.c (check_for_uninitialized_const_var): New function.
12629 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
12630 (cp_finish_decl): Use check_for_uninitialized_const_var.
12631 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
12632 handle `restrict'.
12633 (grok_ctor_properties): Likewise.
12634 (grok_op_properties): Likewise.
12635 (start_function): Likewise.
12636 (rever_static_member_fn): Likewise.
12637 * decl2.c (grok_method_quals): Likewise.
12638 (grokfield): Likewise.
12639 * error.c (dump_readonly_or_volatile): Rename to ...
12640 (dump_qualifiers): New function. Handle `restrict'.
12641 (dump_type_real): Use it.
12642 (dump_aggr_type): Likewise.
12643 (dump_type_prefix): Likewise.
12644 (dump_type_suffix): Likewise.
12645 (dump_function_decl): Likewise.
12646 (cv_as_string): Likewise.
12647 * gxx.gperf: Add __restrict and __restrict__.
12648 * gxxint.texi: Document `u' as used for `__restrict', and a few
12649 other previously undocumented codes.
12650 * hash.h: Regenerated.
12651 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
12652 (build_member_call): Likewise.
12653 (build_new_1): Likewise.
12654 * lex.c (init_parse): Add entry for RID_RESTRICT.
12655 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
12656 (cp_type_qual_from_rid): Define.
12657 * lex.h (enum rid): Add RID_RESTRICT.
12658 * method.c (process_modifiers): Deal with `restrict'.
12659 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
12660 * parse.c: Regenerated.
12661 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
12662 (tsubst_aggr_type): Likewise.
12663 (tsubst): Likewise.
12664 (check_cv_quals_for_unify): Likewise.
12665 (unify): Likewise.
12666 * rtti.c (init_rtti_processing): Likewise.
12667 (build_headof): Likewise.
12668 (get_tinfo_var): Likewise.
12669 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
12670 (expand_class_desc): Likewise.
12671 (expand_attr_desc): Likewise.
12672 (synthesize_tinfo_fn): Likewise.
12673 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
12674 (get_matching_virtual): Likewise.
12675 (expand_upcast_fixups): Likewise.
12676 * sig.c (build_signature_pointer_or_reference_name): Take
12677 type_quals, not constp and volatilep.
12678 (build_signature_pointer_or_reference_type): Likewise.
12679 (match_method_types): More CP_TYPE_QUALS conversion, etc.
12680 (build_signature_pointer_constructor): Likewise.
12681 (build_signature_method_call): Likewise.
12682 * tree.c (build_cplus_array_type): Likewise.
12683 (cp_build_type_variant): Rename to ...
12684 (cp_build_qualified_type): New function. Deal with `__restrict'.
12685 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
12686 (build_exception_variant): Likewise.
12687 (mapcar): Likewise.
12688 * typeck.c (qualif_type): Likewise.
12689 (common_type): Likewise.
12690 (comptypes): Likewise.
12691 (comp_cv_target_types): Likewise.
12692 (at_least_as_qualified_p): Define.
12693 (more_qualified_p): Likewise.
12694 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
12695 (compparms): Likewise.
12696 (inline_conversion): Likewise.
12697 (string_conv_p): Likewise.
12698 (build_component_ref): Likewise.
12699 (build_indirect_ref): Likewise.
12700 (build_array_ref): Likewise.
12701 (build_unary_op): Likewise.
12702 (build_conditional_expr): Likewise.
12703 (build_static_cast): Likewise.
12704 (build_c_cast): Likewise.
12705 (build_modify_expr): Likewise.
12706 (convert_For_assignment): Likewise.
12707 (comp_ptr_ttypes_real): Likewise.
12708 (cp_type_quals): New function.
12709
12710 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
12711
12712 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
12713 (CP_TYPE_VOLATILE): Likewise.
12714 * decl.c (grokdeclarator): Use them.
12715 * tree.c (canonical_type_variant): Likewise.
12716
12717 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
12718
12719 * parse.y (named_class_head): Push into class while parsing the
12720 base class list.
12721 * decl2.c (push_scope, pop_scope): New functions.
12722 * cp-tree.h: Declare them.
12723 * init.c (build_new_1): Delay cleanup until end of full expression.
12724
12725 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
12726
12727 * typeck.c (build_component_ref): Use of a type here is an error.
12728
12729 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
12730
12731 Revamp references to member functions.
12732 * method.c (hack_identifier): Call build_component_ref for a
12733 reference to a member function.
12734 * typeck.c (build_component_ref): Only return a single function
12735 if it's static. Otherwise, return a COMPONENT_REF.
12736 (build_x_function_call): Handle a COMPONENT_REF.
12737 (build_unary_op): Handle all unknown-type things.
12738 * decl2.c (arg_assoc): Handle COMPONENT_REF.
12739 * class.c (instantiate_type): Complain if the function we get is a
12740 nonstatic member function. Remove code for finding "compatible"
12741 functions.
12742 * pt.c (tsubst_copy): Handle NOP_EXPR.
12743 * tree.c (build_dummy_object): New fn.
12744 (maybe_dummy_object): New fn.
12745 (is_dummy_object): New fn.
12746 * cp-tree.h: Declare them.
12747 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
12748 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
12749 * init.c (build_member_call): Use maybe_dummy_object and
12750 is_dummy_object.
12751 (build_offset_ref): Use maybe_dummy_object.
12752 (resolve_offset_ref): Use is_dummy_object.
12753 * typeck.c (build_x_function_call): Call build_dummy_object.
12754 (unary_complex_lvalue): Call is_dummy_object.
12755
12756 * typeck.c (build_component_addr): Make sure field is a field.
12757
12758 * call.c (build_new_op): Delete obsolete code.
12759
12760 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
12761
12762 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
12763
12764 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
12765 std if std is ignored.
12766
12767 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
12768
12769 * decl.c (grokvardecl): Fix thinko.
12770
12771 * decl.c (grokdeclarator): Embedded attrs bind to the right,
12772 not the left.
12773
12774 * parse.y (fn.def2): Fix 'attrs' format.
12775
12776 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
12777
12778 * Makefile.in (CONFLICTS): Update.
12779 * parse.y (expr_or_declarator_intern): New rule.
12780 (expr_or_declarator, direct_notype_declarator, primary,
12781 functional_cast): Use it.
12782 (notype_declarator_intern): New rule.
12783 (notype_declarator, complex_notype_declarator): Use it.
12784
12785 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
12786
12787 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
12788 (grokvardecl): Likewise.
12789
12790 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12791
12792 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
12793 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
12794
12795 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
12796
12797 * pt.c (process_partial_specialization): Cast 1st argument of
12798 `bzero' to (PTR).
12799
12800 * tree.c (build_base_fields): Cast `base_align' to (int) when
12801 comparing against one.
12802
12803 1998-10-16 Mark Mitchell <mark@markmitchell.com>
12804
12805 * decl.c (lookup_name_real): Handle template parameters for member
12806 templates where said parameters have the same name as the
12807 surrounding class.
12808
12809 * decl.c (expand_static_init): Build cleanups before entering the
12810 anonymous function used to do them to avoid access-checking
12811 confusion.
12812
12813 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
12814 accidentally removed by previous change, and make DECL_RTL here.
12815 * class.c (add_method): Don't make DECL_RTL here.
12816
12817 * pt.c (for_each_template_parm): Don't examine uninstantiated
12818 default arguments.
12819
12820 1998-10-16 Dave Brolley <brolley@cygnus.com>
12821
12822 * lex.c (real_yylex): Fix unaligned access of wchar_t.
12823
12824 1998-10-16 Mark Mitchell <mark@markmitchell.com>
12825
12826 * class.c (add_method): Fix documentation to reflect previous
12827 changes. Check for duplicate method declarations here.
12828 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
12829 correctly; such things never match.
12830 (grokfndecl): Don't look for duplicate methods here.
12831 * decl2.c (check_classfn): Don't assume names are mangled.
12832 Don't add bogus member function declarations to a class before the
12833 class type is complete.
12834 (grokfield): Reformat error message.
12835 * method.c (set_mangled_name_for_decl): Don't mangle names while
12836 processing_template_decl.
12837
12838 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
12839
12840 * typeck.c (build_indirect_ref): Complain about a pointer to data
12841 member, too.
12842 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
12843 data member.
12844 * init.c (resolve_offset_ref): Don't undo the above.
12845
12846 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
12847 (struct lang_decl_flags): Add `bitfield'.
12848 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
12849 DECL_BIT_FIELD.
12850 * decl2.c (grokbitfield, grok_alignof): Likewise.
12851 * init.c (build_offset_ref): Likewise.
12852 * typeck.c (build_component_addr, expr_sizeof): Likewise.
12853 * cvt.c (build_up_reference): Don't crash if taking the address
12854 returns error_mark_node.
12855
12856 * decl.c (grokfndecl): Also check ctype when checking for ::main().
12857
12858 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
12859
12860 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
12861 Do mangling here.
12862 (grokdeclarator): Instead of here.
12863 * friend.c (do_friend): Lose special handling of ::main and
12864 __builtin_*.
12865 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
12866
12867 * spew.c (yylex): Clear looking_for_typename if we got
12868 'enum { ... };'.
12869
12870 1998-10-15 Mark Mitchell <mark@markmitchell.com>
12871
12872 * class.c (maybe_warn_about_overly_private_class): Improve error
12873 messages for class with only private constructors.
12874
12875 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
12876 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
12877 (build_typename_type): New function.
12878 * decl.c (build_typename_type): Broken out from ...
12879 (make_typename_type): Use it.
12880 * search.c (lookup_field): Likewise.
12881
12882 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12883
12884 * pt.c (convert_nontype_argument): Check against type_referred_to.
12885 * decl.c (grokvardecl): Check for declarator name before building
12886 DECL_ASSEMBLER_NAME.
12887
12888 1998-10-14 Mark Mitchell <mark@markmitchell.com>
12889
12890 * pt.c (lookup_template_class): Add comment.
12891 (instantiate_class_template): Don't mark the _TYPE node for
12892 member class templates as an instantiation.
12893
12894 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
12895
12896 * decl.c (grokfndecl): Fix my thinko.
12897
12898 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
12899
12900 * tinfo2.cc (fast_compare): Remove.
12901 (before): Just use strcmp.
12902 * tinfo.cc (operator==): Just use strcmp.
12903
12904 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
12905
12906 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
12907 declarations.
12908
12909 1998-10-13 Mark Mitchell <mark@markmitchell.com>
12910
12911 * cp-tree.h (specializations_of_same_template_p): Remove.
12912 * search.c (get_template_base): Don't use it.
12913 (get_template_base_recursive): Likewise.
12914 * pt.c (specializations_of_same_template_p): Remove.
12915 (unify): Don't use it.
12916 (lookup_template_class): Find the correct parent when setting
12917 CLASSTYPE_TI_TEMPLATE.
12918
12919 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
12920
12921 * tinfo.cc (operator==): Always compare names.
12922
12923 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
12924
12925 * decl.c (start_function): Fix cut-and-paste error.
12926
12927 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
12928
12929 * inc/typeinfo: Add #pragma interface.
12930 (operator!=): Just call operator==.
12931 * tinfo.cc: Add #pragma implementation.
12932 (operator==): Move from inc/typeinfo and tinfo2.cc.
12933 Check __COMMON_UNRELIABLE instead of _WIN32.
12934
12935 * typeck2.c (my_friendly_abort): Add URL.
12936
12937 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
12938
12939 * decl.c (start_method): Added extra parameter for attributes.
12940 * cp-tree.h (start_method): Update prototype.
12941 * parse.y (fn.def2): Update start_method parameter list.
12942
12943 1998-10-11 Mark Mitchell <mark@markmitchell.com>
12944
12945 * cp-tree.h (specializations_of_same_template_p): Declare.
12946 * pt.c (specializations_of_same_template_p): New function.
12947 (unify): Use it.
12948 * search.c (get_template_base): Use it.
12949 (get_template_base_recursive): Likewise.
12950
12951 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
12952
12953 * decl2.c (start_objects): Add new variable `joiner' and
12954 initialize it properly.
12955
12956 1998-10-09 Mark Mitchell <mark@markmitchell.com>
12957
12958 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
12959 change to vtable types.
12960
12961 * cvt.c (ocp_convert): Avoid infinite recursion caused by
12962 1998-10-03 change.
12963
12964 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
12965
12966 * pt.c (resolve_overloaded_unification): New fn.
12967 (try_one_overload): Likewise.
12968 (unify): Don't fail on unknown type.
12969 (type_unification_real): Likewise. Use resolve_overloaded_unification
12970 to handle an overloaded argument.
12971 (template_args_equal): Split out...
12972 (comp_template_args): From here.
12973 (determine_specialization): Also allow a template with more
12974 parms than were explicitly specified.
12975 * cp-tree.h: Add template_args_equal.
12976 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
12977
12978 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
12979
12980 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
12981 change.
12982
12983 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
12984
12985 * typeck.c (unsigned_type): Only return TItype nodes when
12986 HOST_BITS_PER_WIDE_INT is >= 64 bits.
12987 (signed_type): Likewise.
12988 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
12989 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
12990 (init_decl_processing): Only create TItype nodes when
12991 HOST_BITS_PER_WIDE_INT is >= 64 bits.
12992 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
12993 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
12994
12995 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12996
12997 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
12998 (gxx.gperf): Update comments describing invocation flags.
12999 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
13000
13001 1998-10-07 Mark Mitchell <mark@markmitchell.com>
13002
13003 * class.c (finish_struct_1): Add commentary on previous change.
13004
13005 * cp-tree.h (vtbl_ptr_type_node): New variable.
13006 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
13007 already of the right type.
13008 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
13009 Simplify code to grow vtable.
13010 * decl.c (vtbl_ptr_type_node): Define.
13011 (init_decl_processing): Initialize it.
13012
13013 1998-10-06 Mark Mitchell <mark@markmitchell.com>
13014
13015 * cp-tree.def (PTRMEM_CST): New tree node.
13016 * cp-tree.h (ptrmem_cst): New type.
13017 (lang_type): Remove local_typedecls.
13018 (dummy): Increase to 12 bits from 11.
13019 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
13020 (PTRMEM_CST_CLASS): New macro.
13021 (PTRMEM_CST_MEMBER): Likewise.
13022 (current_access_specifier): New variable.
13023 (current_class_type): Remove duplicate declaration.
13024 (finish_struct): Change prototype.
13025 (unreverse_member_declarations): New function.
13026 (pushdecl_class_level): Change prototype.
13027 (grok_enum_decls): Remove.
13028 (fixup_anonymous_union): New function.
13029 (grok_x_components): Change prototype.
13030 (tsubst_chain): Remove.
13031 (finish_member_template_decl): Likewise.
13032 (check_explicit_specialization): Fix indentation.
13033 (finish_class_definition): Change prototype.
13034 (finish_member_class_template): Likewise.
13035 (finish_member_declaration): New function.
13036 (check_multiple_declarators): Likewise.
13037 * class.c (class_stack_node_t): New type.
13038 (current_class_base): Remove.
13039 (current_class_stack): Change type.
13040 (current_access_specifier): New variable.
13041 (grow_method): Remove.
13042 (check_member_decl_is_same_in_complete_scope): Break out from
13043 finish_struct.
13044 (make_method_vec): New function.
13045 (free_method_vec): Likewise.
13046 (add_implicitly_declared_members): Break out from finish_struct_1.
13047 (free_method_vecs): New variable.
13048 (add_method): Rework for direct use from parser.
13049 (handle_using_decl): Watch for NULL_TREE while iterating through
13050 CLASSTYPE_METHOD_VEC.
13051 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
13052 just do some error-checking.
13053 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
13054 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
13055 (finish_struct): Change prototype. Simplify; fields and methods
13056 are already set up at this point.
13057 (init_class_processing): Set up current_class_stack.
13058 (pushclass): Save current_access_specifier.
13059 (popclass): Restore it.
13060 (currently_open_class): Simplify.
13061 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
13062 * decl.c (saved_scope): Add access_specifier.
13063 (maybe_push_to_top_level): Save it.
13064 (pop_from_top_level): Restore it.
13065 (maybe_process_template_type_declaration): Use
13066 finish_member_declaration.
13067 (pushtag): Likewise.
13068 (pushdecl_class_level): Don't return a value.
13069 (fixup_anonymous_union): Break out from grok_x_components.
13070 (shadow_tag): Use it.
13071 (xref_tag): Complain about using an elaborated type specifier to
13072 reference a template type parameter or typedef name.
13073 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
13074 (current_local_enum): Remove.
13075 (build_enumerator): Call finish_member_declaration.
13076 (grok_enum_decls): Remove.
13077 * decl2.c (grok_x_components): Simplify.
13078 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
13079 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
13080 (merge_functions): Add to comment.
13081 (arg_assoc_type): Prototype.
13082 (arg_assoc): Pass as many arguments as there are parameters.
13083 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
13084 OFFSET_REF.
13085 * expr.c (cpls_expand_expr): Remove dead code. Handle
13086 PTRMEM_CST.
13087 * friend.c (do_friend): Lookup friends when in nested classes.
13088 Change comments.
13089 * init.c (build_offset_ref): Do lookup even for classes that are
13090 only partially defined.
13091 (decl_constant_value): Remove dead code.
13092 * method.c (build_overload_value): Remove hack where by TYPE was
13093 not a TYPE. Handle PTRMEM_CST.
13094 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
13095 should go.
13096 * parse.y (components, notype_components, component_decl,
13097 component_decl_1, component_declarator, component_declarator0):
13098 Now all are itype rather than ttype. Rework to add members to
13099 classes on the fly.
13100 (typesqpecqual_reserved): Use check_multiple_declarators.
13101 (structsp): Update class to finish_class_definition.
13102 (do_xref_defn): Unsplit into named_class_head.
13103 (access_specifier): Set current_access_specifier.
13104 * pt.c (set_current_access_from_decl): New function.
13105 (finish_member_template_decl): Don't take the parameters.
13106 (comp_template_args): Make more robust.
13107 (lookup_template_class): Don't use current_local_enum.
13108 (for_each_template_parm): Handle PTRMEM_CST.
13109 (instantiate_class_template): Use set_current_access_from_decl,
13110 finish_member_declaration and unreverse_member_declarations. Set
13111 lineno/input_filename before generating implicit member functions.
13112 (type_unification_real): Don't assume back-unification happens
13113 only for the last argument.
13114 (regenerate_decl_from_template): Call pushclass a bit earlier.
13115 (tsubst_chain): Remove.
13116 (tsubst_enum): Use set_current_access_from_decl.
13117 (set_mangled_name_for_template_decl): Fix indentation.
13118 * search.c (lookup_fnfields_1): Change iteration through
13119 CLASSTYPE_METHOD_VEC.
13120 (dfs_pushdecls): Likewise.
13121 (dfs_compress_decls): Likewise.
13122 (add_conversions): Likewise.
13123 * semantics.c (finish_class_definition): Don't take components.
13124 Change call to finish_struct.
13125 (finish_member_declaration): New function.
13126 (finish_member_class_template): Don't take template parameters.
13127 Change call to grok_x_components. Call finish_member_template_decl.
13128 (check_multiple_declarators): New function.
13129 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
13130 a passed in fieldlist.
13131 * tree.c (search_tree): Handle PTRMEM_CST.
13132 (mapcar): Likewise.
13133 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
13134 INTEGER_CSTs, for pointer-to-data members.
13135
13136 * call.c (resolve_args): Resolve template specializations, if
13137 possible.
13138
13139 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13140
13141 * Makefile.in (spew.o): Depend on toplev.h.
13142
13143 * call.c (compare_ics): Initialize variables `deref_from_type2',
13144 `deref_to_type1' and `deref_to_type2'.
13145
13146 * except.c (get_eh_type): Hide prototype and definition.
13147 (process_start_catch_block_old): Remove unused static prototype.
13148
13149 * pt.c (tsubst_decl): Initialize variable `argvec'.
13150
13151 * spew.c: Include toplev.h.
13152
13153 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
13154
13155 * pt.c (instantiate_decl): Do save and restore file position.
13156
13157 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
13158
13159 * method.c (build_decl_overload_real): Clear
13160 numeric_output_need_bar after __.
13161
13162 1998-10-05 Nathan Sidwell <nathan@acm.org>
13163
13164 * call.c (build_new_method_call): Issue 'incomplete type' error,
13165 if class is not defined.
13166
13167 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13168
13169 * call.c (build_object_call): Move declaration of variable
13170 `fn' into the scope where it is used. Don't access variable
13171 `fn' when it is uninitialized, instead use `fns'.
13172
13173 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13174
13175 * errfn.c (cp_thing): Print buf as a string not as a printf format
13176 to avoid problems with the operator%. Consequently, `%%' sequences
13177 in format are copied as `%' in buf.
13178
13179 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
13180
13181 * pt.c (pop_tinst_level): Call extract_interface_info.
13182 (instantiate_decl): Don't save and restore file position.
13183
13184 * decl.c (cp_finish_decl): Make statics in extern inlines and
13185 templates common, if possible and the target doesn't support weak
13186 symbols.
13187
13188 * decl.c (grokdeclarator): Remove redundant calls to
13189 build_type_variant and some duplicated code.
13190 * sig.c (build_signature_reference_type): Only take the type parm.
13191 (build_signature_pointer_type): Likewise.
13192 * tree.c (build_cplus_method_type): Adjust.
13193 * cp-tree.h: Update.
13194
13195 1998-10-04 Mark Mitchell <mark@markmitchell.com>
13196
13197 * call.c (build_over_call): Make pedwarns about dropped qualifiers
13198 into full-fledged errors.
13199 * cvt.c (convert_to_reference): Likewise.
13200 * typeck.c (convert_for_assignment): Likewise.
13201
13202 * search.c (expand_upcast_vtables): In addition to unsetting
13203 TREE_READONLY, remove top-level const type qualifier.
13204
13205 1998-10-03 Mark Mitchell <mark@markmitchell.com>
13206
13207 * class.c (current_class_ptr, current_class_ref): Clarify
13208 documentation.
13209 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
13210 NOP type conversions.
13211 * decl.c (decls_match): Use comptypes directly; ignore
13212 qualifiers on the DECL.
13213 (duplicate_decls): Remove qualifier checks on DECL.
13214 (grokdeclarator): Make the type built up include top-level
13215 qualifiers.
13216 * decl2.c (do_dtors): Fix spelling error.
13217 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
13218 when printing type information.
13219 * init.c (build_new_1): Add documentation. Deal with the fact
13220 that type of allocated memory now contains qualifiers.
13221 * lex.c (is_global): Improve error-recovery.
13222 * sig.c (build_member_function_pointer): Don't cast away const
13223 on fields of sigtable_entry_type.
13224 * tree.c (lvalue_type): Don't look at top-level qualifiers on
13225 expressions.
13226 * typeck.c (decay_conversion): Likewise.
13227 (build_component_ref): Make sure the type of the COMPONENT_REF
13228 contains top-level qualifiers, as appropriate. Improve
13229 error-handling.
13230 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
13231 (build_array_ref): Likewise.
13232 (build_unary_op): Improve error-recovery.
13233 (unary_complex_lvalue): Make taking the address a bound member
13234 function an error, not a sorry.
13235 (build_conditional_expr): Look at the type qualifiers, not the
13236 qualifiers on the expression itself.
13237
13238 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
13239
13240 * decl2.c (merge_functions): Remove duplicates.
13241
13242 * decl2.c: Add -f{no-,}implicit-inline-templates.
13243 (import_export_decl): Check it.
13244
13245 * decl.c (lookup_name_real): Template parms also take precedence
13246 over implicit typename. Only warn if yylex.
13247
13248 * typeck.c (build_conditional_expr): Only fold if ifexp is an
13249 INTEGER_CST.
13250
13251 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
13252 instead of linkage.
13253
13254 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
13255
13256 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
13257 * class.c (build_vbase_pointer): Use it.
13258 * rtti.c (expand_class_desc): Likewise.
13259 * tree.c (build_vbase_pointer_fields): Likewise.
13260
13261 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
13262
13263 * decl.c (start_decl): Add invocation of
13264 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
13265 (start_function): Add invocation of
13266 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
13267
13268 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
13269 HANDLE_GENERIC_PRAGMAS.
13270
13271 1998-09-28 Anthony Green <green@cygnus.com>
13272
13273 * semantics.c (finish_asm_stmt): Always permit volatile asms.
13274
13275 1998-09-28 Mark Mitchell <mark@markmitchell.com>
13276
13277 * decl.c (grokdeclarator): Tighten checks for invalid
13278 destructors. Improve error-messages and error-recovery.
13279 * decl2.c (check_classfn): Don't assume that mangled destructor
13280 names contain type information.
13281
13282 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
13283
13284 * search.c (get_base_distance): Remove assert.
13285
13286 * decl2.c (build_anon_union_vars): Don't process a field with no
13287 name.
13288 (finish_anon_union): Also complain about local anon unions with no
13289 members.
13290
13291 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
13292
13293 * decl.c (lookup_namespace_name): If the name is a namespace,
13294 return it immediately.
13295
13296 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13297
13298 * cp-tree.h (define_case_label): Remove unused parameter.
13299 (check_java_method): Likewise.
13300 (grokclassfn): Likewise.
13301 (expand_aggr_init): Likewise.
13302 (build_x_delete): Likewise.
13303 (maybe_end_member_template_processing): Likewise.
13304 (unshare_base_binfos): Add prototype.
13305 (string_conv_p): Likewise.
13306 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
13307
13308 * cvt.c (build_up_reference): Remove unused parameter
13309 `checkconst', all callers changed.
13310 (build_type_conversion): Mark parameter `code' with
13311 ATTRIBUTE_UNUSED.
13312 (build_expr_type_conversion): Initialize variable `conv'.
13313
13314 * decl.c (push_namespace): Initialize variable `d'.
13315 (define_case_label): Remove unused parameter `decl', all callers
13316 changed.
13317
13318 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
13319 `argc' with ATTRIBUTE_UNUSED.
13320 (grokclassfn): Remove unused parameter `cname', all callers
13321 changed.
13322 (check_java_method): Likewise for parameter `ctype'.
13323 (copy_assignment_arg_p): Mark parameter `virtualp' with
13324 ATTRIBUTE_UNUSED.
13325 (finish_prevtable_vardecl): Likewise for parameter `prev'.
13326
13327 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
13328
13329 * init.c (expand_aggr_init_1): Remove unused parameter
13330 `alias_this', all callers changed.
13331 (expand_aggr_init): Likewise.
13332 (expand_default_init): Likewise.
13333 (build_new_1): Initialize variable `susp'.
13334 (build_x_delete): Remove unused parameter `type', all callers
13335 changed.
13336
13337 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
13338 ATTRIBUTE_UNUSED.
13339 (readescape): Use (unsigned) value in shift.
13340 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
13341 comparing to a signed quantity.
13342
13343 * pt.c (maybe_end_member_template_processing): Remove unused
13344 parameter `decl', all callers changed.
13345 (check_explicit_specialization): Add braces around empty body in
13346 an else-statement.
13347 (current_template_args): Initialize variable `args'.
13348 (lookup_template_class): Likewise for variable `prev_local_enum'.
13349 (tsubst_decl): Likewise for variable `r'.
13350 (set_mangled_name_for_template_decl): Initialize variable
13351 `context'.
13352
13353 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
13354 Likewise for variable `i'.
13355 (yylex): Initialize variable `trrr'.
13356
13357 * typeck.c (compparms): Mark variable `strict' with
13358 ATTRIBUTE_UNUSED.
13359
13360 * xref.c (simplify_type): Cast argument of ctype function to
13361 `unsigned char'.
13362
13363 1998-09-24 Mark Mitchell <mark@markmitchell.com>
13364
13365 * cp-tree.h (language_lvalue_valid): Remove.
13366 * decl.c (grokdeclarator): Don't disallow references to functions.
13367 * tree.c (lvalue_p_1): New function, combining duplicated
13368 code from ...
13369 (lvalue_p): Use it.
13370 (real_lvalue_p): Likewise.
13371 * typeck.c (language_lvalue_valid): Remove.
13372 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
13373 they don't have TREE_READONLY set.
13374 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
13375
13376 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
13377
13378 * spew.c (yylex): Give diagnostic.
13379 * hash.h (is_reserved_word): Add export.
13380 * gxx.gperf: Likewise.
13381 * lex.h (rid): Add RID_EXPORT.
13382 * lex.c (init_parse): Likewise.
13383
13384 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
13385
13386 * friend.c (do_friend): Make warning a full sentence.
13387
13388 1998-09-22 Mark Mitchell <mark@markmitchell.com>
13389
13390 * parse.y (component_decl_list): Improve error-recovery.
13391
13392 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
13393
13394 * decl.c (make_typename_type): Move error to point where name
13395 variable can be used by dump_type.
13396
13397 1998-09-22 Mark Mitchell <mark@markmitchell.com>
13398
13399 * decl.c (grokfndecl): Improve error-recovery.
13400 * decl2.c (grokfield): Likewise.
13401 * pt.c (finish_member_template_decl): Likewise.
13402
13403 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
13404
13405 * method.c (hack_identifier): Finding multiple members is always
13406 an error.
13407
13408 1998-09-21 Per Bothner <bothner@cygnus.com>
13409
13410 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
13411
13412 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
13413
13414 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
13415
13416 1998-09-20 Mark Mitchell <mark@markmitchell.com>
13417
13418 * class.c (maybe_warn_about_overly_private_class): Reformat.
13419
13420 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
13421
13422 * exception.cc (__cplus_type_matcher): Realign some code.
13423
13424 1998-09-16 Mark Mitchell <mark@markmitchell.com>
13425
13426 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
13427 (tinfo2.o): Likewise.
13428 (exception.o): Likewise.
13429 (new.o): Likewise.
13430 (opnew.o): Likewise.
13431 (opnewnt.o): Likewise.
13432 (opvnew.o): Likewise.
13433 (opvnewnt.o): Likewise.
13434 (opdel.o): Likewise.
13435 (opdelnt.o): Likewise.
13436 (opvdel.o): Likewise.
13437 (opvdelnt.o): Likewise.
13438
13439 1998-09-16 Richard Henderson <rth@cygnus.com>
13440
13441 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
13442
13443 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
13444
13445 * call.c (build_field_call): Handle static data members too.
13446
13447 * typeck.c (comptypes): When comparing pointer types, check
13448 whether referred types match even in strictest modes.
13449
13450 1998-09-15 Mark Mitchell <mark@markmitchell.com>
13451
13452 * cp-tree.h: Revert previous change.
13453 (finish_struct_methods): Remove declaration.
13454 * class.c: Revert previous change.
13455 (maybe_warn_about_overly_private_class): New function.
13456 (finish_struct_methods): Declare here, and make static. Remove
13457 unnecessary parameters. Tidy slightly. Use
13458 maybe_warn_about_overly_private_class.
13459 (finish_struct_1): Adjust. Remove check for private constructors,
13460 now done elsewhere.
13461 (finish_struct): Adjust.
13462
13463 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
13464
13465 * except.c (expand_start_catch_block): No need to check for new
13466 exception model.
13467 (process_start_catch_block_old): Deleted.
13468 (process_start_catch_block): Add call to start_decl_1().
13469 (expand_end_catch_block): Add call to end_catch_handler().
13470 * exception.cc (__cplus_type_matcher): Only check the exception
13471 language if there is an exception table.
13472
13473 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
13474
13475 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
13476 as used to prevent conflicts with virtual function tables.
13477
13478 1998-09-14 Mark Mitchell <mark@markmitchell.com>
13479
13480 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
13481 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
13482 * class.c (maybe_class_too_private_p): New function.
13483 (finish_struct_methods): Use it.
13484 (finish_struct_1): Likewise.
13485 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
13486 appropriate.
13487
13488 * pt.c (check_specialization_scope): Fix spelling error.
13489 (check_explicit_specialization): Remove code to handle explicit
13490 specializations in class scope; they are now correctly diagnosed
13491 as errors.
13492
13493 1998-09-10 Mark Mitchell <mark@markmitchell.com>
13494
13495 * decl.c (pushdecl): Don't copy types if the
13496 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
13497 type.
13498
13499 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
13500
13501 * class.c (get_enclosing_class): New function.
13502 (is_base_of_enclosing_class): Likewise.
13503 * cp-tree.h (get_enclosing_class): Declare.
13504 (is_base_of_enclosing_class): Likewise.
13505 * pt.c (coerce_template_parms): Use them.
13506
13507 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
13508
13509 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
13510 null to decide whether to use it.
13511
13512 * error.c (dump_type_real): Handle NAMESPACE_DECL.
13513 * parse.y (base_class.1): Avoid crash on error.
13514
13515 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
13516
13517 * decl.c (make_typename_type): If context is a namespace, the code
13518 is in error.
13519
13520 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
13521
13522 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
13523
13524 1998-09-08 Mark Mitchell <mark@markmitchell.com>
13525
13526 * cp-tree.h (anonymous_namespace_name): Declare.
13527 * decl.c: Define it.
13528 (push_namespace): Use anonymous_namespace_name, rather than local
13529 static anon_name.
13530 * error.c (dump_decl): If a namespace is named
13531 anonymous_namespace_name, call it {anonymous}.
13532
13533 * decl.c (grokparms): Distinguish between references and pointers
13534 in error message.
13535
13536 1998-09-08 Richard Henderson <rth@cygnus.com>
13537 Mark Mitchell <mark@markmitchell.com>
13538
13539 * pt.c (process_partial_specialization): Consistently allocate
13540 and zero tpd.parms based on ntparms. Use tpd2.parms, not
13541 tpd.parms, where appropriate.
13542
13543 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
13544
13545 * Makefile.in (INCLUDES): Update after recent toplevel gcc
13546 reorganizations.
13547
13548 1998-09-05 Mark Mitchell <mark@markmitchell.com>
13549
13550 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
13551 * class.c (finish_struct): Remove hackery to deal with explicit
13552 specializations in class scope.
13553 * decl.c (grokfndecl): Improve error-recovery.
13554 * decl2.c (grokfield): Likewise.
13555 * pt.c (check_specialization_scope): New function.
13556 (begin_specialization): Call it.
13557 (process_partial_specialization): New function, split out from
13558 push_template_decl. Check partial specializations more
13559 stringently.
13560 (push_template_decl): Call it.
13561 (check_explicit_specialization): Don't attempt to handle explicit
13562 specializations in class scope.
13563 (template_parm_data): Document. Add current_arg and
13564 arg_uses_template_parms.
13565 (mark_template_parm): Set it.
13566 (tsubst_arg_types): Remove unused variable.
13567 * semantics.c (begin_class_definition): Tweak.
13568
13569 1998-09-04 Mark Mitchell <mark@markmitchell.com>
13570
13571 * inc/typeinfo (type_info::type_info(const char*)): Make
13572 `explicit'.
13573
13574 * cp-tree.h (hash_tree_cons_simple): New macro.
13575 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
13576 (coerce_template_parms): Use make_temp_vec, instead of
13577 make_tree_vec. Document this behavior.
13578 (lookup_template_class): Likewise.
13579 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
13580 Remove dead code (and add assertion to check its deadness). Fix
13581 bug w.r.t. exception specifications.
13582
13583 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
13584
13585 * decl2.c (import_export_vtable): Always make artificials comdat.
13586 (import_export_decl): Likewise.
13587 * pt.c (mark_decl_instantiated): Likewise.
13588
13589 1998-09-03 Mark Mitchell <mark@markmitchell.com>
13590
13591 * cp-tree.h (finish_globally_qualified_member_call_expr):
13592 Rename to ...
13593 (finish_qualified_call_expr).
13594 * semantics.c: Likewise.
13595 * parse.y (primary): Use it.
13596 * method.c (hack_identifier): Remove redundant code.
13597
13598 * init.c (resolve_offset_ref): Call convert_from_reference to
13599 handle members of reference type. Improve error recovery.
13600
13601 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
13602
13603 * cp-tree.h: Declare warn_nontemplate_friend.
13604 * decl2.c (lang_decode_option): Set.
13605 * lang-options.h: Add -Wnon-template-friend.
13606 * friend.c (do_friend): Use to toggle non-template function warning.
13607
13608 1998-09-03 Mark Mitchell <mark@markmitchell.com>
13609
13610 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
13611 corresponding INTEGER_CSTs when processing_template_decl.
13612 * pt.c (tsubst_enum): Tweak accordingly.
13613
13614 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13615
13616 * decl.c (pushdecl_class_level): Add warning here.
13617 (pushdecl): Tweak.
13618
13619 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
13620
13621 * cvt.c (convert_pointer_to_real): Tidy.
13622 * search.c (get_base_distance_recursive): Simplify.
13623 (get_base_distance): Likewise.
13624
13625 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
13626 parms.
13627
13628 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
13629
13630 * lex.c (check_newline): Call HANDLE_PRAGMA before
13631 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
13632 if unknown pragmas are encountered.
13633 (handle_sysv_pragma): Interpret return code from
13634 handle_pragma_token (). Return success/failure indication rather
13635 than next unprocessed character.
13636 (pragma_getc): New function: retrieves characters from the
13637 input stream. Defined when HANDLE_PRAGMA is defined.
13638 (pragma_ungetc): New function: replaces characters back into the
13639 input stream. Defined when HANDLE_PRAGMA is defined.
13640
13641 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
13642
13643 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
13644 * class.c (build_vtable_entry_ref): Likewise.
13645
13646 1998-09-01 Mark Mitchell <mark@markmitchell.com>
13647
13648 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
13649 * decl2.c (import_export_decl): Likewise.
13650 * pt.c (instantiate_decl): Use it.
13651
13652 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
13653
13654 * decl.c (lookup_name_real): Also do implicit typename thing for
13655 artificial TYPE_DECLs.
13656 * search.c (lookup_field): Likewise.
13657 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
13658 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
13659 (enter_scope_of): Extract type from implicit typename.
13660 (begin_class_definition): Likewise.
13661 * lex.c (identifier_type): Handle implicit typename when checking
13662 for SELFNAME.
13663
13664 * cp-tree.h: Declare flag_strict_prototype.
13665 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
13666 -fstrict-prototype.
13667 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
13668 specified, set it to the value of pedantic.
13669
13670 1998-09-01 Mark Mitchell <mark@markmitchell.com>
13671
13672 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
13673
13674 1998-08-31 Mark Mitchell <mark@markmitchell.com>
13675
13676 * decl.c (finish_enum): Handle member enums of classes declared in
13677 template functions.
13678
13679 * decl2.c (grok_x_components): Strip attributes before calling
13680 groktypename.
13681
13682 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
13683
13684 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
13685 -fenum-int-equivalence and -fno-nonnull-objects.
13686 * class.c (check_for_override): Remove support for -fall-virtual.
13687 (finish_struct_1): Likewise.
13688 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
13689 * typeck.c (build_binary_op_nodefault): Likewise.
13690 * cvt.c (ocp_convert): Likewise.
13691 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
13692 * class.c (build_vbase_path): Likewise.
13693
13694 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
13695
13696 * Makefile.in (INTERFACE): New, set to 1.
13697
13698 1998-08-30 Mark Mitchell <mark@markmitchell.com>
13699
13700 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
13701 comparing with global_namespace.
13702 (dump_aggr_type): Likewise.
13703
13704 * decl.c (grokfndecl): Issue error on declaration of friend
13705 templates with explicit template arguments.
13706
13707 * pt.c (convert_template_argument): New function, split out
13708 from...
13709 (coerce_template_parms): Here.
13710 (tsubst): Attempt better error-recovery.
13711
13712 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
13713
13714 * pt.c (decl_template_parm_p): Add checks for
13715 TEMPLATE_TEMPLATE_PARM.
13716
13717 1998-08-28 Mark Mitchell <mark@markmitchell.com>
13718
13719 * lex.c (do_identifier): Fix thinko in previous change.
13720
13721 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
13722
13723 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
13724 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
13725
13726 1998-08-28 Richard Henderson <rth@cygnus.com>
13727
13728 Add support for discarding unused virtual functions.
13729 * lang-options.h: Add -fvtable-gc.
13730 * cp-tree.h: Add flag_vtable_gc.
13731 * decl2.c (output_vtable_inherit): New fn.
13732 (finish_vtable_vardecl): Call it.
13733 * class.c (build_vtable_entry_ref): New fn.
13734 (build_vtbl_ref): Call it.
13735
13736 1998-08-28 Mark Mitchell <mark@markmitchell.com>
13737
13738 * cp-tree.h (build_enumerator): Take the enumeration type as a
13739 parameter.
13740 * decl.c (finish_enum): Don't set the TREE_TYPE for the
13741 enumeration constant values if we're processing_template_decls.
13742 Don't set the type for the CONST_DECLs either; that's done in
13743 build_enumerator.
13744 (build_enumerator): Take the enumeration type as a
13745 parameter.
13746 * lex.c (do_identifier): Don't resolve enumeration constants while
13747 processing template declarations, even if they happen to be
13748 TEMPLATE_PARM_INDEXs.
13749
13750 * parse.y (current_enum_type): New variable.
13751 (primary): Don't allow statement-expression in local classes just
13752 as we don't in global classes.
13753 (structsp): Use current_enum_type.
13754 (enum_list): Likewise.
13755 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
13756 finish_enum; they no longer occur.
13757
13758 * cp-tree.h (finish_base_specifier): New function.
13759 * parse.y (base_class): Use it.
13760 * semantics.c (finish_base_specifier): Define it.
13761
13762 * parse.y (structsp): Warn on use of typename outside of template
13763 declarations.
13764
13765 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
13766
13767 * lex.c (handle_cp_pragma): Remove #pragma vtable.
13768 * lang-options.h: Remove +e options.
13769 * decl2.c (lang_decode_option): Likewise.
13770 (import_export_vtable): Don't check write_virtuals.
13771 (finish_vtable_vardecl, finish_file): Likewise.
13772 * search.c (dfs_debug_mark): Likewise.
13773 * semantics.c (begin_class_definition): Likewise.
13774 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
13775
13776 * call.c (build_over_call): Check flag_elide_constructors.
13777 * decl2.c: flag_elide_constructors defaults to 1.
13778 * typeck.c (convert_arguments): Remove return_loc parm.
13779 (build_function_call_real): Adjust.
13780
13781 * search.c: Tear out all mi_matrix and memoize code.
13782 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
13783 * lang-options.h: Remove documentation for -fhandle-exceptions,
13784 -fmemoize-lookups and -fsave-memoized.
13785 * cp-tree.h: Lose mi_matrix and memoize support.
13786 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
13787 * class.c: Lose struct class_level.
13788 (pushclass, popclass): Lose memoize support.
13789 * init.c (build_offset_ref): Likewise.
13790
13791 Never change BINFO_INHERITANCE_CHAIN.
13792 * init.c (emit_base_init): Change modification of
13793 BINFO_INHERITANCE_CHAIN to an assert.
13794 * search.c (get_base_distance_recursive): Likewise.
13795 (get_base_distance): Likewise.
13796 (lookup_member): Likewise.
13797 (convert_pointer_to_single_level): Likewise.
13798 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
13799 (lookup_fnfields): Likewise.
13800 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
13801 (unshare_base_binfos): Don't call propagate_binfo_offsets.
13802 (layout_basetypes): Call propagate_binfo_offsets instead of
13803 unshare_base_binfos.
13804 * decl.c (xref_basetypes): Call unshare_base_binfos.
13805 * pt.c (instantiate_class_template): Likewise.
13806 * tree.c (reverse_path): Remove 'copy' parm; always make a
13807 temporary copy.
13808 * class.c (build_vbase_path): Just call it.
13809 * search.c (compute_access): Likewise. Don't re-reverse.
13810
13811 1998-08-27 Mark Mitchell <mark@markmitchell.com>
13812
13813 * class.c (build_vbase_path): Use reverse_path.
13814 (finish_base_struct): Move warnings for inaccessible bases to
13815 layout_basetypes.
13816 (modify_one_vtable): Remove check of TREE_USED (binfo).
13817 (fixup_vtable_deltas1): Likewise.
13818 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
13819 (xref_tag): Remove binfos parameter.
13820 (make_binfo): Remove chain parameter.
13821 (reverse_path): Add copy parameter.
13822 * decl.c (init_decl_processing): Change calls to xref_tag.
13823 (xref_tag): Remove binfos parameter.
13824 (xref_basetypes): Change calls to make_binfo.
13825 * decl2.c (grok_x_components): Change calls to xref_tag.
13826 (handle_class_head): Likewise.
13827 * friend.c (do_friend): Likewise.
13828 * lex.c (make_lang_type): Change calls to make_binfo.
13829 * parse.y (structsp): Change calls to xref_tag.
13830 (named_complex_class_head_sans_basetype): Likewise.
13831 (named_class_head): Likewise.
13832 * rtti.c (init_rtti_processing): Likewise.
13833 * search.c (compute_access): Change calls to reverse_path.
13834 (dfs_get_vbase_types): Change calls to make_binfo.
13835 (get_vbase_types): Remove dead code.
13836 * tree.c (unshare_base_binfos): Change calls to make_binfo.
13837 (layout_basetypes): Warn here about inaccessible bases.
13838 (make_binfo): Remove chain parameter.
13839 (reverse_path): Add copy parameter.
13840
13841 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
13842
13843 * class.c: #if 0 complete_type_p.
13844 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
13845 * method.c (process_overload_item): Likewise.
13846 * typeck.c (comp_target_types): Likewise.
13847
13848 Stop sharing binfos for indirect virtual bases.
13849 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
13850 (layout_basetypes): Likewise.
13851 (unshare_base_binfos): Copy vbases, too.
13852 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
13853 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
13854 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
13855 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
13856 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
13857 reference to BINFO_VIA_PUBLIC.
13858 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
13859 (push_class_decls): Use them.
13860 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
13861 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
13862
13863 1998-08-27 Mark Mitchell <mark@markmitchell.com>
13864
13865 * decl.c (build_enumerator): Set DECL_CONTEXT for the
13866 CONST_DECLs.
13867
13868 1998-08-26 Mark Mitchell <mark@markmitchell.com>
13869
13870 * cp-tree.h (finish_enum): Change prototype.
13871 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
13872 VALUES parameter. Don't try to compute mins/maxs if
13873 processing_template_decl.
13874 * parse.y (structsp): Use new calling sequence for finish_enum.
13875 * pt.c (tsubst_enum): Likewise. Take the new type as input.
13876 (lookup_template_class): Remove unused variables. Tweak.
13877 Register enums on instantiation list before substituting
13878 enumeration constants.
13879 (tsubst_decl): Remove unused variables.
13880 (regenerate_decl_from_template): Likewise.
13881
13882 * decl.c (duplicate_decls): Don't obliterate the
13883 DECL_TEMPLATE_INFO for a template if we're not replacing it with
13884 anything.
13885
13886 * lex.c (do_identifier): Fix typo in comment.
13887
13888 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13889
13890 * errfn.c: Remove stdarg.h/varargs.h.
13891 * tree.c: Likewise.
13892
13893 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
13894
13895 * pt.c (tsubst_copy): Only do typename overloading on an
13896 IDENTIFIER_NODE that happens to look like a typename if it actually
13897 has a type for us to use.
13898
13899 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
13900
13901 * typeck.c (comp_cv_target_types): Split out...
13902 (comp_target_types): From here. Don't allow cv-qual changes under
13903 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
13904 (build_ptrmemfunc): Pass 1 to nptrs.
13905 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
13906
13907 1998-08-25 Mark Mitchell <mark@markmitchell.com>
13908
13909 * search.c (dependent_base_p): Don't compare a binfo to
13910 current_class_type; use the TREE_TYPE of the binfo instead.
13911
13912 * cp-tree.h (CLASS_TYPE_P): Revise definition.
13913
13914 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
13915
13916 * decl.c (duplicate_decls): Don't complain about different
13917 exceptions from an internal decl even if pedantic.
13918
13919 * typeck.c (convert_for_assignment): Converting from pm of vbase
13920 to derived is an error, not a sorry.
13921
13922 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
13923 * class.c (fixed_type_or_null): Rename from
13924 resolves_to_fixed_type_p. Return the dynamic type of the
13925 expression, if fixed, or null.
13926 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
13927 does not match the static type.
13928 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
13929 resolves_to_fixed_type_p again.
13930
13931 1998-08-24 Mark Mitchell <mark@markmitchell.com>
13932
13933 * pt.c (tsubst_decl): Move special case code for dealing with
13934 tricky friend templates here from ...
13935 (regenerate_decl_from_template): Here.
13936
13937 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
13938
13939 * decl.c (start_decl): Remove redundant linkage check.
13940
13941 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
13942
13943 * typeck.c (c_expand_return): Handle the case that valtype
13944 is wider than the functions return type.
13945
13946 1998-08-24 Mark Mitchell <mark@markmitchell.com>
13947
13948 * cp-tree.h (CLASS_TYPE_P): New macro.
13949 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
13950 * pt.c (process_template_parm): Undo previous change.
13951
13952 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
13953
13954 * cp-tree.h: Declare.
13955 * pt.c (decl_template_parm_p): New function.
13956 * decl.c (pushdecl): Check decls for redeclaring template parms.
13957 (xref_tag): Make redeclaration an error, print decl.
13958 * decl2.c (grokfield): Check field_decls for redeclaration as well.
13959
13960 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
13961
13962 * parse.y (primary): Fix up the type of string constants.
13963
13964 1998-08-24 Mark Mitchell <mark@markmitchell.com>
13965
13966 * typeck.c (convert_for_initialization): Move check for odd uses
13967 of NULL to avoid duplicate warnings.
13968
13969 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
13970
13971 * tree.c (lvalue_type): Fix for arrays.
13972 * typeck.c (string_conv_p): New fn.
13973 (convert_for_assignment): Use it.
13974 (build_unary_op): Use lvalue_type.
13975 * call.c (standard_conversion, convert_like): Use string_conv_p.
13976 (add_function_candidate): Use lvalue_type.
13977 * cvt.c (convert_to_reference): Likewise.
13978 * decl2.c (lang_decode_option): Ignore -traditional.
13979 * decl.c (init_decl_processing): flag_writable_strings inhibits
13980 flag_const_strings.
13981
13982 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
13983
13984 * lang-options.h (lang_options): Add fconst-strings to the list
13985 of valid options.
13986 * decl2.c (lang_f_options, lang_decode_option): Likewise.
13987
13988 1998-08-24 Nathan Sidwell <nathan@acm.org>
13989
13990 * lex.c (real_yylex): Don't warn about long long constants if
13991 we're allowing long long.
13992
13993 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
13994
13995 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
13996 accessing bindings directly.
13997
13998 * search.c (my_tree_cons): Reimplement.
13999
14000 * lang-specs.h: Remove __HONOR_STD.
14001 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
14002
14003 1998-08-23 Mark Mitchell <mark@markmitchell.com>
14004
14005 * decl.c (grokdeclarator): Complain about in-class initialization
14006 of aggregates and/or references.
14007 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
14008 TEMPLATE_TYPE_PARMs.
14009
14010 * decl2.c (grok_array_decl): Add comment.
14011 (mark_used): Don't instantiate an explicit instantiation.
14012 * friend.c (make_friend_class): Remove bogus comment. Fix check
14013 for partial specializations.
14014 * pt.c (check_explicit_specialization): Don't
14015 SET_DECL_EXPLICIT_INSTANTIATION here.
14016 (mark_decl_instantiated): Or here.
14017 (do_decl_instantiation): Do it here, instead. Add checks for
14018 duplicate explicit instantiations, etc. Tidy.
14019 (do_type_instantiation): Likewise.
14020 (instantiate_decl): Improve comments. Complain about explicit
14021 instantiations where no definition is available.
14022
14023 * cp-tree.h (ansi_null_node): Remove.
14024 * call.c (build_over_call): Warn about converting NULL to an
14025 arithmetic type.
14026 * cvt.c (build_expr_type_conversion): Likewise. Use
14027 null_ptr_cst_p instead of expanding it inline.
14028 * decl.c (ansi_null_node): Remove.
14029 (init_decl_processing): Make null_node always have integral type.
14030 * except.c (build_throw): Warn about converting NULL to an
14031 arithmetic type.
14032 * lex.c (init_parse): Remove handling of ansi_null_node.
14033 * pt.c (type_unification_real): Don't convert NULL to void* type.
14034 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
14035 (convert_for_assignment): Warn about converting NULL to an
14036 arithmetic type.
14037 (convert_for_initialization): Likewise.
14038
14039 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
14040
14041 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
14042 * pt.c (coerce_template_parms): Use no_linkage_check.
14043 * decl.c (grokvardecl): Likewise.
14044 (grokfndecl): Likewise. Members of anonymous types have no linkage.
14045
14046 * method.c (process_overload_item): Remove useless code.
14047
14048 1998-08-20 Per Bothner <bothner@cygnus.com>
14049
14050 Handle new'ing of Java classes.
14051 * init.c (build_class_classref): New function.
14052 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
14053 constructor does not return this; don't need to exception-protect.
14054
14055 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
14056 * decl2.c (acceptable_java_type): Handle template-derived types.
14057
14058 1998-08-20 Per Bothner <bothner@cygnus.com>
14059
14060 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
14061
14062 1998-08-20 Mark Mitchell <mark@markmitchell.com>
14063
14064 * decl.c (duplicate_decls): Always merge the old and new patterns
14065 for templates, regardless of whether or not the new one has
14066 DECL_INITIAL. Don't throw away specializations. Merge
14067 DECL_SAVED_TREE.
14068 * pt.c (tsubst_decl): Use the right pattern when calculating the
14069 complete args for a new template instance.
14070 (do_decl_instantiation): Fix typo in comment.
14071 (regenerate_decl_from_template): Deal with tricky friend template
14072 case.
14073 (instantiate_decl): Likewise.
14074
14075 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
14076
14077 * init.c (build_builtin_delete_call): Add missing assemble_external
14078 call.
14079
14080 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
14081
14082 * parse.y (notype_unqualified_id): Also accept ~A<int>.
14083
14084 1998-08-19 Mark Mitchell <mark@markmitchell.com>
14085
14086 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
14087 arithmetic.
14088 * except.c (build_throw): Warn when NULL is thrown, even with
14089 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
14090 thrown expression.
14091
14092 * cp-tree.h (ansi_null_node): New variable.
14093 * decl.c (ansi_null_node): New variable.
14094 (init_decl_processing): Initialize its type.
14095 * lex.c (init_parse): Initialize its value. Use ansi_null_node
14096 for null_node in non-ANSI mode.
14097 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
14098 place of null_node to avoid spurious errors.
14099
14100 1998-08-17 Mark Mitchell <mark@markmitchell.com>
14101
14102 * cp-tree.h (enter_scope_of): New function.
14103 * parse.y (complex_direct_notype_declarator): Use it.
14104 * semantics.c (enter_scope_of): New function.
14105
14106 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
14107
14108 * decl.c (grokparms): No, here.
14109
14110 * decl.c (grokdeclarator): Catch parm with pointer to array of
14111 unknown bound here...
14112 * method.c (process_overload_item): ...not here.
14113
14114 * gxxint.texi: Remove obsolete documentation of overloading code.
14115
14116 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
14117 * class.c (finish_struct_bits): Likewise.
14118
14119 * tree.c (lvalue_type): Fix for arrays.
14120 * typeck.c (build_unary_op): Use lvalue_type.
14121 * call.c (add_function_candidate): Likewise.
14122 * cvt.c (convert_to_reference): Likewise.
14123
14124 * decl2.c (lang_decode_option): Ignore -traditional.
14125
14126 * init.c (build_offset_ref): Don't mess with error_mark_node.
14127 * lex.c (do_scoped_id): Use cp_error.
14128
14129 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
14130
14131 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
14132
14133 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
14134
14135 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
14136
14137 * cp-tree.h (set_identifier_local_value): Provide prototype.
14138
14139 * decl2.c (do_namespace_alias): Remove unused variables `binding'
14140 and `old'.
14141
14142 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
14143
14144 * Makefile.in: Rename BBISON to BISON so that it can be properly
14145 inherited from the parent makefile.
14146
14147 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
14148
14149 * lang-options.h: Add -finit-priority.
14150 * decl2.c: Likewise. Check flag_init_priority instead of
14151 USE_INIT_PRIORITY.
14152
14153 * decl2.c (setup_initp): New fn.
14154 (start_objects, finish_objects, do_ctors): Handle init_priority.
14155 (do_dtors, finish_file): Likewise.
14156
14157 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
14158
14159 * pt.c (tsubst_copy): Hush warning.
14160
14161 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
14162
14163 1998-08-12 Mark Mitchell <mark@markmitchell.com>
14164
14165 * pt.c (print_template_context): Don't abort when instantiating a
14166 synthesized method.
14167
14168 * decl.c (grokdeclarator): Issue errors on namespace qualified
14169 declarators in parameter lists or in class scope.
14170
14171 1998-08-09 Mark Mitchell <mark@markmitchell.com>
14172
14173 * pt.c (check_explicit_specialization): Don't abort on bogus
14174 explicit instantiations.
14175
14176 1998-08-07 Mark Mitchell <mark@markmitchell.com>
14177
14178 * typeck.c (require_complete_type): Use complete_type_or_else.
14179 (complete_type_or_else): Always return NULL_TREE on failure, as
14180 documented.
14181
14182 * pt.c (tsubst_aggr_type): Prototype.
14183 (tsubst_decl): New function, split out from tsubst. Set
14184 input_filename and lineno as appropriate.
14185 (pop_tinst_level): Restore the file and line number saved in
14186 push_tinst_level.
14187 (instantiate_class_template): Set input_filename and lineno as
14188 appropriate.
14189 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
14190 context for a TYPENAME_TYPE is complete.
14191
14192 * decl2.c (grokbitfield): Issue errors on bitfields declared with
14193 function type.
14194 (do_dtors): As in do_ctors, pretend to be a member of the same
14195 class as a static data member while generating a call to its
14196 destructor.
14197
14198 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
14199 conversions, even in complex virtual base class hierarchies.
14200
14201 1998-08-06 Mark Mitchell <mark@markmitchell.com>
14202
14203 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
14204 (TYPE_TEMPLATE_INFO): Likewise.
14205 (SET_TYPE_TEMPLATE_INFO): Likewise.
14206 (ENUM_TI_TEMPLATE): Likewise.
14207 (ENUM_TI_ARGS): Likewise.
14208 (lookup_nested_type_by_name): Remove.
14209 * decl.c (maybe_process_template_type_declaration): Handle enums.
14210 (start_enum): Don't check for primary-template enum declarations
14211 here.
14212 (finish_enum): Clean up, document. Make sure template enum
14213 constants get the correct type.
14214 (build_enumerator): Copy initializers for template enumerations,
14215 too.
14216 (grok_enum_decls): Document.
14217 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
14218 better. Build LOOKUP_EXPRs for local variables, even if they are
14219 TREE_PERMANENT.
14220 * pt.c (tsubst_enum): Remove field_chain parameter.
14221 (template_class_depth): Include the depth of surrounding function
14222 contexts.
14223 (push_template_decl): Check for primary-template enum declarations
14224 here. Deal with enumeration templates.
14225 (lookup_template_class): Likewise.
14226 (for_each_template_parm): Likewise.
14227 (instantiate_class_template): Don't call tsubst_enum directly,
14228 call tsubst instead, to instantiate enums. Deal with all
14229 field_chain issues here, not in tsubst_enum.
14230 (lookup_nested_type_by_name): Remove.
14231 (tsubst_aggr_type): Revise handling of enumeration types.
14232 (tsubst): Likewise.
14233 (tsubst_copy): Likewise.
14234 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
14235
14236 1998-08-04 Mark Mitchell <mark@markmitchell.com>
14237
14238 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
14239 uses template parameters.
14240 * method.c (build_template_parm_names): Use the full set of
14241 template arguments for tsubst'ing.
14242 (build_overload_identifier): Pass the full set of template
14243 arguments to build_template_parm_names, not just the
14244 innermost_args.
14245 * pt.c (TMPL_ARGS_DEPTH): Define using
14246 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
14247 (NUM_TMPL_ARGS): New macro.
14248 (add_outermost_template_args): Deal with the case where the outer
14249 args will be completely discarded.
14250 (coerce_template_parms): Use the full set of template arguments
14251 for tsubst'ing. Simplify. Add some asserts. Improve
14252 error messages.
14253 (lookup_template_class): Pass the full set of template arguments
14254 to coerce_template_parms.
14255 (tsubst): Add assertion.
14256 (do_type_instantiation): Don't instantiate member template
14257 classes.
14258
14259 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
14260 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
14261
14262 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
14263
14264 * method.c (set_mangled_name_for_decl): Change return type to void.
14265
14266 * decl.c (lookup_name_real): A namespace-level decl takes priority
14267 over implicit typename. Avoid doing the same lookup twice.
14268
14269 * search.c (dependent_base_p): New fn.
14270 (dfs_pushdecls, dfs_compress_decls): Use it.
14271
14272 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
14273 virtual functions if the type doesn't have any.
14274
14275 1998-08-03 Mark Mitchell <mark@markmitchell.com>
14276
14277 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
14278 uses template parameters.
14279
14280 1998-08-02 Mark Mitchell <mark@markmitchell.com>
14281
14282 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
14283 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
14284 * lex.c (do_identifier): Don't use a second argument, or a type,
14285 when building LOOKUP_EXPRs.
14286 (do_identifier): Likewise.
14287 (do_scoped_id): Likewise.
14288 * method.c (hack_identifier): Improve error message.
14289 * pt.c (lookup_template_function): Don't needlessly call
14290 copy_to_permanent or build_min.
14291 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
14292 necessary.
14293 (do_decl_instantiation): Improve error message.
14294 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
14295 (build_min): Copy the type to the permanent obstack, too.
14296
14297 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
14298
14299 * init.c (init_init_processing): Remove BI* handling.
14300 (build_builtin_call): Remove.
14301 (build_builtin_delete_call): New fn.
14302 (build_delete): Use it.
14303
14304 1998-07-31 Mark Mitchell <mark@markmitchell.com>
14305
14306 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
14307 (maybe_check_template_type): New function.
14308 * decl.c (maybe_process_template_type_declaration): New function,
14309 split out from pushtag Call maybe_check_template_type.
14310 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
14311 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
14312 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
14313 * pt.c (template_class_depth_real): Generalization of ...
14314 (template_class_depth): Use it.
14315 (register_specialization): Use duplicate_decls for duplicate
14316 declarations of specializations.
14317 (maybe_check_template_type): New function.
14318 (push_template_decl_real): Fix comment.
14319 (convert_nontype_argument): Likewise.
14320 (lookup_template_class): Likewise. Avoid an infinite loop on
14321 erroneous code.
14322 (tsubst_friend_function): Fix comment.
14323 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
14324 an IDENTIFIER_NODE.
14325 * semantics.c (begin_function_definition): Use
14326 reset_specialization to note that template headers don't apply
14327 directly to declarations after the opening curly for a function.
14328
14329 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
14330
14331 * decl.c (push_overloaded_decl): Use current_namespace instead of
14332 DECL_CONTEXT (decl) to determine where we go.
14333
14334 * decl.c (lookup_name_real): Fix typo.
14335
14336 1998-07-28 Mark Mitchell <mark@markmitchell.com>
14337
14338 * friend.c (is_friend): Be lenient with member functions to deal
14339 with nested friends.
14340
14341 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
14342
14343 * class.c (finish_struct_1): Convert integer_zero_node to
14344 ssizetype before passing it to set_rtti_entry.
14345 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
14346 of any size to a pointer.
14347
14348 1998-07-27 Mark Mitchell <mark@markmitchell.com>
14349
14350 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
14351 (build_template_decl_overload): Remove.
14352 (set_mangled_name_for_decl): New function.
14353 (innermost_args): Remove is_spec parameter.
14354 (most_specialized, most_specialized_class): Remove declarations.
14355 (lookup_template_class): Add entering_scope parameter.
14356 (maybe_process_partial_specialization): New function.
14357 (finish_template_decl): Likewise.
14358 (finish_template_type): Likewise.
14359 * class.c (finish_struct): Clean up processing of member template
14360 specializations.
14361 * decl.c (pushtag): Fix formatting.
14362 (lookup_tag): Improve handling of pseudo-global levels.
14363 (make_typename_type): Adjust call to lookup_template_class.
14364 (shadow_tag): Use maybe_process_partial_specialization.
14365 (xref_tag): Improve handling of member friends.
14366 (start_function): Call push_nested_class before
14367 push_template_decl. Don't call push_template_decl for
14368 specializations.
14369 * decl2.c (grok_x_components): Don't call xref_tag for
14370 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
14371 (grokclassfn): Use set_mangled_name_for_decl.
14372 (arg_assoc_class): Adjust call to innermost_args.
14373 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
14374 * error.c (dump_function_name): Improve printing of template
14375 function names.
14376 * friend.c (is_friend): Don't compare types of decls to determine
14377 friendship, unless flag_guiding_decls.
14378 (make_friend_class): Partial specializations cannot be friends.
14379 (do_friend): Use set_mangled_name_for_decl. Call
14380 push_template_decl_real instead of push_template_decl.
14381 * method.c (build_decl_overload_real): Remove prototype. Give it
14382 external linkage.
14383 (build_overload_identififer): Adjust call to innermost_args.
14384 (build_template_decl_overload): Remove.
14385 (set_mangled_name_for_decl): New function.
14386 * parse.y (.finish_template_type): New non-terminal.
14387 (template_def): Use finish_template_decl. Use template_extdef
14388 instead of extdef.
14389 (template_extdef, template_datadef): New non-terminals, containing
14390 only those rules for things which can be templates.
14391 (datadef): Tidy.
14392 (template_type, self_template_type): Use .finish_template_type.
14393 (named_class_head): Use maybe_process_partial_specialization.
14394 * pt.c (mangle_class_name_for_template): Remove context parameter.
14395 (get_class_bindings): Remove outer_args parameter.
14396 (complete_template_args): Remove.
14397 (add_outermost_template_args): New function.
14398 (register_specialization): Return the specialization.
14399 (unregister_specialization): New function.
14400 (tsubst_template_parms): Likewise.
14401 (most_specialized, most_specialized_class): Prototype here as
14402 static.
14403 (original_template): Rename to most_general_template.
14404 (tsubst_template_parms): New function.
14405 (set_mangled_name_for_template_decl): Likewise.
14406 (TMPL_ARGS_DEPTH): New macro.
14407 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
14408 (TMPL_ARGS_LEVEL): New macro.
14409 (SET_TMPL_ARGS_LEVEL): Likewise.
14410 (TMPL_ARG): Likewise.
14411 (SET_TMPL_ARG): Likewise.
14412 (TMPL_ARGS_DEPTH): Likewise.
14413 (finish_member_template_decl): Use finish_template_decl.
14414 (maybe_process_partial_specialization): New function, split out
14415 from tsubst.
14416 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
14417 (maybe_begin_member_template_processing): Use new macros.
14418 (is_member_template): Likewise.
14419 (is_member_template_class): Likewise.
14420 (add_to_template_args): Likewise. Deal with multiple levels of
14421 args.
14422 (maybe_process_partial_specialization): New function.
14423 (retrieve_specialization): Add consistency check.
14424 (determine_specialization): Return full argument list.
14425 (check_explicit_specialization): Tweak friend handling. Use full
14426 argument lists. Simplify.
14427 (current_template_args): Use new macros.
14428 (push_template_decl_real): Change ill-named mainargs to specargs.
14429 Check that a partial specialization actually specializes at least
14430 one parameter. Improve friend handling. Modify for full
14431 template arguments.
14432 (classtype_mangled_name): Don't mangle the names of
14433 specializations.
14434 (lookup_template_class): Add entering_scope parameter. Use it to
14435 avoid finding a template type when an instantiation is required.
14436 Simplify. Use full template arguments.
14437 (tsubst_friend_function): Use unregister_specialization. Use new
14438 macros. Use full template arguments.
14439 (tsubst_friend_class): Substitute, using tsubst_template_parms,
14440 into the template parameters before passing them to
14441 redeclare_class_template.
14442 (instantiate_class_template): Simplify. Use full template
14443 arguments. Adjust calls to get_class_bindings. Use
14444 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
14445 (innermost_args): Use new macros.
14446 (tsubst_aggr_type): New function, split out from tsubst.
14447 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
14448 conventions for lookup_template_class. Refine handling of partial
14449 instantiations. Remove calls to complete_template_args.
14450 Simplify. Add consistency checks. Use set_mangled_name_for_decl
14451 and set_mangled_name_for_template_decl.
14452 (tsubst_copy): Use tsubst_aggr_type.
14453 (instantiate_template): Use full template arguments.
14454 (more_specialized): Improve formatting.
14455 (more_specialized_class): Adjust calls to get_class_bindings.
14456 (get_bindings_real): Don't call complete_template_args.
14457 (most_specialized): Don't overwrite input; create a new list.
14458 (most_specialized_class): Use most_general_template.
14459 (regenerate_decl_from_template): Use unregister_specialization.
14460 Use full template arguments.
14461 (instantiate_decl): Use full template arguments.
14462 (set_mangled_name_for_template_decl): New function.
14463 * semantics.c (begin_class_definition): Use
14464 maybe_process_partial_specialization.
14465 (finish_member_class_template): New function.
14466 (finish_template_decl): Likewise.
14467 (finish_template_type): Likewise.
14468 (typeck.c): Don't crash after issuing a compiler_error.
14469 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
14470
14471 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
14472
14473 * typeck2.c (build_functional_cast): Handle default-initialization.
14474
14475 * call.c (build_over_call): Pass 1 to popclass.
14476
14477 * parse.y (direct_notype_declarator): Add precedence declaration
14478 to notype_unqualified_id case.
14479 * Makefile.in (EXPECT): Adjust.
14480
14481 * tree.c (ovl_member): Fix for single function in OVL.
14482
14483 1998-07-27 Dave Brolley <brolley@cygnus.com>
14484
14485 * c-lex.c (yylex): Fix boundary conditions in character literal and
14486 string literal loops.
14487
14488 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
14489
14490 * decl.c (lookup_name_real): OK, do return the from_obj value
14491 unless got_object depends on template parms.
14492
14493 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
14494
14495 * pt.c (coerce_template_parms): Also complain about local enums.
14496
14497 * cp-tree.h: Add prototype for set_identifier_local_value.
14498 * decl.c (set_identifier_local_value_with_scope): Make static,
14499 prototype.
14500 * search.c (covariant_return_p): Likewise.
14501 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
14502
14503 * call.c (build_method_call): Only pull out the type of a destructor
14504 if it's a template type parm.
14505 * decl.c (lookup_name_real): Never return the from_obj value.
14506
14507 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
14508
14509 * except.c (process_start_catch_block_old): Call start_decl_1 for
14510 catch parm.
14511 * decl.c (start_decl_1): Avoid duplicate error.
14512
14513 * init.c (expand_default_init): Only perform the initialization if
14514 it will do something.
14515
14516 1998-07-23 H.J. Lu (hjl@gnu.org)
14517
14518 * parse.y (base_class): Check for invalid base class.
14519
14520 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
14521
14522 * decl2.c (import_export_template): Fold in...
14523 (import_export_class): ...to here. Handle dllimport/export.
14524
14525 * class.c (build_vtable): Pass at_eof to import_export_vtable.
14526 (prepare_fresh_vtable): Likewise.
14527 * decl2.c (import_export_class): Split out...
14528 (finish_prevtable_vardecl): From here.
14529 * class.c (finish_struct_1): Call import_export_class if at_eof.
14530
14531 * decl.c (start_function): #if 0 mysterious code I wrote and have
14532 forgotten why.
14533 * rtti.c (get_tinfo_fn): If this is for a class type, set
14534 DECL_CONTEXT.
14535
14536 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
14537
14538 * inc/exception: Change terminate and unexpected to ().
14539
14540 * parse.y (named_class_head_sans_basetype_defn): A
14541 named_class_head_sans_basetype followed by '{' or ':' is a defn.
14542
14543 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
14544
14545 * tree.c (canonical_type_variant): New fn to handle arrays.
14546 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
14547 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
14548 * method.c (process_overload_item): Use build_overload_value for
14549 arrays.
14550
14551 1998-07-20 Dave Brolley <brolley@cygnus.com>
14552
14553 * lex.c (mbchar.h): #include it.
14554 (GET_ENVIRONMENT): New macro.
14555 (init_parse): Set character set based on LANG environment variable.
14556 (real_yylex): Handle multibyte characters in character literals.
14557 (real_yylex): Handle multibyte characters in string literals.
14558
14559 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
14560
14561 * lex.c (do_identifier): Look for class value even if we don't
14562 have a global value. Do implicit declaration if parsing is 2.
14563 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
14564 lookup.
14565
14566 1998-07-19 Mark Mitchell <mark@markmitchell.com>
14567
14568 * decl.c (pushtag): Revert previous change.
14569 * pt.c (lookup_template_class): Don't put out debugging
14570 information for types that use template parameters.
14571
14572 * decl.c (pushtag): Don't put out debugging information for
14573 compiler-generated typedefs.
14574
14575 * error.c (dump_type_real): Don't crash when presented with
14576 intQI_type_node or the like.
14577
14578 * semantics.c (finish_translation_unit): Fix spelling error in
14579 comment.
14580
14581 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
14582
14583 * decl.c (lookup_name_real): Pull out single function here.
14584 (select_decl): Not here.
14585 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
14586
14587 * decl.c (qualify_lookup): Tweak again.
14588
14589 * pt.c (lookup_template_class): Don't mess with the context of the
14590 instantiation.
14591 * decl2.c (current_decl_namespace): Remove special handling for
14592 templates.
14593
14594 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
14595 a member template specialization.
14596
14597 * tree.c (ovl_member): Use decls_match to compare functions.
14598 * decl.c (decls_match): Check the context of a function.
14599
14600 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
14601 in Koenig lookup support rules.
14602 * semantics.c (finish_call_expr): Handle the new cases.
14603
14604 * typeck.c (build_x_function_call): Handle overloaded methods.
14605
14606 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
14607
14608 1998-07-16 Mark Mitchell <mark@markmitchell.com>
14609
14610 * semantics.c (finish_object_call_expr): Revert previous change.
14611 * call.c (build_new_method_call): Likewise. Instead, convert
14612 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
14613
14614 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
14615
14616 * decl.c (qualify_lookup): Handle templates.
14617
14618 * decl2.c (do_using_directive): Don't pass ancestor.
14619 * decl.c (push_using_directive): Calculate ancestor.
14620
14621 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
14622 * decl.c (pushdecl): Move type shadowing handling from here...
14623 (duplicate_decls): ...to here.
14624 * decl.c (set_identifier_local_value_with_scope): New fn.
14625 (pushdecl): Use it.
14626 (set_identifier_local_value, lookup_type_current_level): New fns.
14627 * decl2.c (do_local_using_decl): Handle types and binding level
14628 stuff properly.
14629
14630 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
14631 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
14632 (lookup_namespace_name): Likewise.
14633 * typeck.c (build_unary_op): Not here anymore.
14634
14635 * decl2.c (do_class_using_decl): Make sure we get an identifier.
14636 * class.c (handle_using_decl): Ignore TYPE_DECLs.
14637
14638 * decl.c (qualify_lookup): New fn.
14639 (lookup_name_real): Use it.
14640
14641 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
14642
14643 * decl2.c (add_using_namespace): When directly using a namespace
14644 that was indirect before, promote it.
14645
14646 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
14647 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
14648 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
14649 * decl.c (select_decl): Replace two flag parameters by one.
14650 (unqualified_namespace_lookup): Likewise, pass flag.
14651 (lookup_flags): New function.
14652 (lookup_name_real): Compute flags, pass them.
14653 (lookup_namespace_name): Call with zero-flag.
14654 * decl2.c (ambiguous_decl): Add flag parameter, complain only
14655 according to flags.
14656 (lookup_using_namespace, qualified_lookup_using_namespace):
14657 Add flag parameter, pass them through.
14658 * lex.c (do_scoped_id): Call with zero-flag.
14659
14660 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
14661
14662 * typeck.c (convert_for_assignment): Use comptypes.
14663
14664 1998-07-16 Mark Mitchell <mark@markmitchell.com>
14665
14666 * semantics.c (finish_object_call_expr): Move test for the
14667 function called being a TYPE_DECL to ...
14668 * call.c (build_new_method_call): Here.
14669
14670 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
14671
14672 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
14673 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
14674
14675 * lex.c (looking_for_typename): Don't initialize.
14676
14677 * decl2.c (ambiguous_decl): Clarify error message.
14678
14679 * decl.c (push_using_directive): Iterate over namespaces used
14680 indirectly.
14681
14682 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14683
14684 * decl2.c (add_using_namespace): Iterate over namespaces used
14685 indirectly.
14686
14687 * decl.c (lookup_name_real): Accept namespace aliases as locals.
14688 (cat_namespace_levels): Ignore aliases.
14689 (duplicate_decls): Ignore duplicate aliases.
14690 * decl2.c (do_namespace_alias): Process block level namespace
14691 aliases. Store alias with pushdecl. Remove odr errors.
14692 * parse.y (namespace_alias): New non-terminal.
14693 (extdef): Use it.
14694
14695 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
14696
14697 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
14698 Handle TEMPLATE_TYPE_PARM.
14699 (arg_assoc): Rewrite.
14700
14701 * pt.c (complete_template_args): Don't look at the context unless
14702 we have to.
14703
14704 * method.c (build_decl_overload_real): Fix namespace handling.
14705
14706 * typeck.c (build_unary_op): Extract a lone function from an
14707 OVERLOAD.
14708
14709 * call.c (build_scoped_method_call): Handle getting a namespace
14710 for basetype in a destructor call.
14711 (check_dtor_name): Handle enums.
14712
14713 * parse.y (using_directive): New nonterminal.
14714 (extdef, simple_stmt): Use it.
14715
14716 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
14717
14718 * decl2.c (add_function): Move error message ...
14719 (arg_assoc_namespace): ... from here.
14720
14721 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
14722
14723 * parse.y (namespace_qualifier): Fix multiple level handling.
14724 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
14725 (arg_assoc): Don't skip the first argument of a function.
14726
14727 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
14728
14729 * search.c (my_tree_cons): Clean up.
14730
14731 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
14732
14733 * call.c (joust): Don't warn about "confusing" conversions to the
14734 same type.
14735
14736 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
14737
14738 * class.c (push_nested_class): Complain about namespaces.
14739 * decl.c (start_decl): Enter the object's namespace.
14740 (cp_finish_decl): Leave it.
14741 (grokdeclarator): Likewise.
14742 * decl2.c (check_decl_namespace): New function.
14743 (finish_file): Call it.
14744 * parse.y (complex_direct_notype_declarator): Set complexity
14745 of namespace-qualified ids to -1, enter the namespace.
14746
14747 * method.c (build_template_decl_overload): Expect _DECL as first
14748 parameter. Put context temporarily into current_namespace.
14749 * pt.c (check_explicit_specialization): Change caller.
14750 (tsubst): Likewise.
14751
14752 * init.c (build_offset_ref): Call mark_used and
14753 convert_from_reference for namespace members.
14754
14755 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
14756
14757 * search.c (my_tree_cons): The bitfield is at index 2.
14758
14759 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
14760
14761 * lang-options.h: Format changed to work with new --help support
14762 in gcc/toplev.c
14763
14764 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
14765
14766 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
14767 Do Koenig lookup in CALL_EXPR.
14768 (arg_assoc): Handle error_mark.
14769 * lex.c (is_global): New function.
14770 (do_identifier): Expect arguments for Koenig lookup.
14771 * parse.y (primary): Add rules for calls of unqualified function calls.
14772 (do_id): Change call of do_identifier.
14773 * pt.c (finish_stmt_expr): Likewise.
14774 * semantics.c (finish_id_expr): Likewise.
14775 (finish_call_expr): Add integer parameter to indicate
14776 argument-dependent lookup.
14777
14778 * decl.c (struct binding_level): New field using_directives.
14779 (push_using_decl): Not sorry anymore.
14780 (push_using_directive): New function.
14781 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
14782 (unqualified_namespace_lookup): New function, code from ...
14783 (lookup_name_real): ... here.
14784 * decl2.c (lookup_using_namespace): Pass using list instead of
14785 initial scope.
14786 (validate_nonmember_using_decl): New function.
14787 (do_nonmember_using_decl): New function.
14788 (do_toplevel_using_decl): Use them.
14789 (do_local_using_decl): New function.
14790 (do_using_directive): Support block-level directives.
14791 * parse.y (simple_stmt): Support using declarations and
14792 directives.
14793 (namespace_qualifier, namespace_using_decl): New non-terminals.
14794
14795 * xref.c (classname): New function.
14796 (GNU_xref_hier): Change class and base parameters to tree.
14797 * decl.c (xref_baseypes): Change caller.
14798 * friend.c (make_friend_class): Likewise.
14799
14800 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
14801
14802 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
14803 comparison.
14804
14805 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
14806 template template parameter, record its use.
14807 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
14808 its template arguments if exists.
14809
14810 * pt.c (coerce_template_template_parms): New function equivalent
14811 to coerce_template_parms when IS_TMPL_PARM is true.
14812 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
14813 all callers changed.
14814
14815 (coerce_template_parms): Access ARGLIST properly when creating a
14816 new vector. Only accept implicit TYPE_DECL as valid argument for
14817 a template template parameter when it is a base class of
14818 current_class_type. Don't display error message when COMPLAIN is
14819 false.
14820
14821 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
14822
14823 * repo.c (get_base_filename): Use file_name_nondirectory.
14824 (open_repo_file): Likewise.
14825 * cp-tree.h (file_name_nondirectory): Add prototype.
14826
14827 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
14828
14829 * friend.c (do_friend): Pull the identifier out of declarator.
14830 Use cp_error and friends.
14831 * decl2.c (qualified_lookup_using_namespace): Fix call to
14832 purpose_member.
14833 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
14834 (grokvardecl): Use DECL_CLASS_SCOPE_P.
14835 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
14836 * class.c (warn_hidden): Fix for OVERLOAD.
14837 From grahams@rcp.co.uk:
14838 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
14839 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
14840
14841 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
14842
14843 * g++.1 (-traditional): Remove duplicated documentation.
14844
14845 1998-07-11 Mark Mitchell <mark@markmitchell.com>
14846
14847 * method.c (flush_repeats): Add nrepeats parameter.
14848 (issue_nrepeats): Likewise.
14849 (is_back_referenceable_type): New function. Don't back-reference
14850 TEMPLATE_TYPE_PARMs as well as simple types like integers.
14851 (build_mangled_name_for_type): Likewise.
14852 (build_mangled_name_for_type_with_Gcode): Likewise.
14853 (lasttype): Remove.
14854 (nrepeats): Likewise.
14855 (Nrepeats): Likewise.
14856 (start_squangling): Don't clear the variables removed above.
14857 (end_squangling): Likewise.
14858 (flush_repeats): Tidy. Use nrepeats parameter rather than
14859 Nrepeats global.
14860 (issue_nrepeats): Likewise, but with nrepeats global. Use
14861 is_backreferenceable_type.
14862 (build_overload_nested_name): Tidy. Add comment. Use
14863 build_mangled_name_for_type.
14864 (build_underscore_int): Comment.
14865 (build_overload_scope_ref): Use build_mangled_name_for_type.
14866 (build_overload_int): Likewise.
14867 (build_template_template_parm_names): Tidy.
14868 (build_template_parm_names): Use build_mangled_name_for_type.
14869 (build_overload_identifier): Add comments.
14870 (build_mangled_name_for_type_with_Gcode): Split out from
14871 build_mangled_name.
14872 (build_mangled_name_for_type): Use it.
14873 (build_mangled_name): Rework to use build_mangled_name_for_type
14874 and to not use global nrepeats/Nrepeats. Tidy.
14875 (process_modifiers): Tidy.
14876 (check_btype): Use is_backreferenceable_type. Add comment.
14877 Rename `node' to `type'.
14878 (process_overload_item): Set numeric_output_need_bar here.
14879 Use build_mangled_name_for_type. Tidy.
14880 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
14881 build_mangled_name_for_type.
14882
14883 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
14884 for TYPE_DECLs.
14885
14886 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
14887
14888 * cp-tree.h (warn_long_long): Define.
14889 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
14890 warning "ANSI C++ does not support `long long'".
14891 * decl2.c (warn_long_long): Define.
14892 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
14893
14894 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
14895
14896 * decl.c (xref_tag): Handle attributes between 'class' and name.
14897 * parse.y (aggr): Likewise.
14898 * semantics.c (finish_class_definition): Likewise.
14899 * Makefile.in (EXPECTED): Adjust.
14900
14901 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
14902 * decl2.c: Define them.
14903 (lang_decode_option): Handle them.
14904 * lang-options.h: Add -foptional-diags.
14905 * class.c (finish_struct): Don't complain about multiple meanings of
14906 name if -fno-optional-diags.
14907 * decl.c (pushdecl_class_level): Likewise.
14908 * lex.c (real_yylex): Check warn_multichar.
14909
14910 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
14911
14912 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
14913
14914 * tree.c (make_binfo): Fix length.
14915
14916 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
14917
14918 * decl2.c (lang_decode_option): Remove warn_template_debugging.
14919 * lang-options.h: Likewise.
14920
14921 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14922
14923 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
14924 (process_start_catch_block): Likewise for variables
14925 `false_label_rtx', `call_rtx' and `return_value_rtx'.
14926
14927 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
14928
14929 * tree.c (build_srcloc): Make sure we allocate this node on the
14930 permanent obstack.
14931
14932 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
14933
14934 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
14935 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
14936 (lang_specific_driver): Only add -lm automatically if need_math is
14937 nonzero.
14938
14939 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
14940
14941 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
14942
14943 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14944
14945 * Makefile.in (EXPR_H): New dependency variable.
14946 (decl2.o): Depend on $(EXPR_H).
14947 (typeck.o): Likewise.
14948 (init.o): Likewise.
14949 (expr.o): Likewise.
14950
14951 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
14952
14953 * decl.c (start_enum): Put local enums on permanent_obstack.
14954
14955 1998-06-25 Mark Mitchell <mark@markmitchell.com>
14956
14957 * cp-tree.h (c_get_alias_set): Declare.
14958 * decl.c (init_decl_processing): Set lang_get_alias_set.
14959
14960 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
14961
14962 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
14963 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
14964 flag for all function decls which are in the exception table.
14965 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
14966 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
14967 code is emitted for any referenced rtti function.
14968
14969 1998-06-25 Dave Brolley <brolley@cygnus.com>
14970
14971 * lang-specs.h: Use new | syntax to eliminate
14972 string concatenation.
14973
14974 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
14975
14976 * cp-tree.h (CP_DECL_CONTEXT): New macro.
14977 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
14978 * method.c (build_overload_nested_name): Likewise.
14979 * sig.c (build_signature_pointer_or_reference_type): Don't set
14980 DECL_CONTEXT.
14981
14982 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14983
14984 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
14985 * cp-tree.h (FROB_CONTEXT): New macro.
14986 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
14987 * decl.c (namespace_binding): Replace NULL_TREE with
14988 global_namespace.
14989 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
14990 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
14991 Likewise.
14992 * decl.c (pushtag): Use FROB_CONTEXT.
14993 (pushdecl, make_typename_type, define_function, grokdeclarator):
14994 Likewise.
14995 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
14996 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
14997 Likewise.
14998 * decl2.c (decl_namespace): Return global_namespace if no context.
14999 * method.c (build_overload_nested_name): Expect null as context.
15000 * pt.c (mangle_class_name_for_template): Do nothing for null
15001 contexts.
15002 (lookup_template_class): Allow for null id_context.
15003
15004 1998-06-25 Richard Henderson <rth@cygnus.com>
15005
15006 * method.c (emit_thunk): Set current_function_is_thunk for the
15007 ASM_OUTPUT_MI_THUNK case as well.
15008
15009 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
15010
15011 * exception.cc (__cplus_type_matcher): Get a match_info pointer
15012 instead of an exception table entry as a parameter.
15013
15014 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
15015
15016 * parse.y (function_try_block): Don't call start_catch_handler.
15017 * except.c (call_eh_info): Remove coerced field from declaration.
15018 (build_eh_type_type_ref): New function to create an address of a
15019 rtti function for the new style exception tables.
15020 (expand_start_catch_block): Split function, this contains the
15021 common part.
15022 (process_start_catch_block_old): New function to perform the rest
15023 of expand_start_catch_block under old style exceptions.
15024 (process_start_catch_block_old): New function to perform the rest
15025 of expand_start_catch_block under new style exceptions.
15026 (expand_end_catch_block): Only pop the false label off the stack under
15027 the old style of exceptions.
15028 * semantics.c (finish_try_block): Don't call start_catch_handler.
15029 * exception.cc (struct cp_eh_info): Add original_value field.
15030 (__cplus_type_matcher): Perform type matching on the original exception
15031 value, and if we have a match, set the current value.
15032 (__cp_push_exception): Set the original exception value.
15033
15034 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
15035
15036 * call.c (joust): Fix confusing conversion warning.
15037
15038 * call.c (build_op_delete_call): Add placement parm. Check
15039 LOOKUP_SPECULATIVELY.
15040 * cp-tree.h, decl2.c, init.c: Adjust.
15041 * decl.c (finish_function): Use it.
15042
15043 * pt.c (tsubst): Diagnose creating void fields or variables.
15044
15045 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15046
15047 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
15048
15049 * cp-tree.h (check_dtor_name): Add prototype.
15050
15051 * init.c (expand_member_init): Remove unused variables
15052 `ptr_type_node', `parm' and `rval'.
15053
15054 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
15055 in call to fprintf.
15056 (lang_print_xnode): Likewise.
15057
15058 * typeck2.c (enum_name_string): Cast argument to sprintf to long
15059 and use %ld specifier.
15060
15061 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
15062 specifier in call to fprintf.
15063 (GNU_xref_member): Cast argument to sprintf to int.
15064
15065 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15066
15067 * typeck2.c (pop_init_level): Warn about implicit zero initialization
15068 of struct members.
15069
15070 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15071
15072 * cp-tree.h: Prototype function `check_java_method'.
15073
15074 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
15075
15076 * class.c (finish_struct): Make conflicting use of id a pedwarn.
15077 * decl.c (pushdecl_class_level): Likewise.
15078
15079 1998-06-17 Mark Mitchell <mark@markmitchell.com>
15080
15081 * pt.c (convert_nontype_argument): Issue an error when presented
15082 with an integer (real) constant that cannot be simplified to an
15083 INT_CST (REAL_CST).
15084
15085 * cp-tree.h (c_get_alias_set): Remove declaration added in
15086 1998-06-13 change that should never have been checked in.
15087
15088 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
15089
15090 * typeck.c (build_binary_op_nodefault): Change % in format strings
15091 to %%.
15092
15093 * decl.c (grokvardecl): Don't build_static_name for decls that
15094 aren't at namespace scope.
15095
15096 * init.c (perform_member_init): Catch default-initialization of
15097 references.
15098
15099 1998-06-17 Mark Mitchell <mark@markmitchell.com>
15100
15101 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
15102
15103 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
15104
15105 * method.c (hack_identifier): Complain about getting a namespace
15106 or class template.
15107 * typeck.c (decay_conversion): Remove check for namespaces.
15108 * typeck2.c (incomplete_type_error): Likewise.
15109 * parse.y (template_arg): Add PTYPENAME expansion.
15110
15111 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
15112
15113 * decl.c (grokvardecl): Don't build external assembler names for
15114 TYPENAMEs in other namespaces as there is no declarator.
15115 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
15116 info from DECL_CONTEXT if it is NULL.
15117
15118 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
15119
15120 * call.c (check_dtor_name): Split out.
15121 (build_scoped_method_call): Use it.
15122 (build_method_call): Use it.
15123 * init.c (build_offset_ref): Use it.
15124
15125 * typeck.c (build_static_cast): Fix handling of pointers to members.
15126
15127 * decl.c (finish_function): Just return nothing from a constructor.
15128 * typeck.c (c_expand_return): Complain about returning a void
15129 expression from a destructor.
15130
15131 1998-06-13 Mark Mitchell <mark@markmitchell.com>
15132
15133 * class.c (alter_access): Accept a BINFO explaining how to get
15134 from the entity whose accessed is being altered to the type doing
15135 the altering.
15136 (handle_using_decl): New function containing code split out from ...
15137 (finish_struct_1): Here.
15138
15139 * cp-tree.h (complete_type_or_else): Declare.
15140 * init.c (build_new_1, build_delete): Use it.
15141 * typeck.c (require_complete_type): Use complete_type, rather than
15142 expanding it inline.
15143 (complete_type_or_else): New function.
15144 (build_component_ref): Use it.
15145 (pointer_int_sum): Make sure the type pointed to is complete.
15146 (pointer_diff): Likewise.
15147
15148 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
15149 types.
15150
15151 * search.c (get_matching_virtual): Note that member templates
15152 cannot override virtual functions.
15153
15154 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
15155
15156 * pt.c (check_explicit_specialization): If DECLARATOR turned into
15157 an error_mark_node from lookup_template_function, return the same.
15158 (determine_specialization): Also make sure TEMPLATE_ID isn't an
15159 error_mark_node, before we try to read its operands.
15160 * decl.c (grokdeclarator): If we got an error_mark_node from
15161 check_explicit_specialization, just return it right back.
15162
15163 1998-06-12 Mark Mitchell <mark@markmitchell.com>
15164
15165 * class.c (instantiate_type): Don't treat template-ids that don't
15166 specify any template arguments as equivalent to ordinary
15167 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
15168 pointer-to-members for member templates. Tidy slightly.
15169 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
15170 * init.c (build_offset_ref): Handle template-ids like ordinary
15171 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
15172 offset part of the OFFSET_REF.
15173 * typeck.c (build_unary_op): Change check for unknown types to
15174 look for OFFSET_REFs, not SCOPE_REFs.
15175
15176 1998-06-11 Mark Mitchell <mark@markmitchell.com>
15177
15178 * pt.c (is_member_template_class): New function.
15179 (push_template_decl_real): Use it.
15180
15181 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
15182
15183 * friend.c (do_friend): Add support for nested classes using
15184 member functions of the enclosing class as friends.
15185
15186 1998-06-10 Mark Mitchell <mark@markmitchell.com>
15187
15188 * call.c (convert_default_arg): Make global, not static.
15189 (convert_arg_for_ellipsis): Split out from ...
15190 (build_over_call): Here.
15191 * cp-tree.h (convert_default_arg); Declare.
15192 (convert_arg_to_ellipsis): Likewise.
15193 (do_member_init): Remove.
15194 * init.c (do_member_init): Remove; this code is dead.
15195 (expand_member_init): Remove much of this code; it is dead.
15196 * typeck.c (convert_arguments): Use convert_default_arg and
15197 convert_arg_for_ellipsis, rather than duplicating here.
15198
15199 * call.c (convert_like): Don't fail silently if
15200 build_user_type_conversion fails. Always return error_mark_node
15201 for failure.
15202
15203 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
15204
15205 * search.c (covariant_return_p): Complain about ambiguous base.
15206
15207 * typeck.c (build_component_ref): Diagnose ref to nested type.
15208
15209 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
15210
15211 * decl.c (grokparms): Check that INIT isn't an error_mark_node
15212 before giving error about invalid type for default arg.
15213
15214 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
15215
15216 * call.c (build_method_call): Fix thinko.
15217
15218 1998-06-10 Dave Brolley <brolley@cygnus.com>
15219
15220 * decl2.c (lang_decode_option): New argc/argv interface.
15221 * cp-tree.h (lang_decode_option): New argc/argv interface.
15222 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
15223 specified for cpplib-enabled compilers.
15224 * lex.c (lang_init): Don't check_newline for cpplib.
15225 (init_parse): Don't initialize cpplib here.
15226
15227 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
15228
15229 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
15230 piece before checking DECL_MUTABLE_P.
15231
15232 1998-06-10 John Carr <jfc@mit.edu>
15233
15234 * tree.c (debug_binfo): Make printf format match arguments.
15235
15236 * error.c (OB_PUTI): Make printf format match arguments.
15237
15238 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
15239
15240 * init.c (perform_member_init): Handle default-initialization.
15241
15242 * except.c (build_throw): Handle throwing NULL.
15243
15244 * typeck.c (build_x_function_call): Use resolve_offset_ref.
15245
15246 * search.c (compute_access): Only strip an anonymous union
15247 for a FIELD_DECL.
15248
15249 * call.c (add_builtin_candidates): Tweak.
15250
15251 * cvt.c (build_expr_type_conversion): Restore code for conversion
15252 from class types.
15253 * decl2.c (delete_sanity): Use it. Clean up.
15254
15255 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
15256
15257 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
15258
15259 * typeck.c (c_expand_return): Don't warn about void expressions on
15260 return statements in functions returning void.
15261
15262 1998-06-09 Mark Mitchell <mark@markmitchell.com>
15263
15264 * pt.c (fn_type_unification): Revise documentation. Tidy.
15265 (type_unification): Likewise.
15266
15267 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
15268
15269 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
15270 expand_end_catch.
15271 * parse.y (function_try_block): Rename expand_start_catch, and delete
15272 expand_end_catch.
15273 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
15274 expand_end_catch.
15275
15276 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
15277
15278 * search.c (lookup_member): New fn.
15279 * class.c (finish_struct_1): Use it.
15280 * decl.c (lookup_name_real): Use it.
15281
15282 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15283
15284 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
15285
15286 * cp-tree.h: Add prototype for `maybe_print_template_context' and
15287 `maybe_make_one_only'.
15288
15289 * decl.c (auto_function): Remove unused variable `decl'.
15290
15291 * decl2.c: Include dwarf2out.h and dwarfout.h.
15292
15293 * lex.c: Remove redundant declarations of `set_float_handler' and
15294 `asm_out_file'.
15295
15296 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
15297
15298 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
15299 time flag. Call __cp_eh_info instead of __cp_exception_info.
15300 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
15301 (__cp_exception_info): Return offset into cp_eh_info structure to
15302 match what use to be the start of this structure.
15303 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
15304 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
15305 compile time flag.
15306 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
15307 __cp_eh_info instead of __cp_exception_info.
15308
15309 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
15310
15311 * decl.c (cp_finish_decl): Disable inlining of extern inlines
15312 with static variables.
15313
15314 1998-06-08 Mark Mitchell <mark@markmitchell.com>
15315
15316 * init.c (build_offset_ref): Correct previous change to use build,
15317 not build_min.
15318
15319 1998-06-07 Mark Mitchell <mark@markmitchell.com>
15320
15321 * class.c (instantiate_type): Handle pointer-to-members where the
15322 member is a template.
15323 * init.c (build_offset_ref): Likewise.
15324 * typeck.c (build_unary_op): Likewise.
15325
15326 1998-06-07 Richard Henderson <rth@cygnus.com>
15327
15328 * lex.c (lang_init_options): New function.
15329 (lang_init): Remove flag_exceptions == 2 hack.
15330
15331 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
15332
15333 * search.c (envelope_add_decl): Tweak for implicit typename.
15334
15335 * call.c (joust): Also warn about confusing conversion op/constructor
15336 overload resolution.
15337
15338 * spew.c (yylex): Also return the TYPE_DECL if got_object.
15339 Don't clear got_object after '~'.
15340 * call.c (build_scoped_method_call): Tweak destructor handling.
15341 (build_method_call): Likewise.
15342 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
15343 TYPE_MAIN_VARIANT for destructors.
15344 * semantics.c (finish_object_call_expr): Complain about calling a
15345 TYPE_DECL.
15346
15347 1998-06-05 Per Bothner <bothner@cygnus.com>
15348
15349 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
15350 Define - update needed by gcc.c change.
15351
15352 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
15353
15354 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
15355
15356 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
15357
15358 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
15359 * decl.c (lookup_name_real): Add namespaces_only parameter.
15360 If set, return only NAMESPACE_DECLs.
15361 (select_decl): Likewise.
15362 (identifier_type_value): Give additional parameter.
15363 (lookup_name_nonclass): Likewise.
15364 (lookup_name): Likewise.
15365 (find_binding): Skip namespace aliases.
15366 (binding_for_name): Likewise.
15367 (push_namespace): Check for namespace aliases.
15368 (lookup_name_namespace_only): New function.
15369 (begin_only_namespace_names, end_only_namespace_names): New functions.
15370 * decl2.c (set_decl_namespace): Skip namespace aliases.
15371 (do_using_directive): Likewise.
15372 (do_namespace_alias): Produce namespace aliases, fix alias
15373 redeclaration.
15374 * error.c (dump_decl): Support SCOPE_REF.
15375 * parse.y (extdef): Wrap lookup with namespace_only for namespace
15376 aliases and using declarations.
15377
15378 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
15379
15380 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
15381
15382 * error.c (dump_expr): Clean up NEW_EXPR case.
15383
15384 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
15385
15386 Suggested by Brendan Kehoe
15387 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
15388 treat it as using ::decl.
15389
15390 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
15391
15392 * tree.c (mapcar): Support NEW_EXPR.
15393
15394 * error.c (dump_expr): Support NEW_EXPR.
15395
15396 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
15397
15398 * method.c (make_thunk): Use overload machinery to make name.
15399 * search.c (covariant_return_p): New fn.
15400 (get_matching_virtual): Use it.
15401
15402 * init.c (build_new_1): Fix check for void.
15403
15404 1998-06-01 Per Bothner <bothner@cygnus.com>
15405
15406 * cp-tree.h (TYPE_FOR_JAVA): New macro.
15407 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
15408 java_int_type_node, java_long_type_node, java_float_type_node,
15409 java_double_type_node, java_char_type_node, java_boolean_type_node):
15410 New "primitive" types, with predefined names __java_byte etc.
15411 (record_builtin_java_type): New function.
15412 (init_decl_processing): Make Java types with record_builtin_java_type.
15413 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
15414 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
15415 (grokfndecl): Call check_java_method for Java classes.
15416 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
15417 (process_overload_item): Match types against specific
15418 java_XX_type_node types, rather than using is_java_type.
15419 * class.c (finish_struct_1): Don't add default copy constructor
15420 or operator= if TYPE_FOR_JAVA.
15421 (pop_lang_conext): Restore strict_prototyp proper if Java.
15422 * decl2.c (acceptable_java_type, check_java_method): New functions.
15423 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
15424 (tsubst): Move common statement after if statement.
15425 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
15426
15427 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
15428
15429 * pt.c (for_each_template_parm): Use first_rtl_op.
15430
15431 * tree.c (build_cplus_array_type_1): Also check index_type for
15432 template parms.
15433
15434 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
15435
15436 * pt.c (tsubst): Always copy BINFO_BASETYPES.
15437
15438 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
15439
15440 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
15441 TYPE_SIZE_UNIT too.
15442
15443 1998-05-29 Mark Mitchell <mark@markmitchell.com>
15444
15445 * decl.c (grokdeclarator): Don't complain about in-class
15446 initialization of static consts if we don't really know the type
15447 of the variable.
15448
15449 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
15450
15451 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
15452 * method.c (build_destructor_name): New fn.
15453 * decl2.c (maybe_retrofit_in_chrg): Split out...
15454 (grokclassfn): From here. Reorganize.
15455 * decl.c (grok_ctor_properties): Make sure ctors for types with
15456 vbases have the in_chrg parm.
15457 * pt.c (instantiate_class_template): Update
15458 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
15459 grok_*_properties.
15460 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
15461
15462 1998-05-28 Mark Mitchell <mark@markmitchell.com>
15463
15464 * pt.c (instantiate_decl): Make test for whether or not static
15465 variables should be instantiated early match its comment.
15466
15467 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
15468
15469 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
15470 a member.
15471 (start_function): Call check_default_args.
15472 * decl2.c (grokfield): Don't call check_default_args.
15473 (check_default_args): Use cp_error_at.
15474 * lex.c (do_pending_defargs): Call check_default_args.
15475
15476 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
15477
15478 * call.c (build_method_call): Make sure get_type_value returns
15479 something before we try to use its TYPE_MAIN_VARIANT.
15480 (build_scoped_method_call): Likewise.
15481
15482 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
15483
15484 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
15485 initialize an array.
15486
15487 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
15488 DECL_VIRTUAL_P.
15489
15490 * friend.c (do_friend): Clarify template warning.
15491
15492 1998-05-27 Mark Mitchell <mark@markmitchell.com>
15493
15494 * decl.c (shadow_label): Don't treat decls as identifiers.
15495 (maybe_push_to_top_level): Clear shadowed_labels.
15496
15497 * pt.c (instantiate_decl): Reset lineno and filename after calling
15498 regenerate_decl_from_template.
15499
15500 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
15501 error_mark_node.
15502
15503 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
15504
15505 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
15506
15507 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15508
15509 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
15510 (convert_nontype_argument): Handle cases when nontype template
15511 parameters become classes after substitution.
15512
15513 1998-05-26 Mark Mitchell <mark@markmitchell.com>
15514
15515 * friend.c (is_friend): Use comptypes, rather than == to compare
15516 types. Modify for new representation of template friends.
15517 (make_friend_class): Likewise.
15518 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
15519 (instantiate_class_template): Deal with template friends.
15520
15521 * decl.c (store_parm_decls): Remove redundant call to
15522 expand_main_function.
15523
15524 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
15525
15526 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
15527 DECL_USE_TEMPLATE.
15528
15529 1998-05-26 Per Bothner <bothner@cygnus.com>
15530
15531 * language_as_string: Handle lang_java.
15532
15533 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
15534
15535 * decl.c (pushdecl): Don't copy the type_decl.
15536
15537 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15538
15539 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
15540 current_class_type.
15541 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
15542
15543 * parse.y (complex_direct_notype_declarator): Use $1 to access
15544 scope of notype_qualified_id.
15545
15546 1998-05-26 Dave Brolley <brolley@cygnus.com>
15547
15548 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
15549 (init_parse): Initialize cpplib interface.
15550
15551 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
15552 empty continuation.
15553
15554 1998-05-26 Mark Mitchell <mark@markmitchell.com>
15555
15556 * decl.c (pushtag): Avoid crashing on erroneous input.
15557
15558 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15559
15560 * decl.c (push_namespace): Only produce one unique name for
15561 anonymous namespaces.
15562 (get_unique_name): Remove.
15563
15564 1998-05-25 Mark Mitchell <mark@markmitchell.com>
15565
15566 * call.c (tourney): Don't do any extra comparisons.
15567
15568 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
15569
15570 * cp-tree.h (processing_template_parmlist): Declare.
15571 * decl.c (pushtag): Don't call push_template_decl when we
15572 shouldn't.
15573 * pt.c (processing_template_parmlist): New variable.
15574 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
15575 (complete_template_args): Use it.
15576 (add_to_template_args): Likewise.
15577 (innermost_args): Likewise.
15578 (tsubst): Likewise.
15579 (begin_template_parm_list): Use processing_template_parmlist.
15580 (end_template_parm_list): Likewise.
15581
15582 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
15583 * decl.c (grokdeclarator): Use it.
15584 * decl2.c (grok_x_components): Likewise.
15585 * init.c (initializing_context): Likewise.
15586 * method.c (do_build_copy_constructor): Likewise.
15587 (do_build_assign_ref): Likewise.
15588 * search.c (compute_access): Likewise.
15589 * typeck.c (build_component_ref): Likewise.
15590
15591 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
15592 unnamed type a typedef name "for linkage purposes".
15593
15594 * pt.c (lookup_template_class): Don't look at
15595 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
15596
15597 * method.c (build_overload_int): Handle error cases gracefully.
15598
15599 * pt.c (instantiate_decl): Handle static member variables
15600 correctly.
15601
15602 * pt.c (tsubst): Use the tsubst'd type when producing new
15603 TEMPLATE_PARM_INDEX nodes.
15604
15605 1998-05-24 Mark Mitchell <mark@markmitchell.com>
15606
15607 * tree.c (cp_tree_equal): Handle pointers to member functions.
15608
15609 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
15610 sure the type of the REF_BIND is a reference type.
15611 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
15612 target_type for clarity.
15613
15614 * parse.y (xcond): Move call to condition_conversion ...
15615 * semantics.c (finish_for_cond): Here.
15616 * parse.c: Regenerated.
15617
15618 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
15619
15620 * decl.c (push_namespace): Namespaces have type void.
15621 * typeck2.c (incomplete_type_error): Complain about namespace
15622 used as expression.
15623 * typeck.c (decay_conversion): Likewise.
15624
15625 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
15626
15627 * error.c (dump_expr): Support namespaces.
15628
15629 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
15630
15631 * cp-tree.def: Add SRCLOC.
15632 * cp-tree.h: Add struct tree_srcloc and accessor macros.
15633 * tree.c (build_srcloc, build_srcloc_here): New fns.
15634 * pt.c (add_pending_template): Use build_srcloc_here.
15635 (push_tinst_level): Update last_template_error_tick before erroring.
15636 (instantiate_decl): Restore lineno and input_filename before
15637 calling add_pending_template.
15638 * decl2.c (finish_file): Set up lineno and input_filename for
15639 pending templates.
15640
15641 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
15642
15643 * decl.c (lang_print_error_function): New fn.
15644 (init_decl_processing): Set print_error_function to use it.
15645 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
15646
15647 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
15648 ICS_BAD_FLAG.
15649
15650 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
15651 copy-initialization.
15652
15653 * class.c (build_vtable_entry): Use int_fits_type_p.
15654 (build_vtable): Pass a signed offset to build_vtable_entry.
15655 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
15656 set_rtti_entry): Likewise.
15657
15658 1998-05-22 Per Bothner <bothner@cygnus.com>
15659
15660 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
15661 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
15662
15663 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
15664
15665 * pt.c (print_template_context): Use fprintf instead of cp_error.
15666
15667 * pt.c (determine_specialization): Just return an error_mark_node.
15668 Also print the decl we want in error messages. If we complain,
15669 return error_mark_node.
15670 (tsubst_friend_function): Set lineno and input_filename so
15671 error messages will be useful.
15672 (instantiate_template): Just return an error_mark_node.
15673 (check_explicit_specialization): Don't mess with a returned
15674 error_mark_node.
15675
15676 * pt.c (print_template_context): Add new argument.
15677 (maybe_print_template_context): New fn.
15678 (push_tinst_level): Increment tinst_level_tick.
15679 (pop_tinst_level): Likewise.
15680 * errfn.c (cp_thing): Call maybe_print_template_context. Use
15681 xrealloc instead of xmalloc.
15682
15683 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
15684
15685 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
15686
15687 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
15688 if the template we looked up is the same as the one we already
15689 have.
15690
15691 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
15692
15693 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
15694 (cpp_reader,parse_in): Add for cpplib.
15695 (check_newline): Call handle_sysv_pragma with new interface.
15696 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
15697
15698 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
15699 (sub_getch): Call GETC for cpplib.
15700
15701 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
15702 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
15703
15704 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
15705
15706 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
15707
15708 * decl2.c (maybe_make_one_only): New fn.
15709 (import_export_vtable): Use it.
15710 (import_export_decl): Likewise.
15711 * pt.c (mark_decl_instantiated): Likewise.
15712
15713 1998-05-21 Mark Mitchell <mmitchell@usa.net>
15714
15715 * decl2.c (find_representative_member): Rename to ...
15716 (build_anon_union_vars): New function.
15717 (finish_anon_union): Fix stupidity of previous change.
15718
15719 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
15720
15721 * decl.c (grokfndecl): Handle definition of specialization in
15722 friend declaration.
15723
15724 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
15725
15726 1998-05-20 Mark Mitchell <mmitchell@usa.net>
15727
15728 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
15729 to look for type declarations.
15730 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
15731 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
15732 (finish_member_class_template): Declare.
15733 * decl.c (pushtag): Put member class templates on the
15734 CLASSTYPE_TAGS list, just as for ordinary member classes.
15735 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
15736 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
15737 IDENTIFIER_NAMESPACE_VALUEs.
15738 * parse.y (component_decl): Move code to ...
15739 * semantics.c (finish_member_class_template): New function.
15740 Don't put member class templates on the list of components for a
15741 class.
15742 * parse.c: Regenerated.
15743 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
15744 In fact, don't use DECL_CONTEXT at all here.
15745
15746 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
15747
15748 * decl.c (record_unknown_type): New function.
15749 (init_decl_processing): Call it for the unknown and global type
15750 nodes.
15751
15752 1998-05-20 Mark Mitchell <mmitchell@usa.net>
15753
15754 * decl2.c (find_representative_member): New function.
15755 (finish_anon_union): Use it.
15756
15757 * cp-tree.h (MAIN_NAME_P): New macro.
15758 (DECL_MAIN_P): Likwise.
15759 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
15760 (grokfndecl): Use the new macros.
15761 (grokdeclarator): Likewise.
15762 (start_function): Likewise.
15763 (store_parm_decls): Likewise.
15764 (finsh_function): Likewise.
15765 * friend.c (do_friend): Likewise.
15766 * typeck.c (build_function_call_real): Likewise.
15767 (build_unary_op): Likewise.
15768
15769 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
15770
15771 * decl2.c (start_objects, finish_objects, do_dtors,
15772 do_ctors): Split out from...
15773 (finish_file): ...here.
15774
15775 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
15776
15777 * tree.c (is_overloaded_fn): Don't abort on placeholders from
15778 push_class_decls.
15779
15780 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
15781
15782 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
15783
15784 * error.c (dump_expr): Handle an ARROW_EXPR.
15785
15786 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
15787
15788 * decl.c (saveable_obstack): Declare.
15789 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
15790 declare, if necessary.
15791
15792 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
15793
15794 * call.c (compare_qual): Remove.
15795 (is_subseq): Tweak.
15796 (is_properly_derived_from): New function.
15797 (maybe_handle_ref_bind): Likewise.
15798 (maybe_handle_implicit_object): Likewise.
15799 (compare_ics): Modify substantially to bring into conformance with
15800 the standard.
15801 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
15802 (comp_cv_qualification): Declare.
15803 (comp_cv_qual_signature): Likewise.
15804 * typeck.c (comp_cv_qualification): Likewise.
15805 (comp_cv_qual_signature): Likewise.
15806
15807 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15808
15809 * Makefile.in (parse.o): Depend on toplev.h.
15810
15811 * class.c (typecode_p): Remove prototype and definition.
15812
15813 * cp-tree.h (currently_open_class, is_empty_class, member_p):
15814 Add prototype.
15815
15816 * decl.c (push_overloaded_decl_top_level): Remove prototype and
15817 definition.
15818
15819 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
15820 in call to `cp_thing'.
15821 (cp_warning): Likewise for function pointer `warning'.
15822
15823 * except.c (do_function_call): Remove prototype and definition.
15824 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
15825
15826 * method.c (is_java_type): Add prototype and make it static.
15827
15828 * parse.y: Include toplev.h.
15829
15830 * pt.c (type_unification): Remove unused variable `arg'.
15831 (instantiate_decl): Likewise for `save_ti'.
15832
15833 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
15834
15835 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
15836
15837 * init.c (build_member_call): Handle template_ids.
15838 * parse.y (primary): Add global_scope template_id.
15839
15840 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
15841
15842 * decl2.c (get_sentry): Use end_temporary_allocation.
15843 Don't declare permanent_obstack.
15844
15845 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
15846
15847 * parse.y (.finish_new_placement): New non-terminal.
15848 (unary_expr, new_type_id): Use it.
15849 * parse.c: Regenerated.
15850
15851 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
15852
15853 * pt.c (redeclare_class_template): Say where the original definition
15854 of the template-parameter's default argument appeared.
15855
15856 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
15857
15858 * call.c (build_over_call): Tweak empty class handling.
15859
15860 * decl.c (make_typename_type): Use currently_open_class.
15861
15862 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
15863
15864 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
15865
15866 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
15867 for a type unless it is one.
15868
15869 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
15870
15871 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
15872
15873 * Makefile.in (program_transform_name, objdir): Define.
15874
15875 * Makefile.in (BISON): Use bison from the build tree if it exists.
15876 (FLEX): Likewise.
15877
15878 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
15879
15880 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
15881
15882 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
15883
15884 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
15885
15886 * call.c (build_scoped_method_call): Likewise.
15887
15888 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
15889
15890 * init.c (build_new_1): Call suspend_momentary around the creation
15891 of values that must be saved for exception handling.
15892 * parse.y (.build_new_placement): New non-terminal.
15893 (unary_expr, new_placement): Use it.
15894 * parse.c: Regenerated.
15895
15896 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
15897
15898 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
15899 old and new types.
15900
15901 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
15902 canonical type.
15903
15904 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
15905
15906 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
15907
15908 * decl.c (start_decl): Revert problem change.
15909
15910 * Makefile.in (CONFLICTS): Fix.
15911
15912 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15913
15914 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
15915
15916 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
15917
15918 * class.c (finish_struct_1): Use BINFO_SIZE.
15919
15920 * decl.c (start_decl): Use 'tem'.
15921
15922 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
15923
15924 * exception.cc: Include eh-common.h.
15925 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
15926 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
15927 (__cp_push_exception): Initialize eh_info struct as well.
15928 * except.c: Remove local structs and include eh-common.h.
15929 (init_exception_processing): Set language and version codes.
15930 (call_eh_info): Add presence of eh_info to runtime description of
15931 struct cp_eh_info.
15932 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
15933 * semantics.c (finish_try_block): Call start_catch_block() and
15934 end_catch_block().
15935 * parse.y (function_try_block): Call start_catch_block() and
15936 end_catch_block().
15937
15938 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
15939
15940 * typeck.c (original_type): New function.
15941 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
15942 to see if they're actually the same.
15943 * cp-tree.h (original_type): Declare.
15944
15945 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15946
15947 * Makefile.in (lex.o): Depend on output.h.
15948
15949 * call.c (add_function_candidate): Remove unused variable `cand'.
15950 (add_conv_candidate): Likewise.
15951 (build_builtin_candidate): Likewise.
15952
15953 * cp-tree.h: Add prototype for `types_overlap_p'.
15954
15955 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
15956
15957 * decl2.c (merge_functions): Remove unused variables `tmp' and
15958 `tempn'.
15959
15960 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
15961 (code_as_string): Likewise.
15962 (language_as_string): Likewise.
15963 (parm_as_string): Likewise.
15964 (op_as_string): Likewise.
15965 (assop_as_string): Likewise.
15966 (cv_as_string): Likewise.
15967
15968 * lex.c: Include output.h.
15969
15970 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
15971
15972 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
15973 ATTRIBUTE_UNUSED.
15974
15975 * tinfo.cc (__class_type_info::dcast): Change the type of variable
15976 `i' from int to size_t.
15977
15978 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
15979 ATTRIBUTE_UNUSED.
15980
15981 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
15982
15983 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
15984 DECL_NAMESPACE_SCOPE_P.
15985 (lang_decl_name): Likewise.
15986 * pt.c (tsubst_friend_function, tsubst): Likewise.
15987 * decl.c (pushdecl, redeclaration_error_message, start_decl,
15988 cp_finish_decl, start_function): Likewise.
15989 * class.c (finish_struct_1): Likewise.
15990 * call.c (build_over_call): Likewise.
15991 (compare_ics): Use DERIVED_FROM_P.
15992
15993 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
15994
15995 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
15996 * method.c (build_mangled_name): Use it.
15997 (build_decl_overload_real): Likewise.
15998
15999 * error.c (dump_simple_decl): New function, broken out from ...
16000 (dump_decl): Use it.
16001
16002 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
16003
16004 * ptree.c (lang_print_xnode): Add missing `break'.
16005
16006 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
16007
16008 * call.c (add_template_candidate): Adjust for changes to
16009 fn_type_unification.
16010 (add_template_candidate_real): Likewise.
16011 (add_template_conv_candidate): Likewise.
16012 (build_user_type_conversion_1): Likewise.
16013 (build_new_function_call): Likewise.
16014 (build_object_call): Likewise.
16015 (build_new_op): Likewise.
16016 (build_new_method_call): Likewise.
16017 * class.c (instantiate_type): Likewise.
16018 * cp-tree.h (unification_kind_t): New type.
16019 (fn_type_unification): Adjust prototype.
16020 (type_unificaiton): Likewise.
16021 * pt.c (UNIFY_ALLOW_NONE): New macro.
16022 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
16023 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
16024 (UNIFY_ALLOW_DERIVED): Likewise.
16025 (unify): Change prototype.
16026 (maybe_adjust_types_for_deduction): New function.
16027 (check_cv_quals_for_unify): Likewise.
16028 (determine_specialization): Adjust.
16029 (fn_type_unification): Likewise.
16030 (type_unification): Likewise.
16031 (type_unification_real): Likewise. Use
16032 maybe_adjust_types_for_deduction. Fix mishandling of
16033 back-unification of template functions passed as arguments. Pass
16034 appropriate combination of UNIFY_ALLOW_* to unify.
16035 (unify): Remove unused NTPARMS parameter. Use
16036 check_cv_quals_for_unify. Remove bogus code that allowed
16037 too-generous unification in order to adhere more closely to standard.
16038 (get_bindings_real): Adjust.
16039 (get_class_bindings): Likewise.
16040
16041 * method.c (build_overload_identifier): Only use the innermost
16042 template arguments when mangling.
16043 * pt.c (tsubst_template_argument_vector): New function.
16044 (complete_template_args): Deal with the situation where the
16045 extra_args contain more than one level of arguments.
16046 (lookup_template_class): Deal with member template classes, which
16047 may have more than one level of arguments.
16048 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
16049 Improve handling of member template classes. Use
16050 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
16051 tsubst_template_argument_vector where appropriate.
16052 (regenerate_decl_from_template): Break out from ...
16053 (instantiate_decl): Here.
16054
16055 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
16056 * parse.h: Regenerated.
16057 * parse.c: Really regenerated.
16058
16059 * cp-tree.h (finish_unary_op_expr): New function.
16060 (finish_id_expr): Likewise.
16061 (begin_new_placement): Likewise.
16062 (finish_new_placement): Likewise.
16063 (finish_declarator): Likewise.
16064 (finish_translation_unit): Likewise.
16065 (finish_parmlist): Likewise.
16066 (begin_class_definition): Likewise.
16067 (finish_class_definition): Likewise.
16068 (finish_default_args): Likewise.
16069 (finish_inline_definitions): Likewise.
16070 * parse.y (GCC_ASM_KEYWORD): Remove.
16071 (TYPENAME_ELLIPSIS): Likewise.
16072 * parse.c: Regenerated.
16073 Use new functions in semantics.c in the actions for many rules.
16074 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
16075 * hash.h: Regenerated.
16076 * semantics.c (finish_expr_stmt): Allow NULL expr.
16077 (finish_unary_op_expr): New function, containing
16078 code previously in parse.y.
16079 (finish_id_expr): Likewise.
16080 (begin_new_placement): Likewise.
16081 (finish_new_placement): Likewise.
16082 (finish_declarator): Likewise.
16083 (finish_translation_unit): Likewise.
16084 (finish_parmlist): Likewise.
16085 (begin_class_definition): Likewise.
16086 (finish_class_definition): Likewise.
16087 (finish_default_args): Likewise.
16088 (finish_inline_definitions): Likewise.
16089
16090 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
16091
16092 * typeck.c (build_c_cast): Don't decay arrays and functions to
16093 pointer type when converting to a class type.
16094
16095 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
16096
16097 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
16098 (DECL_CLASS_SCOPE_P): Likewise.
16099
16100 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
16101
16102 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
16103 * decl2.c (constructor_name_full): Likewise.
16104
16105 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
16106
16107 * tree.c (mapcar): Add OVERLOAD support.
16108
16109 * init.c (resolve_offset_ref): We must use basetype_path before we
16110 destroy it with a call to convert_pointer_to.
16111
16112 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
16113
16114 * class.c (currently_open_class): New fn.
16115 * decl.c (lookup_name_real): Use it.
16116 * search.c (lookup_field): Likewise.
16117
16118 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
16119
16120 * cp-tree.def (OVERLOAD): New node.
16121 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
16122 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
16123 (NAMESPACE_BINDING): Remove.
16124 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
16125 namespace_binding.
16126 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
16127 Define.
16128 (tree_overload): New struct.
16129 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
16130 (REAL_IDENTIFIER_TYPE_VALUE): Define.
16131 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
16132 (lang_decl_flags): Remove in_namespace.
16133 (lang_decl): Remove chain.
16134 (DECL_CHAIN, DECL_NAMESPACE): Remove.
16135 (flag_honor_std): Declare extern.
16136 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
16137 namespace_binding, set_namespace_binding,
16138 lookup_function_nonclass, cat_namespace_levels,
16139 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
16140 scratch_ovl_cons, ovl_member, build_overload): Declare.
16141 (decl_list_length, get_namespace_id, current_namespace_id,
16142 overloaded_globals_p): Remove.
16143 (lookup_using_namespace, qualified_lookup_using_namespace): Change
16144 return type.
16145 (push_scratch_obstack): New macro.
16146 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
16147 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
16148 convs, fns.
16149 (build_new_function_call): Iterate using OVL_CHAIN.
16150 Print DECL_NAME in when reporting ambiguities.
16151 (build_object_call): Iterate using OVL_NEXT for fns, convs.
16152 (build_new_op): Call lookup_function_nonclass.
16153 Iterate using OVL_NEXT.
16154 (build_op_delete_call): Change detection of members.
16155 Do not wrap TREE_LIST around fields and single global functions.
16156 (build_over_call): Don't push a class level if the context is a
16157 namespace.
16158 (build_new_method_call): Iterate using OVL_NEXT.
16159 * class.c (add_method): Chain overloaded members using
16160 build_overload. Remove copying of method.
16161 (grow_method): When iterating through the obstack, expect OVERLOAD
16162 nodes. Chain overload members.
16163 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
16164 nodes in call to get_baselinks.
16165 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
16166 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
16167 fdecls that are OVERLOAD nodes.
16168 (validate_lhs): New function.
16169 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
16170 code. Use DECL_NAME in error messages. Split code between global
16171 and member function processing.
16172 * decl.c (global_type_node): New static variable.
16173 (in_std): New global.
16174 (struct binding_level): New field usings.
16175 (resume_binding_level): Assert that we are not in a class.
16176 (toplevel_bindings_p): Just check for namespace_p or
16177 pseudo_global.
16178 (resume_level): Remove.
16179 (find_binding): New function.
16180 (binding_for_name): Call it.
16181 (namespace_binding, set_namespace_binding): New functions.
16182 (push_namespace): Associate binding level with new namespace,
16183 resume_binding_level for existing namespace. Remove old code.
16184 Fake std by counting.
16185 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
16186 (maybe_push_to_top_level): Save current namespace.
16187 (pop_from_top_level): Restore saved namespace.
16188 (pop_namespace): Call suspend_binding_level. Remove old code.
16189 (cat_namespace_levels): New function.
16190 (set_identifier_type_value_with_scope): For namespace bindings,
16191 set BINDING_TYPE, and use global_type_node.
16192 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
16193 (identifier_type_value): New function.
16194 (pushtag): If no context, use current_namespace.
16195 (duplicate_decls): Don't process DECL_CHAIN.
16196 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
16197 already set. Never reset it to NULL_TREE. Lookup global variables
16198 in their namespace. Push overloaded templates if they are on
16199 namespace level.
16200 (pushdecl_namespace_level): New function.
16201 (pushdecl_top_level): Implement using pushdecl_namespace_level.
16202 (pushdecl_using_decl): New function.
16203 (overloaded_globals_p): Remove.
16204 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
16205 them. Use namespace_binding and set_namespace_value.
16206 (redeclaration_error_message): Complain if the declarations come
16207 from different namespaces.
16208 (lookup_tag): On namespace level, look in the BINDING_TYPE.
16209 (lookup_namespace_name): Pass tree_bindings from stack. Remove
16210 old code.
16211 (select_decl): New function.
16212 (lookup_name_real): Call it for qualified and unqualified lookup.
16213 Pass tree_bindings from the stack.
16214 If prefer_type is 1, also accept namespaces.
16215 (lookup_function_nonclass): New function.
16216 (init_decl_processing): Set the binding level of the global
16217 namespace to global_binding_level.
16218 Build a proper type list for __builtin_apply.
16219 Initialize std_node to "fake std" if flag_honor_std is set.
16220 Initialize global_type_node.
16221 Allocated bad_alloc in namespace std if flag_honor_std.
16222 (define_function): Set the DECL_CONTEXT to the current_namespace.
16223 (start_decl): A namespace is not considered as a context here. If
16224 the DECL_CONTEXT is a namespace, push the decl.
16225 (cp_finish_decl): Check for namespaces used as initializers.
16226 (grokfndecl): Add namespace parameter. Remove processing of
16227 DECL_CHAIN.
16228 (grokvardecl): Add namespace parameter.
16229 (grokdeclarator): Process SCOPEs that are namespaces. For
16230 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
16231 (start_function): Check for contexts that are namespaces.
16232 Set context for declarations that have not been pushed.
16233 (store_parm_decls): Check for ::main only.
16234 (finish_function): Likewise.
16235 (start_method): Check for contexts that are namespaces.
16236 (start_method): Remove DECL_CHAIN processing.
16237 * decl2.c (flag_honor_std): Declare.
16238 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
16239 (decl_namespace_list): New static global.
16240 (grok_x_components): Ignore namespaces as type contexts.
16241 (check_classfn): Expect OVERLOAD nodes.
16242 (grokfield): Remove DECL_CHAIN processing.
16243 (finish_file): Call cat_namespace_levels.
16244 (merge_functions): New function.
16245 (ambiguous_decl): Rewrite.
16246 (lookup_using_namespace): Produce tree_bindings.
16247 (qualified_lookup_using_namespace): Likewise.
16248 (set_decl_namespace, decl_namespace, current_decl_namespace,
16249 push_decl_namespace, pop_decl_namespace): New functions.
16250 (arg_lookup): New struct.
16251 (add_function, arg_assoc_namespace, arg_assoc_class,
16252 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
16253 New functions.
16254 (get_namespace_id, current_namespace_id): Remove.
16255 (do_toplevel_using_decl): Rewrite.
16256 (do_class_using_decl): Complain about namespace qualifiers.
16257 (do_using_directive): Sorry if not on namespace level. Complain
16258 about unknown namespaces.
16259 * error.c (dump_aggr_type): Check for namespace contexts.
16260 * except.c (init_exception_processing): Push terminate into std.
16261 * friend.c (is_friend): A namespace is not a context, here.
16262 * init.c (expand_member_init): Remove DECL_CHAIN processing.
16263 (build_offset_ref): Process OVERLOAD nodes.
16264 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
16265 * lex.c (identifier_type): Loop using OVL_CHAIN.
16266 (see_typename): Set looking_for_typename to 2.
16267 (real_yylex): Likewise.
16268 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
16269 (do_scoped_id): Expect OVERLOAD nodes.
16270 Change calling convention for qualified_lookup_using_namespace.
16271 (build_lang_decl): Don't set in_namespace anymore.
16272 * method.c (typevec_size): New global.
16273 (build_overload_nested_name): Return if global_namespace.
16274 Otherwise, always expect a declaration context.
16275 (build_qualified_name): Likewise.
16276 Make sure we don't write beyond typevec_size.
16277 (build_decl_overload_real): Likewise.
16278 Allocate one extra slot for the namespace.
16279 (hack_identifier): Mark code dead.
16280 Process OVERLOAD and NAMESPACE_DECL nodes.
16281 * parse.y (program): Pop namespaces until in global namespace.
16282 (extdef): In a using-declaration, don't discard the identifier if
16283 there is no declaration.
16284 (left_curly): Ignore type contexts which are namespaces.
16285 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
16286 used as scope.
16287 * pt.c (template_class_depth): Expect types to be namespaces.
16288 (determine_specialization): Simplify by expecting OVERLOAD nodes.
16289 (push_template_decl): Push into namespace level.
16290 Reset ctx if it is a namespace.
16291 Set DECL_CONTEXT to current_namespace if not set already.
16292 Ignore real contexts that are namespaces.
16293 (mangle_class_name_for_template): Skip global_namespace.
16294 Mangle other namespaces as declarations.
16295 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
16296 (lookup_template_class): Push into namespace of context.
16297 If the context is a namespace, set it to global_namespace.
16298 Use id_context for mangling.
16299 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
16300 (tsubst_friend_function): Ignore namespace contexts.
16301 Push into namespace level.
16302 (tsubst): Handle NAMESPACE_DECL nodes.
16303 Remove DECL_CHAIN processing.
16304 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
16305 * ptree.c (print_lang_identifier): Print bindings.
16306 (lang_print_xnode): Print OVERLOAD nodes.
16307 * rtti.c (init_rtti_processing): Push type_info into std.
16308 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
16309 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
16310 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
16311 lookup_fnfields_here): Likewise.
16312 Process all nodes, instead of going through TREE_CHAIN.
16313 * sig.c (build_signature_pointer_or_reference_type): Set context
16314 to global_namespace.
16315 (build_signature_table_constructor): Expect OVERLOAD nodes.
16316 * spew.c (yylex): Save old setting of looking_for_typename.
16317 * tree.c (decl_list_length): Remove.
16318 (binding_init): New function.
16319 (count_functions): Rewrite.
16320 (is_overloaded_fn): Expect OVERLOAD nodes.
16321 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
16322 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
16323 ovl_member): New functions.
16324 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
16325 (type_unknown_p): Likewise.
16326 (require_instantiated_type): Likewise.
16327 (build_component_ref): Declare code dead.
16328 (build_x_function_call): Create and expect OVERLOAD nodes.
16329 (build_function_call_real): Check for ::main only.
16330 (build_unary_op): Likewise. Expect OVERLOAD nodes.
16331 (convert_for_assignment): Check for TREE_LIST before accessing
16332 TREE_VALUE.
16333 * decl.c (duplicate_decls): Check for namespace bindings instead
16334 of global bindings.
16335 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
16336 lookup_name_current_level, start_decl, xref_tag,
16337 finish_enum): Likewise.
16338 * init.c (build_offset_ref): Likewise.
16339 * search.c (lookup_field): Likewise.
16340 (lookup_fnfields): Likewise.
16341 (dfs_debug_mark): Likewise.
16342 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
16343 (poplevel_class, pop_from_top_level): Likewise.
16344 * decl2.c (finish_method): Likewise.
16345 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
16346 * decl.c (record_builtin_type): Likewise.
16347 (init_decl_processing, grokfndecl): Likewise.
16348 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
16349 (make_lang_type): Likewise.
16350 * parse.y (make_thunk): Likewise.
16351 * pt.c (tsubst): Likewise.
16352 * tree.c (debug_binfo): Likewise.
16353 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
16354 tinfo2.cc, inc/new.h: Add std qualifications.
16355 * inc/new: Wrap with namespace std if __HONOR_STD.
16356 * inc/typeinfo: Likewise.
16357
16358 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
16359
16360 * call.c (build_user_type_conversion_1): Handle second_conv
16361 properly for templates.
16362
16363 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
16364
16365 * method.c (build_decl_overload_real): Set TREE_USED flag to
16366 zero for build_type_variants nodes as well.
16367
16368 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
16369
16370 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
16371
16372 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
16373
16374 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
16375 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
16376 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
16377 xref.o): Add toplev.h dependencies.
16378
16379 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
16380
16381 * errfn.c (cp_error, cp_warning): Remove declarations for
16382 error and warning respectively.
16383
16384 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16385
16386 * error.c: Convert to using ctype macros defined in system.h.
16387 * method.c: Likewise.
16388 * xref.c: Likewise.
16389 * lex.c: Likewise. Also remove redundant system header stuff.
16390
16391 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
16392
16393 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
16394 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
16395 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
16396 xref.c: Add include of toplev.h.
16397
16398 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
16399
16400 * tree.c (perm_manip): Also regenerate the RTL of an extern.
16401 (copy_to_permanent): Use end_temporary_allocation.
16402
16403 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
16404
16405 * init.c (expand_vec_init): The initialization of each array
16406 element is a full-expression.
16407
16408 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
16409
16410 * method.c (build_mangled_name): Add a call to build_type_variant
16411 to get the right type.
16412
16413 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
16414
16415 * Makefile.in: Add .SUFFIXES.
16416
16417 * cp-tree.def: Remove NAMESPACE_DECL.
16418
16419 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
16420
16421 * call.c (build_over_call): Do evaluate arg even if it has empty
16422 class type.
16423 * decl.c (start_function): Don't push a member function.
16424
16425 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
16426
16427 * Makefile.in (g++FAQ.info): Put -o option before input file.
16428
16429 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
16430
16431 * gxxint.texi: Add info for squangling codes K and B.
16432
16433 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
16434
16435 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
16436 the expression in templates.
16437 (finish_stmt_expr): Likewise.
16438
16439 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
16440
16441 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
16442
16443 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
16444
16445 * decl.c (maybe_push_to_top_level): Always clear
16446 current_template_parms and processing_template_decl.
16447 (pushtag): Remove check of current_class_type and some comments,
16448 since maybe_push_to_top_level no longer creates confusion.
16449
16450 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
16451
16452 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
16453 (DECL_CLASS_TEMPLATE_P): Likewise.
16454 (DECL_PRIMARY_TEMPLATE): Likewise.
16455 (PRIMARY_TEMPLATE_P): Use it.
16456 (push_template_decl_real): New function.
16457 (redeclare_class_template): Take new template parameters as
16458 input.
16459 (is_specialization_of): New function.
16460 (comp_template_args): Declare.
16461 * decl.c (pushtag): Handle friend template classes.
16462 (xref_tag): Likewise. Use new calling convention for
16463 redeclare_class_template.
16464 * decl2.c (grok_x_components): Handle friend templates.
16465 * friend.c (is_friend): Use is_specialization_of where
16466 appropriate. Deal with friend class templates.
16467 (make_friend_class): Let a class template be friends with itself.
16468 * pt.c (comp_template_args): Remove declaration.
16469 (tsubst_friend_class): New function.
16470 (push_template_decl_real): New function.
16471 (push_template_decl): Use it.
16472 (redeclare_class_template): Adjust for new calling convention.
16473 (comp_template_args): Give it external linkage.
16474 (instantiate_class_type): Use tsubst_friend_class to deal
16475 with friend templates.
16476 * typeck.c (comptypes): Use comp_template_args, rather than
16477 expanding it inline.
16478 * parse.y (component_decl): Handle a nested template type
16479 like other component type declarations.
16480
16481 * pt.c (check_explicit_specialization): Handle overloaded
16482 constructors correctly.
16483
16484 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
16485 (lookup_template_class): Use it.
16486
16487 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
16488
16489 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
16490 * cp-tree.h: Add WRAPPER support.
16491 * call.c (add_candidate): Split out from add_*_candidate fns.
16492 (build_over_call): Take the candidate instead of function and args.
16493 Enforce access control here. Emit overload warnings here.
16494 (add_warning): New fn.
16495 (joust): Add WARN parm. If not set, call add_warning instead of
16496 printing a warning. Re-enable some warnings.
16497 (tourney): Pass it.
16498 (convert_like): Adjust.
16499 (build_new_op): Adjust.
16500 (build_new_function_call): Adjust.
16501 (build_user_type_conversion_1): Adjust.
16502 (USER_CONV_FN): Adjust.
16503 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
16504 build_int_wrapper): New fns.
16505
16506 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
16507
16508 * pt.c (unify): Fix typo in previous change.
16509
16510 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
16511
16512 * error.c (dump_type_real): Declare canonical_name.
16513
16514 * typeck.c (comp_target_types): Fix PMFs.
16515
16516 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
16517
16518 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
16519 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
16520 TEMPLATE_DECL.
16521
16522 * pt.c (tsubst): Decrease the template-level of
16523 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
16524 TEMPLATE_PARM_INDEX.
16525 (template_decl_level): New function.
16526 (unify): Make sure to record unifications for template
16527 parameters, even when the parameters exactly match the arguments.
16528 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
16529 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
16530 aren't from the level we're currently working on.
16531
16532 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
16533
16534 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
16535
16536 * decl2.c (check_member_template): Set DECL_IGNORED for member
16537 class templates, too.
16538
16539 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
16540
16541 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16542
16543 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
16544
16545 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
16546
16547 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
16548 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
16549 (init_decl_processing): Handle TI types.
16550 * typeck.c (unsigned_type, signed_type): Handle TI types.
16551
16552 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
16553
16554 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
16555 New local added_libraries. Increment count when add library to
16556 arglist.
16557
16558 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
16559
16560 * cp-tree.h (type_as_string_real): New function.
16561 * pt.c (mangle_class_name_for_template): Use it.
16562 * error.c (dump_aggr_type): Change prototype.
16563 (dump_type_prefix): Likewise.
16564 (dump_type_suffix): Likewise.
16565 (dump_type_real): Convert from dump_type. If desired, the
16566 "canonica" name of a typedef, i.e., the name of the underlying
16567 type, can be printed.
16568 (dump_type): Call dump_type_real.
16569
16570 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
16571
16572 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
16573
16574 * typeck.c (comp_target_types): Tweak pedantic case.
16575 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
16576 Return -1 or 1 instead of 1 or 2.
16577 (compparms): Remove STRICT handling.
16578 (convert_for_assignment): Fix handling of pmfs.
16579
16580 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
16581
16582 * typeck.c (comp_target_types): Handle references like pointers.
16583 (comp_target_parms): Note that return code from comp_target_types
16584 can be negative to indicate failure.
16585
16586 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16587
16588 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
16589 which requires a working target compiler to build.
16590
16591 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
16592
16593 * tree.c (avoid_overlap): Add prototype.
16594
16595 * spew.c (num_tokens): Add prototype.
16596 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
16597
16598 * search.c (dfs_check_overlap): Add prototype.
16599 (dfs_no_overlap_yet): Likewise.
16600
16601 * pt.c (original_template): Add prototype.
16602 (inline_needs_template_parms): Likewise.
16603 (push_inline_template_parms_recursive): Likewise.
16604 (retrieve_specialization, register_specialization): Likewise.
16605 (print_candidates, reduce_template_parm_level): Likewise.
16606 (build_template_decl, mark_template_parm): Likewise.
16607 (tsubst_friend_function, get_bindings_real): Likewise.
16608
16609 * method.c (start_squangling): Add prototype.
16610 (end_squangling, check_ktype, issue_ktype): Likewise.
16611 (build_overloaded_scope_ref, check_btype): Likewise.
16612 (build_mangled_template_parm_index): Likewise.
16613
16614 * lex.c (init_cpp_parse): Add prototype.
16615 (handle_cp_pragma, handle_sysv_pragma): Likewise.
16616 (reduce_cmp, token_cmp): Likewise.
16617
16618 * except.c (call_eh_info): Add prototype.
16619 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
16620 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
16621
16622 * decl2.c (is_namespace_ancestor): Add prototype.
16623 (namespace_ancestor, add_using_namespace): Likewise.
16624 (ambiguous_decl): Likewise.
16625
16626 * decl.c (indent): Add prototype.
16627
16628 * call.c (add_template_candidate_real): Add prototype.
16629
16630 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
16631
16632 * decl2.c (build_expr_from_tree): Just return a PMF.
16633
16634 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
16635
16636 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
16637 when doing initializations.
16638
16639 * pt.c (unify): Use comptypes to compare type args.
16640
16641 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
16642
16643 * decl.c (duplicate_decls): Fix check for when it's safe to free
16644 the new decl.
16645
16646 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
16647 to type_as_string.
16648
16649 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
16650
16651 * pt.c (build_template_parm_index): Add prototype.
16652
16653 * search.c (my_tree_cons): Don't clear words outside the
16654 newly allocated node.
16655
16656 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
16657
16658 * lex.c (init_parse): Now returns char* containing the filename.
16659
16660 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
16661 Jeff Law <law@cygnus.com>
16662
16663 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
16664 than a pointer.
16665
16666 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16667
16668 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
16669
16670 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
16671
16672 * decl.c (duplicate_decls): Don't warn for redundant decls if
16673 friend: let add_friend take care of it.
16674
16675 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
16676
16677 * sig.c (build_signature_pointer_constructor): Don't set
16678 TREE_HAS_CONSTRUCTOR for a signature pointer.
16679 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
16680 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
16681 here, too.
16682 * typeck.c (build_unary_op): Only allow taking the address of a
16683 real constructor.
16684 * typeck2.c (digest_init): Simplify.
16685 (store_init_value): Don't pedwarn about using { } for pmfs.
16686
16687 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
16688
16689 * cp-tree.h (start_decl): Update prototype.
16690 * decl.c (start_decl): Like the C version, new parameters
16691 for the attributes. Call cplus_decl_attributes here,
16692 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
16693 (grokdeclarator): Pass NULL for new start_decl arguments.
16694 * pt.c (tsubst_expr): Likewise.
16695 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
16696 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
16697 * lex.c (build_lang_decl): Add lang_name_java.
16698 * class.c (push_lang_context): Add lang_name_java.
16699 * method.c (build_mangled_name): Check for is_java_type.
16700
16701 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
16702
16703 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
16704 * call.c (build_scoped_method_call): Check for TREE_CODE for
16705 VOID_TYPE instead of type == void_type_node.
16706 (build_method_call): Likewise.
16707 * decl.c (lookup_name_real): Likewise.
16708 (grokdeclarator): Likewise.
16709 (start_decl): Likewise.
16710 (grokparms): Likewise.
16711 (start_function): Likewise.
16712 (finish_function): Likewise.
16713 (start_method): Likewise.
16714
16715 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
16716
16717 * lex.c (finput): New variable.
16718 (init_cpp_parse): Renamed from init_parse.
16719 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
16720 (finish_parse): New function.
16721 * cp-tree.h (init_lex, init_parse): Remove declarations.
16722
16723 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
16724
16725 * call.c (build_call): Still evaluate the actual argument.
16726 * class.c (is_empty_class): Update for -fnew-abi.
16727
16728 * decl2.c: -fnew-abi implies -fsquangle.
16729
16730 * method.c (do_build_assign_ref): Don't do anything to copy
16731 an empty class.
16732 (do_build_copy_constructor): Likewise.
16733 * call.c (build_over_call): Likewise.
16734
16735 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
16736
16737 * tree.c (avoid_overlap): Return a value.
16738
16739 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
16740
16741 * method.c (check_btype): Add missing argument to xrealloc.
16742 (check_ktype): Likewise.
16743
16744 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
16745
16746 Implement empty base optimization.
16747 * class.c (finish_struct_1): Add vbase fields earlier. Set
16748 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
16749 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
16750 (types_overlap_p): New fn.
16751 * tree.c (avoid_overlap): New fn.
16752 (build_base_fields): Use it to avoid overlapping empty bases.
16753 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
16754
16755 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
16756
16757 Re-implement allocation of base class subobjects.
16758 * tree.c (unshare_base_binfos): New fn.
16759 (layout_basetypes): Use it. Now handles offsets of both virtual and
16760 non-virtual bases, after layout_type.
16761 (layout_vbasetypes): Remove.
16762 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
16763 (build_vbase_pointer_fields): Split out from old layout_basetypes.
16764 * class.c (finish_base_struct): Lose offset handling code.
16765 Move nonvdtor warning here. Don't mess with t_binfo anymore.
16766 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
16767 * cp-tree.h: Adjust.
16768
16769 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
16770
16771 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
16772 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
16773 * class.c (duplicate_tag_error): Likewise.
16774 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
16775 * tree.c (layout_vbasetypes): Update from layout_record, remove
16776 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
16777 (layout_basetypes): Likewise.
16778
16779 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
16780
16781 * class.c, Make sure system.h is included just after config.h.
16782 Delete lingering stdio and errno references too.
16783 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
16784
16785 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
16786
16787 * friend.c (is_friend): Fix access control for local classes.
16788
16789 * class.c (is_empty_class): New fn.
16790 * call.c (build_call): Don't pass empty class objects to a function.
16791
16792 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
16793
16794 * call.c (build_over_call): Do name resolution for default
16795 arguments of function templates in the scope of the templates.
16796
16797 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
16798
16799 * call.c: Include system.h. Remove includes, declarations and
16800 defines provided by system.h.
16801 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
16802 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
16803 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
16804 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
16805 * typeck2.c, xref.c: Likewise.
16806 * Makefile.in: Dependencies updated as appropriate.
16807 * Make-lang.in: Likewise.
16808
16809 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
16810
16811 * pt.c (fn_type_unification): Allow incomplete unification without
16812 an immediate error message.
16813
16814 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
16815
16816 * tree.c (member_p): New fn.
16817 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
16818 initializing class members.
16819
16820 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
16821 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
16822
16823 * call.c (build_method_call): Handle non-scoped destructors, too.
16824 * pt.c (tsubst_copy): Likewise.
16825
16826 * pt.c (print_template_context): Split out...
16827 (push_tinst_level): ...from here.
16828
16829 * friend.c (is_friend): Don't pass a type to decl_function_context.
16830
16831 * typeck.c (convert_for_initialization): Always hand off
16832 conversions to class type.
16833
16834 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
16835
16836 * friend.c (is_friend): Local classes have the same access as the
16837 enclosing function.
16838
16839 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
16840
16841 * typeck.c (expand_target_expr): Delete dead function.
16842
16843 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
16844
16845 * repo.c (save_string): Delete dead function.
16846
16847 * method.c (thunk_printable_name): Delete dead function.
16848
16849 * lex.c (yynextch): Delete dead function.
16850
16851 * expr.c (tree_extract_aggr_init): #if 0 out.
16852
16853 * except.c (do_unwind): Delete dead function.
16854 (easy_expand_asm): Likewise.
16855
16856 * cvt.c (build_conversion_type_1): Delete dead function.
16857
16858 * cp-tree.h (push_expression_obstack): Declare.
16859
16860 * call.c (source_type): #if 0 out.
16861
16862 * class.c (alter_access): Remove unused label. Add braces
16863 around empty else clause.
16864
16865 * lex.c (yyprint): Fix argument to printf.
16866
16867 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
16868
16869 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
16870
16871 * pt.c (instantiate_class_template): Make sure template
16872 arguments are permanent.
16873 * init.c (resolve_offset_ref): Don't go looking around in
16874 template types.
16875
16876 * semantics.c: Add routines to handle expressions, and some
16877 declaration processing.
16878 * parse.y: Use them.
16879 (current_class_depth): Move declaration to cp-tree.h.
16880 * parse.c: Regenerated.
16881 * cp-tree.h: Use them.
16882 (current_class_depth): Declare.
16883 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
16884
16885 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
16886
16887 * error.c (dump_decl): Be a bit more explicit with template
16888 type arguments, when verbose.
16889
16890 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
16891
16892 * inc/exception: Reorder closing braces.
16893
16894 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
16895
16896 * pt.c (redeclare_class_template): New function.
16897 * cp_tree.h (redeclare_class_template): Declare it.
16898 * decl.c (xref_tag): Use it.
16899
16900 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
16901
16902 * call.c (build_over_call): Check IS_AGGR_TYPE, not
16903 TYPE_LANG_SPECIFIC.
16904 * typeck.c (convert_arguments): Likewise.
16905
16906 * decl.c (grokdeclarator): Remove const and volatile from type after
16907 setting constp and volatilep.
16908
16909 * class.c (finish_struct_1): Don't warn about bool bitfield larger
16910 than one bit.
16911
16912 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
16913
16914 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
16915
16916 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
16917
16918 * call.c (build_object_call): Complain about ambiguous operator(),
16919 rather that crashing.
16920 (build_new_op): Likewise.
16921 (build_op_delete_call): Likewise.
16922
16923 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
16924
16925 * cvt.c (perform_qualification_conversions): Use comp_target_types
16926 instead of comp_ptr_ttypes.
16927
16928 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
16929
16930 * cp-tree.h (enforce_access): Declare.
16931 * call.c (enforce_access): Make it extern, not static.
16932 * class.c (alter_access): Use enforce_access; modify code for ISO
16933 compliance, rather than ARM rules.
16934
16935 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16936
16937 * cp-tree.h: Fix typo.
16938
16939 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
16940
16941 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
16942 if (aggregate_value_p (type)).
16943
16944 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
16945
16946 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
16947
16948 * tree.c (mapcar): When dealing with a DECL, use it's constant
16949 value, if any.
16950 * pt.c (lookup_template_class): Don't mangle the names of template
16951 classes whose arguments are unknown.
16952
16953 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
16954
16955 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
16956
16957 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
16958
16959 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
16960
16961 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
16962 boolean_type_node to 1.
16963
16964 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
16965
16966 * error.c (dump_expr): Remove unused variable `l'.
16967
16968 * pt.c (for_each_template_parm): New function, created by
16969 converting uses_template_parms.
16970 (tree_fn_t): New typedef.
16971 (uses_template_parms): Use it.
16972 (mark_template_parm): New function.
16973 (push_template_decl): Check that the argument list of a partial
16974 specialization uses all the template parameters.
16975
16976 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
16977 with it; we might want it for debugging.
16978 * cp-tree.h (type_unification): Change interface.
16979 * class.c (finish_struct_1): Skip nested template types, just like
16980 ordinary nested types.
16981 (instantiate_type): Use new interface to type_unification.
16982 * lex.c (init_lex): Add __sz as opname for sizeof.
16983 * method.c (build_overload_scope_ref): New function.
16984 (build_overload_int): Handle complex expressions. Set
16985 numeric_output_need_bar if necessary.
16986 (build_overload_value): Handle non-PARM_DECL nodes; this
16987 routine is now used by build_overload_int. Remove some
16988 assignments to numeric_output_need_bar. Use
16989 build_overload_scope_ref.
16990 (build_qualified_name): Note that some template mangled names end
16991 with digits, and set numeric_output_need_bar appropriately. Use
16992 build_underscore_int.
16993 * pt.c (unify): Change interface.
16994 (type_unification_real): Likewise.
16995 (determine_specialization): Use new interfaces.
16996 (tsubst): Deal gracefully with situations in which the argument
16997 vector is not fully filled.
16998 (fn_type_unification): Use new interfaces.
16999 (type_unification): Likewise. Remove NOP_EXPR hack.
17000 (type_unification_real): Likewise.
17001 (unify): Likewise. Deal with unification of complex expressions.
17002
17003 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
17004
17005 * pt.c (complete_template_args): Initialize skip properly.
17006
17007 * decl.c (make_typename_type): Revert.
17008 (make_implicit_typename): Remove.
17009 (lookup_name_real): Don't call it. Call lookup_field if we see a
17010 TYPE_DECL from a template base.
17011 * search.c (lookup_field): Do implicit typename stuff.
17012
17013 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
17014 Geoff Noer <noer@cygnus.com>
17015
17016 * Makefile.in: Various fixes for building cygwin32 native toolchains.
17017 * Make-lang.in: Likewise.
17018
17019 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17020
17021 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
17022
17023 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
17024
17025 * decl.c (make_implicit_typename): Rewrite removed code.
17026 (make_typename_type): Call it if the type we look up comes from
17027 a base that uses template parms.
17028
17029 * pt.c (complete_template_args): Rewrite.
17030 (tsubst, FUNCTION_DECL): Use it.
17031
17032 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
17033
17034 * semantics.c (finish_asm_stmt): Fix combine strings. Call
17035 c_expand_asm_operands () if output_operands, input_operands or
17036 clobbers is not NULL_TREE.
17037
17038 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17039
17040 * pt.c (complete_template_args): New function.
17041 (get_bindings): Deal with specializations of function templates
17042 with return type containing parameters from outer class
17043 templates.
17044 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
17045 substitute arguments and compose a new type.
17046
17047 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
17048
17049 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
17050 FUNCTION_DECLs.
17051
17052 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
17053
17054 * decl.c (make_implicit_typename): Lose useless code.
17055
17056 * call.c (standard_conversion): Handle A* -> const A* properly.
17057
17058 * pt.c (get_bindings_real): Rename from get_bindings. Add
17059 check_rettype parm.
17060 (get_bindings): Pass 1.
17061 (get_bindings_overload): Pass 0.
17062
17063 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
17064
17065 * pt.c (check_explicit_specialization): When reverting a static
17066 member function, also remove the `this' parameter from
17067 last_function_parms.
17068
17069 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
17070
17071 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
17072 a function context.
17073
17074 * decl.c (store_bindings): Use free_binding_vecs.
17075 (pop_from_top_level): Likewise.
17076
17077 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
17078
17079 * decl.c (make_implicit_typename): Only change the type of a
17080 TYPENAME_TYPE.
17081
17082 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
17083
17084 * semantics.c: New file, containing routines to perform the
17085 semantic phase of parsing.
17086 * parse.y: Use it.
17087 * pt.c (tsubst_expr): Likewise.
17088 * cp-tree.h: Declare the various functions in semantics.c.
17089 Provide macros to access _STMT tree nodes.
17090 * cp-tree.def: Add ASM_STMT tree node.
17091 * Makefile.in, Make-lang.in: Add dependencies on and for
17092 semantics.c.
17093
17094 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
17095
17096 * pt.c (push_template_decl): Only check primary templates.
17097
17098 * pt.c (check_explicit_specialization): Complain about default args
17099 in explicit specialization.
17100
17101 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
17102 constructor_declarator.
17103
17104 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
17105
17106 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
17107 has no overloaded operator ->.
17108
17109 * call.c (build_field_call): Don't crash when presented with a
17110 field that is actually a nested type.
17111
17112 * decl.c (pushtag): Deal with friend class injection in local
17113 classes.
17114
17115 * call.c (build_object_call): Don't crash if OBJ is a
17116 pointer-to-member-function.
17117
17118 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
17119
17120 * pt.c (push_template_decl): Complain about template with C linkage,
17121 anonymous template class.
17122
17123 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
17124
17125 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
17126 * search.c: Likewise.
17127
17128 * lex.c (do_pending_defargs): Only call
17129 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
17130
17131 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
17132
17133 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
17134
17135 * parse.y: Deal with CONSTRUCTORS in new_initializers.
17136
17137 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
17138
17139 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
17140 closely mimics the behavior in parse.y.
17141 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
17142 into a compound statement.
17143
17144 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
17145
17146 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
17147 * pt.c (inline_needs_template_parms): New fn.
17148 (original_template): New fn.
17149 (push_inline_template_parms_recursive): New fn.
17150 (maybe_begin_member_template_processing): Use them.
17151 (maybe_end_member_template_processing): Likewise.
17152 (is_member_or_friend_template): Rename to is_member_template.
17153 Member functions of local classes are never member templates.
17154
17155 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17156
17157 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
17158 added in the class scope to catch redefinition error.
17159
17160 * pt.c (reduce_template_parm_level): Also copy
17161 the DECL_TEMPLATE_PARMS field.
17162
17163 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
17164
17165 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
17166 reduced-level template type parameter.
17167
17168 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
17169
17170 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
17171 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
17172 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
17173 * decl.c (duplicate_decls): Propagate it.
17174 * typeck2.c (abstract_virtuals_error): Use two loops to emit
17175 abstract virtual functions and virtual functions which need a
17176 final overrider separately.
17177
17178 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
17179
17180 * lang-specs.h: Properly put brackets around array elements in
17181 initializer.
17182
17183 * typeck.c (build_binary_op_nodefault): Correctly place parens around
17184 && and || in expression.
17185
17186 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
17187
17188 * call.c (default_parm_conversions): Remove prototype definition.
17189 (build_method_call): Remove unused variable result.
17190
17191 * cvt.c (ocp_convert): Remove unused variable conversion.
17192
17193 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
17194
17195 * except.c (do_unwind): #if 0 definition of unused variables fcall
17196 and next_pc.
17197
17198 * expr.c (extract_scalar_init): #if 0 prototype and function
17199 definition.
17200
17201 * init.c (expand_aggr_init_1): Remove unused variable init_type.
17202 (build_new_1): Remove unused variable t.
17203
17204 * pt.c (instantiate_class_template): Remove unused variable newtag;
17205 cast called function return value to void.
17206 (do_decl_instantiation): Remove unused variables name and fn.
17207
17208 * tree.c (get_type_decl): Add default return to shut up compiler from
17209 complaining control reaches end of non-void function.
17210
17211 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
17212
17213 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
17214
17215 * call.c (default_parm_conversions): Remove prototype definition.
17216 (build_method_call): Remove unused variable result.
17217 (build_over_call): Add default case in enumeration switch.
17218
17219 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
17220
17221 * decl2.c (lang_decode_option): Change j's type to size_t.
17222
17223 * tree.c (layout_vbasetypes): record_align and desired_align are of
17224 type unsigned int; const_size and nonvirtual_const_size likewise.
17225
17226 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
17227
17228 * parse.y (new_initializer): Make sure all initializers are
17229 lists.
17230
17231 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
17232
17233 * decl2.c (import_export_decl): Mark tinfo functions for
17234 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
17235
17236 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
17237
17238 * method.c: Fix typo.
17239
17240 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17241
17242 * method.c: Include "system.h" to get stdlib.h, stdio.h,
17243 ctype.h, string.h, etc.
17244 (issue_nrepeats): Add default case in enumeration switch.
17245 (check_btype): Likewise.
17246 (process_overload_item): Likewise.
17247
17248 * Makefile.in (method.o): Depend on system.h.
17249
17250 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
17251
17252 * lex.c (do_scoped_id): Fix parenthesizing.
17253
17254 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
17255
17256 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
17257 FLAG_RTTI is unset, initialize type info machinery and continue
17258 with FLAG_RTTI enabled.
17259 (get_typeid): Likewise.
17260
17261 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
17262
17263 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
17264 from B.
17265
17266 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
17267
17268 * pt.c (finish_member_template_decl): Deal more gracefully with
17269 invalid declarations.
17270
17271 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
17272
17273 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
17274 cp-tree.h: Clean up more old overloading code, old RTTI code, and
17275 some formatting quirks.
17276
17277 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
17278 method.c, pt.c, ptree.c, typeck.c: Remove support for
17279 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
17280 * class.h: Remove.
17281 * Makefile.in: Adjust.
17282
17283 * pt.c (unify): Don't allow reduced cv-quals when strict.
17284
17285 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
17286 *type_unification* and unify.
17287
17288 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
17289
17290 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
17291 (nested_name_specifier): And add it before this use.
17292 (typename_sub0): And this use. Also add use without the keyword.
17293 (typename_sub1): Likewise.
17294 * pt.c (instantiate_class_template): Don't actually instantiate
17295 anything if our type uses template parms.
17296
17297 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
17298
17299 * decl.c (start_function): Don't call temporary_allocation for a
17300 nested function.
17301
17302 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
17303
17304 * pt.c (instantiate_class_template): Don't mess with friends if
17305 our type uses template parms.
17306
17307 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
17308
17309 * parse.y (nested_name_specifier): Use explicit_template_type.
17310 (typename_sub): Allow a template_type, an explicit_template_type,
17311 or an implicit template type at the end.
17312 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
17313 * decl.c (make_typename_type): Handle template-id where the name
17314 is a TEMPLATE_DECL.
17315 * call.c (build_scoped_method_call): Handle member template
17316 destructor call.
17317 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
17318 destructor is represented by the type.
17319
17320 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
17321 * parse.y (nested_name_specifier): Add 'template' case.
17322 (explicit_template_type): New rule.
17323 (typename_sub): Use it.
17324 * decl.c (make_typename_type): Handle getting a template-id for NAME.
17325 * pt.c (tsubst): Likewise.
17326
17327 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
17328
17329 * pt.c (add_to_template_args): Fix thinko.
17330 (instantiate_class_template): Call it later.
17331
17332 * pt.c (get_class_bindings): Add outer_args parm.
17333 (most_specialized_class): Likewise.
17334 (instantiate_class_template): Pass it.
17335 (more_specialized_class): Likewise.
17336 (lookup_template_class): Get context from template if none
17337 was specified.
17338 (finish_member_template_decl): Don't do anything with a
17339 partial specialization.
17340 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
17341 AGGREGATE_TYPE_P.
17342 * class.c (finish_struct): Member class templates have already been
17343 checked for name clashes.
17344 * decl.c (pushdecl_with_scope): Handle pushing at class level.
17345
17346 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
17347
17348 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
17349 (tsubst, *_PARM): Support multiple levels of template classes.
17350 (instantiate_class_template): Look up the pattern from the
17351 original template.
17352 (lookup_template_class): Handle getting a template for d1.
17353 (push_template_decl): Correct setting of 'primary'.
17354 (reduce_template_parm_level): Add 'levels' parm.
17355 (finish_member_template_decl): Support member class templates.
17356 (template_class_depth): Handle multiple levels.
17357 * parse.y (component_decl_1, fn.def2): Remove member template case.
17358 (component_decl): Add member template cases.
17359 * decl2.c (check_member_template): We now handle member template
17360 classes.
17361 * decl.c (pushtag): Handle member templates.
17362 * method.c (do_inline_function_hair): Don't touch
17363 IDENTIFIER_GLOBAL_VALUE.
17364 * init.c (build_offset_ref): If name isn't an identifier, just
17365 return it.
17366 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
17367
17368 * typeck.c (get_delta_difference): Do adjust for conversions to
17369 and from virtual base.
17370
17371 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
17372
17373 * typeck.c (get_delta_difference): Give hard error for conversion
17374 from virtual base.
17375
17376 * cp-tree.h: Tweak formatting.
17377
17378 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
17379
17380 * decl.c (push_namespace): Handle redeclaration error.
17381
17382 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
17383 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
17384 (NAMESPACE_BINDING): New macro.
17385 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
17386 * *.c: Use them.
17387
17388 * pt.c (push_template_decl): Use innermost_args.
17389
17390 * decl.c (get_unique_name): Tweak from earlier in the name.
17391
17392 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
17393
17394 * cp-tree.def: Add CPLUS_BINDING node.
17395 * cp-tree.h (tree_binding): New struct.
17396 (BINDING_SCOPE, BINDING_VALUE): New macros.
17397 (current_namespace, global_namespace): Declare extern.
17398 (struct lang_decl_flags): New field in_namespace.
17399 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
17400 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
17401 (TREE_INDIRECT_USING): New macro.
17402 * decl2.c (current_namespace, global_namespace): Declare. The
17403 value is a NAMESPACE_DECL now, not a TREE_LIST.
17404 (is_namespace_ancestor, namespace_ancestor): New static functions.
17405 (add_using_namespace, ambiguous_decl): Likewise.
17406 (lookup_using_namespace): New support function for lookup_name.
17407 (qualified_lookup_using_namespace): New support function for
17408 do_scoped_id and lookup_namespace_name.
17409 (get_namespace_id): Mark as obsolete.
17410 (current_namespace_id): Likewise.
17411 (do_namespace_alias): Implement.
17412 (do_using_directive): Implement as call to add_using_namespace.
17413 * decl.c (binding_for_name): New function.
17414 (push_namespace, pop_namespace): Implement.
17415 (push_decl): Don't install a FUNCTION_DECL in the global branch.
17416 (lookup_namespace_name): Implement using qualified lookup.
17417 (lookup_name_real): For global scoping, lookup in
17418 global_namespace. For namespace scoping, lookup in given
17419 namespace. For unscoped lookup, iterate over namespace,
17420 considering using directives.
17421 (init_decl_processing): Initialize global_namespace.
17422 (grokvardecl): Build assembler name as static name for globals.
17423 (grokdeclarator): Remove old namespace mangling.
17424 (xref_tag): When installing a global binding for the
17425 tag, make sure we have an identifier.
17426 * method.c (build_overload_nested_name): Mangle namespaces.
17427 (build_qualified_name): Likewise.
17428 (build_decl_overload_real): Likewise.
17429 * lex.c (build_lang_decl): Set namespace for new declaration to
17430 current_namespace.
17431 (do_scoped_id): Find global names in global or current
17432 namespace, or using qualified namespace lookup, depending on
17433 context.
17434 * init.c (build_member_call): When scope is namespace, use
17435 build_x_function_call instead.
17436 (build_offset_ref): When scope is namespace, collapse processing
17437 to lookup_namespace_name instead.
17438 * error.c (dump_decl): Support NAMESPACE_DECL.
17439 * decl.c (pushdecl): Bind globals to current namespace.
17440 (push_overloaded_decl): Likewise.
17441 (lookup_tag): Likewise.
17442 (lookup_name_current_level): Likewise.
17443 (xref_tag): Likewise.
17444 (start_function): Likewise.
17445 * lex.c (do_identifier): Likewise.
17446 (identifier_typedecl_value): Likewise.
17447 (real_yylex): Likewise.
17448 * method.c (do_inline_function_hair): Likewise.
17449 * parse.y (unscoped): Likewise.
17450 * pt.c (check_explicit_specialization): Likewise.
17451 (lookup_template_class): Likewise.
17452 * rtti.c (call_void_fn): Likewise.
17453 * sig.c (build_sigtable): Likewise.
17454 * ptree.c (lang_print_xnode): New function.
17455
17456 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
17457
17458 * pt.c (instantiate_class_template): Don't instantiate if pedantic
17459 and the args use template parms.
17460
17461 * pt.c (push_tinst_level): If the instantiation uses template parms,
17462 fail silently.
17463 * decl.c (xref_basetypes): Do call complete_type for basetypes
17464 that involve template parameters.
17465
17466 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
17467
17468 * typeck2.c (process_init_constructor): Fix labeled init check.
17469
17470 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
17471
17472 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
17473 argument to tsubst and friends.
17474
17475 * pt.c (tsubst, FUNCTION_DECL): Tidy.
17476
17477 * typeck.c (build_x_function_call): Handle static member function
17478 templates like non-templates. Handle friend templates like normal
17479 function templates.
17480 * pt.c (tsubst, *_PARM): Don't use orig_level.
17481 (get_bindings): Don't call add_to_template_args.
17482 (instantiate_template): Likewise.
17483 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
17484 * ptree.c (print_lang_type): Print index/level for template parms.
17485
17486 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
17487
17488 * Make-lang.in (cc1plus): Note that cc1plus depends on
17489 cp/cp-tree.h and cp/cp-tree.def.
17490
17491 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
17492 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
17493 position in a template parameter list.
17494 * cp-tree.h (template_parm_index): New structure, used as the tree
17495 structure for a TEMPLATE_PARM_INDEX.
17496 (TEMPLATE_PARM_IDX): New macro.
17497 (TEMPLATE_PARM_LEVEL): Likewise.
17498 (TEMPLATE_PARM_DESCENDANTS): Likewise.
17499 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
17500 (TEMPLATE_PARM_DECL): Likewise.
17501 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
17502 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
17503 (TEMPLATE_TYPE_DECL): Likewise.
17504 (TEMPLATE_CONST_IDX): Remove.
17505 (TEMPLATE_CONST_LEVEL): Likewise.
17506 (TEMPLATE_CONST_SET_INFO): Likewise.
17507 (TEMPLATE_TYPE_SET_INFO): Likewise.
17508 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
17509 node.
17510 (TEMPLATE_TYPE_LEVEL): Likewise.
17511 * decl.c (decls_match): Call comp_template_parms, rather than
17512 expanding it inline.
17513 (duplicate_decls): If two template declarations are being merged,
17514 then their TEMPLATE_INFOs should be merged as well.
17515 (grokfndecl): Save template-id information when declaring a friend
17516 with explicit template arguments. Pass arguments to
17517 check_explicit_specialization via correct convention; at some
17518 point check_explicit_specialization changed, but these call-sites
17519 did not.
17520 (grokdeclarator): Tidy up slightly.
17521 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
17522 two template functions with the same DECL_ASSEMBLER_NAME the same,
17523 since the names are not yet mangled.
17524 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
17525 TEMPLATE_CONST_PARM.
17526 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
17527 decl for a non-type parameter, rather than printing `<tparm ...>'.
17528 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
17529 (do_friend): Deal with template friends.
17530 * lex.c (do_pending_inlines): Call
17531 maybe_begin_member_template_processing, rather than
17532 conditionally calling begin_member_template_processing.
17533 (process_next_inline): Likewise. Call
17534 maybe_end_member_template_processing, rather than
17535 conditionally calling end_member_template_processing.
17536 (do_pending_defargs): Likewise.
17537 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
17538 TEMPLATE_CONST_PARM.
17539 * method.c (build_mangled_template_parm_index): New function.
17540 (build_overload_value): Use it.
17541 (build_overload_name): Likewise.
17542 * pt.c (finish_member_template_decl): Allow friend declarations.
17543 (template_class_depth): New function.
17544 (is_member_template): Rename, and modify, to become...
17545 (is_member_or_friend_template): New function.
17546 (end_member_template_processing): Rename, and modify, to become...
17547 (maybe_end_member_template_processing).
17548 (build_template_parm_index): New function.
17549 (reduce_template_parm_level): New function.
17550 (process_template_parm): Modify to use build_template_parm_index.
17551 (push_template_decl): Deal with friend templates.
17552 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
17553 TEMPLATE_CONST_PARM.
17554 (tsubst_friend_function): New function.
17555 (instantiate_class_template): Generate the DECL_FRIENDLIST
17556 for a new instantiation by using tsubst_friend_function rather
17557 than just tsubst.
17558 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
17559 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
17560 appropriate new macros. Use reduce_template_parm_level to
17561 generate lower-level template parameters. Handle tsubst'ing into
17562 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
17563 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
17564 templates. Similarly for the template parameters for a new
17565 template.
17566 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
17567 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
17568 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
17569 (get_bindings): Call add_to_template_args if necessary.
17570 (instantiate_decl): Handle instantiations of friend templates.
17571 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
17572 TEMPLATE_TYPE_PARM as a list of fields; it's not!
17573 * spew.c (yylex): Do a little manual constant propagation to
17574 clarify the code.
17575
17576 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
17577
17578 * error.c: Include sys/types.h.
17579
17580 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
17581
17582 * method.c (build_mangled_name): Start CPP directives in column zero.
17583
17584 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
17585
17586 * typeck2.c (process_init_constructor): Sorry about non-trivial
17587 labeled initializers.
17588 * parse.y (initlist): Re-enable labeled initializers.
17589
17590 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17591
17592 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
17593 all callers changed. Rely on the new parameter instead of arg
17594 being a TREE_LIST when determine whether we are working inside
17595 template template parameter. Clean up is_type test.
17596
17597 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
17598
17599 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
17600 * typeck2.c (initializer_constant_valid_p): Allow conversions
17601 between pointers and references.
17602
17603 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
17604
17605 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
17606 if pedantic || warn_pointer_arith.
17607
17608 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17609
17610 * pt.c (unify): Handle TEMPLATE_DECL.
17611
17612 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
17613
17614 * cp-tree.h (strip_attrs): Remove decl.
17615
17616 1998-02-18 Doug Evans <devans@cygnus.com>
17617
17618 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
17619 Update olddecl's attributes too.
17620 (strip_attrs): Remove function.
17621 * typeck.c (common_type): Call merge_machine_type_attributes.
17622
17623 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
17624
17625 * parse.y (initdcl0_innards): New grammar symbol.
17626 (nomods_initdecls, nomods_initdcl0): Change type from itype to
17627 none, since the resulting value is never used.
17628 (parse_decl): New function.
17629 (datadef): Remove redundant actions.
17630 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
17631 * parse.c: Regenerated.
17632
17633 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
17634
17635 * parse.y (simple_stmt): Use getdecls() to check for decl.
17636
17637 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
17638
17639 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
17640 macros.
17641 (c++.install-common): Install c++filt properly as native or as cross
17642 variant.
17643 (c++.uninstall): Add c++filt.
17644
17645 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
17646
17647 * call.c (standard_conversion): Fix multi-level ptr conversions.
17648
17649 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
17650
17651 * init.c (build_new): Propagate error_mark_node up.
17652
17653 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
17654
17655 * parse.y (simple_stmt): If the condition isn't a declaration,
17656 start the controlled block after the test.
17657
17658 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
17659
17660 * call.c (build_over_call): Convert builtin abs, labs and fabs to
17661 tree-codes.
17662 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
17663 builtins.
17664
17665 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
17666
17667 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
17668
17669 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
17670
17671 * cp-tree.h: Add access_protected_virtual_node.
17672 * class.c (init_class_processing): Initialize it.
17673 * decl.c (xref_basetypes): Use it.
17674 * parse.y (base_class_access_list): Likewise.
17675
17676 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
17677 (c++.install-common): Install c++filt.
17678
17679 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17680
17681 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
17682
17683 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
17684
17685 * call.c (reference_binding): Use comptypes when comparing
17686 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
17687
17688 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
17689
17690 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
17691 (really_overloaded_fn): Move check here from is_overloaded_fn.
17692 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
17693
17694 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
17695
17696 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
17697 conversions.
17698
17699 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
17700
17701 * cp-tree.h (push_template_decl): Return the decl passed in, or an
17702 equivalent duplicate.
17703 * decl.c (pushtag): Use the return value from push_template_decl.
17704 (duplicate_decls): When duplicating a template declaration, merge
17705 the DECL_TEMPLATE_RESULTs as well.
17706 (make_implicit_typename): Don't try to dive into typename types to
17707 find a context for making a new implicit typename.
17708 (start_decl): Use the return value from push_template_decl.
17709 (grokdeclarator): Complain about declarations list `const operator
17710 int'. Since we don't correctly handle in-class initializations of
17711 non-static data members, complain about this (now illegal)
17712 practice. Issue an error for initializations of non-const statics
17713 since that is illegal as well, and since we don't handle that case
17714 correctly either.
17715 (start_function): Use the return value from push_template_decl.
17716 (start_method): Likewise.
17717 * decl2.c (grokfield): Likewise. Since the change to
17718 grokdeclarator ensures that all initialized fields are in fact
17719 static, remove a redundant test for TREE_PUBLIC.
17720 * parse.y (initlist): Disable labeled initializers since they do
17721 not work as per the documentation, and since they do not use the
17722 same syntax as the C front end.
17723 * pt.c (push_template_decl): Return the decl passed in, or an
17724 equivalent duplicate.
17725 (lookup_template_class): When searching in a nested context,
17726 use the right arguments.
17727 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
17728 * typeck.c (build_component_ref): Assign the correct type to the
17729 result of build_vfn_ref.
17730
17731 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
17732
17733 * pt.c (convert_nontype_argument): Fix typo.
17734 (check_explicit_specialization): Allow old-style specialization
17735 of class template members.
17736
17737 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
17738 Manfred Hollstein <manfred@s-direktnet.de>
17739
17740 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
17741 when deciding to override DECL_ASSEMBLER_NAME.
17742
17743 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
17744
17745 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
17746 * cp-tree.h (flag_do_squangling): Add declaration.
17747 * lang-options.h: Add -fsquangle and -fno-squangle.
17748 * method.c: Add macros and static variables for squangling.
17749 (build_overload_name): Rename to build_mangled_name, add logic for B
17750 compression, and split into process_modifiers and
17751 process_overload_item.
17752 (process_modifiers): New function, to handle constant, reference,
17753 and pointer types.
17754 (process_overload_item): New function, handles issue of type codes.
17755 (build_overload_name): New function, start squangling and call
17756 build_mangled_name.
17757 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
17758 (start_squangling): New function to initialize squangling structs.
17759 (end_squangling): New function to destroy squangling structs.
17760 (nrepeats): Rename variable to Nrepeats.
17761 (issue_nrepeats): New function for issuing 'n' type repeats.
17762 (check_ktype): New function to check for type K name compression.
17763 (build_overload_nested_name): Add a check for K name compression.
17764 (build_qualified_name): Add a check for K name compression and don't
17765 use DECL_ASSEMBLER_NAME when squangling is on.
17766 (check_btype): New function, checks for B type compression.
17767 (build_static_name, build_decl_overload_real): Initiate squangling.
17768 (build_typename_overload, build_overload_with_type): Initiate
17769 squangling
17770
17771 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
17772
17773 * method.c (make_thunk): Avoid name buffer overflow.
17774
17775 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
17776
17777 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
17778 don't define them yet.
17779
17780 * parse.y (nomods_initdcl0): Add constructor_declarator case.
17781
17782 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17783
17784 * config-lang.in (diff_excludes): Use basename only.
17785
17786 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
17787
17788 * tinfo2.cc: Add tinfo for signed char.
17789
17790 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
17791
17792 * search.c (compute_access): Handle protected constructors in derived
17793 classes as accessible.
17794
17795 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
17796
17797 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
17798 Call convert_from_reference sooner.
17799
17800 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
17801
17802 * cvt.c (ocp_convert): Obtain the constant values from constant
17803 decls even if the destination type is the same as the type of the
17804 decl.
17805
17806 * decl2.c (finish_file): Make sure that static inlines with
17807 definitions are not marked DECL_EXTERNAL before returning.
17808
17809 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
17810
17811 * decl.c: Lose arg_looking_for_template.
17812 (lookup_name_real): Likewise.
17813 * parse.y: Lose processing_template_arg, template_arg1.
17814 (primary): Likewise.
17815 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
17816
17817 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17818
17819 * error.c (dump_decl): Fix type of default arguments for template
17820 template parameters and nontype template parameters.
17821 * parse.y (template_parm): Handle invalid default template
17822 template arguments here.
17823
17824 * parse.y (template_parm): Use template_arg instead of PTYPENAME
17825 for default template template argument.
17826 * pt.c (coerce_template_parms): Merge default template argument
17827 codes. Can treat RECORD_TYPE as template name if it is implicitly
17828 created. Fix argument index in error message.
17829 * typeck.c (comptypes): Merge template argument comparison codes in
17830 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
17831
17832 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
17833
17834 * lex.c (file_name_nondirectory): Also check for '/'.
17835
17836 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
17837
17838 * parse.y (primary): Deal with statement-expressions in
17839 templates.
17840 * pt.c (tsubst_copy): Handle BIND_EXPR.
17841 * tree.c (mapcar): Likewise.
17842
17843 * call.c (add_template_candidate_real): Pass extra parameter to
17844 fn_type_unification.
17845 * cp-tree.h (fn_type_unification): Add parameter.
17846 * pt.c (fn_type_unification): Add additional parameter to deal with
17847 static member functions.
17848 (get_bindings): Deal with static member functions.
17849
17850 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
17851 (revert_static_member_fn): Declare.
17852 * decl.c (revert_static_member_fn): Remove declaration. Change
17853 linkage from internal to external.
17854 (cp_finish_decl): Deal with virtual functions in classes local to
17855 template functions.
17856 * decl2.c (finish_file): Don't forget to emit increment/decrement
17857 expressions in initializers for file-scope variables.
17858 * parse.y (typename_sub2): If the typename doesn't names a
17859 template, rather than a type, issue an error message.
17860 * pt.c (check_explicit_specialization): Handle specializations of
17861 static member functions.
17862 (coerce_template_parms): Handle offset references to lists of
17863 member functions.
17864 * search.c (note_debug_info_needed): Don't crash when handed a
17865 type which is being defined.
17866 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
17867 that can happen with some illegal code.
17868
17869 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17870
17871 * call.c (user_harshness): Initialize `code' to 0.
17872 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
17873 (null_ptr_cst_p): Add parentheses around && within ||.
17874 (standard_conversion): Likewise.
17875 (z_candidate): Likewise.
17876 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
17877 (build_object_call): Likewise for `mem_args'.
17878 (build_new_op): Likewise for `mem_arglist'. Add `return' from
17879 default case in enumeration switch.
17880
17881 * class.c (build_vtable_entry): Add explicit braces to avoid
17882 ambiguous `else'.
17883 (build_class_init_list): Likewise.
17884 (finish_struct_1): Initialize `width' to 0.
17885 (instantiate_type): Initialize `name' to NULL_TREE. Add
17886 explicit braces to avoid ambiguous `else'.
17887
17888 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
17889 `else'.
17890
17891 * decl.c (grok_reference_init): Eliminate unused parameter, all
17892 callers changed.
17893 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
17894 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
17895 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
17896 (grokdeclarator): Add parentheses around && within ||. Add
17897 explicit braces to avoid ambiguous `else'.
17898 (grokparms): Initialize `type' to NULL_TREE.
17899 (xref_tag): Remove unused label `just_return'.
17900 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
17901 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
17902 (hack_incomplete_structures): Add parentheses around assignment
17903 used as truth value.
17904
17905 * decl2.c (coerce_delete_type): Hide definition of `e3'.
17906
17907 * error.c: Include <stdlib.h>.
17908 (dump_expr): Change the type of `i' to size_t. Remove unused
17909 label `error'.
17910
17911 * except.c (init_exception_processing): Remove unused variable `d'.
17912 (expand_throw): Likewise for `label'.
17913
17914 * friend.c (add_friends): Add explicit braces to avoid ambiguous
17915 `else'.
17916
17917 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
17918 (sort_base_init): Likewise for `binfo'.
17919 (expand_member_init): Likewise for `rval'.
17920 (build_member_call): Add parentheses around assignment used as
17921 truth value.
17922 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
17923 (build_new): Initialize `nelts' to NULL_TREE. Initialize
17924 `old_immediate_size_expand' to 0.
17925 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
17926 (build_vec_delete_1): Remove unused variable `block'.
17927 (expand_vec_init): Initialize `itype' to NULL_TREE.
17928
17929 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
17930 declaration of `index' and `rindex' with autoconf macros.
17931 (reinit_parse_for_expr): Remove unused variables
17932 `look_for_semicolon' and `look_for_lbrac'.
17933 (cons_up_default_function): Initialize `args' to NULL_TREE.
17934 (readescape): Initialize `firstdig' to 0.
17935 (real_yylex): Add parentheses around assignment used as truth value.
17936
17937 * method.c: Include <strings.h> if we don't have <string.h>.
17938 Protect declaration of `index' with autoconf macro.
17939
17940 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
17941 Initialize `type' to NULL_TREE.
17942 (structsp): Remove unused variable `id'.
17943
17944 * pt.c (coerce_template_parms): Add explicit braces to avoid
17945 ambiguous `else'.
17946 (lookup_template_class): Initialize `template' to NULL_TREE.
17947 (instantiate_class_template): Remove unused variable `name' and `e'.
17948 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
17949 (do_poplevel): Initialize `saved_warn_unused' to 0.
17950 (type_unification): Remove unused varable `parm'.
17951 (unify): Likewise for `j'.
17952
17953 * repo.c (init_repo): Add parentheses around assignment used as
17954 truth value.
17955 (finish_repo): Remove unused varable `p'.
17956
17957 * search.c (get_binfo): Initialize `type' to NULL_TREE.
17958 (get_base_distance): Likewise.
17959 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
17960 and `new_v' to NULL_TREE.
17961 (lookup_fnfields): Likewise for `rval_binfo_h'.
17962 (breadth_first_search): Add parentheses around assignment used as
17963 truth value.
17964 (get_template_base): Initialize `type' to NULL_TREE.
17965
17966 * sig.c (append_signature_fields): Initialize `last_mfptr' to
17967 NULL_TREE.
17968 (build_signature_table_constructor): Likewise for
17969 `last_rhs_field', `pfn' and `vt_off'.
17970 (build_sigtable): Likewise for `init'.
17971
17972 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
17973 (propagate_binfo_offsets): Likewise for `delta'.
17974 (hash_tree_cons): Initialize hashcode to 0.
17975 (can_free): Likewise for `size'.
17976 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
17977
17978 * typeck.c (convert_sequence): Hide prototype.
17979 (common_type): Add explicit braces to avoid ambiguous `else'.
17980 (comp_target_types): Likewise.
17981 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
17982 (build_function_call_real): Add explicit braces to avoid ambiguous
17983 `else'.
17984 (convert_arguments): Initialize `called_thing' to 0.
17985 (convert_for_initialization): Initialize `savew' and `savee' to 0.
17986
17987 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
17988 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
17989 (build_x_arrow): Likewise for `last_rval'.
17990
17991 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
17992
17993 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
17994
17995 * decl.c (init_decl_processing): Use set_sizetype.
17996 * decl2.c (sizetype): Don't declare.
17997 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
17998 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
17999 (build_component_addr, unary_complex_lvalue): Likewise.
18000 * rtti.c (expand_class_desc): Likewise.
18001 * class.c (get_vfield_offset): Likewise.
18002
18003 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
18004
18005 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
18006 early to avoid bogus error. Handle overloaded function
18007 names provided as template arguments correctly.
18008 (coerce_template_parms): Don't mishandle overloaded functions when
18009 dealing with template template parameters.
18010 (lookup_template_class): Issue an error message, rather than
18011 crashing, when the TYPE_DECL provided is not a template type.
18012
18013 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
18014
18015 * class.c (instantiate_type): Don't just return a known type if
18016 it's wrong.
18017
18018 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
18019
18020 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
18021 since that code could never be reached.
18022
18023 * error.c (dump_decl): Avoid aborting in the midst of printing an
18024 error message about an illegal template declaration.
18025
18026 * parse.y (structsp): Print an error message, rather than crashing,
18027 when a class-head does not name a class.
18028
18029 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
18030 template arguments as a g++ extension.
18031
18032 * cp-tree.def (ALIGNOF_EXPR): New tree code.
18033 * decl2.c (grok_alignof): If processing_template_decl, just store
18034 the expression.
18035 * typeck.c (c_alignof): Likewise.
18036 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
18037 * error.c (dump_expr): Likewise.
18038 * pt.c (tsubst_copy): Likewise.
18039 * tree.c (cp_tree_equal): Likewise.
18040 * pt.c (uses_template_parms): Correctly determine whether or not a
18041 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
18042 folding can be done.
18043
18044 * cp-tree.h (grok_enum_decls): Remove type parameter.
18045 * decl.c (grok_enum_decls): Likewise.
18046 * decl2.c (grok_x_components): Call grok_enum_decls
18047 unconditionally, since it will do nothing if there is no
18048 current_local_enum. Use the new calling sequence.
18049 * pt.c (tsubst_enum): Use the new calling sequence for
18050 grok_enum_decls.
18051
18052 * decl.c (start_function): Make member functions of local classes
18053 in extern inline functions have comdat linkage here...
18054 (grokdeclarator): Rather than here.
18055
18056 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
18057
18058 * pt.c (convert_nontype_argument): Use decl_constant_value.
18059
18060 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
18061
18062 * call.c (add_template_candidate_real): New function.
18063 (add_template_candidate): Use it.
18064 (add_template_conv_candidate): Likewise.
18065 (joust): Pass extra argument to more_specialized.
18066 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
18067 (is_local_class): Remove.
18068 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
18069 * cp-tree.h (is_local_class): Remove.
18070 (perform_array_to_pointer_conversion): Likewise.
18071 (finish_member_template_decl): Add.
18072 (check_explicit_specialization): Return a tree, not an int.
18073 (more_specialized): Take additional argument.
18074 (get_bindings): Likewise.
18075 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
18076 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
18077 (perform_array_to_pointer_conversion): Remove.
18078 * decl.c (saved_scope): Add processing_specialization,
18079 processing_explicit_instantiation fields.
18080 (maybe_push_to_top_level): Save them.
18081 (pop_from_top_level): Restore them.
18082 (grokfndecl): Use new return value from
18083 check_explicit_specialization.
18084 (start_decl): Don't check flag_guiding_decls before pushing
18085 decls.
18086 (cp_finish_decl): Remove previous (bogus) change.
18087 (grok_declarator): Use decl_function_context rather than
18088 is_local_class.
18089 * decl2.c (finish_file): Pass extra argument to get_bindings.
18090 (build_expr_from_tree): Let build_x_component_ref check
18091 validity of arguments rather than doing it here.
18092 * lex.c (cons_up_default_function): Remove code fooling with
18093 processing_specialization, processing_explicit_instantiation
18094 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
18095 * method.c (build_overload_identifier): Mangle local classes in
18096 template functions correctly.
18097 * parse.y (finish_member_template_decl): Move to pt.c.
18098 * pt.c (finish_member_template_decl): Moved here from parse.y.
18099 (print_candidates): New function.
18100 (determine_specialization): Change interface. Properly look for
18101 most specialized versions of template candidates.
18102 (check_explicit_specialization): Fully process explicit
18103 instantiations.
18104 (push_template_decl): Avoid looking at CLASSTYPE fields in
18105 FUNCTION_DECLS.
18106 (determine_overloaded_function): Remove.
18107 (convert_nontype_argument): Change name from
18108 convert_nontype_parameter. Use determine_overloaded_function
18109 instead of instantiate_type.
18110 (mangle_class_name_for_template): Handle type contexts as well as
18111 function contexts.
18112 (classtype_mangled_name): Likewise.
18113 (lookup_template_class): Likewise.
18114 (tsubst): Likewise.
18115 (more_specialized): Take explict template arguments as a
18116 parameter.
18117 (most_specialized): Likewise.
18118 (get_bindings): Likewise. Check that return types match before
18119 proclaiming a function a match.
18120 (do_decl_instantiation): Remove code searching for function to
18121 instantiate; that is now done in check_explicit_specialization.
18122 (add_maybe_template): Pass extra argument to get_bindings.
18123 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
18124 implementation.
18125 * typeck.c (build_component_ref): Check for invalid arguments.
18126
18127 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
18128
18129 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
18130 return_target and call_target are equivalent.
18131
18132 * pt.c (type_unification_real): Just accept function parms that
18133 don't use any template parms.
18134
18135 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
18136
18137 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
18138 unset DECL_NOT_REALLY_EXTERN.
18139
18140 * parse.y (typename_sub*): Fix std::.
18141
18142 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
18143
18144 * error.c (dump_decl): Fix type default template args.
18145 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
18146
18147 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
18148
18149 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
18150 (file_name_nondirectory): Use.
18151
18152 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
18153
18154 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
18155 that are not really present. Substitute default arguments in
18156 template template arguments. Correctly convert TEMPLATE_DECL to
18157 TEMPLATE_TEMPLATE_PARM.
18158 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
18159 are no longer treated specially here.
18160 * parse.y (template_template_parm): Fix copy error.
18161 * decl.c (grokdeclarator): Warn about missing `typename' for nested
18162 type created from template template parameters.
18163 * parse.y (bad_parm): Likewise
18164
18165 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
18166 (push_nested_class): Likewise.
18167 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
18168 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
18169 (copy_template_template_parm): Declare.
18170 * decl.c (arg_looking_for_template): New variable.
18171 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
18172 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
18173 node if arg_looking_for_template is nonzero.
18174 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
18175 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
18176 (grokdeclarator): Handle TEMPLATE_DECL.
18177 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
18178 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
18179 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
18180 (dump_decl): Handle unnamed template type parameters.
18181 Handle template template parameters.
18182 (dump_function_name): Handle template template parameters.
18183 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
18184 Handle TEMPLATE_TEMPLATE_PARM.
18185 * method.c (build_template_template_parm_names): New function.
18186 (build_template_parm_names): Handle TEMPLATE_DECL.
18187 (build_overload_nested_name, build_overload_name):
18188 Handle TEMPLATE_TEMPLATE_PARM.
18189 * parse.y (maybe_identifier): New nonterminal.
18190 (template_type_parm): Use it.
18191 (template_template_parm, template_arg1): New nonterminal.
18192 (template_parm): Add template_template_parm rules.
18193 (template_arg): Set processing_template_arg.
18194 (template_arg1): Rules moved from template_arg.
18195 (primary, nonnested_type): Set arg_looking_for_template if we are
18196 processing template arguments.
18197 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
18198 (process_template_parm): Handle template template parameters.
18199 (coerce_template_parms, comp_template_args): Likewise.
18200 (mangle_class_name_for_template, lookup_template_class): Likewise.
18201 (uses_template_parms): Handle TEMPLATE_DECL and
18202 TEMPLATE_TEMPLATE_PARM.
18203 (current_template_args): Handle TEMPLATE_DECL.
18204 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
18205 * search.c (dfs_walk, dfs_record_inheritance):
18206 Handle TEMPLATE_TEMPLATE_PARM.
18207 * tree.c (copy_template_template_parm): New function.
18208 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
18209 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
18210
18211 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
18212
18213 * decl.c (start_decl): Don't allow duplicate definitions of static
18214 data members.
18215
18216 * call.c (build_user_type_conversion_1): Handle user-defined
18217 template conversion operators correctly.
18218
18219 * decl2.c (build_expr_from_tree): Issue an error message if the
18220 object in a COMPONENT_REF is a TEMPLATE_DECL.
18221
18222 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
18223
18224 * class.c (is_local_class): New function.
18225 * cp-tree.h (is_local_class): Declare it.
18226 (last_tree): Likewise.
18227 (begin_tree): Likewise.
18228 (end_tree): Likewise.
18229 (lookup_template_class): Change prototype.
18230 * decl.c (cp_finish_decl): Check for NULL where necessary.
18231 Consider FUNCTION_DECLS to declare objects with top-level binding,
18232 when calling make_decl_rtl.
18233 (grokdeclarator): Give members of local classes internal linkage.
18234 (start_function): Remove declaration of last_tree.
18235 (finish_function): Set flag_keep_inline_functions around call to
18236 rest_of_compilation if we are processing a member function in a
18237 local class.
18238 (start_method): Call push_template_decl for member functions of
18239 local classes in template functions.
18240 * decl2.c (import_export_decl): Don't give external linkage to
18241 instantiations of templates with internal linkage.
18242 * parse.y (last_tree): Remove declaration.
18243 (template_type): Pass extra parameter to lookup_template_class.
18244 (self_template_type): Likewise.
18245 (structsp): Move call to reset_specialization into left_curly.
18246 (left_curly): Call reset_specialization, and begin_tree.
18247 * pt.c (saved_trees): New variable.
18248 (mangle_class_name_for_template): Change prototype. Use
18249 additional function context to name local classes in templates
18250 correctly.
18251 (classtype_mangled_name): Pass the context.
18252 (push_template_decl): Handle local classes and templates, and
18253 member functions for such classes.
18254 (convert_nontype_parameter): Fix handling of pointer-to-member
18255 constants.
18256 (lookup_template_class): Handle local classes in templates.
18257 (tsubst): Likewise. Don't assume that template instantiations
18258 have external linkage; pay attention to the template declaration.
18259 (mark_decl_instantiated): Likewise.
18260 (begin_tree): New function.
18261 (end_tree): Likewise.
18262
18263 * decl.c (xref_basetypes): Don't call complete_type for basetypes
18264 that involve template parameters; that can lead to infinite
18265 recursion unnecessarily.
18266
18267 * pt.c (register_specialization): Do not register specializations
18268 that aren't ready to be registered yet.
18269 (check_explicit_specialization): Handle explicit specialization of
18270 constructors and destructors.
18271 (build_template_decl): New function.
18272 (push_template_delc): Handle out-of-class specializations of
18273 member templates.
18274
18275 * pt.c (check_explicit_specialization): Set up the template
18276 information before registering the specialization.
18277 (coerce_template_parms): Fix thinko.
18278 (tsubst): Handle specializations of member templates correctly.
18279
18280 * class.c (finish_struct_methods): Remove calls to
18281 check_explicit_specialization from here.
18282 (finish_struct): And insert them here.
18283 * cp-tree.h (perform_qualification_conversions): New function.
18284 (perform_array_to_pointer_conversion): Likewise.
18285 (begin_explicit_instantiation): Likewise.
18286 (end_explicit_instantiation): Likewise.
18287 (determine_specialization): Renamed from
18288 determine_explicit_specialization.
18289 (comp_template_parms): New function.
18290 (processing_explicit_instantiation): New variable.
18291 * cvt.c (perform_qualification_conversions): New function.
18292 (perform_array_to_pointer_conversion): Likewise.
18293 * decl.c (duplicate_decls): Don't consider template functions
18294 alike unless they have the same parameters. Refine handling of
18295 instantiation/specialization mismatches.
18296 (start_decl): Don't call pushdecl for template specializations,
18297 since they don't affect overloading.
18298 (start_function): Likewise.
18299 (grokfndecl): Call check_explicit_specialization a little later.
18300 Don't call duplicate_decls for memberm template specializations.
18301 (grokdeclarator): Don't update template_count for classes that are
18302 themselves specializations. Remove use of `2' as parameter to
18303 grokfndecl since that value isn't used.
18304 * lex.c (cons_up_default_function): Save and restore
18305 processing_explicit_instantiation around calls to grokfield.
18306 * parse.y (finish_member_template_decl): New function.
18307 (component_decl_1): Use it.
18308 (fn.def2): Likewise.
18309 (template_arg_list_opt): New nonterminal.
18310 (template_type): Use it.
18311 (self_template_type): Likewise.
18312 (template_id): Likewise.
18313 (object_template_id): Likewise.
18314 (notype_template_declarator): Likwise.
18315 (begin_explicit_instantiation): Likewise.
18316 (end_explicit_instantiation): Likewise.
18317 (explicit_instantiation): Use them.
18318 * pt.c (coerce_template_parms): Add parameters.
18319 (processing_explicit_instantiation): New variable.
18320 (convert_nontype_parameter): New function.
18321 (determine_overloaded_function): Likewise.
18322 (begin_explicit_instantiation): Likewise.
18323 (end_explicit_instantiation): Likewise.
18324 (retrieve_specialization): Likewise.
18325 (register_specialization): Likewise.
18326 (processing_explicit_specialization): Removed.
18327 (determine_specialization): Handle specializations of member
18328 functions of template class instantiations.
18329 (check_explicit_specialization): Refine to conform to standard.
18330 (comp_template_parms): New function.
18331 (coerce_template_parms): Call convert_nontype_parameter.
18332 (tsubst): Refine handling of member templates. Use
18333 register_specialization.
18334 (instantiate_template): Use retrieve_specialization.
18335 (do_decl_instantiation): Likewise.
18336 (instantiate_decl): Likewise.
18337 (type_unification): Improve handling of explict template
18338 arguments.
18339 * tree.c (mapcar): Return error_mark_node, rather than aborting,
18340 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
18341 * typeck.c (build_unary_op): Call determine_specialization, rather
18342 than determine_explicit_specialization.
18343
18344 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
18345
18346 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
18347
18348 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
18349
18350 * error.c (dump_decl): For enum tags, output the tag, not its value.
18351
18352 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
18353
18354 * decl.c (init_decl_processing): Only call init_rtti_processing
18355 FLAG_RTTI is set.
18356
18357 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
18358
18359 * init.c (build_new_1): Split out from build_new.
18360 (build_new): Just return a NEW_EXPR.
18361 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
18362
18363 * decl2.c (get_temp_regvar): Tweak.
18364
18365 * cp-tree.h (TREE_CALLS_NEW): Comment out.
18366 * class.c (resolves_to_fixed_type_p): Remove use.
18367 * method.c (build_opfncall): Likewise.
18368 * call.c (build_new_op): Likewise.
18369
18370 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
18371
18372 * exception.cc (__eh_alloc, __eh_free): New fns.
18373 (__cp_push_exception, __cp_pop_exception): Use them.
18374 (__uncatch_exception): Call terminate here if no exception.
18375 * except.c (build_terminate_handler): New fn.
18376 (expand_start_catch_block): Use it.
18377 (expand_exception_blocks): Likewise.
18378 (alloc_eh_object): New fn.
18379 (expand_throw): Use it. Protect exception init with terminate.
18380 * typeck.c (build_modify_expr): Remove code that ignores trivial
18381 methods.
18382
18383 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18384
18385 * call.c (add_builtin_candidate): Add default case in enumeration
18386 switch.
18387 (build_new_op): Likewise.
18388 (convert_like): Likewise.
18389 * cvt.c (build_expr_type_conversion): Likewise.
18390 * tree.c (real_lvalue_p): Likewise.
18391 (lvalue_p): Likewise.
18392 (cp_tree_equal): Likewise.
18393 * typeck.c (comptypes): Likewise.
18394 (build_component_ref): Likewise.
18395 (build_function_call_real): Likewise.
18396 (build_binary_op_nodefault): Likewise.
18397 (build_unary_op): Likewise.
18398 (build_modify_expr): Likewise.
18399 * typeck2.c (initializer_constant_valid_p): Likewise.
18400
18401 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
18402
18403 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
18404
18405 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
18406
18407 * pt.c (coerce_template_parms): Make sure to digest_init if
18408 possible.
18409
18410 * decl.c (duplicate_decls): Make the newdecl virtual if the
18411 olddecl was, just as is done with other attributes of olddecl.
18412
18413 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
18414
18415 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
18416 address of an OFFSET_REF.
18417
18418 * cp-tree.def: Add AGGR_INIT_EXPR.
18419 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
18420 AGGR_INIT_EXPR where appropriate.
18421 * expr.c (cplus_expand_expr): Likewise. Simplify.
18422
18423 * decl2.c (finish_file): Remove call to register_exception_table.
18424
18425 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18426
18427 * pt.c (instantiate_class_template): Don't do injection when
18428 processing_template_decl is true, as pollutes current_binding_level
18429 for base classes.
18430
18431 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
18432
18433 * pt.c (maybe_fold_nontype_arg): Add prototype.
18434
18435 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
18436
18437 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
18438 * error.c (dump_expr): Likewise.
18439
18440 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
18441
18442 * typeck.c (build_function_call_real): Remove "inline called before
18443 definition" pedwarn.
18444
18445 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
18446
18447 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
18448
18449 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
18450
18451 * pt.c (type_unification_real): Change __null to type void* with
18452 a warning.
18453
18454 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
18455
18456 * call.c (implicit_conversion): Don't call
18457 build_user_type_conversion_1 with a NULL expr, since it will
18458 crash.
18459
18460 * pt.c (unify): Don't try to unify array bounds if either array is
18461 unbounded.
18462
18463 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
18464
18465 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
18466 Replace extern decls with casts.
18467
18468 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
18469 Update last_parm_cleanup_insn.
18470 (store_after_parms): Remove.
18471 * cp-tree.h: Adjust.
18472
18473 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
18474
18475 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
18476 (finish_file): Check DECL_COMDAT instead of weak|one_only.
18477 (import_export_vtable): Use make_decl_one_only instead of
18478 comdat_linkage for win32 tweak.
18479 (import_export_decl): Likewise.
18480 * pt.c (mark_decl_instantiated): Likewise.
18481
18482 * decl2.c (finish_file): Lose handling of templates in pending_statics.
18483
18484 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
18485
18486 * decl2.c (finish_file): Lose call to expand_builtin_throw.
18487 * except.c (expand_builtin_throw): Remove.
18488 * cp-tree.h: Remove ptr_ptr_type_node.
18489 * decl.c: Likewise.
18490
18491 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
18492
18493 * decl.c (ptr_ptr_type_node): Define.
18494 (init_decl_processing): Initialize it.
18495 * cp-tree.h: Declare it.
18496 * exception.cc (__cp_exception_info): Use __get_eh_info.
18497 (__cp_push_exception): Likewise.
18498 (__cp_pop_exception): Likewise.
18499
18500 From Scott Snyder <snyder@d0sgif.fnal.gov>:
18501 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
18502 saved_pc.
18503 (init_exception_processing): Removed saved_pc initialization.
18504
18505 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
18506
18507 * pt.c (instantiate_decl): Defer all templates but inline functions.
18508
18509 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
18510
18511 * init.c (expand_vec_init): Don't fold a list of parameters.
18512
18513 * decl.c (copy_args_p): Handle copy elision for types with virtual
18514 bases.
18515 * call.c (build_over_call): Likewise.
18516
18517 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
18518
18519 * pt.c (lookup_template_function): Copy the template arguments,
18520 not just the list containing them, to the permanent obstack.
18521
18522 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
18523
18524 * except.c (expand_start_catch_block): suspend_momentary for the
18525 terminate handler.
18526
18527 * error.c (dump_decl): Handle LOOKUP_EXPR.
18528
18529 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
18530
18531 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
18532 permanent obstack if we are processing a template decl.
18533 * typeck.c (build_static_cast): Likewise.
18534 (build_const_cast): Likewise.
18535 (build_reinterpret_cast): Likewise.
18536
18537 * pt.c (coerce_template_parms): Coerce some expressions, even
18538 when processing_template_decl.
18539
18540 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
18541
18542 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
18543 handling of pointer difference expressions.
18544
18545 * typeck.c (comp_target_types): Comparison of function/method types
18546 is independent of nptrs.
18547
18548 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
18549
18550 * pt.c (tsubst): Avoid creating pointer to reference and
18551 reference to reference types.
18552
18553 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
18554
18555 * parse.y (do_id): New nonterminal.
18556 (template_id): Use it.
18557
18558 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
18559
18560 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
18561 * spew.c (yylex): Don't do_identifier here.
18562 * decl2.c (build_expr_from_tree): Revert last change.
18563
18564 * decl2.c (build_expr_from_tree): Expand the name for a method call.
18565 * parse.y (object_template_id): Don't try to take the DECL_NAME.
18566
18567 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
18568
18569 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
18570 alloc_expr.
18571 * call.c (build_op_delete_call): Adjust.
18572
18573 * except.c (expand_end_catch_block): Lose rethrow region.
18574 (expand_start_catch_block): Likewise.
18575 (expand_end_catch_block): Don't expand_leftover_cleanups.
18576
18577 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18578
18579 * pt.c (tsubst): Remove tree_cons call (places redundant info into
18580 DECL_TEMPLATE_INSTANTIATION).
18581
18582 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
18583
18584 * tree.c (is_overloaded_fn): Handle getting a fn template.
18585 (really_overloaded_fn): Likewise.
18586 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
18587 * pt.c (check_explicit_specialization): Tweak.
18588 (determine_explicit_specialization): Tweak.
18589
18590 * tree.c, cp-tree.h (get_target_expr): New fn.
18591
18592 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
18593
18594 * pt.c (check_explicit_specialization): Fix misspelling in
18595 diagnostic: `preceeded'.
18596 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
18597 `conversiona'.
18598
18599 1997-12-02 Mark Mitchell <mmitchell@usa.net>
18600
18601 * pt.c (determine_explicit_specialization): Avoid an internal
18602 error for bad specializations.
18603
18604 * method.c (build_overload_value): Handle SCOPE_REF.
18605
18606 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
18607
18608 * class.c (prepare_fresh_vtable): Enable even more complex MI
18609 vtable names.
18610
18611 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
18612
18613 * exception.cc (__check_eh_spec): Optimize a bit.
18614
18615 * exception.cc (__cp_pop_exception): Lose handler arg.
18616 * except.c (do_pop_exception): Likewise.
18617 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
18618 (expand_end_catch_block): Likewise.
18619
18620 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
18621
18622 * pt.c (check_explicit_specialization): Complain about using a
18623 template-id for a non-specialization.
18624
18625 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
18626
18627 * repo.c: Prototype rindex only if needed.
18628 * xref.c: Likewise.
18629
18630 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
18631
18632 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
18633
18634 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
18635
18636 * typeck.c (build_const_cast): Handle references here instead of
18637 handing off to convert_to_reference.
18638
18639 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
18640 TerminateFunctionCall.
18641 (init_exception_processing): Likewise. Terminate et al are now
18642 the fns, not ADDR_EXPRs.
18643 (various): Lose redundant assemble_external calls.
18644 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
18645
18646 * cp-tree.h (struct lang_decl_flags): Add comdat.
18647 (DECL_COMDAT): New macro.
18648 * decl.c (duplicate_decls): Propagate it.
18649 (cp_finish_decl): Handle it.
18650 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
18651
18652 * class.c: Remove static pending_hard_virtuals.
18653 (add_virtual_function): Take pointers to pending_virtuals
18654 and pending_hard_virtuals.
18655 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
18656
18657 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
18658
18659 * decl2.c (import_export_vtable): If we support one_only but not
18660 weak symbols, mark instantiated template vtables one_only.
18661 (import_export_decl): Likewise for tinfo functions.
18662 (finish_vtable_vardecl): Also write out vtables from explicitly
18663 instantiated template classes.
18664 * pt.c (mark_class_instantiated): Revert last change.
18665
18666 * except.c (expand_throw): Call mark_used on the destructor.
18667
18668 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
18669
18670 * lex.c (lang_init): Enable flag_exceptions by default if no
18671 command line switch was specified.
18672
18673 1997-11-26 Mark Mitchell <mmitchell@usa.net>
18674
18675 * pt.c (unify): Handle `void' template parameters in
18676 specializations.
18677
18678 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
18679
18680 * rtti.c (build_dynamic_cast): Handle template case here.
18681 (build_dynamic_cast_1): Not here.
18682
18683 * typeck2.c (digest_init): Make copies where appropriate.
18684
18685 * decl2.c (delete_sanity): resolve_offset_ref.
18686
18687 * except.c: Call terminate without caching so many bits.
18688
18689 * except.c (expand_start_catch_block): Fix catching a reference
18690 to pointer.
18691
18692 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
18693
18694 * init.c (build_new): Copy size to the saveable obstack.
18695
18696 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
18697 TRY_CATCH_EXPR for now.
18698
18699 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
18700
18701 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
18702 has DECL_LANG_SPECIFIC.
18703
18704 * exception.cc (struct cp_eh_info): Add handlers field.
18705 (__cp_push_exception): Initialize it.
18706 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
18707 (__throw_bad_exception): Remove.
18708 * except.c (call_eh_info): Add handlers field.
18709 (get_eh_handlers): New fn.
18710 (push_eh_cleanup): Increment handlers.
18711
18712 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
18713
18714 * except.c (expand_start_eh_spec): Use the try/catch code.
18715 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
18716 doing everything inline.
18717 (init_exception_processing): throw_type_match now takes
18718 const void pointers.
18719 * exception.cc (__check_eh_spec): New fn.
18720 * inc/exception: Neither terminate nor unexpected return.
18721 * decl.c: Make const_ptr_type_node public.
18722 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
18723
18724 * except.c (expand_start_catch_block): We only need the rethrow
18725 region for non-sjlj exceptions.
18726 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
18727
18728 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
18729
18730 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
18731 (various.o): Likewise.
18732 * inc/new: Add placement deletes. Add throw specs for default new.
18733 * new.cc (set_new_handler): Move here from libgcc2.
18734 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
18735 (new): Move from libgcc2. Throw bad_alloc.
18736 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
18737 * decl.c (init_decl_processing): Update exception specs on new and
18738 delete.
18739
18740 * method.c (build_decl_overload_real): Don't mess with global
18741 placement delete.
18742
18743 * init.c (build_new): Check for null throw spec, not nothrow_t.
18744
18745 * decl.c (duplicate_decls): Don't complain about different exceptions
18746 from an internal declaration.
18747
18748 * call.c (build_op_delete_call): Fix check for member fns again.
18749
18750 * decl2.c (import_export_decl): Interface hackery affects
18751 virtual synthesized methods.
18752
18753 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
18754
18755 * decl.c (start_decl): Don't just complain about a mismatched
18756 scope, fix it.
18757
18758 * decl.c (make_implicit_typename): Handle case where t is not
18759 actually from context.
18760 * tree.c (get_type_decl): Lose identifier case.
18761 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
18762 * parse.y (nonnested_type): Just use lookup_name.
18763 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
18764
18765 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
18766
18767 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
18768 T was built in C language context (for example, by
18769 output_func_start_profiler).
18770
18771 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
18772
18773 * decl.c (make_implicit_typename): New fn.
18774 (lookup_name_real): Use it. Use current_class_type as the context.
18775
18776 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
18777
18778 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
18779
18780 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
18781
18782 * friend.c (do_friend): Warn about non-template friends in templates.
18783
18784 * call.c (build_op_delete_call): Fix handling of inherited delete.
18785
18786 * search.c (dfs_record_inheritance): Ignore template type parms.
18787
18788 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
18789
18790 * call.c (build_new_op): Fix copy error.
18791 (build_op_new_call): New fn.
18792 (build_op_delete_call): New fn.
18793 * cp-tree.h: Declare them.
18794 * init.c (build_new): Use them. Support placement delete.
18795 (build_x_delete): Use build_op_delete_call.
18796 (build_delete): Likewise.
18797 * decl2.c (delete_sanity): Likewise.
18798 (coerce_delete_type): Don't complain about placement delete.
18799
18800 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
18801
18802 * call.c (build_new_function_call): Remove unused 'obj' parm.
18803 * cp-tree.h, typeck.c: Adjust.
18804
18805 * init.c (build_new): Make the cleanup last longer.
18806 (expand_vec_init): Call do_pending_stack_adjust.
18807
18808 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
18809
18810 * pt.c (do_type_instantiation): Fix typo.
18811 (mark_class_instantiated): If we support one_only but not weak
18812 symbols, don't mark this as known.
18813
18814 * init.c (build_new): Handle vec delete in EH cleanup.
18815
18816 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18817
18818 * call.c (build_method_call): Call complete_type before checking
18819 for destructor.
18820
18821 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
18822
18823 * decl.c (add_block_current_level): Delete.
18824 * init.c (build_vec_delete_1): Delete build_block and
18825 add_block_current_level calls.
18826
18827 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
18828
18829 * init.c (build_new): Handle freeing allocated memory when the
18830 constructor throws.
18831
18832 * call.c (build_new_method_call): Fix flags arg.
18833
18834 * pt.c (do_type_instantiation): Don't try to instantiate
18835 member templates.
18836 (mark_decl_instantiated): If we support one_only but not
18837 weak symbols, mark this one_only.
18838 * decl2.c (import_export_vtable): Don't defer handling of vtables
18839 if MULTIPLE_SYMBOL_SPACES.
18840
18841 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
18842
18843 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
18844
18845 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
18846
18847 * except.c (do_pop_exception): Return a value.
18848
18849 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
18850
18851 * call.c (build_new_method_call): Handle getting a
18852 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
18853 if we got template parms.
18854 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
18855 not just the args.
18856 * decl2.c (build_expr_from_tree): Tweak last change.
18857 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
18858 (maybe_fold_nontype_arg): Split out from tsubst_copy.
18859 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
18860
18861 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
18862
18863 * pt.c (tsubst_copy): Handle explicit template arguments in
18864 function calls.
18865 * typeck.c (build_x_function_call): Likewise.
18866 * decl2.c (build_expr_from_tree): Lookup function name if it
18867 hasn't been done.
18868
18869 * pt.c (tsubst): Instantiate template functions properly when
18870 template parameter does not appear in function arguments and return
18871 type.
18872 (comp_template_args): Handle member templates required by tsubst.
18873
18874 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
18875
18876 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
18877 previous change.
18878
18879 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
18880
18881 * pt.c (coerce_template_parms): Tweak error message.
18882
18883 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
18884 return type defaults to `int', even if there are storage-class
18885 specifiers.
18886
18887 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
18888
18889 Complete nested exception support.
18890 * except.c (do_pop_exception): Split out...
18891 (push_eh_cleanup): From here. Handle the EH region by hand.
18892 (expand_start_catch_block): Add a new level for the catch parm.
18893 Move the rethrow region outside the two cleanup regions.
18894 Protect the initializer for the catch parm with terminate.
18895 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
18896 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
18897 popping off the middle of the stack.
18898 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
18899 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
18900 (build_cplus_new): Only wrap CALL_EXPRs.
18901 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
18902 the constructor call.
18903
18904 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18905
18906 * Make-lang.in (c++.distdir): Make inc subdirectory.
18907
18908 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
18909
18910 * decl2.c (finish_file): Put back some code.
18911
18912 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
18913
18914 * decl2.c (finish_file): Remove redundant code.
18915 * method.c (emit_thunk): Don't let the backend defer generic thunks.
18916
18917 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
18918
18919 * except.c (call_eh_info): Split out...
18920 (push_eh_info): From here.
18921 (expand_builtin_throw): Use it.
18922 (expand_start_catch_block): Move region start back.
18923
18924 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
18925
18926 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
18927 (real_yylex): Record wide strings using target endianness, not host.
18928
18929 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
18930
18931 * repo.c (rindex): Add decl unconditionally.
18932 (get_base_filename, open_repo_file): Don't cast rindex.
18933 * xref.c (rindex): Add decl unconditionally.
18934 (index): Remove unused decl.
18935 (open_xref_file): Don't cast rindex.
18936
18937 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
18938
18939 * class.c (build_vbase_path): Propagate the result type properly.
18940
18941 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
18942
18943 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
18944 remaining use of saved_throw_type with a call to get_eh_type.
18945
18946 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
18947
18948 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
18949 (file_name_nondirectory): New function, doing the same as the macro.
18950 (set_typedecl_interface_info): Use it instead of the macro.
18951 (check_newline): Likewise.
18952 (handle_cp_pragma): Likewise.
18953
18954 * repo.c (get_base_filename): Cast result of rindex to char*.
18955 (open_repo_file): Likewise.
18956 * xref.c (open_xref_file): Likewise.
18957 * error.c (dump_char): Make its arg int, not char.
18958
18959 * except.c (push_eh_info): Pass the number of fields - 1 down, not
18960 the exact number of fields.
18961
18962 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
18963
18964 Support for nested exceptions.
18965 * tinfo2.cc (__is_pointer): New fn.
18966 * exception.cc (struct cp_eh_info): Define.
18967 (__cp_exception_info, __uncatch_exception): New fns.
18968 (__cp_push_exception, __cp_pop_exception): New fns.
18969 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
18970 Lose empty_fndecl.
18971 (init_exception_processing): Likewise. __eh_pc is now external.
18972 (push_eh_info): New fn.
18973 (get_eh_{info,value,type,caught}): New fns.
18974 (push_eh_cleanup): Just call __cp_pop_exception.
18975 (expand_start_catch_block): Use push_eh_info. Start the eh region
18976 sooner.
18977 (expand_end_eh_spec): Use push_eh_info.
18978 (expand_throw): Call __cp_push_exception to set up the exception info.
18979 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
18980 when we rethrow.
18981 (expand_builtin_throw): Don't refer to empty_fndecl.
18982
18983 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
18984
18985 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
18986
18987 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
18988
18989 * method.c (build_template_parm_names, build_decl_overload_real):
18990 Add static to definitions.
18991 * pt.c (add_to_template_args, note_template_header,
18992 processing_explicit_specialization, type_unification_real): Likewise.
18993 ({determine,check}_explicit_specialization): Use a single string for
18994 error messages.
18995
18996 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
18997
18998 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
18999 (expand_end_catch_block): Likewise.
19000 (expand_end_eh_spec): Likewise.
19001
19002 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
19003
19004 * decl.c (duplicate_decls): Handle template specializations
19005 correctly.
19006 * error.c (dump_function_name): Fix printing of specializations of
19007 member functions that are not member templates.
19008 * cp-tree.h (processing_specialization): Make global.
19009 * pt.c (processing_specialization): Likewise.
19010 * lex.c (cons_up_default_function): Save and restore
19011 processing_specialization to avoid confusion.
19012
19013 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
19014
19015 * decl.c (init_decl_processing): Give null_node unknown* type.
19016 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
19017 (common_type): Likewise.
19018 * error.c (args_as_string): Recognize null_node.
19019
19020 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19021
19022 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
19023 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
19024
19025 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
19026
19027 * Make-lang.in (g++): Include prefix.o.
19028
19029 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
19030
19031 * pt.c (determine_explicit_specialization): Initialize "dummy"
19032 to keep Purify quiet.
19033
19034 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
19035
19036 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
19037 (build_overload_int): Not here.
19038
19039 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
19040
19041 * class.c (build_type_pathname): Remove.
19042 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
19043
19044 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
19045
19046 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
19047 &&label GNU extension.
19048
19049 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
19050
19051 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
19052 so as to avoid incorrect manglings.
19053 * method.c (build_decl_overload_real): Don't mangle return types
19054 for constructors.
19055
19056 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
19057
19058 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
19059 scratch_tree_cons): Define as macros for now.
19060 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
19061 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
19062 typeck2.c: Use them and the expression_obstack variants.
19063
19064 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
19065
19066 * decl.c (store_return_init): Allow classes with explicit ctors to
19067 be used with the named return values extension.
19068
19069 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
19070
19071 * pt.c (instantiate_decl): Fix previous change.
19072
19073 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
19074
19075 * pt.c (tsubst): Fix thinko.
19076 (instantiate_decl): Really use the original template.
19077
19078 * call.c (build_new_method_call): Use simple constructor_name for
19079 error messages.
19080
19081 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
19082
19083 * method.c (build_underscore_int): Don't use ANSI specific
19084 features.
19085
19086 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
19087
19088 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
19089 for our key method; it might have been inlined by -O3.
19090
19091 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
19092
19093 * decl.c (make_typename_type): Do not try to call lookup_field for
19094 non-aggregate types.
19095
19096 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
19097
19098 * typeck.c (build_reinterpret_cast): Tweak.
19099
19100 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
19101
19102 * typeck.c (build_reinterpret_cast): Converting a void pointer
19103 to function pointer with a reinterpret_cast produces a warning
19104 if -pedantic is issued.
19105
19106 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
19107
19108 * typeck.c (c_expand_return): Don't warn about returning a
19109 reference-type variable as a reference.
19110
19111 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
19112
19113 * method.c (build_static_name): Fix typo.
19114
19115 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
19116
19117 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
19118 OLDDECL before we try to do DECL_USE_TEMPLATE.
19119
19120 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
19121
19122 * decl.c (duplicate_decls): Don't warn about template instances.
19123
19124 * typeck.c (mark_addressable): Lose ancient code that unsets
19125 DECL_EXTERNAL.
19126
19127 * pt.c (do_decl_instantiation): Lose support for instantiating
19128 non-templates.
19129
19130 * call.c (build_new_function_call): Fix handling of null explicit
19131 template args.
19132 (build_new_method_call): Likewise.
19133
19134 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
19135
19136 * method.c (build_underscore_int): Fix typo.
19137
19138 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
19139
19140 * tree.c (print_lang_statistics): #if 0 call to
19141 print_inline_obstack_statistics until its definition is checked in.
19142
19143 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
19144
19145 * decl2.c (finish_file): Move dump_tree_statistics to end.
19146
19147 * pt.c (instantiate_decl): Look for the original template.
19148 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
19149 of member templates.
19150
19151 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
19152
19153 * Makefile.in (g++FAQ.*): New rules.
19154 (CONFLICTS): Update.
19155 * g++FAQ.texi: Moved from libg++.
19156
19157 * parse.y (PFUNCNAME): Only specify the type once.
19158
19159 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
19160
19161 * lex.c (real_yylex): Clean up the code to fully behave the way
19162 the c-lex.c parser does for complex and real numbers.
19163
19164 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
19165
19166 * method.c (build_decl_overload_real): Reformat.
19167
19168 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
19169
19170 * method.c (synthesize_method): If at_eof, determine our linkage.
19171
19172 1997-09-29 Paul Eggert <eggert@twinsun.com>
19173
19174 * lex.c (real_yylex): Treat `$' just like `_', except issue a
19175 diagnostic if !dollars_in_ident or if pedantic.
19176
19177 * lang-specs.h (@c++): -ansi no longer implies -$.
19178
19179 * decl2.c (lang_decode_option):
19180 -traditional and -ansi now do not mess with
19181 dollars_in_ident.
19182
19183 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
19184
19185 * Makefile.in (parse.o, decl.o): Also depend on
19186 $(srcdir)/../except.h $(srcdir)/../output.h.
19187 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
19188 $(srcdir)/../except.h $(srcdir)/../output.h.
19189 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
19190 ../insn-codes.h.
19191
19192 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
19193
19194 * expr.c (cplus_expand_expr): Make it static.
19195
19196 * decl2.c, init.c, typeck.c: Include "expr.h".
19197 (expand_expr): Use proper values when calling the function.
19198
19199 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
19200
19201 * lang-options.h: New -Wold-style-cast flag.
19202 * cp-tree.h (warn_old_style_cast): New variable.
19203 * decl2.c (warn_old_style_cast): Likewise.
19204 (lang_decode_option): Support -Wold-style-cast.
19205 (reparse_absdcl_as_casts): Produce old-style-cast warning.
19206
19207 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
19208
19209 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
19210 TREE_USED, reset value based on already_used.
19211
19212 * init.c (expand_member_init): Revert change.
19213
19214 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
19215
19216 * cp-tree.h, decl.c, decl2.c, pt.c:
19217 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
19218
19219 * decl2.c (lang_decode_option): Add missing ;.
19220
19221 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
19222
19223 * friend.c (do_friend): Disable injection for all template-derived
19224 decls.
19225 * decl2.c (lang_decode_option): Handle -fguiding-decls.
19226 * parse.y (notype_template_declarator): New nonterminal.
19227 (direct_notype_declarator): Use it.
19228 (complex_direct_notype_declarator): Likewise.
19229 (object_template_id): Accept any kind of identifier after TEMPLATE.
19230 (notype_qualified_id): Don't add template declarators here.
19231
19232 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
19233
19234 * call.c (add_template_candidate): Add explicit_targs parameter.
19235 (build_scoped_method_call): Use it.
19236 (build_overload_call_real): Likewise.
19237 (build_user_type_conversion_1): Likewise.
19238 (build_new_function_call): Likewise.
19239 (build_object_call): Likewise.
19240 (build_new_op): Likewise.
19241 (build_new_method_call): Likewise.
19242 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
19243 (build_new_method_call): Likewise.
19244
19245 * class.c (finish_struct_methods): Add specialization pass to
19246 determine which methods were specializing which other methods.
19247 (instantiate_type): Handle TEMPLATE_ID_EXPR.
19248
19249 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
19250
19251 * cp-tree.h (name_mangling_version): New variable.
19252 (flag_guiding_decls): Likewise.
19253 (build_template_decl_overload): New function.
19254 (begin_specialization): Likewise.
19255 (reset_specialization): Likewise.
19256 (end_specialization): Likewise.
19257 (determine_explicit_specialization): Likewise.
19258 (check_explicit_specialization): Likewise.
19259 (lookup_template_function): Likewise.
19260 (fn_type_unification): Add explicit_targs parameter.
19261 (type_unification): Likewise.
19262
19263 * decl.c (duplicate_decls): Add smarts for explicit
19264 specializations.
19265 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
19266 specializations.
19267 (grokfndecl): Call check_explicit_specialization.
19268
19269 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
19270 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
19271 (check_classfn): Handle specializations.
19272
19273 * error.c (dump_function_name): Print specialization arguments.
19274
19275 * friend.c (do_friend): Don't call pushdecl for template
19276 instantiations.
19277
19278 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
19279
19280 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
19281 and -fno-guiding-decls.
19282
19283 * lex.c (identifier_type): Return PFUNCNAME for template function
19284 names.
19285
19286 * method.c (build_decl_overload_real): New function.
19287 (build_template_parm_names): New function.
19288 (build_overload_identifier): Use it.
19289 (build_underscore_int): New function.
19290 (build_overload_int): Use it. Add levels for template
19291 parameters.
19292 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
19293 (build_overload_nested_names): Handle template type parameters.
19294 (build_template_decl_overload): New function.
19295
19296 * parse.y (YYSTYPE): New ntype member.
19297 (nested_name_specifier): Use it.
19298 (nested_name_specifier_1): Likewise.
19299 (PFUNCNAME): New token.
19300 (template_id, object_template_id): New non-terminals.
19301 (template_parm_list): Note specializations.
19302 (template_def): Likewise.
19303 (structsp): Likewise.
19304 (fn.def2): Handle member template specializations.
19305 (component_decl_1): Likewise.
19306 (direct_notype_declarator): Handle template-ids.
19307 (component_decl_1): Likewise.
19308 (direct_notype_declarator): Handle template-ids.
19309 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
19310
19311 * pt.c (processing_specializations): New variable.
19312 (template_header_count): Likewise.
19313 (type_unification_real): New function.
19314 (processing_explicit_specialization): Likewise.
19315 (note_template_header): Likewise.
19316 (is_member_template): Handle specializations.
19317 (end_template_decl): Call reset_specialization.
19318 (push_template_decl): Handle member template specializations.
19319 (tsubst): Likewise.
19320 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
19321 (instantiate_template): Handle specializations.
19322 (instantiate_decl): Likewise.
19323 (fn_type_unification): Handle explicit_targs.
19324 (type_unification): Likewise. Allow incomplete unification
19325 without an error message, if allow_incomplete.
19326 (get_bindings): Use new calling sequence for fn_type_unification.
19327
19328 * spew.c (yylex): Handle PFUNCNAME.
19329
19330 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
19331 (really_overloaded_fn): Likewise.
19332 (get_first_fn): Handle function templates.
19333
19334 * typeck.c (build_x_function_call): Use really_overloaded_fn.
19335 Handle TEMPLATE_ID_EXPR.
19336 (build_x_unary_op): Likewise.
19337 (build_unary_op): Likewise.
19338 (mark_addressable): Templates whose address is taken are marked
19339 as used.
19340
19341 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
19342
19343 * decl.c (init_decl_processing): Declare __builtin_constant_p as
19344 accepting any kind of type, not only int.
19345
19346 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
19347
19348 * search.c (get_matching_virtual): Notice virtual bases when sorrying
19349 about covariant returns.
19350
19351 * parse.y (member_init): Also imply typename here. Remove ancient
19352 extension for initializing base members.
19353
19354 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
19355
19356 Handle multi-level typenames and implicit typename in base list.
19357 * parse.y (typename_sub{,[0-2]}): New rules.
19358 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
19359 (nonnested_type): New rule.
19360 (complete_type_name): Use it.
19361 (base_class.1): Use typename_sub and nonnested_type.
19362 (nested_name_specifier): Don't elide std:: here.
19363 * decl.c (make_typename_type): Handle getting a type for NAME.
19364 (lookup_name_real): Turn std:: into :: here.
19365
19366 Rvalue conversions were removed in London.
19367 * call.c (is_subseq): Don't consider lvalue transformations.
19368 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
19369 (joust): Re-enable ?: kludge.
19370
19371 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
19372
19373 * decl.c (start_function): Up warning of no return type to be a
19374 pedwarn.
19375
19376 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
19377
19378 * init.c (expand_member_init): Don't set TREE_USED.
19379 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
19380 set,don't clear TREE_USED wholesale.
19381
19382 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
19383
19384 * call.c (build_over_call): Do require_complete_type before
19385 build_cplus_new.
19386
19387 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
19388
19389 * search.c (lookup_field): Call complete_type in all cases.
19390
19391 * decl.c (finish_function): Just warn about flowing off the end.
19392
19393 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
19394
19395 * decl.c (grokparms): Don't bash a permanent list node if we're
19396 in a function.
19397
19398 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
19399
19400 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
19401
19402 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
19403
19404 * call.c (build_new_op): Give better error for syntactically
19405 correct, but semantically invalid, use of undeclared template.
19406
19407 * call.c (compare_qual): Handle pmfs.
19408
19409 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
19410 after the exception spec.
19411
19412 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
19413
19414 * call.c (null_ptr_cst_p): Integer type, not integral type.
19415
19416 * call.c (joust): Disable warnings until they can be moved to the
19417 right place.
19418
19419 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
19420
19421 * Makefile.in, config-lang.in: Convert to autoconf.
19422
19423 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
19424
19425 * decl.c (lookup_name_real): Add implicit 'typename' to types from
19426 base classes.
19427
19428 * pt.c (most_specialized_class): Fix typo.
19429 (tsubst): Move constant folding to TREE_VEC case.
19430
19431 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
19432
19433 * pt.c (do_poplevel): Don't warn about unused local variables
19434 while processing_template_decl since we don't always know whether
19435 or not they will need constructing/destructing.
19436
19437 * pt.c (uses_template_parms): Check the values of an enumeration
19438 type to make sure they don't depend on template parms.
19439
19440 * decl.c (make_typename_type): Don't lookup the field if the
19441 context uses template parms, even if we're not
19442 processing_template_decl at the moment.
19443
19444 * pt.c (coerce_template_parms): Avoid looking at the
19445 TYPE_LANG_DECL portion of a typename type, since there won't be
19446 one.
19447 (tsubst): Do constant folding as necessary to make sure that
19448 arguments passed to lookup_template_class really are constants.
19449
19450 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
19451
19452 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
19453 * decl2.c (finish_file): Only register exception tables if we
19454 need to.
19455
19456 * decl.c (init_decl_processing): Add __builtin_[fs]p.
19457
19458 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
19459
19460 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
19461
19462 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
19463
19464 * error.c (dump_decl): Avoid crashing when presented with a
19465 uninitialized constant, as can occur with a template parameter.
19466 (dump_expr): Make sure that there are enough levels of
19467 current_template_parms before we start diving through them.
19468
19469 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
19470
19471 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
19472 c-typeck.c.
19473
19474 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
19475
19476 * except.c (expand_throw): Call build_delete for all
19477 exception types, not just objects with destructors.
19478
19479 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
19480
19481 * decl.c (current_local_enum): Remove static.
19482 * pt.c (tsubst_enum): Save and restore value of current_local_enum
19483 in case template is expanded in enum decl.
19484 (instantiate_class_template): Use new tsubst_enum signature.
19485 (tsubst_expr): Likewise.
19486
19487 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
19488
19489 * pt.c (begin_member_template_processing): Take a function as
19490 argument, not a set of template arguments. Use the template
19491 parameters, rather than the arguments. Handle non-type parameters
19492 correctly. Push a binding level for the parameters so that multiple
19493 member templates using the same parameter names can be declared.
19494 (end_member_template_processing): Pop the binding level.
19495 (push_template_decl): Mark member templates as static when
19496 appropriate.
19497
19498 * lex.c (do_pending_inlines): Pass the function, not its template
19499 arguments, to begin_member_template_processing.
19500 (process_next_inline): Likewise.
19501 (do_pending_defargs): Likewise.
19502
19503 * error.c (dump_expr): Obtain the correct declaration for a
19504 TEMPLATE_CONST_PARM.
19505
19506 * call.c (add_template_conv_candidate): New function.
19507 (build_object_call): Handle member templates, as done in the other
19508 build_ functions.
19509
19510 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
19511
19512 * decl.c (replace_defag): Undo previous change.
19513 * lex.c (do_pending_defargs): Deal with member templates.
19514
19515 * pt.c (is_member_template): Avoid crashing when passed a
19516 non-function argument.
19517
19518 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
19519
19520 * class.c (grow_method): Remove check for redeclaration.
19521
19522 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
19523
19524 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
19525 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
19526 (PRIMARY_TEMPLATE_P): Use it.
19527 * call.c (build_overload_call_real): Use it.
19528 * class.c (instantiate_type): Likewise.
19529 * decl.c (decls_match): Likewise.
19530 * method.c (build_overload_identifier): Likewise.
19531 * pt.c (push_template_decl): Likewise.
19532 (classtype_mangled_name): Likewise.
19533 (lookup_template_class): Likewise.
19534
19535 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
19536 DECL_NTPARMS to conform to usage elsewhere.
19537 * call.c (add_template_candidate): Likewise.
19538 * class.c (instantiate_type): Likewise.
19539 * pt.c (instantiate_template): Likewise.
19540 (get_bindings): Likewise.
19541
19542 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
19543 is_member_template.
19544
19545 * pt.c (unify): Undo changes to allow multiple levels of template
19546 parameters.
19547 (type_unification): Likewise.
19548 (fn_type_unification): Likewise.
19549 (get_class_bindings): Likewise.
19550 * cp-tree.h (Likewise).
19551
19552 * decl.c (replace_defarg): Check that the type of the default
19553 parameter does not invlove a template type before complaining
19554 about the initialization.
19555
19556 * error.c (dump_expr): Deal with template constant parameters in
19557 member templates correctly.
19558
19559 * pt.c (is_member_template): Deal with class specializations
19560 correctly.
19561 (tsubst): Handle "partial instantiation" of member templates
19562 correctly.
19563
19564 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
19565
19566 * pt.c (type_unification): Change calling sequence to allow for
19567 multiple levels of template parameters.
19568 (tsubst_expr): Likewise.
19569 (tsubst): Likewise.
19570 (tsubst_copy): Likewise.
19571 (instantiate_template): Likewise.
19572 (unify): Likewise.
19573 * call.c (build_overload_call_real): Use it.
19574 (add_builtin_candidate): Use it.
19575 (build_new_method_call): Use it.
19576 * class.c (instantiate_type): Use it.
19577 * decl.c (grokdeclarator): Use it.
19578 * decl2.c (finish_file): Use it.
19579 * method.c (build_overload_identifier): Use it.
19580
19581 * call.c (add_template_candidate): Add additional parameter for
19582 the function return type. Call fn_type_unification istead of
19583 type_unification.
19584 (build_user_type_conversion_1): Handle member templates.
19585 (build_new_function_call): Likewise.
19586 (build_new_op): Likewise.
19587 (build_new_method_call): Likewise.
19588
19589 * class.c (grow_method): Don't give an error message indicating
19590 that two member templates with the same name are ambiguous.
19591 (finish_struct): Treat member template functions just like member
19592 functions.
19593
19594 * cp-tree.h (check_member_template): Add declaration.
19595 (begin_member_template_processing): Likewise.
19596 (end_member_template_processing): Likewise.
19597 (fn_type_unification): Likewise.
19598 (is_member_template): Likewise.
19599 (tsubst): Change prototype.
19600 (tsubst_expr): Likewise.
19601 (tsubst_copy): Likewise.
19602 (instantiate_template): Likewise.
19603 (get_bindings): Likewise.
19604
19605 * decl.c (decls_match): Handle multiple levels of template
19606 parameters.
19607 (pushdecl): Handle template type params just like other type
19608 declarations.
19609 (push_class_level_binding): Return immediately if the
19610 class_binding_level is NULL.
19611 (grokfndecl): If check_classfn() returns a member_template, use
19612 the result of the template, not the template itself.
19613
19614 * decl2.c (check_member_template): New function. Check to see
19615 that the entity declared to be a member template can be one.
19616 (check_classfn): Allow redeclaration of member template functions
19617 with different types; the new functions can be specializations or
19618 explicit instantiations.
19619
19620 * error.c (dump_decl): Handle multiple levels of template
19621 parameters.
19622 (dump_function_decl): Update to handle function templates.
19623
19624 * lex.c (do_pending_inlines): Set up template parameter context
19625 for member templates.
19626 (process_next_inline): Likewise.
19627
19628 * method.c (build_overload_identifier): Adjust for multiple levels
19629 of template parameters.
19630
19631 * parse.y (fn.def2): Add member templates.
19632 (component_decl_1): Likewise.
19633
19634 * pt.c (begin_member_template_processing): New function.
19635 (end_member_template_processing): Likewise.
19636 (is_member_template): Likewise.
19637 (fn_type_unification): Likewise.
19638 (current_template_parms): Return a vector of all the template
19639 parms, not just the innermost level of parms.
19640 (push_template_decl): Deal with the possibility of member
19641 templates.
19642 (lookup_template_class): Likewise.
19643 (uses_template_parms): Likewise.
19644 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
19645 TEMPLATE_CONST_PARM to deal with multiple levels of template
19646 arguments. Add processing of TEMPLATE_DECL to produce new
19647 TEMPLATE_DECLs from old ones.
19648 (do_decl_instantiation): Handle member templates.
19649
19650 * search.c (lookup_fnfields_1): Handle member template conversion
19651 operators.
19652
19653 * tree.c (cp_tree_equal): Check the levels, as well as the
19654 indices, of TEMPLATE_CONST_PARMs.
19655
19656 * typeck.c (comptypes): Check the levels, as well as the indices,
19657 fo TEMPLATE_TYPE_PARMs.
19658 (build_x_function_call): Treat member templates like member
19659 functions.
19660
19661 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
19662
19663 * typeck.c (c_expand_return): Always convert_for_initialization
19664 before checking for returning a pointer to local.
19665
19666 * pt.c (type_unification): If strict and the function parm doesn't
19667 use template parms, just compare types.
19668
19669 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
19670
19671 * method.c (build_overloaded_value): Replace direct call
19672 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
19673
19674 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
19675
19676 * typeck.c (convert_arguments): Don't arbitrarily choose the first
19677 of a set of overloaded functions.
19678
19679 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
19680
19681 * lex.c (real_yylex): Don't elide __FUNCTION__.
19682
19683 * method.c (build_overload_value): Add in_template parm.
19684 (build_overload_int): Likewise.
19685 (build_overload_identifier): Pass it.
19686
19687 * decl.c (duplicate_decls): Don't bash a previous template
19688 definition with a redeclaration.
19689
19690 * pt.c (unify): float doesn't match double.
19691
19692 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
19693 TYPE_DECL. Handle getting non-template types.
19694 * parse.y (explicit_instantiation): Use typespec instead of
19695 aggr template_type.
19696
19697 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
19698
19699 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
19700
19701 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
19702
19703 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
19704 (compare_ics): Likewise.
19705
19706 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
19707
19708 * call.c (joust): Warn about choosing one conversion op over
19709 another because of 'this' argument when the other return type is
19710 better.
19711 (source_type): New fn.
19712
19713 * call.c (build_new_op): Strip leading REF_BIND from first operand
19714 to builtin operator.
19715
19716 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
19717 use its RTL.
19718
19719 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
19720
19721 * call.c (null_ptr_cst_p): Remove support for (void*)0.
19722
19723 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
19724
19725 * typeck.c (expand_target_expr): Make definition match declaration.
19726
19727 * class.c (get_basefndecls): Make definition match declaration.
19728
19729 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
19730
19731 * input.c (sub_getch): Eventually give up and release the input file.
19732
19733 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
19734 right place.
19735
19736 * call.c (joust): Tweak message.
19737
19738 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
19739
19740 * error.c (type_as_string): Put const/volatile on template type
19741 parameters where appropriate.
19742
19743 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
19744
19745 * call.c (strictly_better): Make arguments unsigned ints.
19746
19747 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
19748
19749 * lex.c (real_yylex): Refer to __complex instead of complex.
19750
19751 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
19752
19753 * lex.c (real_yylex): Don't use getc directly.
19754
19755 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
19756
19757 * call.c (is_subseq): Don't try to be clever.
19758
19759 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
19760
19761 * parse.y, pt.c: Include "except.h".
19762 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
19763 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
19764 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
19765 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
19766 prototyping.
19767
19768 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
19769
19770 * decl2.c (mark_vtable_entries): Instead of replacing pure
19771 virtuals with a reference to __pure_virtual, copy the decl and
19772 change the RTL.
19773
19774 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
19775
19776 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
19777
19778 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
19779
19780 * pt.c (instantiate_class_template): Call repo_template_used
19781 before finish_prevtable_vardecl.
19782
19783 * call.c (is_subseq): New fn.
19784 (compare_ics): Use it.
19785
19786 * repo.c (finish_repo): Don't crash on no args.
19787
19788 * parse.y (named_complex_class_head_sans_basetype): Handle
19789 explicit global scope.
19790 * decl2.c (handle_class_head): New fn.
19791
19792 * pt.c (unify): Add CONST_DECL case.
19793
19794 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19795
19796 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
19797
19798 * cp-tree.h (report_type_mismatch): Add prototype.
19799 * call.c (build_overload_call_real): Remove erroneous fourth
19800 argument to report_type_mismatch.
19801 (build_user_type_conversion_1): Remove erroneous second arg to
19802 tourney.
19803 (build_new_function_call): Likewise.
19804 (build_object_call): Likewise.
19805 (build_new_op): Likewise.
19806 (build_new_method_call): Likewise.
19807
19808 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
19809
19810 * error.c (dump_decl): Don't bother processing a function with no
19811 DECL_LANG_SPECIFIC.
19812
19813 * method.c (emit_thunk): Call init_function_start in the macro case.
19814
19815 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
19816
19817 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
19818 defined and used to set flag_vtable_thunks.
19819
19820 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
19821
19822 * parse.y: Don't clear the inlines from their obstack until they've
19823 all been processed.
19824
19825 * decl.c (duplicate_decls): Don't complain about exception
19826 specification mismatch if flag_exceptions is off.
19827
19828 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
19829
19830 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
19831
19832 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
19833
19834 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
19835 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
19836 Include <stdio.h> before include files that formerly used STDIO_PROTO.
19837
19838 * decl.c, g++spec.c, lex.c, method.c, repo.c:
19839 Include "config.h" first, as per autoconf manual.
19840
19841 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
19842
19843 * decl.c (duplicate_decls): Tweak wording.
19844 * lex.c (do_pending_defargs): Don't die if we see a default arg
19845 that isn't a DEFAULT_ARG.
19846 * error.c (dump_expr): Handle DEFAULT_ARG.
19847
19848 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
19849 * lang-options.h: Add -fhandle-exceptions.
19850
19851 * class.c (build_vtable): Vtables are artificial.
19852 (prepare_fresh_vtable): Likewise.
19853
19854 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
19855
19856 * cvt.c (ocp_convert): After converting to the target type, set
19857 LOOKUP_NO_CONVERSION.
19858
19859 * call.c (joust): Warn about potentially confusing promotion rules
19860 with -Wsign-promo.
19861 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
19862
19863 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
19864
19865 * exception.cc: Declare __terminate_func with noreturn attribute.
19866
19867 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
19868
19869 * parse.y: Break out eat_saved_input, handle errors.
19870 (function_try_block): Use compstmt instead of compstmt_or_error.
19871
19872 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
19873
19874 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
19875
19876 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
19877
19878 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
19879 existence of cc1plus check whether $(LANGUAGES) contains C++.
19880
19881 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
19882
19883 * method.c (do_build_copy_constructor): When copying an anonymous
19884 union member loop around to handle nested anonymous unions. Use
19885 the offset of the member relative to the outer structure, not the
19886 union.
19887
19888 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
19889
19890 * call.c (resolve_args): New fn.
19891 (build_new_function_call): Use it.
19892 (build_object_call): Likewise.
19893 (build_new_method_call): Likewise.
19894
19895 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
19896
19897 * call.c (build_over_call): tsubst all default parms from templates.
19898
19899 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
19900
19901 * decl.c (struct cp_function): Add static_labelno.
19902 (push_cp_function_context): Save it.
19903 (pop_cp_function_context): Restore it.
19904
19905 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
19906
19907 * typeck.c (build_component_ref_1): Convert from reference.
19908
19909 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19910
19911 * parse.y (current_declspecs, prefix_attributes): Initialize to
19912 NULL_TREE.
19913
19914 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
19915 before we try to force it to be a TREE_LIST.
19916 (decl): Make sure $1.t is non-nil.
19917
19918 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
19919
19920 * pt.c (uses_template_parms): Handle template first-parse codes.
19921
19922 * decl.c (cp_finish_decl): Only warn about user-defined statics.
19923
19924 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
19925
19926 * pt.c (unify): Handle BOOLEAN_TYPE.
19927
19928 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
19929 * pt.c (tsubst): Don't set it.
19930 * call.c (build_over_call): Use uses_template_parms.
19931
19932 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
19933
19934 * method.c (build_overload_nested_name): Use static_labelno
19935 instead of var_labelno.
19936 (build_qualified_name): New fn.
19937 (build_overload_name): Split out from here.
19938 (build_static_name): Use build_qualified_name.
19939 * decl.c (cp_finish_decl): Statics in extern inline functions
19940 have comdat linkage.
19941 (start_function): Initialize static_labelno.
19942
19943 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
19944
19945 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
19946 before "all member functions in class [] are private".
19947
19948 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
19949
19950 * lex.c (do_scoped_id): convert_from_reference.
19951 * init.c (build_offset_ref): Likewise.
19952
19953 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
19954
19955 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
19956
19957 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
19958
19959 * typeck.c (get_member_function_from_ptrfunc): Promote index
19960 before saving it.
19961
19962 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
19963
19964 * tree.c (layout_basetypes): Move non-virtual destructor warning.
19965 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
19966
19967 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
19968
19969 * decl.c (grokdeclarator): Call add_defarg_fn for the function
19970 type, too.
19971 * lex.c (add_defarg_fn): Adjust.
19972 (do_pending_defargs): Adjust. Don't skip the first parm.
19973
19974 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
19975
19976 * decl.c (build_enumerator): Global enumerators are also readonly.
19977
19978 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
19979 (build_dynamic_cast): Call it and convert_from_reference.
19980
19981 * lex.c (add_defarg_fn): New fn.
19982 (snarf_defarg): Don't add to defarg_types.
19983 (do_pending_defargs): Lose defarg_types. All fns we process now
19984 have defargs.
19985 * decl.c (grokfndecl): Call add_defarg_fn.
19986
19987 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
19988 * cp-tree.def: Add DEFAULT_ARG.
19989 * spew.c (yylex): Call snarf_defarg as appropriate.
19990 * parse.y: New tokens DEFARG and DEFARG_MARKER.
19991 (defarg_again, pending_defargs, defarg, defarg1): New rules.
19992 (structsp): Use pending_defargs.
19993 (parms, full_parm): Use defarg.
19994 * lex.c (init_lex): Initialize inline_text_firstobj.
19995 (do_pending_inlines): Never pass the obstack to feed_input.
19996 (process_next_inline): Call end_input instead of restore_pending_input.
19997 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
19998 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
19999 * input.c (end_input): New fn.
20000 (sub_getch): At the end of some fed input, just keep returning EOF
20001 until someone calls end_input.
20002 Remove 'obstack' field from struct input_source.
20003 * decl.c (grokparms): Handle DEFAULT_ARG.
20004 (replace_defarg): New fn.
20005 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
20006
20007 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
20008
20009 * call.c (implicit_conversion): If nothing else works, try binding
20010 an rvalue to a reference.
20011
20012 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
20013
20014 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
20015 ifndef for Cygwin32 to include SIGSEGV.
20016
20017 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
20018
20019 * class.c (finish_struct_1): Only complain about pointers without
20020 copy stuff if there are any constructors.
20021
20022 * rtti.c (build_dynamic_cast): Call complete_type on the types.
20023
20024 * decl.c (grokfndecl): If the function we chose doesn't actually
20025 match, die.
20026
20027 * decl2.c (grokclassfn): Don't specify 'const int' for the
20028 artificial destructor parm.
20029
20030 * pt.c (type_unification): If we are called recursively, nothing
20031 decays.
20032
20033 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
20034
20035 * decl.c (init_decl_processing): Stop trying to catch signals
20036 other than SIGABRT since the Cygwin32 library doesn't support
20037 them correctly yet. This fixes a situation in which g++ causes
20038 a hang on SIGSEGVs and other such signals in our Win32-hosted
20039 tools.
20040
20041 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
20042
20043 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
20044
20045 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
20046
20047 * typeck2.c (store_init_value): Always return the value if our
20048 type needs constructing.
20049
20050 * method.c (hack_identifier): Convert class statics from
20051 reference, too.
20052
20053 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
20054
20055 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
20056
20057 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
20058
20059 * typeck.c (c_expand_return): Make sure we clean up temporaries at
20060 the end of return x;
20061
20062 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20063
20064 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
20065
20066 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
20067
20068 * except.c (expand_builtin_throw): Add support
20069 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
20070
20071 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
20072
20073 * repo.c (extract_string): Null-terminate.
20074
20075 * cp-tree.h (TI_SPEC_INFO): New macro.
20076 (CLASSTYPE_TI_SPEC_INFO): New macro.
20077 * pt.c (push_template_decl): Correctly determine # of template parms
20078 for partial specs.
20079
20080 * call.c (compare_ics): Really fix 'this' conversions.
20081
20082 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
20083 non-template fn.
20084
20085 * pt.c (push_template_decl): Complain about mismatch in # of
20086 template parms between a class template and a member template.
20087
20088 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
20089
20090 * method.c (synthesize_method): You can't call
20091 function_cannot_inline_p after finish_function.
20092 * decl.c (finish_function): Turn on flag_inline_functions and turn
20093 off DECL_INLINE before handing a synthesized method to the
20094 backend.
20095
20096 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
20097
20098 * method.c (synthesize_method): Remove July 30 change to never set
20099 DECL_INLINE if at_eof.
20100
20101 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
20102
20103 * xref.c (GNU_xref_member): Ensure that the node has a
20104 decl_lang_specific part before checking DECL_FRIEND_P.
20105
20106 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
20107
20108 * pt.c (instantiate_class_template): Diagnose non-class types used
20109 as bases.
20110
20111 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
20112
20113 * typeck.c (build_conditional_expr): Use convert_for_initialization
20114 instead of convert_and_check.
20115
20116 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20117
20118 * parse.y (typespec): Don't pedwarn for typeof.
20119
20120 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
20121
20122 * repo.c (finish_repo): Only check changes if we would write a
20123 repo file.
20124
20125 * call.c (compare_ics): Fix handling of 'this' conversions.
20126
20127 * pt.c (do_decl_instantiation): Support static data too. Rename
20128 from do_function_instantiation.
20129 * cp-tree.h: Adjust.
20130 * parse.y: Adjust.
20131
20132 * repo.c (extract_string): New fn.
20133 (get_base_filename): Use it.
20134 (init_repo): Compare old args with current args.
20135
20136 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
20137
20138 * Makefile.in, Make-lang.in: Protect C-ls with a comment
20139 character, idea from Paul Eggert <eggert@twinsun.com>.
20140
20141 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
20142
20143 * typeck.c (c_expand_return): Be more persistent in looking for
20144 returned temps.
20145
20146 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
20147 pointer to reference.
20148
20149 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
20150
20151 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
20152
20153 * init.c (build_member_call, build_offset_ref):
20154 Use do_scoped_id instead of do_identifier.
20155
20156 * cvt.c (convert): Remove bogosity.
20157
20158 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20159
20160 * cvt.c (build_up_reference): Do checks of ARGTYPE and
20161 TARGET_TYPE before trying to use get_binfo.
20162
20163 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
20164
20165 * cvt.c (build_up_reference): Call get_binfo to get access control.
20166
20167 * decl2.c (import_export_decl): If we don't support weaks, leave
20168 statics undefined.
20169
20170 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
20171
20172 * except.c (expand_builtin_throw): Add support for machines that
20173 cannot access globals after throw's epilogue when
20174 -fno-sjlj-exceptions is used.
20175
20176 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
20177
20178 * parse.y: 'std::' becomes '::'.
20179 * lex.c (real_yylex): Remove 'namespace' warning.
20180 * init.c (build_member_call): Ignore 'std::'.
20181 (build_offset_ref): Likewise.
20182 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
20183 (do_toplevel_using_decl): Ignore 'using std::whatever'.
20184 * decl.c (push_namespace): Just sorry.
20185 (pop_namespace): Nop.
20186 (init_decl_processing): Declare std namespace.
20187
20188 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
20189
20190 * search.c (push_class_decls): A name which ambiguously refers to
20191 several instantiations of the same template just refers to the
20192 template.
20193
20194 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
20195
20196 * decl.c (build_enumerator): Fix problem with unsigned long
20197 enumerated values being smashed to ints, causing overflow
20198 when computing next enumerated value (for enum values around
20199 MAX_VAL).
20200
20201 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
20202
20203 * typeck.c (build_component_ref): Only call mark_used on a decl.
20204
20205 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20206
20207 * typeck.c (build_c_cast): Make the check for a ptr to function
20208 more specific before possible default_conversion call.
20209
20210 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
20211
20212 * except.c (expand_exception_blocks): Simplify and fix and make
20213 sure we don't end a region in a sequence, as expand_end_bindings
20214 doesn't like it.
20215
20216 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
20217
20218 * except.c (init_exception_processing): Mark terminate as not
20219 returning so that the optimizer can optimize better.
20220
20221 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
20222
20223 * cvt.c (convert): Don't do any extra work, if we can avoid it
20224 easily.
20225
20226 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
20227
20228 * *.[chy]: Change cp_convert to ocp_convert, change convert to
20229 cp_convert. convert is now reserved for the backend, and doesn't
20230 have the semantics a frontend person should ever want.
20231
20232 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
20233
20234 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
20235 Lose -traditional support.
20236
20237 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
20238
20239 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
20240
20241 * parse.y (self_reference): Do it for templates, too.
20242 * class.c (pushclass): Don't overload_template_name; the alias
20243 generated by build_self_reference serves the same purpose.
20244
20245 * tree.c (list_hash): Make static, take more args.
20246 (list_hash_lookup): Likewise.
20247 (list_hash_add): Make static.
20248 (list_hash_canon): Lose.
20249 (hash_tree_cons): Only build a new node if one isn't already in the
20250 hashtable.
20251 (hash_tree_chain): Use hash_tree_cons.
20252 * cp-tree.h: Adjust.
20253 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
20254 of calling lookup_name.
20255
20256 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
20257
20258 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
20259 doesn't refer to the CONST_DECLs.
20260
20261 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
20262
20263 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
20264 is bigger.
20265 (expand_class_desc): Convert the last argument to a sizetype.
20266
20267 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20268
20269 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
20270 __real__): Add reswords.
20271 * hash.h: Regenerate.
20272 * lex.h (rid): Add RID_COMPLEX.
20273 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
20274 * lex.c (init_lex): Add building of RID_COMPLEX.
20275 (real_yylex): General cleanup in line with what c-lex.c also has,
20276 sans the cruft for traditional; add handling of SPEC_IMAG, complex
20277 types, and imaginary numeric constants.
20278 * parse.y (REALPART, IMAGPART): Add tokens.
20279 (unary_expr): Add REALPART and IMAGPART rules.
20280 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
20281 * decl.c (complex_{integer,float,double,long}_type_node): Define
20282 types.
20283 (init_decl_processing): Set up the types.
20284 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
20285 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
20286 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
20287 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
20288 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
20289 COMPLEX_TYPE case.
20290 * method.c (build_overload_name): Add handling of the different
20291 COMPLEX_TYPEs, prefixing them with `J'.
20292 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
20293 as a template parm.
20294 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
20295 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
20296 (mapcar): Handle COMPLEX_CST.
20297 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
20298 (common_type): Add code for complex types.
20299 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
20300 (convert_for_assignment): Likewise.
20301 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
20302
20303 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
20304
20305 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
20306 tsubst_expr, as it might try to do overload resolution.
20307
20308 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
20309
20310 * pt.c (instantiate_class_template): Oops.
20311
20312 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
20313
20314 * cp-tree.def: Add TAG_DEFN.
20315 * pt.c (tsubst_enum): New fn.
20316 (instantiate_class_template): Use it.
20317 (tsubst_expr): Support TAG_DEFN.
20318 (tsubst): Support local enums.
20319 (tsubst_copy): Likewise.
20320 * decl.c (finish_enum): Likewise.
20321 (start_enum): If this is a local enum, switch to permanent_obstack.
20322
20323 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
20324
20325 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
20326 (finish_function): Put the base init code for constructors just
20327 after the parm cleanup insns.
20328 (struct cp_function): Add last_parm_cleanup_insn.
20329 (push_cp_function_context): Likewise.
20330 (pop_cp_function_context): Likewise.
20331
20332 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
20333
20334 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
20335
20336 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20337
20338 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
20339 for THUNK_FNDECL before we switch to temporary allocation.
20340
20341 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
20342
20343 * call.c (build_new_op): Handle null arg2 for ?:.
20344
20345 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
20346
20347 * except.c (expand_exception_blocks): Ensure that we flow through
20348 the end of the exception region for the exception specification.
20349 Move exception region for the exception specification in, so that
20350 it doesn't protect the parm cleanup. Remove some obsolete code.
20351 * decl.c (store_parm_decls): Likewise.
20352 (finish_function): Likewise.
20353
20354 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
20355
20356 * init.c (build_new): Fix nothrow handling.
20357
20358 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20359
20360 * init.c (emit_base_init): Don't warn about the initialization
20361 list for an artificial member.
20362
20363 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20364
20365 * expr.c (do_case): Handle !START case for the error msg.
20366
20367 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
20368
20369 * decl2.c, lang-options.h: New option -Weffc++.
20370 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
20371 to -Weffc++.
20372
20373 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
20374 to MULTIPLE_SYMBOL_SPACES.
20375
20376 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
20377
20378 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
20379
20380 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
20381
20382 * typeck.c (c_expand_return): Don't complain about returning void
20383 to void in an artificial function.
20384 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
20385 don't set DECL_RESULT, set DECL_ARTIFICIAL.
20386 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
20387
20388 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
20389
20390 * init.c (init_decl_processing): Add support for setjmp/longjmp based
20391 exception handling.
20392 * except.c (init_exception_processing): Likewise.
20393 (expand_end_catch_block): Likewise.
20394 (expand_exception_blocks): Likewise.
20395 (expand_throw): Likewise.
20396 * exception.cc (__default_terminate): Likewise.
20397
20398 * init.c (perform_member_init): Use new method of expr level
20399 cleanups, instead of cleanups_this_call and friends.
20400 (emit_base_init): Likewise.
20401 (expand_aggr_vbase_init_1): Likewise.
20402 (expand_vec_init): Likewise.
20403 * decl.c (cp_finish_decl): Likewise.
20404 (expand_static_init): Likewise.
20405 (store_parm_decls): Likewise.
20406 (cplus_expand_expr_stmt): Likewise.
20407 * decl2.c (finish_file): Likewise.
20408
20409 * Make-lang.in (exception.o): Ok to compile with -O now.
20410
20411 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
20412 we know it will be done later by the backend.
20413
20414 * decl2.c (lang_f_options): Remove support for short temps.
20415 * lang-options.h: Likewise.
20416
20417 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
20418
20419 * tree.c (varargs_function_p): New fn.
20420 * method.c (emit_thunk): Replace broken generic code with code to
20421 generate a heavyweight thunk function.
20422
20423 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
20424
20425 * pt.c (process_template_parm): pedwarn about floating-point parms.
20426
20427 * decl.c (grokdeclarator): inline no longer implies static.
20428
20429 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
20430
20431 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
20432
20433 * class.c (check_for_override): The signature of an overriding
20434 function is not changed.
20435
20436 * call.c (build_over_call): Move setting of conv into the loop.
20437 Note: this change, along with the related changes of the 18th thru
20438 the 20th of April, fix an infinite loop problem in conversions.
20439
20440 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
20441
20442 * call.c (build_user_type_conversion_1): Really ignore rvalue
20443 conversions when looking for a REFERENCE_TYPE.
20444
20445 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
20446 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
20447 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
20448 (build_unary_op): Likewise.
20449 * call.c (build_over_call): See through a CONVERT_EXPR around the
20450 ADDR_EXPR for on a temporary.
20451 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
20452 the ADDR_EXPR for a local variable.
20453
20454 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
20455
20456 * call.c (build_user_type_conversion_1): If we're trying to
20457 convert to a REFERENCE_TYPE, only consider lvalue conversions.
20458 (build_new_function_call): Print candidates.
20459 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
20460 (reference_binding): Binding a temporary of a reference-related type
20461 is BAD.
20462
20463 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20464
20465 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
20466 * tinfo2.cc (type_info::before): Likewise.
20467
20468 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
20469
20470 * call.c (implicit_conversion): Oops.
20471
20472 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
20473
20474 * call.c (implicit_conversion): Try to find a reference conversion
20475 before binding a const reference to a temporary.
20476
20477 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
20478
20479 * exception.cc (__default_unexpected): Call terminate by default,
20480 so that if the user overrides terminate, the correct function will
20481 be called.
20482
20483 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
20484
20485 * parse.y (left_curly): Avoid trying to use any fields of
20486 error_mark_node, as there aren't any.
20487
20488 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
20489
20490 * lex.c (do_identifier): Avoid breaking on overloaded methods
20491 as default arguments.
20492
20493 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
20494
20495 * call.c (add_template_candidate): Initialize the variable "dummy".
20496
20497 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
20498
20499 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
20500 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
20501
20502 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20503
20504 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
20505 (debug_binfo): Delete decl, not needed.
20506
20507 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
20508 promotes_to_aggr_type): Delete fns.
20509 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
20510 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
20511 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
20512
20513 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
20514
20515 * friend.c (is_friend_type): Delete fn.
20516 * cp-tree.h (is_friend_type): Delete decl.
20517
20518 * decl.c (original_result_rtx, double_ftype_double,
20519 double_ftype_double_double, int_ftype_int, long_ftype_long,
20520 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
20521 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
20522
20523 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
20524 fwd decls.
20525 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
20526
20527 * decl.c (pushdecl_nonclass_level): #if 0, unused.
20528 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
20529
20530 * lex.c (reinit_lang_specific): #if 0, unused.
20531 * cp-tree.h (reinit_lang_specific): #if 0 decl.
20532
20533 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
20534 * cp-tree.h (revert_static_member_fn): Delete decl.
20535
20536 * class.c (root_lang_context_p): Delete fn.
20537 * cp-tree.h (root_lang_context_p): Delete decl.
20538
20539 * decl.c (set_current_level_tags_transparency): #if 0, unused.
20540 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
20541
20542 * lex.c (set_vardecl_interface_info): Make static.
20543 * cp-tree.h (set_vardecl_interface_info): Delete decl.
20544
20545 * call.c (find_scoped_type): Make static.
20546 * cp-tree.h (find_scoped_type): Delete decl.
20547
20548 * search.c (convert_pointer_to_vbase): Make static.
20549 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
20550
20551 * decl.c (const_ptr_type_node): Likewise.
20552 * cp-tree.h (const_ptr_type_node): Delete decl.
20553
20554 * typeck.c (common_base_type): Make static.
20555 * cp-tree.h (common_base_types): Delete erroneous decl.
20556
20557 * pt.c (classtype_mangled_name): Make static.
20558 * cp-tree.h (classtype_mangled_name): Delete decl.
20559
20560 * lex.c (check_newline): Make static.
20561 * cp-tree.h (check_newline): Delete decl.
20562
20563 * typeck.c (build_x_array_ref): Delete fn, same idea as
20564 grok_array_decl.
20565 * cp-tree.h (build_x_array_ref): Delete decl.
20566
20567 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
20568 copy_lang_decl.
20569 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
20570
20571 * class.c (build_vtable_entry): Make static.
20572 * cp-tree.h (build_vtable_entry): Delete decl.
20573
20574 * class.c (build_vbase_pointer): Make static.
20575 * cp-tree.h (build_vbase_pointer): Delete decl.
20576
20577 * sig.c (build_sptr_ref): Add forward decl and make static.
20578 * cp-tree.h (build_sptr_ref): Delete decl.
20579
20580 * call.c (build_new_method_call): Add forward decl and make static.
20581 * cp-tree.h (build_new_method_call): Delete decl.
20582
20583 * call.c (build_object_call): Make static.
20584 * class.c (check_for_override, complete_type_p, mark_overriders):
20585 Likewise.
20586 * decl.c (cp_function_chain): Likewise.
20587 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
20588 Likewise.
20589 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
20590 Likewise.
20591 * tree.c (build_cplus_array_type_1): Likewise.
20592 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
20593 (comp_target_parms): Likewise.
20594
20595 * init.c (build_builtin_call): Make static.
20596 * cp-tree.h (build_builtin_call): Delete decl.
20597
20598 * typeck.c (binary_op_error): Delete decl.
20599 * cp-tree.h (binary_op_error): Likewise.
20600
20601 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20602
20603 * call.c (build_method_call): Compare against error_mark_node
20604 directly, rather than the ERROR_MARK tree code.
20605 * cvt.c (cp_convert): Likewise.
20606 * decl.c (print_binding_level): Likewise.
20607 (duplicate_decls): Likewise.
20608 (grokdeclarator): Likewise.
20609 (grokdeclarator): Likewise.
20610 * init.c (expand_aggr_init_1): Likewise.
20611 (decl_constant_value): Likewise.
20612 * method.c (build_opfncall): Likewise.
20613 (hack_identifier): Likewise.
20614 * typeck.c (build_modify_expr): Likewise.
20615
20616 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
20617
20618 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
20619
20620 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
20621
20622 * pt.c (coerce_template_parms): Add new error message.
20623
20624 * method.c (build_overload_value): Implement name mangling for
20625 floating-point template arguments.
20626
20627 * method.c (build_overload_int, icat, dicat): Fix mangling of template
20628 arguments whose absolute value doesn't fit in a signed word.
20629
20630 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20631
20632 * friend.c: New file; put all of the friend stuff in here.
20633 * init.c: Instead of here.
20634 * Makefile.in (CXX_OBJS): Add friend.o.
20635 (friend.o): Add dependencies.
20636 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
20637
20638 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
20639
20640 * call.c (build_scoped_method_call): Complain if the scope isn't a
20641 base.
20642
20643 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
20644
20645 * parse.y (left_curly): Don't crash on erroneous type.
20646
20647 * init.c (build_delete): Fix type of ref.
20648
20649 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
20650
20651 * search.c (get_vbase_1): Renamed from get_vbase.
20652 (get_vbase): Wrapper, now non-static.
20653 (convert_pointer_to_vbase): Now static.
20654
20655 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
20656 * init.c (build_delete): Pass one.
20657 (build_partial_cleanup_for): Use build_scoped_method_call.
20658 * decl.c (finish_function): Pass a binfo.
20659
20660 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
20661
20662 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
20663
20664 * typeck.c (build_c_cast): Lose other reference to flag.
20665
20666 * call.c (build_field_call): Don't look for [cd]tor_identifier.
20667 * decl2.c (delete_sanity): Remove meaningless use of
20668 LOOKUP_HAS_IN_CHARGE.
20669 * decl.c (finish_function): Use build_scoped_method_call instead
20670 of build_delete for running vbase dtors.
20671 * init.c (build_delete): Call overload resolution code instead of
20672 duplicating it badly.
20673
20674 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
20675
20676 * call.c (build_over_call): Call mark_used before trying to elide
20677 the call.
20678
20679 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
20680
20681 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20682
20683 * typeck.c (build_modify_expr): Always pedwarn for a cast to
20684 non-reference used as an lvalue.
20685
20686 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
20687
20688 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
20689
20690 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
20691
20692 * parse.y (handler): Fix template typo.
20693
20694 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
20695
20696 * error.c (lang_decl_name): New fn.
20697 * tree.c (lang_printable_name): Use it.
20698
20699 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
20700
20701 * g++spec.c: Include config.h so that we can catch bzero #defines
20702 from the config file.
20703
20704 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
20705
20706 * new1.cc: Include a declaration for malloc, to avoid warning, and
20707 avoid lossing on systems that require one (ones that define malloc
20708 in xm.h).
20709
20710 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
20711
20712 * decl2.c (max_tinst_depth): New variable.
20713 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
20714 option.
20715 * pt.c (max_tinst_depth): Variable moved.
20716 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
20717 as legal.
20718
20719 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
20720
20721 * decl.c (xref_basetypes): Allow a base class that depends on
20722 template parms to be incomplete.
20723
20724 * decl2.c (build_expr_from_tree): Support typeid(type).
20725 * rtti.c (get_typeid): Support templates.
20726 (expand_si_desc, expand_class_desc): Fix string length.
20727 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
20728
20729 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
20730
20731 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
20732
20733 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
20734
20735 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
20736
20737 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
20738 smashes together template and non-template decls of the same
20739 signature.
20740
20741 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
20742
20743 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
20744
20745 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20746
20747 * decl.c (duplicate_decls): Next route, pedwarn about different
20748 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
20749
20750 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20751
20752 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
20753 (struct lang_type): Delete has_default_implementation member.
20754 Increase dummy to 21.
20755 * decl.c (start_method): Delete usage.
20756
20757 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
20758 store_after_parms, start_decl_1, auto_function): Add decls.
20759 (get_arglist_len_in_bytes, declare_implicit_exception,
20760 have_exceptions_p, make_type_decl, typedecl_for_tag,
20761 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
20762 build_component_type_expr, cplus_exception_name,
20763 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
20764 * call.c (build_this): Make static.
20765 (is_complete): Likewise.
20766 (implicit_conversion): Likewise.
20767 (reference_binding): Likewise.
20768 (standard_conversion): Likewise.
20769 (strip_top_quals): Likewise.
20770 (non_reference): Likewise.
20771 (build_conv): Likewise.
20772 (user_harshness): Likewise.
20773 (rank_for_ideal): Likewise.
20774 * decl.c (start_decl_1): Delete forward decl.
20775 (push_decl_level): Make static.
20776 (resume_binding_level): Make static.
20777 (namespace_bindings_p): Make static.
20778 (declare_namespace_level): Make static.
20779 (lookup_name_real): Make static.
20780 (duplicate_decls): Make static. Take register off NEWDECL and
20781 OLDDECL parm decls.
20782 * decl2.c (get_sentry): Make static.
20783 (temp_name_p): Delete fn.
20784 * except.c (auto_function): Delete decl.
20785 * lex.c (handle_{cp,sysv}_pragma): Make static.
20786 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
20787 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
20788 * pt.c (tsubst_expr_values): Make static.
20789 * rtti.c (combine_strings): Delete decl.
20790
20791 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
20792
20793 * pt.c (push_template_decl): Handle getting a typedef.
20794
20795 * call.c (build_new_function_call): Complain about void arg.
20796
20797 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20798
20799 * decl.c (duplicate_decls): Give pedwarn of different exceptions
20800 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
20801
20802 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
20803
20804 * except.c (expand_throw): Don't expand the cleanup tree here,
20805 since we are not going to write the rtl out. Fixes problem with
20806 -g -O on SPARC.
20807
20808 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
20809
20810 * Make-lang.in: Add $(exeext) as necessary.
20811
20812 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
20813
20814 * parse.y (handler_seq): Must have at least one catch clause.
20815
20816 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
20817
20818 * call.c (add_builtin_candidate): Restore ?: hack.
20819
20820 * decl.c (grok_op_properties): More warnings.
20821
20822 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20823
20824 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
20825 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
20826
20827 * decl.c (duplicate_decls): Scale back to a warning, and only do
20828 'em if -pedantic.
20829
20830 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
20831
20832 * decl.c (duplicate_decls): pedwarn mismatched exception
20833 specifications.
20834
20835 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
20836
20837 * call.c (build_new_method_call): Don't display the invisible
20838 argument for controlling virtual bases.
20839
20840 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
20841
20842 * new: Add nothrow new and delete, bad_alloc and throw specifications
20843 for delete.
20844 * decl.c (init_decl_processing): Add throw specification for delete.
20845 * new.cc (nothrow): Define.
20846 * lex.c (real_yylex): Removing warning that throw and friends are
20847 keywords.
20848 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
20849 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
20850 * Make-lang.in: Add new{1,2}.{cc,o}.
20851
20852 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
20853
20854 * lex.c (cons_up_default_function): Fix return type of synth op=.
20855
20856 * init.c (emit_base_init): Add warnings for uninitialized members
20857 and bases.
20858
20859 * decl.c (xref_basetypes): Add warning for non-polymorphic type
20860 with destructor used as base type.
20861
20862 * decl.c (grok_op_properties): Add warning for op= returning void.
20863 * typeck.c (c_expand_return): Add warning for op= returning anything
20864 other than *this.
20865
20866 * class.c (finish_struct_1): Add warning for class with pointers
20867 but not copy ctor or copy op=.
20868
20869 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
20870 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
20871 (instantiate_template): If -fexternal-templates, add this
20872 instantiation to pending_templates.
20873
20874 * decl2.c (copy_assignment_arg_p): Disable old hack to support
20875 Booch components.
20876
20877 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
20878
20879 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
20880
20881 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
20882
20883 * call.c (standard_conversion): Handle getting references. Tack
20884 on RVALUE_CONV here. Do it for non-class types, too.
20885 (reference_binding): Pass references to standard_conversion.
20886 (implicit_conversion): Likewise.
20887 (add_builtin_candidate): Disable one ?: kludge.
20888 (convert_like): Handle RVALUE_CONVs for non-class types.
20889 (joust): Disable the other ?: kludge.
20890
20891 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20892
20893 * decl.c (init_decl_processing): Add code to build up common
20894 function types beforehand, to avoid creation then removal of
20895 things already in the hash table.
20896
20897 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
20898
20899 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
20900 the arguments.
20901
20902 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
20903 current_template_parms.
20904
20905 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
20906
20907 * search.c (lookup_field): Don't return a function, check want_type.
20908
20909 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20910
20911 * init.c (build_new): Make sure PLACEMENT has a type.
20912
20913 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
20914
20915 * init.c (build_new): Support new (nothrow).
20916
20917 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
20918
20919 * pt.c (instantiate_decl): Also do push_to_top_level before setting
20920 up DECL_INITIAL.
20921
20922 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
20923 * pt.c (tsubst): Defer instantiation of default args.
20924 * call.c (build_over_call): Until here.
20925
20926 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20927
20928 * search.c (lookup_field): Make sure we have an
20929 IDENTIFIER_CLASS_VALUE before we try to return it.
20930
20931 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20932
20933 * call.c (build_method_call): Delete unused var PARM.
20934 (build_overload_call_real): Likewise.
20935 (build_object_call): Delete unused var P.
20936 (build_new_op): Likewise.
20937 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
20938 var definitions, which are never used.
20939 (shadow_tag): Delete unused var FN.
20940 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
20941 * init.c (build_new): Delete unused var ALLOC_TEMP.
20942 * method.c (hack_identifier): Delete unused var CONTEXT.
20943 (do_build_copy_constructor): Delete unused var NAME.
20944 (synthesize_method): Delete unused var BASE.
20945 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
20946 * rtti.c (build_headof): Delete unused var VPTR.
20947 (get_typeid): Delete unused var T.
20948 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
20949 and ORIG_OP2.
20950 (build_ptrmemfunc): Delete unused vars U and NINDEX.
20951 * typeck2.c (build_functional_cast): Delete unused var BINFO.
20952
20953 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
20954
20955 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
20956 things in a type being defined.
20957 * decl.c (finish_enum): Reverse the values so that they are in
20958 the correct order.
20959
20960 * pt.c (instantiate_class_template): Don't initialize
20961 BINFO_BASETYPES until the vector is filled out.
20962 (unify): Don't abort on conflicting bindings, just fail.
20963 (instantiate_decl): Do push_tinst_level before any tsubsting.
20964
20965 * method.c (build_overload_value): Handle getting a
20966 TEMPLATE_CONST_PARM for a pointer.
20967
20968 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
20969
20970 * init.c (expand_member_init): Don't give 'not a base' error for
20971 templates.
20972
20973 * pt.c (instantiate_decl): Call import_export_decl later.
20974
20975 * pt.c (instantiate_class_template): Return a value.
20976
20977 * parse.y (extension): New rule for __extension__.
20978 (extdef, unary_expr, decl, component_decl): Use it.
20979
20980 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
20981
20982 * class.c (base_binfo): Remove unused base_has_virtual member.
20983 (finish_base_struct): Likewise.
20984 (finish_struct_1): Likewise.
20985
20986 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
20987
20988 * search.c (expand_upcast_fixups): Fix bogus code generation
20989 problem where the generated code uses the wrong index into the
20990 runtime built vtable on the stack. Old code could clobber random
20991 stack values.
20992
20993 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
20994
20995 * init.c (perform_member_init): Make sure the partial EH cleanups
20996 live on the function_obstack.
20997
20998 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
20999
21000 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
21001 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
21002
21003 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
21004
21005 * decl.c (grokvardecl): Avoid ANSI style initialization.
21006
21007 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
21008
21009 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
21010
21011 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
21012
21013 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
21014
21015 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21016
21017 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
21018 arguments we compare against. Start the count of I at 1, not 0,
21019 since argv[0] is still the command.
21020
21021 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
21022
21023 * lang-specs.h: Accept .cp as an C++ extension.
21024
21025 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21026
21027 * cp-tree.h (ptr_reasonably_similar): Add decl.
21028
21029 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21030
21031 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
21032 pointer. New local SPECBITS with the parm's value.
21033 (grokdeclarator): Pass &specbits down.
21034
21035 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
21036 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
21037
21038 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
21039 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
21040
21041 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
21042 not an error_mark_node.
21043
21044 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21045
21046 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
21047 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
21048
21049 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
21050
21051 * decl.c (grokdeclarator): When giving an anonymous struct a name,
21052 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
21053 not affected).
21054
21055 * typeck2.c (build_m_component_ref): If component is a pointer
21056 to data member, resolve the OFFSET_REF now.
21057
21058 * call.c (convert_like): Don't go into infinite recursion.
21059
21060 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
21061
21062 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
21063 * tree.c (layout_basetypes): And on the vbase ptr.
21064
21065 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
21066
21067 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
21068 CHAR_TYPE_SIZE so bool is always the same size as another type.
21069
21070 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
21071
21072 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
21073
21074 * decl2.c (grok_x_components): Remove synthesized methods from
21075 TYPE_METHODS of an anonymous union, complain about member
21076 functions.
21077 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
21078 anonymous unions.
21079 (finish_function): Just clear the DECL_RTL of our arguments.
21080
21081 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
21082
21083 * decl2.c (finish_file): Emit DWARF debugging info for static data
21084 members.
21085
21086 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
21087
21088 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
21089
21090 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
21091 IDENTIFIER_NODE.
21092
21093 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
21094
21095 * Make-lang.in (g++-cross$(exeext)): Fix typo.
21096
21097 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21098
21099 Make the g++ driver now be a standalone program, rather than one
21100 that tries to run the gcc driver after munging up the options.
21101 * Make-lang.in (g++.c, g++spec.o): New rules.
21102 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
21103 added.
21104 (g++$(exeext)): New rule, based on xgcc rule.
21105 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
21106 * g++spec.c: New file.
21107 * g++.c: Removed file.
21108
21109 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
21110
21111 * cvt.c (build_up_reference): Arrange for any temporary values
21112 that have been keep in registers until now to be put into memory.
21113
21114 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21115
21116 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
21117 that make -j3 bootstrap works better.
21118
21119 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
21120
21121 * decl.c (pushtag): Do pushdecl for anon tags.
21122
21123 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
21124
21125 * typeck.c (c_expand_return): Fix logic.
21126 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
21127
21128 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
21129
21130 * g++.c (main): Make sure arglist has a final NULL entry. Add
21131 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
21132 stdin/stdout of the invoked program are redirected to
21133 nowheresville.
21134
21135 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
21136
21137 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
21138
21139 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
21140
21141 * init.c (resolve_offset_ref): Handle obj.vfn better.
21142 * typeck.c (build_component_ref): Set TREE_TYPE on result from
21143 build_vfn_ref.
21144
21145 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
21146
21147 * typeck.c (convert_for_assignment): Also handle anachronistic
21148 implicit conversions from (::*)() to cv void*.
21149 * cvt.c (cp_convert_to_pointer): Likewise.
21150
21151 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
21152
21153 * lex.c (handle_cp_pragma): Fix bogus warning.
21154
21155 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
21156
21157 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
21158 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
21159
21160 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
21161
21162 * class.c (finish_struct_1): Support DWARF2_DEBUG.
21163 * search.c (dfs_debug_mark): Likewise.
21164 * decl2.c (finish_vtable_vardecl): Likewise.
21165 * decl.c (pushtag, finish_enum): Likewise.
21166 * lex.c (check_newline): Use debug_* instead of calling *out
21167 functions directly.
21168
21169 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21170
21171 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
21172 on some picky hosts.
21173
21174 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
21175
21176 * class.c (finish_struct_1): A class has a non-trivial copy
21177 constructor if it has virtual functions.
21178
21179 * cvt.c (cp_convert): Always call a constructor.
21180
21181 * call.c (reference_binding): Still tack on a REF_BIND
21182 for bad conversions.
21183 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
21184
21185 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
21186 (c_expand_return): Likewise.
21187 * typeck2.c (digest_init): Likewise for { }.
21188 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
21189 * cvt.c (cp_convert): Handle failure better.
21190
21191 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21192
21193 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
21194 of GCC be path-relative.
21195
21196 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
21197
21198 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
21199 it does need choose-temp.o and pexecute.o.
21200
21201 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21202
21203 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
21204 that we still use it.
21205 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
21206
21207 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
21208
21209 * init.c (expand_default_init): Avoid calling constructors to
21210 initialize reference temps.
21211
21212 * cvt.c (convert_to_reference): Fix.
21213
21214 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
21215
21216 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
21217 (convert_to_reference): Likewise.
21218 * typeck.c (convert_for_initialization): Likewise.
21219 * init.c (expand_default_init): Likewise.
21220 (expand_aggr_init_1): Likewise.
21221 * cp-tree.h (CONV_NONCONVERTING): Lose.
21222 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
21223 * *.c: Adjust.
21224 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
21225
21226 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
21227
21228 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
21229
21230 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
21231
21232 * init.c (expand_aggr_init_1): Don't crash on non-constructor
21233 TARGET_EXPR.
21234
21235 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21236
21237 * g++.c: Include gansidecl.h.
21238 (VPROTO, PVPROTO, VA_START): Delete.
21239 (choose_temp_base_try, choose_temp_base, perror_exec,
21240 run_dos) [__MSDOS__]: Delete fns.
21241 (pfatal_with_name): Delete fn.
21242 (temp_filename): Declare like in gcc.c.
21243 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
21244 (error_count, signal_count): Define.
21245 (error): Delete both definitions.
21246 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
21247 (pfatal_pexecute): Add fn from gcc.c.
21248 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
21249 code to use the pexecute stuff also used by gcc.c.
21250 (MIN_FATAL_STATUS): Define.
21251 * Make-lang.in (g++): Add dependency on and linking with
21252 choose-temp.o and pexecute.o.
21253
21254 * cp-tree.h: Include gansidecl.h.
21255 (STDIO_PROTO): Delete #undef/#define.
21256 * cvt.c (NULL): Delete #undef/#define.
21257 * expr.c (NULL): Likewise.
21258 * init.c (NULL): Likewise.
21259 * rtti.c (NULL): Likewise.
21260 * xref.c (NULL): Likewise.
21261
21262 * cp-tree.h (build_user_type_conversion): Add prototype.
21263 * call.c (build_user_type_conversion): Delete prototype. Correct
21264 decl of FLAGS arg to be an int.
21265 * cvt.c (build_user_type_conversion): Likewise.
21266
21267 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
21268
21269 * cp-tree.def: Add TRY_BLOCK and HANDLER.
21270 * except.c (expand_start_catch_block): Support templates.
21271 * parse.y (try_block, handler_seq): Likewise.
21272 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
21273
21274 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
21275
21276 * pt.c (current_template_args): New fn.
21277 (push_template_decl): Use it.
21278 * decl.c (grokdeclarator): Use it.
21279
21280 * decl2.c (build_expr_from_tree): Dereference ref vars.
21281
21282 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
21283 the decl-specifier-seq.
21284
21285 * decl.c (grok_op_properties): Don't force the type of a conversion
21286 op to be complete. Don't warn about converting to the same type
21287 for template instantiations.
21288
21289 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
21290 methods.
21291
21292 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
21293
21294 * typeck.c (get_delta_difference): Remove previous bogusness.
21295 Don't give errors if force is set.
21296
21297 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
21298
21299 * decl2.c (finish_file): Don't emit debug info.
21300 * decl.c (pushdecl): Lose obsolete code.
21301 (grokdeclarator): Still do the long long thing after complaining.
21302 * search.c (note_debug_info_needed): Don't do anything if we're in a
21303 template.
21304 * method.c (synthesize_method): For non-local classes,
21305 push_to_top_level first.
21306
21307 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
21308
21309 * typeck.c (get_delta_difference): Add no_error parameter.
21310 (build_ptrmemfunc): Call get_delta_difference with no_error set;
21311 we don't want error messages when converting unrelated
21312 pointer-to-member functions.
21313
21314 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
21315
21316 * error.c (dump_expr): Improve the wording on error messages that
21317 involve pointer to member functions.
21318
21319 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
21320
21321 * cvt.c (cp_convert_to_pointer): Move code for conversions from
21322 (::*)() to void* or (*)() up a bit, so that we can convert from
21323 METHOD_TYPEs as well.
21324
21325 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
21326
21327 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
21328 There are no 'member' types.
21329 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
21330 (build_x_typeid): Handle errors.
21331
21332 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
21333
21334 * typeck.c (convert_for_assignment): Handle anachronistic implicit
21335 conversions from (::*)() to void* or (*)().
21336 * cvt.c (cp_convert_to_pointer): Likewise.
21337 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
21338 conversions from here.
21339 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
21340 * lang-options.h: Likewise.
21341 * decl2.c (warn_pmf2ptr): Define.
21342 * cp-tree.h: Declare it.
21343 * typeck2.c (digest_init): Allow pmfs down into
21344 convert_for_initialization.
21345
21346 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
21347
21348 * typeck.c (c_expand_return): Fix for returning overloaded fn.
21349
21350 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
21351
21352 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
21353 * decl.c (grok_reference_init): Pass DIRECT_BIND.
21354 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
21355 DIRECT_BIND.
21356 * call.c (convert_like): Don't pass INDIRECT_BIND.
21357 * typeck.c (convert_arguments): Likewise.
21358 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
21359
21360 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
21361
21362 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
21363 similar code in build_up_ref.
21364 * cvt.c (build_up_reference): Drastically simplify.
21365
21366 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
21367
21368 * typeck.c (signed_or_unsigned_type): If the given type already
21369 as the correct signedness, then just return it.
21370
21371 * typeck.c ({un,}signed_type): If can't do anything, call
21372 signed_or_unsigned_type.
21373
21374 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
21375
21376 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
21377 current_class_type is NULL.
21378
21379 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
21380
21381 * class.c (finish_struct_1): Avoid empty structs by adding a field
21382 so layout_type gets the mode right.
21383
21384 * typeck.c (c_expand_return): Drastically simplify.
21385
21386 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
21387
21388 * typeck.c (decay_conversion): Handle overloaded methods.
21389
21390 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
21391
21392 * call.c (build_over_call): A TARGET_EXPR has side-effects.
21393
21394 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
21395
21396 * cvt.c (convert_to_pointer_force): Add code to support pointer to
21397 member function to pointer to function conversions.
21398 * init.c (resolve_offset_ref): Add code to allow faked up objects,
21399 ignoring them if they are not used, and giving an error, if they
21400 are needed.
21401 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
21402 code, and so that we can give an error, if we needed an object,
21403 and one was not provided.
21404 (build_c_cast): Don't call default_conversion when we want to
21405 convert to pointer to function from a METHOD_TYPE.
21406
21407 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
21408
21409 * Make-lang.in (cplib2.ready): Fix logic.
21410
21411 * decl.c (shadow_tag): Only complain about non-artificial function
21412 members.
21413
21414 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
21415
21416 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
21417
21418 * expr.c (cplus_expand_expr): Pre-tweak call_target like
21419 expand_inline_function would.
21420
21421 * pt.c (mark_decl_instantiated): If extern_p, call
21422 mark_inline_for_output.
21423
21424 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
21425
21426 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
21427 pmd conversions.
21428
21429 * typeck.c (get_delta_difference): Fix wording, as we can be used
21430 for pointer to data members.
21431
21432 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
21433
21434 * pt.c (tsubst): If the function decl isn't a member of this
21435 template, return a copy of the decl (including copying the
21436 lang-specific part) so we don't hose ourselves later.
21437
21438 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
21439
21440 * class.c (finish_struct): Remove DWARF-specific tag handling.
21441 * decl.c (pushtag): Likewise.
21442 (finish_function): Always clear DECL_ARGUMENTS on function decls with
21443 no saved RTX.
21444 * decl2.c (finish_file): Emit DWARF debugging info for static data
21445 members.
21446
21447 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
21448
21449 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
21450 isn't the same as the new one before we whack it.
21451
21452 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
21453
21454 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
21455 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
21456 warn_traditional and warn_strict_prototypes; remove ancient
21457 'overload' code; remove references to flag_traditional.
21458
21459 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
21460
21461 * input.c (sub_getch): Handle 8-bit characters in string literals.
21462
21463 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
21464
21465 * tree.c (mapcar): Handle CONSTRUCTORs.
21466 (copy_to_permanent): Handle expression_obstack properly.
21467
21468 * Make-lang.in (cplib2.txt): Also depend on the headers.
21469
21470 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
21471 INT_TYPE_SIZE.
21472 (expand_class_desc): Use USItype for offset field.
21473 * tinfo.h (struct __class_type_info): Likewise.
21474
21475 * method.c (build_overload_int): TYPE_PRECISION should be applied
21476 to types.
21477
21478 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
21479
21480 * call.c (build_new_op): A COND_EXPR involving void must be a
21481 builtin.
21482
21483 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21484
21485 * typeck.c (build_x_component_ref): New fn.
21486 (build_object_ref): Use it.
21487 * parse.y (primary): Use it.
21488 * decl2.c (build_expr_from_tree): Use it.
21489 * cp-tree.h: Declare it.
21490
21491 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
21492 * error.c (dump_type_suffix): Handle variable arrays.
21493
21494 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21495
21496 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
21497
21498 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
21499
21500 * decl.c (lookup_name_real): Don't try to look up anything in a
21501 TYPENAME_TYPE.
21502
21503 * tinfo2.cc (__throw_type_match_rtti): Oops.
21504
21505 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21506
21507 * Make-lang.in (exception.o): Use -fno-PIC for now.
21508
21509 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
21510
21511 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
21512 calling them.
21513 (get_tinfo_fn_dynamic): Extracted from build_typeid.
21514 * tinfo2.cc (__dynamic_cast): Adjust.
21515
21516 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
21517 (build_x_typeid): Likewise.
21518
21519 * parse.y: Call build_x_typeid instead of build_typeid.
21520 * cp-tree.def: Add TYPEID_EXPR.
21521 * pt.c (tsubst_copy): Handle typeid.
21522 * decl2.c (build_expr_from_tree): Likewise.
21523 * rtti.c (build_x_typeid): Throw bad_typeid from here.
21524 (build_typeid): Not here.
21525 * cp-tree.h: Declare build_x_typeid.
21526
21527 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
21528
21529 * call.c (convert_like): Pull out constant values.
21530
21531 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
21532
21533 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
21534
21535 * decl.c (init_decl_processing): Create short int types before
21536 creating size_t in case a machine description needs to use
21537 unsigned short for size_t.
21538
21539 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
21540
21541 * Make-lang.in (exception.o): Turn off pic.
21542
21543 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
21544 type, multi-level ptr conversions.
21545
21546 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
21547 (throw_bad_cast): Use it.
21548 (throw_bad_typeid): New fn.
21549 (build_typeid): Throw bad_typeid as needed.
21550 Use build_call.
21551 (synthesize_tinfo_fn): Handle functions and arrays before checking
21552 for cv-quals.
21553
21554 * Remove .h from standard C++ headers, add new.h, move into inc
21555 subdirectory.
21556
21557 * exception*: Remove pointer from object, constructors. Add
21558 default exception::what that uses type_info::name. Add
21559 __throw_bad_typeid.
21560
21561 * init.c (build_new): Don't add a cookie to new (void *) T[2].
21562
21563 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
21564
21565 * Make-lang.in: Building C++ code depends on cc1plus.
21566
21567 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21568
21569 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
21570 a HOST_WIDE_INT, not a tree.
21571
21572 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
21573
21574 * exception.cc: Don't include <stdlib.h>.
21575
21576 * Make-lang.in (c++.clean): Remove cplib2.*.
21577
21578 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
21579
21580 * parse.y (component_decl_1, component_costructor_declarator case):
21581 Pass attributes/prefix_attributes in tree list.
21582
21583 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
21584
21585 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
21586
21587 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21588
21589 * lex.c (do_identifier): Don't do deferred lookup in a template
21590 header.
21591
21592 * typeck2.c (store_init_value): Oops.
21593
21594 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
21595 New files for C++ lang-support library.
21596 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
21597 (CXX_LIB2FUNCS): Define.
21598 And rules for building the C++ lang-support code.
21599 * config-lang.in (headers): Define.
21600 (lib2funcs): Define.
21601
21602 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
21603
21604 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
21605 digest_init.
21606 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
21607 * typeck2.c (store_init_value): Check for initializing pmf with { }
21608 here.
21609 (process_init_constructor): Not here.
21610
21611 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
21612
21613 * pt.c (begin_template_parm_list): Increment
21614 processing_template_decl here.
21615 (end_template_parm_list): Not here.
21616 (process_template_parm): No need to add 1 to it now.
21617 * *.c: Use processing_template_decl instead of current_template_parms
21618 to check for being in a template.
21619
21620 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
21621 (tsubst_copy): Handle CONSTRUCTOR.
21622 (instantiate_decl): Set up context properly for variables.
21623 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
21624 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
21625
21626 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21627
21628 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
21629
21630 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
21631
21632 * method.c (make_thunk): Call comdat_linkage before setting the
21633 TREE_CODE.
21634
21635 * decl2.c (comdat_linkage): Use make_decl_one_only.
21636 (import_export_decl): Likewise.
21637 * decl.c (init_decl_processing): Check supports_one_only instead of
21638 SUPPORTS_WEAK.
21639
21640 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
21641
21642 * decl2.c (grokfield): Tighten checking for access decls.
21643
21644 * decl.c (make_typename_type): Resolve references to
21645 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
21646 (lookup_name_real): Types that depend on a template parameter get
21647 an implicit 'typename' unless they're in the current scope.
21648 (start_decl_1): We don't care about incomplete types that depend
21649 on a template parm.
21650 (grokdeclarator): Resolve 'typename's in the type specifier that
21651 refer to members of the current scope.
21652
21653 * call.c (build_over_call): Remove 'inline called before
21654 definition' diagnostic.
21655 (build_method_call): Likewise.
21656 * decl.c (duplicate_decls): Downgrade 'used before declared
21657 inline' to a warning, only with -Winline.
21658
21659 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
21660
21661 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
21662
21663 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
21664
21665 * call.c (build_method_call): When calling a signature
21666 default implementation, as in other cases, let instance_ptr simply
21667 be instance.
21668
21669 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
21670
21671 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
21672
21673 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
21674
21675 * except.c (expand_start_catch_block): Add a pushlevel so that -g
21676 works on hppa and SPARC.
21677
21678 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21679
21680 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
21681
21682 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
21683
21684 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
21685 before testing whether it's a signature.
21686
21687 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
21688
21689 * call.c (build_new_method_call): Don't complain about signature
21690 pointers and references not being an aggr type.
21691 (build_this): If a signature pointer or reference was passed in,
21692 just return it.
21693 (build_new_method_call): If instance is a signature pointer, set
21694 basetype to the signature type of instance.
21695 * sig.c (build_signature_method_call): Deleted basetype and
21696 instance parameters, they can be found as the DECL_CONTEXT of
21697 function and as the first argument passed in.
21698 * cp-tree.h: Changed declaration of build_signature_method_call.
21699 * call.c (build_method_call): Deleted first two arguments in call
21700 of build_signature_method_call.
21701 (build_over_call): Added call to build_signature_method_call.
21702
21703 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
21704
21705 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
21706 target_expr.
21707
21708 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21709
21710 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
21711
21712 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
21713
21714 * except.c (expand_start_try_stmts): Move to except.c in the backend.
21715 (expand_end_try_stmts): Remove.
21716
21717 * init.c (perform_member_init): Use add_partial_entry () instead
21718 of directly manipulating lists.
21719 (emit_base_init): Likewise.
21720
21721 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
21722
21723 * except.c (expand_exception_blocks): Always make sure USE and
21724 CLOBBER insns that came at the end still do, the backend relies
21725 upon this.
21726
21727 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
21728
21729 * call.c (build_over_call): We can only use a TARGET_EXPR of the
21730 right type.
21731
21732 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
21733
21734 * cvt.c (convert_to_reference): Revert last change, don't complain
21735 about temp without target decl.
21736
21737 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
21738
21739 * decl.c (grokdeclarator): Don't core dump when void() is given.
21740
21741 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
21742
21743 * decl.c (copy_args_p): Don't crash.
21744
21745 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
21746
21747 * pt.c (tsubst): And support template args inside the exception
21748 specification.
21749
21750 * pt.c (tsubst): Add support for exception specifications in
21751 template functions.
21752
21753 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
21754
21755 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
21756 fields now.
21757 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
21758 (start_function): Likewise.
21759 (start_method): Likewise.
21760 (grokfield): Likewise.
21761 (make_call_declarator): Add throw spec parameter.
21762 (set_quals_and_spec): Add routine.
21763 * lex.c (set_quals_and_spec): Likewise.
21764 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
21765 * decl.c (shadow_tag): Eliminate the throw spec parameter to
21766 grokdeclarator.
21767 (groktypename): Likewise.
21768 (start_decl): Eliminate the throw spec parameter. Eliminate the
21769 throw spec parameter to grokdeclarator. Eliminate the throw spec
21770 field in DECL_STMT.
21771 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
21772 (grokfndecl): Remove useless set of raises.
21773 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
21774 the throw spec parameter to start_decl. Pull the throw spec out
21775 of the call declarator.
21776 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
21777 (start_function): Eliminate the throw spec parameter. Eliminate
21778 the throw spec parameter to grokdeclarator.
21779 (start_method): Likewise.
21780 * decl2.c (grokfield): Likewise.
21781 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
21782 (grokoptypename): Likewise.
21783 (finish_file): Eliminate the throw spec parameter to
21784 start_function. Add throw spec to make_call_declarator.
21785 * except.c (init_exception_processing): Add throw spec to
21786 make_call_declarator. Eliminate the throw spec parameter to
21787 start_decl.
21788 (expand_start_catch_block): Eliminate the throw spec parameter to
21789 grokdeclarator.
21790 (expand_builtin_throw): Add throw spec to make_call_declarator.
21791 Eliminate the throw spec parameter to start_function.
21792 (start_anon_func): Likewise.
21793 * lex.c (make_call_declarator): Add throw spec parameter.
21794 (set_quals_and_spec): New routine.
21795 (cons_up_default_function): Add throw spec to make_call_declarator.
21796 Eliminate the throw spec parameter to grokfield.
21797 * method.c (synthesize_method): Eliminate the throw spec parameter
21798 to start_function.
21799 * pt.c (process_template_parm): Eliminate the throw spec parameter
21800 to grokdeclarator.
21801 (tsubst): Add throw spec to make_call_declarator.
21802 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
21803 (do_function_instantiation): Eliminate the throw spec parameter to
21804 grokdeclarator. Eliminate the throw spec parameter to
21805 start_function.
21806 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
21807 to start_function.
21808 * parse.y (datadef): Remove non-winning optimization.
21809 (decl): Likewise.
21810 (fndef): Remove ambiguous error productions uncovered by grammar
21811 fixing.
21812 (constructor_declarator): Add exception_specification_opt here.
21813 (component_constructor_declarator): Likewise.
21814 (direct_after_type_declarator): Likewise.
21815 (complex_direct_notype_declarator): Likewise.
21816 (direct_abstract_declarator): Likewise.
21817 (fn.def1): Remove exception_specification_opt.
21818 (fn.def2): Likewise.
21819 (condition): Likewise.
21820 (initdcl0): Likewise.
21821 (initdcl): Likewise.
21822 (notype_initdcl0): Likewise.
21823 (nomods_initdcl0): Likewise.
21824 (component_decl_1): Likewise.
21825 (component_declarator): Likewise.
21826 (after_type_component_declarator0): Likewise.
21827 (after_type_component_declarator): Likewise.
21828 (notype_component_declarator): Likewise.
21829
21830 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21831
21832 * call.c (build_over_call): Also use an INIT_EXPR when
21833 initializing anything from an rvalue.
21834
21835 * call.c (build_over_call): Call stabilize_reference when building
21836 an INIT_EXPR instead of calling the copy ctor.
21837
21838 * call.c (joust): Extend the previous change to all comparisons.
21839
21840 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
21841 NO_LINKAGE_HEURISTICS.
21842
21843 * decl2.c (finish_file): Emit any statics that weren't already.
21844
21845 * typeck.c (build_static_cast): Implement.
21846 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
21847 * decl.c (grokparms): Use can_convert_arg instead of
21848 implicit_conversion directly.
21849 (copy_args_p): New fn.
21850 * cvt.c (convert_to_reference): Don't complain about temp with
21851 static_cast.
21852 (build_up_reference): Handle TARGET_EXPRs.
21853 * call.c (build_over_call): Elide unnecessary temps.
21854 (can_convert*): Use new overloading code.
21855
21856 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
21857
21858 * call.c: Move TYPE_PTR*_MACROS ...
21859 * cp-tree.h: To here.
21860 * typeck.c (build_reinterpret_cast): Implement.
21861
21862 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
21863 ptr_complete_ob.
21864 (joust): If we're comparing a function to a builtin and the worst
21865 conversion for the builtin is worse than the worst conversion for the
21866 function, take the function.
21867
21868 * typeck.c (build_const_cast): Implement.
21869 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
21870 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
21871
21872 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
21873
21874 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
21875 too early. Make sure we explode if exprtype turns out to be a
21876 NULL_TREE when it shouldn't be.
21877
21878 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
21879
21880 * cp-tree.h: New routine make_call_declarator.
21881 * lex.c (make_call_declarator): Define it.
21882 * except.c (init_exception_processing): Use it.
21883 (expand_builtin_throw): Likewise.
21884 (start_anon_func): Likewise.
21885 * decl2.c (finish_file): Likewise.
21886 * lex.c (cons_up_default_function): Likewise.
21887 * parse.y: Likewise.
21888 * pt.c (tsubst): Likewise.
21889
21890 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
21891
21892 * decl2.c (groktypefield): Remove unused code.
21893
21894 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
21895
21896 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
21897 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
21898 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
21899 nonempty_cv_qualifiers.
21900 * hash.h: Rebuild.
21901
21902 * lex.c (make_pointer_declarator): Change type_quals into
21903 cv_qualifiers.
21904 (make_reference_declarator): Likewise.
21905
21906 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21907
21908 * decl.c (start_function): Only check interface_* for templates
21909 with flag_alt_external_templates.
21910
21911 * call.c (build_new_op): Check for comparison of different enum types.
21912 (build_over_call): Fix arg # output.
21913
21914 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
21915
21916 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
21917
21918 * call.c (build_new_op): Check for erroneous args.
21919
21920 * call.c (build_new_method_call): Add missing args to cp_error.
21921
21922 * tree.c (error_type): Don't print reference-to-array.
21923
21924 * typeck.c (convert_for_assignment): Don't say contravariance for
21925 removing const.
21926
21927 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
21928
21929 * call.c (build_over_call): Diagnose bad convs for `this'.
21930
21931 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
21932 on _ctor_arg.
21933
21934 * call.c (convert_like): Handle bad convs.
21935 (build_over_call): Handle bad convs better.
21936
21937 * decl2.c: -fansi-overloading is now the default.
21938
21939 * call.c (build_new_method_call): Check for erroneous args.
21940
21941 * pt.c (instantiate_class_template): Propagate
21942 TYPE_USES_MULTIPLE_INHERITANCE.
21943
21944 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
21945
21946 * call.c (enforce_access): Add static to routine.
21947
21948 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
21949
21950 * call.c (build_user_type_conversion_1): Fix bad handling.
21951 (compare_ics): Likewise.
21952
21953 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
21954
21955 * call.c (standard_conversion): Oops.
21956
21957 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
21958
21959 * g++.c: Update test for win32 (&& ! cygwin32).
21960
21961 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
21962
21963 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
21964 (ptr_reasonably_similar): New fn.
21965 * call.c (BAD_RANK): New rank.
21966 (ICS_BAD_FLAG): New macro.
21967 (standard_conversion): Handle almost-right pointer conversions.
21968 (reference_binding): Handle bad rvalue bindings.
21969 (add_*_candidate): Stuff.
21970 (build_over_call): Pass bad conversions to convert_for_initialization.
21971 (compare_ics): Handle bad convs.
21972 (joust): Likewise.
21973
21974 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
21975
21976 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
21977 integer_type_node when computing pointer offsets.
21978
21979 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
21980
21981 * tree.c (lvalue_type): New fn.
21982 (error_type): New fn.
21983 * call.c (op_error): Use error_type.
21984 (add_conv_candidate): Use lvalue_type.
21985 (add_builtin_candidates): Likewise.
21986 * error.c (args_as_string): Use error_type.
21987
21988 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
21989
21990 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
21991 (tsubst): Not here.
21992
21993 * decl.c (init_decl_processing): With -ansi, __null's type is the
21994 signed integral type with the same number of bits as a pointer.
21995 Introduce a new variable null_node for it.
21996 * cp-tree.h: Adjust.
21997 * call.c (null_ptr_cst_p): Adjust.
21998
21999 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
22000
22001 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
22002 optimize.
22003
22004 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
22005
22006 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
22007 fns of classes without virtual functions.
22008
22009 * call.c (add_function_candidate): Handle `this' specially.
22010 (compare_ics): Likewise.
22011
22012 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
22013
22014 * typeck.c (build_conditional_expr): Fix handling of __null.
22015
22016 * decl2.c (comdat_linkage): New fn.
22017 (import_export_vtable): Use it.
22018 (import_export_decl): Use it.
22019 * method.c (make_thunk): Use it.
22020
22021 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
22022
22023 * pt.c (end_template_decl): If we don't actually have parms, return.
22024 * parse.y (template_header): Accept 'template <>'.
22025
22026 * errfn.c: Allow 5 args.
22027
22028 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
22029
22030 * tree.c (make_temp_vec): New fn.
22031 * pt.c (push_template_decl): Handle partial specs.
22032 (instantiate_class_template): Likewise.
22033 (more_specialized): Use get_bindings.
22034 (more_specialized_class): New fn.
22035 (get_class_bindings): New fn.
22036 (most_specialized_class): New fn.
22037 (do_function_instantiation): List candidates for ambiguous case.
22038 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
22039 (shadow_tag): Call push_template_decl for partial specializations.
22040 * parse.y: Likewise.
22041 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
22042 DECL_TEMPLATE_MEMBERS.
22043 * call.c (print_z_candidates): Reduce duplication.
22044
22045 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
22046
22047 * decl2.c (lang_decode_option): Allow -fansi-overloading.
22048
22049 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
22050
22051 * pt.c (get_bindings): New fn.
22052 (most_specialized): Likewise.
22053 (do_function_instantiation): Use them.
22054 (add_maybe_template): New fn.
22055 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
22056 * call.c (build_new_op): Handle guiding decls.
22057 (build_new_function_call): Likewise.
22058 * decl2.c (finish_file): Likewise.
22059
22060 * decl2.c (mark_used): Do synthesis here.
22061 * call.c (build_method_call): Not here.
22062 (build_over_call): Or here.
22063 * typeck.c (build_function_call_real): Or here.
22064 * tree.c (bot_manip): Call mark_used on functions used in default
22065 args.
22066
22067 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
22068
22069 * decl2.c (import_export_vtable): Delete code that disabled vtable
22070 heuristic on systems with ASM_OUTPUT_EXTERNAL.
22071
22072 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
22073
22074 * typeck.c (build_x_function_call): Handle static call context
22075 better.
22076
22077 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
22078 the function, not its outer block.
22079
22080 * call.c (build_field_call): Pass fields on to build_opfncall
22081 regardless of TYPE_OVERLOADS_CALL_EXPR.
22082 (build_method_call): Pass on to build_new_method_call sooner.
22083
22084 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
22085 gives us.
22086 * class.c (instantiate_type): Don't put a POINTER_TYPE to
22087 METHOD_TYPE on an expression. Also make a copy of rhs instead of
22088 modifying it.
22089
22090 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
22091
22092 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
22093 (add_builtin_candidate): Don't take enums for ++.
22094 (build_new_method_call): Handle non-aggregates and field calls.
22095 Move new overloading code from...
22096 * cvt.c: Here.
22097
22098 * decl.c (grokparms): Don't check default args in templates.
22099
22100 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
22101
22102 * cvt.c (build_new_op): Fix args to build_unary_op.
22103 (add_builtin_candidates): Don't call type_promotes_to on float.
22104
22105 * decl.c (grokparms): Check the type of the default arg.
22106
22107 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
22108 returning NULL_TREE.
22109
22110 * typeck.c (build_x_binary_op): Avoid doing extra work.
22111 (build_x_unary_op): Likewise.
22112 (build_x_conditional_expr): Likewise.
22113 * cvt.c (build_over_call): Return.
22114 (add_builtin_candidate): Fix MEMBER_REF.
22115 (build_new_op): Likewise.
22116
22117 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
22118
22119 * method.c (build_overload_name): Put bug fix into code but leave
22120 disabled for now so we can be bug compatible with older releases
22121 that do repeats incorrectly. In the future, we can enable it.
22122
22123 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
22124
22125 * cvt.c (convert_like): Don't call build_cplus_new twice.
22126
22127 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
22128 Control new overloading code with -fansi-overloading.
22129
22130 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
22131
22132 * cvt.c (build_over_call): Call build_cplus_new.
22133 * call.c (build_method_call): Likewise.
22134 * typeck.c (build_function_call_real): Likewise.
22135 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
22136 the COND_EXPR in a TARGET_EXPR so they use the same slot.
22137
22138 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
22139 recursive calls.
22140 * typeck.c (complete_type): Propagate
22141 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
22142
22143 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
22144
22145 * cvt.c (joust): More ?: kludging. Sigh.
22146 (build_over_call): Don't try to synthesize global fns.
22147
22148 * search.c (lookup_conversions): Use binfo marking.
22149
22150 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
22151
22152 * search.c (build_mi_matrix): Use the correct value of cid
22153 when determining the new mi_size.
22154
22155 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
22156
22157 * cvt.c (add_builtin_candidates): Do consider type conversion ops
22158 for the first parms of += et al.
22159 (strip_top_quals): New fn.
22160 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
22161 (implicit_conversion): Likewise.
22162 (add_builtin_candidates): Be careful about arrays.
22163 (build_new_method_call): Handle vtable optimization.
22164
22165 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
22166
22167 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
22168 * cvt.c (reference_binding): Use it.
22169 (implicit_conversion): Use it.
22170 (add_builtin_candidate, COND_EXPR): Use it.
22171
22172 * cvt.c (build_new_function_call): Check for error args.
22173
22174 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
22175
22176 * gxx.gperf: Add __null.
22177 * hash.h: Regenerate.
22178 * lex.h: Add RID_NULL.
22179 * lex.c (init_lex): Create null_pointer_node here, stick it in
22180 RID_NULL.
22181 * decl.c (init_decl_processing): Still set its type here.
22182 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
22183 (convert_to_pointer_force): Likewise.
22184 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
22185 if (! pedantic).
22186 * call.c (convert_harshness): Use null_ptr_cst_p.
22187 * typeck.c (convert_for_assignment): Likewise. Don't produce
22188 null_pointer_node.
22189
22190 * error.c (args_as_string): Handle lists of actual args, too.
22191 * cvt.c (null_ptr_cst): Support (void*)0 for now.
22192 (build_user_type_conversion_1): Improve diagnostics.
22193 (build_new_function_call): Likewise.
22194 (build_object_call): Likewise.
22195 (build_new_method_call): Likewise. Move call before def diagnostic...
22196 (build_over_call): Here.
22197
22198 * cvt.c (build_new_method_call): Don't complain about no match if
22199 LOOKUP_SPECULATIVELY.
22200 (build_over_call): Fix 'this' for virtual fn.
22201 (build_new_method_call): Add diagnostic.
22202
22203 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22204
22205 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
22206 constructors to be passed in.
22207 (build_over_call): Likewise.
22208 (build_user_type_conversion_1): Pass them in.
22209 (convert_like): Likewise.
22210 (build_object_call): Handle overloaded conversions.
22211 (build_over_call): Pass the right args to build_vfn_ref.
22212 (standard_conversion): Fix pmf convs.
22213 (joust): Handle comparing statics and non-statics.
22214 (build_new_method_call): New fn.
22215 * call.c (build_method_call): Call it if NEW_OVER.
22216
22217 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
22218
22219 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
22220 %D instead.
22221
22222 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
22223
22224 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
22225 instead of just maybe_build_cleanup so that we deallocate the
22226 thrown object.
22227
22228 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22229
22230 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
22231 * cp-tree.h (finish_prevtable_vardecl): Add decl.
22232
22233 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
22234
22235 * pt.c (instantiate_class_template): Call complete_type. Also, if
22236 we're at the end of the file and we just instantiated a template
22237 class with a vtable, call finish_prevtable_vardecl.
22238
22239 * error.c (dump_decl): Don't explode (or explode more gracefully
22240 as appropriate) if the object being dumped has a null type.
22241 (dump_expr): Likewise.
22242
22243 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
22244 by counting the number of nodes that we'll need before allocating
22245 the array.
22246 (lookup_fnfields): Fix comment.
22247 (breadth_first_search): Fix comment.
22248
22249 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
22250
22251 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
22252 TYPE_ALIGN.
22253 * class.c (finish_struct): Call cplus_decl_attributes here.
22254 (finish_struct_1): Not here.
22255 * cp-tree.h: Adjust.
22256
22257 * pt.c (type_unification): New parameter STRICT.
22258 (unify): If STRICT, don't allow cv addition or base deduction.
22259 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
22260
22261 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
22262
22263 * search.c (get_template_base{_recursive}): New fns.
22264 * pt.c (more_specialized): New fn.
22265 (do_function_instantiation): Use it.
22266 (unify): Handle base deduction.
22267 * cvt.c (joust): Use more_specialized.
22268 Don't arbitrarily choose between non-builtin candidates.
22269 (build_over_call): Call require_complete_type.
22270
22271 * decl.c (start_function): Statics are static even in a #pragma
22272 interface file.
22273
22274 * decl2.c (import_export_vtable): Disable vtable heuristic on
22275 systems with ASM_OUTPUT_EXTERNAL.
22276
22277 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
22278 (standard_conversion): No std conv to enum type.
22279
22280 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
22281 for ptm's.
22282
22283 * cvt.c (reference_binding): Bind directly to a base subobject of
22284 a class rvalue.
22285
22286 * cvt.c (build_new_op): Enforce access control.
22287
22288 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
22289
22290 * typeck2.c (process_init_constructor): When scanning the
22291 union for a named field, skip things that aren't FIELD_DECLs.
22292
22293 * method.c (synthesize_method): Don't scan fndecl's rtl if
22294 we're at the end of the file; just assume the function can't
22295 be inlined.
22296
22297 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22298
22299 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
22300 it failed.
22301
22302 * cvt.c (build_user_type_conversion_1): Handle overloaded
22303 conversion ops.
22304
22305 * cvt.c (add_builtin_candidates): Don't consider type conversion
22306 operators for the first parameter of operator=.
22307
22308 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
22309
22310 * typeck.c (complete_type): Only call layout_type if we're not
22311 expanding a template.
22312
22313 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
22314
22315 * cvt.c (compare_ics): Oops.
22316
22317 * cvt.c (op_error): Oops.
22318
22319 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
22320 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
22321 (build_conv): Use them.
22322 (implicit_conversion): Use them.
22323 (convert_like): Handle them.
22324 (build_new_op): Handle builtin COND_EXPR again.
22325 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
22326 in lists of types for COND_EXPR.
22327 (add_builtin_candidate): Add enum candidates for COND_EXPR.
22328
22329 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
22330
22331 * typeck.c (build_modify_expr): Always attempt to build a call to
22332 the assignment operator, even if we're using a default one.
22333 (convert_for_initialization): Call complete_type.
22334
22335 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
22336
22337 * cvt.c (reference_binding): A REF_BIND gets the reference type.
22338 (implicit_conversion): Likewise.
22339 (convert_like): Likewise.
22340 (compare_ics): Likewise.
22341 (compare_qual): Likewise.
22342 (print_z_candidates): Handle no candidates.
22343 (build_new_op): Don't handle builtin COND_EXPR for now.
22344
22345 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
22346
22347 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
22348
22349 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
22350
22351 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
22352
22353 * cvt.c (build_builtin_candidate): Oops.
22354 (build_new_op): Oops.
22355
22356 * method.c (build_opfncall): Pass COND_EXPR on.
22357 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
22358 (add_builtin_candidate{,s}): Likewise.
22359 (add_builtin_candidates): Likewise.
22360 (print_z_candidates, op_error, build_new_op): Likewise.
22361 (type_decays_to): New fn.
22362 * lex.c (init_lex): Just say ?: for COND_EXPR.
22363
22364 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22365
22366 * typeck.c (complete_type): Call layout_type rather than building
22367 a new array type.
22368
22369 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
22370 only use ptrdiff_t.
22371
22372 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
22373
22374 * cvt.c: Always compile the new overloading code (but don't use it).
22375 (implicit_conversion): Add a BASE_CONV when converting to
22376 the same class type.
22377 (convert_like): Handle BASE_CONV.
22378
22379 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22380
22381 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
22382 (add_builtin_candidate): Likewise.
22383
22384 NEW_OVER changes:
22385 * typeck.c (build_x_function_call): Try an operator function
22386 whenever we call an object of class type.
22387 * method.c (build_opfncall): Pass CALL_EXPRs through.
22388 * cvt.c (implicit_conversion): Do const-ref case first.
22389 (add_conv_candidate, build_object_call, op_error): New fns.
22390 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
22391 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
22392 builtin candidates.
22393 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
22394 Fall back on preincrement handling. Use op_error.
22395 Handle warn_synth.
22396 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
22397 an error_mark_node.
22398 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
22399 properly.
22400
22401 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
22402
22403 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
22404
22405 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
22406
22407 * typeck.c (build_component_ref_1): Use build_component_ref
22408 instead of open coding it here.
22409
22410 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
22411
22412 * g++.c (main): Don't link with -lg++.
22413
22414 NEW_OVER changes:
22415 * cvt.c (convert_to_reference): Don't use convert_from_reference on
22416 result of build_type_conversion.
22417 (cp_convert): Only call build_method_call for ctors if
22418 build_type_conversion failed.
22419 (ptr_complete_ob): New function.
22420 (TYPE_PTR{,OB,MEM}_P): New macros.
22421 ({add,build}_builtin_candidate{,s}): New functions.
22422 (print_z_candidates): Handle builtins.
22423 (build_user_type_conversion_1): Don't use conversion fns for
22424 converting to a base type.
22425 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
22426 (build_user_type_conversion): Use convert_from_reference.
22427 (build_new_op): New function.
22428 (build_over_call): Fix handling of methods.
22429 (compare_ics): Handle AMBIG_CONV properly.
22430 * typeck2.c: Increment abort count.
22431 * method.c (build_opfncall): Forward most requests to build_new_op.
22432 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
22433
22434 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22435
22436 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
22437 invalid second argument to dump_expr_list.
22438
22439 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
22440
22441 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
22442
22443 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
22444
22445 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
22446 ASSEMBLE_EXTERNAL.
22447
22448 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
22449
22450 * typeck2.c (process_init_constructor): New pedwarn for using { }
22451 to initialize a pointer to member function.
22452 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
22453 we can avoid the new error.
22454
22455 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
22456
22457 * typeck.c (build_ptrmemfunc1): New function to hide details of
22458 pointer to member functions better.
22459
22460 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
22461
22462 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
22463 methods into the actual method, as we know the implied object is
22464 not used.
22465
22466 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22467
22468 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
22469 inside a system header.
22470
22471 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
22472
22473 * call.c (build_method_call): Call complete_type on the
22474 instance type.
22475
22476 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
22477
22478 * typeck.c (build_component_ref): Always build up an OFFSET_REF
22479 for obj_ptr->func so that we can know which object to use in a
22480 method call.
22481
22482 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
22483
22484 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
22485 around things. Also improve maintainability.
22486
22487 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
22488
22489 * decl.c (grokdeclarator): Check for overflow when evaluating an
22490 array dimension.
22491
22492 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
22493
22494 * cvt.c (cp_convert): Don't check for ambiguity with constructor
22495 if NEW_OVER.
22496
22497 * typeck.c (build_x_function_call): Pass function overload
22498 questions to new overloading code if NEW_OVER.
22499 * init.c (expand_aggr_init_1): Only check for type conversion ops
22500 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
22501 Don't check for ambiguity with constructor if NEW_OVER.
22502 * cvt.c (convert_to_reference): Dereference the result of a type
22503 conversion operator.
22504 (build_conv): Propagate ICS_USER_FLAG.
22505 (implicit_conversion): Call instantiate_type.
22506 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
22507 (add_function_candidate): Fix cv-quals on argtype.
22508 (print_z_candidates): New function.
22509 (build_new_function_call): Call it.
22510 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
22511 consider non-converting constructors.
22512 Call print_z_candidates.
22513 Return an AMBIG_CONV for an ambiguous conversion.
22514 (build_user_type_conversion): Handle AMBIG_CONV.
22515 (convert_like): Fix test for building TARGET_EXPR.
22516 Call instantiate_type.
22517 Handle AMBIG_CONV and LVALUE_CONV.
22518 (build_over_call): Handle 0 args and ellipsis.
22519 * cp-tree.def: Add AMBIG_CONV.
22520
22521 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
22522
22523 * decl.c (lookup_name_real): If we find mem in obj when parsing
22524 `obj->mem', make sure we return the right value.
22525
22526 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
22527
22528 * search.c (get_base_distance): Call complete_type.
22529
22530 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
22531
22532 * decl.c (store_bindings): Make static.
22533
22534 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
22535
22536 * init.c (expand_aggr_init_1): Don't check type conversions if
22537 NEW_OVER.
22538
22539 * cvt.c (z_candidate): Put back template field.
22540 (add_function_candidate): Set it.
22541 (add_template_candidate): Likewise.
22542 (joust): Use it.
22543 (compare_qual): Handle references and pointers to members.
22544 (compare_ics): Handle reference bindings.
22545
22546 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
22547
22548 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
22549
22550 * call.c (compute_conversion_costs): Call complete_type.
22551
22552 * tree.c (vec_binfo_member): Use comptypes instead of comparing
22553 pointers, so we can handle template parameters.
22554
22555 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
22556
22557 * cvt.c (cp_convert_to_pointer): We have to call complete_type
22558 here; let's make it explicit instead of a side effect of an
22559 error check.
22560
22561 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
22562
22563 * cvt.c (z_candidate): Remove template field.
22564 (reference_binding): Handle binding to temporary.
22565 (implicit_conversion): Likewise.
22566 (add_function_candidate): Handle artificial constructor parms.
22567 Handle functions with too few parms.
22568 (add_template_candidate): New function.
22569 (build_user_type_conversion_1): Handle constructors.
22570 (convert_like): Likewise.
22571 (build_over_call): Likewise.
22572 (build_new_function_call): Support templates.
22573 (compare_ics): Fix reference, inheritance handling.
22574
22575 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
22576
22577 * decl.c: Add signed_size_zero_node.
22578 (init_decl_processing): Build it.
22579 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
22580 when we're trying to make a negative delta.
22581
22582 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22583
22584 Stop doing this damn index==strchr variable name confusion.
22585 * class.c (add_virtual_function): Change local var INDEX to be
22586 named IDX.
22587 (add_method): Likewise.
22588 * lex.c (print_parse_statistics): Likewise.
22589 * search.c (make_memoized_table_entry): Likewise.
22590 (lookup_fnfields_here): Likewise.
22591 (lookup_field): Likewise.
22592 (lookup_fnfields): Likewise.
22593 (get_baselinks): Likewise.
22594 * sig.c (build_signature_table_constructor): Likewise.
22595 (build_signature_method_call): Likewise.
22596 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
22597 (get_member_function_from_ptrfunc): Likewise.
22598 (build_ptrmemfunc): Change local var INDEX to be IDX.
22599 (c_expand_start_case): Likewise.
22600
22601 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
22602
22603 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
22604 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
22605 (convert_to_reference): Use build_type_conversion to convert to
22606 the reference type directly.
22607 (standard_conversion): Fix void* case, non-conversions.
22608 (reference_binding): Fix expr == 0 case, non-conversions.
22609 (convert_like): Support REF_BIND.
22610 (compare_qual): Split out from compare_ics.
22611 (compare_ics): Use it, handle icses with only a qual_conv.
22612
22613 * init.c (expand_vec_init): Don't crash if decl is NULL.
22614
22615 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
22616
22617 * mpw-config.in: New file, configury for Mac MPW.
22618 * mpw-make.sed: New file, makefile editing for MPW.
22619
22620 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22621
22622 * pt.c (instantiate_class_template): Call repo_template_used.
22623
22624 * search.c (lookup_conversions): Only lookup conversions in
22625 complete types.
22626
22627 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22628
22629 * cp-tree.def: Renamed from tree.def, to avoid confusion with
22630 gcc's tree.def.
22631 * cp-tree.h, lex.c: Include cp-tree.def.
22632 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
22633
22634 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
22635
22636 * init.c (build_vec_delete_1): Call complete_type.
22637
22638 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
22639
22640 * except.c (start_anon_func): Make sure anonymous functions are
22641 never external.
22642
22643 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
22644
22645 * decl.c (finish_function): If function_depth > 1, set nested.
22646
22647 * decl2.c (grokbitfield): Revert Bob's change.
22648 * class.c (finish_struct_1): Fix handling of named bitfield widths.
22649
22650 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
22651
22652 * pt.c (add_pending_template): Handle types.
22653 (lookup_template_class): With -fexternal-templates, just add the class
22654 to pending_templates instead of instantiating it now.
22655 * decl2.c (finish_file): Handle types in pending_templates.
22656
22657 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
22658
22659 * decl2.c (grokbitfield): Handle constant decls appropriately.
22660 Give an appropriate error message now instead of spewing core
22661 later.
22662
22663 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
22664
22665 * decl2.c: Don't turn on thunks by default for now.
22666
22667 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
22668
22669 * typeck.c (complete_type): Handle error_mark_node.
22670 (common_type, OFFSET_TYPE): Handle template_type_parms.
22671
22672 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
22673
22674 * pt.c (instantiate_decl): If at_eof, call import_export_decl
22675 regardless of DECL_INLINE.
22676
22677 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
22678
22679 * class.c (finish_struct_bits): Copy TYPE_SIZE.
22680
22681 * rtti.c (build_dynamic_cast): Support templates.
22682 * tree.def: Support DYNAMIC_CAST_EXPR.
22683 * pt.c (tsubst_copy): Likewise.
22684 * decl2.c (build_expr_from_tree): Likewise.
22685
22686 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
22687
22688 * typeck.c (build_static_cast): Support templates.
22689 (build_const_cast): Likewise.
22690 * tree.def: Support CONST/STATIC_CAST_EXPR.
22691 * pt.c (tsubst_copy): Likewise.
22692 * decl2.c (build_expr_from_tree): Likewise.
22693
22694 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
22695
22696 * decl2.c (finish_vtable_vardecl): Don't trust
22697 TREE_SYMBOL_REFERENCED for vtables of local classes.
22698
22699 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
22700
22701 * pt.c (tsubst_copy): Handle operator T.
22702
22703 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22704
22705 * init.c (build_delete): Move creation of PARMS inside test of
22706 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
22707
22708 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
22709
22710 * typeck.c (build_conditional_expr): Don't assume that
22711 the arguments to ?: are always pointers or records.
22712
22713 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
22714
22715 * decl2.c (import_export_decl): Still emit static/weak/comdat
22716 copies of inline template functions with -fno-implicit-templates.
22717
22718 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
22719
22720 * init.c (build_delete): Determine the complete basetype
22721 path to the destructor we're calling.
22722
22723 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
22724
22725 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
22726 initialize the enum, because we really and truly don't know where
22727 it came from.
22728 (start_enum): Don't copy integer_zero_node because
22729 build_enumerator will do it.
22730
22731 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22732
22733 * decl.c (finish_function): Do access control on base destructors.
22734
22735 * pt.c (tsubst, case FUNCTION_DECL): Set up
22736 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
22737 hose us.
22738
22739 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
22740
22741 * cvt.c (build_up_reference): If we have already extended the
22742 lifetime of the temporary, don't try it again.
22743 * typeck.c (c_expand_return): Don't try and convert the return
22744 value twice when we want a reference, once is enough.
22745
22746 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
22747
22748 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
22749 LOOKUP_ONLYCONVERTING at all for now.
22750
22751 * search.c (add_conversions): Put the conversion function in
22752 TREE_VALUE, the basetype in TREE_PURPOSE.
22753 * cvt.c (build_type_conversion): Adjust.
22754 * cvt.c (build_expr_type_conversion): Adjust.
22755 * call.c (user_harshness): Adjust.
22756
22757 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
22758
22759 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
22760 backend's benefit.
22761
22762 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
22763
22764 * except.c (expand_start_catch_block): Add a dummy region, if we
22765 get an error, so that we can avoid core dumping later.
22766
22767 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
22768
22769 * cp-tree.h (OFFSET_REF): Remove.
22770 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
22771 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
22772 * init.c (expand_aggr_init_1): Likewise.
22773 (build_new): Likewise.
22774 * typeck.c (expand_target_expr): Likewise.
22775
22776 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
22777
22778 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
22779 TARGET_EXPR.
22780
22781 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
22782
22783 * cvt.c (build_up_reference): Redo how and when temporaries are
22784 created.
22785 * decl.c (grok_reference_init): Don't try and be smart about
22786 running cleanups.
22787
22788 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
22789
22790 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
22791 (TARGET_EXPR...), now that it has 4 arguments.
22792 * tree.c (build_cplus_new): Likewise.
22793
22794 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22795
22796 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
22797
22798 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
22799 * decl.c (struct saved_scope): Remove named_labels,
22800 {base,member}_init_list.
22801 (maybe_push_to_top_level): Don't set them. Call
22802 push_cp_function_context if appropriate.
22803 (pop_from_top_level): Likewise.
22804
22805 * method.c (do_build_assign_ref): Remove obsolete check of
22806 TYPE_HAS_ASSIGN_REF (basetype).
22807
22808 * decl.c (grokfndecl): Diagnose user definition of
22809 implicitly-declared methods.
22810
22811 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
22812
22813 * method.c (do_build_copy_constructor): Add code to give
22814 meaningful error messages instead of crashing.
22815 (do_build_assign_ref): Don't synthesize assignment operators for
22816 classes containing reference or const members.
22817
22818 * class.c (struct base_info): Remove cant_synth_copy_ctor
22819 and cant_synth_asn_ref.
22820 (finish_base_struct): Remove the code that tries to conditionalize
22821 synthesis of copy constructors & assignment operators based on
22822 access permissions. Instead, let it fail when it tries to
22823 synthesize the copy constructor. This will give meaningful error
22824 messages instead of silently generating code to perform a bitcopy.
22825
22826 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
22827
22828 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
22829 determining types for constant values.
22830
22831 * decl.c (struct named_label_list): Use instead of stuffing
22832 random items into a TREE_LIST node.
22833 (named_label_uses): Use the new struct.
22834 (poplevel): Likewise.
22835 (lookup_label): Likewise.
22836 (define_label): Add an error message to tell the user the line
22837 where the goto is located in addition to the destination of the
22838 goto.
22839 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
22840 named_label_uses.
22841 (finish_function): Likewise.
22842
22843 (start_decl): Complain about defining a static data member
22844 in a different type from which it was declared.
22845
22846 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
22847
22848 * cvt.c (build_expr_type_conversion): Adjust.
22849
22850 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
22851
22852 * call.c (build_method_call): Always convert 'this' to the
22853 appropriate type.
22854
22855 * search.c (add_conversions): Put the conversion function in
22856 TREE_VALUE, the type in TREE_PURPOSE.
22857 * cvt.c (build_type_conversion): Adjust.
22858 * call.c (user_harshness): Adjust.
22859
22860 * method.c (emit_thunk): Call temporary_allocation and
22861 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
22862
22863 * tree.c (build_cplus_array_type): Handle tweaking of
22864 TYPE_MAIN_VARIANT here.
22865 * typeck.c (common_type): Not here.
22866
22867 * typeck.c (complete_type): Only try to complete an array type if
22868 it has a domain.
22869
22870 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
22871
22872 * decl.c (grokvardecl): Call complete_type.
22873 (grokdeclarator): Call complete_type for PARM_DECLs.
22874
22875 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
22876
22877 * pt.c (instantiate_class_template): Re-set
22878 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
22879
22880 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
22881
22882 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
22883 smart enough to do it right.
22884 * tree.c (cp_expand_decl_cleanup): Likewise.
22885 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
22886 cp_expand_decl_cleanup.
22887 (store_parm_decls): Likewise.
22888 (hack_incomplete_structures): Likewise.
22889 * except.c (push_eh_cleanup): Likewise.
22890
22891 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
22892
22893 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
22894 frontend to the backend where it belongs.
22895 * tree.c (unsave_expr): Likewise.
22896 (unsave_expr_now): Likewise.
22897 * tree.def (UNSAVE_EXPR): Likewise.
22898 * cp-tree.h (unsave_expr): Likewise.
22899 (unsave_expr_now): Likewise.
22900
22901 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
22902
22903 * init.c (emit_base_init): Make sure the partial EH cleanups live
22904 on the function_obstack.
22905
22906 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
22907
22908 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
22909 when checking for pointer types.
22910
22911 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
22912
22913 * pt.c (instantiate_class_template): Remove obsolete check for
22914 access declarations.
22915
22916 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
22917
22918 * call.c (build_overload_call): Simplify calls to
22919 build_overload_call by removing last parameter.
22920 (build_method_call): Likewise.
22921 * cp-tree.h: Likewise.
22922 * method.c (build_opfncall): Likewise.
22923 * typeck.c (build_x_function_call): Likewise.
22924
22925 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
22926
22927 * call.c (default_parm_conversions): Factor out common code.
22928 (build_method_call): Use it.
22929 (build_overload_call_real): Use it.
22930
22931 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
22932
22933 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
22934 but pedwarn as the code is bogus.
22935 * typeck.c (decay_conversion): Likewise.
22936 (build_function_call_real): Use build_addr_func instead of
22937 default_conversion. Don't allow pointer-to-method functions down
22938 here.
22939 (build_unary_op): Use real pointer-to-member functions instead of
22940 fake ones.
22941 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
22942 (convert_for_assignment): Removed some obsolete code.
22943 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
22944 build_x_function_call instead of current_class_ptr. Only call
22945 digest_init once on an initializer, we do this just checking
22946 TREE_TYPE.
22947 (build_expr_from_tree): Pass current_class_ref to
22948 build_x_function_call instead of current_class_ptr.
22949 * init.c (build_member_call): Likewise.
22950 * pase.y: Likewise.
22951 * error.c (dump_expr): Handle OFFSET_REFs better.
22952 * pt.c (unify): Handle pointer-to-member functions better.
22953 * decl.c (finish_function): Clear out current_class_ref just like
22954 we do for current_class_ptr.
22955
22956 * typeck.c (get_delta_difference): Handle virtual bases better.
22957
22958 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
22959
22960 * sig.c (build_signature_table_constructor): Use the delta for
22961 the original basetype for this virtual function with thunks.
22962 (build_signature_method_call): We still need to adjust 'this'
22963 with thunks.
22964
22965 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
22966
22967 * call.c (build_addr_func): New routine. Used to get the `real'
22968 address of a function or a method. Needed to avoid getting a
22969 pointer-to-member function.
22970 (build_call): New routine to build CALL_EXPRs.
22971 (build_method_call): Use it.
22972 * cvt.c (convert_to_aggr): Likewise.
22973 * typeck.c (build_function_call_real): Likewise.
22974 * sig.c (build_signature_table_constructor): Use build_addr_func.
22975 * cp-tree.h (build_call, build_addr_func): Declare them.
22976
22977 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
22978
22979 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
22980 * parse.y: Remove uses of LOOKUP_AGGR.
22981
22982 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
22983
22984 * *.[chy]: Rename current_class_decl to current_class_ptr, and
22985 C_C_D to current_class_ref.
22986
22987 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
22988
22989 * call.c (convert_harshness): Tighten up pointer conversions.
22990
22991 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
22992
22993 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
22994 (finish_file): Likewise.
22995
22996 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
22997
22998 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
22999
23000 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
23001 code.
23002
23003 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
23004
23005 * decl2.c: Turn on thunks by default where supported.
23006
23007 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
23008
23009 * cp-tree.h (build_overload_call_maybe): Removed.
23010 * call.c (build_overload_call_real): Invert meaning of last arg to
23011 be require_complete.
23012 (build_overload_call): Likewise.
23013 * typeck.c (build_x_function_call): Use build_overload_call_real
23014 instead of build_overload_call_maybe.
23015
23016 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
23017
23018 * decl2.c (finish_file): Don't try to emit functions that haven't
23019 been compiled.
23020
23021 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
23022
23023 * decl2.c (finish_vtable_vardecl): Oops.
23024
23025 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
23026 Also store the bindings from previous_class_values.
23027 (pop_from_top_level): Restore them.
23028
23029 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
23030
23031 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
23032 symbol has been referenced.
23033 (finish_file): Re-join synthesis/vtable loop with inline emission
23034 loop, disable inlining when an inline is output.
23035
23036 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
23037
23038 * except.c (init_exception_processing): Setup saved_in_catch.
23039 (push_eh_cleanup): Reset __eh_in_catch.
23040 (expand_start_catch_block): Set __eh_in_catch.
23041
23042 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
23043
23044 * except.c (push_eh_cleanup): Add tracking for whether or not we
23045 have an active exception object.
23046 (expand_builtin_throw): Use it to make sure a rethrow without an
23047 exception object is caught.
23048
23049 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
23050
23051 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
23052 cache.
23053
23054 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
23055
23056 * decl2.c (finish_file): Also use sentries for vars with
23057 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
23058 created).
23059
23060 * lex.c (handle_cp_pragma): Disable #pragma
23061 interface/implementation if SUPPORTS_ONE_ONLY > 1.
23062
23063 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
23064
23065 * method.c (emit_thunk): Wrap default case in
23066 temporary/permanent_allocation.
23067
23068 * method.c (make_thunk): Use DECL_ONE_ONLY.
23069 (emit_thunk): Call assemble_end_function.
23070
23071 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
23072
23073 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
23074 (import_export_decl): Likewise.
23075 (finish_prevtable_vardecl): Disable vtable hack if
23076 SUPPORTS_ONE_ONLY > 1.
23077
23078 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
23079
23080 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
23081 PREDECREMENT_EXPRs take two arguments, not one.
23082
23083 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
23084
23085 * class.c (build_vtable_entry): Don't build thunks for abstract
23086 virtuals.
23087
23088 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
23089 frontend.
23090
23091 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
23092
23093 * class.c (set_rtti_entry): Use size_zero_node.
23094 (build_vtable): Likewise.
23095
23096 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
23097
23098 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
23099 (prepare_fresh_vtable): Likewise.
23100
23101 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
23102
23103 * method.c (emit_thunk): Call mark_used on the target function.
23104
23105 * call.c (build_method_call): Don't warn about pending templates.
23106
23107 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
23108
23109 * decl2.c (finish_file): Fix list walking logic.
23110
23111 * typeck2.c (check_for_new_type): Only warn if -pedantic.
23112
23113 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
23114
23115 * class.c (finish_struct_1): Remove old code for
23116 dont_allow_type_definitions.
23117 * cp-tree.h: Likewise.
23118 * spew.c: Make sure cp-tree.h is included before parse.h, so the
23119 definition of flagged_type_tree is found before it is used.
23120 * lex.c: Likewise.
23121 * parse.y: Added the ftype member to the type union, and changed a
23122 number of rules to use it instead of ttype. Added calls to
23123 check_for_new_type() as appropriate.
23124 * typeck2.c (check_for_new_type): New function for checking
23125 if a newly defined type appears in the specified tree.
23126 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
23127 for check_for_new_type().
23128
23129 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
23130
23131 * decl2.c (finish_file): Only use a sentry if the decl is public.
23132
23133 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
23134 don't pass LOOKUP_ONLYCONVERTING.
23135
23136 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
23137
23138 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
23139 properly keeps track of const and volatile type modifiers.
23140
23141 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
23142
23143 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
23144 * pt.c (comp_template_args): Use it.
23145
23146 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
23147 assemble_external for artificial function decls.
23148
23149 * decl.c (cp_finish_decl): Oops.
23150
23151 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
23152
23153 * decl2.c (import_export_decl): Put static data member templates
23154 into common storage, or make them weak, depending on whether they
23155 are dynamically or statically initialized.
23156 (get_sentry): New function.
23157 (finish_file): Do import_export_decl for static data members before
23158 building the init/fini functions. Don't init/fini a variable that's
23159 EXTERNAL. Use a sentry for variables in common. Fix mismatching
23160 push/pop_temp_slots.
23161 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
23162 expand_static_init thang.
23163 * method.c (get_id_2): New function.
23164
23165 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
23166
23167 * parse.y (empty_parms): Make sure we use C++-style prototypes
23168 when we're declaring member functions.
23169
23170 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
23171
23172 * Makefile.in (CONFLICTS): 16 s/r conflicts.
23173 * parse.y (self_template_type): New nonterminal.
23174
23175 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
23176
23177 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
23178 name.
23179 * parse.y (base_class.1): Allow 'typename foo::bar'.
23180
23181 * lex.c (check_newline): Remove #pragma code that plays with the
23182 input stream, since we now deal with tokens. Clear nextchar when
23183 we're done.
23184 (handle_cp_pragma): Use real_yylex.
23185 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
23186 in one place.
23187
23188 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
23189
23190 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
23191
23192 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23193
23194 * parse.y: New token SELFNAME for potential constructor.
23195 * spew.c (yylex): Handle it.
23196 * lex.c (identifier_type): Produce it.
23197
23198 * parse.y (complete_type_name): In :: case, don't push class binding.
23199 (complex_type_name): Likewise.
23200
23201 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
23202
23203 * typeck.c (build_reinterpret_cast): Handle pointer to member
23204 functions.
23205
23206 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23207
23208 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
23209 pragmas.
23210 (check_newline): Put the vtable/unit/implementation/interface pragma
23211 code into handle_cp_pragma, replacing it with a call.
23212 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
23213 args. Get the next token after handling the pragma token.
23214
23215 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
23216
23217 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
23218 (convert_to_pointer_force): Likewise.
23219
23220 * init.c (build_new): Fix array new without -fcheck-new.
23221
23222 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
23223
23224 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
23225 tree.c: Lose TYPE_NESTED_NAME.
23226
23227 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
23228 as identifiers.
23229
23230 * tree.def: Add VEC_INIT_EXPR.
23231 * expr.c (cplus_expand_expr): Handle it.
23232 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
23233 the extra file-scope symbol nastiness.
23234
23235 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
23236
23237 * method.c (make_thunk): Thunks are static.
23238 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
23239
23240 * decl2.c (mark_vtable_entries): Emit thunks as needed.
23241 (finish_file): Don't emit them here.
23242
23243 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
23244
23245 * rtti.c (build_dynamic_cast): Handle null pointers.
23246 (ifnonnull): New function.
23247
23248 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
23249
23250 * call.c (build_method_call): Remember the original basetype we
23251 were called with. Give an error message instead of trying
23252 (incorrectly) to call a non-static member function through a
23253 non-inherited class.
23254
23255 * search.c (expand_upcast_fixups): Mark the new fixup as
23256 DECL_ARTIFICIAL.
23257
23258 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
23259
23260 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
23261
23262 * class.c (set_rtti_entry): Fix for thunks.
23263
23264 * decl2.c (import_export_decl): Still emit typeinfo fns for
23265 cv-variants of builtin types.
23266
23267 * rtti.c (expand_class_desc): Set up base_info_type_node here.
23268 (init_rtti_processing): Instead of here.
23269
23270 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
23271
23272 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
23273 (build_typeid): Only complain about taking dynamic typeid without
23274 -frtti.
23275
23276 * decl2.c: flag_rtti defaults to 1.
23277
23278 * rtti.c (get_tinfo_var): The general class case is now smaller.
23279 (init_rtti_processing): Pack the latter three fields of base_info
23280 into 32 bits.
23281
23282 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
23283
23284 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
23285
23286 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
23287
23288 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
23289 (push_memoized_context): Split out code to undefer pop_type_level to
23290 (clear_memoized_cache): here.
23291 (pop_memoized_context): We can only handle one layer of deferral of
23292 pop_type_level so clear the cache, if there was a previous level.
23293
23294 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
23295
23296 * rtti.c (init_rtti_processing): Build up base_info_type_node.
23297 (expand_class_desc): Use one pointer to an array of base_info
23298 structs, passed using a CONSTRUCTOR.
23299
23300 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
23301
23302 * class.c (build_vbase_path): Remove block extern for
23303 flag_assume_nonnull_objects here.
23304 (build_vfn_ref): Split out functionality into build_vtbl_ref.
23305 (build_vtbl_ref): New routine.
23306 (build_vtable): Set up rtti info here.
23307 (add_virtual_function): Note in CLASSTYPE_RTTI the best
23308 place where we can get the rtti pointers from to avoid having to
23309 search around for a place.
23310 (finish_base_struct): Likewise.
23311 (finish_struct_1): Likewise. Never create totally new vtables
23312 with totally new vtable pointers for rtti. Disable code to layout
23313 vtable pointers better until we want to break binary
23314 compatibility.
23315 * rtti.c (build_headof_sub): New routine to convert down to a
23316 sub-object that has an rtti pointer in the vtable.
23317 (build_headof): Use it. Also, use build_vtbl_ref now to be more
23318 maintainable.
23319 (build_dynamic_cast): Make sure we have saved it, if we need to.
23320 * search.c (dfs_init_vbase_pointers): Disable code that deals with
23321 a more efficient vtable layout, enable later.
23322 * call.c (flag_assume_nonnull_objects): Moved declaration to
23323 * cp-tree.h: here. Declare build_vtbl_ref.
23324 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
23325 function calls that want a tree.
23326
23327 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
23328
23329 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
23330 other X subobjects in the most derived type. Ack.
23331
23332 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
23333 get_typeid will do it for us.
23334 (get_typeid_1): Break out call-building for expand_*_desc to use.
23335 (get_typeid): Call it.
23336 (expand_*_desc): Likewise.
23337 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
23338 and void *.
23339 (init_decl_processing): Lose builtin_type_tdescs lossage.
23340 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
23341
23342 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
23343
23344 * pt.c (tsubst): When calling set_nested_typename, use
23345 TYPE_NESTED_NAME (current_class_type) instead of
23346 current_class_name.
23347
23348 * decl.c (pushdecl): Likewise.
23349 (pushdecl_class_level): Likewise.
23350 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
23351 set_nested_typename.
23352
23353 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
23354
23355 * rtti.c (synthesize_tinfo_fn): Handle arrays.
23356
23357 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
23358
23359 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
23360
23361 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
23362 (init_rtti_processing): Lose bad_cast_type.
23363 (build_dynamic_cast): Use throw_bad_cast.
23364
23365 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
23366
23367 * decl2.c (finish_file): Don't synthesize artificial functions
23368 that are external and not inline.
23369
23370 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
23371
23372 * decl2.c (finish_file): Handle having new inlines added to
23373 saved_inlines by synthesis.
23374
23375 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
23376
23377 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
23378
23379 RTTI rewrite to initialize nodes as needed, not require that
23380 users #include <typeinfo>, complete functionality and reduce wasted
23381 space.
23382 * rtti.c (init_rtti_processing): New fn.
23383 (build_typeid): The vtable entry is now a function.
23384 (get_tinfo_var): New fn.
23385 (get_tinfo_fn): Likewise.
23386 (get_typeid): Use it.
23387 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
23388 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
23389 points __rtti_*.
23390 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
23391 (synthesize_tinfo_fn): New fn.
23392 * method.c (build_t_desc_overload): Lose.
23393 (build_overload_with_type): More generic.
23394 * decl.c (init_decl_processing): Call init_rtti_processing.
23395 * class.c (set_rtti_entry): Use get_tinfo_fn.
23396 * decl2.c (mark_vtable_entries): Mark the rtti function.
23397 (finish_prevtable_vardecl): Don't build_t_desc.
23398 (import_export_decl): Handle tinfo functions.
23399 (finish_file): Likewise.
23400 * typeck.c (inline_conversion): New fn.
23401 (build_function_call_real): Use it.
23402 * cp-tree.h: Add decls.
23403
23404 * method.c (hack_identifier): Also convert component_refs from
23405 references.
23406
23407 * lex.c (cons_up_default_function): Use the type, not the name, in
23408 declspecs.
23409
23410 * decl2.c (import_export_vtable): Fix weak vtables.
23411
23412 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
23413
23414 * search.c (get_base_distance_recursive): Fix access checks for
23415 protected bases.
23416
23417 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23418
23419 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
23420 cp-tree.h.
23421 (convert_harshness): Add prototypes wrapped by PROTO.
23422 * decl2.c (grok_function_init): Likewise.
23423 (do_toplevel_using_decl): Change to void return type.
23424 * class.c (build_vtable_entry): Remove decl of make_thunk.
23425 (merge_overrides): Fix order of arg definitions.
23426 (finish_vtbls): Likewise.
23427 (fixup_vtable_deltas): Likewise.
23428 (modify_all_direct_vtables): Likewise.
23429 (modify_all_indirect_vtables): Likewise.
23430 * search.c (get_base_distance_recursive): Likewise.
23431 (get_abstract_virtuals_1): Likewise.
23432 (fixup_virtual_upcast_offsets): Likewise.
23433 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
23434 * init.c (perform_member_init): Fix order of arg definitions.
23435 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
23436 * cp-tree.h (make_thunk): Add decl.
23437 (overload_template_name, push_template_decl): Add decls.
23438 (do_toplevel_using_decl): Change to void return type.
23439 (vec_binfo_member): Add decl.
23440
23441 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23442
23443 * typeck.c (mark_addressable, convert_for_assignment,
23444 convert_for_initialization, pointer_int_sum, pointer_diff,
23445 unary_complex_lvalue): Add prototypes wrapped by PROTO.
23446 (convert_sequence): #if 0 fn decl, since definition also is.
23447
23448 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
23449
23450 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
23451 cast to pointer types for type searching.
23452
23453 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23454
23455 * typeck.c (get_delta_difference): Use cp_error, not error, in the
23456 case where BINFO == 0.
23457
23458 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
23459
23460 * call.c (build_method_call): Fix wording of error messages so
23461 constructors come out right.
23462
23463 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
23464
23465 * decl.c (push_overloaded_decl): Don't warn about hidden
23466 constructors when both the type and the function are declared
23467 in a system header file.
23468
23469 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
23470
23471 * class.c (finish_struct_1): Propagate the TYPE_PACKED
23472 flag for the type to the type's fields.
23473
23474 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23475
23476 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
23477
23478 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
23479
23480 * class.c (base_info, finish_base_struct): Replace
23481 needs_virtual_dtor with base_has_virtual.
23482
23483 (finish_struct_1): Remove the old code that tried to make default
23484 destructors virtual. Use base_has_virtual when checking if we need
23485 to add a vtable entry for the rtti code.
23486
23487 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
23488
23489 * pt.c (push_template_decl): Complain about template decl with
23490 inappropriate declaration.
23491
23492 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
23493
23494 * typeck.c (build_x_unary_op): Remove bogus check for taking
23495 the address of a member function.
23496
23497 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
23498
23499 * parse.y (constructor_declarator): Only push the class if
23500 we are not already in the class.
23501
23502 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
23503
23504 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
23505 Add additional argument to INIT_CUMULATIVE_ARGS.
23506
23507 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
23508
23509 * decl.c (shadow_tag): Fix error about anon union with methods.
23510
23511 * parse.y (self_reference): Only generate a self-reference if this
23512 is a non-template class.
23513 (opt.component_decl_list): Only use it if it was generated.
23514
23515 * parse.y (component_decl_1): Use constructor_declarator.
23516 (fn.def2): Likewise.
23517 (notype_component_declarator0): Likewise.
23518
23519 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
23520
23521 * typeck.c (build_x_unary_op): Add checks for taking the address
23522 of a TARGET_EXPR or of a member function, and give appropriate
23523 warnings.
23524
23525 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
23526
23527 * pt.c (process_template_parm): Allow template type parms to be
23528 used as types for template const parms.
23529
23530 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
23531
23532 * init.c (expand_vec_init): Ensure the eh cleanups are on the
23533 function_obstack.
23534
23535 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
23536
23537 * decl.c (lookup_name_real): Be even more picky about the
23538 ambiguous lookup warning.
23539 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
23540 * parse.y (constructor_declarator): Rather than here.
23541
23542 * parse.y (constructor_declarator): New nonterminal.
23543 (fn.def1): Use it.
23544 (explicit_instantiation): Likewise.
23545
23546 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23547
23548 Add implicit declaration of class name at class scope.
23549 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
23550 * parse.y (self_reference): New nonterminal.
23551 (opt.component_decl_list): Use it.
23552 (fn.def1): Add nested_name_specifier type_name cases.
23553 * class.c (build_self_reference): New function.
23554 (finish_struct): Handle access_default later, move self-reference
23555 decl to the end.
23556 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
23557 * cp-tree.h: Adjust.
23558
23559 * pt.c (do_function_instantiation): Separate handling of member
23560 functions and non-member functions properly.
23561
23562 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
23563
23564 * pt.c (process_template_parm): Improve error for 'volatile class K'.
23565
23566 * class.c (finish_struct_1): Check the right slot for destructors.
23567
23568 * decl.c (start_enum): Complain about enum templates.
23569
23570 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
23571
23572 * init.c (resolve_offset_ref): Offset pointers to member data by one.
23573 * typeck.c (unary_complex_lvalue): Likewise.
23574
23575 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
23576
23577 * typeck.c (c_expand_return): Check for a returned local
23578 array name, similar to the check for an ADDR_EXPR.
23579
23580 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
23581
23582 * decl.c (cp_finish_decl): Don't build cleanups for static
23583 variables here.
23584
23585 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
23586
23587 * typeck.c (build_modify_expr): Fix error messages to be more
23588 accurate.
23589 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
23590 assignment operators.
23591 * error.c (assop_as_string): Likewise. Add support for `%Q' for
23592 assignment operators.
23593
23594 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
23595
23596 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
23597 give an error if initialized. pedwarn about nested type with the
23598 same name as its enclosing class.
23599
23600 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
23601
23602 * typeck.c (require_complete_type): Be sure to instantiate the
23603 MAIN_VARIANT of the type.
23604
23605 * decl2.c (finish_file): Instantiate pending templates before
23606 processing static constructors and destructors.
23607
23608 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
23609 unless at_eof.
23610
23611 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
23612
23613 * decl2.c (delete_sanity): If error_mark_node is passed
23614 in as an expression, quit while we're ahead.
23615
23616 * decl.c (grokdeclarator): Give an error message if `friend'
23617 is combined with any storage class specifiers.
23618
23619 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
23620
23621 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
23622 definition of nonexistent nested type.
23623
23624 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
23625 not to say 'typedef'.
23626
23627 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23628
23629 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
23630 * search.c (dfs_walk, dfs_init_vbase_pointers,
23631 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
23632 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
23633
23634 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
23635
23636 * except.c (build_throw): Support minimal parse.
23637 * pt.c (tsubst_copy): Support THROW_EXPR.
23638 * decl2.c (build_expr_from_tree): Likewise.
23639
23640 * pt.c (mangle_class_name_for_template): Always allocate
23641 scratch_firstobj.
23642
23643 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
23644
23645 * cvt.c (cp_convert_to_pointer): Give an appropriate error
23646 when trying to cast from an incomplete type.
23647
23648 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23649
23650 * pt.c (instantiate_class_template): Don't bother setting up
23651 CLASSTYPE_TAGS explicitly, as the nested types will add
23652 themselves.
23653
23654 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
23655
23656 * decl.c (shadow_tag): Remove old error check for usage of
23657 an enum without a previous declaration.
23658 (xref_tag): Add error message about usage of enums without a
23659 previous declaration.
23660
23661 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
23662
23663 * lex.c (do_identifier): Only do name consistency check if we're
23664 parsing.
23665
23666 * pt.c (push_template_decl): Don't crash if we get a member defn
23667 that doesn't match.
23668
23669 * decl.c (xref_tag_from_type): New function to do an xref without
23670 always having to figure out code_type_node.
23671 * cp-tree.h: Declare it.
23672 * pt.c (instantiate_class_template): Use it for friend classes.
23673 (lookup_template_class): Use it.
23674
23675 * typeck2.c (build_functional_cast): Pull out a single parm before
23676 passing it to build_c_cast.
23677
23678 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
23679
23680 * expr.c (do_case): Give an error message if a pointer is
23681 given as a case value.
23682
23683 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
23684
23685 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
23686 an overload list.
23687
23688 * lex.c (cons_up_default_function): Really, now, interface hackery
23689 does not apply to synthesized methods.
23690
23691 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
23692
23693 * call.c (build_method_call): Ctors and dtors now have special names
23694 with respect to lookups.
23695 * class.c (add_method): Likewise.
23696 (grow_method): Likewise.
23697 (finish_struct_methods): Likewise.
23698 (warn_hidden): Likewise.
23699 (finish_struct_1): Likewise.
23700 * cvt.c (convert_to_reference): Likewise.
23701 (convert_to_aggr): Likewise.
23702 (cp_convert): Likewise.
23703 * decl2.c (check_classfn): Likewise.
23704 * init.c (expand_member_init): Likewise.
23705 (expand_default_init): Likewise.
23706 (expand_aggr_init_1): Likewise.
23707 (build_offset_ref): Likewise.
23708 (build_new): Likewise.
23709 (build_delete): Likewise.
23710 * lex.c (do_inline_function_hair): Likewise.
23711 * search.c (lookup_field_1): Likewise.
23712 (lookup_fnfields_here): Likewise.
23713 (lookup_field): Likewise.
23714 (lookup_fnfields): Likewise.
23715 (get_virtual_destructor): Likewise.
23716 (dfs_debug_mark): Likewise.
23717 (dfs_pushdecls): Likewise.
23718 (dfs_compress_decls): Likewise.
23719 * tree.c (layout_basetypes): Likewise.
23720 * typeck.c (build_component_ref): Likewise.
23721 (build_x_function_call): Likewise.
23722 (build_modify_expr): Likewise.
23723 (convert_for_initialization): Likewise.
23724 (build_functional_cast): Likewise.
23725 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
23726 (CTOR_NAME): New.
23727 (DTOR_NAME): New.
23728 * decl.c (ctor_identifier): New.
23729 (dtor_identifier): New.
23730 (init_decl_processing): Set them.
23731
23732 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
23733
23734 * typeck.c (build_component_ref): Don't get confused by fields whose
23735 context has no type name, like pointer to member functions.
23736
23737 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
23738
23739 * decl.c (grokdeclarator): Handle typedef without declarator.
23740
23741 * pt.c (tsubst): Handle SCOPE_REF in declarator.
23742
23743 * parse.y (bad_parm): Catch another case of missing `typename'.
23744
23745 * lex.c (yyprint): Handle TYPE_DECLs.
23746
23747 * decl.c (start_function): Don't try to be clever.
23748
23749 * lex.c: Lose compiler_error_with_decl.
23750 * typeck2.c: Lose error_with_aggr_type.
23751 (incomplete_type_error): Use cp_* instead of old functions.
23752 (readonly_error): Likewise.
23753 * typeck.c (convert_arguments): Likewise.
23754 * search.c (lookup_nested_field): Likewise.
23755 * method.c (make_thunk): Likewise.
23756 * decl.c (grokparms): Likewise.
23757 * cp-tree.h: Update.
23758
23759 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
23760 and value.
23761
23762 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
23763
23764 * method.c (build_opfncall): When deleting a pointer to an
23765 array, build a new pointer to the tree past any ARRAY_TYPE
23766 nodes.
23767
23768 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23769
23770 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
23771
23772 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
23773
23774 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
23775 and ! DECL_INLINE.
23776
23777 * decl.c (finish_function): Don't set nested based on
23778 hack_decl_function_context.
23779 * parse.y (function_try_block): Check for nested function.
23780 (pending_inlines): Likewise.
23781
23782 * decl2.c (build_expr_from_tree): If a unary op already has a
23783 type, just return it.
23784
23785 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
23786
23787 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
23788 (finish_file): Check the return value of walk_vtables.
23789 (finish_prevtable_vardecl): Return int.
23790 (finish_vtable_vardecl): Likewise.
23791 (prune_vtable_vardecl): Likewise.
23792 * lex.c (set_vardecl_interface_info): Likewise.
23793 * cp-tree.h: Adjust return types.
23794
23795 * class.c (delete_duplicate_fields_1): Don't complain about
23796 duplicate nested types if they're the same type.
23797 (finish_struct): Remove check for duplicate.
23798 * decl2.c (grokfield): Don't check for typedef of anonymous type.
23799
23800 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
23801
23802 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
23803
23804 * decl.c (grokdeclarator): Lose special handling of class-level
23805 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
23806 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
23807
23808 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
23809
23810 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
23811
23812 * search.c (compute_access): Fix handling of anonymous union
23813 members.
23814 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
23815 from anonymous unions to their members.
23816
23817 * typeck.c (build_x_function_call): For static member functions,
23818 hand off to build_member_call.
23819
23820 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
23821
23822 * typeck.c (build_component_ref): Handle OFFSET_REFs.
23823
23824 * init.c (expand_vec_init): Fix init == 0 case.
23825
23826 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
23827
23828 * init.c (build_new): pedwarn about init and array new.
23829 (expand_vec_init): Handle lists, use convert_for_initialization.
23830
23831 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
23832 when converting to an aggregate type.
23833 * cvt.c (cp_convert): Pass it through.
23834
23835 * typeck.c (build_conditional_expr): Handle user-defined
23836 conversions to slightly different types.
23837
23838 * decl.c (grokdeclarator): Force an array type in a parm to be
23839 permanent.
23840
23841 * decl2.c (do_using_directive): Sorry.
23842 (do_namespace_alias): Likewise.
23843 * lex.c (real_yylex): Warn about using the `namespace' keyword.
23844
23845 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
23846
23847 * parse.y (datadef): Move call to note_list_got_semicolon up.
23848
23849 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
23850
23851 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
23852
23853 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
23854
23855 * decl.c (cp_finish_decl): The exception regions have to be
23856 nested, not overlapping. We start the exception region for a
23857 decl, after it has been fully built, and all temporaries for it
23858 have been cleaned up.
23859
23860 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
23861
23862 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
23863
23864 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
23865
23866 * tree.def: Add RETURN_INIT.
23867 * pt.c (instantiate_decl): Handle RETURN_INIT.
23868 * decl.c (store_return_init): Handle minimal_parse_mode.
23869
23870 * tree.c (cp_build_type_variant): Just return an error_mark_node.
23871 * decl.c (make_typename_type): Don't try to get the file and line
23872 of an identifier.
23873 * typeck.c (comptypes): Handle TYPENAME_TYPE.
23874
23875 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
23876
23877 * decl.c (poplevel): Make sure we clear out and restore old local
23878 non-VAR_DECL values by default when they go out of scope.
23879
23880 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
23881
23882 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
23883 referring to addresses of variables and functions.
23884
23885 * error.c (dump_expr): Support SIZEOF_EXPR.
23886
23887 * init.c (do_friend): Use the return value of check_classfn.
23888
23889 * typeck.c (convert_arguments): Call complete_type.
23890
23891 * method.c (hack_identifier): After giving an error, set value to
23892 error_mark_node.
23893
23894 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
23895
23896 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
23897 lossage for local classes.
23898 * cp-tree.h: Declare it.
23899 * decl.c (lookup_name_real): Evil, painful hack for local classes.
23900 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
23901 Use hack_decl_function_context.
23902 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
23903 (start_function): Use hack_decl_function_context.
23904 (finish_function): Likewise.
23905 * method.c (synthesize_method): Likewise.
23906 * lex.c (process_next_inline): Likewise.
23907 (do_pending_inlines): Likewise.
23908 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
23909 done with it.
23910
23911 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
23912
23913 * sig.c (build_signature_pointer_or_reference_type): Align
23914 signature pointers/references on 8-byte boundaries so they can be
23915 grabbed 2 words at a time on a Sparc.
23916
23917 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
23918
23919 * method.c (hack_identifier): Requiring a static chain is now a
23920 hard error.
23921 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
23922 functions.
23923
23924 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23925
23926 * init.c (build_offset_ref): Call complete_type.
23927
23928 * decl.c (pop_from_top_level): Always pop previous_class_type.
23929
23930 * parse.y: Handle multiple decls in a for-init-statement.
23931 * pt.c (tsubst_expr): Likewise.
23932
23933 * pt.c (tsubst): Use tsubst_expr for the second operand of an
23934 ARRAY_REF.
23935
23936 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
23937 (poplevel_class): Set it here.
23938 (pop_from_top_level): Pop it here if we're returning to class scope.
23939 * class.c (pushclass): Don't set it here.
23940
23941 * decl.c (maybe_push_to_top_level): Save current_template_parms,
23942 and clear it if !pseudo.
23943 (pop_from_top_level): Restore it.
23944
23945 * decl2.c (finish_file): Push the dummy each time we walk the list
23946 of vtables.
23947
23948 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
23949 something for CAST_EXPR.
23950
23951 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
23952
23953 * cvt.c (cp_convert): Warn about implicit conversion of the
23954 address of a function to bool, as it is always true.
23955
23956 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
23957
23958 * typeck.c (c_expand_return): Fix warning for local externs returned.
23959
23960 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
23961
23962 * tree.c (mapcar): Propagate const and volatile properly.
23963
23964 * typeck.c (complete_type): Be sure to instantiate the
23965 MAIN_VARIANT of the type.
23966
23967 * method.c (synthesize_method): Class interface hackery does not
23968 apply to synthesized methods.
23969
23970 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
23971
23972 * pt.c (comp_template_args): Use comptypes rather than just
23973 checking for TEMPLATE_TYPE_PARM equivalence.
23974
23975 * typeck.c (build_x_function_call): Call complete_type before
23976 checking TYPE_OVERLOADS_CALL_EXPR.
23977
23978 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
23979
23980 * g++.c (main): Check also for new define ALT_LIBM.
23981
23982 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23983
23984 * pt.c (instantiate_class_template): If we don't have a pattern
23985 yet, that's OK.
23986 (coerce_template_parms): If we see a local class, bail.
23987
23988 * decl.c (grok_reference_init): Make sure there's a type before
23989 checking its code.
23990
23991 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
23992 (push_template_decl): Likewise.
23993
23994 * parse.y (named_class_head): Set
23995 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
23996
23997 * decl.c (xref_tag): Diagnose redeclaration of template
23998 type-parameter name.
23999
24000 * error.c (dump_type): Handle anonymous template type parms.
24001
24002 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
24003 TYPE_STUB_DECL.
24004 (coerce_template_parms): Likewise.
24005
24006 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
24007
24008 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
24009 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
24010
24011 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
24012
24013 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
24014 before trying to get its STUB_DECL.
24015 (coerce_template_parms): Likewise.
24016
24017 * parse.y (template_type_parm): If they didn't use 'class',
24018 pretend they did after giving an error.
24019
24020 * pt.c (coerce_template_parms): Diagnose use of local class.
24021
24022 * decl.c (grok_reference_init): Use instantiate_type.
24023
24024 * error.c (dump_expr): Handle TEMPLATE_DECLs.
24025
24026 * parse.y (named_class_head): Diagnose mismatching types and tags.
24027
24028 * decl.c (pushdecl): Type decls and class templates clash with
24029 artificial type decls, not hide them.
24030
24031 * decl.c (redeclaration_error_message): Diagnose redefinition of
24032 templates properly.
24033 (duplicate_decls): Diagnose disallowed overloads for template
24034 functions, too.
24035
24036 * decl.c (start_decl): Call complete_type before checking for a
24037 destructor.
24038
24039 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
24040
24041 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
24042
24043 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
24044
24045 * decl.c (grok_op_properties): Don't check for operator++(int) in
24046 a template.
24047
24048 * tree.c (perm_manip): Return a copy of variable and function
24049 decls with external linkage.
24050
24051 * tree.def: Change some of the min tree codes to type "1".
24052 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
24053 * method.c (build_overload_int): Emit something arbitrary for
24054 anything but an INTEGER_CST if we're in a template.
24055
24056 * decl.c (cp_finish_decl): Call complete_type before deciding
24057 whether or not to lay out the decl.
24058
24059 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
24060
24061 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
24062
24063 * typeck2.c (build_x_arrow): Call complete_type.
24064
24065 * pt.c (add_pending_template): Broken out.
24066 (lookup_template_class): If -fexternal-templates, call it for all
24067 the methods of implemented types.
24068 (instantiate_class_template): Instead of instantiating them here.
24069 (instantiate_decl): Handle -fexternal-templates earlier.
24070
24071 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24072
24073 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
24074 memoized lookup stuff inside GATHER_STATISTICS.
24075
24076 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
24077
24078 * decl.c (start_decl): Complain about array of incomplete type
24079 here.
24080 (grokdeclarator): Not here.
24081
24082 * parse.y (template_parm): Expand full_parm inline so we can set
24083 the rule's precedence.
24084
24085 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
24086 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
24087 * decl2.c (grokbitfield): Don't check for integer constant here.
24088 * class.c (finish_struct_1): Check here.
24089
24090 * decl.c (define_label): Make the min decl go on permanent_obstack.
24091
24092 * pt.c (unify): Don't handle CONST_DECLs.
24093 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
24094 (tsubst_copy): Likewise.
24095
24096 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
24097 CONST_DECL for a template parm.
24098
24099 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
24100
24101 * decl.c (grokdeclarator): Complain about array of incomplete type
24102 here.
24103 (start_decl_1): Not here.
24104
24105 * pt.c (tsubst): Handle pointer-to-function declarators.
24106
24107 * method.c (hack_identifier): If pedantic, diagnose local class
24108 methods that require a static chain.
24109
24110 * decl.c (grok_op_properties): No longer static.
24111 * cp-tree.h: Declare it.
24112 * pt.c (tsubst): Call it for operators.
24113 Use tsubst_copy for TREE_VECs.
24114
24115 * parse.y (template_arg): The expr has precedence like '>'.
24116
24117 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
24118
24119 * pt.c (coerce_template_parms): Don't coerce an expression using
24120 template parms.
24121 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
24122 (tsubst): Don't use build_index_2_type if the max_value uses template
24123 parms.
24124 * method.c (build_overload_int): Emit something arbitrary for an
24125 expression using template parms.
24126
24127 * parse.y (template_close_bracket): New non-terminal to catch use
24128 of '>>' instead of '> >' in template class names.
24129 (template_type): Use it.
24130 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
24131
24132 * tree.def: Add CAST_EXPR.
24133 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
24134 CONVERT_EXPR for minimal_parse_mode.
24135 * typeck.c (build_c_cast): Likewise.
24136 * pt.c (tsubst_copy): Likewise.
24137 * decl2.c (build_expr_from_tree): Likewise.
24138 * error.c (dump_expr): Likewise.
24139
24140 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24141
24142 * except.c (SetTerminate, SetUnexpected): Put back global vars.
24143 (init_exception_processing): Put back decl/init of
24144 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
24145 fns from libstdc++.
24146
24147 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
24148 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
24149 Delete unused fns.
24150 * cp-tree.h (declare_uninstantiated_type_level,
24151 uninstantiated_type_level_p): Delete prototypes.
24152
24153 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
24154
24155 * pt.c (tsubst_expr): Add default return.
24156
24157 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24158
24159 * error.c (fndecl_as_string): Delete unused arg CNAME.
24160 * sig.c (build_signature_table_constructor,
24161 build_signature_method_call): Fix calls.
24162
24163 * class.c (the_null_vtable_entry): Delete var definition.
24164 (init_class_processing): Delete tree the_null_vtable_entry init.
24165 * decl.c (no_print_{functions, builtins}): Declare as static.
24166 (__tp_desc_type_node): #if 0 var definition.
24167 (init_type_desc): #if 0 init of __tp_desc_type_node.
24168 (vb_off_identifier): Move var decl into init_decl_processing.
24169 (current_function_assigns_this): Declare as static.
24170 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
24171 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
24172 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
24173 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
24174 * init.c (BI_header_type, BI_header_size): Declare as static.
24175 * pt.c (template_classes): Delete unused var.
24176 (add_pending_template): Delete decl for non-existent fn.
24177 (lookup_template_class): Delete vars CODE and TAG_CODE.
24178 (instantiate_template): Delete unused var TARGS.
24179 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
24180 Delete decls.
24181 (__tp_desc_type_node): #if 0 var decl.
24182 (fndecl_as_string): Fix prototype.
24183
24184 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
24185
24186 * tree.def: Add GOTO_STMT.
24187 * pt.c (tsubst_expr): Support goto and labels.
24188 * decl.c (define_label): Support minimal parsing.
24189 * parse.y (simple_stmt): Likewise.
24190
24191 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24192
24193 * xref.c (GNU_xref_member): Only define/set var I if
24194 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
24195 used.
24196 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
24197 (GNU_xref_end): Fix call.
24198 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
24199 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
24200
24201 * tree.c (build_exception_variant): Delete unused vars I, A, T,
24202 T2, and CNAME.
24203 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
24204 (mapcar): Delete unused var CODE.
24205 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
24206 (break_out_cleanups): Fix call.
24207 (bot_manip): Likewise.
24208 * call.c (build_method_call): Likewise.
24209 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
24210 Likewise.
24211 * typeck.c (unary_complex_lvalue, build_modify_expr,
24212 convert_for_initialization): Likewise.
24213 * typeck2.c (build_functional_cast): Likewise.
24214 * cp-tree.h (build_cplus_new): Fix prototype.
24215
24216 * repo.c (open_repo_file): Delete unused var Q.
24217 (repo_compile_flags, repo_template_declared,
24218 repo_template_defined, repo_class_defined, repo_inline_used,
24219 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
24220 (repo_get_id, repo_vtable_used): Declare as static.
24221 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
24222 prototypes.
24223
24224 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
24225
24226 * parse.y (pending_inlines): Add function_try_block case.
24227
24228 * pt.c (unify): Fix for template const parms.
24229
24230 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24231
24232 * lex.c (extract_interface_info): Delete forward decl.
24233 (default_copy_constructor_body, default_assign_ref_body): Delete
24234 decls for non-existent functions.
24235 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
24236 (init_lex): Delete setting them.
24237 (cons_up_default_function): Delete unused vars FUNC_BUF,
24238 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
24239 #if 0'd synth code.
24240 (toplevel, expression_obstack): Delete unused extern decls.
24241 (tree_node_kind): Delete unused enum.
24242 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
24243 GATHER_STATISTICS.
24244 (tree_node_kind_names): Delete unused extern decl.
24245 (synth_obstack): Delete unused var.
24246 (init_lex): Don't set it.
24247 (init_parse): Add decl before use.
24248 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
24249 (current_unit_{name, language}): Delete unused vars.
24250 (check_newline): Don't bother setting them, just accept the #pragma.
24251 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
24252 (current_unit_{name, language}): Delete decls.
24253
24254 * search.c: Wrap all of the memoized functions, macros, and
24255 variables inside #ifdef GATHER_STATISTICS.
24256 (lookup_field, lookup_fnfields): Likewise.
24257 (init_search_processing): Likewise.
24258 (reinit_search_statistics): Wrap whole function.
24259 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
24260
24261 * decl.c (finish_function): Only call pop_memoized_context if
24262 GATHER_STATISTICS is defined.
24263 (start_function): Likewise for push_memoized_context.
24264 * class.c (pushclass, popclass): Likewise.
24265
24266 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
24267 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
24268
24269 * cvt.c (cp_convert): Delete unused local var FORM.
24270 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
24271 prototypes.
24272
24273 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
24274
24275 * pt.c (do_poplevel): Oops; really return what we get from
24276 poplevel this time.
24277
24278 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24279
24280 * cp-tree.h (is_aggr_type): Add prototype.
24281
24282 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
24283 * method.c ({push,pop}_cp_function_context): Delete decls.
24284 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
24285 (SetUnexpected, SetTerminate): Delete unused vars.
24286 (init_exception_processing): Don't set SetUnexpected or
24287 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
24288 (output_exception_table_entry): Delete unused array LABEL.
24289 (expand_internal_throw): Delete unused var PARAMS.
24290 (expand_start_catch_block): Delete unused var CLEANUP.
24291 (emit_exception_table): Delete unused var EH_NODE_DECL.
24292 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
24293 GOTO_UNWIND_AND_THROW. Don't set them.
24294 (end_eh_unwinder): Add top decl.
24295 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
24296 (exception_section, push_rtl_perm, do_function_call,
24297 lang_interim_eh, push_eh_cleanup, eh_outer_context,
24298 expand_end_eh_spec, end_eh_unwinder): Declare as static.
24299 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
24300 throw_used): Likewise.
24301 * cp-tree.h (expand_end_eh_spec): Delete prototype.
24302
24303 * search.c (dfs_mark, dfs_mark_vtable_path,
24304 dfs_unmark_vtable_path, dfs_mark_new_vtable,
24305 dfs_unmark_new_vtable, dfs_clear_search_slot,
24306 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
24307 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
24308 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
24309 functions.
24310 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
24311 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
24312 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
24313 Only define #ifdef GATHER_STATISTICS.
24314 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
24315 is defined.
24316 (vbase_decl): Delete var definition.
24317 (init_search): Delete old decl.
24318 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
24319 never actually used.
24320 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
24321 (get_base_distance_recursive): Delete unused fourth arg
24322 BASETYPE_PATH. Fix call .
24323 (get_base_distance): Fix call.
24324 (push_class_decls): Delete unused var ID.
24325 (make_memoized_table_entry): Declare as static.
24326 (breadth_first_search): Declare as static.
24327 (tree_has_any_destructor_p): Declare as static.
24328 (pop_class_decls): Delete unused arg pop_class_decls.
24329 * class.c (popclass): Fix call to pop_class_decls.
24330 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
24331 tree_has_any_destructor_p): Delete prototypes.
24332
24333 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
24334 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
24335 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
24336 (build_user_desc): Delete unused var T.
24337 (build_class_desc): Delete unused vars T and OFF.
24338 (build_t_desc): Delete unused var NAME_STRING.
24339 (build_headof): Make static.
24340 (get_bad_cast_node): Likewise.
24341 (get_def_to_follow): Likewise.
24342 * cp-tree.h (init_type_desc): Add prototype.
24343 (build_headof): Remove prototype.
24344
24345 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
24346
24347 * pt.c (tsubst): Only look for matching decls at file scope for
24348 non-member functions.
24349
24350 * call.c (build_scoped_method_call): Handle scoped destructor
24351 calls in templates.
24352
24353 * decl.c (*_top_level): Also save previous_class_values.
24354
24355 * pt.c (tsubst_expr): Support do {} while loops.
24356 * parse.y (simple_stmt): Likewise.
24357 * tree.def: Likewise.
24358
24359 * method.c (build_overload_identifier): For a class nested in a
24360 template class, don't mangle in the template parms from our
24361 context.
24362
24363 * lex.c, cp-tree.h: Remove support for template instantiations in
24364 the pending_inlines code.
24365 * pt.c: Remove dead functions and unused arguments.
24366 (uses_template_parms): TYPENAME_TYPEs always use template parms.
24367 * parse.y: Stop passing anything to end_template_decl.
24368 * tree.c (print_lang_statistics): Only print tinst info #ifdef
24369 GATHER_STATISTICS.
24370
24371 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24372
24373 * init.c (expand_recursive_init{,_1}): Delete decls.
24374 (sort_member_init): Delete unused var INIT.
24375 (emit_base_init): Delete unused var X.
24376 (build_offset_ref): Delete unused var CNAME.
24377 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
24378 (emit_base_init): Delete unused local var BASE. Delete extern
24379 decl of IN_CHARGE_IDENTIFIER.
24380 (build_delete): Delete unused local var VIRTUAL_SIZE.
24381
24382 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
24383 (build_delete): Fix call.
24384 * decl2.c (delete_sanity): Likewise.
24385 * cp-tree.h (build_vec_delete): Update prototype.
24386
24387 * typeck.c (common_base_type): Delete unused var TMP.
24388 (build_binary_op): Delete local var ARGS_SAVE.
24389 (build_array_ref): Delete unused var ITYPE.
24390 (c_expand_return): Delete unused var USE_TEMP.
24391
24392 * typeck.c (compexcepttypes): Delete unused arg STRICT.
24393 (comptypes): Fix calls.
24394 * decl.c (duplicate_decls): Likewise.
24395 * cp-tree.h (compexcepttypes): Delete extra arg.
24396
24397 * decl2.c (check_classfn): Delete unused second arg CNAME.
24398 * decl.c (start_decl, grokfndecl): Fix calls.
24399 * init.c (do_friend): Likewise.
24400 * cp-tree.h (check_classfn): Update prototype.
24401
24402 * cp-tree.h (signature_error, import_export_vtable,
24403 append_signature_fields, id_in_current_class, mark_used,
24404 copy_assignment_arg_p): Add decls.
24405 * decl2.c (mark_used): Delete decl.
24406
24407 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
24408
24409 * class.c (get_vtable_entry): Disable unused function.
24410 (doing_hard_virtuals): Delete unused static global var.
24411 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
24412 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
24413 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
24414 (modify_one_vtable): Delete unused var OLD_RTTI.
24415 (finish_struct_anon): Delete unused vars OFFSET and X.
24416 (finish_struct_bits): Delete unused var METHOD_VEC.
24417 (get_basefndecls): Delete unused var PURPOSE. Delete unused
24418 for-scope local variable METHODS.
24419
24420 * call.c (user_harshness): Delete unused/unneeded arg PARM.
24421 (ideal_candidate): Delete unused args BASETYPE and PARMS.
24422 (build_method_call): Delete unused args passed into ideal_candidate.
24423 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
24424 * cp-tree.h (synthesize_method): Add decl.
24425
24426 * decl.c (note_level_for_for): Give void return type.
24427 (pushdecl_nonclass_level): Likewise.
24428 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
24429 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
24430 (suspend_binding_level): Delete unused var LEVEL.
24431 (duplicate_decls): Delete unused var CTYPE.
24432 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
24433 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
24434 PTR_ENDLINK.
24435 (grokdeclarator): Delete unused var C.
24436 (grokdeclarator): Delete unused var SIZE_VARIES.
24437 (grokparms): Delete unused var SAW_VOID.
24438 (start_function): Delete unused var OLDDECL.
24439 (cplus_expand_expr_stmt): Delete unused var
24440 REMOVE_IMPLICIT_IMMEDIATELY.
24441
24442 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
24443
24444 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
24445
24446 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
24447
24448 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
24449 (build_min_nt): Likewise.
24450 * pt.c (do_pushlevel): Emit line note.
24451 (do_poplevel): Return what we get from poplevel.
24452 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
24453 * parse.y: Use do_pushlevel and do_poplevel.
24454 * cp-tree.h: Declare do_poplevel.
24455
24456 * cp-tree.h: Declare at_eof.
24457 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
24458 * decl2.c (import_export_decl): Renamed from import_export_inline.
24459 (finish_file): Call it to do interface handling for statics.
24460 * pt.c (tsubst_copy): Call mark_used on variables and functions
24461 used here.
24462
24463 * decl2.c (finish_file): Don't emit statics we can't generate.
24464 * pt.c (instantiate_decl): Don't set interface on instantiations
24465 we can't generate.
24466
24467 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
24468 * tree.c (print_lang_statistics): Print max template depth.
24469 * pt.c (push_tinst_level): Dump entire instantiation context.
24470 (instantiate_class_template): Use it and pop_tinst_level.
24471 (instantiate_decl): Likewise.
24472
24473 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
24474 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
24475
24476 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
24477
24478 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
24479 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
24480 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
24481 the new template implementation.
24482
24483 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24484
24485 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
24486
24487 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
24488
24489 * decl.c (cp_finish_decl): Delay emitting the debug information for
24490 a typedef that has been installed as the canonical typedef, if the
24491 type has not yet been defined.
24492
24493 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
24494
24495 * decl2.c (grokfield): Still call pop_nested_class for access decls.
24496
24497 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24498
24499 * decl.c (lookup_label): Call label_rtx.
24500
24501 * decl.c (make_binding_level): New function.
24502 (pushlevel, pushlevel_class): Call it instead of explicit
24503 duplicate calls to xmalloc.
24504
24505 * decl.c (init_decl_processing): Delete useless build_pointer_type
24506 call.
24507
24508 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
24509 (sizet_ftype_string): Delete variable.
24510 (init_decl_processing): Add built-in functions fabsf, fabsl,
24511 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
24512 variable strlen_ftype, used for strlen.
24513
24514 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
24515
24516 * decl.c (push_to_top_level): Start from current_binding_level
24517 again for now; the stl hacks depend on g++ being broken in this
24518 way, and it'll be fixed in the template rewrite.
24519
24520 * tree.def: Add USING_DECL.
24521 * decl2.c (do_class_using_decl): Implement.
24522 (grokfield): Pass access decls off to do_class_using_decl instead of
24523 grokdeclarator.
24524 * error.c (dump_decl): Handle USING_DECLs.
24525 * decl.c (grokdeclarator): Remove code for handling access decls.
24526 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
24527 as access decls for now.
24528 (finish_struct): Don't check USING_DECLs for other uses of the name.
24529
24530 * search.c (get_matching_virtual): Use cp_error_at.
24531
24532 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24533
24534 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
24535 match c-typeck.c.
24536 (self_promoting_args_p): Move the check that TYPE is non-nil
24537 before trying to look at its main variant.
24538 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
24539
24540 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
24541 Delete macros.
24542 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
24543 (do_friend): Delete call to xref_friend.
24544 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
24545
24546 * typeck.c (convert_sequence): #if 0 unused function.
24547
24548 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
24549 be in decl_in_memory_p.
24550 (decl_in_memory_p): Delete decl.
24551 * expr.c (decl_in_memory_p): Delete fn.
24552 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
24553
24554 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
24555
24556 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
24557
24558 * class.c (finish_struct_1): Check for a pure-specifier on a
24559 non-virtual function here.
24560
24561 * decl2.c (grok_function_init): Don't check whether the function
24562 is virtual here.
24563 (grokfield): Don't call check_for_override here.
24564
24565 * decl.c (push_to_top_level): Start from inner_binding_level,
24566 check class_shadowed in class levels.
24567
24568 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
24569
24570 * decl.c (resume_level): Ignore things that don't have names, instead
24571 of core dumping.
24572
24573 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24574
24575 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
24576
24577 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
24578
24579 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
24580 synthesized dtor.
24581
24582 * parse.y (complete_type_name): Bind global_scope earlier.
24583 (complex_type_name): Likewise.
24584 (qualified_type_name): Remove.
24585
24586 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
24587
24588 * decl.c (grokfndecl): Move code that looks for virtuals in base
24589 classes...
24590 * class.c (check_for_override): ... to a new function.
24591 (finish_struct_1): Call it.
24592
24593 * cp-tree.h: Declare warn_sign_compare.
24594
24595 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
24596 rather than extra_warnings to decide whether to warn about
24597 comparison of signed and unsigned.
24598
24599 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
24600 implies -Wsign-compare. -Wall doesn't imply -W.
24601
24602 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
24603
24604 * typeck.c (build_component_ref): Fix to handle anon unions in base
24605 classes as well.
24606
24607 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24608
24609 * class.c (resolves_to_fixed_type_p): Delete code dealing with
24610 a WITH_CLEANUP_EXPR, since we don't generate them any more.
24611 * cvt.c (build_up_reference): Likewise.
24612 * decl.c (grok_reference_init): Likewise.
24613 (cp_finish_decl): Likewise.
24614 * error.c (dump_expr): Likewise.
24615 * tree.c (real_lvalue_p): Likewise.
24616 (lvalue_p): Likewise.
24617 (build_cplus_new): Likewise.
24618 (unsave_expr_now): Likewise.
24619 * typeck.c (unary_complex_lvalue, build_modify_expr,
24620 c_expand_return): Likewise.
24621
24622 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24623
24624 Make the C++ front-end pay attention to attributes for structures.
24625 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
24626 finish_struct_1.
24627 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
24628 Take out old round_up_size use and setting the DECL_ALIGN possibly
24629 using it. Take out setting of TYPE_ALIGN to round_up_size, which
24630 can override what the attribute set.
24631 * cp-tree.h (finish_struct): Update prototype.
24632 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
24633 attributes to finish_struct.
24634 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
24635 value down into finish_struct.
24636 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
24637
24638 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
24639
24640 * decl.c (poplevel): Re-word dead for local handling.
24641 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
24642 (cp_finish_decl): If is_for_scope, check for duplicates so
24643 we can disable is_for_scope. Otherwise, preserve_temp_slots.
24644
24645 * lex.c (do_identifier): Use global binding in preference of
24646 dead for local variable.
24647
24648 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
24649
24650 * init.c (initializing_context): Handle anon union changes, the
24651 context where fields of anon unions can be initialized now has to be
24652 found by walking up the TYPE_CONTEXT chain.
24653
24654 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
24655
24656 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
24657 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
24658 (obscure_complex_init): If bss is supported, always set
24659 DECL_INITIAL to error_mark_node.
24660
24661 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24662
24663 * init.c (is_friend): Make sure there's a context before we see if
24664 it's an aggr type.
24665
24666 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
24667
24668 * init.c (is_friend): Classes are not friendly with nested classes.
24669
24670 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
24671
24672 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
24673 and record its result.
24674
24675 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
24676
24677 * class.c (finish_struct_anon): Switch around code to not move anon
24678 union elements around, nor mess up their contexts, nor offsets,
24679 instead we now build up the right number of COMPONENT_REFs for all
24680 the anon unions that may be present at build_component_ref time.
24681 * typeck.c (lookup_anon_field): New routine to handle field lookup
24682 on fields without names. We find them, based upon their unique type
24683 instead.
24684 * typeck.c (build_component_ref): Allow FIELD_DECL components.
24685 Handle finding components in anonymous unions, and ensure that a
24686 COMPONENT_REF is built for each level as necessary.
24687
24688 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
24689
24690 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
24691 code that ensures that copy ctors are used if appropriate.
24692
24693 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24694
24695 * init.c (build_vec_delete): Only give an error if base isn't an
24696 error_mark_node.
24697
24698 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
24699
24700 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
24701 (yylex): If we see `new', keep slurping.
24702
24703 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
24704
24705 * class.c (finish_struct_1): Move code for handling anon unions...
24706 (finish_struct_anon): to here. Fixup so that we do the offset
24707 calculations right, and so that the fields are physically moved to
24708 the containers's chain.
24709
24710 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24711
24712 * decl.c (grokdeclarator): Avoid trying to get an operand off an
24713 identifier node.
24714
24715 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
24716
24717 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
24718 POINTER_SIZE to agree with expr.c.
24719
24720 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
24721
24722 * search.c (lookup_field): Don't report ambiguities if protect is 0,
24723 instead return NULL_TREE.
24724
24725 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
24726
24727 * class.c (finish_struct_1): Call warn_hidden if we want warnings
24728 about overloaded virtual functions.
24729 (warn_hidden): New routine to warn of virtual functions that are
24730 hidden by other virtual functions, that are not overridden.
24731 (get_basefndecls): New routine, used by warn_hidden.
24732 (mark_overriders): New routine, used by warn_hidden.
24733 * search.c (get_matching_virtual): Remove old warning that just
24734 isn't very useful.
24735
24736 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24737
24738 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
24739
24740 * typeck.c (null_ptr_cst_p): Delete unused fn.
24741 (build_function_call_maybe): Delete unused fn.
24742
24743 * expr.c (extract_init): #if 0 the code after unconditional return 0
24744 for now.
24745
24746 Delete old cadillac code.
24747 * edsel.c: Remove file.
24748 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
24749 * Makefile.in (CXX_OBJS): Delete edsel.o.
24750 (edsel.o): Delete rule.
24751 * cp-tree.h (flag_cadillac): Delete var decl.
24752 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
24753 * decl2.c (flag_cadillac): Delete var definition.
24754 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
24755 (grokfield): Delete code depending on flag_cadillac.
24756 (finish_anon_union): Likewise.
24757 * class.c (finish_struct_1): Likewise.
24758 (pushclass): Likewise.
24759 (popclass): Likewise.
24760 (push_lang_context): Likewise.
24761 (pop_lang_context): Likewise.
24762 * decl.c (init_decl_processing): Likewise.
24763 (start_decl): Likewise.
24764 (cp_finish_decl): Likewise.
24765 (xref_tag): Likewise.
24766 (finish_enum): Likewise.
24767 (start_function): Likewise.
24768 (finish_function): Likewise.
24769 (finish_stmt): Likewise.
24770 * lex.c (lang_init): Likewise.
24771 (check_newline): Likewise.
24772
24773 * lex.c (do_pending_inlines): Delete synthesized method kludge.
24774
24775 Delete defunct, ancient garbage collection implementation.
24776 * rtti.c: New file with the RTTI stuff from gc.c.
24777 * gc.c: Removed file (moved the remaining stuff into rtti.c).
24778 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
24779 (rtti.o): New rule, replacing gc.o.
24780 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
24781 * cp-tree.h: Delete gc-related fn decls.
24782 (DECL_GC_OFFSET): Delete macro.
24783 (flag_gc): Delete extern decl.
24784 * decl.c (current_function_obstack_index): Delete var decl.
24785 (current_function_obstack_usage): Delete var decl.
24786 (start_function): Delete clearing of current_function_obstack_index
24787 and current_function_obstack_usage.
24788 (init_decl_processing): Delete code relying on -fgc.
24789 Delete call to init_gc_processing.
24790 (cp_finish_decl): Delete calls to build_static_gc_entry and
24791 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
24792 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
24793 and to expand_expr of a __gc_main call.
24794 (maybe_gc_cleanup): Delete var decl.
24795 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
24796 * decl2.c (flag_gc): Delete var decl.
24797 (lang_f_options): Delete offering of -fgc.
24798 (lang_decode_option): Delete -fgc and -fno-gc handling.
24799 (get_temp_regvar): Delete gc code.
24800 * init.c (build_new): Delete gc code.
24801 * lex.c (init_lex): Delete checking of flag_gc.
24802
24803 * typeck.c (convert_arguments): Delete gc code.
24804 (build_component_addr): Delete -fgc warning.
24805 (build_modify_expr): Delete gc code.
24806
24807 * decl2.c (build_push_scope): Delete fn.
24808 * cp-tree.h (build_push_scope): Delete decl.
24809
24810 * search.c (clear_search_slots): Delete fn.
24811 * cp-tree.h (clear_search_slots): Delete decl.
24812
24813 * search.c (tree_needs_constructor_p): Delete fn.
24814 * cp-tree.h (tree_needs_constructor_p): Delete decl.
24815
24816 * tree.c (id_cmp): Delete fn.
24817
24818 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
24819 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
24820
24821 * tree.c (decl_value_member): Delete fn.
24822 * cp-tree.h (decl_value_member): Delete decl.
24823
24824 * tree.c (list_hash_lookup_or_cons): Delete fn.
24825 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
24826
24827 * method.c (cplus_exception_name): Delete fn.
24828 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
24829
24830 * spew.c (shift_tokens): Delete fn.
24831
24832 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
24833
24834 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
24835 to cp_finish_decl.
24836 * parse.y: Likewise.
24837
24838 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24839
24840 * tree.c (build_cplus_staticfn_type): Delete function definition;
24841 never used.
24842 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
24843
24844 * tree.c (virtual_member): Delete function definition; never used.
24845 * cp-tree.h (virtual_member): Delete decl.
24846
24847 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
24848
24849 * typeck.c (build_component_ref): Handle getting vbase pointers
24850 out of complex multiple inheritance better.
24851
24852 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
24853
24854 * typeck.c (build_object_ref): Make sure we use the real type, not
24855 any reference type.
24856
24857 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
24858
24859 * tree.c (build_exception_variant): Don't create new types if we
24860 don't have to, also build new types on the right obstack.
24861
24862 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
24863
24864 * decl.c (store_bindings): Split out from push_to_top_level.
24865 (push_to_top_level): Call it for b->type_shadowed on class binding
24866 levels.
24867
24868 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
24869
24870 * search.c (expand_upcast_fixups): Fix so that offsets stored in
24871 vbase_offsets are always right. Fixes a problem where virtual base
24872 upcasting and downcasting could be wrong during conversions on this
24873 during virtual function dispatch at ctor/dtor time when dynamic
24874 vtable fixups for deltas are needed. This only sounds easier than
24875 it is. :-)
24876 (fixup_virtual_upcast_offsets): Change to reflect new calling
24877 convention for expand_upcast_fixups.
24878
24879 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24880
24881 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
24882 check that it's usable as the bitfield width.
24883
24884 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24885
24886 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
24887 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
24888 only ever used for functions in it.
24889
24890 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
24891
24892 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
24893 (nested_type): Likewise.
24894 (nested_name_specifier): Use lastiddecl.
24895
24896 * decl.c (grokdeclarator): Adjust accordingly.
24897 * init.c (expand_member_init): Likewise.
24898 * parse.y (base_class): Likewise.
24899 * typeck2.c (build_functional_cast): Likewise.
24900
24901 * typeck2.c (build_functional_cast): Fill in name after we've
24902 checked for non-aggr type.
24903
24904 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
24905
24906 * decl2.c (warn_pointer_arith): Default to on.
24907
24908 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
24909
24910 * lex.c (is_rid): New function.
24911 * decl.c (grokdeclarator): Diagnose reserved words used as
24912 declarator-ids.
24913
24914 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
24915
24916 * tree.c (get_decl_list): Don't lose cv-quals.
24917
24918 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
24919 typespecs used as declarator-ids.
24920
24921 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
24922
24923 * decl.c (poplevel): When poping a level, don't give a warning for
24924 any subblocks that already exist.
24925
24926 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
24927
24928 * typeck.c (build_object_ref): Finish what I started.
24929
24930 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
24931
24932 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
24933
24934 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
24935 scope.
24936
24937 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
24938
24939 * decl.c (xref_tag): Handle passing a type in directly.
24940
24941 * parse.y (qualified_type_name): Pull out the type.
24942 (nested_type): Likewise.
24943 Take types directly instead of as identifiers.
24944 * call.c (build_scoped_method_call): Take types directly instead of
24945 as identifiers.
24946 * decl.c (xref_basetypes): Likewise.
24947 * init.c (expand_member_init): Likewise.
24948 (build_member_call): Likewise.
24949 (build_offset_ref): Likewise.
24950 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
24951 * method.c (do_build_assign_ref): Likewise.
24952 * decl.c (grokdeclarator): Handle a type appearing as the
24953 declarator-id for constructors.
24954 * method.c (do_build_copy_constructor): current_base_init_list now
24955 uses the types directly, not their names.
24956 * init.c (sort_base_init): Likewise.
24957 (expand_member_init): Likewise.
24958 * init.c (is_aggr_type): New function, like is_aggr_typedef.
24959
24960 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
24961
24962 * tree.c (layout_basetypes): Call build_lang_field_decl instead
24963 of build_lang_decl if first arg is a FIELD_DECL.
24964
24965 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24966
24967 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
24968 non-empty.
24969 * except.c (expand_start_catch_block): Set TREE_USED to avoid
24970 warnings about the catch handler.
24971
24972 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
24973
24974 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
24975 expand_target_expr.
24976
24977 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24978
24979 Fix access control to use trees rather than integers.
24980 * class.c (access_{default, public, protected, private,
24981 default_virtual, public_virtual, private_virtual}_node): Add
24982 definitions.
24983 (init_class_processing): Do creation of those nodes.
24984 * cp-tree.h (access_type): Delete enum decl.
24985 (access_{default, public, protected, private, default_virtual,
24986 public_virtual, private_virtual}_node): Add decls.
24987 (compute_access): Change return type.
24988 * search.c (compute_access): Have tree return type, instead of enum.
24989 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
24990 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
24991 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
24992 * parse.y (VISSPEC): Make ttype rather than itype.
24993 (base_class_access_list): Likewise.
24994 * *.[cy]: Change all refs of `access_public' to `access_public_node',
24995 etc.
24996 * call.c (build_method_call): Make ACCESS be a tree.
24997 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
24998 * cvt.c (convert_to_aggr): Likewise.
24999 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
25000 Likewise.
25001 * method.c (hack_identifier): Likewise.
25002 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
25003
25004 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
25005
25006 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
25007 frontend, and make it more consistent with respect to
25008 warn_pointer_arith.
25009
25010 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
25011
25012 * decl.c (pushdecl): Check for duplicate parameter names.
25013
25014 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
25015
25016 * decl.c (expand_static_init): Call assemble_external for atexit.
25017
25018 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
25019
25020 * except.c (do_unwind): Remove some generated dead code.
25021 (eh_outer_context): New routine, factor out some common code from
25022 expand_builtin_throw and end_eh_unwinder. Add code to do return
25023 address masking for the PA.
25024 (expand_builtin_throw): Use eh_outer_context instead of open coding
25025 it here.
25026 (end_eh_unwinder): Likewise.
25027
25028 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
25029
25030 * except.c (expand_throw): Call assemble_external for __empty, if we
25031 use it.
25032
25033 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
25034
25035 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
25036 NORMAL_RETURN_ADDR_OFFSET.
25037 (end_eh_unwinder): Likewise.
25038
25039 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
25040
25041 * gc.c (build_dynamic_cast): Make sure we don't cast away const
25042 when dealing with references, and make sure we handle dynamic
25043 casting to a cv qualified reference.
25044
25045 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
25046
25047 * except.c (struct eh_context): New structure top hold eh context
25048 information.
25049 (push_eh_context): New routine.
25050 (pop_eh_context): Likewise.
25051 * decl.c (push_cp_function_context): Use them.
25052 (pop_cp_function_context): Likewise.
25053
25054 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
25055
25056 * decl2.c (finish_file): Also prune uninteresting functions in the
25057 inline emission loop.
25058
25059 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
25060
25061 * sig.c (build_signature_table_constructor): Mark functions
25062 in the signature as referenced.
25063
25064 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
25065
25066 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
25067 the inline emission stuff.
25068
25069 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
25070
25071 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
25072 weak symbols.
25073 * lang-options.h: Add -f{no-,}weak.
25074 * decl.c (init_decl_processing): If the target does not support weak
25075 symbols, don't use them.
25076 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
25077
25078 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
25079
25080 * init.c (expand_member_init): warning for base init after members.
25081
25082 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
25083
25084 * cvt.c (build_expr_type_conversion): Don't convert to a reference
25085 type.
25086
25087 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
25088
25089 * method.c (report_type_mismatch): Improve wording for volatile
25090 mismatches.
25091
25092 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
25093
25094 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
25095 expand_assignment, as the later doesn't handle things that have
25096 copy constructors well. The compiler would do bitwise copying,
25097 instead of ctor calling in some cases.
25098
25099 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
25100
25101 * g++.c (my_strerror): Return "cannot access" if errno is 0.
25102 (pfatal_with_name, perror_exec): Don't assume that
25103 the returned value from my_strerror contains no '%'s.
25104 (concat): Remove.
25105 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
25106
25107 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
25108
25109 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
25110 TYPE_METHODS/TREE_CHAIN mean what they used to.
25111 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
25112 instead of TYPE_METHODS.
25113 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
25114 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
25115 * cp-tree.h (CLASSTYPE_METHODS): Lose.
25116 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
25117 TYPE_METHODS.
25118 (struct lang_decl): Lose next_method field.
25119 (DECL_NEXT_METHOD): Lose.
25120 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
25121 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
25122 anymore.
25123 (finish_struct_methods): Don't mess with the TREE_CHAINs in
25124 fn_fields.
25125
25126 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
25127 vector.
25128
25129 * call.c (build_method_call): Synthesize here even when not inlining.
25130 * typeck.c (build_function_call_real): Likewise.
25131
25132 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
25133
25134 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
25135 == DBX_DEBUG, call dbxout_start_new_source_file and
25136 dbxout_resume_previous_source_file when appropriate.
25137
25138 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
25139
25140 * except.c (start_anon_func): Push to the top level.
25141 (end_anon_func): Pop from the top level.
25142
25143 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
25144
25145 * cp-tree.h (build_cleanup): New routine to build cleanups.
25146 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
25147 call at ctor time and use atexit to run it later.
25148 * decl2.c (build_cleanup): New routine, taken from finish_file.
25149 (finish_file): Use build_cleanup instead, and don't put function
25150 local statics in global dtor list.
25151
25152 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
25153
25154 * except.c (expand_throw): Ensure that we have cleanups, if we try
25155 and expand cleanups.
25156
25157 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
25158
25159 * except.c (expand_throw): Add logic to manage dynamic cleanups for
25160 the EH object.
25161 (expand_end_catch_block): Use the magic of expand_goto, instead of
25162 emit_jump so that we get the cleanup for any catch clause parameter
25163 and the cleanup for the exception object. Update to reflect label
25164 changes.
25165 (push_eh_cleanup): New routine to register a cleanup for an
25166 exception object.
25167 (empty_fndecl): Used to default cleanup actions to
25168 nothing.
25169 (init_exception_processing): Setup empty_fndecl. Setup
25170 saved_cleanup.
25171 (expand_start_catch_block): Update to reflect label changes. Call
25172 push_eh_object to register the cleanup for the EH object.
25173 (start_anon_func): New routine to start building lambda expressions
25174 from trees.
25175 (end_anon_func): New routine to end them.
25176 (struct labelNode): Change so that we can use tree labels, or rtx
25177 labels.
25178 (saved_cleanup): Object to check for dynamic cleanups for the
25179 exception handling object.
25180 (push_label_entry): Change so that we can use tree labels, or rtx
25181 labels.
25182 (pop_label_entry): Likewise.
25183 (top_label_entry): Likewise.
25184 (expand_start_all_catch): Use tree label instead of rtx label, so
25185 that we can get the magic of expand_goto.
25186 (expand_end_all_catch): Update to reflect label changes.
25187
25188 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
25189 use UNSAVE_EXPRs.
25190 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
25191 building_cleanup logic, as we now use UNSAVE_EXPRs.
25192 * cp-tree.h (unsave_expr): Declare it.
25193 * decl.c (building_cleanup): Remove.
25194 (maybe_build_cleanup): Remove building_cleanup logic, and use
25195 UNSAVE_EXPR instead.
25196
25197 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
25198
25199 * gc.c (build_t_desc): Update error message to say <typeinfo>.
25200
25201 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
25202
25203 * decl.c (pushdecl): Only warn about shadowing a local variable if
25204 warn_shadow is true.
25205
25206 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
25207
25208 * typeck.c (build_binary_op_nodefault): Added warning about
25209 comparisons between different enum types with -Wall, unless
25210 -fenum-int-equiv set.
25211
25212 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
25213
25214 * class.c (finish_struct_1): Skip down to the inner type in
25215 multidimensional arrays. Ensures ctors will be made for types that
25216 need constructing.
25217
25218 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
25219
25220 * decl.c (last_dtor_insn): New to track the last compiler generated
25221 insn in a dtor.
25222 (store_parm_decls): Set it.
25223 (finish_function): Use it to see if the dtor is empty. Avoid doing
25224 vtable setup all the time, if we can.
25225 (struct cp_function): Add last_dtor_insn.
25226 (push_cp_function_context): Save it.
25227 (pop_cp_function_context): Restore it.
25228
25229 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
25230
25231 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
25232 warnings.
25233
25234 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
25235
25236 * typeck.c (expand_target_expr): Make sure targets get put into the
25237 current temp_slot_level, so that the free_temp_slots call will reuse
25238 them.
25239
25240 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
25241
25242 * class.c (finish_struct_1): Delay delta fixups for virtual bases
25243 until after we have done the hard virtuals, to avoid a bogus `every
25244 virtual function must have a unique final overrider' for virtual
25245 functions that are only overridden by hard virtuals.
25246
25247 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
25248
25249 * pt.c (do_function_instantiation): Don't try to find a file-scope
25250 template for a member function.
25251
25252 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
25253
25254 * g++.c (main): Add handling of -nodefaultlibs.
25255
25256 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
25257
25258 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
25259 distinguish between direct bindings of reference variables, and
25260 indirect bindings of reference variables.
25261 * cvt.c (build_up_reference): Use it.
25262 * typeck.c (convert_arguments): Use it to indicate this is an
25263 indirect binding.
25264 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
25265 as they are unused.
25266 (expand_static_init): Likewise.
25267 (cplus_expand_expr_stmt): Likewise.
25268 * decl2.c (finish_file): Likewise.
25269 * init.c (perform_member_init): Likewise.
25270 (emit_base_init): Likewise.
25271 (expand_aggr_vbase_init_1): Likewise.
25272
25273 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
25274
25275 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
25276 get a DECL_LANG_SPECIFIC node.
25277 * cp-tree.h (lang_decl_flags): Add new member `level'.
25278 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
25279 decl_flags level member.
25280
25281 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
25282
25283 * call.c (build_method_call): Make sure instance has a
25284 TYPE_LANG_SPECIFIC node before we dive into it.
25285
25286 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
25287
25288 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
25289
25290 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
25291
25292 * decl.c (duplicate_decls): When smashing decls, smash staticness in
25293 the usual way.
25294
25295 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
25296
25297 * decl.c (poplevel): Handle the merging of subblocks of cleanups
25298 when finishing blocks that have already been created (usually due to
25299 the fixup goto code). Fixes bad debugging information.
25300
25301 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
25302
25303 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
25304 that's not a list of overloaded functions.
25305
25306 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
25307
25308 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
25309 before trying to use DECL_ABSTRACT_VIRTUAL_P.
25310
25311 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
25312
25313 * decl2.c (mark_used): New function for hooking into setting of
25314 TREE_USED on decls.
25315 * call.c (build_method_call): Use it.
25316 * class.c (instantiate_type): Likewise.
25317 * init.c (build_offset_ref): Likewise. Don't call assemble_external
25318 for all like-named functions.
25319 * method.c (hack_identifier): Likewise.
25320 (emit_thunk): Don't call assemble_external.
25321 (make_thunk): Create thunk as a FUNCTION_DECL so that it
25322 gets the right mode and ENCODE_SECTION_INFO works.
25323
25324 * parse.y: Use mark_used. Pass operator names to do_identifier.
25325 * lex.c (do_identifier): Handle operator names.
25326
25327 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
25328
25329 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
25330
25331 * errfn.c: Include stdio.h.
25332 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
25333
25334 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
25335
25336 * typeck2.c (digest_init): Always convert initializers to the
25337 right type.
25338
25339 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
25340
25341 * init.c (member_init_ok_or_else): Don't allow member initializers
25342 for indirect members, as it is invalid.
25343
25344 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
25345
25346 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
25347
25348 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
25349
25350 * parse.y (for.init.statement): Catch compound statements inside for
25351 initializations, if we're being pedantic.
25352
25353 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
25354
25355 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
25356 looking for.
25357
25358 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
25359
25360 * error.c (dump_expr): Don't core dump when a boolean expression is
25361 used as a default argument.
25362
25363 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
25364
25365 * class.c (finish_struct_bits): Check aggregate_value_p instead of
25366 RETURN_IN_MEMORY.
25367
25368 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
25369
25370 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
25371 BLKmode type that would otherwise be returned in registers.
25372
25373 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
25374
25375 * g++.c (WITHLIBC): New macro.
25376 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
25377 saw_libc and pass it at the end if it was set.
25378
25379 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
25380
25381 * parse.y (fn.def1): Call split_specs_attrs in
25382 declmods notype_declarator case.