1 2000-06-24 Jason Merrill <jason@redhat.com>
3 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
4 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
6 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8 * parse.y (complex_direct_notype_declarator): Support global_scope.
9 * Makefile.in: Adjust conflict count.
11 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13 * parse.y (template_arg): Convert TEMPLATE_DECL
14 that is a template template paramter to
15 TEMPLATE_TEMPLATE_PARM here.
17 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
18 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
19 (copy_template_template_parm): Adjust prototype.
20 * decl.c (grokdeclarator): Remove dead code.
21 * pt.c (process_template_parm): Tidy.
22 (lookup_template_class): Construct nodes in
23 copy_template_template_parm.
24 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
25 lookup_template_class. Use TYPE_TI_TEMPLATE.
26 * tree.c (copy_template_template_parm): Add NEWARGS
28 (mapcar): Adjust call to copy_template_template_parm.
29 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
30 * method.c (build_template_template_parm_names): Change error
31 code to avoid compilation warning.
33 * gxxint.texi: Document template template parameter
36 2000-06-21 Alex Samuel <samuel@codesourcery.com>
38 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
39 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
40 (cp-demangle.o): New rule.
41 (dyn-string.o): Likewise.
42 * inc/cxxabi.h (__cxa_demangle): New declaration.
44 2000-06-22 Mark Mitchell <mark@codesourcery.com>
46 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
47 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
48 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
50 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
51 (make_thunk): Change prototype.
52 (emit_thunk): Rename to use_thunk.
53 (mangle_thunk): Change prototype.
54 * class.c (get_derived_offset): Simplify.
55 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
56 BV_GENERATE_THUNK_WITH_VTABLE_P.
57 (build_primary_vtable): Simplify.
58 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
59 (dfs_find_base): Remove.
60 (update_vtable_entry_for_fn): Correct bug in finding the base
61 where a virtual function was first declared. Figure out whether
62 or not to emit a vcall-thunk with the vtables in which it appears.
63 Correct logic for deciding whether to use an ordinary thunk, or a
65 (finish_struct_1): Remove unnecssary code.
66 (build_vtbl_initializer): Use ssize_int for the running counter of
68 (build_vtbl_initializer): Only use vcall thunks where necessary.
69 Mark thunks as needing to be emitted with their vtables, or not.
70 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
71 indices. Use size_binop.
72 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
73 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
75 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
76 (build_vtable_entry): Mark thunks as needing to be emitted with
77 their vtables, or not.
78 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
79 * decl2.c (mark_vtable_entries): Use use_thunk instead of
81 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
83 * error.c (dump_expr): Use BV_FN.
84 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
86 * method.c (make_thunk): Likewise.
87 (emit_thunk): Rename to use_thunk. Allow callers to decide
88 whether or not to actually emit the thunk. Adjust for changes in
89 representation of vcall offsets.
90 * search.c (dfs_get_pure_virtuals): Use BV_FN.
91 * semantics.c (emit_associated_thunks): New function.
92 (expand_body): Use it.
93 * ir.texi: Adjust decriptions of thunks.
95 2000-06-22 Jason Merrill <jason@redhat.com>
97 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
98 (tsubst_friend_function): Copy it here.
100 * decl.c (grok_op_properties): Fix typo.
102 * decl2.c (delete_sanity): Clarify warning, avoid failure on
105 * pt.c (check_explicit_specialization): Clarify error.
107 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
108 an old OVERLOAD when we're declaring a non-function.
109 (pushdecl, destroy_local_var): Check for error_mark_node.
110 (warn_extern_redeclared_static): Also bail early if
112 (push_overloaded_decl): Ignore an old error_mark_node.
114 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
116 * call.c (build_x_va_arg): Check if in a template decl.
117 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
119 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
121 * class.c (push_lang_context): TYPE_NAME gets you to the Java
123 * decl.c (check_goto): Computed gotos assumed OK.
125 2000-06-20 Jason Merrill <jason@redhat.com>
127 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
128 for which we don't need to look for instantiations.
130 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
132 * parse.y (program): Always call finish_translation_unit.
133 * parse.c, parse.h: Rebuilt.
135 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
137 * method.c: Don't include hard-reg-set.h.
139 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
141 * rtti.c (get_base_offset): Cope when vbase field is in a base.
143 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
145 * call.c (build_conditional_expr): Use VOID_TYPE_P.
146 * cvt.c (cp_convert_to_pointer): Likewise.
147 (convert_to_void): Likewise.
148 * error.c (dump_expr): Likewise.
149 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
150 * init.c (build_delete): Likewise.
151 * method.c (emit_thunk): Likewise.
152 * optmize.c (declare_return_variable): Likewise.
153 * rtti.c (get_tinfo_decl_dynamic): Likewise.
154 (get_typeid): Likewise.
155 (build_dynamic_cast_1): Likewise.
156 * typeck.c (composite_pointer_type): Likewise.
157 (common_type): Likewise.
158 (build_indirect_ref): Likewise.
159 (build_binary_op): Likewise.
160 (build_x_compound_expr): Likewise.
161 (check_return_expr): Likewise.
162 * typeck2.c (add_exception_specifier): Likewise.
164 * mangle.c (write_method_parms): Use direct comparison for end
167 2000-06-19 Benjamin Chelf <chelf@cabriolet.stanford.edu>
169 * cp-tree.h (genrtl_try_block): Declare function.
170 (genrtl_handler): Likewise.
171 (genrtl_catch_block): Likewise.
172 (genrtl_ctor_stmt): Likewise.
173 (genrtl_subobject): Likewise.
174 (genrtl_decl_cleanup): Likewise.
175 (genrtl_do_poplevel): Likewise.
176 (genrtl_do_pushlevel): Likewise.
177 (genrtl_clear_out_block): Likewise.
178 (genrtl_goto_stmt): Likewise.
179 (genrtl_expr_stmt): Likewise.
180 (genrtl_decl_stmt): Likewise.
181 (genrtl_if_stmt): Likewise.
182 (genrtl_while_stmt): Likewise.
183 (genrtl_do_stmt): Likewise.
184 (genrtl_return_stmt): Likewise.
185 (genrtl_for_stmt): Likewise.
186 (genrtl_break_stmt): Likewise.
187 (genrtl_continue_stmt): Likewise.
188 (genrtl_scope_stmt): Likewise.
189 (genrtl_switch_stmt): Likewise.
190 (genrtl_case_label): Likewise.
191 (genrtl_begin_compound_stmt): Likewise.
192 (genrtl_finish_compound_stmt): Likewise.
193 (genrtl_compound_stmt): Likewise.
194 (genrtl_asm_stmt): Likewise.
195 (genrtl_named_return_value): Likewise.
196 (genrtl_begin_stmt_expr): Likewise.
197 (genrtl_finish_stmt_expr): Likewise.
198 (finish_for_stmt): Removed first argument.
199 (finish_switch_stmt): Likewise.
201 * semantics.c (genrtl_try_block): Define function.
202 (genrtl_handler): Likewise.
203 (genrtl_catch_block): Likewise.
204 (genrtl_ctor_stmt): Likewise.
205 (genrtl_subobject): Likewise.
206 (genrtl_decl_cleanup): Likewise.
207 (genrtl_do_poplevel): Likewise.
208 (genrtl_do_pushlevel): Likewise.
209 (genrtl_clear_out_block): Likewise.
210 (genrtl_goto_stmt): Likewise.
211 (genrtl_expr_stmt): Likewise.
212 (genrtl_decl_stmt): Likewise.
213 (genrtl_if_stmt): Likewise.
214 (genrtl_while_stmt): Likewise.
215 (genrtl_do_stmt): Likewise.
216 (genrtl_return_stmt): Likewise.
217 (genrtl_for_stmt): Likewise.
218 (genrtl_break_stmt): Likewise.
219 (genrtl_continue_stmt): Likewise.
220 (genrtl_scope_stmt): Likewise.
221 (genrtl_switch_stmt): Likewise.
222 (genrtl_case_label): Likewise.
223 (genrtl_begin_compound_stmt): Likewise.
224 (genrtl_finish_compound_stmt): Likewise.
225 (genrtl_compound_stmt): Likewise.
226 (genrtl_asm_stmt): Likewise.
227 (genrtl_named_return_value): Likewise.
228 (genrtl_begin_stmt_expr): Likewise.
229 (genrtl_finish_stmt_expr): Likewise.
230 (finish_for_stmt): Removed first argument and generate rtl
232 (finish_switch_stmt): Likewise.
233 (do_poplevel): Removed generate rtl specific code.
234 (do_pushlevel): Likewise.
235 (add_tree): Likewise.
236 (finish_goto_stmt): Likewise.
237 (finish_expr_stmt): Likewise.
238 (begin_if_stmt): Likewise.
239 (finish_if_stmt_cond): Likewise.
240 (finish_then_clause): Likewise.
241 (begin_else_clause): Likewise.
242 (finish_else_clause): Likewise.
243 (finish_if_stmt): Likewise.
244 (clear_out_block): Likewise.
245 (begin_while_stmt): Likewise.
246 (finish_while_stmt_cond): Likewise.
247 (finish_while_stmt): Likewise.
248 (begin_do_stmt): Likewise.
249 (finish_do_body): Likewise.
250 (finish_do_stmt): Likewise.
251 (finish_return_stmt): Likewise.
252 (begin_for_stmt): Likewise.
253 (finish_for_init_stmt): Likewise.
254 (finish_for_cond): Likewise.
255 (finish_for_expr): Likewise.
256 (finish_break_stmt): Likewise.
257 (finish_continue_stmt): Likewise.
258 (begin_switch_stmt): Likewise.
259 (finish_switch_cond): Likewise.
260 (finish_case_label): Likewise.
261 (begin_try_block): Likewise.
262 (begin_function_try_block): Likewise.
263 (finish_try_block): Likewise.
264 (finish_cleanup_try_block): Likewise.
265 (finish_cleanup): Likewise.
266 (finish_function_try_block): Likewise.
267 (finish_handler_sequence): Likewise.
268 (finish_function_handler_sequence): Likewise.
269 (begin_handler): Likewise.
270 (finish_handler_parms): Likewise.
271 (begin_catch_block): Likewise.
272 (finish_handler): Likewise.
273 (begin_compound_stmt): Likewise.
274 (finish_compound_stmt): Likewise.
275 (finish_asm_stmt): Likewise.
276 (finish_label_stmt): Likewise.
277 (finish_label_decl): Likewise.
278 (finish_subobject): Likewise.
279 (finish_decl_cleanup): Likewise.
280 (finish_named_return_value): Likewise.
281 (begin_stmt_expr): Likewise.
282 (finish_stmt_expr): Likewise.
284 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
285 to call genrtl_expr_stmt when appropriate.
287 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
288 begin_compound_expr to call genrtl_begin_stmt_expr and
289 genrtl_begin_compound_expr when appropriate.
290 (finish_init_stmts): Changed calls to finish_compound_expr and
291 finish_stmt_expr to call genrtl_finish_compound_expr and
292 genrtl_finish_stmt_expr when appropriate.
293 (expand_default_init): Changed call to finish_expr_stmt to call
294 genrtl_expr_stmt when appropriate.
295 (build_vec_init): Likewise.
297 * parse.y (simple_stmt): Removed first argument from call to
298 finish_for_stmt. Removed first argument from call to
301 * parse.c: Regenerated.
303 * pt.c (tsubst_expr): Removed first argument from call to
304 finish_for_stmt. Removed first argument from call to
307 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
309 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
310 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
312 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
313 (cplus_tree_code_length[]): Likewise.
314 (cplus_tree_code_name[]): Likewise.
315 (init_parse): Added call to add_c_tree_codes. Changed
316 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
318 2000-06-16 Mark Mitchell <mark@codesourcery.com>
320 * cp-tree.h (finish_mem_initializers): Declare.
321 (count_trees): Likewise.
322 * parse.y (base_init): Use finish_mem_initializers.
323 * semantics.c (finish_mem_initializers): New function.
325 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
328 (count_trees): Don't use it.
330 2000-06-15 Jason Merrill <jason@redhat.com>
332 * tree.c (count_trees): New debugging function.
334 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
335 * init.c (build_member_call): Pull out the name of a DECL.
337 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
338 * semantics.c (expand_body): Push to TV_INTEGRATION here.
339 * optimize.c (optimize_function): Not here.
340 * pt.c (instantiate_decl): Push to TV_PARSE.
342 2000-06-15 Mark Mitchell <mark@codesourcery.com>
344 * cp-tree.h (struct language_function): Remove x_base_init_list
345 and x_member_init_list.
346 (current_base_init_list): Remove.
347 (current_member_init_list): Likewise.
348 (setup_vtbl_ptr): Change prototype.
349 (emit_base_init): Likewise.
350 (expand_member_init): Likewise.
351 (reinit_parse_for_function): Remove.
352 * decl.c (save_function_data): Don't clear x_base_init_list and
354 (mark_language_function): Don't mark them.
355 * init.c (perform_member_init): Tweak comment.
356 (sort_member_init): Take the list of initializers as an argument.
357 (sort_base_init): Likewise.
358 (emit_base_init): Likewise.
359 (expand_member_init): Return the initializer. Don't use global
361 * lex.c (reinit_parse_for_function): Remove.
362 * method.c (build_template_parm_names): Correct substitution.
363 (do_build_copy_constructor): Don't use current_member_init_list
364 and current_base_init_list.
365 (synthesize_method): Likewise.
366 * parse.y (base_init): Split mem-initializers into
367 base-initializers and field-initializers.
368 (member_init_list): Build up the list here.
369 (member_init): Return the initializer.
370 (fn.depfn): Don't use reinit_parse_for_function.
371 * parse.c: Regenerated.
372 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
374 (tsubst_expr): Don't use current_member_init_list
375 and current_base_init_list.
376 (tsubst_expr_values): Rename to ...
377 (tsubst_initializer_list): ... this. Use convert_from_reference.
378 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
379 and current_base_init_list.
380 (begin_function_definition): Don't call reinit_parse_for_function.
382 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
384 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
387 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
389 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
391 * cp-tree.h (IF_COND): Move to c-common.h.
392 (THEN_CLAUSE): Likewise.
393 (ELSE_CLAUSE): Likewise.
394 (WHILE_COND): Likewise.
395 (WHILE_BODY): Likewise.
398 (RETURN_EXPR): Likewise.
399 (EXPR_STMT_EXPR): Likewise.
400 (FOR_INIT_STMT): Likewise.
401 (FOR_COND): Likewise.
402 (FOR_EXPR): Likewise.
403 (FOR_BODY): Likewise.
404 (SWITCH_COND): Likewise.
405 (SWITCH_BODY): Likewise.
406 (CASE_LOW): Likewise.
407 (CASE_HIGH): Likewise.
408 (GOTO_DESTINATION): Likewise.
409 (COMPOUND_BODY): Likewise.
410 (ASM_CV_QUAL): Likewise.
411 (ASM_STRING): Likewise.
412 (ASM_OUTPUTS): Likewise.
413 (ASM_INPUTS): Likewise.
414 (ASM_CLOBBERS): Likewise.
415 (DECL_STMT_DECL): Likewise.
416 (STMT_EXPR_STMT): Likewise.
417 (LABEL_STMT_LABEL): Likewise.
418 (SCOPE_BEGIN_P): Likewise.
419 (SCOPE_END_P): Likewise.
420 (SCOPE_STMT_BLOCK): Likewise.
421 (SCOPE_NULLIFIED_P): Likewise.
422 (SCOPE_NO_CLEANUPS_P): Likewise.
423 (SCOPE_PARTIAL_P): Likewise.
424 (ASM_VOLATILE_P): Likewise.
425 (STMT_LINENO): Likewise.
426 (STMT_LINENO_FOR_FN_P): Likewise.
428 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
429 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
430 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
431 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
432 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
434 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
436 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
437 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
439 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
440 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
441 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
443 2000-06-14 Mark Mitchell <mark@codesourcery.com>
445 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
446 * class.c (dfs_find_final_overrider): Set it appropriately.
447 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
448 avoid unneeded secondary vptrs.
450 2000-06-13 Jakub Jelinek <jakub@redhat.com>
452 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
453 (check_bitfield_decl, check_field_decl): Likewise.
454 (build_vtbl_or_vbase_field, build_base_field): Likewise.
455 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
456 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
457 (xfer_tag, finish_enum): Likewise.
458 * decl2.c (finish_builtin_type): Likewise.
459 * init.c (init_init_processing): Likewise.
460 * pt.c (instantiate_class_template): Likewise.
461 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
462 * cp-tree.h (struct lang_type): Add user_align member.
463 (CLASSTYPE_USER_ALIGN): Define.
465 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
467 * Make-lang.in (c++.install-common): Install g++-cross in
468 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
469 $(target_alias)-g++ and $(target_alias)-c++.
471 2000-06-12 Mark Mitchell <mark@codesourcery.com>
473 * class.c (vcall_offset_data_s): Add last_init and fns.
474 (overrides): Rename to same_signature_p.
475 (dfs_find_final_overrider): Adjust accordingly.
476 (mark_overriders): Likewise.
477 (warn_hidden): Likewise.
478 (build_vtbl_initializer): Reorganize machinery for building things
480 (build_vcall_and_vbase_vtbl_entries): Likewise.
481 (build_vbase_offset_vtbl_entries): Likewise.
482 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
483 offset entries. Do not create two entries for functions with the
485 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
486 (build_rtti_vtbl_entries): Reorganize machinery for building things
489 * optimize.c (expand_call_inline): Don't recurse into the code
490 used to initialize the parameters more than once.
492 2000-06-11 Mark Mitchell <mark@codesourcery.com>
494 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
495 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
496 (find_substitution): Only use the `Sa' substitution for
497 std::allocator, not instantiations of it.
498 (write_template_prefix): Move comment. Only use a TREE_LIST to
499 represent substitutions for a member template.
500 (write_array_type): Mangle array dimensions correctly.
501 * optimize.c (maybe_clone_body): Copy more information from the
503 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
504 on the regenerated declaration.
506 2000-06-11 Chip Salzenberg <chip@valinux.com>
507 Mark Mitchell <mark@codesourcery.com>
509 * class.c (build_vtable): Clarify comment.
510 (build_ctor_vtbl_group): Pass the most derived type to
513 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
515 * decl2.c (compare_options): Don't needlessly cast away const-ness.
517 2000-06-10 Mark Mitchell <mark@codesourcery.com>
519 * decl.c (add_binding): Handle duplicate declarations of external
522 2000-06-09 Chip Salzenberg <chip@valinux.com>
523 Mark Mitchell <mark@codesourcery.com>
525 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
527 (write_signed_number): New macro.
528 (write_unsigned_number): Likewise.
529 (write_source_name): Use them.
530 (write_number): Handle signed and unsigned values.
531 (write_integer_cst): Use tree_int_cst_sgn, and use
532 write_unsigned_number or write_signed_number as appropriate.
533 (write_discriminator): Use write_unsigned_number or
534 write_signed_number as appropriate.
535 (write_template_arg_literal): Likewise.
536 (write_array_type): Use tree_low_cst.
537 (write_template_parm): Use write_unsigned_number or
538 write_signed_number as appropriate.
539 (write_substitution): Adjust call to write_number.
540 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
541 (write_expression): Handle non-type template arguments of
542 reference type correctly.
543 (mangle_thunk): Use write_signed_number.
545 2000-06-09 Chip Salzenberg <chip@valinux.com>
547 * mangle.c (find_substition): Don't mangle objects with typename
548 substitutions (e.g. "cin" as "Si").
550 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
552 * call.c (add_candidate): Use ggc_alloc_cleared.
553 * decl.c (lookup_label): Likewise.
554 * lex.c (retrofit_lang_decl): Likewise.
556 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
558 * semantics.c (expand_body): Push to TV_EXPAND.
559 * optimize.c (optimize_function): Push to TV_INTEGRATION.
560 * decl.c (start_function): Always call announce_function.
562 * tinfo2.cc: Just declare abort.
564 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
566 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
567 whenever @ is a symbolic name.
569 2000-06-08 Jakub Jelinek <jakub@redhat.com>
571 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
573 2000-06-07 Mark Mitchell <mark@codesourcery.com>
575 * decl.c (pushdecl): Look up functions by DECL_NAME, not
578 2000-06-06 Mark Mitchell <mark@codesourcery.com>
580 * decl2.c (c_language): Define.
582 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
584 * lex.c (lang_init_options): Tweak.
586 * decl2.c: Remove #inclusion of diagnostic.h
587 (lang_decode_option): Move diagnostic formatting options to
590 * lang-options.h: Remove documentation for diagnostic options.
592 * Makefile.in (lex.o): Depends upon diagnostic.h
594 2000-06-06 Mark Mitchell <mark@codesourcery.com>
596 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
597 the same DECL_RESULT, it's not a redefinition.
598 * pt.c (tsubst_decl): Remove code to handle illegal
601 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
603 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
605 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
607 * search.c (maybe_suppress_debug_info): Don't check
608 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
610 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
613 Remember instantiation context in deferred instantiations.
614 * cp-tree.h (struct tinst_level): Remove.
615 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
616 * pt.c (current_tinst_level): Now a tree.
617 (print_template_context, push_tinst_level, pop_tinst_level,
618 tinst_for_decl): Adjust.
619 (reopen_tinst_level): New fn.
620 (init_pt): Register current_tinst_level as a root.
621 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
622 of the pending templates list.
623 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
624 * lex.c (extract_interface_info): Adjust.
625 * decl2.c (warn_if_unknown_interface): Adjust.
627 2000-06-05 Mark Mitchell <mark@codesourcery.com>
629 * class.c (indirect_primary_base_p): New function.
630 (determine_primary_base): Use it.
632 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
634 Update new-abi dynamic cast algorithm.
635 * tinfo.cc (__class_type_info::__dyncast_result): Add
636 whole_details. Adjust constructor.
637 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
638 Avoid unnecessary searching.
639 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
641 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
643 * decl.c (init_decl_processing): Don't call record_component_aliases.
644 * tree.c (build_cplus_array_type_1): Likewise.
646 2000-06-04 Mark Mitchell <mark@codesourcery.com>
648 * ir.texi: Correct typo.
649 * mangle.c (write_expression): Handle non-type template arguments
651 * method.c (build_overload_value): Likewise.
652 * pt.c (convert_nontype_argument): Explicitly represent conversion
653 to a reference with an ADDR_EXPR.
654 (unify): Always unify arguments in left-to-right order.
656 2000-06-03 Alex Samuel <samuel@codesourcery.com>
657 Mark Mitchell <mark@codesourcery.com>
659 * Make-lang.in (CXX_SRCS): Add mangle.c.
660 * Makefile.in (CXX_OBJS): Add mangle.o.
661 (mangle.o): New rule.
663 * class.c (local_classes): New variable.
664 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
665 (get_vtt_name): Use mangle_vtt_name for new ABI.
666 (init_class_processing): Initialize local_classes.
667 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
668 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
669 (std_identifier): New macro.
670 (DECL_VOLATILE_MEMFUNC_P): New macro.
671 (DECL_NAMESPACE_STD_P): Likewise.
672 (local_classes): Declare.
673 (get_mostly_instantiated_function_type): Declare.
674 (init_mangle): Declare.
675 (mangle_decl): Likewise.
676 (mangle_type_string): Likewise.
677 (mangle_type): Likewise.
678 (mangle_typeinfo_for_type): Likewise.
679 (mangle_typeinfo_string_for_type): Likewise.
680 (mangle_vtbl_for_type): Likewise.
681 (mangle_vtt_for_type): Likewise.
682 (mangle_ctor_vtbl_for_type): Likewise.
683 (mangle_thunk): Likewise.
684 (mangle_conv_op_name_for_type): Likewise.
685 (mangle_guard_variable): Likewise.
686 * decl.c (pushtag): Keep track of local classes.
687 (initialize_predefined_identifiers): Initialize std_identifier.
688 (init_decl_processing): Use std_identifier.
689 (start_decl): Don't treat instantiations as specializations.
690 (grokdeclarator): Likewise.
691 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
692 name for fully-instantiated templates.
693 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
694 destructors with the new ABI.
695 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
696 (grokfield): Use mangle_type for new ABI.
697 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
698 (get_sentry): Use mangle_guard_variable for new ABI.
699 (start_static_initialization_or_destruction): Likewise.
700 * expr.c (extract_aggr_init): Remove.
701 (extract_scalar_init): Likewise.
702 (extract_init): Remove #if 0'd code.
703 * mangle.c: New function.
704 * method.c (build_mangled_name): Assert not flag_new_abi.
705 (build_static_name): Likewise.
706 (build_decl_overload_real): Likewise.
707 (build_typename_overload): Likewise.
708 (build_overload_with_type): Likewise.
709 (build_overload_name): Likewise.
710 (get_ctor_vtbl_name): Likewise.
711 (start_squangling): Likewise.
712 (get_id_2): Likewise.
713 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
714 (init_method): Call init_mangle for new ABI.
715 (make_thunk): Call mangle_thunk for new ABI.
716 * operators.def: Correct new ABI manglings for the `%' operator.
718 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
719 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
720 (lookup_template_class): Call mangle_decl for new ABI.
721 (get_mostly_instantiated_function_type): New function.
722 (set_mangled_name_for_template_decl): Use it.
723 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
724 the new ABI. Use mangle_conv_op_name_for_type for instantiated
726 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
727 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
728 (tinfo_base_init): Likewise. Mangle typeinfo string name with
729 mangle_typeinfo_string_for_type.
731 2000-06-01 Richard Henderson <rth@cygnus.com>
733 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
735 2000-06-01 Richard Henderson <rth@cygnus.com>
737 * decl2.c (unsupported_options): Fix typo, make const.
738 (lang_decode_option): Fix bsearch argument order.
740 2000-06-01 Mark Mitchell <mark@codesourcery.com>
742 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
745 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
747 * cp-tree.h (c_get_alias_set): Deleted.
748 * Makefile.in (decl.o): Include ../expr.h.
749 * decl.c (expr.h): Include.
750 (init_decl_processing): Call record_component_aliases for arrays.
751 (grokdeclarator): Likewise.
752 Set TREE_ADDRESSABLE for fields that aren't bitfields.
753 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
755 2000-05-31 Mark Mitchell <mark@codesourcery.com>
757 Remove guiding declaration support.
758 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
759 (flag_guiding_decls): Remove.
760 * call.c (build_user_type_conversion_1): Remove support for
762 (build_new_function_call): Likewise.
763 (build_new_op): Likewise.
764 (build_new_method_call): Likewise.
765 * decl.c (start_function): Likewise.
766 * friend.c (is_friend): Likewise.
767 (do_friend): Likewise.
768 * decl2.c ((flag_dump_translation_unit): Make it const.
769 (flag_guiding_decls): Remove.
770 (unsupported_options): New variable
771 (compare_options): New function.
772 (lang_decode_option): Use them.
774 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
776 * method.c (mangle_expression): Adjust test for legal expression
779 * pt.c (instantiate_decl): Save and restore the local
780 specializations list.
782 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
784 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
786 2000-05-30 Mark Mitchell <mark@codesourcery.com>
788 * call.c (add_template_candidate_real): Handle member template
789 constructors for classes with virtual bases.
790 (build_user_type_conversion_1): Use in_charge_arg_for_name.
791 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
793 * ir.texi: Update thunk documentation.
795 * call.c (joust): Fix handling of overloaded builtin operators.
797 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
799 * cp-tree.h (DECL_ANTICIPATED): New macro.
800 Document new use of DECL_LANG_FLAG_7.
801 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
802 in the user namespace.
803 * lex.c (do_identifier): If the identifier's declaration has
804 DECL_ANTICIPATED on, it has not yet been declared. But do not
805 replace it with an ordinary implicit declaration.
807 * tinfo2.cc: Include stdlib.h.
809 2000-05-29 Mark Mitchell <mark@codesourcery.com>
811 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
812 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
815 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
817 * decl2.c (lang_decode_option): Use skip_leading_substring instead
820 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
822 * operators.def (<?): Duplicated, should have been...
825 2000-05-27 Alex Samuel <samuel@codesourcery.com>
826 Mark Mitchell <mark@codesourcery.com>
828 * cp-tree.h (ansi_opname): Make it a macro.
829 (ansi_assopname): Likewise.
830 (struct lang_decl_flags): Add assignment_operator_p.
831 (struct lang_decl): Add operator_code.
832 (DECL_VTT_PARM): Adjust.
833 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
835 (SET_OVERLOADED_OPERATOR_CODE): New macro.
836 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
837 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
838 (opname_tab): Remove.
839 (assignop_tab): Likewise.
840 (operator_name_info_t): New type.
841 (operator_name_info): New variable.
842 (assignment_operator_name_info): Likewise.
843 (build_cp_library_fn): Remove declaration.
844 (push_cp_library_fn): Likewise.
845 (operator_name_string): Likewise.
846 (build_decl_overload): Likewise.
847 * call.c (print_z_candidates): Simplify.
848 (build_object_call): Adjust usage of ansi_opname. Use
849 DECL_OVERLOADED_OPERATOR_P.
850 (op_error): Adjust operator name lookup.
851 (build_conditional_expr): Adjust usage of ansi_opname.
852 (build_new_op): Likewise.
853 (build_op_delete_call): Likewise.
854 (build_over_call): Likewise.
855 (joust): Use DECL_OVERLOADED_OPERATOR_P.
856 * decl.c (duplicate_decls): Copy operator_code.
857 (init_decl_processing): Adjust parameters to push_cp_library_fn.
858 (builtin_function): Adjust parameters to build_library_fn_1.
859 (build_library_fn_1): Accept an overloaded operator code.
860 (build_library_fn): Pass ERROR_MARK.
861 (build_cp_library_fn): Accept an overloaded operator code.
862 (push_cp_library_fn): Likewise.
864 (grokdeclarator): Simplify code to compute names of overloaded
865 operators. Adjust use of ansi_opname.
866 (ambi_op_p): Work on tree_codes, not identifiers.
867 (unary_op_p): Likewise.
868 (grok_op_properties): Likewise.
869 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
870 (lang_mark_tree): Don't try to mark the operator_code.
871 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
872 * error.c (dump_decl): Remove special handling for operator
874 (dump_function_name): Likewise.
875 (dump_expr): Adjust name lookup of operators.
876 (op_to_string): Simplify.
877 (assop_to_string): Likewise.
878 * init.c (build_new_1): Adjust use of ansi_opname.
879 * lex.c (opname_tab): Remove.
880 (assignop_tab): Likewise.
881 (ansi_opname): Likewise.
882 (ansi_assopname): Likewise.
883 (operator_name_string): Likewise.
884 (reinit_lang_specific): Likewise.
885 (operator_name_info): New variable.
886 (assignment_operator_name_info): Likewise.
887 (init_operators): New function.
888 (init_parse): Use it.
889 (do_identifier): Adjust use of ansi_opname.
890 * method.c (mangle_expression): Don't use ansi_opname for
892 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
893 (build_decl_overload): Remove.
894 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
895 (do_build_assign_ref): Adjust use of ansi_opname.
896 (synthesize_method): Likewise.
897 (implicitly_declare_fn): Likewise.
898 * operators.def: New file.
899 * parse.y (operator): Adjust use of ansi_opname.
900 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
901 (set_mangled_name_for_template_decl): Don't play games with
903 (special_function_p): Adjust use of ansi_opname.
904 * typeck.c (check_return_expr): Likewise.
905 * Make-lang.in (cc1plus): Depend on operators.def.
906 * Makefile.in (lex.o): Likewise.
909 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
911 * Make-lang.in (cplib2.ready): Eradicate.
913 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
915 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
916 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
917 (built_min, cp_tree_equal): Likewise.
919 2000-05-26 Mark Mitchell <mark@codesourcery.com>
921 * class.c (layout_nonempty_base_or_field): Replace
922 `record_layout_info' with `record_layout_info_s'.
924 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
927 * cp-tree.h (struct language_function): x_named_labels is now
928 a struct named_label_list*.
929 * decl.c (struct named_label_use_list): Renamed from...
930 (struct named_label_list): ...this. New struct.
931 (push_binding_level): Don't set eh_region.
932 (note_level_for_eh): New fn.
933 (pop_label): Take label and old value directly.
934 (pop_labels): Adjust for new named_labels format.
935 (lookup_label): Likewise.
936 (poplevel): Note characteristics of a binding level containing a
937 named label. Mess with named label lists earlier.
938 (mark_named_label_lists): New fn.
939 (mark_lang_function): Call it.
940 (use_label): New fn, split out from...
941 (make_label_decl): ...here. Don't call it.
942 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
943 check_previous_gotos): New fns, split out from...
944 (define_label): ...here.
945 (check_switch_goto): New fn.
946 (define_case_label): Call it.
947 (check_goto): New fn.
948 * semantics.c (finish_goto_stmt): Call it and use_label.
949 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
950 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
952 2000-05-26 Mark Mitchell <mark@codesourcery.com>
954 * class.c (build_vtable_entry_ref): Correct usage of
955 get_vtbl_decl_for_binfo.
957 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
958 * method.c (implicitly_declare_fn): Not here.
960 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
962 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
963 (CPTI_PTMD_DESC_TYPE): ... here.
964 (ptmd_desc_type_node): Rename to ...
965 (ptm_desc_type_node): ... here.
967 * rtti.c (ptmd_initializer): Rename to ...
968 (ptm_initializer): ... here.
969 (sythesize_tinfo_var): Adjust. Deal with pointer to member
971 (create_tinfo_types): Adjust.
973 2000-05-25 Mark Mitchell <mark@codesourcery.com>
975 Finish implementation of VTTs.
976 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
977 CPTI_VTT_PARM_IDENTIFIER.
978 (vtt_parm_identifier): New macro.
979 (vtt_parm_type): Likewise.
980 (BINFO_SUBVTT_INDEX): Likewise.
981 (BINFO_VPTR_INDEX): Likewise.
982 (struct lang_decl): Add vtt_parm.
983 (DECL_VTT_PARM): New macro.
984 (DECL_USE_VTT_PARM): Likewise.
985 (DECL_NEEDS_VTT_PARM_P): Likewise.
986 (get_vtt_name): Declare.
987 (build_artifical_parm): Likewise.
988 (fixup_all_virtual_upcast_offsets): Likewise.
989 (expand_indirect_vtbls_init): Remove.
990 * call.c (build_new_method_call): Pass the vtt to subobject
991 constructors and destructors.
992 * class.c (get_vtt_name): Give it external linkage.
993 (build_clone): Handle the magic VTT parameters for clones.
994 (clone_function_decl): Fix typo in comment.
995 (build_vtt): Keep track of the indices in the VTTs where various
997 (build_vtt_inits): Likewise.
998 (dfs_build_vtt_inits): Likewise.
999 (build_ctor_vtbl_group): Tweak type of construction vtables.
1000 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
1001 primary bases, when building construction vtables.
1002 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
1003 (initialize_predefined_identifiers): Add vtt_parm_identifier.
1004 (init_decl_processing): Initialize vtt_parm_type.
1005 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
1006 (lang_mark_tree): Make vtt_parm.
1007 * decl2.c (build_artificial_parm): New function.
1008 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
1009 (grokclassfn): Use build_artificial_parm.
1010 * init.c (initialize_vtbl_ptrs): Call
1011 fixup_all_virtual_upcast_offsets directly.
1012 (perform_member_init): Use the complete subobject destructor for
1014 (build_vtbl_address): New function.
1015 (expand_virtual_init): Handle VTTs.
1016 * optimize (maybe_clone_body): Likewise.
1017 * search.c (fixup_all_virtual_upcast_offsets): Give it external
1019 (expand_indirect_vtbls_init): Remove.
1020 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
1021 * tree.c (make_binfo): Make them bigger.
1023 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
1025 * inc/cxxabi.h (__pbase_type_info): Define, based on
1026 __pointer_type_info.
1027 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
1028 (__pointer_to_member_type_info): Likewise.
1029 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
1030 (__pointer_to_member_type_info::__is_pointer_p): Remove.
1031 (__pointer_type_info::__do_catch): Rename to ...
1032 (__pbase_type_info::__do_catch): ... here. Adjust.
1033 (__pbase_type_info::__pointer_catch): Implement.
1034 (__pointer_type_info::__pointer_catch): Adjust.
1035 (__pointer_to_member_type_info::__pointer_catch): Adjust.
1037 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
1039 * tinfo.h (__user_type_info::contained_virtual_p): New
1041 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
1043 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
1044 diamond shaped heirarchy. Add early out for mixed diamond and
1045 duplicate shaped heirarchy.
1047 2000-05-24 Mark Mitchell <mark@codesourcery.com>
1049 * cp-tree.h (build_delete): Change prototype.
1050 (build_vec_delete): Likewise.
1051 * call.c (build_scoped_method_call): Use special_function_kind
1052 values to indicate the kind of destruction to be done.
1053 (build_method_call): Likewise.
1054 * decl.c (finish_destructor_body): Likewise.
1055 (maybe_build_cleanup_1): Likewise. Rename to ...
1056 (maybe_build_cleanup): ... this.
1057 * decl2.c (delete_sanity): Use special_function_kind
1058 values to indicate the kind of destruction to be done.
1059 (build_cleanup): Likewise.
1060 * init.c (perform_member_init): Likewise.
1061 (build_vec_delete_1): Likewise.
1062 (build_dtor_call): Simplify.
1063 (build_delete): Use special_function_kind
1064 values to indicate the kind of destruction to be done.
1065 (build_vbase_delete): Likewise.
1066 (build_vec_delete): Likewise.
1068 * init.c (sort_member_init): Fix typo in error message generation
1071 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
1073 * semantics.c (begin_class_definition): make the packed
1074 attribute be sensitive to the "-fpack-struct" command line flag
1076 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
1078 Update new-abi upcast algorithm.
1079 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
1080 prototype and meaning of return value.
1081 (__si_class_type_info::__do_upcast): Likewise.
1082 (__vmi_class_type_info::__do_upcast): Likewise.
1083 * tinfo.cc (__class_type_info::__upcast_result): Replace
1084 whole2dst with part2dst. Adjust ctor.
1085 (__class_type_info::__do_upcast): Adjust call of worker function.
1086 (__class_type_info::__do_upcast): Adjust.
1087 (__si_class_type_info::__do_upcast): Adjust. Use parent's
1089 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
1090 virtual base in diamond heirarchy bug.
1092 2000-05-23 Mark Mitchell <mark@codesourcery.com>
1094 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
1095 and bitfield to tinfo_fn_p.
1096 (DECL_TINFO_FN_P): Adjust.
1097 (SET_DECL_TINFO_FN_P): Likewise.
1098 (DECL_MUTABLE_P): Likewise.
1099 (DECL_C_BIT_FIELD): Likewise.
1100 (SET_DECL_C_BIT_FIELD): Likewise.
1101 (CLEAR_DECL_C_BIT_FIELD): Likewise.
1102 (DECL_UNINLINABLE): Likewise.
1103 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
1104 (handle_using_decl): Remove assertion.
1105 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
1106 to build FIELD_DECLs.
1107 (build_base_field): Likewise.
1108 (layout_class_type): Likewise.
1109 * decl.c (init_decl_processing): Likewise.
1110 (build_ptrmemfunc_type): Likewise.
1111 (grokdeclarator): Likewise.
1112 * decl2.c (grok_x_components): Likewise.
1113 * except.c (call_eh_info): Likewise.
1114 * init.c (init_init_processing): Likewise.
1115 * rtti.c (expand_class_desc): Likewise.
1116 (create_pseudo_type_info): Likewise.
1117 (get_vmi_pseudo_type_info): Likewise.
1118 (create_tinfo_types): Likewise.
1119 * ptree.c (print_lang_decl): Adjust.
1120 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
1121 before checking DECL_MUTABLE_P.
1123 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
1124 parameters for template functions.
1125 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
1126 destructors as well as constructors.
1128 2000-05-22 Mark Mitchell <mark@codesourcery.com>
1130 * class.c (build_ctor_vtbl_group): Set inits.
1131 * optimize.c (maybe_clone_body): Set DECL_INLINE and
1132 DECL_THIS_INLINE appropriately for clones.
1134 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
1135 (DECL_CONV_FN_P): Simplify.
1136 (DECL_OPERATOR): Remove.
1137 (language_to_string): Declare.
1138 * decl.c (duplicate_decls): Fix typo in comment.
1139 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
1140 (grok_op_properties): Use DECL_CONV_FN_P instead of
1141 IDENTIFIER_TYPENAME_P.
1142 * dump.c (dequeue_and_dump): Dump the language linkage of
1144 * error.c (language_to_string): Give it external linkage.
1145 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
1146 (implicitly_declare_fn): Set DECL_LANGUAGE.
1147 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
1148 IDENTIFIER_TYPENAME_P.
1149 (tsubst_decl): Likewise.
1150 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
1151 * semantics.c (finish_member_declaration): Don't mark members of
1152 classes declared in an extern "C" region as extern "C".
1154 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1156 * decl2.c (qualified_lookup_using_namespace): Look through
1159 * decl.c (push_using_decl): Return the old decl on namespace level.
1161 2000-05-21 Mark Mitchell <mark@codesourcery.com>
1163 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
1164 (VTT_NAME_PREFIX): New macro.
1165 (CTOR_VTBL_NAME_PREFIX): Likewise.
1166 (get_ctor_vtbl_name): New function.
1167 * class.c (get_vtable_name): Simplify.
1168 (get_vtt_name): New function.
1169 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
1170 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
1171 when a virtual base becomes primary.
1172 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
1174 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
1175 additional parameters.
1176 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
1177 (initialize_array): New function.
1178 (build_vtt): Likewise.
1179 (build_vtt_inits): Likewise.
1180 (dfs_build_vtt_inits): Likewise.
1181 (dfs_fixup_binfo_vtbls): Likewise.
1182 (build_ctor_vtbl_group): Likewise.
1183 (initialize_vtable): Use initialize_array.
1184 (accumulate_vtbl_inits): Reimplement to handle construction
1186 (dfs_accumulate_vtbl_inits): Likewise.
1187 (bulid_vtbl_initializer): Adjust parameter name.
1188 * method.c (build_typename_overload): Remove #if 0'd code.
1189 (get_ctor_vtbl_name): New function.
1190 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
1191 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
1193 * cp-tree.h (struct lang_type): Remove search_slot.
1194 (CLASSTYPE_SEARCH_SLOT): Remove.
1195 (emit_base_init): Change prototype.
1196 (initialize_vtbl_ptrs): Likewise.
1197 (expand_indirect_vtbls_init): Likewise.
1198 (clear_search_slots): Remove.
1199 * decl.c (lang_mark_tree): Don't mark search_slot.
1200 * init.c (initialize_vtbl_ptrs): Simplify.
1201 (emit_base_init): Likewise.
1202 * search.c (struct vbase_info): Document decl_ptr.
1203 (convert_pointer_to_single_level): Remove.
1204 (dfs_find_vbases): Remove.
1205 (dfs_init_base_pointers): Simplify.
1206 (dfs_clear_vbase_slots): Remove.
1207 (dfs_vtable_path_unmark): New function.
1208 (init_vbase_pointers): Simplify.
1209 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
1210 (expand_indirect_vtbls_init): Simplify. Don't call
1211 mark_all_temps_used.
1212 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
1213 initialize_vtbl_ptrs.
1215 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
1217 * except.c: Add static prototypes.
1219 2000-05-20 H.J. Lu <hjl@gnu.org>
1221 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
1223 2000-05-19 Mark Mitchell <mark@codesourcery.com>
1225 Don't create a separate copy of virtual bases for the
1226 CLASSTYPE_VBASECLASSES list.
1227 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
1228 (BINFO_FOR_VBASE): Remove.
1229 (CANONICAL_BINFO): Adjust.
1230 (binfo_for_vbase): New function.
1231 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
1232 instead of BINFO_FOR_VBASE.
1233 (build_vbase_pointer): Likewise.
1234 (build_secondary_vtable): Likewise.
1235 (dfs_mark_primary_bases): Likewise.
1236 (mark_primary_bases): Likewise.
1237 (layout_nonempty_base_or_field): Likewise.
1238 (dfs_set_offset_for_shared_vbases): Likewise.
1239 (dfs_set_offset_for_unshared_vbases): Likewise.
1240 (layout_virtual_bases): Likewise. Adjust for changes to the
1241 CLASSTYPE_VBASECLASSES list.
1242 (dump_class_hierarchy_r): Use binfo_for_vbase
1243 instead of BINFO_FOR_VBASE.
1244 (dump_class_hierarchy): Likewise.
1245 (finish_vtbls): Likewise.
1246 (build_vtbl_initializer): Adjust for changes to the
1247 CLASSTYPE_VBASECLASSES list.
1248 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
1249 * decl.c (finish_destructor_body): Adjust for changes to the
1250 CLASSTYPE_VBASECLASSES list.
1251 * init.c (sort_base_init): Use binfo_for_vbase.
1252 (construct_virtual_bases): Adjust for changes to the
1253 CLASSTYPE_VBASECLASSES list.
1254 (expand_member_init): Use binfo_for_vbase.
1255 (build_vbase_delete): Adjust for changes to the
1256 CLASSTYPE_VBASECLASSES list.
1257 * method.c (do_build_copy_constructor): Likewise.
1258 * rtti.c (get_base_offset): Use binfo_for_vbase.
1259 (expand_class_desc): Remove #if 0'd code.
1260 * search.c (struct vbase_info): Remove vbase_types.
1261 (get_base_distance): Use binfo_for_vbase.
1262 (lookup_field_queue_p): Use CANONICAL_BINFO.
1263 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
1264 (get_pure_virtuals): Adjust for changes to the
1265 CLASSTYPE_VBASECLASSES list.
1266 (dfs_find_vbases): Use binfo_for_vbase.
1267 (dfs_init_vbase_pointers): Likewise.
1268 (init_vbase_pointers): Don't initialize vi.vbase_types.
1269 (virtual_context): Use binfo_for_vbase.
1270 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
1271 CLASSTYPE_VBASECLASSES list.
1272 (expand_indirect_vtbls_init): Simplify.
1273 (dfs_get_vbase_types): Don't replicate virtual bases.
1274 (find_vbase_instance): Use binfo_for_vbase.
1275 (binfo_for_vbase): New function.
1276 * typeck.c (get_delta_difference): Use binfo_for_vbase.
1278 2000-05-17 Mark Mitchell <mark@codesourcery.com>
1280 * decl2.c (finish_anon_union): Generalize error messages to handle
1281 anonymous structures.
1282 * init.c (perform_member_init): Remove `name' parameter.
1283 (build_field_list): New function.
1284 (sort_member_init): Handle anonymous union initialization order
1285 correctly. Check for multiple initializations of the same union.
1286 (emit_base_init): Don't look up fields by name here.
1287 (expand_member_init): Record the result of name lookup for future
1289 * typeck.c (build_component_ref): Fix formatting.
1291 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
1293 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
1294 * typeck.c (build_x_compound_expr): Replace warn_unused with
1297 * decl2.c (lang_decode_option): Update -Wall unused flags by
1298 calling set_Wunused.
1300 2000-05-16 Mark Mitchell <mark@codesourcery.com>
1302 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
1303 * init.c (dfs_vtable_path_unmark): Remove.
1304 * search.c (marked_new_vtable_p): Likewise.
1305 (unmarked_new_vtable_p): Likewise.
1306 (dfs_search_slot_nonempty_p): Likewise.
1307 (dfs_mark): Likewise.
1308 (dfs_vtable_path_unmark): Likewise.
1309 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
1310 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
1311 (dfs_init_vbase_pointers): Remove special-case new ABI code.
1312 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
1313 (init_vbase_pointers): Simplify.
1314 (expand_indirect_vtbls_init): Likewise.
1316 * class.c (copy_virtuals): New function.
1317 (build_primary_table): Use it.
1318 (build_secondary_vtable): Likewise.
1319 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
1320 indicate that no vcall offset is required.
1321 (add_virtual_function): Likewise.
1322 (modify_all_vtables): Likewise.
1323 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
1324 (dfs_accumulate_vtbl_inits): Likewise.
1325 (build_vtbl_initializer): Make changes to handle construction
1327 (dfs_build_vcall_offset_vtbl_entries): Likewise.
1328 (build_rtti_vtbl_entries): Likewise.
1329 (build_vtable_entries): Handle a NULL vcall_index.
1331 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
1333 * decl2.c (lang_decode_option): Fix thinko.
1335 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
1337 * except.c (check_handlers): New fn.
1338 * cp-tree.h: Declare it.
1339 * semantics.c (finish_handler_sequence): Call it.
1340 (finish_function_handler_sequence): Likewise.
1341 (finish_handler_parms): Set TREE_TYPE on the handler.
1342 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
1343 * search.c (get_base_distance_recursive): If protect>1, ignore
1345 (get_base_distance): Don't reduce watch_access.
1347 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
1349 * lex.c: #include diagnostic.h.
1350 (lang_init_options): Set default prefixing rules.
1352 * lang-options.h: Add -fdiagnostics-show-location=.
1354 * decl2.c: #include diagnostic.h.
1355 (lang_decode_option): Handle -fdiagnostics-show-location=.
1357 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
1359 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
1360 * vec.cc: Revert my 2000-05-07 change.
1362 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
1364 * class.c (check_field_decls): Complain about non-static data
1365 members with same name as class in class with constructor.
1367 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
1369 * decl.c (grokdeclarator): Allow non-static data members with
1372 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
1374 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
1375 and pending_inline.filename. Update prototypes.
1376 * decl.c (define_label): Constify filename parameter.
1377 * decl2.c (warn_if_unknown_interface): Constify local char *.
1378 * input.c Constify input_source.filename. Don't declare
1379 input_filename or lineno. Constify filename parameter to feed_input.
1380 * lex.c (init_parse): Constify parameter and return value.
1381 (cp_pragma_interface, cp_pragma_implementation): Constify
1383 (reinit_parse_for_method, reinit_parse_for_block,
1384 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
1385 Constify local char *.
1386 * pt.c: Don't declare lineno or input_filename.
1387 (print_template_context, tsubst_friend_function, tsubst_decl,
1388 tsubst, instantiate_decl): Constify local char *.
1389 * semantics.c (expand_body): Constify local char *.
1390 * tree.c (build_srcloc): Constify filename parameter.
1391 * typeck.c (c_expand_asm_operands): Constify filename
1394 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
1396 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
1399 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
1401 * inc/cxxabi.h: Fix typos in comment.
1402 (__base_class_info::__offset): Use a static_cast.
1404 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
1406 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
1407 of std::size_t and std::ptrdiff_t respectively.
1408 * tinfo.cc: Likewise.
1411 2000-05-06 Richard Henderson <rth@cygnus.com>
1413 * typeck.c (build_c_cast): Don't warn integer->pointer size
1414 mismatch for constants.
1416 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
1418 * rtti.c (ptmd_initializer): Set non-public, if class is
1421 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
1422 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
1423 __cxa_vec_delete): Likewise.
1424 * tinfo.cc (__dynamic_cast): Likewise.
1425 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
1426 __cxa_vec_delete): Likewise.
1428 2000-05-04 Mark Mitchell <mark@codesourcery.com>
1430 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
1431 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
1432 (lang_decl_flags): Add vcall_offset.
1433 (THUNK_VCALL_OFFSET): Use it.
1434 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
1435 * method.c (make_thunk): Create the lang_decl here, not in
1437 (emit_thunk): Make generic thunks into ordinary functions once
1438 they have been fed to expand_body.
1439 * semantics.c (expand_body): Set current_function_is_thunk here.
1441 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1443 * class.c (update_vtable_entry_for_fn): Prototype.
1445 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
1448 * search.c (dfs_build_inheritance_graph_order): Prototype.
1450 2000-05-04 Mark Mitchell <mark@codesourcery.com>
1452 * cp-tree.h (special_function_kind): Add various kinds of
1454 (special_function_p): New function.
1455 * class.c (overrides): Don't let one kind of destructor override
1457 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
1458 whether or not to instantiate a template.
1459 * tree.c (special_function_p): Define.
1461 2000-05-03 Mark Mitchell <mark@codesourcery.com>
1463 * cp-tree.def (THUNK_DECL): Remove.
1464 * cp-tree.h (DECL_THUNK_P): New macro.
1465 (DECL_NON_THUNK_FUNCTION_P): Likewise.
1466 (DECL_EXTERN_C_FUNCTION_P): Likewise.
1467 (SET_DECL_THUNK_P): Likewise.
1468 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
1469 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
1470 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
1471 * decl.c (decls_match): Use DECL_EXTERN_C_P.
1472 (duplicate_decls): Likewise.
1473 (pushdecl): Likewise. Adjust thunk handling.
1474 (grokfndecl): Use DECL_EXTERN_C_P.
1475 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
1476 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
1477 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
1478 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
1479 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
1480 DECL_NO_STATIC_CHAIN.
1481 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
1482 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
1483 * search.c (covariant_return_p): Remove THUNK_DECL handling.
1486 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
1488 * tree.c (walk_tree): Set lineno.
1490 2000-05-01 Mark Mitchell <mark@codesourcery.com>
1492 * exception.cc: Update license notice.
1494 * new1.cc: Likewise.
1495 * new2.cc: Likewise.
1496 * tinfo.cc: Likewise.
1497 * tinfo2.cc: Likewise.
1499 * inc/cxxabi.h: Likewise.
1500 * inc/exception: Likewise.
1501 * inc/new: Likewise.
1502 * inc/new.h: Likewise.
1503 * inc/typeinfo: Likewise.
1505 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
1507 * tree.c (build_target_expr_with_type): If we already have a
1508 TARGET_EXPR, just return it.
1510 * optimize.c (initialize_inlined_parameters): Don't generate an
1511 EXPR_STMT if we can just use DECL_INITIAL.
1512 * decl.c (emit_local_var): Only make the initialization a
1513 full-expression if stmts_are_full_exprs_p.
1515 2000-05-01 Mark Mitchell <mark@codesourcery.com>
1517 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
1519 * call.c (standard_conversion): Use it.
1520 (direct_reference_binding): Likewise.
1521 (build_over_call): Likewise.
1522 (is_properly_derived_from): Likewise.
1523 (compare_ics): Likewise.
1524 * class.c (resolves_to_fixed_type_p): Likewise.
1525 * optimize.c (declare_return_variable): Likewise.
1526 * pt.c (is_specialization_of): Likewise.
1528 * typeck.c (comp_target_parms): Likeiwse.
1529 (build_static_cast): Likewise.
1530 (build_reinterpret_cast): Likewise.
1531 (build_const_cast): Likewise.
1532 (comp_ptr_ttypes_real): Likewise.
1533 (comp_ptr_ttypes_const): Likewise.
1534 * typeck2.c (process_init_constructor): Likewise.
1536 2000-04-30 Scott Snyder <snyder@fnal.gov>
1538 * decl.c (finish_destructor_body): Use the base destructor when
1539 destroying virtual bases.
1541 2000-04-30 Mark Mitchell <mark@codesourcery.com>
1543 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
1545 * optimize.c (struct inline_data): Add target_exprs field.
1546 (declare_return_variable): When a function returns an aggregate,
1547 use the variable declared in the TARGET_EXPR as the remapped
1549 (expand_call_inline): Update the pending target_exprs stack.
1550 (optimize_function): Initialize the stack.
1552 * decl2.c (finish_file): Fix typo in comment.
1554 * method.c (emit_thunk): Don't try to return a `void' value.
1556 * optimize.c (initialize_inlined_parameters): If the parameter is
1557 addressable, we need to make a new VAR_DECL, even if the
1558 initializer is constant.
1560 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
1562 * decl.c (grok_op_properties): Add an extra check of argtypes.
1564 2000-04-27 Mark Mitchell <mark@codesourcery.com>
1566 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
1568 (initialize_inlined_parameters): Try to avoid creating new
1571 2000-04-27 Alex Samuel <samuel@codesourcery.com>
1573 * lex.c (my_get_run_time): Remove.
1574 (init_filename_times): Use get_run_time instead of my_get_run_time.
1575 (check_newline): Likewise.
1576 (dump_time_statistics): Likewise.
1577 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
1578 of computing elapsed time explicitly.
1580 2000-04-26 Mark Mitchell <mark@codesourcery.com>
1582 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
1583 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
1584 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
1585 before calling decl_constant_value.
1586 * class.c (check_bitfield_decl): Likewise.
1587 * cvt.c (ocp_convert): Likewise.
1588 (convert): Likewise.
1589 * decl.c (compute_array_index_type): Likewise.
1590 (build_enumerator): Likewise.
1591 * decl2.c (check_cp_case_value): Likewise.
1592 * pt.c (convert_nontype_argument): Likewise.
1594 * typeck.c (decay_conversion): Likewise.
1595 (build_compound_expr): Likewise.
1596 (build_reinterpret_cast): Likewise.
1597 (build_c_cast): Likewise.
1598 (convert_for_assignment): Likewise.
1600 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
1602 * decl.c (finish_function): Don't play games with DECL_INLINE.
1604 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
1606 * ir.texi: Correct typo.
1608 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1610 * decl.c (grokdeclarator): Reject VLAs as members.
1612 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
1614 * call.c (standard_conversion): Accept conversion between
1617 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
1619 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
1621 * decl2.c (finish_file): Remove double setup for accounting
1624 2000-04-24 Robert Lipe <robertlipe@usa.net>
1626 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
1628 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
1630 * new.cc (set_new_handler): Needs to be in std::.
1632 2000-04-23 Mark Mitchell <mark@codesourcery.com>
1634 * cp-tree.h (lang_decl): Remove pretty_function_p.
1635 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
1636 language-specific node.
1637 * decl.c (cp_make_fname_decl): Use build_decl, not
1638 build_lang_decl, to build the variables.
1639 (grokvardecl): Don't call build_lang_decl for local variables in
1641 (grokdeclarator): Don't call build_lang_decl for local type
1642 declarations in templates.
1643 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
1644 zero'd memory, rather than calling memset.
1645 * pt.c: Include hashtab.h.
1646 (local_specializations): New variable.
1647 (retrieve_local_specialization): Use it.
1648 (register_local_specialization): Likewise.
1649 (tsubst_decl): Don't assume local variables have
1651 (instantiate_decl): Set up local_specializations.
1652 * Makefile.in (HTAB_H): New variable.
1654 2000-04-23 Richard Henderson <rth@cygnus.com>
1656 * typeck.c (c_expand_asm_operands): Restore the original
1657 contents of the output list.
1659 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
1661 * ir.texi: Document complex number representation.
1663 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
1665 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
1666 (target_incomplete_p): New function.
1667 (tinfo_base_init): Create comdat NTBS name variable.
1668 (ptr_initializer): Add non_public parameter. Calculate it.
1669 (ptmd_initializer): Likewise.
1670 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
1671 (create_real_tinfo_var): Add non_public parameter. Use it.
1672 Push proxy into global namespace.
1673 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
1675 * inc/typeinfo (type_info::before, type_info::operator==):
1676 Compare __name addresses.
1678 * tinfo2.cc: Remove new-abi builtins comment.
1680 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
1682 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
1684 * call.c (joust): Exit early if we get the same function, too.
1686 * decl2.c (key_method): Return NULL_TREE for template classes.
1687 (import_export_class): Don't need to check for template classes.
1689 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
1691 * lex.c: Remove references to cccp.c.
1693 2000-04-18 Mark Mitchell <mark@codesourcery.com>
1695 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
1696 volatile_memfunc. Add destructor_attr. Adjust dummy.
1697 (DECL_DESTRUCTOR_P): Use destructor_attr.
1698 (DECL_CONST_MEMFUNC_P): Reimplement.
1699 (DECL_VOLATILE_MEMFUNC_P): Remove.
1700 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
1701 (overrides): Use DECL_DESTRUCTOR_P.
1702 (check_for_override): Likewise.
1703 * decl.c (start_function): Likewise.
1704 * decl2.c (grokfclassfn): Likewise.
1705 (check_classfn): Likewise.
1706 (grok_function_init): Likewise.
1708 2000-04-17 Mark Mitchell <mark@codesourcery.com>
1710 * decl2.c (grokfield): Issue error on illegal data member
1713 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
1715 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
1717 2000-04-16 Mark Mitchell <mark@codesourcery.com>
1719 * class.c (build_vtable_entry): Don't build thunks for type-info
1722 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
1724 * decl.c (decls_match): Allow a redeclaration of a builtin to
1725 specify args while the builtin did not.
1727 2000-04-15 Mark Mitchell <mark@codesourcery.com>
1729 * cp-tree.def (THUNK_DECL): Add to documentation.
1730 * cp-tree.h (flag_huge_objects): Declare.
1731 * class.c (modify_vtable_entry): Tidy.
1732 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
1733 Calculate delta appropriately for the new ABI.
1734 (dfs_modify_vtables): Use it.
1735 (modify_all_vtables): Fix thinko in code to add overriding copies
1736 of functions to primary vtables.
1737 (build_clone): Fix typo in comment.
1738 (clone_function_decl): Correct order of destructors in vtable.
1739 (build_vbase_offset_vtbl_entries): Adjust comment.
1740 (dfs_vcall_offset_queue_p): Remove.
1741 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
1742 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
1743 (build_vtable_entry): Correct check for pure virtual functions.
1744 Don't declare flag_huge_objects.
1745 * decl.c (flag_huge_objects): Remove declaration.
1746 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
1747 Use int_size_in_bytes.
1748 (emit_thunk): Handle vcall offset thunks.
1750 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1752 * decl2.c (parse_time, varconst_time): Delete declarations.
1753 (finish_file): Delete LINENO declaration.
1754 START_TIME and THIS_TIME now long.
1756 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
1758 * class.c (build_base_field): Reformat comment.
1760 * inc/cxxabi.h (stddef.h): Comment inclusion.
1761 (__base_class_info::__offset): Comment shift.
1763 2000-04-12 Mark Mitchell <mark@codesourcery.com>
1765 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
1766 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
1767 (cp_push_exception_identifier): New macro.
1768 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
1769 (DECL_BASE_DESTRUCTOR_P): Likewise.
1770 (DECL_DELETING_DESTRUCTOR_P): Likewise.
1771 (get_vtbl_decl_for_binfo): Fix formatting.
1772 (in_charge_arg_for_name): New macro.
1773 (maybe_build_cleanup_and_delete): Remove declaration.
1774 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
1775 (in_charge_arg_for_name): New function.
1776 (build_new_method_call): Use it. Handle cloned destructors.
1777 (build_clone): Don't make the base constructor virtual.
1778 Automatically defer generated functions.
1779 (clone_function_decl): Handle destructors, too.
1780 (clone_constructors_and_destructors): Likewise.
1781 (create_vtable_ptr): Don't create a vtable entry for a cloned
1783 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
1784 (initialize_predefined_identifiers): Update appropriately.
1785 (finish_destructor_body): Simplify.
1786 (maybe_build_cleanup_and_delete): Remove.
1787 * except.c (expand_throw): Handle new-ABI destructors.
1788 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
1789 (build_dtor_call): New function.
1790 (build_delete): Use it. Simplify.
1791 * optimize.c (maybe_clone_body): Handle destructors.
1792 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
1794 * exception.cc (cleanup_fn): New typedef.
1795 (CALL_CLEANUP): New macro.
1796 (cp_eh_info): Use them.
1797 (__cp_push_exception): Likewise.
1798 (__cp_pop_exception): Likewise.
1800 2000-04-11 Mark Mitchell <mark@codesourcery.com>
1802 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
1803 (complete_dtor_identifier): New macro.
1804 (CLASSTYPE_FIRST_CONVERSION): Remove.
1805 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
1806 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
1807 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
1808 (CLASSTYPE_CONSTRUCTORS): Likewise.
1809 (CLASSTYPE_DESTRUCTORS): Likewise.
1810 (lang_decl): Add cloned_function.
1811 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
1812 (DECL_BASE_CONSTRUCTOR_P): Likewise.
1813 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
1814 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
1815 (DECL_CLONED_FUNCTION_P): Likewise.
1816 (DECL_CLONED_FUNCTION): Likewise.
1817 (clone_function_decl): Declare.
1818 (maybe_clone_body): Likewise.
1819 * call.c (build_user_type_conversion_1): Call complete object
1820 constructors in the new ABI.
1821 (build_new_method_call): Don't add in-charge parameters under the
1823 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
1824 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
1825 CLASSTYPE_DESTRUCTOR_SLOT.
1826 (build_clone): New function.
1827 (clone_function_decl): Likewise.
1828 (clone_constructors_and_destructors): Likewise.
1829 (check_bases_and_members): Use it.
1830 * decl.c (iniitialize_predefined_identifiers): Initialize
1831 complete_dtor_identifier.
1832 (finish_function): Don't add extra code to a clone.
1833 (lang_mark_tree): Mark cloned_function.
1834 * decl2.c (mark_used): Don't bother trying to instantiate things
1836 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
1837 * method.c (set_mangled_name_for_decl): Don't treat clones as
1839 (synthesize_method): Sythesize cloned functions, not the clones.
1840 * optimize.c (inline_data): Update comment on ret_label.
1841 (remap_block): Don't assume DECL_INITIAL exists.
1842 (copy_body_r): Allow ret_label to be NULL.
1843 (maybe_clone_body): Define.
1844 * pt.c (tsubst_decl): Handle clones.
1845 (instantiate_clone): New function.
1846 (instantiate_template): Use it.
1847 (set_mangled_name_for_template_decl): Don't treat clones as
1849 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
1850 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
1851 * semantics.c (expand_body): Clone function bodies as necessary.
1853 * optimize.c (remap_decl): Avoid sharing structure for arrays
1854 whose size is only known at run-time.
1855 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
1857 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
1858 to has_in_charge_parm_p.
1859 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
1860 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
1861 (DECL_COPY_CONSTRUCTOR_P): New macro.
1862 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
1863 (build_user_type_conversion_1): Likewise.
1864 (convert_like_real): Likewise.
1865 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
1866 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
1867 (copy_args_p): Likewise.
1868 (grok_ctor_properties): Likewise.
1869 (start_function): Likewise.
1870 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
1871 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
1872 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
1873 * method.c (do_build_copy_constructor): Use
1874 DECL_HAS_IN_CHARGE_PARM_P.
1875 (synthesize_method): Likewise.
1876 * pt.c (instantiate_template): Remove goto.
1877 * tree.c (build_cplus_method_type): Remove mention of obstacks in
1880 * cp-tre.h (finish_function): Change prototype.
1881 * decl.c (end_cleanup_fn): Adjust caller.
1882 (finish_function): Take only one parameter.
1883 * decl2.c (finish_objects): Adjust caller.
1884 (finish_static_storage_duration_function): Likewise.
1885 * method.c (emit_thunk): Likewise.
1886 * parse.y: Likewise.
1887 * parse.c: Regenerated.
1888 * pt.c (instantiate_decl): Likewise.
1889 * rtti.c (synthesize_tinfo_fn): Likewise.
1890 * semantics.c (expand_body): Likewise.
1892 * cp-tree.h (copy_decl): New function.
1893 * class.c (finish_struct_1): Use it.
1894 * lex.c (copy_decl): Define it.
1895 * pt.c (tsubst_decl): Likewise.
1896 * tree.c (copy_template_template_parm): Likewise.
1898 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
1899 has_nonpublic_assign_ref.
1900 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
1901 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
1902 * class.c (finish_struct_methods): Don't set
1903 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
1904 (interface_only): Don't declare.
1905 (interface_unknown): Likewise.
1907 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1909 * tree.h (HAVE_TEMPLATES): Remove definition.
1910 * lang-options.h (-fthis-is-variable): Remove documentation.
1912 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
1914 * class.c (instantiate_type): Handle object-relative template-id.
1916 * semantics.c (finish_expr_stmt): Call convert_to_void here.
1917 * decl.c (cplus_expand_expr_stmt): Not here.
1919 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
1920 Initialize exprtype earlier.
1922 * parse.y (fn.def1): Check for defining types in return types.
1924 * decl.c (check_tag_decl): Notice extra fundamental types.
1925 Diagnose empty decls in classes, too.
1927 * decl.c (grokdeclarator): Don't override an anonymous name if no
1928 declarator was given.
1930 * cvt.c (convert_to_void): Call resolve_offset_ref.
1932 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
1934 * decl2.c (decl_namespace): Handle getting a type.
1936 * typeck.c (build_c_cast): Re-enable warning for cast between
1937 pointer and integer of different size.
1939 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
1941 * inc/cxxabi.h (__pointer_type_info): Add restrict and
1943 (__pointer_type_info::__pointer_catch): New virtual function.
1944 (__pointer_to_member_type_info): Derive from
1945 __pointer_type_info. Adjust.
1946 (__pointer_to_member_type_info::__do_catch): Remove.
1947 (__pointer_to_member_type_info::__is_pointer_p): Declare.
1948 (__pointer_to_member_type_info::__pointer_catch): Declare.
1949 * rtti.c (qualifier_flags): Add restrict flag.
1950 (ptmd_initializer): Reorder members.
1951 (create_tinfo_types): Expand comments. Reorder
1952 ptmd_desc_type_node members.
1953 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
1955 (__pointer_type_info::__do_catch): Move specific code into
1956 __pointer_catch. Call it.
1957 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
1958 specific catch checking. Fix void conversion check.
1959 (__pointer_to_member_type_info::__do_catch): Remove.
1960 (__pointer_to_member_type_info::__pointer_catch): Implement.
1962 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1964 * lex.c (init_parse): Remove traces of classof and headof.
1965 * decl2.c (flag_operator_names): Default to 1.
1966 (lang_decode_option): Do not set it for -ansi.
1968 2000-04-09 Mark Mitchell <mark@codesourcery.com>
1970 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
1971 (DECL_MAIN_VARIANT): Remove.
1972 * decl.c (duplicate_decls): Don't set it.
1973 (start_function): Likewise.
1974 (lang_mark_tree): Don't mark it.
1975 * decl2.c (defer_fn): Don't use it.
1976 * lex.c (retrofit_lang_decl): Don't set it.
1977 * pt.c (tsubst_decl): Likewise.
1978 * ptree.c (print_lang_decl): Don't print it.
1979 * typeck.c (mark_addressable): Don't use it.
1981 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
1983 * vec.cc: Include <new> and <exception>.
1984 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
1985 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
1987 (__cxa_vec_delete): Catch dtor exceptions.
1989 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
1991 Prepend __ to implementation defined names.
1992 * inc/typeinfo (type_info): Rename _name to __name.
1993 (type_info::type_info): Rename parameter.
1994 (type_info::operator==, type_info::operator!=,
1995 type_info::before): Likewise.
1996 (type_info::is_pointer_p, type_info::is_function_p,
1997 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
2000 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
2001 (__pointer_type_info::__pointer_type_info): Likewise.
2002 (__pointer_type_info::is_pointer_p,
2003 __pointer_type_info::do_catch): Prepend __. Rename parameters.
2004 (__array_type_info::__array_type_info): Rename parameters.
2005 (__function_type_info::__function_type_info): Likewise.
2006 (__function_type_info::is_function_p): Prepend __.
2007 (__enum_type_info::__enum_type_info): Rename parameters.
2008 (__pointer_to_member_type_info::__pointer_to_member_type_info):
2010 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
2012 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
2013 (__class_type_info::__class_type_info): Rename parameters.
2014 (__class_type_info::sub_kind): Prepend __. Adjust member names.
2015 (__class_type_info::upcast_result,
2016 __class_type_info::dyncast_result): Prepend __. Move definition
2018 (__class_type_info::do_upcast, __class_type_info::do_catch,
2019 __class_type_info::find_public_src,
2020 __class_type_info::do_dyncast,
2021 __class_type_info::do_find_public_src): Prepend __. Rename
2023 (__si_class_type_info::__si_class_type_info): Rename parameters.
2024 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
2025 __si_class_type_info::do_find_public_src): Prepent __. Rename
2027 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
2028 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
2029 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
2031 (__dynamic_cast): Rename parameters.
2032 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
2033 type_info::do_catch, type_info::do_upcast): Prepend __.
2034 (contained_p, public_p, virtual_p, contained_public_p,
2035 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
2036 (__class_type_info::do_catch,
2037 __class_type_info::do_upcast): Prepend __. Adjust.
2038 (__class_type_info::__upcast_result,
2039 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
2041 (__class_type_info::find_public_src): Prepend __. Adjust.
2042 (__class_type_info::do_find_public_src,
2043 __si_class_type_info::do_find_public_src,
2044 __vmi_class_type_info::do_find_public_src): Likewise.
2045 (__class_type_info::do_dyncast,
2046 __si_class_type_info::do_dyncast,
2047 __vmi_class_type_info::do_dyncast): Likewise.
2048 (__class_type_info::do_upcast,
2049 __si_class_type_info::do_upcast,
2050 __vmi_class_type_info::do_upcast): Likewise.
2051 (__dynamic_cast): Adjust.
2052 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
2053 (__function_type_info::is_function_p): Likewise.
2054 (__pointer_type_info::do_catch): Likewise. Adjust.
2055 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
2056 (__throw_type_match_rtti_2): Adjust.
2057 (__is_pointer): Adjust.
2059 2000-04-08 Mark Mitchell <mark@codesourcery.com>
2061 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
2062 (complete_ctor_identifier): New macro.
2063 (special_function_kind): Add sfk_copy_constructor and
2064 sfk_assignment_operator.
2065 (LOOKUP_HAS_IN_CHARGE): Remove.
2066 (cons_up_default_function): Rename to ...
2067 (implicitly_declare_fn): ... this.
2068 * call.c (build_new_method_call): Add in-charge parameters for
2070 * class.c (add_implicitly_declared_members): Change parameter name
2071 from cant_have_assignment to cant_have_const_assignment.
2072 Replace calls to cons_up_default_function to implicitly_declare_fn.
2073 * cvt.c (ocp_convert): Use complete_ctor_identifier.
2074 * decl.c (initialize_predefined_identifiers): Initialize it.
2075 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
2077 * init.c (expand_default_init): Don't calculate the in-charge
2079 (build_new_1): Likewise.
2080 * lex.c (cons_up_default_function): Move to method.c.
2081 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
2082 (implicitly_declare_fn): New function.
2083 * typeck.c (build_static_cast): Use complete_ctor_identifier.
2084 (build_modify_expr): Likewise.
2085 * typeck2.c (build_functional_cast): Likewise.
2087 Under the new ABI, constructors don't return `this'.
2088 * cp-tree.h (warn_reorder): Declare.
2089 (special_function_kind): New enum.
2090 (global_base_init_list): Remove declaration.
2091 (emit_base_init): Don't return a value.
2092 (check_base_init): Don't declare.
2093 (is_aggr_typedef): Likewise.
2094 * decl.c (check_special_function_return_type): New function.
2095 (return_types): Remove.
2096 (grokdeclarator): Use check_special_function_return_type.
2097 (start_function): Don't initialize ctor_label under the new ABI.
2098 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
2099 * init.c (begin_init_stmts): Move to top of file.
2100 (finish_init_stmts): Likewise.
2101 (warn_reorder): Don't declare.
2102 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
2104 (check_base_init): Remove.
2105 (is_aggr_typedef): Likewise.
2106 (build_new_1): Don't use the return value of a constructor.
2107 * semantics.c (setup_vtbl_ptr): Don't use the return value
2109 * typeck.c (check_return_expr): Don't magically convert return
2110 statements into `return this' in constructors under the new ABI.
2112 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
2113 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
2114 (base_ctor_identifier): New macro.
2115 (base_dtor_identifier): Likewise.
2116 (deleting_dtor_identifier): Likewise.
2117 * decl.c: Don't include obstack.h.
2118 (obstack_chunk_alloc): Don't define.
2119 (obstack_chunk_free): Likewise.
2120 (struct predefined_identifier): New type.
2121 (initialize_predefined_identifiers): New function.
2122 (init_decl_processing): Use it.
2123 (debug_temp_inits): Remove.
2124 (start_method): Don't call preserve_data.
2125 (hack_incomplete_structures): Update comment.
2126 * init.c (init_init_processing): Don't initialize
2128 (build_offset_rf): Remove dead code.
2129 (build_delete): Use CLASSTYPE_N_BASECLASSES.
2130 * search.c (init_search_processing): Don't initialize
2133 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2135 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
2136 some sign_compare warnings.
2138 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
2140 Rename abi::__vmi_class_type_info members.
2141 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
2142 base_list, detail_masks members to vmi_flags, vmi_base_count,
2143 vmi_bases and vmi_flags_masks respectively.
2144 (__vmi_class_type_info::vmi_flags_masks): Rename
2145 details_unknown_mask to flags_unknown_mask.
2146 * tinfo.cc (__class_type_info::do_upcast): Adjust.
2147 (__vmi_class_type_info::do_find_public_src): Adjust.
2148 (__vmi_class_type_info::do_dyncast): Adjust.
2149 (__vmi_class_type_info::do_upcast): Adjust.
2151 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
2153 * tinfo.cc (convert_to_base): New function.
2154 (get_vbase_offset): Remove. Move into convert_to_base.
2155 (__vmi_class_type_info::do_find_public_src): Adjust.
2156 (__vmi_class_type_info::do_dyncast): Adjust.
2157 (__vmi_class_type_info::do_upcast): Adjust.
2159 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
2161 * tinfo.cc (operator=): Use __builtin_strcmp.
2162 * tinfo2.cc (before): Likewise.
2164 2000-04-06 Mark Mitchell <mark@codesourcery.com>
2166 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
2167 (DECL_SAVED_INLINE): Rename to ...
2168 (DECL_DEFERRED_FN): ... this.
2169 (in_function_p): Remove declaration.
2170 (mark_inline_for_output): Rename to ...
2171 (defer_fn): ... this.
2172 * decl.c (finish_function): Adjust call to mark_inline_for_output.
2173 (in_function_p): Remove definition.
2174 * decl2.c (saved_inlines): Rename to ...
2175 (deferred_fns): ... this.
2176 (saved_inlines_used): Rename to ...
2177 (deferred_fns_used): ... this.
2178 (mark_inline_for_output): Rename to ...
2179 (defer_fn): ... this.
2180 (finish_file): Adjust accordingly.
2181 (init_decl2): Likewise.
2182 * lex.c (cons_up_default_function): Likewise.
2183 * pt.c (mark_decl_instantiated): Likewise.
2184 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
2186 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
2187 * semantics.c (expand_body): Defer more functions.
2189 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
2192 * Make-lang.in (CXX_LIB2FUNCS): Add it.
2194 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2195 __cxa_vec_delete): Declare.
2197 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
2199 * rtti.c (dfs_class_hint_mark): New static function.
2200 (dfs_class_hint_unmark): New static function.
2201 (class_hint_flags): Use them.
2203 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
2205 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
2207 2000-04-05 Mark Mitchell <mark@codesourcery.com>
2209 * cp-tree.h (instantiate_decl): Change prototype.
2210 * decl2.c (mark_used): Adjust call.
2211 * optimize.c (inlinable_function_p): Adjust handling of templates.
2212 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
2213 (do_type_instantiation): Likewise.
2214 (instantiate_decl): Defer more templates.
2215 (instantiate_pending_templates): Adjust logic to handle inline
2218 * Makefile.in (GGC_H): New variable. Use it throughout in place
2221 * call.c: Don't include obstack.h. Include ggc.h.
2222 (obstack_chunk_alloc): Don't define.
2223 (obstack_chunk_free): Likewise.
2224 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
2225 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
2226 (pop_switch): Free it.
2228 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
2230 * dump.c (dequeue_and_dump): Don't try to print the bit_position
2231 if we don't have a DECL_FIELD_OFFSET.
2233 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
2235 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
2238 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2240 * cfns.gperf (hash, libc_name_p): Prototype.
2242 * rtti.c (build_dynamic_cast_1): Constification.
2244 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
2246 * semantics.c (deferred_type_access_control): Prototype.
2248 2000-04-04 Mark Mitchell <mark@codesourcery.com>
2250 Correct many new ABI issues regarding vbase and vcall offset
2252 * cp-tree.h (BINFO_VTABLE): Document.
2253 (struct lang_type): Tweak formatting.
2254 (BINFO_PRIMARY_BINFO): Add to documentation.
2255 (CLASSTYPE_VSIZE): Fix typo in comment.
2256 (CLASSTYPE_VBASECLASSES): Update documentation.
2257 (BINFO_VBASE_MARKED): Remove.
2258 (SET_BINFO_VBASE_MARKED): Likewise.
2259 (CLEAR_BINFO_VBASE_MARKED): Likewise.
2260 (BINFO_FIELDS_MARKED): Remove.
2261 (SET_BINFO_FIELDS_MARKED): Likewise.
2262 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
2263 (enum access_kind): New enumeration.
2264 (num_extra_vtbl_entries): Remove declaration.
2265 (size_extra_vtbl_entries): Likewise.
2266 (get_vtbl_decl_for_binfo): New function.
2267 (dfs_vbase_unmark): Remove declaration.
2268 (mark_primary_bases): Likewise.
2269 * class.c (SAME_FN): Remove.
2270 (struct vcall_offset_data_s): Move definition.
2271 (build_vbase_pointer): Use `build', not `build_binary_op', to
2272 access the vbase pointer under the new ABI.
2273 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
2274 (build_primary_vtable): Likewise.
2275 (dfs_mark_primary_bases): Move here from search.c.
2276 (mark_primary_bases): Likewise.
2277 (determine_primary_bases): Under the new ABI, don't make a base
2278 class a primary base just because we don't yet have any virtual
2280 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
2281 (num_vfun_entries): Remove.
2282 (dfs_count_virtuals): Likewise.
2283 (num_extra_vtbl_entries): Likewise.
2284 (size_extra_vtbl_entries): Likewise.
2285 (layout_virtual_bases): Iterate in inheritance graph order under
2287 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
2288 indicate that a vfield is present.
2289 (init_class_processing): Initialize access_public_node, etc., from
2291 (get_vtbl_decl_for_binfo): New function.
2292 (dump_class_hierarchy_r): Likewise.
2293 (dump_class_hierarchy): Use it.
2294 (finish_vtbls): Build the vtbls in inheritance graph order.
2295 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
2296 (initialize_vtable): Use get_vtbl_decl_for_binfo.
2297 (accumulate_vtbl_inits): Add comments explaining why a pre-order
2299 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
2300 where the vptr points, even for primary vtables.
2301 (build_vtbl_initializer): Adjust handling of vbase and vcall
2303 (build_vcall_and_vbase_vtable_entries): New function.
2304 (dfs_build_vbase_offset_vtbl_entries): Remove.
2305 (build_vbase_offset_vtbl_entries): Reimplement.
2306 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
2307 were already handled in a primary base class vtable.
2308 (build_vcall_offset_vtbl_entries): Adjust.
2309 (build_rtti_vtbl_entries): Adjust.
2310 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
2311 * init.c (expand_virtual_init): Simplify.
2312 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
2313 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
2314 * search.c (BINFO_ACCESS): New macro.
2315 (SET_BINFO_ACCESS): Likewise.
2316 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
2317 (access_in_type): Likewise.
2318 (dfs_accessible_p): Likewise.
2319 (protected_accessible_p): Likewise.
2320 (lookup_fnfields_1): Adjust documentation.
2321 (dfs_mark_primary_bases): Move to class.c
2322 (mark_primary_bases): Likewise.
2323 (dfs_vbase_unmark): Remove.
2324 (virtual_context): Use BINFO_FOR_VBASE.
2325 (dfs_get_vbase_types): Simplify.
2326 (dfs_build_inheritance_graph_order): New function.
2327 (get_vbase_types): Use it.
2328 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
2330 * tinfo.cc (get_vbase_offset): New function.
2331 (__vmi_class_type_info::do_find_public_src): Use it.
2332 (__vmi_class_type_info::do_dyncast): Likewise.
2333 (__vmi_class_type_info::do_upcast): Likewise.
2335 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
2337 * lang-specs.h: Pass -fno-show-column to the preprocessor.
2339 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
2341 * rtti.c (class_hint_flags): Rename flags.
2342 (class_initializer): Remove flags.
2343 (synthesize_tinfo_var): Combine offset and flags. Add flags
2344 for __vmi_class_type_info.
2345 (create_tinfo_types): Remove flags from __class_type_info and
2346 __si_class_type_info. Merge flags and offset from
2347 base_class_type_info.
2348 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
2349 (__base_class_info::is_virtual_p): Adjust.
2350 (__base_class_info::is_public_p): Adjust.
2351 (__base_class_info::offset): New accessor.
2352 (__class_type_info::details): Remove member.
2353 (__class_type_info::__class_type_info): Lose details.
2354 (__class_type_info::detail_masks): Remove.
2355 (__si_class_type_info::__si_class_type_info): Lose details.
2356 (__vmi_class_type_info::details): New member.
2357 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
2358 (__vmi_class_type_info::detail_masks): New member.
2359 * tinfo.cc (__class_type_info::do_upcast): Initialize result
2360 with unknown_details_mask.
2361 (__vmi_class_type_info::do_find_public_src): Adjust
2362 (__vmi_class_type_info::do_dyncast): Adjust.
2363 (__vmi_class_type_info::do_upcast): Set result details, if
2365 (__dynamic_cast): Temporarily #if out optimization.
2367 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
2369 * rtti.c (get_tinfo_decl): Mark used.
2370 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
2371 mark as dealt with, if we output it.
2373 2000-03-28 Mark Mitchell <mark@codesourcery.com>
2375 * class.c: Reorganize to put virtual function table initialization
2376 machinery at the end of the file.
2378 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
2380 * class.c (finish_struct): Use bitsize_zero_node.
2381 * pt.c (instantiate_class_template): Likewise.
2383 2000-03-28 Mark Mitchell <mark@codesourcery.com>
2385 Put RTTI entries at negative offsets in new ABI.
2386 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
2387 vbase offset at index -3, not -1.
2388 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
2389 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
2390 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
2391 (build_rtti_vtbl_entries): New function.
2392 (set_rtti_entry): Remove.
2393 (build_primary_vtable): Don't use it.
2394 (build_secondary_vtable): Likewise.
2395 (start_vtable): Remove.
2396 (first_vfun_index): New function.
2397 (set_vindex): Likewise.
2398 (add_virtual_function): Don't call start_vtable. Do call
2400 (set_primary_base): Rename parameter.
2401 (determine_primary_base): Likewise.
2402 (num_vfun_entries): Don't use skip_rtti_stuff.
2403 (num_extra_vtbl_entries): Include RTTI information.
2404 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
2405 (skip_rtti_stuff): Remove.
2406 (dfs_modify_vtables): Don't use it.
2407 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
2408 (layout_nonempty_base_or_field): Update size handling.
2409 (create_vtable_ptr): Tweak.
2410 (layout_class_type): Adjust parameter names.
2411 (finish_struct_1): Simplify.
2412 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
2413 (skip_rtti_stuff): Remove.
2414 (first_vfun_index): New function.
2415 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
2416 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
2417 (marked_vtable_pathp): Declare.
2418 (unmarked_vtable_pathp): Likewise.
2419 * error.c (dump_expr): Use first_vfun_index to calculate vtable
2421 * rtti.c (build_headof): Look for RTTI at negative offsets.
2422 (get_tinfo_decl_dynamic): Likewise.
2423 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
2425 (create_pseudo_type_info): Do it here instead. Adjust so that
2426 vptr points at first virtual function.
2427 * search.c (marked_vtable_pathp): Make it global.
2428 (unmarked_vtable_pathp): Likewise.
2429 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
2430 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
2431 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
2432 (get_pure_virtuals): Likewise.
2433 (expand_upcast_fixups): Likewise.
2434 * tree.c (debug_binfo): Likewise.
2435 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
2438 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2440 * class.c (check_field_decl): Fix typo.
2441 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
2442 (check_methods): Likewise.
2443 (check_field_decls): Likewise.
2444 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
2445 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
2446 Use DECL_RESULT_FLD, not DECL_RESULT.
2447 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
2448 * lex.c (identifier_type): Likewise.
2449 * pt.c (determine_specialization, lookup_template_class): Likewise.
2450 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
2451 (resolve_overloaded_unification, more_specialized): Likewise.
2452 * semantics.c (finish_member_declaration): Likewise.
2453 * typeck.c (build_x_function_call): Likewise.
2455 2000-03-26 Mark Mitchell <mark@codesourcery.com>
2457 * class.c (layout_empty_base): Handle empty bases with non-byte
2459 (build_base_field): Likewise.
2460 (layout_virtual_bases): Likewise.
2462 * class.c (finish_struct_1): Fix typo in this change:
2464 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2466 2000-03-25 Mark Mitchell <mark@codesourcery.com>
2468 * decl.c (grokdeclarator): Count partial specializations when
2469 keeping track of how many template classes have been seen.
2471 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
2473 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2475 * class.c (build_vbase_pointer_fields): layout_field now place_field.
2476 (get_vfield_offset): Use byte_position.
2477 (set_rtti_entry): Set OFFSET to ssizetype zero.
2478 (get_binfo_offset_as_int): Deleted.
2479 (dfs_record_base_offsets): Use tree_low_cst.
2480 (dfs_search_base_offsets): Likewise.
2481 (layout_nonempty_base_or_field): Reflect changes in RLI format
2482 and call byte_position.
2483 (layout_empty_base): Convert offset to ssizetype.
2484 (build_base_field): use rli_size_unit_so_far.
2485 (dfs_propagate_binfo_offsets): Do computation in proper type.
2486 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
2487 (layout_class_type): Reflect changes in RLI names and fields.
2488 (finish_struct_1): Set DECL_FIELD_OFFSET.
2489 * dump.c (dequeue_and_dump): Call bit_position.
2490 * expr.c (cplus_expand_constant): Use byte_position.
2491 * rtti.c (expand_class_desc): Use bitsize_one_node.
2492 * typeck.c (build_component_addr): Use byte_position and don't
2493 special case for zero offset.
2495 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
2497 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
2499 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
2501 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
2504 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2506 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
2508 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
2509 make_typename_type, check_initializer, cp_finish_decl,
2510 xref_tag): Likewise.
2511 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
2512 decl_namespace, arg_assoc_template_arg, arg_assoc,
2513 validate_nonmember_using_decl, do_class_using_decl): Likewise.
2514 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
2515 args_to_string): Likewise.
2516 * friend.c (is_friend): Likewise.
2517 * lex.c (note_got_semicolon, note_list_got_semicolon,
2518 is_global): Likewise.
2519 * method.c (build_overload_nested_name, build_overload_value,
2520 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
2521 * parse.y (typename_sub, typename_sub1): Likewise.
2522 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
2523 process_partial_specialization, convert_template_argument,
2524 template_args_equal, add_pending_template, lookup_template_class,
2525 for_each_template_parm_r, maybe_fold_nontype_arg,
2526 tsubst, instantiate_template, type_unification_real, unify,
2527 instantiate_pending_templates, set_mangled_name_for_template_decl):
2529 * repo.c (repo_get_id, repo_template_used): Likewise.
2530 * search.c (lookup_field_1): Likewise.
2531 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
2532 * xref.c (classname): Likewise.
2534 2000-03-22 Mark Mitchell <mark@codesourcery.com>
2536 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
2537 (CANONICAL_BINFO): New macro.
2538 (BINFO_NEW_VTABLE_MARKED): Use it.
2539 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
2540 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
2541 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
2543 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
2544 (build_secondary_vtable): Likewise.
2545 (dfs_finish_vtbls): Likewise.
2546 (dfs_accumulate_vtbl_inits): Likewise.
2547 (accumulate_vtbl_inits): New function.
2548 (finish_vtbls): Make sure that virtual bases come after
2549 non-virtual bases in the vtable group.
2550 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
2551 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
2552 * search.c (struct vbase_info): Move definition.
2553 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
2554 (unmarked_new_vtable_p): Likewise.
2555 (dfs_mark_vtable_path): Remove.
2556 (dfs_mark_new_vtable): Remove.
2557 (dfs_unmark_new_vtable): Likewise.
2558 (dfs_clear_search_slot): Likewise.
2559 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
2560 (dfs_clear_vbase_slots): Likewise.
2561 (init_vbase_pointers): LIkewise.
2563 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
2565 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
2566 SIZETYPE to a non-SIZETYPE.
2568 2000-03-21 Mark Mitchell <mark@codesourcery.com>
2570 * class.c (layout_virtual_bases): Adjust names in conditionally
2573 * class.c (record_base_offsets): New function.
2574 (layout_conflict_p): Likewise.
2575 (layout_nonempty_base_or_field): Use it.
2576 (layout_empty_base): New function.
2577 (build_base_field): Use it.
2578 (build_base_fields): Update comment.
2579 (layout_virtual_bases): Fold in a little code form
2580 layout_basetypes. Use layout_empty_base.
2581 (layout_basetypes): Remove.
2582 (end_of_class): New function.
2583 (layout_class_type): Use it. Adjust.
2585 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
2587 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
2589 (dfs_skip_nonprimary_vbases_markedp): Likewise.
2590 * typeck.c (fntype_p): Remove.
2592 * cp-tree.h (TI_SPEC_INFO): Remove.
2593 (CLASSTYPE_TI_SPEC_INFO): Likewise.
2594 * pt.c (process_partial_specialization): Likewise.
2596 * class.c (build_base_field): Fix thinko in computation of binfo
2599 * tree.c (mark_local_for_remap_p): Mark variables declared in
2600 TARGET_EXPRs as well.
2602 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
2604 * typeck.c (require_complete_type, complete_type,
2605 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
2606 build_array_ref, convert_arguments, pointer_diff,
2607 build_x_unary_op, build_unary_op, build_c_cast,
2608 build_modify_expr): Use COMPLETE_TYPE_P etc.
2609 * call.c (is_complete, convert_like_real,
2610 build_new_method_call): Likewise.
2611 * class.c (build_vbase_pointer_fields, check_bases,
2612 build_base_field, finish_struct_1, pushclass): Likewise.
2613 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
2614 * decl.c (maybe_process_template_type_declaration, pushtag,
2615 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
2616 layout_var_decl, check_initializer, cp_finish_decl,
2617 grokdeclarator, require_complete_types_for_parms,
2618 grok_op_properties, xref_tag, xref_basetypes,
2619 check_function_type): Likewise.
2620 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
2621 * friend.c (do_friend): Likewise.
2622 * init.c (build_offset_ref): Likewise.
2623 * parse.y (structsp): Likewise.
2624 * pt.c (maybe_process_partial_specialization,
2625 tsubst_friend_function, instantiate_class_template, tsubst,
2626 do_type_instantiation, instantiate_pending_templates): Likewise.
2627 * repo.c (repo_get_id): Likewise.
2628 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
2629 synthesize_tinfo_var, emit_support_tinfos): Likewise.
2630 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
2631 * semantics.c (begin_class_definition): Likewise.
2632 * tree.c (build_cplus_method_type): Likewise.
2633 * typeck2.c (digest_init, build_functional_cast,
2634 add_exception_specifier): Likewise.
2635 * parse.h, parse.c: Regenerated.
2637 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
2639 * inc/cxxabi.h: New header file. Define new-abi entry points.
2640 (__pointer_type_info::target): Rename member to ...
2641 (__pointer_type_info::type): ... here.
2642 (__base_class_info::type): Rename member to ...
2643 (__base_class_info::base): ... here.
2644 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
2645 * cp-tree.h (CPTI_ABI): New global tree enumeration.
2646 (abi_node): New global tree node.
2647 * decl.c (abi_node): Document.
2648 (init_decl_processing): Initialize abi_node.
2649 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
2650 (get_vmi_pseudo_type_info): Likewise.
2651 (create_tinfo_types): Likewise.
2652 (emit_support_tinfos): Likewise.
2653 * tinfo.h (cxxabi.h): Include for new-abi.
2654 Move rtti class definitions to new header file.
2655 * tinfo.cc (abi): Use the namespace.
2656 (std): Move new abi rtti classes from here ...
2657 (__cxxabiv1): ... to here.
2658 * tinfo2.cc (cxxabi.h): Include for new-abi.
2659 Move rtti class definitions to new header file.
2660 (std): Move new abi rtti classes from here ...
2661 (__cxxabiv1): ... to here.
2662 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
2665 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
2666 Jason Merrill <jason@casey.cygnus.com>
2668 * method.c (build_overload_int): Use host_integerp.
2670 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2672 * init.c (build_offset_ref): Handle the case of a templated member
2675 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2677 * except.c (expand_exception_blocks): Clear catch_clauses_last.
2679 2000-03-18 Mark Mitchell <mark@codesourcery.com>
2681 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
2682 * class.c (check_bitfield_decl): Turn illegal bitfields into
2684 (dfs_propagate_binfo_offsets): Adjust for new size_binop
2686 (dfs_offset_for_unshared_vbases): Likewise.
2687 * cvt.c (cp_convert_to_pointer): Convert NULL to a
2688 pointer-to-member correctly under the new ABI.
2689 * expr.c (cplus_expand_constant): Don't use cp_convert when
2690 turning an offset into a pointer-to-member.
2691 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
2692 when dereferencing them under the new ABI.
2693 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
2694 of pointers-to-members under the new ABI.
2696 * class.c (check_bitfield_decl): Remove restriction on really long
2698 (layout_class_type): Implement new ABI handling of bitfields
2699 longer than their types.
2701 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2703 * parse.y (extdefs): Call ggc_collect.
2704 * parse.c: Regenerated.
2706 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
2708 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
2709 (note_name_declared_in_class): Use OVL_CURRENT to get at a
2712 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2714 * class.c (build_vbase_path): Use integer_zerop.
2715 (build_vtable_entry): Use tree_low_cst.
2716 (get_vfield_offset): Use bit_position.
2717 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
2719 (check_bitfield_decl): Set DECL_SIZE using convert.
2720 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
2721 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
2723 (finish_struct_1): Use bit_position.
2724 (dump_class_hierarchy): Use tree_low_cst.
2725 * cp-tree.h (min_precision): Add declaration.
2726 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
2727 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
2728 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
2729 * expr.c (cplus_expand_constant): Use bit_position.
2730 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
2731 * rtti.c (get_base_offset): Use bit_position.
2732 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
2733 host_integerp, and tree_low_cst.
2734 (pointer_int_sum): Use integer_zerop.
2735 (build_component_addr): Use bit_position.
2737 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
2739 * typeck.c (require_complete_type): Don't assume size_zero_node.
2740 (complete_type_or_else): Likewise.
2742 2000-03-16 Steven Grady <grady@digitaldeck.com>
2743 Jason Merrill <jason@casey.cygnus.com>
2745 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
2747 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
2749 * decl2.c (grokfield): Bail out if type is error_mark_node.
2751 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
2753 * tinfo2.cc (__ptr_to_member_data): Rename to ...
2754 (__pointer_to_member_data): ... here. Adjust.
2755 * rtti.c (create_tinfo_types): Adjust.
2757 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
2759 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
2760 * decl.c (ref_desc_type_node): Undocument.
2761 * rtti.c (ptr_ref_initializer): Rename to ...
2762 (ptr_initializer): ... here. Adjust comments.
2763 (ptmd_initializer): Fix comment thinko.
2764 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
2765 (create_tinfo_types): Remove ref_desc_type_node init.
2766 * tinfo2.cc (__reference_type_info): Remove.
2768 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
2770 * decl.c (cp_finish_decl): Remove obsolete comment.
2772 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
2774 2000-03-14 Mark Mitchell <mark@codesourcery.com>
2776 * cp-tree.h: Tweak documentation.
2777 * class.c (build_vbase_pointer_fields): Layout the fields, too.
2778 (avoid_overlap): Remove.
2779 (get_binfo_offset_as_int): New function.
2780 (dfs_serach_base_offsets): Likewise.
2781 (layout_nonempty_base_or_field): Likewise.
2782 (build_base_field): Layout fields here. Avoid placing two objects
2783 of the same type at the same address, under the new ABI.
2784 (build_base_fields): Adjust accordingly.
2785 (create_vtable_ptr): Return the new field, but don't attach it to
2787 (remove_base_field): Remove.
2788 (remove_base_fields): Remove.
2789 (layout_basetypes): Adjust accordingly.
2790 (layout_class_type): Call layout_field for each field, rather than
2791 just making a wholesale call to layout_type.
2793 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
2795 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
2797 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
2799 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
2801 * except.c (dtor_nothrow): New fn.
2802 (do_pop_exception): Use it. Take type parm.
2803 (push_eh_cleanup): Take type parm.
2804 (expand_start_catch_block): Pass it.
2805 (build_eh_type_type_ref): Accept null type.
2807 2000-03-12 Mark Mitchell <mark@codesourcery.com>
2809 * cp-tree.h (revert_static_member_fn): Change prototype.
2810 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
2811 (grok_op_properties): Likewise.
2812 (start_function): Likewise.
2813 (revert_static_member_fn): Simplify.
2814 * pt.c (check_explicit_specialization): Adjust call to
2815 revert_static_member_fn.
2817 2000-03-11 Mark Mitchell <mark@codesourcery.com>
2819 * cp-tree.h (scope_kind): New type.
2820 (tmpl_spec_kind): Likewise.
2821 (declare_pseudo_global_level): Remove.
2822 (pseudo_global_level_p): Rename to template_parm_scope_p.
2823 (pushlevel): Remove declaration.
2824 (begin_scope): New function.
2825 (finish_scope): Likewise.
2826 (current_tmpl_spec_kind): Likewise.
2827 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
2828 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
2829 Add template_spec_p.
2830 (toplevel_bindings_p): Adjust.
2831 (declare_pseudo_global_level): Remove.
2832 (pseudo_global_level_p): Rename to template_parm_scope_p.
2833 (current_tmpl_spec_kind): New function.
2834 (begin_scope): Likewise.
2835 (finish_scope): Likewise.
2836 (maybe_push_to_top_level): Adjust.
2837 (maybe_process_template_type_declaration): Likewise.
2838 (pushtag): Likewise.
2839 (pushdecl_nonclass_level): Likewise.
2840 (lookup_tag): Likewise.
2841 (grokfndecl): Handle member template specializations. Share
2842 constructor and non-constructor code.
2843 * decl2.c (check_classfn): Handle member template specializations.
2844 * pt.c (begin_template_parm_list): Use begin_scope.
2845 (begin_specialization): Likewise.
2846 (end_specialization): Likewise.
2847 (check_explicit_specialization): Use current_tmpl_spec_kind.
2848 Handle member template specializations.
2849 (end_template_decl): Use finish_scope. Remove call to
2851 (push_template_decl_real): Remove bogus error message.
2852 (tsubst_decl): Fix typo in code contained in comment.
2853 (instantiate_template): Handle member template specializations.
2854 (most_general_template): Likewise.
2856 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
2858 * lex.c (whitespace_cr): Compress consecutive calls to warning().
2859 (do_identifier): Ditto for error().
2861 * pt.c (convert_nontype_argument): Ditto for cp_error().
2862 (convert_template_argument): Ditto for cp_pedwarn().
2864 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
2866 * exception.cc (__check_null_eh_spec): New fn.
2867 * except.c (expand_end_eh_spec): Call it if the spec is throw().
2869 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
2871 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
2872 * except.c (expand_end_eh_spec): Add the return type.
2873 * rtti.c (throw_bad_cast): Add the parmtypes.
2874 (throw_bad_typeid): Likewise.
2876 * semantics.c (expand_stmt): Only leave out rtl for unused
2877 artificials, and set DECL_IGNORED_P on them as well.
2878 * decl.c (wrapup_globals_for_namespace): Likewise.
2880 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
2882 * decl.c (maybe_commonize_var): Skip all artificial decls.
2883 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
2885 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
2887 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
2888 * cp-tree.h: Declare flag_enforce_eh_specs.
2889 * decl.c (store_parm_decls, finish_function): Check it.
2891 C library functions don't throw.
2892 * Makefile.in (cfns.h): New target.
2893 (except.o): Depend on it.
2894 * Make-lang.in (cc1plus): Depend on cfns.gperf.
2895 * cfns.gperf: New file.
2896 * cfns.h: Generated.
2897 * except.c: Include it.
2898 (nothrow_libfn_p): New fn.
2899 * decl.c (grokfndecl): Use it.
2900 * cp-tree.h: Declare it.
2902 * decl.c (push_overloaded_decl_1, auto_function,
2903 define_function): Lose.
2904 (build_library_fn_1): New static fn.
2905 (builtin_function): Use it.
2906 (get_atexit_node): Use build_library_fn_ptr.
2907 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
2908 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
2909 push_void_library_fn, push_throw_library_fn): New fns.
2910 * cp-tree.h: Declare them.
2911 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
2912 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
2913 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
2914 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
2915 * rtti.c (build_runtime_decl): Lose.
2916 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
2917 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
2918 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
2920 * call.c (build_call): Remove result_type parm.
2921 Call mark_used on unused artificial fns.
2922 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
2924 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
2926 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
2928 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
2929 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
2930 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
2931 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
2932 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
2933 expand_generic_desc): Likewise.
2935 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
2937 * exception.cc (__cp_pop_exception): Cleanup the original object.
2939 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
2941 * decl.c (grok_op_properties): Merge conversion to void warning
2942 with other silly op warnings.
2944 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
2946 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
2947 array CONSTRUCTOR elements. Don't use expr_tree_cons.
2949 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
2951 * decl.c (cp_make_fname_decl): New function.
2952 (wrapup_globals_for_namespace): Don't emit unused static vars.
2953 (init_decl_processing): Remove comment about use of
2954 array_domain_type. Set make_fname_decl.
2955 (cp_finish_decl): Remove __FUNCTION__ nadgering.
2956 * semantics.c (begin_compound_stmt): Remove
2957 current_function_name_declared flagging.
2958 (expand_stmt): Don't emit unused local statics.
2959 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
2962 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
2964 * typeck.c (convert_for_assignment): Don't look at array
2966 * call.c (convert_like_real): Likewise.
2968 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
2970 Add initial support for '\uNNNN' specifier.
2971 * lex.c (read_ucs): New fn.
2972 (readescape, skip_white_space): Call it.
2973 (is_extended_char, is_extended_char_1): New fns.
2974 (utf8_extend_token): New fn, #if 0'd out.
2975 (real_yylex): Treat extended chars like letters.
2977 * search.c (note_debug_info_needed): Walk the bases even if we
2978 weren't deferring the type itself.
2980 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2982 * decl2.c (finish_objects): Constify a char*.
2984 * method.c (emit_thunk): Likewise.
2986 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
2988 * typeck.c (dubious_conversion_warnings): Look through
2991 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2993 * class.c (dfs_modify_vtables): I is now unsigned.
2994 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
2995 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
2996 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
2997 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
2998 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
2999 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
3000 Call integer_all_onesp.
3001 * typeck2.c (process_init_constructor): Use compare_tree_int.
3003 * lang-specs.h (as): Don't call if -syntax-only.
3005 2000-03-06 Mark Mitchell <mark@codesourcery.com>
3007 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
3008 RTL_EXPR_HAS_NO_SCOPE after all.
3010 2000-03-05 Mark Mitchell <mark@codesourcery.com>
3012 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
3013 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
3014 RTL_EXPR_HAS_NO_SCOPE.
3016 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
3019 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
3021 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
3023 * call.c (convert_like): Macrofy.
3024 (convert_like_with_context): New macro.
3025 (convert_like_real): Renamed from convert_like. Add calling
3026 context parameters, for diagnostics. Add recursive flag. Call
3027 dubious_conversion_warnings for outer conversion.
3028 (build_user_type_conversion): Use convert_like_with_context.
3029 (build_over_call): Likewise. Don't warn about dubious
3030 conversions here. Adjust convert_default_arg calls.
3031 (convert_default_arg): Add context parameters for diagnostics.
3032 Pass throught to convert_like_with_context.
3033 * cp-tree.h (convert_default_arg): Add context parameters.
3034 (dubious_conversion_warnings): Prototype new function.
3035 * typeck.c (convert_arguments): Adjust convert_default_arg call.
3036 (dubious_conversion_warnings): New function, broken
3037 out of convert_for_assignment.
3038 (convert_for_assignment): Adjust.
3040 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
3042 * decl2.c (key_method): Break out from...
3043 (import_export_vtable, import_export_class): ...here.
3045 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
3046 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
3048 * search.c (note_debug_info_needed, dfs_debug_mark,
3049 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
3050 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
3052 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
3054 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
3057 2000-03-02 Mark Mitchell <mark@codesourcery.com>
3059 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
3060 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
3061 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
3062 (lang_type): Split gets_new into has_new and has_array_new.
3063 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3064 (TYPE_GETS_NEW): Split into ...
3065 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
3066 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
3067 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
3068 (build_op_new_call): Don't declare.
3069 (build_new_1): Likewise.
3070 * call.c (build_op_new_call): Remove.
3071 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
3072 instead of TYPE_NEEDS_DESTRUCTOR.
3073 (finish_struct_bits): Likewise.
3074 (add_implicitly_declared_members): Likewise.
3075 (check_field_decl): Likewise.
3076 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
3077 correctly under the new ABI.
3078 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
3079 instead of TYPE_NEEDS_DESTRUCTOR.
3080 (initialize_local_var): Likewise.
3081 (destroy_local_var): Likewise.
3082 (cp_finish_decl): Likewise.
3083 (register_dtor_fn): Likewise.
3084 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
3085 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
3086 TYPE_VEC_DELETE_TAKES_SIZE here.
3087 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
3088 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
3089 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3090 (finish_destructor_body): Likewise.
3091 (maybe_build_cleanup_1): Likewise.
3092 * decl2.c (do_static_destruction): Likewise.
3093 * init.c (build_new_1): Make it static.
3094 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3095 (expand_cleanup_for_base): Likewise.
3096 (get_cookie_size): New function.
3097 (build_new_1): Handle array-new cookies correctly under the new
3099 (build_vec_delete_1): Likewise.
3100 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3101 (build_delete): Likewise.
3102 (build_vec_delete): Handle array-new cookies correctly under the new
3104 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3105 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
3106 TYPE_HAS_ARRAY_NEW_OPERATOR.
3107 * ptree.c (print_lang_type): Check them.
3108 * search.c (context_for_name_lookup): Fix typo in comment.
3109 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3110 * tree.c (break_out_cleanups): Likewise.
3111 (build_cplus_array_test_1): Likewise.
3112 (cp_build_qualified_type_real): Likewise.
3113 * typeck.c (complete_type): Likewise.
3115 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
3116 the command-line, not the end.
3118 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
3120 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
3122 2000-03-02 Tom Tromey <tromey@cygnus.com>
3124 * cp-tree.h (build_java_class_ref): Declare.
3125 * init.c (build_java_class_ref): No longer static.
3126 * except.c (expand_throw): Generate a Java-style `throw' if the
3127 thrown object is a "Java" object.
3128 (initialize_handler_parm): Generate a Java-style lookup of
3129 exception info if the caught object is a "Java" object.
3130 (catch_language, catch_language_init): New globals.
3131 (decl_is_java_type): New function.
3132 (expand_start_catch_block): Don't call push_eh_info() or
3133 push_eh_cleanup() when handling a Java-style "catch". Pass Java
3134 class reference to build_catch_block.
3136 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3138 * typeck.c (comptypes): Treat sizetype like its language equivalent.
3140 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
3142 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
3143 to merge reference/pointer code and fix incorrect warnings.
3145 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
3147 * search.c (protected_accessible_p): Use context_for_name_lookup.
3149 * init.c (construct_virtual_bases): Fix thinko.
3150 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
3152 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
3154 * decl.c (current_function_decl): Move to toplev.c.
3156 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
3158 * pt.c (fn_type_unification): Unify return type, whenever
3160 (get_bindings_real): Only pass return type when necessary.
3161 Remove explicit return type check.
3162 * class.c (resolve_address_of_overloaded_function): Pass desired
3163 return type to fn_type_unification.
3165 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3167 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
3169 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
3171 * rtti.c (expand_class_desc): Likewise.
3172 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
3173 (THUNK_VCALL_OFFSET): Likewise.
3174 (THUNK_DELTA): Reflect changes in ../tree.h.
3176 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
3178 * search.c (protected_accessible_p): Also allow the access if
3179 the member is public in DERIVED. Lose TYPE parm.
3180 (friend_accessible_p): Lose TYPE parm.
3181 (accessible_p): Adjust.
3183 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3185 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
3186 on things that are not sizes; ssize_binop deleted.
3187 Call size_diffop when appropriate.
3188 (dfs_build_vcall_offset_vtbl_entries): Likewise.
3189 (build_primary_vtable, build_secondary_vtable): Likewise.
3190 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
3191 Variable I is HOST_WIDE_INT.
3192 (get_vfield_offset): Pass proper types to size_binop.
3193 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
3194 (finish_struct_1): Likewise.
3195 (skip_rtti_stuff): Arg N is now pointer to signed.
3196 (layout_class_type): Use size_zero_node.
3197 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
3198 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
3199 * decl.c (complete_arry_type): Pass proper types to size_binop.
3200 (xref_basetypes): BINFO_OFFSET is sizetype.
3201 * error.c (dump_expr): Don't use size_binop non-sizes.
3202 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
3203 * init.c (construct_virtual_bases): Fix type error.
3204 (build_vec_delete_1): Pass proper type to size_binop and don't
3206 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
3207 * rtti.c (get_base_offset): Pass proper type to size_binop.
3208 * search.c (dfs_find_vbases): Fix type error.
3209 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
3210 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
3211 * tree.c (debug_binfo): Variable N is signed.
3212 Use HOST_WIDE_INT_PRINT_DEC.
3213 * typeck.c (comptypes): sizetype is same as equivalent integer type.
3214 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
3215 size_one_node and size_zero_node.
3216 (c_alignof): Use size_one_node.
3217 (build_component_addr): Pass proper types to size_binop.
3218 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
3220 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
3222 Implement class scope using-declarations for functions.
3223 * class.c (handle_using_decl): Call add_method for used functions.
3224 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
3225 (add_method): Used functions are hidden by local functions.
3226 (check_bases_and_members): Handle using-decls before finalizing
3227 CLASSTYPE_METHOD_VEC.
3228 * call.c (add_function_candidate): Add ctype parm; if non-zero,
3229 override the type of 'this' accordingly.
3230 (add_template_candidate, add_template_candidate_real): Add ctype parm.
3231 (convert_class_to_reference, build_user_type_conversion_1,
3232 build_new_function_call, build_object_call, build_new_op,
3233 build_new_method_call): Pass ctype parm.
3235 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
3237 * call.c (convert_class_to_reference, build_user_type_conversion_1,
3238 build_new_function_call, build_object_call, build_new_op,
3239 build_new_method_call, build_op_delete_call): Don't get basetype_path
3241 * typeck.c (build_component_ref): Likewise.
3242 * init.c (build_offset_ref): Likewise.
3243 (resolve_offset_ref): Don't call enforce_access.
3244 Call build_scoped_ref.
3245 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
3246 would cause an error or if -pedantic.
3247 * class.c (alter_access): Lose binfo parm.
3249 2000-02-26 Mark Mitchell <mark@codesourcery.com>
3251 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
3254 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
3256 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
3257 pseudo_type_info creation into the std namespace
3259 2000-02-26 Mark Mitchell <mark@codesourcery.com>
3261 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
3262 (import_export_class): Remove declaration.
3263 * decl2.c (import_export_class): Make it static.
3264 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
3265 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
3266 EXPR_WITH_FILE_LOCATION.
3267 * lex.c (check_newline): Tweak filename/lineno setting.
3268 * semantics.c (begin_while_stmt): Fix typo in comment.
3270 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3272 * lang-options.h (-fmessage-length=): Add missing option.
3274 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
3276 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
3278 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
3280 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
3282 * optimize.c (expand_call_inline): Emit the return label before
3283 evaluating the return value.
3285 2000-02-24 Mark Mitchell <mark@codesourcery.com>
3287 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
3288 than duplicating functionality here.
3289 * optimize.c: Include input.h.
3290 (expand_call_inline): Use push_srcloc and pop_srcloc.
3291 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
3292 * parse.c: Regenerated.
3293 * Makefile.in (lex.o): Depend on input.h.
3294 (optimize.o): Likewise.
3296 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
3298 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
3299 function type, rather than ICE.
3301 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
3303 * decl.c (grokdeclarator): Call decl_type_access_control.
3304 * parse.y (parse_end_decl): Don't call decl_type_access_control if
3307 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
3309 * decl.c (decls_match): Remove obsolete static member nadgering.
3311 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3313 * decl.c (grokdeclarator): Change ANSI to ISO.
3314 * lex.c (consume_string, readescape, do_identifier): Likewise.
3315 (parse_float, real_yylex): Likewise.
3316 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
3317 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
3318 new_type_id, maybe_label_decls, simple_stmt,
3319 for.init.statement): Likewise.
3320 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
3321 * semantics.c (finish_named_return_value): Likewise.
3322 * parse.c: Regenerate.
3324 2000-02-21 Mark Mitchell <mark@codesourcery.com>
3326 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
3327 (CPTI_CLASS_STAR_TYPE): Remove.
3328 (vtable_index_type): Likewise.
3329 (class_star_type_node): Remove.
3330 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
3331 (build_binary_op_nodefault): Remove.
3332 * call.c (build_new_op): Use build_binary_op instead of
3333 build_binary_op_nodefault.
3334 * decl.c (init_decl_processing): Remove class_star_type_node
3335 initialization. Make delta_type_node ptrdiff_type_node under the
3336 new ABI. Initialize vtable_index_type.
3337 (build_ptrmemfunc_type): Build different structures for the new
3339 (build_enumerator): Use build_binary_op instead of
3340 build_binary_op_nodefault.
3341 * method.c (build_overload_value): Mangle pointers-to-members
3342 appropriately under the new ABI.
3343 * typeck.c (build_array_ref): Use build_binary_op instead of
3344 build_binary_op_nodefault.
3345 (get_member_function_from_ptrfunc): Adjust for the new ABI.
3346 (build_binary_op_nodefault): Rename to ...
3347 (build_binary_op): ... this. Remove old version. Adjust for
3348 pointer-to-member comparisons under the new ABI.
3349 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
3350 (build_ptrmemfunc): Adjust for the new ABI.
3351 (expand_ptrmemfunc_cst): Likewise.
3352 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
3353 (pfn_from_ptrmemfunc): Adjust for the new ABI.
3355 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
3357 * call.c (build_object_call): Compress consecutive calls to
3359 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
3360 (build_op_delete_call): Adjust message formatting.
3362 * class.c (check_bases): Compress consecutive calls to
3364 (finish_struct_anon): Say 'ISO C++'.
3366 * decl.c (start_decl): Same here.
3367 (grok_reference_init): Likewise.
3368 (grokfndecl): Correct message formatting.
3369 (grokfndecl): Improve diagnostic.
3370 (check_static_variable_definition): Likewise. Say 'ISO C++'
3371 (compute_array_index_type): Say 'ISO C++'
3372 (create_array_type_for_decl): Compress consecutive calls to
3374 (grokdeclarator): Say 'ISO C++'
3375 (grok_op_properties): Likewise.
3377 * decl2.c (delete_sanity): Clairify diagnostic.
3378 (check_member_template): Same here.
3379 (grok_function_init): Use consistent terminology.
3381 * expr.c (do_case): Say 'ISO C++'
3383 * friend.c (do_friend): Compress consecutive calls to warning.
3385 2000-02-20 Mark Mitchell <mark@codesourcery.com>
3387 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
3388 * class.c (build_secondary_vtable): Reorganize. Don't create a
3389 new vtable under the new ABI.
3390 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
3392 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
3393 the initializing elements.
3394 (initialize_vtable): New function.
3395 (dfs_finish_vtbls): Use it.
3396 (dfs_accumulate_vtbl_inits): New function.
3397 (finish_vtbls): Merge primary and secondary vtables under the new
3399 (finish_struct_1): Remove redundant call to layout_vtable_decl.
3400 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
3403 * class.c (build_vtable): New function, split out from ...
3404 (get_vtable_decl): ... here, and ...
3405 (build_secondary_vtable): ... here.
3407 * pt.c (tsubst_decl): Fix formatting.
3409 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3411 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
3412 (avoid_overlap, build_base_field): Likewise.
3413 (build_base_field, build_base_fields, is_empty_class):
3414 Test DECL_SIZE with integer_zero.
3415 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
3416 * cp-tree.h (struct lang_type): New field size_unit.
3417 (CLASSTYPE_SIZE_UNIT): New macro.
3418 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
3419 (cp_finish_decl): Delete -Wlarger-than processing.
3420 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
3421 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
3422 * tree.c (make_binfo): binfo vector is one entry longer.
3423 (walk_tree): Walk DECL_SIZE_UNIT.
3425 2000-02-19 Mark Mitchell <mark@codesourcery.com>
3427 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
3429 (build_vtable_entry): Don't assume all vtable entries are
3431 (build_vtbl_initializer): Adjust accordingly.
3432 (get_vtable_decl): Fix formatting.
3434 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
3436 * semantics.c (deferred_type_access_control): Walk the entire
3438 (save_type_access_control): Rename from
3439 initial_deferred_type_access_control. Just remember the value.
3440 (decl_type_access_control): New fn.
3441 (begin_function_definition): Use deferred_type_access_control, after
3442 we've started the function. Set type_lookups to error_mark_node.
3443 * parse.y (frob_specs, fn.def1): Adjust.
3444 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
3445 (parse_end_decl, parse_bitfield0, parse_method): New fns.
3446 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
3447 (after_type_component_declarator0): Likewise.
3448 (after_type_component_declarator): Likewise.
3449 (notype_component_declarator): Likewise.
3450 * cp-tree.h: Adjust.
3452 * decl.c (redeclaration_error_message): Allow redeclaration of
3453 namespace-scope decls.
3455 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
3457 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
3459 2000-02-17 Mark Mitchell <mark@codesourcery.com>
3461 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
3462 * decl2.c (grokclassfn): Likewise.
3464 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
3466 * decl2.c (lang_decode_option): Don't set default message length
3468 * lex.c (lang_init_options): Set it here.
3470 2000-02-16 Mark Mitchell <mark@codesourcery.com>
3472 Make DECL_CONTEXT mean the class in which a member function was
3473 declared, even for a virtual function.
3474 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
3475 (DECL_FRIEND_CONTEXT): New macro.
3476 (DECL_REAL_CONTEXT): Remove.
3477 (SET_DECL_FRIEND_CONTEXT): Likewise.
3478 (DECL_VIRTUAL_CONTEXT): Adjust.
3479 (DECL_CLASS_SCOPE_P): Use TYPE_P.
3480 (add_friends): Remove.
3481 (hack_decl_function_context): Likewise.
3482 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
3484 (build_over_call): Fix indentation. Use DECL_CONTEXT
3485 instead of DECL_CLASS_CONTEXT.
3486 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
3487 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
3488 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3489 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
3490 (build_base_field): Likewise.
3491 (finish_struct_1): Likewise.
3492 (build_self_reference): Likewise.
3493 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
3495 (pushtag): Use decl_function_context, not
3496 hack_decl_function_context.
3497 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
3498 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
3499 (pushdecl): Remove bogus code.
3500 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
3501 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
3502 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3503 Use decl_function_context, nothack_decl_function_context.
3504 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
3505 (grokdeclarator): Likewise. Use decl_function_context, not
3506 hack_decl_function_context.
3507 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
3508 (start_function): Use DECL_FRIEND_CONTEXT, not
3509 DECL_CLASS_CONTEXT. Use decl_function_context, not
3510 hack_decl_function_context.
3511 (finish_function): Use decl_function_context, not
3512 hack_decl_function_context.
3513 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
3515 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
3516 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
3517 (grokfield): Likewise.
3518 (finish_builtin_type): Likewise.
3519 (finish_vtable_vardec): Use decl_function_context, not
3520 hack_decl_function_context.
3521 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3522 (start_static_initialization_or_destruction): Likewise.
3523 (finish_static_initialization_or_destruction): Likewise.
3524 (mark_used): Adjust logic for deciding when to synthesize methods.
3525 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
3527 * error.c (dump_function_decl): Use DECL_CONTEXT, not
3529 * friend.c (is_friend): Likewise.
3530 (add_friends): Remove.
3531 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
3532 * lex.c (begin_definition_of_inclass_inline): Use
3533 decl_function_context, not hack_decl_function_context.
3534 (process_next_inline): Likewise.
3535 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
3536 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
3537 DECL_CLASSS_CONTEXT.
3538 (hack_identifier): Likewise.
3539 (synthesize_method): Use decl_function_context, not
3540 hack_decl_function_context.
3541 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
3543 (is_member_template): Use decl_function_context, not
3544 hack_decl_function_context. Use DECL_CONTEXT, not
3546 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
3548 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
3550 (push_template_decl_real): Likewise.
3551 (instantiate_class_template): Don't call add_friends.
3552 (tsubst_default_argument): Use DECL_CONTEXT, not
3554 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
3555 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3556 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
3558 * repo.c (repo_inline_used): Likewise.
3559 * search.c (current_scope): Adjust for new _CONTEXT macros.
3560 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
3562 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
3563 (lookup_fnfields_here):Likewise.
3564 (check_final_overrider): Likewise.
3565 (init_vbase_pointers): Likewise.
3566 (virtual_context): Likewise.
3567 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
3568 (expand_body): Use decl_function_context, not
3569 hack_decl_function_context.
3570 * tree.c (hack_decl_function_context): Remove.
3571 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
3573 * typeck2.c (error_not_base_type): Likewise.
3575 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
3577 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
3579 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3581 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
3583 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
3585 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
3587 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
3589 * decl2.c (lang_decode_option): Enable automatic line wrapping.
3591 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
3593 * parse.y (frob_specs): Split out...
3594 (parse_decl): From here.
3595 (fn.def2): Call initial_deferred_type_access_control.
3596 (after_type_component_declarator0): Call frob_specs.
3597 (notype_component_declarator0): Likewise.
3598 * search.c (friend_accessible_p): Nested classes are friends of their
3601 2000-02-10 Mark Mitchell <mark@codesourcery.com>
3603 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
3604 used to create an implicit temporary.
3606 * class.c (dfs_modify_vtables): Tweak calculation of functions to
3609 2000-02-08 Nathan Sidwell <nathan@acm.org>
3611 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
3612 strip array element qualifiers too.
3614 2000-02-07 Mark Mitchell <mark@codesourcery.com>
3616 * decl.c (store_parm_decls): Don't build cleanups for parameters
3617 while processing_template_decl.
3619 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
3621 * cp-tree.h (struct saved_scope): Add incomplete field.
3622 (namespace_scope_incomplete): New macro.
3623 * decl.c (pushdecl): Use it.
3624 (hack_incomplete_structures): Use it. See through artificial
3626 (mark_saved_scope): Mark it.
3628 Implement access control for nested types.
3629 * search.c (type_access_control): New fn.
3630 (accessible_p): Now we do perform access control for types.
3631 * semantics.c (deferred_type_access_control): New fn.
3632 (initial_deferred_type_access_control): New fn.
3633 (begin_function_definition): Call it. Add lookups parm.
3634 * decl.c (struct binding_level): Add this_class field.
3635 (pushlevel_class): Set it.
3636 (mark_binding_level): Mark it.
3637 (lookup_name_real): Use it. Call type_access_control.
3638 (mark_saved_scope): Mark lookups field.
3639 * cp-tree.h (flagged_type_tree): Add lookups field.
3640 (struct saved_scope): Add lookups field.
3641 (type_lookups): New macro.
3642 * parse.y (declmods): Now <ftype>.
3643 (parse_decl): Add lookups parm. Call
3644 initial_deferred_type_access_control.
3645 (lang_extdef): Clear type_lookups.
3646 (typed_declspecs, declmods, typespec): Set lookups field.
3647 (initdcl): Call deferred_type_access_control.
3648 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
3649 component_decl_1, named_parm): Adjust.
3650 * friend.c (is_friend): Nested classes are friends of their
3653 * class.c (currently_open_derived_class): New fn.
3654 * method.c (hack_identifier): Use it.
3656 * lex.c (do_identifier): Remove obsolete code.
3658 * parse.y (typed_typespecs): Propagate new_type_flag properly.
3660 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
3662 * tinfo.h: Remove apostrophes from C++ comment (xgettext
3663 thinks this file is plain C).
3665 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3667 * Makefile.in (call.o): Depend on $(EXPR_H).
3669 * call.c: Include "expr.h".
3671 * class.c (dump_class_hierarchy): Add prototype.
3673 * search.c (dfs_get_pure_virtuals): Likewise.
3675 2000-02-1 Ulrich Drepper <drepper@redhat.com>
3677 * parse.y (simple_stmt): Allow :: token in asm parameter list.
3680 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
3682 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
3683 Store it in DECL_FCONTEXT.
3684 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
3686 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
3688 * tinfo.h (old abi): #include "tconfig.h".
3689 * tinfo.cc (convert_to_base): Move into old abi section.
3691 2000-01-31 Mark Mitchell <mark@codesourcery.com>
3693 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
3694 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
3695 (BINFO_PRIMARY_BINFO): New macro.
3696 (BF_DELTA): Rename to ...
3697 (BV_DELTA): ... this.
3698 (BF_VCALL_INDEX): Rename to ...
3699 (BV_VCALL_INDEX): ... this.
3700 (BF_FN): Rename to ...
3702 * class.c (build_vbase_path): Adjust for changes to reverse_path.
3703 (set_rtti_entry): Rename BF_ macros to BV_ variants.
3704 (modify_vtable_entry): Simplify.
3705 (add_virtual_function): Rename BF_ macros to BV_ variants.
3706 (build_vtable_initializer): Likewise.
3707 (get_class_offset_1): Remove.
3708 (dfs_get_class_offset): Likewise.
3709 (get_class_offset): Likewise.
3710 (dfs_find_final_overrider): New function.
3711 (find_final_overrider): Likewise.
3712 (modify_one_vtable): Remove.
3713 (dfs_find_base): New function.
3714 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
3715 find_final_overrider.
3716 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
3718 (dfs_fixup_vtable_deltas): Remove.
3719 (override_one_vtable): Remove.
3720 (merge_overrides): Likewise.
3721 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
3722 unreal chilren of virtual bases.
3723 (finish_struct_1): Don't use merge_overrides. Don't use
3724 dfs_fixup_vtable_deltas.
3725 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
3728 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
3729 Jason Merrill <jason@yorick.cygnus.com>
3731 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
3733 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
3735 * exception.cc (__throw_bad_typeid): Add missing std::.
3737 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3739 * cp-tree.h (make_thunk): PROTO -> PARAMS.
3741 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
3743 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
3745 Runtime support for new-abi rtti.
3746 * inc/typeinfo (type_info::operator!=): Define in class.
3747 (type_info::before, type_info::name, type_info::operator==,
3748 type_info::operator!=): Define new ABI implementations.
3749 (type_info::is_pointer_p, type_info::is_function_p): Declare
3750 new virtual functions.
3751 (type_info::do_catch, type_info::do_upcast): Likewise.
3753 * tinfo.h (__base_class_info): Define new class.
3754 (__class_type_info): Likewise.
3755 (__si_class_type_info): Likewise.
3756 (__vmi_class_type_info): Likewise.
3757 (__dynamic_cast): Prototype.
3759 * tinfo.cc: Conditionalize old and new rtti mechanisms.
3760 (type_info::is_pointer_p): Define new function.
3761 (type_info::is_function_p): Likewise.
3762 (type_info::do_catch): Likewise.
3763 (type_info::do_upcast): Likewise.
3764 (vtable_prefix): New structure for vtable access.
3765 (adjust_pointer): Define new template function.
3766 (contained_p, public_p, virtual_p, contained_public_p,
3767 contained_nonpublic_p, contained_nonvirtual_p): Define new
3769 (nonvirtual_base_type): New local variable.
3770 (__class_type_info::~__class_type_info): Define.
3771 (__si_class_type_info::~__si_class_type_info): Likewise.
3772 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
3773 (__class_type_info::do_catch): Define new function.
3774 (__class_type_info::do_upcast): Likewise.
3775 (__class_type_info::find_public_src): Likewise.
3776 (__class_type_info::do_find_public_src): Likewise.
3777 (__si_class_type_info::do_find_public_src): Likewise.
3778 (__vmi_class_type_info::do_find_public_src): Likewise.
3779 (__class_type_info::do_dyncast): Likewise.
3780 (__si_class_type_info::do_dyncast): Likewise.
3781 (__vmi_class_type_info::do_dyncast): Likewise.
3782 (__class_type_info::do_upcast): Likewise.
3783 (__si_class_type_info::do_upcast): Likewise.
3784 (__vmi_class_type_info::do_upcast): Likewise.
3785 (__dynamic_cast): Likewise.
3787 * tinfo2.cc (__fundamental_type_info): Define new class.
3788 (__pointer_type_info): Likewise.
3789 (__reference_type_info): Likewise.
3790 (__array_type_info): Likewise.
3791 (__function_type_info): Likewise.
3792 (__enum_type_info): Likewise.
3793 (__ptr_to_member_type_info): Likewise.
3794 (__fundamental_type_info::~__fundamental_type_info): Define.
3795 (__pointer_type_info::~__pointer_type_info): Likewise.
3796 (__reference_type_info::~__reference_type_info): Likewise.
3797 (__array_type_info::~__array_type_info): Likewise.
3798 (__function_type_info::~__function_type_info): Likewise.
3799 (__enum_type_info::~__enum_type_info): Likewise.
3800 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
3801 (__pointer_type_info::do_catch): Define new function.
3802 (__ptr_to_member_type_info::do_catch): Define new function.
3804 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
3805 (__is_pointer): Likewise.
3807 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
3809 2000-01-30 Mark Mitchell <mark@codesourcery.com>
3811 * cp/class.c (build_vtable): Rename to build_primary_vtable.
3812 (prepare_fresh_vtable): Rename to build_secondary_vtable.
3813 (make_new_vtable): New function.
3814 (modify_vtable_entry): Handle generation of new vtables correctly.
3815 (modify_one_vtable): Remove unused parameter.
3816 (dfs_fixup_vtable_deltas): Likewise.
3817 (override_one_vtable): Use build_secondary_vtable.
3818 (finish_struct_1): Use build_primary_vtable and
3819 build_secondary_vtable.
3821 2000-01-28 Ulrich Drepper <drepper@redhat.com>
3823 * cp/decl.c: Adjust variable names, comments, help strings.
3825 2000-01-29 Nathan Sidwell <nathan@acm.org>
3827 * new2.cc (operator delete[]): Use operator delete, don't assume
3830 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
3832 * class.c (build_vtbl_initializer): Add argument to
3833 build_vtable_entry call.
3835 2000-01-27 Mark Mitchell <mark@codesourcery.com>
3837 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
3838 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
3839 (BF_DELTA): New macro.
3840 (BF_VCALL_INDEX): Likewise.
3842 (THUNK_VCALL_OFFSET): Likewise.
3843 (make_thunk): Change prototype.
3844 * class.c (build_vtable_entry): Integrate
3845 build_vtable_entry_for_fn. Handle vcall indices.
3846 (build_vtable_entry_for_fn): Remove.
3847 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
3848 BF_VCALL_INDEX, BF_FN.
3849 (modify_vtable_entry): Integrate common code from
3850 modify_one_vtable and dfs_fixup_vtable_deltas.
3851 (add_virtual_function): Set BF_VCALL_INDEX.
3852 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
3854 (modify_one_vtable): Simplify.
3855 (dfs_fixup_vtable_deltas): Likewise.
3856 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
3857 * method.c (make_thunk): Handle vcall indices.
3859 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
3861 Compiler side new abi rtti (not enabled).
3862 * cp-tree.h (new_abi_rtti_p): New macro.
3863 (emit_support_tinfos): Prototype new function.
3864 (tinfo_decl_p): Likewise.
3865 (emit_tinfo_decl): Likwise.
3866 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
3868 (doing_runtime): New local static.
3869 (init_rtti_processing): Add new-abi initializer.
3870 (get_tinfo_decl): Add new-abi logic.
3871 (tinfo_from_decl): Likewise.
3872 (build_dynamic_cast_1): Likewise.
3873 (qualifier_flags): New static function.
3874 (tinfo_base_init): Likewise.
3875 (generic_initializer): Likewise.
3876 (ptr_ref_initializer): Likewise.
3877 (ptmd_initializer): Likewise.
3878 (class_hint_flags): Likewise.
3879 (class_initializer): Likewise.
3880 (synthesize_tinfo_var): Likewise.
3881 (create_real_tinfo_var): Likewise.
3882 (create_pseudo_type_info): Likewise.
3883 (get_vmi_pseudo_type_info): Likewise.
3884 (create_tinfo_types): Likewise.
3885 (emit_support_tinfos): New global function.
3886 (tinfo_decl_p): New global predicate.
3887 (emit_tinfo_decl): New global function.
3888 * class.c (set_rtti_entry): Generalize for old and new rtti.
3889 (build_vtbl_initializer): Likewise.
3890 * decl2.c (finish_file): Likewise.
3892 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
3894 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
3895 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
3897 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
3899 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
3902 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
3904 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
3906 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
3908 * optimize.c (calls_setjmp_r): Supply new argument
3909 to special_function_p.
3911 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3913 * call.c: PROTO -> PARAMS.
3914 * class.c: Likewise.
3915 * cp-tree.h: Likewise.
3919 * decl2.c: Likewise.
3921 * errfn.c: Likewise.
3922 * error.c: Likewise.
3923 * except.c: Likewise.
3926 * input.c: Likewise.
3929 * method.c: Likewise.
3930 * optimize.c: Likewise.
3931 * parse.y: Likewise.
3935 * search.c: Likewise.
3936 * semantics.c: Likewise.
3939 * typeck.c: Likewise.
3940 * typeck2.c: Likewise.
3943 2000-01-25 Richard Henderson <rth@cygnus.com>
3945 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
3947 2000-01-25 Mark Mitchell <mark@codesourcery.com>
3949 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
3950 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
3951 (struct vcall_offset_data_s): New type.
3952 (dfs_vcall_offset_queue_p): New function.
3953 (dfs_build_vcall_offset_vtbl_entries): Likewise.
3954 (build_vcall_offset_vtbl_entries): Likewise.
3955 (layout_vtable_decl): Likewise.
3956 (num_vfun_entries): Likewise.
3957 (num_extra_vtbl_entries): Add the entries for vcall offsets.
3958 (build_vtbl_initializer): Likewise.
3959 (dfs_finish_vtabls): Use layout_vtable_decl.
3960 (modify_one_vtables): Always duplicate vtables under the new ABI.
3961 (finish_struct_1): Use layout_vtable_decl.
3963 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3965 * decl.c (member_function_or_else): Change third arg from a format
3966 specifier to an `enum overload_flags'. Callers changed.
3968 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
3970 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
3971 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
3972 build_const_cast, get_delta_difference, check_return_expr): Avoid
3973 ANSI string concatenation usage.
3975 2000-01-24 Mark Mitchell <mark@codesourcery.com>
3977 * class.c (layout_class_type): Put the fields required to make a
3978 class non-empty at the end, not the beginning, of the TYPE_FIELDs
3981 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
3983 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
3986 * decl2.c (mark_used): Do instantiate inlines that have been
3987 explicitly instantiated.
3989 2000-01-24 Richard Henderson <rth@cygnus.com>
3991 * call.c (build_over_call): Use expand_tree_builtin.
3992 * typeck.c (build_function_call_real): Likewise.
3993 (build_binary_op_nodefault): Handle unordered compares.
3995 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
3997 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
3998 cp_tree_index values.
3999 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
4000 New global node #defines for them.
4001 * rtti.c (call_void_fn): Replace with ...
4002 (build_runtime_decl): ... new static function.
4003 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
4004 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
4005 (build_dynamic_cast_1): Always produce correctly typed result.
4006 Explicitly produce type_info addresses. Use dynamic_cast_node.
4007 * exception.cc (__throw_bad_cast): Return `void *'.
4008 (__throw_bad_typeid): Return `const type_info &'.
4010 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
4012 * cp-tree.h (get_vtable_decl): Prototype new function.
4013 * class.c (get_vtable_decl): New function. Broken out from ...
4014 (build_vtable): ... here. Use it.
4015 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
4018 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
4020 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
4021 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
4022 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
4023 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
4024 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
4025 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
4026 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
4027 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
4028 (CPTI_TINFO_VAR_ID): New enumeration.
4029 (__tp_desc_type_node, __access_mode_type_node,
4030 __bltn_desc_type_node, __user_desc_type_node,
4031 __class_desc_type_node, __ptr_desc_type_node,
4032 __attr_desc_type_node, __func_desc_type_node,
4033 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
4034 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
4035 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
4036 enum_desc_type_node, class_desc_type_node,
4037 si_class_desc_type_node, vmi_class_desc_type_node,
4038 ptmd_desc_type_node, base_desc_type_node): New #defines.
4039 (tinfo_fn_id, tinfo_fn_type): Rename to ...
4040 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
4041 (tinfo_var_id): New enumeration.
4042 (DECL_TINFO_FN_P): Augment comment.
4043 * decl.c (cp_global_trees): Adjust documentation.
4044 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
4045 tinfo_decl_type and tinfo_var_id.
4046 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
4047 (build_typeid): Remove unused variable.
4048 (get_tinfo_var): Use tinfo_var_id.
4049 (tinfo_name): New static function.
4050 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
4051 (tinfo_from_decl): Likewise.
4052 (get_base_offset): New static function, broken out of
4054 (expand_si_desc): Use tinfo_name.
4055 (expand_class_desc): Likewise. Lose local static variable.
4056 Use base_desc_type_node. Use get_base_offset.
4057 (expand_ptr_desc): Use tinfo_name.
4058 (expand_attr_desc): Likewise.
4059 (expand_generic_desc): Likewise.
4061 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
4062 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
4064 2000-01-23 Mark Mitchell <mark@codesourcery.com>
4066 * cp-tree.h (__eprintf): Remove declaration.
4067 * tree.c (__eprintf): Remove definition.
4069 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
4070 Mark Mitchell <mark@codesourcery.com>
4072 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
4073 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
4075 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
4077 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
4079 2000-01-23 Mark Mitchell <mark@codesourcery.com>
4081 * cp-tree.h (register_dtor_fn): New function.
4082 * decl.c (destroy_local_static): Rename to ...
4083 (register_dtor_fn): ... this. Give it external linkage.
4084 (expand_static_init): Use it.
4085 * decl2.c (do_static_initialization): Likewise, if using
4087 (do_static_destruction): Check that __cxa_atexit is not in use.
4088 (finish_file): Don't call do_static_destruction if using
4091 * typeck.c (convert_arguments): Restore two-message error
4094 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
4096 Remap dynamic cast hint values to be consistent across ABIs.
4097 * search.c (dynamic_cast_base_recurse): Remap generated value.
4098 (get_dynamic_cast_base_type): Adjust documentation.
4099 * tinfo.h (__user_type_info::dyncast): Likewise.
4100 (__user_type_info::find_public_subobj): Remap BOFF meaning.
4101 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
4102 (__class_type_info::do_dyncast): Likewise.
4103 (__class_type_info::do_find_public_subobj): Likewise.
4104 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
4106 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
4108 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
4110 * typeck2.c (incomplete_type_error): Restore previous
4111 cp_error and cp_error_at call sequence.
4113 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
4115 * class.c (dump_class_hierarchy): Make format agree with argument;
4116 cast pointer to unsigned long and print with %lx.
4118 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
4120 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
4122 * typeck.c (composite_pointer_type, common_type,
4123 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
4124 build_function_call_real, convert_arguments,
4125 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
4126 build_unary_op, mark_addressable, build_compound_expr,
4127 build_static_cast, build_reinterpret_cast, build_const_cast,
4128 build_c_cast, build_modify_expr, get_delta_difference,
4129 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
4130 'ISO C++'. Fusion consecutive calls to diagnotic message routines
4132 * typeck2.c (readonly_error, abstract_virtuals_error,
4133 process_init_constructor, check_for_new_type): Likewise.
4135 2000-01-19 Mark Mitchell <mark@codesourcery.com>
4137 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
4140 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
4142 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
4143 (build_x_typeid): Likewise.
4144 (get_tinfo_fn): Likewise.
4145 (get_tinfo_fn_unused): Rename to ...
4146 (get_tinfo_decl): ... here.
4147 * rtti.c (build_headof): Replace logic error with assertion.
4148 (get_tinfo_fn_dynamic): Rename to ...
4149 (get_tinfo_decl_dynamic): ... here. Make static. Use
4150 complete_type_or_else.
4151 (build_x_typeid): Move into ...
4152 (build_typeid): ... here. Adjust call to
4153 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
4154 throw_bad_typeid expression.
4155 (get_tinfo_fn_unused): Rename to ...
4156 (get_tinfo_decl): ... here. Adjust comment.
4157 (get_tinfo_fn): Delete.
4158 (tinfo_from_decl): New static function.
4159 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
4160 (get_typeid): Use complete_type_or_else.
4161 (build_dynamic_cast_1): Adjust calls to
4162 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
4163 * parse.y (primary): Adjust call to build_typeid.
4164 * except.c (build_eh_type_type_ref): Adjust call to
4165 get_tinfo_decl. Mark as used.
4166 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
4167 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
4168 * parse.c: Regenerated.
4170 2000-01-17 Mark Mitchell <mark@codesourcery.com>
4172 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
4174 (resolves_to_fixed_type_p): Document calling convention.
4175 * rtti.c (build_x_typeid): Initialize NONNULL.
4177 * cp-tree.h (build_shared_int_cst): New function.
4178 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
4179 * class.c (modify_vtable_entry): Likewise.
4180 (add_virtual_function): Split out code to generated shared
4181 INTEGER_CSTs to build_share_int_cst.
4182 (modify_all_vtables): Handle all the overridden functions here.
4183 Add overridden functions from non-primary virtual bases to the
4185 (finish_struct_1): Adjust call to modify_all_vtables. Add
4186 overridden functions from non-primary bases to the vtable.
4187 * tree.c (build_shared_int_cst): New function.
4189 * cp-tree.h (scratchalloc): Remove.
4190 (build_scratch_list): Likewise.
4191 * call.c (convert_class_to_reference): Replace build_scratch_list
4192 and build_expr_list with build_tree_list.
4193 (add_candidate): Replace scratchalloc with expralloc. Note memory
4195 (build_user_type_conversion_1): Replace build_scratch_list
4196 and build_expr_list with build_tree_list.
4197 (build_new_op): Likewise.
4198 (build_op_delete_call): Likewise.
4199 (convert_like): Likewise.
4200 * cvt.c (ocp_convert): Likewise.
4201 * decl.c (start_decl): Likewise.
4202 (start_function): Likewise.
4203 (finish_destructor_body): Likewise.
4204 (maybe_build_cleanup_1): Likewise.
4205 * decl2.c (reparse_decl_as_expr): Likewise.
4206 * init.c (perform_member_init): Likewise.
4207 (expand_cleanup_for_base): Likewise.
4208 (build_builtin_delete_call): Likewise.
4209 (build_new_1): Likewise.
4210 (build_delete): Likewise.
4211 * method.c (do_build_assign_ref): Likewise.
4212 * parse.y (already_scoped_stmt): Likewise.
4213 (nontrivial_exprlist): Likewise.
4214 (net_initializer): Likewise.
4215 (initlist): Likewise.
4216 * parse.c: Regenerated.
4217 * rtti.c (build_x_typeid): Likewise.
4218 (build_dynamic_cast_1): Likewise.
4219 * typeck.c (build_x_compound_expr): Likewise.
4220 (build_static_cast): Likewise.
4221 (build_modify_expr): Likewise.
4223 * cp-tree.h (DECL_VINDEX): Add documentation.
4224 * class.c (build_vtable_entry): Likewise.
4225 (start_vtable): Add comment.
4226 (add_virtual_function): Replace pending_hard_virtuals with
4227 overridden_virtuals and pending_virtuals with new_virtuals.
4228 Replace redundant assignments with assertions.
4229 (check_for_override): Add comment.
4230 (check_bases_and_members): Replace pending_hard_virtuals with
4231 overridden_virtuals and pending_virtuals with new_virtuals.
4232 (create_vtbl_ptr): Likewise.
4233 (layout_class_type): Likewise.
4234 (finish_struct_1): Likewise. Add comments.
4236 2000-01-16 Mark Mitchell <mark@codesourcery.com>
4238 * class.c (finish_struct_1): Replace redundant code with
4241 * cp-tree.h (flag_new_abi): Move.
4242 (flag_use_cxa_atexit): Likewise.
4243 (flag_honor_std): Likewise.
4244 (flag_rtti): Likewise.
4245 (vbase_offsets_in_vtable_p): Define.
4246 (vptrs_present_everywhere_p): Likewise.
4247 (TYPE_CONTAINS_VPTR_P): Likewise.
4248 (dfs_walk_real): Declare.
4249 * class.c (build_vbase_pointer_fields): Check
4250 vbase_offsets_in_vtable_p.
4251 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
4253 (build_vbase_offset_vtbl_entries): Simplify.
4254 (build_vbase_offset_vtbl_entries): Adjust.
4255 (build_vbase_pointer): Add ability to look up vbase offsets in
4257 (start_vtable): New function.
4258 (add_virtual_function): Use it.
4259 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
4260 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
4261 (build_vtbl_initializer): Take the type of the complete object as
4262 input. Use it to correctly calculate vbase offsets.
4263 (dfs_finish_vtbls): Pass the complete type to
4264 build_vtbl_initializer.
4265 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
4266 (create_vtable_ptr): Create a vtable even if there are no
4267 new virtual functions, under the new ABI.
4268 (finish_struct_1): Likewise.
4269 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
4270 * decl.c (exapnd_static_init): Remove call to
4271 preserve_initializer.
4272 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
4274 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
4275 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
4276 (construct_virtual_bases): Don't initialize virtual base pointers
4278 (build_aggr_init): Clean up comment.
4279 (expand_aggr_init_1): Likewise.
4280 * rtti.c (expand_class_desc): Store the virtual function table
4281 index where the vbase offset lives in the offset field.
4282 * search.c (dfs_walk_real): Make it global.
4283 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
4284 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
4286 * tinfo.h (USItype): Make it signed under the new ABI.
4287 * tinfo.cc (convert_to_base): New function. Encapsulate base
4288 conversion logic here.
4289 (__class_type_info::do_upcast): Use it.
4290 (__class_type_info::do_dyncast): Likewise.
4291 (__class_type_info::do_find_public_subobj): Likewise.
4293 * init.c (construct_virtual_bases): Don't look up the addresses of
4294 virtual bases at run-time.
4296 * class.c (build_vbase_pointer): Relocate.
4297 (build_vbase_pointer_fields): Likewise.
4298 (dfs_build_vbase_offset_vtbl_entries): Likewise.
4299 (build_vbase_offset_vtbl_entries): Likewise.
4301 * decl.c (init_decl_processing): Complain if -fnew-abi
4302 -fno-vtable-thunks is used.
4304 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
4307 2000-01-15 Mark Mitchell <mark@codesourcery.com>
4309 * cp-tree.h (num_extra_vtbl_entries): New function.
4310 (size_extra_vtbl_entries): Likewise.
4311 (dfs_vtable_path_unmark): Likewise.
4312 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
4313 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
4314 * class.c (num_extra_vtbl_entries): New function.
4315 (size_extra_vtbl_entries): Likewise.
4316 (dfs_build_vbase_offset_vtbl_entries): New function.
4317 (build_vbase_offset_vtbl_entries): Likewise.
4318 (build_vtbl_initializer): Use it.
4319 (finish_struct_1): Adjust vtable sizes (using
4320 num_extra_vtbl_entries).
4321 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
4322 THUNK_DECL is non-NULL before expanding it.
4323 * init.c (expand_virtual_init): Adjust the vtable pointer by
4324 size_extra_vtbl_entries before storing it.
4325 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
4326 Handle TREE_LIST parameters here, not in the dfs_* functions.
4327 (dfs_unmarked_real_bases_queue_p): Adjust.
4328 (dfs_marked_real_bases_queue_p): Likewise.
4329 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
4330 (dfs_vtable_path_marked_real_bases_queue_p): New function.
4331 (dfs_vtable_path_unmark): Likewise.
4333 2000-01-14 Mark Mitchell <mark@codesourcery.com>
4335 * optimize.c (copy_body_r): Clear the operand three of a
4336 TARGET_EXPR when copying it.
4338 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4340 * method.c (build_decl_overload_real): Check whether we are in ::
4341 before returning __builtin_new/delete.
4343 2000-01-13 Mark Mitchell <mark@codesourcery.com>
4345 * pt.c (tsubst_friend_function): Improve comment.
4346 (instantiate_decl): Avoid crashing when a "nested" function is
4347 instantiated from the top level.
4349 * dump.c (dqeueue_and_dump): Dump
4350 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
4352 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4354 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
4356 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
4358 * g++spec.c (lang_specific_driver): Add -fnew-abi if
4359 ENABLE_NEW_GXX_ABI defined.
4360 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
4361 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
4362 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
4364 2000-01-12 Mark Mitchell <mark@codesourcery.com>
4366 * decl.c (start_cleanup_fn): Call pushdecl.
4368 * call.c (convert_class_to_reference): Fix typos.
4369 (build_conditional_expr): Handle errors gracefully.
4370 * class.c (push_nested_class): Likewise.
4371 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
4372 (DECL_THIS_EXTERN): Use it.
4373 (DECL_THIS_STATIC): Likewise.
4374 * cvt.c (convert_to_void): Handle errors gracefully.
4375 (build_expr_type_conversion): Likewise.
4376 * decl.c (maybe_push_decl): Likewise.
4377 (start_decl_1): Likewise.
4378 (require_complete_types_for_parms): Likewise.
4379 * parse.y (structsp): Likewise.
4380 (base_class): Likewise.
4381 * parse.c: Regenerated.
4382 * pt.c (finish_member_template_decl): Likewise.
4383 * typeck.c (decay_conversion): Likewise.
4385 * cp-tree.h (dfs_skip_vbases): New function.
4386 (find_vbase_instance): Likewise.
4387 * class.c (determine_primary_base): Allow a nearly empty base to
4388 serve as a primary base class under the new ABI.
4389 (get_class_offset_1): Rename to ...
4390 (dfs_get_class_offset): ... this. Simplify. Don't issue error
4392 (get_class_offset): Use it. Issue error messages here.
4393 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
4394 find the right copies of virtual bases.
4395 (fixup_vtable_deltas1): Rename to ...
4396 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
4397 bases as primary bases.
4398 (fixup_vtable_deltas): Remove.
4399 (override_one_vtable): Handle virtual bases as primary bases.
4400 (merge_overrides): Likewise.
4401 (finish_struct_1): Likewise.
4402 (dump_class_hierarchy): Dump primary-ness of bases as well.
4403 * search.c (mark_primary_bases): Use a pre-order traversal to
4404 handle primary virtual bases.
4405 (dfs_skip_vbases): New fiunction.
4406 (expand_upcast_fixups): Adjust to handle primary virtual bases.
4407 (fixup_virtual_upcast_offsets): Likewise.
4408 (fixup_all_virtual_upcast_offsets): Likewise.
4409 (dfs_find_vbase_instances): New function.
4410 (find_vbase_instance): Likewise.
4412 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
4414 * lex.c (DIR_SEPARATOR): Delete macro.
4416 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
4418 * decl2.c (lang_decode_option): Handle automatic line wrapping
4421 2000-01-11 Mark Mitchell <mark@codesourcery.com>
4423 * friend.c (do_friend): Don't resolve scopes when processing
4424 template declarations, even if the qualifying scope doesn't
4425 involve template parameters.
4427 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
4429 * class.c (dfs_modify_vtables_queue_p): Remove.
4430 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
4431 and dfs_marked_real_bases_queue_p instead of
4432 dfs_modify_vtables_queue_p.
4434 * class.c (build_vbase_path): Simplify.
4435 (dfs_propagate_binfo_offsets): New function.
4436 (propagate_binfo_offsets): Use it.
4437 (remove_base_field): Simplify.
4438 (dfs_set_offset_for_vbases): Remove.
4439 (dfs_set_offset_for_shared_vbases): New function.
4440 (dfs_set_offset_for_unshared_vbases): Likewise.
4441 (layout_virtual_bases): Use them.
4442 (layout_basetypes): Don't call propagate_binfo_offsets.
4443 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
4446 * class.c (build_base_field): New function, split out from ...
4447 (build_base_fields): ... here. Use it. Allocate primary bases
4448 first, under the new ABI.
4449 (get_vtable_entry): Remove.
4450 (remove_base_field): New function, split out from ...
4451 (remove_base_fields): ... here. Adjust since primary bases come
4452 first under the new ABI.
4454 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
4455 (initialize_vtbl_ptrs): New function.
4456 (expand_indirect_vtbls_init): Change prototype.
4457 (convert_pointer_to_vbase): Declare.
4458 * init.c (expand_direct_vtbls_init): Remove.
4459 (dfs_initialize_vtbl_ptrs): New function.
4460 (initialize_vtbl_ptrs): Likewise.
4461 (emit_base_init): Use initialize_vtbl_ptrs.
4462 * search.c (convert_pointer_to_vbase): Make it global.
4463 (expand_indirect_vtbls_init): Remove vtable initialization code.
4464 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
4466 * class.c (dfs_finish_vtbls): New function.
4467 (finish_vtbls): Use it.
4468 (dump_class_hierarchy): New function.
4470 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
4471 (BINFO_VBASE_PRIMARY_P): New macro.
4472 (BINFO_VIRTUALS): Add to documentation.
4473 (SET_BINFO_PRIMARY_MARKED_P): Remove.
4474 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
4475 (dfs_mark_primary_bases_queue_p): Likewise.
4476 (dfs_unmarked_real_bases_queue_p): New function.
4477 (dfs_marked_real_bases_queue_p): Likewise.
4478 * search.c (dfs_mark_primary_bases): Adjust.
4479 (mark_primary_bases): Likewise.
4480 (get_shared_vbase_if_not_primary): New function.
4481 (dfs_unmarked_real_bases_queue_p): Likewise.
4482 (dfs_marked_real_bases_queue_p): Likewise.
4483 (dfs_get_pure_virtuals): Simplify.
4484 (get_pure_virtuals): Likewise.
4486 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4488 * lex.c: Include tm_p.h.
4490 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
4492 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
4494 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
4496 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
4497 * pt.c (instantiate_decl): Defer comdat templates that might not be
4500 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
4501 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
4502 (finish_file): Likewise.
4504 * decl2.c (import_export_class): Undo 12/14 change.
4506 * error.c (dump_decl): operator new, not operatornew.
4508 * class.c (field_decl_cmp): A nontype is "greater" than a type.
4509 * search.c (lookup_field_1): Look for the last field with the
4512 2000-01-05 Nathan Sidwell <nathan@acm.org>
4514 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
4517 2000-01-05 Nathan Sidwell <nathan@acm.org>
4519 * typeck.c (build_static_cast): Don't strip target qualifiers
4520 when casting from a class.
4522 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4524 * class.c (warn_hidden): Initialize variable `fndecl'.
4526 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
4528 * decl.c (flag_isoc9x): New variable to be able to use code in
4529 c-common.c. For now always zero.
4531 2000-01-03 Mark Mitchell <mark@codesourcery.com>
4533 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
4534 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
4535 or unshare_base_binfos for virtual bases here.
4536 * search.c (dfs_get_vbase_types): Do it here.
4537 (get_vbase_types): Adjust.
4539 2000-01-02 Mark Mitchell <mark@codesourcery.com>
4541 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
4542 (BINFO_PRIMARY_MARKED_P): Use flag 5.
4543 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
4544 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
4545 (unmark_primary_bases): Remove declaration.
4546 (unmarkedp): Declare.
4547 (dfs_vbase_unmark): Likewise.
4548 * class.c (determine_primary_base): Return immediately if there
4549 are no base classes. Call mark_primary_bases here.
4550 (modify_all_direct_vtables): Remove.
4551 (modify_all_indirect_vtables): Remove.
4552 (dfs_modify_vtables_queue_p): New function.
4553 (dfs_modify_vtables): New function.
4554 (modify_all_vtables): Use them.
4555 (build_base_fields): Build FIELD_DECLs for primary virtual base
4557 (create_vtable_ptr): Don't call determine_primary_base here.
4558 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
4559 (dfs_set_offset_for_vbases): ... this.
4560 (layout_virtual_bases): Use it.
4561 (layout_class_type): Call determine_primary_base here.
4562 * search.c (unmarkedp): Make it global.
4563 (shared_marked_p): Simplify.
4564 (shared_unmarked_p): Likewise.
4565 (dfs_primary_bases_queue_p): Remove.
4566 (dfs_unmark_primary_bases): Likewise.
4567 (unmark_primary_bases): Likewise.
4568 (mark_primary_bases): Simplify.
4569 (get_pure_virtuals): Don't call mark_primary_bases here.
4570 (dfs_vbase_unmark): New function.
4571 (get_vbase_types): Simplify.
4573 * class.c (struct base_info): Remove.
4574 (determine_primary_base): Take has_virtual_p rather than a
4575 base_info as input. Don't calculate max_has_virtual.
4576 (finish_struct_bits): Remove max_has_virtual argument.
4577 (create_vtable_ptr): Remove max_has_virtual_p argument.
4578 (layout_virtual_bases): Remove max argument.
4579 (layout_basetypes): Likewise.
4580 (layout_class_type): Remove max_has_virtual_p argument.
4581 (finish_struct_1): Remove max_has_virtual.
4583 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
4584 (layout_basetypes): Remove.
4585 * class.c (propagate_binfo_offsets): Moved here from tree.c.
4586 Update to handle primary virtual bases.
4587 (remove_base_fields): New function, split out from
4589 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
4590 (layout_virtual_bases): New function, split out from
4591 layout_basetypes. Update to handle primary virtual bases.
4592 (layout_basetypes): Moved here from tree.c. Use
4593 remove_base_fields and layout_virtual_bases.
4594 * search.c (dfs_mark_primary_bases_queue_p): New function.
4595 (mark_primary_bases): Use it.
4596 * tree.c (CEIL): Remove.
4597 (propagate_binfo_offsets): Remove.
4598 (layout_basetypes): Remove.
4600 2000-01-01 Mark Mitchell <mark@codesourcery.com>
4602 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
4603 (BINFO_PRIMARY_MARKED_P): New macro.
4604 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
4605 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
4606 (mark_primary_bases): New function.
4607 (unmark_primary_bases): Likewise.
4608 * search.c (get_abstract_virtuals_1): Remove.
4609 (dfs_mark_primary_bases): New function.
4610 (mark_primary_bases): Likewise.
4611 (dfs_unmark_primary_bases): Likewise.
4612 (unmark_primary_bases): Likewise.
4613 (dfs_get_pure_virtuals): Likewise.
4615 2000-01-01 Mark Mitchell <mark@codesourcery.com>
4617 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
4618 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
4619 (modify_one_vtable): Adjust.
4620 (fixup_vtable_deltas1): Likewise.
4621 (override_one_vtable): Likewise.
4622 * search.c (get_abstract_virtuals_1): Likewise.
4623 (get_pure_virtuals): Likewise.
4624 (expand_upcast_fixups): Likewise.
4625 * tree.c (debug_binfo): Likewise.
4627 * class.c (build_vtable): Don't return a value. Don't rebuild
4628 vtables for bases that have already been handled.
4629 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
4630 already been handled.
4631 (modify_one_vtable): Adjust accordingly.
4632 (fixup_vtable_deltas1): Likewise.
4633 (finish_struct_1): Likewise.
4635 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4637 * call.c (build_new_method_call): Also check destructors.
4639 1999-12-31 Mark Mitchell <mark@codesourcery.com>
4641 * cp-tree.h (VF_NORMAL_VALUE): Remove.
4642 * class.c (struct base_info): Remove vfield, vfields, and rtti.
4643 (set_primary_base): New function, split out from ...
4644 (finish_base_struct): ... here. Rename to ...
4645 (determine_primary_base): ... this. Simplify.
4646 (create_vtable_ptr): Tweak accordingly.
4647 (finish_struct_1): Simplify.
4649 * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
4650 (CLASSTYPE_N_BASECLASSES): Likewise.
4651 (BINFO_FOR_VBASE): New macro.
4652 (get_vbase_types): Change prototype.
4653 * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
4654 (prepare_fresh_vtable): Likewise.
4655 (finish_vtbls): Likewise.
4656 (get_class_offset_1): Likewise.
4657 (modify_all_indirect_vtables): Likewise.
4658 (build_vbase_pointer_fields): Likewise.
4659 * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
4660 * init.c (sort_base_init): Use BINFO_FOR_VBASE.
4661 (expand_member_init): Likewise.
4662 * search.c (get_base_distance): Likewise.
4663 (lookup_field_queue_p): Likewise.
4664 (virtual_context): Likewise.
4665 (get_vbase_types): Don't return a value. Set
4666 CLASSTYPE_VBASECLASSES here.
4667 * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
4669 1999-12-30 Mark Mitchell <mark@codesourcery.com>
4671 * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
4673 1999-12-29 Mark Mitchell <mark@codesourcery.com>
4675 * class.c (create_vtable_ptr): Put the vtable at the beginning of
4676 the class, not the end, in the new ABI.
4677 * tree.c (propagate_binfo_offsets): Do the right thing for the new
4680 1999-12-29 Mark Mitchell <mark@codesourcery.com>
4682 * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy.
4683 (CLASSTYPE_NEARLY_EMPTY_P): New macro.
4684 * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
4685 (check_field_decls): Likewise.
4686 (check_bases_and_members): Likewise.
4688 1999-12-28 Mark Mitchell <mark@codesourcery.com>
4690 * cp-tree.h (do_inline_function_hair): Remove.
4691 * class.c (layout_class_type): New function, split out from
4693 (fixup_pending_inline): Likewise.
4694 (fixup_inline_methods): New function.
4695 * method.c (fixup_pending_inline): Remove.
4696 (do_inline_function_hair): Likewise.
4698 * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
4701 * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
4702 (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
4703 (CLASSTYPE_PURE_VIRTUALS): ... this.
4704 (lang_decl_flags): Replace abstract_virtual with pure_virtual.
4705 (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
4706 (DECL_PURE_VIRTUAL_P): ... this.
4707 (get_abstract_virtuals): Rename to ...
4708 (get_pure_virtuals): ... this.
4709 * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
4710 DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with
4711 CLASSTYPE_PURE_VIRTUALS.
4712 * class.c (build_vtable_entry): Likewise.
4713 (finish_struct_bits): Likewise. Call get_pure_virtuals, not
4714 get_abstract_virtuals.
4715 (build_vtbl_initializer): Likewise.
4716 (override_one_vtable): Likewise.
4717 (check_methods): Likewise.
4718 * decl.c (duplicate_decls): Likewise.
4719 (redeclaration_error_message): Likewise.
4720 (lang_mark_tree): Likewise.
4721 * decl2.c (grok_function_init): Likewise.
4722 (import_export_vtable): Likewise.
4723 (import_expor_class): Likewise.
4724 * typeck2.c (abstract_virtuals_error): Likewise.
4725 * xref.c (GNU_xref_member): Likewise.
4726 * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
4728 1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
4730 * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
4733 1999-12-26 Mark Mitchell <mark@codesourcery.com>
4735 * decl.c (store_return_init): Use mode of old RTL generated for
4736 DECL_RESULT, not the mode of DECL_RESULT itself.
4737 * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
4738 for functions that used named return values.
4740 1999-12-24 Mark Mitchell <mark@codesourcery.com>
4742 * semantics.c (expand_body): Use
4743 note_deferral_of_defined_inline_function.
4745 1999-12-22 Mark Mitchell <mark@codesourcery.com>
4747 * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
4749 1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
4751 * error.c (dump_decl): Support named return values.
4753 1999-12-20 Mark Mitchell <mark@codesourcery.com>
4755 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
4756 (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
4757 (CLASSTYPE_PRIMARY_BINFO): Likewise.
4758 * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
4759 TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
4760 (check_bases_and_members): Set them here instead.
4761 (create_vtable_ptr): New function, split out from ...
4762 (finish_struct_1): ... here. Use it. Tidy. Use
4763 CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
4764 * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
4765 the first field in the class.
4766 * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle
4767 seeing TYPE_VFIELD as the first field in the class.
4769 * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
4770 (TYPE_POLYMORPHIC_P): ... this.
4771 (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
4772 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
4773 (TREE_CALLS_NEW): Remove.
4774 (TREE_MANGLED): Likewise.
4775 * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
4776 and TYPE_POLYMORPHIC_P.
4777 * class.c (check_bases): Likewise.
4778 (finish_base_struct): Likewise.
4779 (finish_struct_bits): Likewise.
4780 (check_for_override): Likewise.
4781 (finish_struct_1): Likewise.
4782 (get_vfield_name): Likewise.
4783 * decl.c (xref_basetypes): Likewise.
4784 * decl2.c (import_export_class): Likewise.
4785 (import_export_decl): Likewise.
4786 * error.c (dump_function_decl): Likewise.
4787 * pt.c (instantiate_class_template): Likewise.
4788 * repo.c (repo_inline_used): Likewise.
4789 * rtti.c (build_headof): Likewise.
4790 (get_tinfo_fn_dynamic): Likewise.
4791 (build_x_typeid): Likewise.
4792 (get_tinfo_var): Likewise.
4793 (build_dynamic_cast_1): Likewise.
4794 (synthesize_tinfo_fn): Likewise.
4795 * search.c (lookup_field_1): Likewise.
4796 (dfs_debug_mark): Likewise.
4797 (maybe_suppress_debug_info): Likewise.
4798 * typeck.c (build_component_ref): Likewise.
4799 (build_component_addr): Likewise.
4800 * typeck2.c (process_init_constructor): Likewise.
4802 1999-12-20 Nathan Sidwell <nathan@acm.org>
4804 * typeck.c (strip_all_pointer_quals): New static function.
4805 (build_static_cast): Use it. Don't use at_least_as_qualified_p.
4807 1999-12-16 Mark Mitchell <mark@codesourcery.com>
4809 * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
4810 (dso_handle_node): New macro.
4811 (flag_use_cxa_atexit): New variable.
4812 (declare_global_var): New function.
4813 (start_anon_func): Remove declaration.
4814 (end_anon_func): Likewise.
4815 * decl.c (get_atexit_node): New function, split out from
4816 destroy_local_static. Handle flag_use_cxa_atexit.
4817 (get_dso_handle_node): Likewise.
4818 (start_cleanup_fn): Renamed from start_anon_func. Moved here from
4819 except.c. Handle flag_use_cxa_atexit.
4820 (end_cleanup_fn): Renamed from end_anon_func. Moved here from
4822 (declare_global_var): New variable.
4823 (destroy_local_static): Handle flag_use_cxa_atexit.
4824 * decl2.c (flag_use_cxa_atexit): New variable.
4825 (lang_f_options): Likewise.
4826 * except.c (start_anon_func): Remove.
4827 (end_anon_func): Liekwise.
4828 * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
4829 * rtti.c (get_tinfo_var): Use declare_global_var.
4831 1999-12-16 Mark Mitchell <mark@codesourcery.com>
4833 * class.c (check_field_decls): Don't return a value.
4834 (avoid_overlap): Moved here from tree.c.
4835 (build_base_fields): Likewise.
4836 (check_bases): New function, split out from finish_base_struct.
4837 (check_bases_and_members): New function, split out from
4839 (struct base_info): Remove cant_have_default_ctor,
4840 cant_have_const_ctor, cant_have_asn_ref.
4841 (finish_base_struct): Split semantic analysis into check_bases.
4842 (finish_struct_methods): Fix bogus assertion.
4843 (check_field_decls): Call finish_struct_anon here.
4844 (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
4845 (finish_struct_1): Use check_bases_and_members. Reorganize.
4846 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
4847 (build_base_fields): Don't declare.
4848 * tree.c (avoid_overlap): Remove.
4849 (build_base_fields): Likewise.
4851 * optimize.c (struct inline_data): Remove scope_stmt.
4852 (remap_block): Don't use insert_block_after_note. Don't update
4854 (expand_call_inline): Don't update scope_stmt.
4855 (optimize_function): Don't initialize scope_stmt.
4856 * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
4857 NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
4859 1999-12-15 Mark Mitchell <mark@codesourcery.com>
4861 * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
4862 out of the class, rather than taking them as parameters.
4863 (build_vbase_pointer_fields): Move here from tree.c.
4864 (build_vtbl_or_vbase_field): New function.
4865 (check_methods): Likewise.
4866 (remove_zero_width_bitfields): Likewise.
4867 (add_virtual_function): Use tree_cons instead of temp_tree_cons.
4868 (delete_duplicate_fields_1): Tidy. Don't delete duplicate
4870 (finish_struct_methods): Handle the case where there are no
4872 (get_basefndecls): Use tree_cons instead of temp_tree_cons.
4873 (check_field_decls): Call delete_duplicate_fields here.
4874 (finish_struct_1): Tidy. Use check_methods and
4875 remove_zero_width_bitfields.
4876 * cp-tree.h (build_vbase_pointer_fields): Remove.
4877 * decl.c (grokdeclarator): Use tree_cons instead of
4879 * decl2.c (qualified_lookup_using_namespace): Use tree_cons
4880 instead of temp_tree_cons.
4881 * lex.c (cons_up_default_function): Remove dead code.
4882 * method.c (fixup_pending_inline): New function, split out from ...
4883 (do_inline_function_hair): ... here.
4884 * tree.c (build_vbase_pointer_fields): Remove.
4886 1999-12-15 Jason Merrill <jason@casey.cygnus.com>
4888 * tree.c (walk_tree): Walk operand subtrees in forward order.
4889 * optimize.c (expand_call_inline): Likewise.
4890 (optimize_function): Initialize id->scope_stmt to something useful.
4891 (remap_block): Assume id->scope_stmt has a useful value.
4893 1999-12-15 Nathan Sidwell <nathan@acm.org>
4895 * typeck.c (build_c_cast): Expand warning message. Move pointer
4896 alignment warning to after the cast. Don't warn about pointer
4897 alignment when given a pointer to incomplete.
4899 1999-12-15 Richard Henderson <rth@cygnus.com>
4901 * cp-tree.h (make_aggr_type): Declare.
4902 * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
4903 (make_aggr_type): New.
4905 * decl.c (build_typename_type, init_decl_processing): Use it.
4906 (build_ptrmemfunc_type, xref_tag): Likewise.
4907 * except.c (call_eh_info): Likewise.
4908 * init.c (init_init_processing): Likewise.
4909 * pt.c (process_template_parm, lookup_template_class): Likewise.
4910 * rtti.c (expand_class_desc): Likewise.
4911 * semantics.c (begin_class_definition, finish_typeof): Likewise.
4912 * tree.c (copy_template_template_parm): Likewise.
4914 1999-12-15 Jason Merrill <jason@yorick.cygnus.com>
4916 * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
4917 sizeof (struct tree_common).
4919 1999-12-14 Jason Merrill <jason@casey.cygnus.com>
4921 * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
4922 outermost block to point to the inlined function decl.
4924 * error.c (dump_decl): operator==, not operator ==.
4925 (op_to_string): Likewise.
4927 * decl.c (compute_array_index_type): Handle null name.
4929 * decl2.c (ambiguous_decl): Fix to match comment.
4930 (lookup_using_namespace): Adjust.
4932 * decl2.c (import_export_class): Don't ignore dllimport.
4934 1999-12-14 Mark Mitchell <mark@codesourcery.com>
4936 * class.c (check_field_decls): Split out from ...
4937 (finish_struct_1): ... here. Use it. Tidy.
4939 * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
4940 * optimize.c (copy_body_r): Pass it.
4941 * tree.c (remap_save_expr): Clear walk_subtrees for an
4942 already-handled SAVE_EXPR.
4943 (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
4945 * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
4946 * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
4948 * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
4950 1999-12-14 Mumit Khan <khan@xraylith.wisc.edu>
4952 * class.c (finish_base_struct): Allow multiple COM base classes
4953 as well as non-COM bases as long as it's not the leftmost.
4955 1999-12-13 Mumit Khan <khan@xraylith.wisc.edu>
4957 * lex.c (saving_parse_to_obstack): New global.
4958 (reinit_parse_for_block): Use.
4959 (reinit_parse_for_expr): Use.
4960 (check_newline): Use.
4962 1999-12-13 Mark Mitchell <mark@codesourcery.com>
4964 * optimize.c (initialize_inlined_parameters): Take FN to which the
4965 parameters belong as an argument.
4966 (expand_call_inline): Expand calls into the parameter
4967 initializations before pushing the function onto the list of
4968 functions we are presently expanding.
4970 1999-12-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4972 * class.c (get_vtable_name): Use a literal format string and
4973 VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
4974 (prepare_fresh_vtable): Likewise.
4976 * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
4979 * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
4981 * init.c (build_vec_init): Initialize variable `try_body'.
4983 * lex.c (yyerror): Don't call a variadic function with a
4984 non-literal format string.
4986 * optimize.c (optimize_function): Call memset, not bzero.
4988 * pt.c (for_each_template_parm_r): Add static prototype.
4990 1999-12-09 Andreas Jaeger <aj@suse.de>
4992 * except.c (expand_throw): Add static attribute to match
4995 * Makefile.in (semantics.o): Add dependency on output.h.
4996 * semantics.c: Include output.h for declaration of
4999 1999-12-09 Mark Mitchell <mark@codesourcery.com>
5001 * decl.c (init_decl_processing): Reenable inlining on trees.
5002 (finish_function): Likewise.
5003 * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
5004 * semantics.c (simplify_aggr_init_exprs): New function.
5005 (expand_body): Use it.
5006 * tree.c (walk_tree): Special-case TARGET_EXPRs since they
5007 sometimes present the same sub-tree twice.
5009 * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
5012 * semantics.c (finish_switch_cond): Do conversions here, not ...
5013 * typeck.c (c_expand_start_case): Here.
5015 * semantics.c (do_poplevel): Remove unused variable.
5017 1999-12-06 Mark Mitchell <mark@codesourcery.com>
5019 * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
5020 unless we're declaring the variable in question.
5022 1999-12-06 Mark Mitchell <mark@codesourcery.com>
5024 * decl.c (init_decl_processing): #if 0 last patch.
5025 (finish_function): Likewise.
5027 1999-12-05 Mark Mitchell <mark@codesourcery.com>
5029 * decl.c (init_decl_processing): Set flag_inline_trees if
5032 * cp-tree.h (calls_setjmp_p): Declare.
5033 * decl.c (finish_function): Mark functions that call setjmp as
5035 * optimize.c (calls_setjmp_r): New function.
5036 (calls_setjmp_p): Likewise.
5038 1999-12-04 Mark Mitchell <mark@codesourcery.com>
5040 * optimize.c (expand_call_inline): Wrap the expanded call in an
5041 EXPR_WITH_FILE_LOCATION node to get correct line numbers for
5044 * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add
5045 in_target_cleanup_p.
5046 (remap_decl): New function.
5047 (remap_block): Likewise.
5048 (copy_scope_stmt): Likewise.
5049 (copy_body_r): Use remap_decl and copy_scope_stmt.
5050 (copy_body): Use VARRAY_TOP_TREE.
5051 (initialize_inlined_parameters): Likewise.
5052 (declare_return_variable): Likewise.
5053 (inlinable_function_p): Check flag_inline_trees.
5054 (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
5055 specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the
5056 parameters of the inlined function.
5057 (optimize_function): Prevent recursion into partially complete
5060 * cp-tree.def (SCOPE_STMT): Take one operand.
5061 * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
5062 (SCOPE_NULLIFIED_P): Redefine.
5063 (SCOPE_NO_CLEANUPS_P): New macro.
5064 (add_scope_stmt): Change prototype.
5065 * decl.c (poplevel): Tidy. Warn about unused variables here.
5066 Record SCOPE_STMT_BLOCKs.
5067 (finish_function): Keep DECL_INITIAL for functions that might be
5069 * ir.texi: Document SCOPE_NO_CLEANUPS_P.
5070 * semantics.c: Include rtl.h.
5071 (add_scope_stmt): Return the new scope statement and, for an
5072 end-of-scope statement, its matching begin statement. Don't set
5074 (do_pushlevel): Simplify, now that we are always
5076 (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs.
5077 (expand_stmt): Don't call expand_start_bindings or
5078 expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
5079 * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
5081 * Makefile.in (semantics.o): Depend on RTL_H.
5083 * decl2.c (pending_statics_used): Make it a macro.
5084 (saved_inlines_used): Likewise.
5085 (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
5086 (mark_inline_for_output): Likewise.
5087 (ssdf_decls_used): Remove.
5088 (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
5089 (generate_ctor_or_dtor_function): Adjust accordingly.
5091 1999-11-24 Geoffrey Keating <geoffk@cygnus.com>
5092 Greg McGary <gkm@gnu.org>
5094 * decl.c (duplicate_decls): Merge
5095 DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
5096 DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
5098 1999-12-02 Mike Stump <mrs@wrs.com>
5100 * init.c (perform_member_init): Handle parse errors better.
5102 1999-12-01 Mark Mitchell <mark@codesourcery.com>
5104 * cp-tree.h (min_tree_cons): Remove.
5105 (scratch_ovl_cons): Likewise.
5106 * decl.c (saveable_obstack): Don't declare.
5107 (duplicate_decls): Tweak error-message.
5108 (initialize_local_var): Explicitly mark the definition as static.
5109 (finish_function): Call permanent_allocation, just so
5110 that the middle-end sees the obstacks it expects.
5111 (mark_cp_function_context): Likewise.
5112 * init.c (build_new): Don't use min_tree_cons.
5113 * lex.c (permanent_obstack): Don't declare.
5114 (current_obstack, saveable_obstack): Likewise.
5115 * spew.c (current_obstack, saveable_obstack): Likewise.
5116 * tree.c (current_obstack, saveable_obstack): Likewise.
5117 (scratch_ovl_cons): Remove.
5118 (build_min_nt): Don't mess with obstacks.
5119 (build_min): Likewise.
5120 (min_tree_cons): Remove
5121 * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
5122 (build_x_function_call): Likewise.
5123 (build_c_cast): Don't use min_tree_cons.
5125 1999-11-29 Mark Mitchell <mark@codesourcery.com>
5127 * pt.c (tsubst_decl): Robustify.
5129 1999-11-27 Mark Mitchell <mark@codesourcery.com>
5131 * decl2.c (finish_file): Call expand_body for inline functions
5132 that will be written out but that do not yet have RTL.
5133 * semantics.c (expand_body): Do not generate RTL For inline
5134 functions that do not yet need to be written out.
5136 1999-11-25 Mark Mitchell <mark@codesourcery.com>
5138 * Make-lang.in (CXX_SRCS): Add optimize.c.
5139 * Makefile.in (CXX_OBJS): Add optimize.o.
5140 (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
5141 (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
5142 (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
5143 (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
5144 (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
5146 (optimize.o): New target.
5147 * class.c: Don't include splay-tree.h.
5148 * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
5149 * cp-tree.h: Include splay-tree.h.
5150 (DECL_UNINLINABLE): New macro.
5151 (CTOR_BEGIN_P, CTOR_END_P): New macros.
5152 (flag_inline_trees): New variable.
5153 (local_variable_p): New function.
5154 (nonstatic_local_decl_p): Likewise.
5155 (optimize_function): Likewise.
5156 (cplus_unsave_expr_now): Remove.
5157 (copy_tree_r): Declare.
5158 (remap_save_expr): Likewise.
5159 * decl.c (local_variable_p): Don't
5161 (local_variable_p_walkfn): New function.
5162 (make_rtl_for_local_static): Remove code to try to avoid writing
5163 out static constants.
5164 (emit_local_var): Fix indentation.
5165 (nonstatic_local_decl_p): New function.
5166 (check_default_argument): Use local_variable_p_walkfn, not
5167 local_variable_p, when walking the tree.
5168 (start_function): Set the DECL_CONTEXT for automatically generated
5170 (finish_constructor_body): Use CTOR_STMT to mark the end of a
5172 * decl2.c: Don't include splay-tree.h.
5173 (flag_inline_trees): Define.
5174 * dump.c: Don't include
5176 * except.c (expand_end_catch_block): Fix comment formatting.
5177 (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
5178 (expand_throw): Tidy comment.
5179 * init.c (build_vec_delete_1): Use create_temporary_var.
5180 * lex.c (cplus_tree_code_type): Make it static.
5181 (cplus_tree_code_length): Likewise.
5182 (cplus_tree_code_name): Likewise.
5183 * optimize.c: New file.
5184 * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
5185 with computed gotos.
5186 (setup_vtbl_ptr): Mark the beginnings of constructors with
5188 (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
5189 (expand_body): Call optimize_function. Save bodies if we're doing
5191 * tree.c: Don't include splay-tree.h. Include insn-config.h and
5193 (copy_tree_r): Make it public.
5194 (statement_code_p): New function.
5195 (mark_local_for_remap_r): Likewise.
5196 (cp_usave_r): Likewise.
5197 (cp_unsave): Likewise.
5198 (build_cplus_new): Set DECL_CONTEXT for temporary variables.
5199 (walk_tree): Walk into `s' class nodes. Walk statement chains.
5200 (copy_tree_r): Handle 's' class nodes. Restore chains for
5201 statements. Nullify scopes. Don't copy types.
5202 (init_tree): Set lang_unsave to cp_unsave.
5203 (remap_save_expr): Define.
5204 * ir.texi: Document CTOR_STMT.
5206 1999-11-24 Jason Merrill <jason@casey.cygnus.com>
5208 * search.c (note_debug_info_needed): Do perform this optimization
5210 (maybe_suppress_debug_info): Likewise. Start by clearing
5211 TYPE_DECL_SUPPRESS_DEBUG.
5213 1999-11-24 Mark Mitchell <mark@codesourcery.com>
5215 * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
5217 * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
5219 1999-11-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5221 * decl.c (pushdecl, grokdeclarator): Don't call a variadic
5222 function with a non-literal format string.
5224 * lex.c (do_identifier): Likewise.
5226 * typeck.c (build_unary_op): Likewise.
5228 1999-11-23 Mark Mitchell <mark@codesourcery.com>
5230 * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
5232 1999-11-22 Mark Mitchell <mark@codesourcery.com>
5234 * cp-tree.def (CTOR_COMPLETE): New tree node.
5235 * decl.c (finish_constructor_body): Add it, to mark the end of the
5237 (finish_function): Don't call end_protect_partials here.
5238 * ir.texi (CTOR_COMPLETE): Document it.
5239 * semantics.c (expand_stmt): Handle it.
5241 * cp-tree.def (FUNCTION_NAME): New tree node.
5242 * cp-tree.h (current_function_name_declared): Tweak documentation.
5243 (lang_decl_flags): Add pretty_function_p, adjust dummy.
5244 (DECL_PRETTY_FUNCTION_P): New macro.
5245 * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
5246 etc., in a template function. Use at_function_scope_p instead of
5247 expanding it inline.
5248 * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
5250 (tsubst): Handle FUNCTION_NAME.
5251 (tsubst_copy): Likewise.
5252 (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
5253 etc. in instantiation.
5254 * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
5255 even in template functions.
5256 (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
5257 conditional scope at the top of a destructor.
5259 * error.c (dump_function_decl): Use `[ with ... ]' syntax for
5260 specializations too.
5262 1999-11-22 Nathan Sidwell <nathan@acm.org>
5264 * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
5265 when actually negative.
5267 * typeck.c (convert_for_assignment): Expand comment about
5268 strange NULL check, moved from ...
5269 (convert_for_initialization): ... here. Remove unneeded
5272 1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
5274 * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
5275 * init.c (build_vec_delete, build_vec_delete_1): Likewise.
5276 Always destruct virtual bases of array components, but never
5278 (build_vec_init): Adjust invocations.
5279 (build_delete): Likewise.
5280 * decl2.c (delete_sanity): Likewise.
5282 1999-11-19 Nathan Sidwell <nathan@acm.org>
5284 * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
5285 * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
5286 * decl2.c (grok_method_quals): Accept `restrict' as applying to
5287 the object pointer. Return such qualifiers.
5288 (grokclassfn): Apply this pointer qualifiers. Cleanup unused
5291 1999-11-18 Mark Mitchell <mark@codesourcery.com>
5293 * except.c (expand_end_catch_block): Fix typo.
5294 (expand_exception_blocks): Simplify. Don't call
5295 expand_leftover_cleanups.
5297 1999-11-15 Jason Merrill <jason@casey.cygnus.com>
5299 * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
5300 * pt.c (tsubst, case INTEGER_TYPE): Call it.
5301 Check uses_template_parms.
5303 * class.c (finish_struct): If we're a local class in a template
5304 function, add a TAG_DEFN.
5305 * pt.c (lookup_template_class): If this is a local class in a
5306 template function, call pushtag.
5307 (tsubst_expr, case TAG_DEFN): Handle classes, too.
5309 Emit debug info with the vtable.
5310 * search.c (maybe_suppress_debug_info): New function...
5311 * class.c (finish_struct_1): ...split out from here.
5312 * cp-tree.h: Declare it.
5313 * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
5314 if we're writing out the vtable.
5315 * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
5316 note_debug_info_needed): #if 0 out.
5318 1999-11-14 Mark Mitchell <mark@codesourcery.com>
5320 * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
5321 * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
5323 * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
5324 * decl2.c (lookup_arg_dependent): Use it.
5326 * cp-tree.h (cp_finish_decl): Change prototype.
5327 (finish_static_data_member_decl): Likewise.
5328 (push_permanent_obstack): Remove declaration.
5329 (push_expression_obstack): Likewise.
5330 (push_scratch_obstack): Likewise.
5331 (DECL_TEMPLATE_PARM_P): Robustify.
5332 (SET_DECL_TEMPLATE_PARM_P): New macro.
5333 * class.c (add_method): Don't manipulate obstacks.
5334 (finish_vtbls): Likewise.
5335 * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
5336 * decl.c (binding_for_name): Don't manipulate obstacks.
5337 (maybe_push_to_top_level): Likewise.
5338 (pop_from_top_level): Likewise.
5339 (duplicate_decls): Likewise.
5340 (pushdecl): Likewise.
5341 (implicitly_declare): Likewise.
5342 (build_typename_type): Likewise.
5343 (start_decl): Likewise.
5344 (cp_finish_decl): Likewise.
5345 (finish_decl): Likewise.
5346 (destroy_local_static): Likewise.
5347 (expand_static_init): Likewise.
5348 (complete_array_type): Likewise.
5349 (grokvardecl): Likewise.
5350 (build_ptrmemfnc_type): Likewise.
5351 (grokdeclarator): Likewise.
5352 (xref_tag): Likewise.
5353 (xref_basetypes): Likewise.
5354 (start_enum): Likewise.
5355 (finish_enum): Likewise.
5356 (start_function): Likewise.
5357 (finish_function): Likewise.
5358 (start_method): Adjust call to cp_finish_decl.
5359 * decl2.c (finish_static_data_member_decl): Don't manipulate
5361 (grokfield): Likewise.
5362 (grokbitfield): Likewise.
5363 (get_temp_name): Likewise.
5364 (get_sentry): Likewise.
5365 (fnish_file): Likewise.
5366 (lookup_arg_dependent): Likewise.
5367 * except.c (call_eh_info): Likewise.
5368 (push_eh_info): Likewise.
5369 (do_pop_exception): Likewise.
5370 (initialize_handler_parm): Likewise.
5371 (expand_end_eh_spec): Likewise.
5372 (alloc_eh_object): Likewise.
5373 (expand_throw): Likewise.
5374 * expr.c (extract_scalar_init): Likewise.
5375 * init.c (build_java_class_ref): Likewise.
5376 * lex.c (get_time_identifier): Likewise.
5377 (snarf_defarg): Likewise.
5378 (add_defarg_fn): Likewise.
5379 (is_global): Simplify.
5380 (do_identifier): Don't check TREE_PERMANENT.
5381 * method.c (emit_thunk): Don't manipulate obstacks.
5382 * parse.y (condition): Adjust call to cp_finish_decl.
5383 (primary): Likewise.
5384 (initdcl): Likewise.
5385 (initdcl0_innards): Likewise.
5386 (nomods_initdcl0): Likewise.
5387 * pt.c (push_inline_template_parms_recursive): Use
5388 SET_DECL_TEMPLATE_PARM_P.
5389 (process_template_parm): Likewise.
5390 (lookup_template_class): Don't manipulate obstacks.
5391 (instantiate_class_template): Adjust call to
5392 finish_static_data_member_decl.
5393 (tsubst_decl): Don't manipulate obstacks.
5394 (tsubst_expr): Likewise.
5395 (instantiate_template): Likewise.
5396 (instantiate_decl): Adjust calls to cp_finish_decl.
5397 * rtti.c (call_void_fn): Don't manipulate obstacks.
5398 (get_tinfo_var): Likewise.
5399 (get_tinfo_fn_unused): Likewise.
5400 (build_dynamic_cast_1): Likewise.
5401 (expand_si_desc): Likewise.
5402 (expand_class_desc): Likewise.
5403 (expand_ptr_desc): Likewise.
5404 (expand_attr_desc): Likewise.
5405 (expand_generic_desc): Likewise.
5406 (synthesize_tinfo_fn): Likewise.
5407 * search.c (expand_upcast_fixups): Likewise.
5408 * semantics.c (finish_asm_stmt): Likewise.
5409 (finish_named_return_value): Likewise.
5410 (begin_class_definition): Likewise.
5411 (finish_class_definition): Likewise.
5412 (finish_typeof): Likewise.
5413 * tree.c (build_cplus_method_type): Likewise.
5414 (reverse_path): Likewise.
5415 (copy_template_template_parm): Likewise.
5416 (build_expr_ptr_wrapper): Likewise.
5417 (push_expression_obstack): Remove.
5418 (push_permanent_obstack): Likewise.
5419 * typeck.c (mark_addressable): Likewise.
5421 1999-11-13 Mark Mitchell <mark@codesourcery.com>
5423 * call.c (build_conditional_expr): Use build_target_expr_with_type.
5424 (convert_like): Likewise.
5425 (build_over_call): Likewise.
5426 * cp-tree.h (build_target_expr): Remove.
5427 (build_target_expr_with_type): New function.
5428 * cvt.c (build_up_reference): Use get_target_expr.
5429 * decl.c (build_target_expr): Move to ...
5430 * tree.c (build_target_expr): Here. Make it static.
5431 (build_target_expr_with_type): New function. Set DECL_CONTEXT on
5432 the temporary VAR_DECLs.
5433 (get_target_expr): Use it.
5435 1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
5437 * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
5438 * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
5439 * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
5440 * class.c (set_rtti_entry): Use it.
5442 1999-11-12 Mark Mitchell <mark@codesourcery.com>
5444 * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
5446 * semantics.c (finish_expr_stmt): Call it here instead. Move
5447 default_conversion logic to semantic-analysis time.
5449 1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
5451 * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
5453 Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com>
5455 * init.c (init_init_processing): Re-instated Nov 11 patch after
5458 Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com>
5460 * init.c (init_init_processing): Undo patch from Nov 11, 1999.
5461 Patch had not been approved yet.
5463 1999-11-12 Mark Mitchell <mark@codesourcery.com>
5465 * decl.c (compute_array_index_type): New function, split out from
5467 (create_array_type_for_decl): Likewise.
5468 (grokdeclarator): Use them.
5470 * semantics.c (expand_stmt): Don't suspend_momentary or
5473 Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
5475 * init.c (init_init_processing): Header information for
5476 arrays allocated via `new' should have the same alignment used by
5479 1999-11-10 Mark Mitchell <mark@codesourcery.com>
5481 * error.c (dump_function_name): Don't crash if given a friend
5482 pseudo-instantiation.
5484 * cp-tree.h (build_enumerator): Change prototype.
5485 * decl.c (enum_next_value): Remove.
5486 (enum_overflow): Likewise.
5487 (init_decl_processing): Don't register enum_next_value as a root.
5488 (start_enum): Clear TYPE_VALUES for a redefined enum.
5489 (finish_enum): Reset the type of enumeration constants.
5490 (build_enumerator): Fix indentation. Don't copy CONST_DECLs when
5491 we don't need to. Maintain the TYPE_VALUES list and look there
5492 for the previously defined enumeration constant. Let enumeration
5493 constants have the type of their values until the enumeration type
5495 * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
5497 * parse.c: Regenerated.
5498 * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
5500 Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
5501 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5503 * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
5505 1999-11-09 Mark Mitchell <mark@codesourcery.com>
5507 * cp-tree.h (language_function): Remove x_last_dtor_insn and
5508 x_last_parm_cleanup_insn.
5509 * decl.c (last_dtor_insn): Remove.
5510 (last_parm_cleanup_insn): Likewise.
5511 (expand_start_early_try_stmts): Don't set them.
5512 (store_parm_decls): Likewise.
5513 (save_function_data): Or save them.
5514 (mark_lang_function): Or mark them.
5516 1999-11-08 Mark Mitchell <mark@codesourcery.com>
5518 * decl.c (store_parm_decls): Generate cleanup code at
5519 semantic-analysis time. Destroy objects in the correct order.
5521 1999-11-07 Mark Mitchell <mark@codesourcery.com>
5523 * cp-tree.h (begin_new_placement): Remove.
5524 (finish_new_placement): Likewise.
5525 * class.c (finish_struct_1): Don't suspend_momentary or
5527 * decl.c (grokdeclarator): Likewise.
5528 (maybe_build_cleanup_1): Likewise.
5529 * except.c (push_eh_cleanup): Likewise.
5530 (build_terminate_handler): Likewise.
5531 * init.c (build_new_1): Likewise.
5532 * parse.y (parse_decl): Change prototype.
5533 (initdecls, notype_initdecls, initdcl): Don't return int.
5534 (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
5535 (.begin_new_placement): Remove.
5536 (.finish_new_placement): Likewise.
5537 (nonmomentary_expr): Likewise.
5538 (suspend_mom): Likewise.
5539 (condition): Don't suspend_momentary, resume_momentary, or keep
5540 track of need to resume.
5541 (unary_expr): Likewise.
5542 (new_placement): Likewise.
5544 (structsp): Likewise.
5545 (new_type_id): Likewise.
5546 (maybe_parmlist): Likewise.
5547 (direct_after_type_declaration): Likewise.
5548 (direct_new_declarator): Likewise.
5549 (direct_abstract_declaration): Likewise.
5550 * parse.c: Regenerated.
5551 * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
5552 * semantics.c (begin_new_placement): Remove.
5553 (finish_new_placement): Likewise.
5555 1999-11-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5557 * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
5558 (DECL_TEMPLATE_INFO): Use it.
5559 * decl.c (warn_extern_redeclared_static): Do nothing for
5561 * decl2.c (mark_used): Explicitly check for function or variable.
5562 * semantics.c (finish_unary_op_expr): Check whether result is also
5565 1999-11-05 Mark Mitchell <mark@codesourcery.com>
5567 * Makefile.in (typeck2.o): Depend on output.h.
5568 * typeck2.c: Include output.h.
5570 * decl.c (flag_ansi): Remove declaration.
5572 * pt.c (tinst_level_tick): Make it static.
5573 (last_template_error_tick): Likewise.
5575 * cp-tree.h (mapcar): Remove declaration.
5576 (search_tree): Likewise.
5577 (walk_tree_fn): New typedef.
5578 (walk_tree): New function.
5579 * tree.c (bot_manip): Change prototype. Adjust to be called via
5581 (bot_replace): Likewise.
5582 (no_linkage_helper): Likewise.
5583 (copy_tree_r): New function.
5584 (search_tree): Rename, and adjust, to become ...
5585 (walk_tree): New function.
5587 (target_remap): Remove.
5588 (target_remap_count): Likewise.
5589 (break_out_target_exprs): Use walk_tree.
5590 * decl.c (local_variable_p): Change prototype.
5591 (check_default_argument): Use walk_tree.
5592 * pt.c (for_each_template_parm_r): New function, split out from ...
5593 (for_each_template_parm): Here. Use it, via walk_tree.
5595 1999-11-03 Mark Mitchell <mark@codesourcery.com>
5597 * class.c (check_bitfield_decl): New function, split out from
5599 (check_field_decl): Likewise. Recursively examine members of
5601 (finish_struct_1): Use them.
5602 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
5604 1999-11-02 Mark Mitchell <mark@codesourcery.com>
5606 * decl.c (grokfndecl): Remove dead code.
5608 * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
5610 1999-11-02 Scott Snyder <snyder@fnal.gov>
5612 * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
5614 * pt.c (tsubst_copy): Likewise.
5616 1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
5618 * decl2.c (maybe_make_one_only): Always make things comdat on
5621 1999-10-31 Mark Mitchell <mark@codesourcery.com>
5623 * decl.c (finish_function): Call free_after_parsing for functions
5624 we are not immediately turning into RTL.
5626 1999-10-31 Brendan Kehoe <brendan@cygnus.com>
5628 * cp-tree.h (flag_dump_translation_unit): Add decl.
5630 Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net>
5632 * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
5634 1999-10-30 Mark Mitchell <mark@codesourcery.com>
5636 * decl.c (pop_cp_function_context): Don't call free on a NULL
5638 * semantics.c: Include ggc.h.
5639 (expand_body): Do garbage-collection after processing a template
5640 function. Clear DECL_SAVED_TREE after generating RTL for a
5642 * Makefile.in (semantics.o): Depend on ggc.h.
5644 1999-10-29 Mark Mitchell <mark@codesourcery.com>
5646 * cp-tree.h (make_typename_type): Change prototype.
5647 * decl.c (make_typename_type): Only complain if so requested.
5648 * parse.y (nested_name_specifier): Adjust calls.
5649 (typename_sub0): Likewise.
5650 (typename_sub1): Likewise.
5651 * parse.c: Regenerated.
5652 * pt.c (convert_template_argument): Pass complain to
5656 1999-10-28 Mark Mitchell <mark@codesourcery.com>
5658 * semantics.c (finish_handler): End the scope of the handler
5659 before attaching it to the statement-tree.
5661 1999-10-28 Ian Lance Taylor <ian@zembu.com>
5663 * rtti.c (build_dynamic_cast_1): Give a better error message for
5664 an attempt to dynamic_cast from a non-polymorphic type.
5666 1999-10-27 Mark Mitchell <mark@codesourcery.com>
5668 * cp-tree.h (make_temp_vec): Remove.
5669 (make_scratch_vec): Likewise.
5670 * call.c (add_function_candidate): Use make_tree_vec.
5671 (add_conv_candidate): Likewise.
5672 (build_builtin_candidate): Likewise.
5673 (add_template_candidate_real): Likewise.
5674 * class.c (resolve_address_of_overloaded_function): Likewise.
5675 * decl.c (start_function): Don't fool with the momentary obstack.
5676 (finish_function): Likewise.
5677 * init.c (expand_direct_vtbls_init): Likewise.
5678 (begin_init_stmts): Likewise.
5679 (finish_init_stmts): Likewise.
5680 * pt.c (add_to_template_args): Use make_tree_vec.
5681 (check_explicit_specialization): Likewise.
5682 (coerce_template_parms): Likewise.
5683 (lookup_template_class): Don't fool with the momentary obstack.
5684 (instantiate_class_template): Likewise.
5685 (tsubst_template_arg_vector): Use make_tree_vec.
5686 (tsubst_aggr_type): Don't fool with the momentary obstack.
5687 (tsubst_decl): Likewise. Use make_tree_vec.
5688 (try_one_overload): Likewise.
5689 (try_class_unification): Don't fool with the momentary obstack.
5690 (get_bindings_real): Use make_tree_vec.
5691 (set_mangled_name_for_template_decl): Likewise.
5692 * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
5693 * semantics.c (finish_expr_stmt): Likewise.
5694 (finish_do_stmt): Likewise.
5695 (finish_for_expr): Likewise.
5696 (finish_switch_cond): Likewise.
5697 (do_pushlevel): Likewise.
5698 (do_poplevel): Likewise.
5699 * tree.c (make_temp_vec): Remove.
5701 * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
5702 CLEANUP_P for a TRY_BLOCK.
5703 * ir.texi: Document SAVE_EXPR.
5705 Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
5707 * call.c (build_over_call): Check that the built-in function is
5708 of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
5709 * typeck.c (build_function_call_real): Similarly.
5711 1999-10-26 Mark Mitchell <mark@codesourcery.com>
5713 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call
5716 1999-10-24 Mark Mitchell <mark@codesourcery.com>
5718 * decl.c (push_overloaded_decl_1): Use pushdecl.
5720 * decl.c (auto_function): Replace #ifdef'd __inline with just
5722 * lex.c (my_get_run_time): Likeise.
5723 (yyprint): Likewise.
5724 (identifier_type): Likewise.
5725 * method.c (start_squangling): Likewise.
5726 (end_squangling): Likewise.
5728 (old_backref_index): Likewise.
5729 (flush_repeats): Likewise.
5730 (issue_ktype): Likewise.
5731 * parse.y (empty_parms): Likewise.
5732 * parse.c: Regenerated.
5734 1999-10-21 Mark Mitchell <mark@codesourcery.com>
5736 * dump.c (dequeue_and_dump): Replace several uses of
5737 queue_and_dump_index with dump_child.
5739 1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5741 * expr.c: Include tm_p.h.
5743 1999-10-21 Mark Mitchell <mark@codesourcery.com>
5745 * cp-tree.h (SCOPE_PARTIAL_P): New macro.
5746 (pushlevel_temporary): Remove.
5747 (add_scope_stmt): New function.
5748 * decl.c (pushlevel_temporary): Remove.
5749 (poplevel): Use add_scope_stmt.
5750 (start_decl_1): Likewise.
5751 * semantics.c (add_scope_stmt): New function.
5752 (do_pushlevel): Use it.
5753 (do_poplevel): Use it.
5754 (expand_stmt): Check SCOPE_PARTIAL_P.
5756 * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
5757 * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
5758 * expr.c (cplus_expand_expr): Expand it.
5759 * ir.texi: Document EMPTY_CLASS_EXPR.
5761 1999-10-20 Mark Mitchell <mark@codesourcery.com>
5763 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
5764 parameters as having namespace scope.
5766 1999-10-19 Mark Mitchell <mark@codesourcery.com>
5768 * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
5769 (mangling_flags): New type.
5770 (build_overload_int): Change prototype.
5771 (build_overload_value): Likewise.
5772 (numeric_output_need_bar): Improve comment.
5773 (mangle_expression): New function, broken out from ...
5774 (build_overload_int): Here.
5775 (build_overload_value): Adjust for use of mangling flags. Don't
5776 warn about real-valued template parameters here. Do handle
5777 complex expressions involving real-valued template parameters.
5778 (build_template_parm_names): Encase non-type template parameters
5779 in underscores, if necessary.
5780 (process_overload_item): Remove conditional on
5781 PARM_CAN_BE_ARRAY_TYPE.
5783 1999-10-17 Mark Mitchell <mark@codesourcery.com>
5785 * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
5787 * ir.texi: Clean up documentation of RETURN_INIT.
5789 1999-10-15 Greg McGary <gkm@gnu.org>
5791 * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
5792 (lang_init): Set default for flag_bounds_check if still "unspecified".
5794 1999-10-13 Andrew Haley <aph@cygnus.com>
5796 * class.c (finish_struct_1): Force alignment of non-bitfields to
5799 Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
5801 * typeck2.c (process_init_constructor): Handle empty constructors.
5803 1999-10-13 Jason Merrill <jason@yorick.cygnus.com>
5805 * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
5807 * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
5810 1999-10-13 Mark Mitchell <mark@codesourcery.com>
5812 * decl.c (make_rtl_for_local_static): Don't create register RTL
5813 for addressable constants.
5815 1999-10-13 Nathan Sidwell <nathan@acm.org>
5817 * cp-tree.h (build_x_va_arg): Prototype new function.
5818 * call.c (build_x_va_arg): Define it.
5819 * parse.y (unary_expr): Call build_x_va_arg.
5821 * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
5822 * call.c (convert_type_from_ellipsis): Define it.
5823 * decl.c (init_decl_processing): Set lang_type_promotes_to.
5825 * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
5827 1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
5829 * class.c (fixed_type_or_null): Always set *nonnull.
5831 1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5833 * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
5834 __GNUC__ and __GNUC_MINOR__.
5836 1999-10-09 Mark Mitchell <mark@codesourcery.com>
5838 * cp-tree.h (make_rtl_for_local_static): New function.
5839 * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
5841 (make_rtl_for_local_static): Here.
5842 * semantics.c (expand_stmt): Use make_rtl_for_local_static.
5844 1999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5846 * method.c: Include tm_p.h.
5848 1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
5850 * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
5851 * lex.c (cp_make_lake_type): Likewise.
5852 * tree.c (init_tree): Init make_lang_type_fn.
5854 1999-10-07 Mark Mitchell <mark@codesourcery.com>
5856 * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
5859 * semantics.c (expand_stmt): Don't pretend to have asmspecs for
5860 local statics if we don't really have them.
5862 * ir.texi: Improve documentation for STMT_EXPR. Describe
5865 1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
5867 * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
5869 1999-10-07 Greg McGary <gkm@gnu.org>
5871 * class.c (finish_struct_1): Use simpler method of
5872 removing elements of a singly-linked list which doesn't
5873 lose for classes without data members.
5875 1999-10-07 Mark Mitchell <mark@codesourcery.com>
5877 * friend.c (make_friend_class): Robustify.
5879 * semantics.c (finish_object_call_expr): Reject calls to template
5882 1999-10-06 Mark Mitchell <mark@codesourcery.com>
5884 * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
5886 * cp-tree.h (CLASSTYPE_VFIELD): Remove.
5887 * call.c (build_vfield_ref): Use TYPE_VFIELD, not
5889 * class.c (get_vfield_offset): Likewise.
5890 (finish_base_struct): Likewise.
5891 (modify_one_vtable): Likewise.
5892 (fixup_vtable_deltas): Likewise.
5893 (finish_struct_1): Likewise.
5894 * init.c (expand_virtual_init): Likewise.
5895 * search.c (lookup_field_1): Likewise.
5896 (expand_upcast_fixups): Likewise.
5897 * typeck.c (build_component_ref): Likewise.
5898 (build_binary_op_nodefault): Likewise.
5900 * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
5901 * ir.texi: Document TYPE_VFIELD.
5903 1999-10-06 Brendan Kehoe <brendan@cygnus.com>
5905 * decl.c (grokdeclarator): Only warn about non-zero arrays if
5906 !in_system_header (linux socketbits.h can give this for
5907 __cmsg_data, which is using a GNU extension).
5909 1999-10-05 Mark Mitchell <mark@codesourcery.com>
5911 * decl2.c (start_static_storage_duration_function): Push the
5912 function declaration so it ends up in namespace scope.
5914 * dump.c (DUMP_CHILDREN): Remove.
5915 (DUMP_BINFO): Adjust.
5916 (struct dump_node_info): Remove dump_children_p.
5917 (queue_and_dump_type): Remove dump_children_p parameter.
5918 (queue): Don't set dump_children_p.
5919 (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
5920 queue_and_dump_index.
5921 (dequeue_and_dump): Unconditionally print children. Adjust calls
5922 to functions mentioned above.
5923 (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
5925 * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
5926 * dump.c (dequeue_and_dump): Dump them.
5928 * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
5930 * decl.c (start_function): Set current_in_charge_parm for
5931 constructors, too, where appropriate.
5932 * search.c (fixup_all_virtual_upcast_offsets): New function.
5933 (expand_indirect_vtbls_init): Use it.
5935 1999-10-04 Nathan Sidwell <nathan@acm.org>
5937 * decl2.c (grok_alignof): Don't decay lvalues.
5939 * init.c (build_new): Remove unused variable.
5941 1999-10-04 Mark Mitchell <mark@codesourcery.com>
5943 * cp-tree.h (struct language_function): Remove static_labelno.
5944 (static_labelno): Remove macro.
5945 * method.c (build_overload_nested_name): Make static_labelno
5948 * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
5949 to decide whether or not a function is defined.
5951 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
5952 situations where make_node will do it automatically.
5953 * decl.c (grok_reference_init): Likewise.
5954 (expand_static_init): Likewise.
5955 (do_static_initialization): Likewise.
5956 * init.c (perform_member_init): Likewise.
5957 (expand_aggr_init_1): Likewise.
5958 (build_new_1): Likewise.
5959 * method.c (do_build_copy_constructor): Likewise.
5960 (do_build_assign_ref): Likewise.
5961 * search.c (expand_upcast_fixups): Likewise.
5962 * semantics.c (finish_stmt_expr): Likewise.
5963 * typeck.c (build_unary_op): Likewise.
5964 (check_return_expr): Likewise.
5966 1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
5968 * init.c (build_vec_delete_1): Fold COND_EXPRs.
5970 1999-10-03 Mark Mitchell <mark@codesourcery.com>
5972 * cp-tree.def (VEC_INIT_EXPR): Remove.
5973 * cp-tree.h (struct stmt_tree): New type.
5974 (struct saved_scope): Remove firstobj. Add x_saved_tree,
5976 (class_cache_firstobj): Remove.
5977 (struct language_function): Remove stmts_are_full_exprs_p,
5978 x_last_tree, and x_last_expr_type. Add x_stmt_tree.
5979 (current_stmt_tree): New macro.
5980 (last_tree): Adjust.
5981 (last_expr_type): Likewise.
5982 (doing_semantic_analysis_p): Simplify.
5983 (stmts_are_full_exprs_p): Adjust.
5984 (begin_tree): Remove prototype.
5985 (end_tree): Likewise.
5986 (begin_stmt_tree): Change prototype.
5987 (finish_stmt_tree): Likewise.
5988 (building_stmt_tree): Simplify.
5989 * decl.c (mark_stmt_tree): New function.
5990 (mark_saved_scope): Use it.
5991 (start_function): Rearrange slightly to call begin_stmt_tree
5993 (save_function_data): Tweak.
5994 (finish_function): Adjust call to finish_stmt_tree.
5995 (mark_lang_function): Use mark_stmt_tree.
5996 * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
5997 * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
5998 (build_vec_init): Remove creation of stand-in intializer.
5999 * pt.c (begin_tree): Remove.
6000 (end_tree): Likewise.
6001 * semantics.c (SET_LAST_STMT): New macro. Use it throughout.
6002 (begin_compound_stmt): Handle a compound-statement outside of a
6004 (begin_stmt_expr): Handle a statement-expression outsidef of a
6006 (finish_stmt_expr): Likewise.
6007 (begin_class_definition): Don't call begin_tree.
6008 (finish_inline_definitions): Don't call end_tree.
6009 (begin_stmt_tree): Take a pointer to tree, not a function as input.
6010 (finish_stmt_tree): Likewise.
6011 * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
6014 * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
6015 * parse.c: Regenerated.
6017 * dump.c (dqueue_and_dump): Dump bitfieldness.
6019 * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
6020 bitfields, rather than DECL_BIT_FIELD.
6021 * ir.texi: Document how to tell whether or not a field is a
6024 * lex.c (make_lang_type): Fix typo in comment.
6026 1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
6028 * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
6030 1999-10-01 Mark Mitchell <mark@codesourcery.com>
6032 * pt.c (tsubst_decl): If the type of a template instantiation is
6033 bogus, so is the whole instantiation.
6035 1999-09-30 Mark Mitchell <mark@codesourcery.com>
6037 * decl.c (initialize_local_var): Handle static variables here.
6038 (cp_finish_decl): Tweak handling of function-scope static
6040 * semantics.c (expand_stmt): Handle DECL_STMTs for static
6043 * method.c (emit_thunk): Don't crash when -fsyntax-only.
6045 * cp-tree.h (lang_decl_flags): Add global_ctor_p and
6046 global_dtor_p. Add init_priority.
6047 (DECL_ACCESS): Adjust accordingly.
6048 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
6049 (GLOBAL_INIT_PRIORITY): Likewise.
6050 * decl.c (lang_mark_tree): Adjust accordingly.
6051 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
6052 and GLOBAL_INIT_PRIORITY.
6053 * dump.c (dequeue_and_dump): Print them.
6054 * ir.texi: Document them.
6056 * decl2.c (struct priority_info_s): Remove initialization_sequence
6057 and destruction_sequence.
6058 (start_static_storage_duration_function): Return the body of the
6059 function. Convert for function-at-a-time mode.
6060 (generate_inits_for_priority): Remove.
6061 (finish_static_storage_duration_function): Change prototype.
6062 Adjust for function-at-a-time mode.
6063 (do_static_initialization): Likewise.
6064 (do_static_destruction): Likewise.
6065 (do_static_initialization_and_destruction): Remove.
6066 (start_static_initialization_or_destruction): New function.
6067 (finish_static_initialization_or_destruction): Likewise.
6068 (get_priority_info): Don't manipulation initialization_sequence or
6069 destruction_sequence.
6070 (prune_vars_needing_no_initialization): New function.
6071 (write_out_vars): Likewise.
6072 (finish_file): Use the various new functions instead of the old.
6074 Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
6076 * cp-tree.h (warn_float_equal): Declare.
6077 * decl2.c (warn_float_equal): Define.
6078 (lang_decode_option): Recognize -W[no-]float-equal.
6079 * typeck.c (build_binary_op_nodefault): Conditionally warn
6080 about equality tests of floating point types.
6082 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
6084 Support normal type_info-based EH mechanisms with -fno-rtti.
6085 * except.c (build_eh_type_type): Remove special -fno-rtti handling.
6086 (build_eh_type_type_ref): Likewise.
6087 (build_eh_type): Remove.
6088 (expand_throw): Call build_eh_type_type, not build_eh_type.
6089 * decl2.c (import_export_decl): Don't associate the tinfo fn with
6090 the vtable if -fno-rtti.
6091 * decl.c (init_decl_processing): Always init_rtti_processing.
6093 * rtti.c (get_typeid): Don't complain about -fno-rtti.
6095 * class.c (class_cache_obstack, class_obstack): Remove.
6096 (init_class_processing): Don't initialize class_obstack.
6097 (push_cache_obstack): Remove.
6098 (pushclass): Don't call it.
6099 * cp-tree.h: Remove prototype for push_cache_obstack.
6100 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
6101 (pushlevel_class): Don't push_decl_level.
6102 (poplevel_class): Don't pop_stack_level.
6103 (push_class_level_binding): Don't push_cache_obstack.
6104 (init_decl_processing): Don't intialize decl_obstack.
6105 * search.c (push_class_decls): Don't push_cache_obstack.
6106 * tree.c (list_hash_add): Put hash node on permanent_obstack.
6107 (hash_tree_cons): Don't mess with obstacks.
6108 (print_lang_statistics): Don't print stats for class_obstack and
6111 1999-09-29 Mark Mitchell <mark@codesourcery.com>
6113 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
6114 * ir.texi: Document DECL_EXTERNAL.
6116 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
6117 * ir.texi: Document THUNK_DECLs.
6119 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
6120 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
6121 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
6122 * error.c (dump_template_bindings): Remove unused parameter.
6123 Handle multiple levels of template parameters.
6124 (dump_template_decl): Use `parms', not `args', for template
6125 parameters. Fix thinko.
6126 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
6127 flags to dump_template_bindings.
6128 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
6129 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
6130 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
6131 (tsubst_copy): Clarify variable name.
6132 (most_general_template): Robustify.
6134 1999-09-29 Nathan Sidwell <nathan@acm.org>
6136 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
6137 to change primary template rendering.
6139 1999-09-29 Mark Mitchell <mark@codesourcery.com>
6141 * cp-tree.h (UPT_TEMPLATE): Remove.
6142 (UPT_PARMS): Likewise.
6143 (DECL_NEEDED_P): New macro.
6144 * decl2.c (finish_vtable_vardecl): Use it.
6145 (finish_objects): Don't crash with -fsyntax-only.
6146 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
6148 * pt.c (tsubst_friend_function): Remove FIXME that talks about
6150 (tsubst_expr): Correct handling of function try-blocks.
6151 * semantics.c: Include flags.h.
6152 (expand_body): Don't do RTL generation if -fsyntax-only.
6153 * Makefile.in (semantics.o): Depends on flags.h.
6155 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
6157 * pt.c (most_general_template): Adjust declaration.
6159 * cp-tree.h: (most_general_template): Declare.
6161 * error.c (dump_template_value): Rename to ...
6162 (dump_template_argument): This.
6163 (dump_template_argument_list): New function.
6164 (dump_type): Use it.
6165 (dump_template_parameter): New function.
6166 (dump_template_decl): Use it.
6167 (dump_template_bindings): New function.
6168 (dump_function_decl): Use it. Pretty print function template
6171 1999-09-28 Nathan Sidwell <nathan@acm.org>
6173 * decl.c (grokdeclarator): Distinguish parameter context for
6174 diagnostics. Tidy up missing type diagnostic.
6175 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
6177 1999-09-28 Mark Mitchell <mark@codesourcery.com>
6179 * ir.texi: Improve documentation for TARGET_EXPR.
6181 1999-09-27 Nathan Sidwell <nathan@acm.org>
6183 Augment stringification of trees.
6184 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
6185 (fndecl_as_string, type_as_string_real, args_as_string,
6186 code_as_string, language_as_string, parm_as_string,
6187 op_as_string, assop_as_string, cv_as_string): Remove.
6188 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
6189 (context_as_string): Declare new function.
6190 * error.c (cp_printers): Move definition.
6192 (OB_END_TEMPLATE_ID): Adjust.
6193 (interesting_scope_p): Remove.
6194 (dump_scope): New static function.
6195 (dump_qualifiers): Adjust prototype, reimplement.
6196 (dump_template_value): Use tree_string_flags.
6197 (dump_type_real): Move back to dump_type.
6198 (dump_type): Adjust prototype. Use tree_string_flags.
6199 (dump_aggr_type): Likewise. Use dump_template_parms.
6200 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
6202 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
6203 (dump_simple_decl): Likewise.
6204 (dump_decl): Likewise. Use dump_template_decl.
6205 (dump_template_decl): New static function broken out of dump_decl.
6206 (dump_function_decl): Adjust prototype. Use tree_string_flags.
6207 (dump_parameters): Likewise. Prefix space.
6208 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
6209 (dump_function_name): Likewise. Use dump_template_parms.
6210 (dump_template_parms): New static function broken out of
6212 (dump_expr_list): Adjust prototype. Use tree_string_flags.
6213 (dump_expr): Likewise.
6214 (fndecl_as_string): Removed
6215 (type_as_string_real): Removed
6216 (dump_binary_op): Adjust prototype. Use tree_string_flags.
6217 (dump_unary_op): Likewise.
6218 (type_as_string): Likewise.
6219 (expr_as_string): Likewise.
6220 (decl_as_string): Likewise.
6221 (context_as_string): New function.
6222 (lang_decl_name): Adjust.
6223 (decl_to_string): New static print callback.
6224 (expr_to_string): Likewise.
6225 (fndecl_to_string): Likewise.
6226 (code_as_string): Renamed to ...
6227 (code_to_string): ... here. Adjust.
6228 (language_as_string): Renamed to ...
6229 (language_to_string): ... here. Adjust.
6230 (parm_as_string): Renamed to ...
6231 (parm_to_string): ... here.
6232 (op_as_string): Renamed to ...
6233 (op_to_string): ... here.
6234 (assop_as_string): Renamed to ...
6235 (assop_to_string): ... here.
6236 (type_to_string): New static print callback.
6237 (args_as_string): Renamed to ...
6238 (args_to_string): ... here. Adjust.
6239 (cv_as_string): Renamed to ...
6240 (cv_to_string): ... here. Adjust.
6241 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
6242 (print_template_context): Likewise.
6244 1999-09-26 Mark Mitchell <mark@codesourcery.com>
6246 * cp-tree.h (expand_throw): Remove prototype.
6247 * except.c (expand_throw): Make it static. Use tree-generation
6248 functions, rather than RTL-generation functions.
6249 (build_throw): Use it.
6250 * expr.c: Include except.h.
6251 (cplus_expand_expr): Don't call expand_throw here.
6252 * Makefile.in (expr.o): Depend on except.h.
6253 * ir.texi: Update documentation for THROW_EXPR.
6255 * decl.c (start_function): Set x_dont_save_pending_sizes rather
6256 than calling get_pending_sizes.
6257 * init.c (build_new): Don't save and restore
6258 immediate_size_expand; instead, assert that it has the expected
6261 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6263 * lex.c (compiler_error): Add missing call to va_end().
6265 1999-09-25 Mark Mitchell <mark@codesourcery.com>
6267 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
6268 * ir.texi: Document RESULT_DECL and DECL_RESULT.
6270 * cp-tree.h (check_return_expr): New function.
6271 * decl.c (finish_constructor_body): New function.
6272 (pushdecl): Put global friend functions in namespace binding
6273 level, not the class binding level.
6274 (finish_destructor_body): Make sure the dtor_label is always
6275 defined. Fix typo in comment.
6276 (finish_function): Move generation of constructor-termination code
6277 to semantic-analysis time. Move generation of implicit `main'
6278 return value to semantic-analysis time.
6279 * semantics.c (finish_return_stmt): Generate goto's to
6280 ctor_label/dtor_label here. Use check_return_expr to do semantic
6281 analysis on the returned expression.
6282 * typeck.c (maybe_warn_about_returning_address_of_local): New
6283 function split out from c_expand_return.
6284 (check_return_expr): Likewise.
6285 (c_expand_return): Just generate the RTL for the return.
6287 1999-09-24 Mark Mitchell <mark@codesourcery.com>
6289 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
6290 (cleanup_type): Likewise.
6291 (search_tree): Change prototype.
6292 * decl.c (local_variable_p): Adjust for new interface to
6294 (check_default_argument): Likewise.
6295 * error.c (dump_expr): Handle INIT_EXPR.
6296 * except.c (expand_throw): Don't make cleanup_type a local static.
6297 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
6298 * init.c (build_new): Call build_new_1 directly, rather than
6299 building a NEW_EXPR.
6300 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
6301 processing file-scope initializers.
6302 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
6303 * tree.c: Include splay-tree.h
6304 (no_linkage_helper): Adjust for new interface to search_tree.
6305 (search_tree): Pass around pointers to tree nodes, rather than the
6306 nodes themselves. Handle VEC_INIT_EXPR.
6307 (no_linkage_check): Adjust for new interface to search_tree.
6308 (mapcar): Handle VEC_INIT_EXPR.
6309 (target_remap): New variable.
6310 (bot_manip): Use it.
6311 (bot_replace): New function.
6312 (break_out_target_exprs): Use it to remap all variables used in a
6313 default argument expression.
6314 * typeck.c (build_modify_expr): Don't crash when outside a
6315 function and presented with an INIT_EXPR assignment
6316 * Makefile.in (tree.o): Depend on splay-tree.h.
6318 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
6320 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
6322 (builtin_function): New arg CLASS. Arg CODE now of type int. All
6324 Set the builtin's DECL_BUILT_IN_CLASS.
6326 1999-09-24 Mark Mitchell <mark@codesourcery.com>
6328 * decl.c (pushdecl): Don't make local declarations of extern
6329 variables give the variable a DECL_CONTEXT for the function.
6330 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
6331 Don't accidentally make RTL for local declarations.
6332 (emit_local_var): Handle declarations with asm-specifiers here.
6334 1999-09-23 Mark Mitchell <mark@codesourcery.com>
6336 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
6337 STMT_IS_FULL_EXPR_P.
6339 * cp-tree.h (language_function): Add cannot_inline.
6340 * decl.c (start_function): Restore current_function_cannot_inline
6341 from the saved value.
6342 (save_function_data): Save current_function_cannot_inline.
6343 * decl2.c (start_objects): Change prototype. Build the function
6344 in function-at-a-time mode.
6345 (finish_objects): Likewise.
6346 (generate_ctor_or_dtor_function): Adjust accordingly.
6348 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
6349 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
6350 Don't call expand_anon_union_decl here
6351 * semantics.c (exapnd_stmt): Call it here, instead.
6352 * typeck.c (mark_addressable): Addressed variables are implicitly
6355 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6357 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
6358 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
6359 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
6360 * cp-tree.h: Add tree checking macros to various tree access
6362 * ptree.c (print_lang_decl): Test for function or variable
6363 before accessing template info.
6365 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
6367 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
6368 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
6369 * decl2.c (lang_f_options): Add -fshort-wchar.
6370 * cp-tree.h: Declare flag_short_wchar.
6371 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
6374 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6376 * ir.texi: Fix formatting errors and typos.
6378 1999-09-22 Mark Mitchell <mark@codesourcery.com>
6380 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
6382 * decl.c (pushdecl): Do create a binding for extern "C" functions,
6383 but not for their DECL_ASSEMBLER_NAMEs.
6384 (lookup_name_current_level): Fix formatting.
6385 (xref_tag): Likewise.
6386 * decl2.c (start_objects): Mark static constructors and
6387 destructors as used.
6389 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
6391 * decl.c (define_case_label): Don't crash if we're not in a switch.
6393 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
6394 * lang-options.h: Restore -fthis-is-variable. Remove help strings
6395 for unsupported flags.
6397 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
6399 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
6400 Accept and warn about -fthis-is-variable.
6402 1999-09-21 Mark Mitchell <mark@codesourcery.com>
6404 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
6405 CLEANUP_STMT, and SCOPE_STMT.
6407 * decl2.c (lang_decode_option): Adjust, in the wake of recent
6408 changes to option processing.
6410 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6412 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
6413 function pointer from pmfs with no object given.
6414 (convert_for_assignment): Do not return error when converting
6417 1999-09-21 Alex Samuel <samuel@codesourcery.com>
6419 * lex.c (internal_filename): New variable.
6420 (INTERNAL_FILENAME): New macro.
6421 (init_parse): Allocate internal_filename and mark as root. Use it
6422 instead of a string constant.
6424 1999-09-21 Nathan Sidwell <nathan@acm.org>
6426 Reimplement dynamic cast and catch matching.
6427 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
6428 * search.c (dynamic_cast_base_recurse): New function.
6429 (get_dynamic_cast_base_type): New function for dynamic cast.
6430 * rtti.c (build_dynamic_cast_1): Determine source and target
6431 class relationship. Call __dynamic_cast_2.
6432 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
6433 (__user_type_info::dyncast): New dynamic cast dispatcher.
6434 (__user_type_info::sub_kind): New nested enumeration.
6435 (__user_type_info::contained_p): sub_kind predicate.
6436 (__user_type_info::contained_public_p): Likewise.
6437 (__user_type_info::contained_nonpublic_p): Likewise.
6438 (__user_type_info::contained_nonvirtual_p: Likewise.
6439 (__user_type_info::upcast_result): New nested struct.
6440 (__user_type_info::dyncast_result): New nested struct.
6441 (*::do_upcast): New catch function.
6442 (*::do_dyncast): New dynamic cast function.
6443 (__user_type_info::find_public_subobj): New dynamic cast
6445 (*::do_find_public_subobj): New dynamic cast helper function.
6446 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
6447 (__user_type_info::dyncast): Define dynamic cast dispatcher.
6448 (*::do_upcast): Define catch function.
6449 (*::do_dyncast): Define dynamic cast function.
6450 (*::do_find_public_subobj): Define dynamic cast helper function.
6451 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
6452 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
6453 (__dynamic_cast_2): New dynamic cast runtime.
6455 1999-09-20 Mark Mitchell <mark@codesourcery.com>
6457 * cp-tree.h (finish_stmt_expr): Change prototype.
6458 * expr.c (cplus_expand_expr): Adjust call accordingly.
6459 * init.c (finish_init_stmts): Likewise.
6460 * parse.y (primary): Likewise.
6461 * pt.c (tsubst_copy): Likewise.
6462 * semantics.c (finish_stmt_expr): Don't take two parameters.
6463 Don't remove generated BLOCKs from the block-tree.
6465 Remove support for assigning to `this'.
6466 * NEWS: Note that fact.
6467 * class.c (build_vbase_path): Don't check flag_this_is_variable.
6468 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
6469 (language_function): Remove assigns_this, just_assigned_this, and
6470 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
6471 (base_init_expr): Remove.
6472 (current_vcalls_possible_p): New macro.
6473 (vtbls_set_up_p): Likewise.
6474 (emit_base_init): Change prototype.
6475 * decl.c (finish_destructor_body): New function, split out from
6477 (current_function_assigns_this): Remove.
6478 (current_function_just_assigned_this): Likewise.
6479 (start_function): Don't set them.
6480 (finish_function): Don't check them. Don't emit
6481 base-initialization code here. Generate code for destructors when
6482 doing semantic analysis.
6483 (finish_stmt): Don't check current_function_just_assigned_this.
6484 * decl2.c (lang_f_options): Remove this-is-variable.
6485 (lang_decode_option): Likewise.
6486 (grokclassfn): Don't check flag_this_is_variable.
6487 * init.c (emit_base_init): Return the expression generated.
6488 (construct_virtual_bases): Don't push/pop obstacks. Fix
6490 (build_new_1): Don't check flag_this_is_variable.
6491 (get_temp_regvar): Don't set DECL_REGISTER.
6492 (build_vec_init): Don't call use_variable.
6493 * lang-options.h: Remove "-fthis-is-variable" and
6494 "-fno-this-is-variable".
6495 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
6496 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
6498 * semantics.c (finish_expr_stmt_real): Rename to ...
6499 (finish_expr_stmt): This. Remove assigned_this parameter.
6500 (begin_if_stmt): Call do_pushlevel before starting the statement.
6501 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
6503 (setup_vtbl_ptr): Emit initialization code for bases and members
6504 at semantic-analysis time. Emit code to initialize vtables in
6506 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
6507 Don't handle CTOR_INITIALIZER any more.
6508 * typeck.c (build_modify_expr): Don't check for assignments to
6510 (c_expand_return): Don't suggest assigning to `this'.
6512 * Makefile.in (decl.o): Depend on RTL_H.
6513 (decl2.o): Likewise.
6514 (class.o): Likewise.
6516 (method.o): Likewise.
6517 (search.o): Likewise.
6521 * decl.c (duplicate_decls): When a builtin function is redeclared
6522 as static, make sure it is mangled correctly.
6524 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
6525 detail about the statement-tree.
6527 1999-09-20 Nathan Sidwell <nathan@acm.org>
6529 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
6531 1999-09-20 Nick Clifton <nickc@cygnus.com>
6533 * decl2.c (lang_decode_option): Extend comment.
6535 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
6537 * typeck.c: Include "tm_p.h".
6539 1999-09-19 Mark Mitchell <mark@codesourcery.com>
6541 * ir.texi: New file.
6543 1999-09-19 Paul Burchard <burchard@pobox.com>
6545 * semantics.c (expand_stmt): Initialize return value.
6547 1999-09-18 Paul Burchard <burchard@pobox.com>
6549 * gxxint.texi: G++ now implements namespaces.
6551 1999-09-18 Mark Mitchell <mark@codesourcery.com>
6553 * decl.c (pop_label): Don't warn about unused labels more than
6555 * semantics.c (finish_goto_stmt): Always marked used labels as
6558 * decl.c (layout_var_decl): Change prototype. Call layout_decl
6559 even when the declaration is external.
6560 (cp_finish_decl): Adjust call to layout_var_decl.
6561 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
6563 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
6565 * typeck.c (get_member_function_from_ptrfunc): Always consider
6566 virtuality inside member pointer.
6568 1999-09-17 Mark Mitchell <mark@codesourcery.com>
6570 Turn on function-at-a-time processing.
6571 * cp-tree.h (doing_semantic_analysis_p): New macro.
6572 (SF_DEFAULT): Define to zero, not SF_EXPAND.
6573 (start_handler_parms): Change prototype.
6574 (expand_start_catch_block): Likewise.
6575 (expand_end_catch_block): Likewise.
6576 (expand_start_eh_spec): Likewise.
6577 (expand_end_eh_spec): Declare.
6578 (finish_handler_parms): Change prototype.
6579 (begin_catch_block): Declare.
6580 (finish_handler): Change prototype.
6581 (do_pushlevel): Declare.
6582 (do_poplevel): Likewise.
6583 * decl.c (pushlevel): Don't create
6584 binding levels when not doing semantic analysis.
6585 (poplevel): Don't pop them.
6586 (pushdecl): Assert that we are never called when not doing
6588 (pushdecl_top_level): Use push_to_top_level.
6589 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
6590 label when expanding.
6591 (cp_finish_decl): Only inject for-scope variables when doing
6592 semantic analysis. Add comments.
6593 (start_handler_parms): Return the handler parm.
6594 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
6595 already set. Reinitialize from saved function data if available.
6596 Don't pushlevel when not doing semantic analysis.
6597 (store_parm_decls): Only generate RTL when expanding. Only
6598 pushdecl when doing semantic analysis. Set
6599 current_eh_spec_try_block if appropriate.
6600 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
6601 Combine common code. Don't poplevel when not doing semantic
6603 (push_cp_function_context): Don't expand functions without an
6604 explicit call to expand_body.
6605 (mark_lang_function): Make eh_spec_try_block and
6607 * except.c (expand_end_eh_spec): Don't
6609 (process_start_catch_block): Likewise.
6610 (push_eh_cleanup): Use finish_decl_cleanup.
6611 (initialize_handler_parm): New function.
6612 (expand_start_catch_block): Use it.
6613 (expand_end_catch_block): Use tree-generation functions, not
6614 RTL-generation functions.
6615 (expand_start_eh_spec): Likewise.
6616 (expand_end_eh_spec): Likewise.
6617 (expand_exception_blocks): Simplify.
6618 (start_anon_func): Use do_pushlevel.
6619 (end_anon_func): Use do_poplvel. Call expand_body for the
6621 * expr.c (do_case): Don't call define_case_label.
6622 * init.c (create_temporary_var): Set DECL_CONTEXT for local
6624 * method.c (emit_thunk): Call expand_body for the
6626 (sythesize_method): Likewise.
6627 * parse.y (handler_args): Give it ttype.
6628 (eat_saved_input): Call expand_body.
6629 (base_init): Use do_pushlevel.
6630 (pending_inline): Call expand_body.
6631 (handler): Adjust calls to finish_handler_parms and
6633 (handler_args): Don't call expand_start_catch_block. Return the
6634 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
6635 * parse.c: Regenerated.
6636 * rtti.c (synthesize_tinfo_fn): Call finish_function.
6637 * semantics.c (do_pushlevel): Give it external linkage. Build
6639 (do_poplevel): Likewise.
6640 (finish_case_label): Call define_case_label when doing semantic
6642 (finish_goto_stmt): Create RTL for labels.
6643 (finish_function_try_block): Set in_function_try_handler
6645 (finish_function_handler_sequence): Unset it.
6646 (finish_handler_parms): Use expand_start_catch_block even when
6647 building a statement-tree.
6648 (begin_catch_block): New function.
6649 (finish_handler): Move a little RTL-generation logic here.
6650 (finish_decl_cleanup): Allow cleanups for empty declarations.
6651 (finish_named_return_value): Don't pushdecl when not doing
6653 (expand_stmt): Don't do semantic analysis for variable
6654 declarations. Handle START_CATCH_STMT. Call expand_label
6655 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
6656 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
6657 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
6658 RETURN_INIT and function try blocks.
6660 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
6661 x_scope_stmt_stack. Add x_in_charge_parm.
6662 (current_eh_spec_try_block): New macro.
6663 (current_scope_stmt_stack): Likewise.
6664 (current_in_charge_parm): Likewise.
6665 * decl.c (start_function): Initialize current_in_charge_parm.
6666 (finish_function): Use current_in_charge_parm rather than looking
6668 * search.c (expand_indirect_vtbls_init): Likewise.
6670 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
6671 (TRY_BLOCK): Likewise.
6672 (HANDLER): Likewise.
6673 (START_CATCH_STMT): New tree node.
6674 (SCOPE_STMT): Likewise.
6675 * cp-tree.h (SCOPE_BEGIN_P): New macro.
6676 (SCOPE_NULLIFIED_P): Likewise.
6677 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
6678 (struct lang_decl): Add saved_language_function.
6679 (DECL_PENDING_INLINE_INFO): Adjust documentation.
6680 (DECL_PENDING_INLINE_P): New macro.
6681 (TYPE_TI_ARGS): Fix typo in comment.
6682 (DECL_SAVED_TREE): Add to documentation.
6683 (DECL_SAVED_FUNCTION_DATA): New macro.
6684 (START_CATCH_TYPE): Likewise.
6685 (SCOPE_END_P): New macro.
6686 (declare_parm_level): Don't declare.
6687 * decl.c (mark_lang_function): New function, split out from
6688 mark_cp_function_context.
6689 (save_function_data): New function.
6690 (declare_parm_level): Remove.
6691 (finish_function): Use save_function_data to squirrel away
6692 important stuff for later use.
6693 (mark_cp_function_context): Use mark_function_data.
6694 (lang_mark_tree): Likewise.
6695 * lex.c (begin_definition_of_inclass_inline): Set
6696 DECL_PENDING_INLINE_P.
6697 (store_pending_inline): Clear it.
6698 * pt.c (tsubst_decl): Likewise.
6700 1999-09-17 Nathan Sidwell <nathan@acm.org>
6702 * call.c (perform_implicit_conversion): Deal with error_mark_node.
6704 1999-09-17 Mark Mitchell <mark@codesourcery.com>
6706 * decl.c (warn_extern_redeclared_static): Don't get confused by
6707 static member functions.
6708 (duplicate_decls): Merge DECL_THIS_STATIC.
6710 * decl.c (expand_static_init): Make sure assignments to local
6711 statics actually occur.
6713 1999-09-17 Mark Mitchell <mark@codesourcery.com>
6715 * cp-tree.h (poplevel_class): Declare.
6716 * class.c (popclass): Use poplevel_class, not poplevel.
6717 * decl.c (poplevel_class): Don't make it static. Don't return a
6719 (poplevel): Don't call poplevel_class; abort in a class
6720 binding level is seen.
6721 * semantics.c (finish_translation_unit): Use pop_everything.
6722 * parse.y (member_init): Allow errors.
6723 (pending_inline): Call finish_function.
6724 * parse.c: Regenerated.
6725 * Makefile.in (CONFLICTS): Adjust.
6727 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
6729 * error.c: Reduce code duplication.
6730 (dump_template_value): New function.
6731 (dump_type_real): Use it.
6732 (dump_decl): Likewise.
6733 (dump_function_name): Likewise.
6734 (dump_function_decl): Don't be too talkative about function return
6737 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6739 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
6741 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
6743 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
6745 * decl2.c (finish_file): Also call check_global_declarations for
6746 the pending_statics list.
6748 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
6750 * lex.c (cp_pragma_implementation): Allow #pragma implementation
6753 1999-09-15 Richard Henderson <rth@cygnus.com>
6755 * lex.c (mark_impl_file_chain): Follow the next chain.
6757 1999-09-15 Mark Mitchell <mark@codesourcery.com>
6759 * decl.c (warn_extern_redeclared_static): Simplify. Catch
6760 problems with extern "C" functions redeclared as static.
6761 (duplicate_decls): When a builtin is redeclared static, make the
6762 new function have internal linkage.
6764 1999-09-15 Mark Mitchell <mark@codesourcery.com>
6766 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
6767 * pt.c (tsubst_copy): Likewise.
6768 * tree.c (search_tree): Likewise.
6771 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6773 * typeck2.c (ack): Don't declare progname.
6775 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
6777 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
6778 filenames with ggc_alloc_string.
6780 1999-09-14 Mark Mitchell <mark@codesourcery.com>
6782 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
6784 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
6786 * cvt.c (build_up_reference): Likewise.
6787 * tree.c (build_cplus_new): Likewise.
6788 (get_target_expr): Likewise.
6790 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
6792 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
6794 1999-09-13 Mark Mitchell <mark@codesourcery.com>
6796 * cp-tree.h (build_target_expr): New function.
6797 * call.c (build_conditional_expr): Use build_target_expr.
6798 (convert_like): Likewise.
6799 (build_over_call): Likewise.
6800 * cvt.c (build_up_reference): Likewise.
6801 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
6802 (destroy_local_var): Here.
6803 (build_target_expr): New function.
6804 * tree.c (build_cplus_new): Use it.
6805 (get_target_expr): Likewise.
6807 1999-09-13 Nathan Sidwell <nathan@acm.org>
6809 * typeck.c (expr_sizeof): Don't decay arrays and functions.
6810 Remove misleading comment.
6811 (build_compound_expr): Don't decay arrays.
6813 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
6815 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
6816 class rvalues again.
6818 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6820 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
6822 * g++spec.c: Include gcc.h.
6823 (lang_specific_driver): Constify a char*. Call xcalloc, not
6824 xmalloc/bzero. All calls to the function pointer parameter now
6825 explicitly call `fatal'.
6827 1999-09-12 Mark Mitchell <mark@codesourcery.com>
6829 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
6830 * cvt.c (ocp_convert): Complete the from and destination types.
6831 Adjust warning about functions always being `true' in conditionals.
6832 * decl.c (duplicate_decls): Don't play funny games with abort.
6833 * error.c (dump_expr): Handle OVERLOADs.
6834 * spew.c (probe_obstack): Remove.
6835 * typeck.c (condition_conversion): Use perform_implicit_conversion.
6837 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
6839 * cp-tree.h (auto_function, define_function): Adjust prototypes.
6840 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
6842 (auto_function): Likewise, for CODE arg.
6843 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
6844 (builtin_function): ... here.
6846 1999-09-11 Mark Mitchell <mark@codesourcery.com>
6848 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
6849 (init_decl_processing): Don't set TREE_PERMANENT for the
6851 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
6852 (grokdeclarator): Likewise.
6853 (grokparms): Don't check TREE_PERMANENT when building up lists.
6854 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
6855 (mark_inline_for_output): Likewise.
6856 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
6857 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
6858 * lex.c (check_newline): Don't check ggc_p; it is always one.
6859 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
6860 * spew.c (yylex): Don't copy_node or probe_obstacks for
6861 non-permanent CONSTANTs and STRINGs.
6862 * tree.c (build_cplus_array_type_1): Don't fuss with
6863 TREE_PERMANENT on ARRAY_TYPEs.
6865 * cp-tree.def (CLEANUP_STMT): New node.
6866 * cp-tree.h (language_function): Add name_declared.
6867 (current_function_name_declared): New macro.
6868 (CLEANUP_DECL): New macro.
6869 (CLEANUP_EXPR): Likewise.
6870 (emit_local_var): Likewise.
6871 (finish_decl_cleanup): New function.
6872 * cvt.c (build_up_reference): Simplify.
6873 (ocp_convert): Remove dead code.
6874 * decl.c (start_decl): Remove call to add_decl_stmt.
6875 (grok_reference_init): Adjust, to handle bindings temporaries to
6876 references. Remove dead code.
6877 (initialize_local_var): Don't generate RTL for
6878 declarations here, or build cleanups here. Don't fuss with
6879 obstacks. Replace expand_start_target_temps calls with explicit
6880 setting of stms_are_full_exprs_p.
6881 (destroy_local_var): New function.
6882 (emit_local_var): Likewise.
6883 (cp_finish_decl): Use them, as appropriate.
6884 (start_function): Announce template functions.
6885 (store_parm_decls): Don't call declare_function_name here.
6886 (finish_stmt): Don't start emit base-initialization code when just
6887 building the statement-tree.
6888 * init.c (create_temporary_var): Move add_decl_stmt call ...
6889 (get_temp_regvar): Here.
6890 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
6891 cp_finish_decl would expect. Don't call add_decl_stmt.
6892 * semantics.c (begin_compound_stmt): Call declare_function_name,
6894 (finish_decl_cleanup): New function.
6895 (expand_stmt): Use emit_local_var to output variables.
6896 (expand_body): Set current_funtion_name_declared.
6898 1999-09-10 Mark Mitchell <mark@codesourcery.com>
6900 * cp-tree.h (finish_cleanup_try_block): New function.
6901 * semantics.c (finish_cleanup_try_block): Add comment.
6903 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
6905 * cp-tree.h: Delete declarations for all tree nodes now moved to
6907 * decl.c: Delete their definitions.
6908 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
6909 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
6911 (init_decl_processing): Call build_common_tree_nodes and
6912 build_common_tree_nodes_2 instead of building their nodes here.
6913 Don't add gc roots for them.
6915 1999-09-10 Mark Mitchell <mark@codesourcery.com>
6917 * cp-tree.h (language_function): Rename expanding_p to
6918 x_expanding_p. Rename named_label_uses to x_named_label_uses.
6919 (expanding_p): Adjust accordingly.
6920 (TREE_VIA_PRIVATE): Fix typo in comment.
6921 (DECL_REFERENCE_SLOT): Remove.
6922 (SET_DECL_REFERENCE_SLOT): Likewise.
6923 * decl.c (named_label_uses): Adjust. Remove chicken comment.
6924 (push_overloaded_decl): Don't truncate the chain of bindings when
6925 adding an overloaded function.
6926 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
6927 (initialize_local_var): Fix typo in comment.
6928 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
6929 * decl2.c (start_objects): Make the fact that we are expanding
6930 the generated function right away explicit.
6931 (start_static_storage_duration_function): Likewise.
6932 (finish_file): Fix typo in comment.
6933 * init.c (build_vec_init): Correct bugs in handling cleanups.
6934 * semantics.c (maybe_convert_cond): New function.
6935 (FINISH_COND): Always store the condition, even if there's
6937 (finish_if_stmt_cond): Use maybe_convert_cond.
6938 (finish_while_stmt_cond): Likewise.
6939 (finish_do_stmt): Likewise.
6940 (finish_for_cond): Likewise.
6941 (expand_cond): Adjust.
6943 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
6944 * init.c (perform_member_init): Remove obstack machinations.
6945 (expand_cleanup_for_base): Likewise.
6946 (finish_init_stmts): Mark the statement-expression as used.
6947 * method.c (emit_thunk): Use tree-generating functions, not
6949 (do_build_copy_constructor): Likewise.
6950 (do_build_assign_ref): Likewise.
6951 (synthesize_method): Likewise. Keep track of line numbers.
6952 * pt.c (tsubst_expr): Handle various kinds of try blocks.
6953 * semantics.c (expand_stmts): Remove.
6954 (begin_function_try_block): Set FN_TRY_BLOCK_P.
6955 (finish_function_try_block): Be careful rechaining
6956 function try blocks.
6957 (expand_stmt): Loop through all the statements at a given level.
6958 (exapnd_body): Be careful with line-numbers here too. Prepare for
6959 being called directly from the parser.
6961 * cp-tree.h (finish_function): Adjust prototype.
6962 * decl.c (finish_function): Return the function compiled.
6963 * pt.c (instantiate_decl): Don't play games with obstacks.
6964 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
6965 (search_tree): Likewise.
6966 * typeck.c: Fix typo in comment.
6967 * typeck2.c (store_init_value): Add comment.
6969 * cp-tree.h (CPTI_ATEXIT): New macro.
6970 (atexit_node): Likewise.
6971 * decl.c (destroy_local_static): New function, broken out from ...
6972 (expand_static_init): Here.
6974 * rtti.c (get_tinfo_var): These should always be global
6975 (expand_si_desc): Use tree, not RTL, functions to generate code.
6976 (expand_class_desc): Likewise.
6977 (expand_ptr_desc): Likewise.
6978 (expand_attr_desc): Likewise.
6979 (expand_generic_desc): Likewise.
6980 (synthesize_tinfo_fn): Likewise.
6982 1999-09-09 Mark Mitchell <mark@codesourcery.com>
6984 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
6985 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
6987 (RECHAIN_STMST_FROM_CHAIN): Likewise.
6989 * parse.y (simple_stmt): Fix typo in last change.
6991 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
6992 (STMT_IS_FULL_EXPR_P): Likewise.
6993 (STMT_LINENO_FOR_FN_P): Likewise.
6994 (prep_stmt): New function.
6995 (building_stmt_tree): Tweak for safety.
6996 * pt.c (tsubst_expr): Use prep_stmt throughout.
6997 (add_tree): Move it to semantics.c
6998 * semantics.c (add_tree): Move it here.
6999 (finish_expr_stmt_real): New function.
7000 (finish_expr_stmt): Use it.
7001 (finish_if_stmt_cond): Use FINISH_COND.
7002 (finish_while_stmt_cond): Likewise.
7003 (finish_for_cond): Likewise.
7004 (finish_stmt_tree): Tweak line-number handling.
7005 (prep_stmt): New function.
7006 (expand_stmt): Use it.
7008 * cp-tree.h (begin_switch_stmt): Adjust prototype.
7009 (finish_switch_cond): Likewise.
7010 * parse.y (simple_stmt): Adjust accordingly.
7011 * parse.c: Regenerated.
7012 * pt.c (tsubst_expr): Adjust accordingly.
7013 * semantics.c (expand_cond): New function.
7014 (FINISH_COND): New macro.
7015 (begin_switch_stmt): Build the SWITCH_STMT here.
7016 (finish_switch_stmt_cond): Not here.
7017 (expand_stmt): Adjust calls to begin_switch_stmt and
7018 finish_switch_cond. Use expand_cond throughout.
7020 * dump.c (dequeue_and_dump): Dump types for constants.
7021 Describe DECL_ARG_TYPE more intuitively.
7024 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
7025 (lang_cleanup_tree): Remove.
7026 * lex.c (make_lang_type): Use ggc_alloc to allocate
7029 Reorganize per-function data.
7030 * cp-tree.h (saved_scope): Add function_decl, bindings.
7031 (language_function): Rename binding_level to bindings.
7032 (cp_function_chain): Use the current_function, not the
7033 outer_function_chain.
7034 (current_class_ptr): Make it work, even when there's no
7036 (current_class_ref): Likewise.
7037 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
7039 (clear_temp_name): Remove.
7040 * decl.c (check_function_type): New function, broken out from
7042 (current_binding_level): Adjust definition.
7043 (pushlevel): Simplify.
7044 (poplevel): Don't use named_label_uses when we're outside
7046 (mark_saved_scope): Mark function_decl and bindings.
7047 (maybe_push_to_top_level): Don't unconditionally push a new
7048 function context. Save bindings and the current_function_decl.
7049 Don't clear named_labels.
7050 (pop_from_top_level): Pop function context if appropriate.
7051 (init_decl_processing): Set init_lang_status and free_lang_status,
7052 rather than save_lang_status and restore_lang_status.
7053 (start_function): Take SF_* flags. Don't clear per-function data.
7054 Reorder and simplify to use new per-function data code. Add
7056 (store_parm_decls): Don't call init_function_start here.
7057 (finish_function): Adjust for new handling of per-function data.
7058 (push_cp_function_context): Simplify.
7059 (mark_cp_function_context): Change binding_level to bindings.
7060 * decl2.c (clear_temp_name): Remove.
7061 (start_objects): Use SF flags to start_function.
7062 (start_static_storage_duration_function): Likewise.
7063 * except.c (start_anon_func): Remove redundant calls to
7064 push_function_context_to. Use SF flags to start function.
7065 (end_anon_func): Remove redundant call to pop_function_context
7067 * lex.c (reinit_parse_for_function): Don't initialize per-function
7069 * method.c (emit_thunk): Clear current_function after calling
7070 assemble_end_function. Use SF flags for start_function.
7071 (synthesize_method): Use SF flags for start_function.
7072 * parse.c: Regenerated.
7073 * parse.y (fn.defpen): Likewise.
7074 (pending_inline): Clear current_function, even if something goes
7076 * pt.c (instantiate_decl): Use SF flags to start_function.
7077 Don't save and restore expanding_p.
7078 (add_tree): Handle the case where we are outside any function.
7079 (end_tree): Likewise.
7080 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
7081 * semantics.c (begin_function_definition): Likewise.
7082 (expand_body): Likewise.
7084 1999-09-09 Nathan Sidwell <nathan@acm.org>
7086 * cp-tree.h (convert_to_void): Prototype new function.
7087 (require_complete_type_in_void): Remove prototype.
7088 * cvt.c (convert_to_void): New function.
7089 (ocp_convert): Use convert_to_void.
7090 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
7092 * typeck.c (require_complete_type_in_void): Remove function.
7093 (build_compound_expr): Use convert_to_void.
7094 (build_static_cast): Likewise.
7095 (build_c_cast): Likewise.
7096 * semantics.c (finish_expr_stmt): Do not decay full expressions.
7098 * typeck.c (build_x_compound_expr): Add FIXME.
7100 1999-09-08 Mark Mitchell <mark@codesourcery.com>
7102 * cp-tree.h (scratch_tree_cons): Remove.
7103 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
7104 and perm_tree_cons with plain tree_cons.
7105 * class.c: Likewise.
7107 * decl2.c: Likewise.
7108 * except.c: Likewise.
7112 * method.c: Likewise.
7113 * parse.y: Likewise.
7117 * search.c: Likewise.
7118 * typeck.c: Likewise.
7119 * parse.c: Regenerated.
7120 * tree.c (build_srcloc): Simplify.
7122 1999-09-08 Bruce Korb autogen@linuxbox.com
7124 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
7126 1999-09-08 Mark Mitchell <mark@codesourcery.com>
7128 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
7130 (LANG_DECL_PERMANENT): Remove.
7131 * decl.c (duplicate_decls): Don't mess about with obstacks trying
7133 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
7134 * lex.c (free_lang_decl_chain): Remove.
7135 (build_lang_decl): Don't use obstacks.
7136 (retrofit_lang_decl): Likewise.
7137 (copy_lang_decl): Likewise.
7139 * cp-tree.h (saved_scope): Remove old_binding_level and
7140 function_decl. Tidy up.
7141 * decl.c (mark_saved_scope): Don't set them.
7142 (maybe_push_to_top_level): Clear memory.
7144 * decl.c (layout_var_decl): Change prototype. Don't complete
7145 types for external objects.
7146 (check_initializer): Likewise. Tidy.
7147 (initialize_local_var): Complete types here.
7148 (cp_finish_decl): Not here. Reorganize a little.
7149 (grokvardecl): Don't complete types here.
7151 * decl.c (start_function): Clear last_dtor_insn and
7152 last_parm_cleanup_insn.
7153 (push_cp_function_context): Just copy over a little of
7154 the old context, not all of it.
7156 * cp-tree.h (copy_to_permanent): Remove.
7157 (permanent_p): Likewise.
7158 * decl.c (building_typename_type): Don't use copy_to_permanent.
7159 (start_decl): Likewise.
7160 (grok_reference_init): Likewise.
7161 (cp_finish_decl): Likewise.
7162 * init.c (build_new_1): Don't use mapcar.
7163 (build_vec_delete_1): Don't use copy_to_permanent.
7164 (build_vec_init): Likewise.
7165 * parse.y (primary): Likewise.
7166 * parse.c: Regenerated.
7167 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
7168 (lookup_template_class): Likewise.
7169 (tsubst_friend_function): Likewise.
7170 (instantiate_class_template): Likewise.
7171 (tsubst_decl): Likewise.
7173 (instantiate_template): Likewise.
7175 * rtti.c (get_tinfo_fn): Likewise.
7176 (build_dynamic_cast): Likewise.
7177 * semantics.c (finish_if_stmt_cond): Likewise.
7178 (finish_while_stmt_cond): Likewise.
7179 (finish_do_stmt): Likewise.
7180 (finish_for_cond): Likewise.
7181 (finish_for_expr): Likewise.
7182 (finish_cleanup): Likewise.
7183 (add_decl_stmt): Likewise.
7184 (finish_named_return_value): Likewise.
7185 (finish_qualified_call_expr): Likewise.
7186 * tree.c (perm_manip): Remove.
7187 (build_exception_variant): Don't use copy_to_permanent.
7188 (permanent_p): Remove.
7189 (copy_to_permament): Remove.
7190 (build_min_nt): Don't use copy_to_permanent.
7191 (build_min): Likewise.
7192 (min_tree_cons): Likewise.
7193 * typeckc.c (build_static_cast): Likewise.
7194 (build_reinterpret_cast): Likewise.
7195 (build_const_cast): Likewise.
7197 1999-09-07 Mark Mitchell <mark@codesourcery.com>
7199 * decl.c (ggc_p): Set it to 1.
7200 (mark_saved_scope): Add prototype.
7202 1999-09-07 Richard Henderson <rth@cygnus.com>
7204 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
7205 * typeck.c (self_promoting_args_p): Delete.
7207 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
7209 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
7210 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
7212 1999-09-07 Mark Mitchell <mark@codesourcery.com>
7214 * Makefile.in (tree.o): Depend on ggc.h.
7215 * class.c (make_method_vec): Remove.
7216 (free_method_vec): Likewise.
7217 (free_method_vecs): Remove.
7218 (add_method): Don't use them.
7219 * cp-tree.def (PTRMEM_CST): Make it longer.
7220 (TEMPLATE_PARM_INDEX): Make it shorter.
7221 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
7222 (template_parm_index): Remove RTL field.
7223 (ptrmem_cst): Add RTL field.
7224 (finish_function): Removed parameter.
7225 (process_next_inline): Change prototype.
7226 (init_cplus_unsave): Rename to init_tree.
7227 (binding_init): Remove.
7228 * decl.c (free_binding_nodes): Remove.
7229 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
7230 (pop_binding): Don't use free_binding_nodes.
7231 (free_binding_vecs): Remove.
7232 (store_bindings): Don't use them.
7233 (pop_from_top_level): Likewise.
7234 (lookup_namespace_name): Simplify.
7235 (build_typename_type): Don't use obstack_free.
7236 (unqualified_namespace_lookup): Simplify.
7237 (lookup_name_real): Simplify.
7238 (start_function): Remove comment about leaks.
7239 (finish_function): Removed nested parameter. Call
7240 expand_end_bindings even when building_stmt_tree.
7241 Call ggc_push_context and ggc_pop_context around
7242 rest_of_compilation, if necessary.
7243 (mark_cp_function_context): Handle a NULL language-context.
7244 (lang_mark_false_label_stack): Fix typo.
7245 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
7246 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
7247 pointer to method types.
7248 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
7249 * decl2.c (finish_objects): Adjust call to finish_function.
7250 (finish_static_store_duration_function): Likewise.
7251 (do_nonmember_using_decl): Remove call to binding_init.
7252 * except.c (end_anon_func): Adjust call to finish_function.
7253 * lex.c (mark_impl_file_chain): New function.
7254 (init_parse): Call init_tree, not init_cplus_unsave.
7256 (cp_pramga_interface): Use xmalloc, not permalloc.
7257 (cp_pragma_implementation): Likewise.
7258 (begin_definition_of_inclass_inline): Simplify.
7259 (process_next_inline): Adjust prototype.
7260 (do_scoped_id): Don't call binding_init.
7261 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
7262 * method.c (emit_thunk): Adjust call to finish_function.
7263 (synthesize_method): Likewise.
7264 * parse.y (%union): Add a new `pi' variant.
7265 (PRE_PARSED_FUNCTION_DECL): Use it.
7266 (fn.defpen): Likewise.
7267 (fndef): Adjust call to finish_function.
7268 * pt.c (instantiate_decl): Likewise.
7269 * rtti.c (syntheisze_tinfo_fn): Likewise.
7270 * semantics.c (expand_body): Likewise.
7271 * tree.c: Include ggc.h.
7272 (mark_list_hash): New function.
7273 (binding_init): Remove.
7274 (init_cplus_unsave): Rename to ...
7275 (init_tree): This. Add GC roots.
7277 1999-09-05 Mark Mitchell <mark@codesourcery.com>
7279 Get ready for garbage collection.
7280 * Makefile.in (CXX_TREE_H): Add varray.h
7281 (lex.o): Depend on ggc.h.
7283 (decl2.o): Likewise.
7284 (method.o): Likewise.
7285 (search.o): Likewise.
7288 * class.c: Include ggc.h.
7289 (current_class_name): Remove.
7290 (current_class_type): Likewise.
7291 (current_access_specifier): Likewise.
7292 (previous_class_type): Likewise.
7293 (previous_class_values): Likewise.
7294 (class_cache_firstobj): Likewise.
7295 (current_lang_base): Likewise.
7296 (current_lang_stack): Likewise.
7297 (current_lang_stacksize): Likewise.
7298 (lang_name_c): Likewise.
7299 (lang_name_cplusplus): Likewise.
7300 (lang_name_java): Likewise.
7301 (current_lang_name): Likewise.
7302 (base_layout_decl): Likewise.
7303 (access_default_node): Likewise.
7304 (access_public_node): Likewise.
7305 (access_protected_node): Likewise.
7306 (access_private_node): Likewise.
7307 (access_default_virtual_node): Likewise.
7308 (access_public_virtual_node): Likewise.
7309 (access_protected_virtual_node): Likewise.
7310 (access_private_virtual_node): Likewise.
7311 (signed_zero_node): Likewise.
7312 (init_class_processing): Don't build base_layout_decl.
7313 (push_lang_context): Adjust now that current_lang_base is a varray.
7314 (pop_lang_context): Likewise.
7315 * cp-tree.h: Include varray.h.
7316 (cp_global_trees): Add access_default, access_public,
7317 access_protected, access_private, access_default_virtual,
7318 access_public_virtual, access_protected_virtual,
7319 access_private_virtual, ctor_identifier, delta2_identifier,
7320 delta_identifier, dtor_identifier, in_charge_identifier,
7321 index_identifier, nelts_identifier, this_identifier,
7322 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
7323 lang_name_c, lang_name_cplusplus, lang_name_java,
7324 empty_except_spec, null, jclass, minus_one, terminate.
7325 (saved_scope): Move here from decl.c. Define globals in terms of
7326 saved_scope: current_namespace, current_class_name,
7327 current_class_type, current_access_specifier, current_lang_stack,
7328 current_lang_base, current_lang_name, current_function_parms,
7329 current_template_parms, processing_template_decl,
7330 processing_specialization, processing_explicit_instantiation,
7331 previous_class_type, previous_class_values, class_cache_firstobj.
7332 (scope_chain): New variable.
7333 (init_pt): New function.
7334 * decl.c (current_namespace): Remove.
7335 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
7336 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
7337 (delta_identifier, delta2_identifier): Likewise.
7338 (pfn_or_delta2_identifier, tag_identifier): Likewise
7339 (vt_off_identifier, empty_except_spec, null_node): Likewise.
7340 (current_function_parms, current_lang_base): Remove.
7341 (current_lang_stack, previous_class_values): Remove.
7342 (class_binding_level): Macroize.
7343 (saved_scope): Remove.
7344 (current_saved_scope): Rename to scope_chain.
7345 (mark_saved_scope): Adjust for new scope structure.
7346 (maybe_push_to_top_level): Likewise.
7347 (pop_from_top_level): Likewise.
7348 (duplicate_decls): Adjust now that current_lang_base is a varray.
7349 (build_typename_type): Call ggc_add_tree_hash_table_root.
7350 (init_decl_processing): Call init_pt. Call push_to_top_level to
7351 set up globals. Add GC roots.
7352 (xref_basetypes): Adjust now that current_lang_base is a varray.
7353 * decl.h (this_identifier): Remove.
7354 (in_charge_identifier): Likewise.
7355 * decl2.c: Don't include varray.h.
7356 (current_namespace): Remove.
7357 (init_decl2): Add GC roots.
7358 * except.c (Terminate): Remove.
7359 (init_exception_processing): Use terminate_node instead.
7360 (build_terminate_handler): Likewise.
7361 * init.c (nc_nelts_field_id): Remove.
7362 (minus_one): Likewise.
7363 (init_init_processing): Use minus_one_node and nelts_identifier
7364 instead. Add GC roots.
7365 (jclass_node): Remove.
7366 (build_new_1): Use nelts_identifier.
7367 (build_vec_init): Likewise.
7368 (build_vec_delete): Likewise.
7369 * lex.c: Include ggc.h.
7370 (defarg_fn): Move declaration early.
7371 (defarg_parms): Likewise.
7372 (init_parse): Add GC roots.
7373 (handle_cp_pragma): Remove redundant declaration of
7375 * method.c: Include ggc.h.
7376 (btypelist): Make it a varray. All uses changed.
7377 (ktypelist): Likewise.
7378 (init_method): Add GC roots.
7379 * pt.c: Don't include varray.h. Include ggc.h.
7380 (current_template_parms): Remove.
7381 (processing_template_decl): Likewise.
7382 (processing_specialization): Likewise.
7383 (processing_explicit_instantiation): Likewise.
7384 (init_pt): New function.
7385 * repo.c: Include ggc.h.
7386 (init_repo): Add GC roots.
7387 * search.c: Don't include varray.h.
7388 (_vptr_name): Remove.
7389 (lookup_field_1): Use vtpr_identifier instead.
7390 (expand_indirect_vtbls_init): Remove redundant declaration of
7391 in_charge_identifier.
7392 (init_search_processing): Use vptr_identifier.
7394 1999-09-05 Richard Henderson <rth@cygnus.com>
7395 Bernd Schmidt <bernds@cygnus.co.uk>
7396 Mark Mitchell <mark@codesourcery.com>
7398 * Makefile.in (parse.o): Depend on ggc.h.
7399 (decl2.o): Depend on ggc.h.
7400 (init.o): Depend on ggc.h.
7401 * cp-tree.h (init_decl2): Declare.
7402 (cp_parse_init): Likewise.
7403 * decl.c (ggc_p): Define to zero.
7404 (mark_saved_scope): New function.
7405 (init_decl_processing): Call cp_parse_init, and cp_decl2.
7407 (expand_static_init): Add GC roots.
7408 * decl2.c: Include ggc.h.
7409 (init_decl2): New function.
7410 * init.c: Include ggc.h.
7411 (init_init_processing): Add GC roots.
7412 * parse.y: Include ggc.h.
7413 (cp_parse_init): New function.
7415 1999-09-04 Mark Mitchell <mark@codesourcery.com>
7417 * decl.c (init_decl_processing): Set mark_lang_status.
7418 (lang_mark_false_label_stack): Adjust prototype.
7419 * decl2.c (grok_function_init): Remove extraneous declaration of
7422 * Make-lang.in (cc1plus): Remove dependency on GGC.
7423 * Makefile.in (OBJS): Don't mention ggc-simple.o.
7424 (OBJDEPS): Don't mention ggc-simple.o.
7426 * Make-lang.in (cc1plus): Depend on $(GGC).
7427 * Makefile.in (OBJS): Add ggc-simple.o.
7428 (OBJDEPS): Likewise.
7429 * cp-tree.h (language_function): Rename members to `x_' versions;
7430 we now have x_named_labels, x_ctor_label, x_dtor_label,
7431 x_base_init_list, x_member_init_list, x_base_init_expr,
7432 x_current_class_ptr, x_current_class_ref, x_last_tree,
7433 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
7435 (dtor_label, ctor_label, current_base_init_list,
7436 current_member_init_list, base_init_expr, current_class_ptr,
7437 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
7438 * decl.c: Include ggc.h.
7439 (last_dtor_insn): Adjust to use x_ names.
7440 (last_parm_cleanup_insn): Likewise.
7441 (original_result_rtx): Likewise.
7442 (named_labels): Likewise.
7443 (mark_binding_level): New function.
7444 (mark_cp_function_context): Likewise.
7445 (mark_false_label_stack): Likewise.
7446 (lang_mark_tree): Likewise.
7447 (lang_cleanup_tree): Likewise.
7449 1999-09-03 Mark Mitchell <mark@codesourcery.com>
7451 * Makefile.in (CXX_TREE_H): Include function.h.
7452 (decl.o): Don't depend on function.h.
7453 (decl2.o): Likewise.
7454 (typeck.o): Likewise.
7456 (method.o): Likewise.
7457 * cp-tree.h: Include function.h.
7458 (cp_function): Rename to language_function. Remove next.
7459 (cp_function_chain): Make it a macro, not a variable.
7460 (push_cp_function_context): Don't declare.
7461 (pop_cp_function_context): Likewise.
7462 * decl.c: Don't include function.h.
7463 (push_cp_function_context): Make it static. Make it suitable for
7464 a save_lang_status callback.
7465 (pop_cp_function_context): Likewise.
7466 (maybe_push_to_top_level): Call push_function_context_to, not
7467 push_cp_function_context.
7468 (pop_from_top_level): Call pop_function_context_from, not
7469 pop_cp_function_context.
7470 (init_decl_processing): Set save_lang_status and
7471 restore_lang_status. Call push_function_context_to, not
7472 push_cp_function_context.
7473 (cp_function_chain): Remove.
7474 * decl2.c: Don't include function.h.
7475 * except.c: Don't include function.h.
7476 (start_anon_func): Call push_function_context_to, not
7477 push_cp_function_context.
7478 (end_anon_func): Call pop_function_context_from, not
7479 pop_cp_function_context.
7480 * init.c: Don't include function.h.
7481 * lex.c (begin_definition_of_inclass_inline): Call
7482 push_function_context_to, not push_cp_function_context.
7483 (process_next_inline): Call pop_function_context_from, not
7484 pop_cp_function_context.
7485 * method.c: Don't include function.h.
7486 (synthesize_method): Call push_function_context_to, not
7487 push_cp_function_context. Call pop_function_context_from, not
7488 pop_cp_function_context.
7489 * typeck.c: Don't include function.h.
7491 * decl.c (expand_static_init): Tweak handling of static
7492 initializations for objects without constructors.
7494 1999-09-03 Nathan Sidwell <nathan@acm.org>
7496 * typeck.c (build_indirect_ref): Reject dereference of pointer to
7499 1999-09-02 Mark Mitchell <mark@codesourcery.com>
7501 * cp-tree.h (cp_function): Move here, from decl.c.
7502 (cp_function_chain): Declare.
7503 (dtor_label): New macro, instead of variable.
7504 (ctor_label): Likewise.
7505 (current_base_init_list): Likewise.
7506 (current_member_init_list): Likewise.
7507 (base_init_expr): Likewise.
7508 (current_class_ptr): Likewise.
7509 (current_class_ref): Likewise.
7510 (last_tree): Likewise.
7511 (last_expr_type): Likewise.
7512 (current_function_returns_value): Likewise.
7513 (current_function_returns_null): Likewise.
7514 (current_function_just_assigned_this): Likewise.
7515 (current_function_parms_stored): Likewise.
7516 (temp_name_counter): Likewise.
7517 (static_labelno): Likewise.
7518 (expanding_p): Likewise.
7519 (stmts_are_full_exprs_p): Likewise.
7520 (in_function_try_handler): Likewise.
7521 (lang_type): Remove nested type_flags. All uses changed.
7522 * call.c (ctor_label): Remove.
7523 (dtor_label): Likewise.
7524 * class.c (current_class_ptr): Remove.
7525 (current_class_ref): Likewise.
7526 * decl.c (static_labelno): Remove.
7527 (dtor_label): Likewise.
7528 (last_dtor_insn): New macro, instead of variable.
7529 (last_parm_cleanup_insn): Likewise.
7530 (original_result_rtx): Likewise.
7531 (in_function_try_handler): Remove.
7532 (named_label_uses): New macro, instead of variable.
7533 (named_labels): Likewise.
7534 (current_function_returns_value): Remove.
7535 (current_function_returns_null): Likewise.
7536 (current_function_assigns_this): New macro, instead of variable.
7537 (current_function_just_assigned_this): Likewise.
7538 (current_binding_level): Likewise.
7539 (init_decl_processing): Call push_cp_function_context.
7540 (cp_function): Move to cp-tree.h
7541 (cp_function_chain): Make it global.
7542 (temp_name_counter): Remove.
7543 (push_cp_function_context): Simplify.
7544 (pop_cp_function_context): Likewise.
7545 * decl2.c (temp_name_counter): Remove.
7546 * init_c (current_base_init_list): Likewise.
7547 (current_member_init_list): Likewise.
7548 (base_init_expr): Likewise.
7549 * method.c (static_labelno): Likewise.
7550 * pt.c (last_tree): Likewise.
7551 * semantics.c (expanding_p): Likewise.
7552 (stmts_are_full_exprs_p): Likewise.
7553 (last_expr_type): Likewise.
7554 * typeck.c (dtor_label): Likewise.
7555 (ctor_label): Likewise.
7557 1999-09-01 Alex Samuel <samuel@codesourcery.com>
7559 * decl2.c (arg_assoc_template_arg): New prototype. New function.
7560 (arg_assoc_class): Use arg_assoc_template_arg for template
7562 (arg_assoc): Likewise.
7563 * pt.c (mangle_class_name_for_template): Allow member template
7566 1999-09-02 Nathan Sidwell <nathan@acm.org>
7568 * call.c (build_conditional_expr): Warn on enum mismatches.
7569 (convert_arg_to_ellipsis): Move non-pod check to after
7572 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7574 * gxx.gperf (hash, is_reserved_word): Add prototypes.
7576 * init.c (build_vec_init): Initialize variable `try_block'.
7578 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
7579 Likewise for bzero/memset.
7580 (token_getch, token_put_back): Add static prototypes. Remove
7581 `inline' from the definitions.
7582 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
7584 1999-09-01 Mark Mitchell <mark@codesourcery.com>
7586 * cp-tree.h (lang_type): Move align into type_flags.
7587 (CLASSTYPE_ALIGN): Adjust accordingly.
7588 * call.c (direct_reference_binding): Remove misleading comment.
7590 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7592 * parse.y (language_string): Constify.
7594 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7596 * repo.c (getpwd): Don't prototype.
7597 * xref.c (getpwd): Likewise
7599 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7601 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
7602 Remove hacks for stuff which now comes from libiberty.
7604 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
7606 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
7608 1999-08-30 Mark Mitchell <mark@codesourcery.com>
7610 * cp-tree.h (begin_init_stmts): Declare.
7611 (finish_init_stmts): Likewise.
7612 * cvt.c (build_up_reference): Wrap the declaration of a temporary
7613 in a statement-expression so that we will see it when expanding
7614 tree structure later.
7615 * init.c (begin_init_stmts): Don't make it static.
7616 (finish_init_stmts): Likewise.
7618 * cp-tree.h (start_handler_parms): New function.
7619 (expand_start_catch_block): Take only one parameter.
7620 (start_handler_parms): New function.
7621 * decl.c (start_handler_parms): Define it.
7622 * except.c (process_start_catch_block): Take only one parameter.
7623 Don't call grokdeclarator here.
7624 (expand_start_catch_block): Don't call grokdeclarator here,
7626 * parse.y (handler_args): Adjust call to
7627 expand_start_catch_block. Use start_handler_parms.
7628 * pt.c (push_template_decl_real): Make permanent lists have
7630 (tsubst_expr): Adjust calls to expand_start_catch_block
7632 * semantics.c (expand_stmt): Likewise.
7634 1999-08-29 Alex Samuel <samuel@codesourcery.com>
7636 * pt.c (push_template_decl_real): Use template declaration from
7637 class type if it exists.
7639 1999-08-29 Mark Mitchell <mark@codesourcery.com>
7641 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
7642 (maybe_inject_for_scope_var): Declare it.
7643 (initialize_local_var): Likewise.
7644 * decl.c (maybe_inject_for_scope_var): Make it global.
7645 (initialize_local_var): Likewise. Move cleanup handling here,
7646 from cp_finish_decl.
7647 (make_rtl_for_nonlocal_decl): Use
7648 push_obstacks_nochange/pop_obstacks, rather than
7649 end_temporary_allocation/resume_temporary_allocation.
7650 (cp_finish_decl): Try to complete the type of a variable when it
7651 is declared. Move cleanup-handling to initialize_local_var.
7652 (expand_static_init): Use tree-building code, rather than
7654 * decl2.c (get_temp_name): Assert non-initializedness of
7656 * init.c (create_temporary_var): Move RTL-assigning code to ...
7657 (get_temp_regvar): Here.
7658 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
7659 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
7660 call initialize_local_var to generate initialization code.
7662 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7664 * cp-tree.h (fndecl_as_string, type_as_string,
7665 type_as_string_real, args_as_string, decl_as_string,
7666 expr_as_string, code_as_string, language_as_string,
7667 parm_as_string, op_as_string, assop_as_string, cv_as_string,
7668 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
7670 * errfn.c (cp_printer): Likewise.
7672 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
7673 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
7674 cp_file_of, code_as_string, language_as_string, parm_as_string,
7675 op_as_string, assop_as_string, args_as_string, cv_as_string):
7678 * tree.c (lang_printable_name): Likewise.
7680 1999-08-28 Richard Henderson <rth@cygnus.com>
7682 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
7684 1999-08-28 Mark Mitchell <mark@codesourcery.com>
7686 * cp-tree.h (strip_array_types): New function.
7687 * decl.c (maybe_deduce_size_from_array_init): New function, split
7688 out from cp_finish_decl.
7689 (layout_var_decl): Likewise.
7690 (maybe_commonize_var): Likewise.
7691 (maybe_inject_for_scope_var): Likewise.
7692 (initialize_local_var): Likewise.
7693 (build_cleanup_on_safe_obstack): Likewise.
7694 (check_initializer): Likewise.
7695 (make_rtl_for_nonlocal_decl): Likewise.
7696 (cp_finish_decl): Use them.
7697 * typeck.c (strip_array_types): New function.
7699 * cp-tree.def (LABEL_STMT): New tree node.
7700 * cp-tree.h (LABEL_STMT_LABEL): New macro.
7701 (shadow_label): Remove.
7702 (declare_local_label): New function.
7703 (finish_label_decl): Likewise.
7704 * decl.c (make_label_decl): New function, split out from
7706 (shadowed_labels): Remove.
7707 (binding_level): Add shadowed_labels.
7708 (clear_binding_level): Remove.
7709 (push_binding_level): Just bzero the new binding level.
7710 (pushlevel): Fix indentation.
7711 (pop_label): New function.
7712 (pop_labels): Likewise, split out from poplevel.
7713 (poplevel): Pop local labels. Use pop_labels.
7714 (maybe_push_to_top_level): Don't clear shadowed_labels.
7715 (lookup_label): Use make_label_decl.
7716 (shadow_label): Remove.
7717 (declare_local_label): New function.
7718 (define_label): Simplify.
7719 (start_function): Don't clear shadowed_labels.
7720 (cp_function): Remove shadowed_labels.
7721 (push_cp_function_context): Don't save shadowed_labels.
7722 (pop_cp_function_context): Don't restore it.
7723 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
7724 * parse.y (label_decl): Use finish_label_decl.
7725 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
7727 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
7729 (finish_label_decl): New function.
7730 (expand_stmt): Handle LABEL_STMTs and local label declarations.
7732 1999-08-26 Mark Mitchell <mark@codesourcery.com>
7734 * decl.c (lookup_label): Build labels on the permanent obstack
7735 when building statement trees. Don't build RTL for labels when
7736 building statement trees.
7737 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
7738 building statement trees.
7739 (finish_label_stmt): Likewise.
7740 (expand_stmt): Adjust accordingly.
7741 * pt.c (tsubst_expr); Likewise.
7742 (do_decl_instantiation): Robustify.
7744 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
7745 * tree.c (build_cplus_new): Set it.
7746 * expr.c (cplus_expand_expr): Use it.
7747 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
7749 * decl.c (store_parm_decls): Reset immediate_size_expand.
7750 (finish_function): Likewise.
7752 * tree.c (cplus_unsave_expr_now): Don't return a value.
7754 * semantics.c (do_poplevel): Always initialize the return value.
7756 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
7758 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
7759 * tree.h (cplus_unsave_expr_now) : Same.
7761 1999-08-25 Mark Mitchell <mark@codesourcery.com>
7763 * decl.c (grokdeclarator): Amend comment.
7764 * except.c (expand_start_catch_block): Call push_template_decl for
7765 catch-block parameters.
7766 * method.c (synthesize_method): Build an empty compound statement
7767 for the body of a constructor.
7769 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
7771 * tree.c (cp_build_qualified_type_real): If we're asking for the
7772 same quals we already have, just return.
7774 1999-08-25 Mark Mitchell <mark@codesourcery.com>
7776 * cp-tree.def (SUBOBJECT): New tree node.
7777 * cp-tree.h (CLEANUP_P): New macro.
7778 (SUBOBJECT_CLEANUP): Likewise.
7779 (keep_next_level): Add parameter.
7780 (get_temp_regvar): Don't declare.
7781 (emit_base_init): Remove parameter.
7782 (expand_aggr_init): Rename to build_aggr_init.
7783 (expand_vec_init): Rename to build_vec_init.
7784 (do_pushlevel): Remove.
7785 (do_poplevel): Likewise.
7786 (finish_cleanup): New function.
7787 (finish_subobject): Likewise.
7788 (stmts_are_full_exprs_p): New variable.
7789 * decl.c (keep_next_level): Add parameter.
7790 (cp_finish_decl): Use build_aggr_init, not
7791 expand_aggr_init. Use finish_expr_stmt to expand the code.
7792 (expand_static_init): Use tree-generating, not RTL-generating,
7793 functions to handle the initialization.
7794 (start_function): Remove dead code. Always have a momentary
7795 obstack inside the function, even before hitting the first curly
7797 (cplus_expand_expr_stmt): Move calls to
7798 expand_{start,end}_target_temps into semantics.c.
7799 (cp_function): Add stmts_are_full_exprs_p.
7800 (push_cp_function_context): Save it.
7801 (pop_cp_function_context): Restore it.
7802 * decl2.c (get_temp_regvar): Move to init.c.
7803 (do_static_initialization): Use build_{aggr,vec}_init.
7804 (do_static_destruction): Fix typo in comment.
7805 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
7806 * except.c (expand_throw): Use create_temporary_var.
7807 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
7808 * init.c (expand_vec_init_try_block): Remove.
7809 (expand_vec_init_catch_clause): Likewise.
7810 (get_temp_regvar): New function.
7811 (begin_init_stmts): Likewise.
7812 (finish_init_stmts): Likewise.
7813 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
7815 (emit_base_init): Likewise. Remove unused parameter.
7816 (expand_virtual_init): Likewise.
7817 (expand_cleanup_for_base): Use finish_subobject.
7818 (expand_aggr_vbase_init_1): Simplify.
7819 (construct_virtual_bases): Use tree-generating functions to build
7821 (expand_aggr_init): Likewise. Rename to build_aggr_init.
7822 (expand_default_init): Likewise.
7823 (expand_aggr_init_1): Likewise.
7824 (expand_vec_init): Rename to build_vec_init.
7825 * method.c (do_build_copy_constructor): Use tree-generating
7826 functions. Don't call clear_last_expr.
7827 (do_build_assign_ref): Likewise.
7828 (synthesize_method): Call clear_last_expr here.
7829 * parse.y (base_init): Don't call clear_last_expr here.
7830 (nodecls): Likewise.
7831 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
7832 * semantics.c (do_pushlevel): Move to here.
7833 (do_poplevel): Likewise.
7834 (stmts_are_full_exprs_p): New variable.
7835 (finish_expr_stmt): Handle logic for temoprary cleanup here.
7836 (finish_for_stmt): Use finish_expr_stmt.
7837 (finish_cleanup): New function.
7838 (finish_function_try_block): Fix indentation.
7839 (finish_subobject): New function.
7840 (setup_vtbl_ptr): Call keep_next_level here.
7841 (finish_stmt_expr): Handle a block with no scope inside the
7842 statement-expression.
7843 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
7845 * tree.c (search_tree): Handle INIT_EXPR.
7847 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
7848 * typeck2.c (store_init_value): Change expand_aggr_init to
7849 build_aggr_init in comment.
7851 1999-08-25 Mark Mitchell <mark@codesourcery.com>
7853 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
7855 1999-08-25 Nathan Sidwell <nathan@acm.org>
7857 * decl2.c (handle_class_head): Be graceful about additional
7858 scope qualifiers. Adjust comments to reflect reality.
7860 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
7862 * call.c (build_conditional_expr): Fix typo.
7863 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
7864 lvalue before trying to mess with the sides.
7866 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
7868 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
7870 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
7872 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
7874 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
7875 Return arbitrary pointer or NULL.
7876 (check_eh_spec): Call __throw_type_match_rtti_2.
7877 * tinfo.h (*::dcast): Return int. Add valp parm.
7878 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
7879 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
7880 (__throw_type_match_rtti): Now just a wrapper.
7882 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
7883 (init_exception_processing): Don't initialize them.
7885 1999-08-23 Paul Burchard <burchard@pobox.com>
7887 * decl.c (check_default_argument): Fix typo.
7889 1999-08-22 Mark Mitchell <mark@codesourcery.com>
7891 * cp-tree.def (STMT_EXPR): Fix typo in node name.
7893 * dump.c (dump_next_stmt): New function.
7894 (dequeue_and_dump): Use it.
7896 * pt.c (tsubst_copy): Make sure to initialize return value for a
7897 STMT_EXPR, even when processing_template_decl.
7898 * semantics.c (finish_stmt_expr): A statement-expression whose
7899 last statement is not an expression-statement has type `void'.
7901 1999-08-20 Mark Mitchell <mark@codesourcery.com>
7903 * semantics.c (finish_stmt_expr): Fix typo in comment.
7904 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
7906 * init.c (build_vec_delete_1): Make the children of a permanent
7907 BIND_EXPR permanent.
7908 * pt.c (register_specialization): Don't register a specialization
7911 1999-08-18 Andrew Haley <aph@cygnus.com>
7913 * method.c (process_overload_item): Call build_mangled_C9x_name ()
7914 for all integer parameter types larger than long long.
7916 1999-08-19 Mark Mitchell <mark@codesourcery.com>
7918 * pt.c (redeclare_class_template): Merge default template
7919 arguments in both directions.
7921 * typeck.c (common_type): Undo 1999-08-18 change. Remove
7922 compiler_error message.
7924 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
7926 * cp-tree.h: Declare flag_use_repository.
7927 * pt.c (do_decl_instantiation): Don't complain about duplicate
7928 instantiation with -frepo.
7929 (do_type_instantiation): Likewise.
7931 * pt.c (push_template_decl_real): Complain about everything
7932 that isn't a valid template.
7934 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
7937 1999-08-19 Mark Mitchell <mark@codesourcery.com>
7939 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
7940 * decl2.c (build_expr_from_tree): Handle it.
7941 * error.c (dump_expr): Likewise.
7942 * pt.c (for_each_template_parm): Likewise.
7943 (tsubst_copy): Likewise.
7944 * tree.c (search_tree): Likewise.
7945 * semantics.c (finish_pseudo_destructor_call): Create it.
7947 1999-08-18 Mark Mitchell <mark@codesourcery.com>
7949 * search.c (setup_class_bindings): Robustify.
7950 * typeck.c (common_type): Use same_type_p, not pointer equality,
7953 * cp-tree.h (build_lang_field_decl): Remove.
7954 * class.c (build_vtable): Replace calls to build_lang_field_decl
7955 with build_lang_decl.
7956 (prepare_fresh_vtable): Likewise.
7957 (finish_struct_1): Likewise.
7958 (init_class_processing): Likewise.
7959 * decl.c (push_using_decl): Likewise.
7960 (init_decl_processsing): Likewise.
7961 (grokvardecl): Likewise.
7962 (build_ptrmemfunc_type): Likewise.
7963 (grokdeclarator): Likewise.
7964 (build_enumerator): Likewise.
7965 * decl2.c (grok_x_components): Likewise.
7966 (do_class_using_decl): Likewise.
7967 * except.c (call_eh_info): Likewise.
7968 * init.c (init_init_processing): Likewise.
7969 * rtti.c (expand_class_decl): Likewise.
7970 * tree.c (build_base_fields): Likewise.
7971 (build_vbase_pointer_fields): Likewise.
7972 * lex.c (build_lang_decl): Build declarations on the permanent
7973 obstack if we're building statmeent trees.
7974 (retrofit_lang_decl): Handle both the full lang_decl and also the
7975 smaller lang_decl_flags here.
7976 (build_lang_field_decl): Remove.
7977 * pt.c (push_template_decl_real): Issue errors for variable
7978 declarations that are not static members.
7980 1999-08-18 Richard Henderson <rth@cygnus.com>
7982 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
7985 1999-08-17 Mark Mitchell <mark@codesourcery.com>
7987 * cp-tree.h (back_end_hook): New variable.
7988 * decl2.c (back_end_hook): Define it.
7989 (finish_file): If it's non-NULL, call it.
7991 * decl.c (add_decl_to_level): New function.
7992 (push_local_binding): Use it.
7993 (find_binding): Fix typo in comment.
7994 (pushdecl): Use add_decl_to_level. Put templates on the
7995 corresponding namespace-scope binding levels.
7996 * dump.c (dequeue_and_dump): Print the specializations of a
7998 * pt.c (push_template_decl_real): Don't push a template multiple
8001 1999-08-17 Mark Mitchell <mark@codesourcery.com>
8003 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
8004 (CALL_DECLARATOR_QUALS): Likewise.
8005 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
8006 * decl.c (grokdeclarator): Adjust to use them.
8007 * decl2.c (grokfield): Likewise.
8008 (reparse_absdcl_as_casts): Likewise.
8009 * lex.c (make_call_declarator): Likewise.
8010 (set_quals_and_spec): Likewise.
8011 * pt.c (tsubst): Likewise.
8012 * tree.c (mapcar): Remove special hack to handle third operand of
8015 1999-08-16 Mark Mitchell <mark@codesourcery.com>
8017 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
8018 * class.c (build_vtable): Use build_lang_field_decl to build the
8019 VAR_DECLs for vtables.
8020 (prepare_fresh_vtable): Likewise.
8021 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
8022 CAN_HAVE_FULL_LANG_DECL_P.
8023 (push_using_decl): Use build_lang_decl to build USING_DECLs.
8024 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
8025 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
8026 (build_lang_field_decl): Likewise.
8027 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
8030 * cp-tree.def (STMT_EXPR): New tree node.
8031 * cp-tree.h (STMT_EXPR_STMT): New macro.
8032 (store_return_init): Change prototype.
8033 (finish_named_return_value): New function.
8034 (expand_stmt): Likewise.
8035 (expand_body): Likewise.
8036 (begin_stmt_tree): Likewise.
8037 (finish_stmt_tree): Likewise.
8038 (expanding_p): New variable.
8039 (last_expr_type): Likewise.
8040 (building_stmt_tree): New macro.
8041 * decl.c (start_function): Use building_stmt_tree, not
8042 processing_template_decl, where appropriate.
8043 (store_parm_decls): Likewise.
8044 (store_return_init): Move most of the body to semantics.c.
8045 (finish_function): Use building_stmt_tree.
8046 (finish_stmt): Clear last_expr_type here.
8047 (cp_function): Add expanding_p, last_tree, last_expr_type.
8048 (push_cp_function_context): Save them.
8049 (pop_cp_function_context): Restore them.
8050 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
8051 * error.c (dump_expr): Handle STMT_EXPR.
8052 * except.c (expand_start_catch_block): Use building_stmt_tree.
8054 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
8055 (do_case): Move add_tree call to semantics.c.
8056 * parse.y (return_init): Use finish_named_return_value.
8057 (for.init.statement): Use finish_expr_stmt.
8058 * parse.c: Regenerated.
8059 * pt.c (do_pushlevel): Move to semantics.c.
8060 (do_poplevel): Likewise.
8061 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
8062 (tsubst_expr): Don't expand all the way to RTL here. Handle
8063 RETURN_INIT and CTOR_INITIALIZER.
8064 (instantiate_decl): Call expand_body after tsubst'ing into
8066 * semantics.c (expand_stmts): New function.
8067 (expanding_p): New variable.
8068 (last_expr_type): Likewise.
8069 (finish_expr_stmt): Use building_stmt_tree.
8070 (begin_if_stmt): Likewise.
8071 (finish_if_stmt_cond): Likewise.
8072 (finish_then_clause): Likewise.
8073 (begin_else_clause): Likewise.
8074 (finish_else_clause): Likewise.
8075 (begin_while_stmt): Likewise.
8076 (finish_while_stmt_cond): Likewise.
8077 (finish_while_stmt): Likewise.
8078 (finish_do_body): Likewise.
8079 (finish_do_stmt): Likewise.
8080 (finish_return_stmt): Likewise.
8081 (begin_for_stmt): Likewise.
8082 (fnish_for_init_stmt): Likewise.
8083 (finish_for_cond): Likewise.
8084 (finish_for_expr): Likewise.
8085 (finish_for_stmt): Likewise.
8086 (finish_break_stmt): Likewise.
8087 (finish_continue_stmt): Likewise.
8088 (finish_switch_cond): Likewise.
8089 (finish_switch_stmt): Likewise.
8090 (finish_case_label): Call add_tree here if necessary.
8091 (finish_goto_statement): Use building_stmt_tree.
8092 (begin_try_block): Likewise.
8093 (begin_function_try_block): Likewise.
8094 (finish_try_block): Likewise.
8095 (finish_function_try_block): Likewise.
8096 (finish_handler_sequence): Likewise.
8097 (finish_function_handler_sequence): Likewise.
8098 (begin_handler): Likewise.
8099 (finish_handler_parms): Likewise.
8100 (finish_handler): Likewise.
8101 (begin_compound_stmt): Likewise.
8102 (finish_compound_stmt): Likewise.
8103 (finish_asm_stmt): Likewise.
8104 (finish_label_stmt): Likewise.
8105 (finish_named_return_value): New function.
8106 (setup_vtbl_ptr): Moved here from decl2.c.
8107 (do_pushlevel): Moved here from pt.c.
8108 (do_poplevel): Likewise.
8109 (begin_stmt_expr): Use building_stmt_tree.
8110 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
8111 when building_stmt_tree.
8112 (begin_stmt_tree): New function.
8113 (finish_stmt_tree): Likewise.
8114 (expand_stmt): Likewise.
8115 (expand_body): Likewise.
8116 * tree.c (build_cplus_method_type): Make sure the argument types
8117 end up on the same obstack as the METHOD_TYPE.
8118 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
8119 THROW_EXPR, STMT_EXPR.
8120 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
8121 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
8122 sorry, if an unsupported node is encountered.
8123 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
8124 (c_expand_return): Don't call add_tree here.
8126 1999-08-15 Mark Mitchell <mark@codesourcery.com>
8128 * pt.c (check_default_tmpl_args): Don't check in local scopes.
8129 (tsubst_decl): Make sure the declaration is on a saveable
8130 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
8132 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
8134 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
8136 Speed up Koenig lookup.
8137 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
8138 to return namespaces we've looked at.
8139 * decl2.c (lookup_using_namespace): Likewise.
8140 (add_function): Don't call ovl_member.
8141 (lookup_arg_dependent): Initialize k.namespaces to the list of
8142 namespaces seen in unqualified lookup.
8143 * call.c (equal_functions): Move here from tree.c.
8144 (joust): Use it to handle duplicate candidates.
8145 * tree.c (ovl_member): Use ==.
8147 1999-08-13 Mark Mitchell <mark@codesourcery.com>
8149 * cp-tree.def (DECL_STMT): Make it smaller.
8150 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
8151 (lang_decl): ... here. Add next.
8152 (DECL_SAVED_TREE): Adjust accordingly.
8153 (DECL_IMPLICIT_TYPEDEF_P): New macro.
8154 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
8155 (DECL_STMT_DECL): Likewise.
8156 (create_implicit_typedef): New function.
8157 (maybe_push_decl): Likewise.
8158 (tsubst_default_argument): New function.
8159 (at_function_scope_p): Likewise.
8160 (add_decl_stmt): Likewise.
8161 (push_permanent_obstack): Likewise.
8162 * call.c (convert_default_arg): Use tsubst_default_argument.
8163 * class.c (add_method): Use push_permanent_obstack.
8164 (build_self_reference): Create a TEMPLATE_DECL for the
8165 self-reference, if necessary.
8166 * decl.c (pseudo_global_level_p): Only look at the current binding
8168 (push_binding): Use push_permanent_obstack.
8169 (create_implicit_typedef): New function.
8171 (duplicate_decls): Use push_permanent_obstack.
8172 (maybe_push_decl): New function.
8173 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
8174 (start_decl_1): Remove dead code.
8175 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
8176 pseudo_global_level_p.
8177 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
8179 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
8180 pseudo_global_level_p.
8181 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
8183 (get_sentry): Use push_permanent_obstack.
8184 * dump.c (dequeue_and_dump): Enable DECL_STMT.
8185 * except.c (call_eh_info): Use push_permanent_obstack.
8186 (build_eh_type_ref): Likewise.
8187 (do_pop_exception): Likewise.
8188 (expand_eh_spec): Likewise.
8189 (alloc_eh_object): Likewise.
8190 (expand_throw): Likewise.
8191 * init.c (build_java_class_ref): Likewise.
8192 * lex.c (get_time_identifier): Likewise.
8193 (free_lang_decl_chain): Correct type.
8194 (retrofit_lang_decl): Adjust accordingly.
8195 (build_lang_field_decl): Likewise.
8196 * lex.h (free_lang_decl_chain): Likewise.
8197 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
8198 * parse.c: Regenerated.
8199 * pt.c (tsubst_default_arguments): New function.
8200 (retrieve_local_specialization): Likewise.
8201 (register_local_specialization): Likewise.
8202 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
8203 pseudo_global_level_p to determine whether or not a template is
8205 (lookup_template_class): Likewise. Use create_implicit_typedef.
8206 (instantiate_class_template): Call tsubst_default_arguments for
8207 member functions, if appropriate.
8208 (tsubst_default_argument): New function.
8209 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
8210 * search.c (at_function_scope_p): New function.
8211 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
8212 (finish_label_stmt): Likewise.
8213 (add_decl_stmt): New function.
8214 (begin_class_definition): Likewise.
8215 (finish_typeof): Likewise.
8216 * tree.c (copy_template_template_parm): Likewise.
8217 (copy_to_permanent): Likewise.
8218 (push_permanent_obstack): Define.
8219 (mark_addressable): Use it.
8220 * typeck.c (mark_addressable): Likewise.
8222 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
8224 * cp-tree.h (init_cplus_unsave): New.
8225 (cplus_unsave_expr_now): New.
8226 * lex.c (init_parse): Call init_cplus_unsave.
8227 * tree.c (init_cplus_unsave): New.
8228 (cplus_unsave_expr_now): New.
8230 1999-08-13 Mark Mitchell <mark@codesourcery.com>
8232 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
8233 decl_constant_value to simplify array bounds.
8235 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
8237 * lang-options.h: Add -fms-extensions.
8238 * cp-tree.h: Declare flag_ms_extensions.
8239 * decl2.c: Define it.
8240 * class.c (instantiate_type): Don't complain about taking the address
8241 of a bound member function if -fms-extensions.
8242 * typeck.c (build_unary_op): Likewise.
8243 * decl.c (grokdeclarator): Or about implicit int.
8244 * init.c (resolve_offset_ref): Or about implicit '&'.
8246 1999-08-11 Mark Mitchell <mark@codesourcery.com>
8248 * cp-tree.h (minimal_parse_mode): Remove.
8249 (finish_label_stmt): New function.
8250 * decl.c (saved_scope): Remove minimal parse mode.
8251 (maybe_push_to_top_level): Don't save it.
8252 (pop_from_top_level): Don't restore it.
8253 (define_label): Split out template-handling code to semantics.c.
8254 (start_decl): Don't use minimal_parse_mode.
8255 (cp_finish_decl): Likewise.
8256 (start_function): Don't increment it.
8257 (store_return_init): Don't use it.
8258 (finish_function): Don't decrement it.
8259 * parse.y (label_colon): Use finish_label_stmt throughout.
8260 * parse.c: Regenerated.
8261 * pt.c (minimal_parse_mode): Don't define it.
8262 (tsubst_expr): Use finish_label_stmt.
8263 * semantics.c (finish_label_stmt): New function.
8265 * dump.c (queue): Be careful when computing bitmasks.
8266 (dequeue_and_dump): Describe binfos as binfos, not as
8269 * parse.y (pedantic): Give it itype. Adjust usage accordingly
8271 * parse.c: Regenerated.
8273 * Make-lang.in (CXX_SRCS): Remove sig.c.
8274 * Makefile.in (CXX_OBJS): Remove sig.o.
8276 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
8277 (CPTI_SIGNATURE_TYPE): Likewise.
8278 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
8279 (opaque_type_node): Likewise.
8280 (signature_type_node): Likewise.
8281 (sigtable_entry_type): Likewise.
8282 (flag_handle_signatures): Likewise.
8283 (lang_type): Remove is_signature, is_signature_pointer,
8284 is_signature_reference, has_opaque_typedecls,
8285 sigtables_has_been_generated. Adjust dummy. Remove signature,
8286 signature_pointer_to, signature_reference_to.
8287 (IS_SIGNATURE): Remove.
8288 (SET_SIGNATURE): Remove.
8289 (CLEAR_SIGNATURE): Remove.
8290 (IS_SIGNATURE_POINTER): Remove.
8291 (IS_SIGNATURE_REFERENCE): Remove.
8292 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
8293 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
8294 (CLASSTYPE_SIGNATURE): Remove.
8295 (SIGNATURE_TYPE): Remove.
8296 (SIGNATURE_METHOD_VEC): Remove.
8297 (SIGNATURE_POINTER_TO): Remove.
8298 (SIGNATURE_REFERENCE_TO): Remove.
8299 (lang_decl_flags): Remove is_default_implementation. Rename
8300 memfunc_pointer_to to saved_tree.
8301 (IS_DEFAULT_IMPLEMENTATION): Remove.
8302 (DECL_MEMFUNC_POINTER_TO): Remove.
8303 (DECL_MEMFUNC_POINTING_TO): Remove.
8304 (DECL_SAVED_TREE): Adjust definition.
8305 (tag_types): Remove signature_type_node.
8306 (SIGNATURE_FIELD_NAME): Remove.
8307 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
8308 (SIGNATURE_OPTR_NAME): Likewise.
8309 (SIGNATURE_SPTR_NAME): Likewise.
8310 (SIGNATURE_POINTER_NAME): Likewise.
8311 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
8312 (SIGNATURE_REFERENCE_NAME): Likewise.
8313 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
8314 (SIGTABLE_PTR_TYPE): Likewise.
8315 (SIGTABLE_NAME_FORMAT): Likewise.
8316 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
8317 (SIGTABLE_TAG_NAME): Likewise.
8318 (SIGTABLE_VB_OFF_NAME): Likewise.
8319 (SIGTABLE_VT_OFF_NAME): Likewise.
8320 (finish_base_specifiers): Change prototype.
8321 (build_signature_pointer_type): Remove.
8322 (build_signature_reference_type): Remove.
8323 (build_signature_pointer_constructor): Remove.
8324 (build_signature_method_call): Remove.
8325 (build_optr_ref): Likewise.
8326 (append_signature_fields): Likewise.
8327 (signature_error): Likewise.
8328 * call.c (build_this): Remove signature support.
8329 (build_over_call): Likewise.
8330 (build_new_method_call): Likewise.
8331 * class.c (add_implicitly_declared_members): Likewise.
8332 (finish_struct_1): Likewise.
8333 (finish_struct): Likewise.
8334 * cvt.c (cp_convert_to_pointer): Likewise.
8335 (convert_to_pointer_force): Likewise.
8336 (ocp_convert): Likewise.
8337 * decl.c (sigtable_decl_p): Remove.
8338 (init_decl_processing): Remove support for signatures.
8339 (cp_finish_decl): Likewise.
8340 (grokdeclarator): Likewise.
8341 (grokparms): Likewise.
8342 (xref_tag): Likewise.
8343 (start_function): Likewise.
8344 (start_method): Likewise.
8345 * decl2.c (finish_sigtable_vardecl): Remove.
8346 (flag_handle_signatures): Remove.
8347 (lang_f_options): Remove handle-signatures.
8348 (grokfield): Remove support for signatures.
8349 (grokbitfield): Likewise.
8350 (finish_file): Likewise.
8351 (reparse_absdcl_as_casts): Likewise.
8352 * error.c (dump_type_real): Likewise.
8353 (dump_function_decl): Likewise.
8354 * friend.c (make_friend_class): Likewise.
8355 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
8356 * hash.h: Regenerated.
8357 * init.c (build_new_1): Remove support for signatures.
8358 * lang-options.h: Remove -fhandle-signatures,
8359 -fno-handle-signatures.
8360 * lex.c (init_parse): Remove support for signatures.
8361 (yyprint): Likewise.
8362 * lex.h (rid): Remove RID_SIGNATURE.
8363 * method.c (build_decl_overload_real): Remove support for
8365 (hack_identifier): Likewise.
8366 * parse.y (base_class): Likewise.
8367 (base_class.1): Likewise.
8368 (access_specifier): Likewise.
8369 * search.c (lookup_member): Likewise.
8370 * semantics.c (finish_qualified_object_call_expr): Likewise.
8371 (finish_template_type_parm): Likewise.
8372 (begin_class_definition): Likewise.
8373 (finish_base_specifier): Likewise.
8375 * tree.c (build_cplus_method_type): Remove support for signatures.
8376 * typeck.c (require_complete_type): Likewise.
8377 (c_sizeof): Likewise.
8378 (c_alignof): Likewise.
8379 (build_object_ref): Likewise.
8380 (build_component_ref): Likewise.
8381 (build_indirect_ref): Likewise.
8382 (build_c_cast): Likewise.
8383 (build_modify_expr): Likewise.
8384 (convert_for_initialization): Likewise.
8385 * typeck2.c (signature_error): Remove.
8386 (store_init_value): Remove support for signatures.
8387 (digest_init): Likewise.
8388 (build_x_arrow): Likewise.
8389 (build_functional_cast): Likewise.
8390 * xref.c (GNU_xref_decl): Likewise.
8392 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
8394 * lex.c (do_identifier): Remove unnecessary lookup of class field.
8396 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
8398 * decl2.c (set_decl_namespace): Do not complain about non-matching
8399 decls if processing a template.
8401 1999-08-09 Mark Mitchell <mark@codesourcery.com>
8403 * decl.c (build_ptrmemfunc_type): Handle qualified
8404 pointer-to-member types here.
8405 * tree.c (cp_build_qualified_type_real): Simplify handling here.
8407 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8409 * lex.c (lang_identify): Likewise.
8411 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
8413 * Makefile.in: Update dependencies.
8414 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
8416 * decl.c: Include "function.h"
8417 (cleanup_label, return_label): Delete declarations.
8418 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
8419 (finish_function): Rename last_parm_insn variable to
8420 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
8421 * decl2.c: Include "function.h".
8422 (rtl_expr_chain): Delete declaration.
8423 * method.c: Include "function.h"
8424 * tree.c (build_vbase_pointer_fields): Don't initialize
8425 DECL_SAVED_INSNS with NULL_RTX.
8426 * typeck.c: Include "function.h"
8428 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
8430 * semantics.c (begin_function_try_block, finish_function_try_block,
8431 finish_function_handler_sequence): New fns.
8432 * parse.y (function_try_block): Use them.
8433 * pt.c (instantiate_decl): Likewise.
8435 * cp-tree.h: Declare in_function_try_handler.
8436 * decl.c: Define it.
8437 (start_function): Clear it.
8438 (struct cp_function, push_cp_function_context): Save it.
8439 (pop_cp_function_context): Restore it.
8440 * parse.y (function_try_block): Set and clear it.
8441 * except.c (expand_end_catch_block): Rethrow if we reach the end
8442 of a function-try-block handler in a ctor or dtor.
8443 * typeck.c (c_expand_return): Complain about returning from a
8444 function-try-block handler of a ctor.
8446 * parse.y (function_try_block): Call end_protect_partials
8447 before expand_start_all_catch.
8449 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
8451 * decl.c (struct binding_level): Add eh_region field.
8452 (push_binding_level): Set it.
8453 (define_label): Complain about jumping into an EH block.
8455 * ptree.c (print_lang_type): Print the real type of a PMF.
8456 Print what exceptions a fn type throws.
8458 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8460 * class.c (count_fields, add_fields_to_vec): Add static prototype.
8462 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
8463 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
8466 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
8469 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
8472 * dump.c (queue_and_dump_index, dump_int, dump_string,
8473 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
8475 (dump_stmt): Add static prototype.
8477 * errfn.c (cp_thing): Constify a char*.
8479 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
8480 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
8481 dump_expr): Constify a char*.
8483 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
8484 read_line_number): Add static prototype.
8485 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
8486 (real_yylex): Move label `letter' into the scope where it is used.
8488 * method.c (build_mangled_template_parm_index, build_overload_int,
8489 build_decl_overload_real, get_id_2): Constify a char*.
8491 * search.c (check_final_overrider): Make static.
8493 * typeck.c (composite_pointer_type): Constify a char*.
8495 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
8497 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
8498 we're looking at a class.
8500 * decl.c (lookup_name_real): Set the complain flag if we're
8501 looking for a namespace member.
8503 * lex.c (real_yylex): We can have a number with no digits.
8505 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
8507 * search.c (binfo_from_vbase): New fn.
8508 * cp-tree.h: Declare it.
8509 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
8510 from pointer to member of virtual base.
8511 * typeck.c (get_delta_difference): Likewise.
8513 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
8515 * pt.c (tsubst): Use build_index_type to build in-template array
8516 index type. Fixes g++.oliva/dwarf1.C.
8517 * decl.c (grokdeclarator): Likewise, just for consistency, as it
8518 doesn't seem to trigger the bug without it.
8520 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
8522 * typeck2.c (add_exception_specifier): Use complete_type.
8524 1999-08-06 Mark Mitchell <mark@codesourcery.com>
8526 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
8527 (dump_binary_op): Bulletproof.
8528 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
8529 * tree.c (search_tree): Don't enumerate all the nodes of classes
8530 `1', `2', and `<'; handle them generically. Don't be sorry about
8531 "unrecognized tree codes"; just abort.
8532 (no_linkage_check): Don't do linkage checks for templates.
8534 * tree.c (cp_build_qualified_type_real): Handle
8535 pointer-to-member-function types correctly.
8537 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
8539 * decl.c (pushdecl): Only give an error for shadowing a parm
8540 from *this* function.
8542 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
8544 * typeck2.c: Update URLs and mail addresses.
8546 1999-08-04 Nathan Sidwell <nathan@acm.org>
8548 * cp-tree.h (empty_except_spec): New global var.
8549 (compexcepttypes): Remove prototype.
8550 (comp_except_specs): Prototype new global function.
8551 (add_exception_specifier): Prototype new global function.
8552 * decl.c (empty_except_spec): Define new global var.
8553 (duplicate_decls): Use comp_except_specs, reword error message.
8554 (init_decl_processing): Initialize empty_except_spec.
8555 Adjust build_exception_variant calls.
8556 * parse.y (exception_specification_opt): Use empty_except_spec.
8557 (ansi_raise_identifier): Call check_for_new_type.
8558 (ansi_raise_identifiers): Use add_exception_specifier.
8559 * pt.c (tsubst): Use add_exception_specifier to build exception
8561 * search.c (check_final_overrider): New static function, broken
8562 out of get_matching_virtual. Check throw specifiers, reword
8564 (get_matching_virtual): Use check_final_overrider.
8565 * tree.c (build_exception_variant): Use comp_except_specs.
8566 * typeck.c (compexcepttypes): Remove.
8567 (comp_except_types): New static function, helper for
8568 comp_except_specs. Compare two types as exception specifiers.
8569 (comp_except_specs): New global function, compare two exception
8571 (comptypes): Adjust for comp_except_specs.
8572 * typeck2.c (add_exception_specifier): New global function.
8574 * class.c (check_for_override): Reword error message.
8576 1999-08-03 Nathan Sidwell <nathan@acm.org>
8578 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
8579 * cp-tree.h (struct lang_type): Added non_pod_class flag.
8580 (CLASSTYPE_NON_POD_P): New macro to access it.
8581 * class.c (finish_struct_1): Determine non-PODness.
8582 Check for arrays of pointers (-Weffc++).
8583 Remove array inspection duplicated code.
8584 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
8585 Use CLASSTYPE_NON_POD_P.
8587 1999-08-03 Nathan Sidwell <nathan@acm.org>
8589 * class.c (duplicate_tag_error): Preserve template information.
8591 1999-08-03 Nathan Sidwell <nathan@acm.org>
8593 * decl.c (start_enum): Show location of previous definition.
8594 * parse.y (enumlist_opt): New reduction.
8595 (structsp): Simplify enum rules to use enumlist_opt.
8597 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
8599 * lex.c (yyprint): Handle PFUNCNAME.
8601 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
8602 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
8604 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
8606 * decl.c (start_decl): Set attributes before duplicate_decls call.
8608 1999-08-02 Mark Mitchell <mark@codesourcery.com>
8610 * Make-lang.in (CXX_SRCS): Add dump.c.
8611 * Makefile.in (CXX_OBJS): Add dump.o.
8612 (dump.o): New target.
8613 * cp-tree.h (DECL_CONV_FN_P): Document.
8614 (DECL_OVERLOADED_OPERATOR_P): New function.
8615 (TYPE_PTRMEM_CLASS_TYPE): New macro.
8616 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
8617 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
8618 (ASM_VOLATILE_P): New macro.
8619 (STMT_LINENO): Likewise.
8620 (cp_namespace_decls): New function.
8621 (dump_node_to_file): New function.
8622 * decl.c (cp_namespace_decls): New function.
8623 (walk_namespaces_r): Use it.
8624 (wrapup_globals_for_namespace): Likewise.
8625 * decl2.c (flag_dump_translation_unit): New variable.
8626 (lang_decode_option): Handle -fdump-translation-unit.
8627 (finish_file): If flag_dump_translation_unit is set, dump the
8630 * lang-options.h: Add -fdump-translation-unit.
8631 * pt.c (tsubst_template_parms): Robustify.
8632 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
8633 (tsubst_expr): Use STMT_LINENO.
8634 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
8635 for invalid cv-qualifiers even while building templates.
8637 1999-08-02 Richard Henderson <rth@cygnus.com>
8639 * call.c: Include defaults.h instead of expr.h.
8642 * typeck.c: Include defaults.h.
8644 1999-08-02 Mark Mitchell <mark@codesourcery.com>
8646 * lex.c (errorcount, sorrycount): Don't declare.
8647 * repo.c (errorcount, sorrycount): Likewise.
8648 * typeck2.c (errorcount, sorrycount): Likewise.
8650 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
8652 * call.c (convert_default_arg, build_over_call): Change all uses of
8653 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
8654 Ensure expr.h is included.
8655 * decl.c (grokparams): Ditto.
8656 * pt.c (tsubst_decl): Ditto.
8657 * typeck.c (convert_arguments): Ditto.
8659 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
8661 * class.c (mark_overriders): Fix order of args to overrides.
8662 (warn_hidden): Likewise. Fix for having virtual and non-virtual
8663 functions with the same name.
8665 1999-08-02 Richard Henderson <rth@cygnus.com>
8667 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
8669 1999-08-01 Mark Mitchell <mark@codesourcery.com>
8671 * call.c (build_conditional_expr): Fix typo in comment.
8673 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
8675 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
8676 case_stack; use in_control_zone_p.
8677 * typeck.c (c_expand_return): Likewise.
8679 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
8681 * except.c (catch_clauses): Delete declaration.
8683 1999-07-30 Mark Mitchell <mark@codesourcery.com>
8685 * call.c (build_conditional_expr): Call convert_from_reference to
8686 avoid reference/non-reference type confusion. Fix typo.
8688 1999-07-30 Richard Henderson <rth@cygnus.com>
8690 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
8691 * cp-tree.h (initializer_constant_valid_p): Remove.
8693 1999-07-28 Mark Mitchell <mark@codesourcery.com>
8695 * call.c (conditional_conversion): Don't build BASE_CONVs for
8696 conversions between things that have the same type.
8697 (build_conditional_expr): Tweak.
8698 (convert_like): Some BASE_CONVs really do require the generation
8701 * init.c (perform_member_init): Don't go through build_modify_expr
8702 for simple initializations.
8704 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
8706 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
8707 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
8708 virtual functions and MI. Simplify.
8710 * method.c: Remove prototype for largest_union_member.
8711 * pt.c (determine_specialization): Fix uninitialized warning.
8712 * lex.c (real_yylex): Likewise.
8714 1999-07-27 Mark Mitchell <mark@codesourcery.com>
8716 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
8719 * cp-tree.h (BINFO_VIRTUALS): Document new format.
8720 * class.c (modify_one_vtable): Change prototype accordingly.
8721 (modify_all_vtables): Likewise.
8722 (modify_all_direct_vtables): Likewise.
8723 (modify_all_indirect_vtables): Likewise.
8724 (build_vtable_entry_for_fn): New function.
8725 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
8726 (modify_vtable_entry): Likewise.
8727 (add_virtual_function): Likewise.
8728 (build_vtbl_initializer): New function.
8729 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
8730 (fixup_vtable_deltas1): Likewise.
8731 (fixup_vtable_deltas): Likewise.
8732 (override_one_vtable): Likewise.
8733 (finish_struct_1): Likewise.
8735 * error.c (dump_expr): Likewise.
8736 * search.c (get_abstract_virtuals_1): Likewise.
8737 (get_abstract_virtuals): Likewise.
8738 (expand_upcast_fixups): Likewise.
8739 * tree.c (debug_binfo): Likewise.
8740 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
8741 __pure_virtual here.
8743 1999-07-26 Mark Mitchell <mark@codesourcery.com>
8745 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
8746 as per 1999-07-26 change.
8748 * typeck.c (c_sizeof): Don't allow non-static data members.
8749 (expr_sizeof): Likewise.
8751 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
8753 * input.c (feed_input): Only touch lineno and input_filename
8754 if !USE_CPPLIB. Save the old values before setting the new ones.
8756 * input.c (feed_input): Add file, line parms.
8757 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
8758 (real_yylex): Check linemode before input_redirected().
8760 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
8761 from op new to warning.
8763 1999-07-26 Mark Mitchell <mark@codesourcery.com>
8765 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
8766 * call.c: All uses changed.
8767 * typeck.c: Likewise.
8769 1999-07-26 Nathan Sidwell <nathan@acm.org>
8771 * exception.cc (__cplus_type_matcher): Match __eh_matcher
8774 1999-07-26 Mark Mitchell <mark@codesourcery.com>
8776 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
8777 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
8778 (strip_top_quals): Declare.
8779 (ncp_convert): Likewise.
8780 (type_after_usual_arithmetic_converions): Likewise.
8781 (composite_pointer_type): Likewise.
8782 * call.c (strip_top_quals): Don't make it static.
8783 (promoted_arithmetic_type_p): New function.
8784 (conditional_conversion): Likewise.
8785 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
8786 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
8787 for converting a type to itself.
8788 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
8789 (implicit_conversion): Make sure the from and to types are
8791 (add_builtin_candidate): Correct handling of ?: operator.
8792 (add_builtin_candidates): Improve documentation.
8793 (build_conditional_expr): New function.
8794 (can_convert): Implement in terms of can_convert_arg.
8795 (ncp_convert): New function.
8796 * typeck.c (type_after_usual_arithmetic_conversions): New
8797 function, split out from common_type.
8798 (composite_pointer_type): New function, split out from
8799 build_conditional_expr.
8800 (common_type): Use type_after_usual_arithmetic_conversions.
8801 Remove redundant attribute merging.
8802 (comptypes): Tidy. Handle COMPLEX_TYPE.
8803 (build_binary_op_nodefault): Use null_ptr_cst_p.
8804 (build_conditional_expr): Remove.
8805 (convert_for_assignment): Use new conversion functions.
8807 * cp-tree.h (abstract_virtuals_error): Change declaration.
8808 * typeck2.c (abstract_virtuals_error): Check to see if an error
8809 ocurred, and return a boolean value accordingly.
8810 (build_functional_cast): Adjust accordingly.
8811 * class.c (finish_struct_1): Likewise.
8812 * cvt.c (ocp_convert): Likewise.
8813 * decl.c (cp_finish_decl): Likewise.
8814 (grokparams): Likewise.
8815 (grok_op_properties): Likewise.
8816 (start_function): Likewise.
8817 * init.c (build_new_1): Likewise.
8819 * pt.c (unify): Don't get confused by pointers-to-member functions.
8821 * search.c (build_cplus_new): Robustify.
8823 1999-07-24 Richard Henderson <rth@cygnus.com>
8825 * gxx.gperf (__builtin_va_arg): New.
8826 * parse.y (VA_ARG): New token.
8827 (unary_expr): Recognize it.
8829 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
8831 * g++FAQ.texi: Deleted per Joe Buck's request.
8832 * Makefile.in: Corresponding changes.
8834 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
8836 * lex.c: Sync with C frontend.
8837 (whitespace_cr): New fn.
8838 (skip_white_space): Use it.
8839 (init_parse): Reorder.
8840 (yyprint): Support CONSTANT.
8841 (pragma_getc, pragma_ungetc): Bring back.
8842 (read_line_number): Change in_system_header directly.
8843 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
8844 (parse_float): Update to C version.
8845 (yylex): Handle '$' under the letter case.
8846 Remove looking_for_typename handling.
8847 Support hex floating point constants.
8848 Follow C's lead for choosing type of integer constants.
8849 Rearrange stuff to match C frontend.
8850 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
8851 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
8853 1999-07-23 Mark Mitchell <mark@codesourcery.com>
8855 * call.c (reference_binding): Tweak.
8856 (mayble_handle_implicit_object): Use direct_reference_binding to
8857 create the right implicit conversion sequence.
8859 1999-07-22 Mark Mitchell <mark@codesourcery.com>
8861 * pt.c (convert_nontype_argument): Don't call decl_constant_value
8862 if we're converting to a reference type.
8864 * call.c (NEED_TEMPORARY_P): New macro.
8865 (standard_conversion): Set it, for derived-to-base conversions.
8866 (reference_related_p): New function.
8867 (reference_compatible_p): Likewise.
8868 (convert_class_to_reference): Likewise.
8869 (direct_reference_binding): Likewise.
8870 (reference_binding): Rework for standards-compliance.
8871 (convert_like): Adjust accordingly.
8872 (maybe_handle_ref_bind): Simplify; the right conversion sequences
8873 are now built up in reference_binding.
8874 (initialize_reference): New function.
8875 * cp-tree.h (ICS_USER_FLAG): Document.
8876 (ICS_THIS_FLAG): Likewise.
8877 (ICS_BAD_FLAG): Likewise.
8878 (NEED_TEMPORARY_P): Likewise.
8879 (cp_lvalue_kind): New type.
8880 (real_lvalue_p): Return it.
8881 * error.c (dump_expr): Provide more accurate representation for
8883 * init.c (expand_default_init): Do not try to perform implicit
8884 conversions for a brace-enclosed initializer.
8885 * search.c (lookup_conversions): Document.
8886 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
8888 (real_lvalue_p): Adjust accordingly.
8889 (lvalue_p): Likewise.
8890 (build_cplus_new): Don't allow the creation of an abstract class.
8891 * typeck.c (convert_for_initialization): Use initialize_reference.
8893 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
8895 * lex.c (real_yylex) : Correct the test for overflow when lexing
8898 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
8900 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
8901 not DECL_BUILT_IN, to determine if a function is internally declared.
8902 (duplicate_decls): Likewise. Improve handling of builtins.
8903 (push_overloaded_decl): Remove special handling of builtins.
8905 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
8907 * decl.c (grokdeclarator): Pull out decl_constant_value in
8910 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
8911 * cp-tree.h, pt.c, semantics.c: Adjust.
8912 * method.c (largest_union_member): Remove.
8914 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
8916 * lex.c (token_getch, token_put_back): New fns.
8917 (real_yylex): Use them.
8919 * lex.c (lang_init): Generalize.
8920 (lang_init_options): Tell cpplib this is C++.
8921 (nextchar): Remove. Replace uses with put_back.
8922 (skip_white_space): Handle linemode here. Optimize for cpplib.
8923 (extend_token_buffer_to): New fn.
8924 (extend_token_buffer): Use it.
8925 (read_line_number, check_newline): Just deal with tokens.
8926 (real_yylex): More cpplib optimizations. Simplify. Don't produce
8927 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
8928 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
8929 * parse.y (PAREN_STAR_PAREN): Remove.
8930 * input.c: Don't use the putback machinery with cpplib.
8931 (sub_getch): Fold back into getch.
8932 (getch): Don't handle linemode here.
8933 (feed_input): Unget any text in the token buffer.
8935 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
8936 nextyychar, nextyylval): Remove.
8938 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
8939 Jason Merrill <jason@yorick.cygnus.com>
8941 * lex.c (indent_level): New variable.
8942 (init_parse): Set cpp_token to CPP_DIRECTIVE.
8943 (consume_string): Make this smart about USE_CPPLIB.
8944 (yyungetc): Use put_back function.
8945 (pragma_getc, pragma_ungetc): Functions deleted.
8946 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
8947 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
8949 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
8950 Also, clean up cases where we redundantly set token_buffer[0].
8951 (read_line_number): New fn.
8952 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
8953 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
8954 (sub_getch): Conditionalize out code that's not appropriate if
8956 (put_back): Rewrite in case USE_CPPLIB is defined.
8957 (input_redirected): Ditto.
8959 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
8961 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
8962 c_global_trees and accessor macros defined in c-common.h.
8963 (cp_tree_index): New enumeration.
8964 (cp_global_trees): Declare new array. Add accessor macros for it, and
8965 delete declarations of tree nodes replaced by it.
8966 (builtin_function): Delete macro, add declaration for new function.
8968 * decl.c: Delete definitions for tree nodes that were replaced by
8969 cp_global_trees and c_global_trees.
8970 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
8971 to generate the common builtins here.
8972 (builtin_function): New function.
8973 * decl2.c (abort_fndecl): Delete declaration.
8974 * except.c (expand_builtin_return_address): Delete declaration.
8975 (builtin_return_address_fndecl): Delete variable.
8976 (const_ptr_type_node): Delete declaration.
8977 * lex.c (cons_up_default_function): Delete declaration of
8979 * parse.y (void_list_node): Delete declaration.
8980 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
8982 (const_string_type_node): Delete declaration.
8983 * search.c (abort_fndecl): Delete declaration.
8984 * Makefile.in: Update dependencies.
8986 1999-07-19 Mark Mitchell <mark@codesourcery.com>
8988 * pt.c (check_default_tmpl_args): Move test for missing default
8989 arguments here, from ...
8990 (end_template_parm_list): Here.
8992 1999-07-18 Mark Mitchell <mark@codesourcery.com>
8994 * decl.c (lookup_nested_type): Remove.
8995 (pushtag): Don't call it.
8997 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
8999 * Makefile.in (INTERFACE): Bump to 2.
9001 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
9003 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
9004 instructions to gcc.gnu.org. Removed e-mail address.
9006 1999-07-17 Mark Mitchell <mark@codesourcery.com>
9008 * pt.c (determine_specialization): Tighten error-checking.
9009 (end_template_parm_list): Likewise.
9011 1999-07-14 Mark Mitchell <mark@codesourcery.com>
9013 * pt.c (check_default_tmpl_args): Handle friends defined in the
9014 class just like member functions defined in the class.
9016 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
9017 Jason Merrill <jason@yorick.cygnus.com>
9019 * cp-tree.h (struct lang_decl): Added field for storing sorted
9020 FIELD_DECLs (used in TYPE_DECLs).
9021 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
9022 (DECL_SORTED_FIELDS): New macro.
9023 * class.c (method_name_cmp): New function.
9024 (finish_struct_methods): Modified to support sorting and searching
9026 (finish_struct_anon): Changed code in inner loop to use ELT rather
9027 than UELT (which required an extra indirection for every reference).
9028 (field_decl_cmp): New function to support sorting FIELD_DECLs.
9029 (finish_struct_1): Sort fields.
9030 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
9031 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
9032 Also, switch to using array indexing rather than a changing pointer.
9033 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
9036 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
9038 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
9039 casts in system headers or extern "C" blocks.
9041 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
9044 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
9046 * decl2.c (write_virtuals): Deleted declaration.
9047 * cp-tree.h (write_virtuals): Deleted extern declaration.
9048 * class.c (finish_struct_1): Removed #if 0'd code that mentions
9050 * semantics.c (begin_class_definition): Rewrite code to not depend
9053 * lex.c (cp_pragma_interface): New function.
9054 (cp_pragma_implementation): Likewise.
9055 (handle_cp_pragma): Call them.
9057 * typeck.c (comptypes): Simplify C code in look_hard.
9059 * xref.c (PALLOC): Use xcalloc, not calloc.
9060 (SALLOC): Use xmalloc, not malloc.
9062 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
9064 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
9067 * decl.c (duplicate_decls): If a redeclaration doesn't match the
9068 initial declaration, then don't save the inline info and by all
9069 means don't mark the function as a builtin function.
9071 * decl.c (lookup_name_real): Set NONCLASS to 1 if
9072 CURRENT_CLASS_TYPE is 0.
9074 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
9077 * ptree.c (print_lang_type): Added vtable-needs-writing.
9079 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
9081 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
9083 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
9085 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
9086 Merged into c-common.
9088 1999-07-05 Dave Brolley <brolley@cygnus.com>
9090 * lex.c (errorcount): Declare it.
9091 (finish_parse): Update errorcount for when using CPPLIB.
9093 1999-07-05 Mark Mitchell <mark@codesourcery.com>
9095 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
9097 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
9098 * decl.c (push_class_binding): Use it.
9099 (lookup_name_real): Likewise.
9101 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
9103 * cp-tree.h (widest_integer_literal_type_node,
9104 widest_unsigned_literal_type) : New.
9105 * decl.c (widest_integer_literal_type_node,
9106 widest_unsigned_literal_type) : New.
9107 (init_decl_processing): Handle/use the two new types.
9108 * lex.c (real_yylex): Same.
9109 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
9112 1999-07-01 Mark Mitchell <mark@codesourcery.com>
9114 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
9115 to anonymous cv-qualified types.
9117 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
9119 * lex.c (real_yylex) : Change integer literal overflow handling to
9122 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
9124 1999-06-28 Richard Henderson <rth@cygnus.com>
9126 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
9128 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
9130 * error.c (dump_type_real): Handle TREE_LIST again.
9132 * typeck.c (comp_target_parms): Don't complain about
9133 converting from () to (...) if !flag_strict_prototype.
9135 * decl.c (grokdeclarator): Update the names of all variants when
9138 1999-06-21 Mark Mitchell <mark@codesourcery.com>
9140 * init.c (expand_aggr_vbase_init): Rename to
9141 construct_virtual_bases. Conditionalize construction here,
9143 (emit_base_init): Here.
9145 1999-06-19 Mark Mitchell <mark@codesourcery.com>
9147 * semantics.c (finish_asm_stmt): Apply decay conversions to
9150 * decl.c (expand_static_init): When building an anonymous function
9151 for use with atexit, compute its body before and after entering
9154 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
9157 1999-06-18 Mark Mitchell <mark@codesourcery.com>
9159 * init.c (expand_aggr_vbase_init): Add flag parameter.
9160 (build_partial_cleanup_for): Remove, inlining into ..
9161 (expand_cleanup_for_base): ... here. Take flag parameter.
9162 (emit_base_init): Pass the in_chrg parameter to
9163 emit_aggr_vbase_init.
9164 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
9166 1999-06-16 Mark Mitchell <mark@codesourcery.com>
9168 * decl2.c (import_export_decl): Use same_type_p, rather than
9169 relying on pointer-equality for types.
9171 * method.c (do_build_copy_constructor): Simplify.
9173 * call.c (build_method_call): Remove bogus code for two-argument
9175 * init.c (build_new_1): Expand on comment, and remove dead code.
9177 * init.c (expand_cleanup_for_base): New function, split out
9179 (emit_base_init): Here.
9180 (expand_aggr_vbase_init): Use it.
9182 1999-06-15 Mark Mitchell <mark@codesourcery.com>
9184 * cp-tree.h (class_cache_firstobj): Declare.
9185 (maybe_push_cache_obstack): Rename to push_cache_obstack.
9186 * class.c (permanent_obstack): Remove declaration.
9187 (class_cache_firstobj): Make it global.
9188 (add_method): Don't use permanent_obstack directly.
9189 (pushclass): Only free the class_cache_obstack if we know how far
9191 (maybe_push_cache_obstack): Rename to push_cache_obstack.
9192 * decl.c: Remove dead comment.
9193 (saved_scope): Add class_cache_firstobj.
9194 (push_to_top_level): Save it.
9195 (pop_from_top_level): Restore it.
9196 (push_class_level_binding): Use push_cache_obstack, not
9197 maybe_push_cache_obstack.
9198 * search.c (push_class_decls): Likewise.
9200 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
9202 * pt.c (tsubst_friend_function): Push into namespace of friend
9203 function before pushdecl'ing it.
9205 1999-06-14 Nathan Sidwell <nathan@acm.org>
9207 * call.c (build_new_op): Remove REF_BIND from all operands.
9209 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
9211 * init.c (build_new_1): Look up operator delete even if there was
9212 no explicit new placement.
9214 1999-06-08 Nathan Sidwell <nathan@acm.org>
9216 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
9218 (build_throw): ... here. Call it.
9219 (process_start_catch_block): Call it.
9221 1999-06-07 Mark Mitchell <mark@codesourcery.com>
9223 * search.c (convert_pointer_to_single_level): Reimplement without
9226 1999-06-06 Mark Mitchell <mark@codesourcery.com>
9228 * method.c (is_back_referenceable_type): Back-reference bools when
9231 1999-06-07 Dave Brolley <brolley@cygnus.com>
9233 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
9234 * input.c (putback_buffer): New structure type.
9235 (putback): Replaces putback_char member.
9236 (putback): Replaces putback_char static variable.
9237 (feed_input): Use putback.
9238 (end_input): Use putback.
9239 (sub_getch): Use putback.
9240 (put_back): Use putback.
9242 1999-06-05 Mark Mitchell <mark@codesourcery.com>
9244 * decl.c (grokdeclarator): Fix typo in last change.
9246 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
9248 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
9249 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
9251 1999-06-04 Nathan Sidwell <nathan@acm.org>
9253 * except.c (build_throw): Check throw expression validity.
9255 1999-06-03 Mark Mitchell <mark@codesourcery.com>
9257 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
9258 just because flag_signed_bitfields is false.
9260 1999-06-03 Nathan Sidwell <nathan@acm.org>
9262 * semantics.c (begin_class_definition): Update the struct's
9264 * class.c (finish_struct): ... rather than here.
9266 * decl.c (make_typename_type): Don't rely on uninitialized
9269 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9271 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
9273 1999-05-31 Mark Mitchell <mark@codesourcery.com>
9275 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
9276 and friends rather than messing with current_obstack directly.
9277 (cp_build_qualified_type_real): Rework ARRAY_TYPE
9278 allocation to match practice throughout the rest of the
9281 1999-05-30 Mark Mitchell <mark@codesourcery.com>
9283 * lex.c (make_lang_type): Create TYPE_BINFO for
9284 TEMPLATE_TYPE_PARMs just like for non-template types.
9286 * decl.c (start_decl): Move checks on initialization to ...
9287 (cp_finish_decl): Here. Tidy formatting slightly.
9289 1999-05-28 Mark Mitchell <mark@codesourcery.com>
9291 * decl.c (add_binding): Don't complain about a redeclaration of a
9292 semantically identical typedef in a local scope.
9294 1999-05-28 Nathan Sidwell <nathan@acm.org>
9296 * decl.c (complete_array_type): Allocate off same obstack. Fix
9297 DO_DEFAULT comment to match reality.
9299 * friend.c (make_friend_class): Fix diagnostic typo.
9301 1999-05-28 Mark Mitchell <mark@codesourcery.com>
9303 * decl.c (lookup_namespace_name): Handle getting a
9305 (expand_static_init): Don't call pushdecl for implicitly declared
9306 `atexit' used to register destructors.
9308 1999-05-25 Mark Mitchell <mark@codesourcery.com>
9310 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
9313 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
9314 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
9315 by combining TEMPLATE_INFO and LEVEL into a single union.
9316 (DECL_TEMPLATE_INFO): Reformat.
9317 (DECL_SAVED_TREE): Document.
9318 (DECL_TEMPLATE_INJECT): Remove.
9319 * class.c (finish_struct): Remove code to deal with
9320 DECL_TEMPLATE_INJECT.
9322 * decl.c (maybe_process_template_type_declaration): Handle all new
9323 types in templates uniformly.
9324 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
9326 * pt.c (lookup_template_class): Inject template instantiations of
9327 forward-declarations.
9328 (instantiate_class_template): Remove code processing
9329 DECL_TEMPLATE_INJECT.
9331 * pt.c (lookup_template_class): Tweak lookup to find member
9334 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
9336 * semantics.c (finish_asm_stmt): Make strings permanent if they're
9339 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
9341 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
9342 parts of pointer to data member types.
9344 1999-05-24 Mark Mitchell <mark@codesourcery.com>
9346 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
9347 and then make it look like `abort'. Just use `abort' instead.
9349 * typeck.c (build_static_cast): Don't allow static_casts that cast
9351 (casts_away_constness_r): New function.
9352 (casts_away_constness): Likewise.
9354 * decl.c (lookup_tag): Remove code no longer needed after
9355 name-lookup improvements.
9356 * decl2.c (handle_class_head): Make error-recovery more robust.
9357 * friend.c (make_friend_class): Reject templated typename types.
9358 * lex.c (is_global): A template parameter isn't global.
9359 * parse.y (class_head): Robustify.
9360 * parse.c: Regenerated.
9362 1999-05-22 Mark Mitchell <mark@codesourcery.com>
9364 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
9365 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
9367 * cp-tree.h (push_nested_namespace): Declare.
9368 (pop_nested_namespace): Likewise.
9369 * decl.c (push_nested_namespace): New function.
9370 (pop_nested_namespace): Likewise.
9371 * pt.c (instantiate_class_template): Use them.
9373 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
9375 * cp-tree.h (cplus_expand_constant): Declare.
9376 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
9377 converted from one pointer-to-object type to another.
9378 * expr.c (cplus_expand_constant): Don't make it static.
9379 * typeck.c (build_component_ref): Don't crash when presented with
9380 a component which is a TEMPLATE_DECL.
9381 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
9382 cast from a pointer-to-member constant to its own type does not
9383 result in a valid non-type template argument.
9385 1999-05-21 Mark Mitchell <mark@codesourcery.com>
9386 Nathan Sidwell <nathan@acm.org>
9388 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
9389 * cp-tree.h: Fix typo in documentation on pointers-to-members.
9390 (cp_build_qualified_type): Make it a macro.
9391 (cp_build_qualified_type_real): Declare.
9392 * decl.c (grokdeclarator): Remove misleading comment. Avoid
9393 problem with template parameters and restrict-qualification.
9394 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
9395 * hash.h: Regenerated.
9396 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
9398 (NORID): Remove definition.
9399 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
9400 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
9401 (fn_type_unification): Check that the function type resulting from
9402 the deduction is legal.
9403 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
9404 (unify): Use cp_build_qualified_type_real.
9405 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
9406 (cp_build_qualified_type): Rename to ...
9407 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
9408 and modify appropriately.
9410 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
9411 reveal optimization opportunities.
9413 * pt.c (tsubst): Don't issue error messages when we're not
9414 complaining, even if we see a qualified function type.
9415 (check_cv_quals_for_unify): Don't allow a qualified function
9418 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
9420 * class.c (instantiate_type): Downgrade errors for object-dependent
9421 memfn refs to pedwarn.
9423 1999-05-20 Mark Mitchell <mark@codesourcery.com>
9425 * decl.c (grokdeclarator): Don't treat [] as indicating a
9426 zero-sized array in a typedef.
9428 * call.c (build_object_call): Don't look at DECL_NAME for a type.
9429 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
9430 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
9432 * pt.c (for_each_template_parm): Rework to match documentation.
9433 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
9435 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
9437 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
9439 * class.c (finish_base_struct): Allow non-COM bases for COM classes
9440 except at the leftmost position.
9441 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
9442 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
9443 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
9445 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
9446 (build_cplus_new): Make sure that what we return is of the right type.
9448 1999-05-20 Mark Mitchell <mark@codesourcery.com>
9450 * cp-tree.h (make_ptrmem_cst): New function.
9451 * expr.c (cplus_expand_constant): Split out from ...
9452 (cplus_expand_expr): Here. Use cplus_expand_constant.
9453 (init_cplus_expand): Set lang_expand_constant.
9454 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
9456 * tree.c (make_ptrmem_cst): Define.
9457 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
9458 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
9460 1999-05-19 Mark Mitchell <mark@codesourcery.com>
9462 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
9464 * decl2.c (start_static_storage_duration_function): Fix comment.
9465 (finish_file): Create static storage duration functions lazily.
9467 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
9469 Implement anonymous structs.
9470 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
9471 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
9472 * class.c (finish_struct_1): Remove redundant check for anon struct.
9473 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
9474 (check_tag_decl): Check for anonymous struct here.
9475 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
9476 * init.c (sort_member_init, emit_base_init): Handle getting fields
9477 as well as names in current_member_init_list.
9478 (perform_member_init): Handle getting an anon aggr.
9479 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
9480 (do_build_copy_constructor): Likewise.
9482 1999-05-19 Mark Mitchell <mark@codesourcery.com>
9484 * tree.c (cp_build_qualified_type): Don't allow qualified function
9487 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
9489 * gxxint.texi: Fix typo.
9491 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
9493 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
9494 * class.c (finish_struct_1): Use CLASS_TYPE_P.
9495 * ptree.c (print_lang_type): Likewise.
9496 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
9498 * typeck2.c (digest_init): Likewise.
9500 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
9502 * call.c (joust): Compare the types of the conv ops, not the
9503 target types of the conversions.
9505 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
9507 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
9510 1999-05-17 Mark Mitchell <mark@codesourcery.com>
9512 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
9513 * decl.c (grokfndecl): Don't allow inline declarations of friend
9514 template specializations, or friend template specializations with
9516 * pt.c (tsubst): Handle substitution into array types that does
9517 not yield a fixed upper bound, even when not processing a
9519 (tsubst_copy): Deal with the fact that the second operand to a
9520 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
9521 * search.c (marked_pushdecls_p): Don't descend into
9522 TEMPLATE_TYPE_PARMs and the like.
9523 (unmarked_pushdecls_p): Likewise.
9525 * call.c (build_over_call): Don't throw away
9526 initializations/copies of empty classes; use MODIFY_EXPR and
9527 INIT_EXPR as for non-empty classes.
9528 * class.c (finish_struct_1): Put the padding byte for an empty
9529 class on the TYPE_NONCOPIED_PARTS list for the class.
9531 1999-05-16 Mark Mitchell <mark@codesourcery.com>
9533 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
9534 indicate a reference to a field that is a qualified name.
9536 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
9538 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
9539 ASM_OUTPUT_CONSTRUCTOR.
9541 * friend.c (do_friend): Add attrlist arg. Remove support for
9542 getting a non-decl as 'decl'.
9543 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
9545 (grokdeclarator): Adjust.
9546 * cp-tree.h: Adjust.
9548 1999-05-16 Mark Mitchell <mark@codesourcery.com>
9550 * cp-tree.h (permanent_p): New function.
9551 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
9552 possibly complex tree node.
9553 * tree.c (mapcar): Adjust comments, and follow coding standards in
9555 (permanent_p): New function.
9557 1999-05-13 Per Bothner <bothner@cygnus.com>
9559 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
9560 primitive Java types, if we actually see `extern "Java"'.
9562 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
9564 * lang-specs.h: Pass -$ to the preprocessor.
9566 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
9568 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
9569 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
9570 (resolve_offset_ref): Don't handle a raw baselink.
9571 * cvt.c (build_expr_type_conversion): Likewise.
9572 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
9573 convert_for_initialization): Likewise.
9574 * class.c (instantiate_type): Handle seeing a baselink under an
9576 * error.c (dump_expr): Likewise.
9577 * pt.c (for_each_template_parm): Likewise.
9578 (resolve_overloaded_unification): Likewise.
9579 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
9580 * typeck.c (expr_sizeof): Also complain about other permutations
9581 of overloaded functions.
9583 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
9585 * init.c (resolve_offset_ref): Don't return a raw method.
9587 * typeck.c (decay_conversion): Don't handle a raw method.
9588 Resolve all OFFSET_REFs.
9589 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
9590 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
9591 same_type_p for pmf bits. Don't use build_binary_op to compare
9592 raw pointers to methods.
9593 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
9594 to decide when to call resolve_offset_ref.
9595 (build_c_cast, convert_for_initialization): Likewise.
9596 * cvt.c (build_expr_type_conversion): Likewise.
9598 1999-05-06 Nathan Sidwell <nathan@acm.org>
9600 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
9602 1999-05-05 Mark Mitchell <mark@codesourcery.com>
9604 * decl2.c (start_objects): Don't let static constructors and
9605 destructors get inlined.
9607 * parse.y (nested_name_specifier): Make sure ordinary types are
9608 complete, just like template types.
9609 * parse.c: Regenerated.
9611 * pt.c (check_explicit_specialization): Improve error messages.
9613 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
9615 * typeck.c (string_conv_p): Use same_type_p to check whether we
9616 try to convert between char and wchar_t.
9618 1999-05-03 Mark Mitchell <mark@codesourcery.com>
9620 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
9621 lookup to error_mark_node here.
9622 (lookup_member): Revise documentation. Add comments. Don't set
9623 the TREE_TYPE to error_mark_node here, and don't build up an extra
9624 TREE_LIST for ambiguous lookups.
9625 (setup_class_bindings): Adjust accordingly.
9626 (push_class_decls): Revise out-of-date comments.
9628 * typeck.c (build_const_cast): Tighten checks for legality.
9630 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
9632 * init.c (build_member_call): Lookup names coming from
9633 namespace-scoped LOOKUP_EXPR.
9635 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
9637 * gxxint.texi: Add documentation for 'I'.
9639 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
9641 * tinfo.cc (operator==): Qualify type_info with std::.
9643 1999-05-02 Mark Mitchell <mark@codesourcery.com>
9645 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
9646 (DECL_COMDAT): Remove definition.
9648 1999-05-01 Mark Mitchell <mark@codesourcery.com>
9650 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
9653 1999-04-30 Mark Mitchell <mark@codesourcery.com>
9655 * class.c (build_vtable): Use build_lang_decl when building
9656 vtables, not just build_decl.
9657 (prepare_fresh_vtable): Likewise.
9658 * decl.c (wrapup_globals_for_namespace): Mark vtables as
9659 DECL_EXTERNAL when calling wrapup_global_declarations.
9660 * decl2.c (priority_info_s): Add initializations_p and
9661 destructions_p members.
9662 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
9663 when deciding what vtables to write out.
9664 (ssdf_decls): New variable.
9665 (ssdf_decls_used): Likewise.
9666 (start_static_storage_duration_function): Deal with being called
9667 multiple times. Avoid inlining this function.
9668 (generate_inits_for_priority): Deal with reuse of priority map.
9669 (get_priority_info): Clear initializations_p and destructions_p.
9670 (do_static_initialization): Tweak comment.
9671 (do_static_destruction): Likewise. Fix condition on sentries for
9673 (generate_ctor_or_dtor_function): Call all of the static storage
9675 (generate_ctor_or_dtor_function_for_priority): Check
9676 initializations_p and destructions_p to see what priorities need
9677 initialization functions.
9678 (finish_file): Rework to generate multiple static storage duration
9679 functions, rather than just one.
9681 * typeck.c (build_const_cast): Tweak last change to handle
9682 templates correctly.
9684 * typeck.c (build_const_cast): Disallow use of const_cast to
9685 anything but a pointer or reference type.
9687 1999-04-30 Nathan Sidwell <nathan@acm.org>
9689 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
9692 1999-04-29 Mark Mitchell <mark@codesourcery.com>
9694 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
9695 (finish_file): Indent comments properly.
9697 1999-04-29 Richard Henderson <rth@cygnus.com>
9699 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
9700 (do_static_destruction): Likewise.
9702 1999-04-29 Nathan Sidwell <nathan@acm.org>
9704 * cp-tree.h (TYPE_NOTHROW_P): New macro.
9705 * decl2.c (delete_sanity): Warn on deleting void *.
9706 * init.c (build_new_1): Use TYPE_NOTHROW_P.
9707 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
9708 throwing operator new.
9710 1999-04-28 Nathan Sidwell <nathan@acm.org>
9712 * cp-tree.h (build_component_addr): Remove prototype.
9713 * typeck.c (build_component_addr): Make static. Remove MSG
9715 (build_component_addr): Remove MSG parameter, clean up
9717 (build_x_function_call): Use cp_error.
9718 (build_unary_op): Adjust call of build_component_addr.
9720 1999-04-28 Mark Mitchell <mark@codesourcery.com>
9722 * pt.c (tsubst_friend_class): Check for NULL.
9724 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
9726 * search.c (binfo_for_vtable): Initialize bfvi.var.
9728 1999-04-27 Nathan Sidwell <nathan@acm.org>
9730 * rtti.c (build_x_typeid): Check rtti is enabled.
9732 1999-04-26 Mark Mitchell <mark@codesourcery.com>
9734 * search.c (is_subobject_of_p): Make sure we're looking at the
9737 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
9739 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
9741 1999-04-23 Mark Mitchell <mark@codesourcery.com>
9743 * decl2.c (finish_file): Tweak handling of extern inlines so that
9744 they are not unnecessarily put out.
9746 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
9747 such as base classes.
9749 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
9751 * tree.c (build_exception_variant): Fix typo: use the chain of U,
9752 not trying V, while cycling through U.
9754 1999-04-22 Mark Mitchell <mark@codesourcery.com>
9756 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
9757 preserves_first_arg. Enlarge dummy accordingly.
9758 (DECL_TINFO_FN_P): New macro.
9759 (SET_DECL_TINFO_FN_P): Likeiwse.
9760 (DECL_RETURNS_FIRST_ARG): Remove.
9761 (DECL_PRESERVES_THIS): Likewise.
9762 (DECL_INIT_PRIORITY): New macro.
9763 (finish_struct_1): Change prototype.
9764 (cat_namespace_levels): Remove prototype.
9765 (vtable_decl_p): New prototype.
9766 (vtype_decl_p): Likewise.
9767 (sigtable_decl_p): Likewise.
9768 (walk_globals_pred): New typedef.
9769 (walk_globals_fn): Likewise.
9770 (walk_globals): New prototype.
9771 (walk_namespaces_fn): New typedef.
9772 (walk_namespaces): New prototype.
9773 (wrapup_globals_for_namespace): Likewise.
9774 (walk_vtables): Remove prototype.
9775 (walk_sigtables): Likewise.
9776 (instantiate_pending_templates): New prototype.
9777 * class.c (finish_struct_1): Don't return a value.
9778 * decl.h (pending_statics): Remove declaration.
9779 * decl.c (walk_namespaces_r): New function.
9780 (walk_globals_r): Likewise.
9781 (vtable_decl_p): Likewise.
9782 (vtype_decl_p): Likewise.
9783 (sigtable_decl_p): Likewise.
9784 (walk_namespaces): Likewise.
9785 (walk_globals_data): New type.
9786 (walk_globals): New function.
9787 (wrapup_globals_for_namespace): Likewise.
9788 (expand_static_init): Remove assertion. Remove redundancy in
9789 conditional. Don't put static data members in static_aggregates
9791 (finish_function): Remove redundancy in conditional. Don't set
9792 DECL_RETURNS_FIRST_ARG.
9793 (cat_namespace_levels): Remove.
9794 * decl2.c: Include splay-tree.h and varray.h.
9795 (priority_info_s): New structure.
9796 (finish_vtable_vardecl): Change prototype. Adjust for new calling
9798 (prune_vtable_vardecl): Likewise.
9799 (finish_sigtable_vardecl): Likewise.
9800 (setup_initp): Remove.
9803 (start_static_storage_duration_function): New function.
9804 (generate_inits_for_priority): Likewise.
9805 (finish_static_storage_duration_function): Likewise.
9806 (get_priority_info): Likewise.
9807 (do_static_initialization): Likewise.
9808 (do_static_destruction): Likewise.
9809 (do_static_initialization_and_destruction): Likewise.
9810 (generate_ctor_or_dtor_function): Likewise.
9811 (generate_ctor_and_dtor_functions_for_priority): Likewise.
9812 (pending_statics): Make it a varray.
9813 (pending_statics_used): New variable.
9814 (saved_inlines): Make it a varray.
9815 (saved_inlines_used): New variable.
9816 (finish_static_data_member): Change method of updating
9818 (mark_inline_for_output): Remove #if 0'd code. Change method of
9819 updating saved_inlines.
9820 (walk_vtables): Remove.
9821 (walk_sigtables): Likewise.
9822 (import_export_decl): Use DECL_TINFO_FN_P.
9823 (pending_templates): Remove declaration.
9824 (maybe_templates): Likewise.
9825 (static_aggregates_initp): Likewise.
9826 (setup_initp): Likewise.
9827 (finish_objects): Simplify.
9828 (INITIALIZE_P_IDENTIFIER): New macro.
9829 (PRIORITY_IDENTIFIER): New macro.
9830 (SSDF_IDENTIFIER): New macro.
9831 (initialize_p_decl): New variable.
9832 (priority_decl): Likewise.
9833 (ssdf_decl): Likewise.
9834 (priority_info_map): Likewise.
9835 (finish_file): Recode output of static intializers and other
9836 file-scope finalization tasks.
9837 * error.c (OB_END_TEMPLATE_ID): New macro.
9838 (dump_type_real): Use it.
9839 (dump_decl): Likewise.
9840 (dump_function_name): Likewise.
9841 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
9843 (check_newline): Use walk_globals, not walk_vtables.
9844 * pt.c (pending_tempalte_expansions): Remove.
9845 (set_vardecl_interface_info): Likewise.
9846 (pending_templates): Make static.
9847 (maybe_templates): Likewise.
9848 (instantiate_class_template): Adjust call to finish_struct_1.
9849 (instantiate_pending_templates): New function.
9850 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
9851 * tree.c (static_aggregates_initp): Remove.
9852 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
9854 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
9856 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
9857 with the RTL code RETURN.
9858 * hash.h: Regenerated.
9859 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
9860 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
9861 * parse.c: Regenerated.
9862 * pt.c: Include varray.h. Include rtl.h since varray.h requires
9864 (inline_parm_levels): New variable.
9865 (inline_parm_levels_used): Likewise.
9866 (maybe_begin_member_template_processing): Update them.
9867 (maybe_end_member_template_processing): Use them, rather than
9868 guessing how many levels to pop.
9870 * decl.c (make_typename_type): Tighten error-checking.
9872 1999-04-20 Mark Mitchell <mark@codesourcery.com>
9874 * cp-tree.h (build_binary_op): Remove unneeded parameter.
9875 * class.c (build_vrable_entry_ref): Adjust call to
9877 * decl.c (expand_static_init): Likewise.
9878 (grokdeclarator): Likewise.
9879 (finish_function): Likewise.
9880 * decl2.c (delete_sanity): Likewise.
9881 (do_dtors): Likewise.
9882 (do_ctors): Likewise.
9883 * error.c (dump_type_suffix): Likewise.
9884 * expr.c (cplus_expand_expr): Likewise.
9885 * init.c (resolve_offset_ref): Likewise.
9886 (build_new): Likewise.
9887 (build_new_1): Likewise.
9888 (build_vec_delete_1): Likewise.
9889 (expand_vec_init_catch_clause): Likewise.
9890 (build_delete): Likewise.
9891 * pt.c (tsubst): Likewise.
9892 * rtti.c (synthesize_tinfo_fn): Likewise.
9893 * search.c (expand_upcast_fixups): Likewise.
9894 (expand_direct_vtbls_init): Likewise.
9895 * typeck.c (get_member_function_from_ptrfunc): Likewise.
9896 (build_binary_op_nodefault): Likewise.
9897 (point_int_sum): Likewise.
9898 (pointer_diff): Likewise.
9899 (build_unary_op): Likewise.
9900 (build_modify_expr): Likewise.
9901 (get_delta_difference): Likewise.
9902 (build_ptrmemfunc): Likewise.
9903 (expand_ptrmemfunc_cst): Likewise.
9905 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
9907 * decl.c (grokfndecl): Always call cplus_decl_attributes.
9908 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
9910 1999-04-19 Mark Mitchell <mark@codesourcery.com>
9912 * cp-tree.h (finish_static_data_member_decl): New function.
9913 * decl2.c (finish_static_data_member_decl): Split out from ...
9915 * pt.c (instantiate_class_template): Use it here instead of
9917 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
9918 finish_static_data_member_decl will do that. Explicit set
9919 DECL_EXTERNAL to match non-template processing.
9921 1999-04-18 Mark Mitchell <mark@codesourcery.com>
9923 * cp-tree.h (finish_class_definition): Add parameter.
9924 * parse.y (structsp): Use it. Don't call pop_scope here.
9925 * parse.c: Regenerated.
9926 * semantics.c (finish_class_definition): Pop it here.
9928 1999-04-17 Mark Mitchell <mark@codesourcery.com>
9930 * decl.c (xref_tag): Revise handling of nested template
9932 * pt.c (check_explicit_specialization): Tweak handling of friend
9933 templates in template classes.
9934 (tsubst_friend_class): Handle friend declarations for nested
9935 member template classes.
9937 1999-04-16 Mark Mitchell <mark@codesourcery.com>
9939 * class.c (finish_struct): Remove unused variable.
9940 (pushclass): Likewise.
9941 (invalidate_class_lookup_cache): Likewise.
9942 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
9943 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
9944 doesn't get obliterated.
9945 (make_typename_type): Handle template classes correctly.
9947 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
9948 (storetags): Declare.
9949 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
9950 (pushclass): Likewise. Use storetags to install tag declarations,
9952 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
9953 * decl.c (storetags): Make it global.
9954 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
9955 implicit typename declaration.
9956 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
9957 * method.c (hack_identifier): Likewise.
9958 * search.c (lookup_member): Likewise.
9960 * decl.c (warn_about_implicit_typename_lookup): New function.
9961 (lookup_name_real): Use it. Rework handling of implicit typename
9964 1999-04-15 Mark Mitchell <mark@codesourcery.com>
9966 * cp-tree.h (lookup_nested_field): Remove.
9967 * class.c (push_nested_class): Handle UNION_TYPEs.
9968 (pop_nested_class): Likewise.
9969 * decl.c (lookup_name_real): Don't call lookup_nested_field.
9970 (start_decl): Use push_nested_class, not just pushclass.
9971 (cp_finish_decl): Use pop_nested_class, not just popclass.
9972 * search.c (lookup_nested_field): Remove.
9974 * cp-tree.h (lang_type): Add documentation.
9975 * decl2.c (handle_class_head): Create template declarations here,
9977 * parse.y (class_head): Return whether or not we entered a new
9978 scope, as well as the type named.
9979 (named_class_head): Likewise.
9980 (named_complex_class_head_sans_basetype): Likewise.
9981 (structsp): Adjust accordingly. Pop scope when required.
9982 * parse.c: Regenerated.
9983 * pt.c (check_default_tmpl_args): Robustify.
9984 (redeclare_class_template): Likewise.
9985 (instantiate_class_template): An instantiation of an
9986 anonymous union is itself an anonymous union.
9987 * semantics.c (begin_class_definition): Don't create template
9990 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
9992 * parse.y (after_type_declarator_intern): New nonterminal.
9993 (after_type_declarator): Use it.
9994 (direct_after_type_declarator): Likewise. Move above
9995 nonnested_type to fix reduce/reduce conflict resolution.
9996 (declmods): Reducing from just 'attributes' has EMPTY precedence.
9997 * Makefile.in (CONFLICTS): Update.
9999 * decl.c (define_label): Downgrade error for jumping over a
10000 non-POD decl to pedwarn.
10002 1999-04-14 Mark Mitchell <mark@codesourcery.com>
10004 * cp-tree.h (popclass): Change declaration.
10005 (pop_nested_class): Likewise.
10006 (poplevel_class): Remove declaration.
10007 * call.c (convert_default_argument): Pass no arguments to
10009 * class.c (finish_struct_1): Likewise.
10010 (finish_struct): Likewise.
10011 (popclass): Remove argument. Simplify code accordingly.
10012 (pop_nested_class): Likewise.
10013 * decl.c (poplevel_class): Declare it here, and make it static.
10014 (poplevel): Handle class scopes.
10015 (poplevel_class): Don't take an rgument. Simplify.
10016 (pop_everything): Pass no arguments to pop_nested_class.
10017 (cp_finish_decl): Pass no arguments to popclass.
10018 (grokdeclarator): Pass no arguments to pop_nested_class.
10019 (finish_function): Likewise.
10020 * decl2.c (grokfield): Likewise.
10021 (pop_scope): Pass no arguments to popclass.
10022 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
10023 * pt.c (instantiate_class_template): Move call to pushclass, and
10024 document. Pass no arguments to popclass.
10025 (regenerate_decl_from_template): Likewise.
10027 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
10029 * typeck.c (build_unary_op): Handle taking the address of a unique
10030 bound non-static member function.
10032 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
10034 * lang-options.h (-Wdeprecated): New flag.
10035 * decl2.c (warn_deprecated): New flag.
10036 (lang_decode_option): Deprecated this-is-variable,
10037 external-templates, alt-external-templates.
10038 Support -Wdeprecated.
10039 * errfn.c (cp_deprecated): New function.
10041 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
10043 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
10044 of the decls themselves.
10046 * pt.c (tsubst_function_type): Copy attributes over.
10048 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
10050 * cp-tree.h: Add prototype.
10051 * decl.c (init_decl_processing): Set valid_lang_attribute.
10053 1999-04-13 Mark Mitchell <mark@codesourcery.com>
10055 * class.c (finish_struct_1): Look at the const-ness of the field's
10056 type, not the TREE_READONLY-ness of the declaration.
10057 * method.c (synthesize_method): Likewise.
10058 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
10059 creating new declarations.
10061 1999-04-13 Mike Stump <mrs@wrs.com>
10063 * decl2.c (import_export_decl): Because vtables always reference
10064 virtual functions, even if they are inlined, don't allow
10065 -fno-implement-inlines to not emit them, instead, emit them with
10067 * decl.c (start_function): Likewise.
10069 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
10071 * cp-tree.h (struct lang_type): Add com_interface.
10072 (CLASSTYPE_COM_INTERFACE): New macro.
10073 * class.c (set_rtti_entry): COM interface classes have no RTTI
10074 entries in their vtables; adjust.
10075 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
10076 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
10077 finish_struct_1): Likewise.
10078 * decl2.c (mark_vtable_entries): Likewise.
10079 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
10080 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
10081 expand_upcast_fixups): Likewise.
10082 * tree.c (debug_binfo): Likewise.
10084 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
10085 * typeck.c (comptypes): If we get it, ignore attributes.
10086 * class.c (instantiate_type): Use BASELINK_P. Change complain
10087 parameter to flags; 2 means ignore attributes.
10088 * call.c (build_op_delete_call): Pass it.
10090 * decl.c (xref_tag): Only complain once about using a typedef-name
10091 with 'struct'. Downgrade to pedwarn.
10093 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
10095 * parse.y (absdcl_intern): New nonterminal.
10096 (absdcl, direct_abstract_declarator): Use it.
10098 * pt.c (lookup_template_class): Look through implict typename.
10100 1999-04-11 Mark Mitchell <mark@codesourcery.com>
10102 * friend.c (add_friend): Deal gracefully with error_mark_node.
10103 * method.c (build_overload_value): Handle pointers-to-members as
10104 template parameters.
10106 * decl.c (push_binding): Fix typo in comment.
10108 1999-04-10 Mark Mitchell <mark@codesourcery.com>
10110 * error.c (dump_type_real): If a typename is a template-id, put
10111 out the template arguments.
10112 (dump_expr): Handle TEMPLATE_ID_EXPR.
10113 * pt.c (lookup_template_class): Now that full arguments are
10114 available everywhere, remove code that tried to guess them.
10116 1999-04-09 Mark Mitchell <mark@codesourcery.com>
10118 * decl.c (make_typename_type): Complain if we don't find a type
10119 when trying to make a typename type for a non-template type.
10121 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
10123 * decl.c (start_decl): Pass attributes to grokdeclarator.
10124 (grokdeclarator): Handle attributes on constructor-syntax
10127 1999-04-08 Mark Mitchell <mark@codesourcery.com>
10129 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
10132 * search.c (template_self_reference_p): Tweak.
10134 1999-04-07 Mark Mitchell <mark@codesourcery.com>
10136 * init.c (build_offset_ref): Don't build yet another weird data
10137 structure to describe overloaded functions.
10139 1999-04-06 Mark Mitchell <mark@codesourcery.com>
10141 * cp-tree.h (BASELINK_P): New macro.
10142 (SET_BASELINK_P): Likewise.
10143 * init.c (build_member_call): Remove needless assignment in if
10145 * search.c (lookup_field_r): Fix handling when we are looking
10146 specifically for a type; these are not hidden by functions and
10148 (lookup_member): Use SET_BASELINK_P.
10149 * tree.c (is_overloaded_fn): Use BASELINK_P.
10150 (really_overloaed_fn): Likewise.
10151 (get_first_fn): Likewise.
10153 1999-04-05 Mark Mitchell <mark@codesourcery.com>
10155 * decl.c (lookup_name_current_level): Tweak, and improve
10158 * class.c (maybe_fixup_vptrs): Remove declaration.
10159 (build_class_init_list): Likewise.
10160 * decl.c (pushdecl_class_level): Call check_template_shadow here
10162 (push_class_level_binding): ... not here.
10163 * search.c (dfs_push_type_decls): Only avoid
10164 template-self-reference TYPE_DECLs if they are from base classes.
10166 1999-04-04 Mark Mitchell <mark@codesourcery.com>
10168 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
10171 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
10173 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
10174 (finish_struct_1): Don't call build_class_init_list.
10176 1999-04-02 Mark Mitchell <mark@codesourcery.com>
10178 * tinfo.h (__class_type_info): Fix illegal declaration.
10180 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
10181 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
10182 (IDENTIFIER_CLASS_VALUE): Improve documentation.
10183 (is_properly_derived_from): Declare.
10184 (invalidate_class_lookup_cache): Likewise.
10185 (maybe_maybe_note_name_used_in_class): Likewise.
10186 (note_name_declared_in_class): Likewise.
10187 (push_using_decl): Remove duplicate declaration.
10188 (id_in_current_class): Remove declaration.
10189 (push_class_binding): Change prototype.
10190 (clear_identitifer_class_values): Declare.
10191 * call.c (is_properly_derived_from): Make it global.
10192 (build_new_function_call): Be careful about updating candidates.
10193 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
10194 asked to make illegal calls.
10195 * class.c: Include splay-tree.h.
10196 (class_stack_node): Add names_used slot.
10197 (check_member_decl_is_same_in_complete_scope): Remove.
10198 (add_method): Fix comment. Push the declaration into class
10200 (finish_struct_1): When popping the class, pop the bindings too.
10201 Remove check for data member/function member conflict.
10202 (finish_struct): Remove calls to
10203 check_member_decl_is_same_in_complete_scope. Change calls to
10205 (pushclass): Clear names_used in the class stack entry.
10206 Use invalidate_class_lookup_cache to remove cached entries, rather
10207 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
10208 before entering a new class. Remove dead code. Don't mess with
10209 current_function_decl when pushing declarations.
10210 (invalidate_class_lookup_cache): New function, split out from ...
10211 (popclass): Here. Clean up names_used on our way out.
10212 (instantiate_type): Adjust.
10213 (build_self_reference): Don't push the declaration here.
10214 (maybe_note_name_used_in_class): New function.
10215 (note_name_declared_in_class): Likewise.
10216 * decl.c (add_binding): Change prototype.
10217 (find_class_binding_level): New function.
10218 (innermost_nonclass_level): Likewise.
10219 (current_binding_level): Update documentation.
10220 (inner_binding_level): Remove. Replace with current_binding_level
10222 (push_binding_level): Remove special handling of
10223 class_binding_level.
10224 (pop_binding_level): Likewise. Use find_class_binding_level.
10225 (suspend_binding_level): Likewise.
10226 (global_bindings_p): Use innermost_nonclass_level.
10227 (toplevel_bindings_p): Likewise.
10228 (namespace_bindings_p): Likewise.
10229 (pseudo_global_level_p): Likewise.
10230 (push_binding): Clear INHERITED_VALUE_BINDING_P.
10231 (add_binding): Check for illegal multiple declarations. Return a
10232 value indicating whether or not the new binding was legal.
10233 (push_local_binding): Skip over class binding levels. Check
10234 return value from add_binding.
10235 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
10236 note_name_declared_in_class.
10237 (pushlevel_class): Remove "fake out the rest of the compiler"
10239 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
10240 (clear_identifier_class_values): New function.
10241 (pop_from_top_level): Use it.
10242 (pop_everything): Tweak.
10243 (maybe_process_template_type_declaration): Don't push the
10244 declaration for the template here.
10245 (pushtag): Don't push tag declarations into class scope here.
10246 (pushdecl): Apply DeMorgan's law for readability.
10247 (pushdecl_class_level): Remove special-case code for
10248 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
10249 (push_class_level_bindng): Deal with inherited bindings.
10250 (lookup_name_real): Remove special-case code for
10251 TYPE_BEING_DEFINED, and some implicit typename magic.
10252 (grokdeclarator): Handle COMPONENT_REF for a template function.
10253 (build_enumerator): Don't call pushdecl_class_level here.
10254 (id_in_current_class): Remove.
10255 * decl2.c (grokfield): Don't call pushdecl_class_level or
10256 check_template_shadow.
10257 * errfn.c (cp_file_of): Don't declare.
10258 (cp_line_of): Likewise.
10259 * error.c (dump_decl): Handle an OVERLOAD.
10260 (cp_file_of): Likewise.
10261 (cp_line_of): Likewise.
10262 * init.c (build_member_call): Handle a COMPONENT_REF.
10263 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
10264 pushdecl_class_level.
10265 * method.c (hack_identifier): Build COMPONENT_REFs for references
10266 to member templates as well as member functions. Remove dead
10268 * parse.y (left_curly): Remove.
10269 (nonnested_type): Call maybe_note_name_used_in_class, not
10270 pushdecl_class_level.
10271 * parse.c: Regenerated.
10272 (nested_name_specifier_1): Likewise.
10273 * pt.c (check_explicit_specialization): Adjust, for robustness.
10274 (check_template_shadow): Handle OVERLOADs.
10275 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
10276 TEMPLATE_DECL, if appropriate.
10277 * search.c (envelope_add_decl): Remove.
10278 (dfs_pushdecls): Likewise.
10279 (dfs_compress_decls): Likewise.
10280 (dfs_push_decls): New function.
10281 (dfs_push_type_decls): Likewise.
10282 (setup_class_bindings): Likewise.
10283 (template_self_reference_p): Likewise.
10284 (lookup_field_r): Use it.
10285 (looup_member): Remove old comment. Deal with ambiguity.
10286 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
10287 and remove envelope processing.
10288 * semantics.c (begin_class_definition): Let pushclass push
10289 declarations for base classes.
10290 (finish_member_declaration): Push declarations into class scope.
10291 * typeck.c (build_component_ref): Just put an OVERLOAD into the
10292 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
10293 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
10294 * Makefile.in (class.o): Depend on splay-tree.h.
10296 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
10298 * cvt.c (convert_pointer_to_real): Use same_type_p.
10299 * typeck.c (comp_target_types): Use same_type_p.
10301 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
10303 * semantics.c (begin_inline_definitions,
10304 finish_inline_definitions): Rename from finish_default_args and
10305 begin_inline_definitions, respectively, to something that isn't a
10307 * parse.y (structsp): Adjust.
10309 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
10310 (list_hash_lookup): Likewise.
10311 (hash_tree_chain): Adjust.
10312 * pt.c (tsubst): Adjust.
10313 (tsubst_arg_types): Use plain hash_tree_cons.
10314 * cp-tree.h (hash_tree_cons_simple): Lose.
10315 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
10317 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10319 * Makefile.in (hash.h): Generate using gperf language 'C', not
10320 'KR-C', so gperf uses the `const' keyword on strings.
10322 * gxx.gperf (resword): Const-ify a char*.
10324 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
10326 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
10327 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
10328 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
10329 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
10330 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
10331 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
10334 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
10336 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
10338 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
10340 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
10342 1999-03-27 Mark Mitchell <mark@codesourcery.com>
10344 * cp-tree.h (add_friend): Declare.
10345 (add_friends): Likewise.
10346 * friend.c (add_friend): Make it global. Don't add to
10347 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
10348 (add_friends): Make it global.
10349 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
10350 befriending class is a template.
10351 * parse.y (component_decl_1): Fix typo in comment.
10352 * parse.c: Regenerated.
10353 * pt.c (instantiate_class_template): Use add_friend and
10354 add_friends rather that duplicating some of their functionality
10357 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
10359 * call.c (build_field_call): Unify 'this' and non-'this' cases.
10361 * typeck.c (build_indirect_ref): Check for 'this' sooner.
10363 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10365 * call.c (op_error): Const-ify a char*.
10366 (add_candidate, source_type, add_warning): Add static prototype.
10367 (print_z_candidates): Const-ify a char*.
10369 * class.c (resolve_address_of_overloaded_function,
10370 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
10371 (get_vtable_name, finish_struct_1): Const-ify a char*.
10373 * cvt.c (convert_to_reference): Likewise.
10375 * decl.c (redeclaration_error_message, record_builtin_type,
10376 record_unknown_type, member_function_or_else, bad_specifiers):
10378 (find_binding, select_decl, unqualified_namespace_lookup,
10379 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
10380 Add static prototype.
10381 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
10382 implicitly_declare, record_builtin_java_type, define_function,
10383 grok_op_properties, tag_name): Const-ify a char*.
10385 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
10386 (define_function, finish_builtin_type): Const-ify a char*.
10387 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
10388 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
10389 (file_name_nondirectory): Const-ify a char*.
10390 (init_filename_times): Don't prototype.
10391 (compiler_error): Prototype.
10392 (yyerror, init_repo): Const-ify a char*.
10393 (build_srcloc): Don't prototype.
10394 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
10396 (warn_for_assignment): Don't prototype.
10397 (convert_for_initialization, readonly_error, check_for_new_type,
10398 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
10401 * decl2.c (acceptable_java_type, output_vtable_inherit,
10402 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
10403 merge_functions, decl_namespace, validate_nonmember_using_decl,
10404 do_nonmember_using_decl): Add static prototype.
10405 (lang_f_options): Const-ify a char*.
10406 (finish_builtin_type): Likewise.
10407 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
10410 * errfn.c: Include cp-tree.h.
10411 (cp_thing): Add static prototype.
10412 (compiler_error): Don't protoptype.
10413 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
10414 passing it to `cp_thing'.
10416 * error.c (interesting_scope_p): Add static prototype.
10418 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
10421 * init.c (compiler_error): Don't prototype.
10422 (member_init_ok_or_else): Const-ify a char*.
10423 (build_java_class_ref): Add static prototype.
10425 * lex.c (compiler_error): Don't prototype.
10426 (get_time_identifier, interface_strcmp, extend_token_buffer,
10427 handle_cp_pragma): Const-ify a char*.
10428 (is_global, init_filename_times): Add static prototype.
10429 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
10430 (compiler_error): Change from fixed args to variable args.
10431 (yyerror): Const-ify a char*.
10433 * parse.y (cond_stmt_keyword): Const-ify a char*.
10434 (parse_decl): Add static prototype.
10436 * pt.c (template_args_equal, print_template_context): Likewise.
10437 (print_candidates, check_default_tmpl_args): Const-ify a char*.
10438 (instantiate_class_template): Likewise.
10440 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
10442 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
10443 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
10445 * search.c (lookup_field_info, lookup_member): Likewise.
10446 (lookup_member): Cast the first argument of `bzero' to a PTR.
10448 * sig.c (compiler_error): Don't prototype.
10449 (build_signature_pointer_or_reference_nam): Const-ify a char*.
10450 (get_sigtable_name, build_member_function_pointer): Likewise.
10452 * tree.c (compiler_error): Don't prototype.
10453 (no_linkage_helper, build_srcloc): Add static prototype.
10454 (build_vbase_pointer_fields): Const-ify a char*.
10455 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
10457 * typeck.c (compiler_error): Don't prototype.
10458 (convert_for_assignment): Const-ify a char*.
10459 (comp_cv_target_types): Add static prototype.
10460 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
10461 build_component_addr, build_unary_op, convert_for_initialization):
10464 * typeck2.c (ack): Add static prototype and change from fixed args
10466 (readonly_error, check_for_new_type): Const-ify a char*.
10468 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
10469 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
10470 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
10471 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
10472 gen_assign, GNU_xref_member): Const-ify a char*.
10474 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
10476 * gxxint.texi: Remove old discussion on copying virtual bases.
10478 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
10480 * Make-lang.in: Remove all references to g++.o/g++.c.
10481 Link g++ from gcc.o.
10483 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
10485 * decl2.c (comdat_linkage): Treat vtables like functions.
10487 1999-03-25 Mark Mitchell <mark@codesourcery.com>
10489 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
10491 1999-03-25 Nathan Sidwell <nathan@acm.org>
10493 * decl.c (init_decl_processing): Add `signed' type as a synonym
10496 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
10498 * typeck.c (common_type): Handle cv-qual unification for pointers
10501 * decl.c (unqualified_namespace_lookup): Return error_mark_node
10503 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
10504 * lex.c (do_identifier): If we got error_mark_node, call
10507 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
10509 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
10512 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
10514 * decl.c (lookup_name_real): Do nested field lookup regardless of
10515 TYPE_BEING_DEFINED.
10517 1999-03-24 Mark Mitchell <mark@codesourcery.com>
10519 * cp-tree.h (lang_type): Remove has_assignment and
10520 has_real_assignment. Add befriending_classes.
10521 (TYPE_HAS_ASSIGNMENT): Remove.
10522 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
10523 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
10524 (lang_decl): Document.
10525 (DECL_BEFRIENDING_CLASSES): New macro.
10526 (FRIEND_NAME): Move declaration to more obvious location.
10527 (FRIEND_DECLS): Likewise.
10528 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
10529 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
10530 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
10531 (grok_op_properties): Likewise.
10532 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
10533 (add_friend): Likewise. Don't do weird things with assignment
10534 operators. Update DECL_BEFRIENDING_CLASSES.
10535 (add_friends): Don't do weird things with assignment operators.
10536 (make_friend_class): Likewise. Update
10537 CLASSTYPE_BEFRIENDING_CLASSES.
10538 * pt.c (instantiate_class_template): Don't set
10539 TYPE_HAS_ASSIGNMENT.
10540 (tsubst_copy): Substitute the TREE_TYPE for more unary
10542 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
10543 * search.c (protected_accessible_p): New function.
10544 (friend_accessible_p): Likewise.
10545 (accessible_p): Use them.
10547 1999-03-23 Mark Mitchell <mark@codesourcery.com>
10549 * pt.c (convert_nontype_argument): Don't create things that aren't
10550 PTRMEM_CSTs when applying a qualification conversion to a
10553 1999-03-23 Mark Mitchell <mark@codesourcery.com>
10555 * Makefile.in (OBJS): Don't mention hash.o.
10556 (OBJDEPS): Likewise.
10558 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
10560 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
10561 * decl.c (expand_static_init): Make sure we don't add any after
10564 * decl.c (cp_finish_decl): Move intelligence about handling
10565 DECL_COMDAT for variables from here...
10566 * decl2.c (comdat_linkage): ...to here.
10567 (maybe_make_one_only): Tweak.
10568 (import_export_decl): Call comdat_linkage for variables, too.
10569 (finish_file): Handle template statics properly.
10571 1999-03-22 Mark Mitchell <mark@codesourcery.com>
10573 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
10574 Document internals of pointer-to-member-functions.
10575 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
10576 (PFN_FROM_PTRMEMFUNC): Likewise.
10577 (build_type_conversion): Remove unused parameter.
10578 (build_ptrmemfunc1): Declare.
10579 (expand_ptrmemfunc_cst): New function.
10580 (delta2_from_ptrmemfunc): Likewise.
10581 (pfn_from_ptrmemfunc): Likewise.
10582 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
10583 build_type_conversion. Use TYPE_PTRMEM_P for readability.
10584 (convert_to_reference): Remove unused parameter to
10585 build_type_conversion.
10586 (ocp_convert): Likewise.
10587 (build_user_type_conversion): Likewise.
10588 * error.c (dump_expr): Handle NULL pointer-to-member functions.
10589 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
10590 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
10591 open when handling pointer-to-member functions.
10592 * pt.c (convert_nontype_argument): Clean up error messages. Be
10593 more stringent with pointers-to-members.
10594 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
10595 (build_unary_op): Tidy ever-so-slightly.
10596 (build_conditional_expr): Remove extra parameter to
10597 build_type_conversion.
10598 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
10600 (expand_ptrmemfunc_cst): Define.
10601 (delta2_from_ptrmemfunc): Likewise.
10602 (pfn_from_ptrmemfunc): Likewise.
10604 1999-03-19 Mark Mitchell <mark@codesourcery.com>
10606 * init.c (build_member_call): Handle template-id expressions
10608 * typeck.c (build_x_function_call): Likewise.
10610 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
10612 * friend.c (make_friend_class): Avoid core dump when
10613 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
10615 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
10617 * decl.c (start_function): Suppress normal linkage heuristics
10618 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
10620 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
10622 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
10623 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
10625 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
10627 * parse.y (named_complex_class_head_sans_basetype):
10628 Do not push a scope for error_mark_node.
10629 (maybe_base_class_list): Likewise.
10631 * decl.c (start_decl): Check for error_mark_node as a type.
10632 Detected by g++.brendan/array-refs.C.
10633 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
10634 (maybe_build_cleanup_1): Likewise. Detected by
10635 g++.jason/incomplete1.C.
10637 * tree.c (build_dummy_object): Use void_zero_node instead of the
10639 (is_dummy_object): Check for such a node.
10640 Detected by g++.bob/inherit1.C
10642 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
10644 * method.c (old_backref_index): Split out...
10645 (flush_repeats): From here. Rename back from try_old_backref.
10646 (build_mangled_name): Put back some old-style repeat handling.
10648 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10650 * lex.c: Don't include setjmp.h.
10651 (parse_float): New static function.
10652 (pf_args): New struct.
10653 (real_yylex): Use them in call to `do_float_handler'.
10655 1999-03-15 Mark Mitchell <mark@markmitchell.com>
10657 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
10658 * tree.c (layout_basetypes): Not here.
10659 * search.c (dfs_search): Remove; no longer used.
10661 1999-03-12 Mark Mitchell <mark@markmitchell.com>
10663 * decl2.c (validate_nonmember_using_decl): Issue sensible
10664 error-messages on bogus qualifiers.
10666 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
10668 * call.c (add_function_candidate): Fix uninitialized variable.
10670 * Makefile.in (search.o): Add dependency on varray.h.
10672 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
10674 * decl.c (duplicate_decls): Use same_type_p.
10675 * method.c (try_old_backref): Renamed from flush_repeats. Use
10676 same_type_p. Don't try to handle repeats. Return success.
10677 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
10678 calls from old-style code, too.
10679 (check_ktype): Use same_type_p.
10680 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
10681 (build_qualified_name): Simplify logic.
10682 (process_overload_item): Strip typedefs and quals at the top.
10683 (build_mangled_name_for_type_with_Gcode): Remove call to
10684 type_canonical_variant.
10685 (build_mangled_name): Likewise. Remove support for old-style
10686 repeats, which have been disabled since 2.7.2. Don't mess with
10688 (build_decl_overload_real): Don't mess with TREE_USED.
10690 1999-03-13 Nathan Sidwell <nathan@acm.org>
10692 * error.c (cp_printers): Add 'F' escape character.
10693 (dump_type_real): Remove TREE_LIST (fnargs) printing.
10694 Functionality moved to dump_parameters.
10695 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
10696 (dump_function_decl): Extend meaning of V parameter. Use
10697 dump_parameters and dump_exception_spec.
10698 (dump_parameters): New static function.
10699 (dump_exception_spec): New static function.
10700 (fndecl_as_string): Change argument semantics. Use
10701 dump_function_decl directly.
10703 * sig.c (build_signature_table_constructor): Use cp_error.
10705 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
10707 * semantics.c (finish_switch_cond): Handle error cases gracefully.
10708 Detected by g++.law/enum5.C.
10710 * typeck.c (build_modify_expr): Check for errors after resolving
10711 offsets. Detected by g++.brendan/static1.C.
10713 * decl.c (complete_array_type): Ignore initial_value if it is an
10714 error. Detected by g++.benjamin/17930.C.
10716 * typeck2.c (process_init_constructor): Return error if one argument
10717 is in error. Detected by g++.benjamin/13478.C.
10719 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
10721 * decl.c (select_decl): Allow class templates when we need types.
10722 * decl2.c (ambiguous_decl): Likewise.
10724 1999-03-12 Mark Mitchell <mark@markmitchell.com>
10726 * lex.c (do_identifier): Correct call to enforce_access.
10727 * search.c (accessible_p): Tweak comment.
10729 1999-03-10 Mark Mitchell <mark@markmitchell.com>
10731 * semantics.c (begin_class_definition): Call build_self_reference.
10732 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
10734 * search.c (assert_canonical_unmarked): Fix typo in prototype.
10736 * search.c (dfs_canonical_queue): New function.
10737 (dfs_assert_unmarked_p): Likewise.
10738 (assert_canonical_unmarked): Likewise.
10739 (access_in_type): Use it.
10740 (accessible_p): Likewise. Walk the whole tree when umarking.
10742 * sig.c (build_signature_table_constructor): Use accessible_p
10743 instead of compute_access.
10745 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
10747 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
10749 1999-03-09 Mark Mitchell <mark@markmitchell.com>
10751 * cp-tree.h (flag_access_control): Declare.
10752 (TREE_VIA_PPUBLIC): Document.
10753 (DECL_NONSTATIC_MEMBER_P): New macro.
10754 (enforce_access): Return an indication of whether or not access
10756 (build_self_reference): Change prototype.
10757 (compute_access): Replace with ...
10758 (accessible_p): New function.
10759 (dfs_walk): Change prototype.
10760 (dfs_unmark): Likewise.
10761 (markedp): Likewise.
10762 * call.c (enforce_access): Use accessible_p.
10763 * class.c (build_self_reference): Insert the declaration into the
10764 list of members for this type, and make it public.
10765 * decl.c (xref_basetypes): Avoid ill-timed recursion.
10766 * init.c (build_offset_ref): Use lookup_member, not three separate
10767 name-lookups. Call enforce_access rather than checking for
10768 illegal accesses here.
10769 (resolve_offset_ref): Likewise.
10770 * lex.c (do_identifier): Likewise.
10771 * method.c (hack_identifier): Likewise.
10772 * parse.y (self_reference): Remove.
10773 (opt_component_decl_list): Don't use it.
10774 * parse.c: Regenerated.
10775 * pt.c (print_candidates): Generalize to handle lists of
10776 overloaded functions.
10777 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
10779 (get_template_base): Use new calling convention for dfs_walk.
10780 * search.c: Include varray.h. Add prototypes.
10781 (dfs_walk): Accept a data pointer to pass to the work functions.
10782 All callers changed. All work functions changed.
10783 (breadth_first_search): Rename to bfs_walk, and make consistent
10785 (dfs_walk_real): New function.
10786 (canonical_binfo): New function.
10787 (context_for_name_lookup): Likewise.
10788 (shared_marked_p): Likewise.
10789 (shared_unmarked_p): Likewise.
10790 (lokup_field_queue_p): Likewise.
10791 (lookup_field_r): Generalize to handle both functions and fields.
10792 (lookup_field): Just call lookup_member.
10793 (lookup_fnfields): Likewise.
10794 (lookup_member): Move body of lookup_field here and generalize.
10795 (dfs_accessible_queue_p): Likewise.
10796 (dfs_accessible_p): Likewise.
10797 (dfs_access_in_type): Likewise.
10798 (access_in_type): Likewise.
10799 (compute_access): Remove, and replace with ...
10800 (accessible_p): New function.
10801 (vbase_types): Remove.
10802 (vbase_decl_ptr_intermediate): Likewise.
10803 (vbase_decl_ptr): Likewise.
10804 (vbase_init_result): Likewise.
10805 (closed_envelopes): Likewise.
10806 (bvtable): Likewise.
10808 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
10810 * call.c (add_function_candidate): Check for proper number of args
10811 before checking the validity of those args.
10813 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
10815 * cp-tree.h (struct lang_type): Add anon_union field.
10816 (ANON_UNION_TYPE_P): Use it instead of examining type.
10817 (SET_ANON_UNION_TYPE_P): New macro.
10818 * decl.c (check_tag_decl): Use it.
10820 * search.c (compute_access): Handle non-type contexts earlier, and
10823 * tree.c (build_exception_variant): Use copy_to_permanent.
10825 * decl2.c (setup_initp): Give statics with no priority the default
10827 (do_dtors, do_ctors, finish_file): Remove special handling of
10828 non-prioritized statics.
10830 1999-03-05 Mark Mitchell <mark@markmitchell.com>
10832 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
10833 * decl.c (make_typename_type): Don't issue an error if an
10834 immediate lookup fails; it migt be resolved later.
10835 * friend.c (is_friend): Add comment.
10836 * search.c (breadth_first_search): Add POSTFN and DATA
10837 parameters. Tidy. All callers changed.
10838 (lookup_field_queue_p): New function.
10839 (lookup_field_r): Likewise.
10840 (lookup_field_post): Likewise.
10841 (lookup_field): Use them, via breadth_first_search, instead of
10843 (compute_access): Robustify.
10844 (lookup_fnfield_info): New structure.
10846 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
10848 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
10850 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
10852 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
10855 * decl2.c (import_export_class): Also return if
10856 CLASSTYPE_INTERFACE_ONLY is set.
10858 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
10860 * decl.c (push_overloaded_decl): Only overwrite the old binding if
10862 * decl2.c (do_local_using_decl): Fix loop termination.
10864 1999-03-02 Mark Mitchell <mark@markmitchell.com>
10866 * cp-tree.h (determine_specialization): Don't declare.
10867 * pt.c (determine_specialization): Make it static. Eliminate
10868 complain parameter. Note that decl is always non-NULL now, and
10869 simplify accordingly.
10871 * decl.c (maybe_push_to_top_level): Always call
10872 push_cp_function_context.
10873 (pop_from_top_level): Always call pop_cp_function_context.
10875 1999-02-26 Nathan Sidwell <nathan@acm.org>
10877 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
10879 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
10880 * init.c (build_new_1): Extra arg to complete_type_or_else.
10881 (build_delete): Likewise.
10882 * typeck.c (require_complete_type): Likewise.
10883 (pointer_int_sum): Likewise.
10884 (pointer_diff): Likewise.
10885 (build_component_ref): Likewise.
10887 * typeck2.c (incomplete_type_error): Always use cp_error.
10888 Show declaration of undefined type, if appropriate.
10889 Deal with UNKNOWN_TYPE nodes.
10891 * typeck.c (require_complete_type): Use TYPE_SIZE as
10892 size_zero_node to mean incomplete type.
10893 (require_complete_type_in_void): New function.
10894 (build_compound_expr): Call complete_type_in_void for LHS.
10895 (build_c_cast): Call complete_type_in_void for void cast.
10896 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
10897 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
10898 require_complete_type_in_void. Call it.
10899 * cp-tree.h (require_complete_type_in_void): Prototype new function.
10901 * typeck.c (convert_arguments): Use alternative format for
10902 function decls. Don't require_complete_type here. Simplify
10903 diagnostic printing.
10904 (convert_for_initialization): Don't require_complete_type on RHS yet.
10905 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
10907 * call.c (build_over_call): Cope with qualified void return type.
10908 * semantics.c (finish_call_expr): Likewise.
10909 * typeck.c (build_function_call_real): Likewise.
10910 (c_expand_return): Likewise.
10911 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
10913 * call.c (print_z_candidates): Use alternate print format, to be
10914 consistent with (pt.c) print_candidates.
10915 * method.c (hack_identifier): List candidate members.
10916 * search.c (lookup_field): Build ambiguous list, and show it, if
10919 1999-02-26 Mark Mitchell <mark@markmitchell.com>
10921 * typeck.c (decay_conversion): Don't confuse constant array
10922 variables with their initializers.
10924 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
10926 * pt.c (regenerate_decl_from_template): Tweak for clarity.
10927 (instantiate_decl): Mark a decl instantiated before regenerating
10928 it to avoid recursion.
10929 * tree.c (mapcar): Don't call decl_constant_value unless we know
10930 something is TREE_READONLY_DECL_P.
10932 * class.c (check_for_override): Don't stop checking when we find
10933 the first overridden function. Delete #if 0'd code.
10934 * search.c (get_matching_virtual): Likewise.
10936 1999-02-25 Richard Henderson <rth@cygnus.com>
10938 * lang-specs.h: Define __FAST_MATH__ when appropriate.
10940 1999-02-24 Mike Stump <mrs@wrs.com>
10942 * typeck.c (convert_for_assignment): Allow boolean integral constant
10943 expressions to convert to null pointer.
10945 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
10947 * decl.c (lookup_namespace_name): Resolve namespace aliases.
10949 * class.c (push_nested_class): Allow namespaces.
10951 * decl2.c (set_decl_namespace): Add friendp parameter.
10952 * decl.c (grokfndecl): Pass it.
10953 (grokvardecl): Likewise.
10954 * cp-tree.h: Change declaration.
10956 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
10958 * pt.c (tsubst): Allow an array of explicit size zero.
10960 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
10962 * errfn.c: Change varargs code to look like toplev.c.
10964 * method.c (process_modifiers): Don't prepend 'U' for char or
10967 1999-02-20 Craig Burley <craig@jcb-sc.com>
10969 * Make-lang.in (cplib2.ready): Don't consider updating
10970 cplib2 stuff if the current directory isn't writable, as
10971 it won't work (such as during a `make install').
10973 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
10975 * decl2.c (start_objects): Make file scope constructors and
10976 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
10977 ASM_OUTPUT_DESTRUCTOR are defined.
10979 1999-02-19 Mark Mitchell <mark@markmitchell.com>
10981 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
10982 (fn_type_unification): Adjust prototype.
10983 (lookup_fnfields_1): Declare.
10984 * call.c (add_template_candidate_real): Adjust call to
10985 fn_type_unification.
10986 * class.c (add_method): Don't allow duplicate declarations of
10987 constructors or destructors.
10988 (resolve_address_of_overloaded_function): Remove unused variable.
10989 Adjust call to fn_type_unification.
10990 * decl.c (grokfndecl): Be more robust in the face of illegal
10992 * decl2.c (check_classfn): Remove hokey handling of member
10994 * pt.c (determine_specialization): Improve comments. Adjust to
10995 handle template argument deduction as per the standard.
10996 (check_explicit_specialization): Fix comment spacing. Handle
10997 type-conversion operators correctly. Improve error-recovery.
10998 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
10999 (get_bindings_real): Simplify handling of static members.
11000 * search.c (lookup_fnfields_1): Make it have external linkage.
11001 * typeck.c (compparms): Fix comment.
11002 (build_unary_op): Don't try to figure out which template
11003 specialization is being referred to when when the address-of
11004 operator is used with a template function.
11006 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11008 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
11009 keyword to match an analogous change at the top level.
11011 * tree.c (lvalue_or_else): Likewise.
11013 1999-02-17 Mark Mitchell <mark@markmitchell.com>
11015 * decl.c (xref_basetypes): Comment.
11016 * pt.c (instantiate_class_template): Use xref_basetypes.
11018 1999-02-16 Mark Mitchell <mark@markmitchell.com>
11020 * cp-tree.h (tsubst): Change prototype.
11021 (tsubst_expr): Likewise.
11022 (tsubst_copy): Likewise.
11023 (type_unification): Remove prototype.
11024 * call.c (convert_default_arg): Adjust call to tsubst_expr.
11025 * class.c (resolve_address_of_overloaded_function): Just use
11026 fn_type_unification.
11027 * decl.c (grokdeclarator): Adjust call to tsubst.
11028 * method.c (build_template_parm_names): Likewise.
11029 * pt.c (GTB_VIA_VIRTUAL): New macro.
11030 (GTB_IGNORE_TYPE): Likewise.
11031 (resolve_overloaded_unification): Add `complain' parameter.
11032 (try_one_overload): Likewise.
11033 (tsubst_template_arg_vector): Likewise.
11034 (tsubst_template_parms): Likewise.
11035 (tsubst_aggr_type): Likewise.
11036 (tsubst_arg_types): Likewise.
11037 (tsubst_call_declarator_parms): Likewise.
11038 (unify): Remove explicit_mask.
11039 (type_unification_real): Likewise.
11040 (get_template_base_recursive): Likewise.
11041 (coerce_template_template_parms): Provide prototype.
11042 (tsubst_function_type): Likewise.
11043 (try_class_unification): New function.
11044 All callers changed to use new complain parameter.
11045 (get_template_base): Use try_class_unification.
11046 (unify): Adjust handling of classes derived from template types.
11047 (fn_type_unification): Substitute explicit arguments before
11050 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11052 * decl.c (pushdecl): Remove dead code.
11054 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
11056 * decl2.c (finish_objects): Fix code I missed in previous change.
11058 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
11060 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
11061 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
11063 * pt.c (maybe_process_partial_specialization): Complain about
11064 'template <>' on non-specialization.
11066 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
11068 * decl.c (grokdeclarator): Catch wierd declarators.
11069 * decl2.c (finish_file): Don't abort because of namespace parsing
11071 (check_decl_namespace): Remove.
11073 1999-02-09 Mark Mitchell <mark@markmitchell.com>
11075 * cp-tree.h (get_template_base): Don't declare.
11076 (dfs_walk): Declare.
11077 (dfs_unmark): Likewise.
11078 (markedp): Likewise.
11079 * pt.c (unify): Remove duplicate declaration. Pass tparms and
11080 targs to get_template_base.
11081 (get_template_base_recursive): Move here from search.c. Check to
11082 see that the base found can be instantiated to form the desired
11084 (get_template_base): Likewise.
11085 (get_class_bindings): Simplify.
11086 * search.c (get_template_base_recursive): Move to pt.c.
11087 (get_template_base): Likewise.
11088 (markedp): Make it global.
11089 (dfs_walk): Likewise.
11090 (dfs_unmark): Likewise.
11092 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
11094 * pt.c (maybe_process_partial_specialization): Complain about
11095 specialization in wrong namespace.
11096 * tree.c (decl_namespace_context): New fn.
11098 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11100 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
11101 * pt.c (coerce_template_template_parms): Handle nested
11102 template template parameters.
11104 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
11106 * typeck2.c: Update email addresses.
11108 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11110 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
11113 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
11115 * lex.c (retrofit_lang_decl): Split out...
11116 (build_lang_decl): From here.
11117 * decl.c (pushdecl): Call it for functions generated by the middle
11118 end that don't have DECL_LANG_SPECIFIC.
11119 * cp-tree.h: Declare it.
11121 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
11122 (start_objects, finish_objects): Only use special
11123 init_priority code if the user specified a priority.
11124 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
11127 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
11129 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
11130 mkstemp.o. Get them from libiberty now.
11131 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
11133 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11135 * decl2.c (lang_decode_option): Use read_integral_parameter.
11137 1999-02-01 Mark Mitchell <mark@markmitchell.com>
11139 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
11140 before calling complete_type_or_else.
11142 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11144 * input.c (inline): Don't define, its handled by system.h.
11146 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
11148 * decl2.c: Don't define flag_no_ident here. Don't process
11150 * cp-tree.h: Don't declare flag_no_ident here.
11151 * lang-specs.h: Map -Qn to -fno-ident.
11153 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
11155 * cp-tree.h (struct tree_binding): Replace scope field with a union.
11156 (BINDING_SCOPE): Adjust.
11157 * decl.c (BINDING_LEVEL): Adjust.
11159 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
11161 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
11164 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
11165 a ctor initializer.
11167 * tree.c (equal_functions): Fix name in prototype.
11169 * decl.c (push_local_binding): Add FLAGS argument.
11170 (pushdecl, push_overloaded_decl): Pass it.
11171 * decl2.c (do_local_using_decl): Likewise.
11172 * cp-tree.h: Adjust prototype.
11173 * decl.c (poplevel): Fix logic.
11175 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
11176 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
11177 (cat_namespace_levels): Don't loop forever.
11179 1999-01-25 Richard Henderson <rth@cygnus.com>
11181 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
11183 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
11185 * class.c (resolve_address_of_overloaded_function): Mark the
11186 chosen function used.
11188 * call.c (build_call): Make sure that a function coming in has
11189 been marked used already.
11190 * decl.c (expand_static_init): Call mark_used instead of
11192 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
11193 alloc_eh_object, expand_throw): Likewise.
11194 * init.c (build_builtin_delete_call): Likewise.
11195 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
11196 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
11197 expand_generic_desc): Likewise.
11199 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
11201 * tree.c (equal_functions): New function.
11202 (ovl_member): Call it.
11204 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
11206 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
11208 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
11210 * decl.c (decls_match): Return 1 if old and new are identical.
11211 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
11213 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
11215 * decl.c (start_function): Make member functions one_only on windows.
11216 * decl2.c (import_export_decl): Likewise.
11218 * decl.c (grokdeclarator): Don't complain about implicit int in
11219 a system header. Change same-name field check to not complain in
11220 a system header instead of within extern "C".
11222 1999-01-21 Mark Mitchell <mark@markmitchell.com>
11224 * cp-tree.h (PUSH_GLOBAL): New macro.
11225 (PUSH_LOCAL): Likewise.
11226 (PUSH_USING): Likewise.
11227 (namespace_bindings_p): Declare.
11228 (push_overloaded_decl): Likewise.
11229 * decl.c (push_overloaded_decl): Don't make it static. Check for
11230 illegal declarations after using declarations here.
11231 (namespace_bindings_p): Likewise.
11232 (duplicate_decls): Don't consider declarations from different
11233 namespaces to be the same.
11234 (pushdecl): Use symbolic PUSH_ constants in calls to
11235 push_overloaded_decl.
11236 (push_overloaded_decl_1): Likewise.
11237 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
11238 (do_nonmember_using_decl): Check for illegal using declarations
11239 after ordinary declarations here.
11240 (do_local_using_decl): Call pushdecl to insert declarations.
11242 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
11244 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
11246 1999-01-21 Mark Mitchell <mark@markmitchell.com>
11248 * tree.c (build_cplus_array_type_1): Don't call build_array_type
11249 for types involving template parameters.
11251 * cp-tree.h (PARM_DECL_EXPR): Delete.
11252 (convert_default_arg): Change prototype.
11253 (check_default_argument): Declare.
11254 (search_tree): Likewise.
11255 * call.c (convert_default_arg): Take the function to which the
11256 default argument belongs as a parameter, and do any necessary
11257 instantiation here, instead of ...
11258 (build_over_call): Here.
11259 * decl.c (local_variable_p): New function.
11260 (check_default_argument): Likewise, split out and tidied from ...
11262 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
11263 * pt.c (tsubst_call_declarator_parms): New function.
11264 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
11265 with CALL_EXPRs, rather than trying to be clever.
11266 (tsubst): Use tsubst_call_declarator_parms.
11267 * tree.c (search_tree): Don't make it static.
11268 * typeck.c (convert_arguments): Use new interface to
11269 convert_default_arg.
11271 1999-01-20 Mark Mitchell <mark@markmitchell.com>
11273 * error.c (dump_function_decl): Don't print the argument types for
11274 a function when the verbosity level is negative.
11276 * call.c (build_over_call): Check format attributes at call-time.
11278 * pt.c (tsubst_copy): Fix comment.
11279 (unify): Don't allow unification with variable-sized arrays.
11281 * semantics.c (finish_stmt_expr): When processing a template make
11282 the BIND_EXPR long-lived.
11284 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
11286 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
11287 (import_export_vtable): Not here.
11289 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
11291 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
11292 non-static member function.
11294 1999-01-18 Nathan Sidwell <nathan@acm.org>
11296 * class.c (instantiate_type): Only diagnose illegal address of member
11297 function if complaining.
11299 * decl.c (lookup_name_real): Remove duplicate code.
11301 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
11303 * tree.c (copy_template_template_parm): Use permanent_obstack.
11305 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11307 * pt.c (unify): Remove restrictions on deduction of argument
11308 of template template parameters.
11310 1999-01-18 Nathan Sidwell <nathan@acm.org>
11312 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
11314 * class.c (resolve_address_of_overloaded_function): Show list of
11315 all candidates, when none of them match.
11317 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
11319 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
11320 definition of 'casting away const' in reinterpret_cast<>.
11322 1999-01-18 Graham <grahams@rcp.co.uk>
11324 * cvt.c: Add include for decl.h, remove extern for
11325 static_aggregates which is now provided by decl.h.
11327 * Makefile.in (cvt.o): Add dependency for decl.h and missing
11328 dependencies for convert.h and flags.h.
11330 1999-01-18 Nathan Sidwell <nathan@acm.org>
11332 * decl2.c (do_dtors): Set current location to that of the
11333 decl, for sensible diagnostics and debugging.
11334 (check_classfn): Issue `incomplete type' error, if
11335 class is not defined.
11337 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
11339 * cp-tree.h: Add prototype for bound_pmf_p.
11341 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
11342 Manfred Hollstein <manfred@s-direktnet.de>
11344 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
11347 1999-01-16 Nathan Sidwell <nathan@acm.org>
11349 * cp-tree.h (struct lang_type): Added has_mutable flag.
11350 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
11351 (TYPE_HAS_MUTABLE_P): New macro to read it.
11352 (cp_has_mutable_p): Prototype for new function.
11353 * class.c (finish_struct_1): Set has_mutable from members.
11354 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
11355 it contains a mutable.
11356 * typeck.c (cp_has_mutable_p): New function.
11358 1999-01-15 Mark Mitchell <mark@markmitchell.com>
11360 * pt.c (process_template_parm): Ignore top-level qualifiers on
11361 non-type parameters.
11363 * decl.c (start_function): Use current_function_parms in the call
11364 to require_complete_type_for_parms, not the probably empty
11367 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
11369 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
11371 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
11372 that we don't suppress the other copies.
11373 * lex.c (handle_cp_pragma): Likewise.
11375 1999-01-13 Mark Mitchell <mark@markmitchell.com>
11377 * decl.c (grokdeclarator): Undo 1998-12-14 change.
11378 * tree.c (build_cplus_array_type_1): Likewise.
11379 * pt.c (instantiate_class_template): Remove misleading comment.
11380 (tsubst_aggr_type): Substitute if there are template parameters,
11381 regardless of whether or not they use template arguments.
11382 (unify): Likewise, but for unification.
11384 1999-01-12 Richard Henderson <rth@cygnus.com>
11386 * cp-tree.h (flag_permissive): Declare extern.
11388 1999-01-06 Mark Mitchell <mark@markmitchell.com>
11390 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
11392 (lang_type): Add is_partial_instantiation. Decrease width of
11394 (PARTIAL_INSTANTIATION_P): New macro.
11395 (OPERATOR_TYPENAME_P): Remove.
11396 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
11397 OPERATOR_TYPENAME_P.
11398 (grok_op_properties): Likewise.
11399 * friend.c (do_friend): Handle friends that are member functions
11401 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
11402 * pt.c (instantiate_class_template): Rework for clarity. Avoid
11403 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
11404 any more partial instantiation than is absolutely necessary for
11405 implicit typename. Set PARTIAL_INSTANTIATION_P.
11406 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
11407 * semantics.c (begin_class_definition): Handle partial
11408 specializations of a type that was previously partially
11411 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
11413 * g++spec.c (LIBSTDCXX): Provide default definition.
11414 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
11416 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11418 * Make-lang.in (g++.o): Depend on prefix.h.
11420 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
11422 * tree.c (bound_pmf_p): New fn.
11423 * typeck.c (build_c_cast): Use it.
11425 * decl.c (grok_op_properties): Use same_type_p.
11427 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11429 * Makefile.in (cvt.o): Depend on toplev.h.
11431 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
11433 * cvt.c: Include toplev.h.
11435 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
11438 * init.c (expand_vec_init): Initialize variable `itype'.
11440 * lex.c (yyerror): Cast the argument passed to a ctype function to
11443 * method.c (build_mangled_C9x_name): Wrap prototype and definition
11444 in "HOST_BITS_PER_WIDE_INT >= 64".
11446 * typeck.c (build_binary_op): Mark parameter `convert_p' with
11449 1998-12-22 Mark Mitchell <mark@markmitchell.com>
11451 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
11452 * tree.c (build_exception_variant): Don't crash on empty throw
11455 1998-12-18 DJ Delorie <dj@cygnus.com>
11457 * cvt.c (convert_to_reference): Check for both error_mark_node
11458 and NULL_NODE after call to convert_for_initialization.
11460 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
11462 * error.c (interesting_scope_p): New fn.
11463 (dump_simple_decl): Use it.
11464 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
11465 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
11467 1998-12-16 Mark Mitchell <mark@markmitchell.com>
11469 * class.c (resolve_address_of_overloaded_function): Do conversion
11470 to correct type here, rather than ...
11471 (instantiate_type): Here.
11473 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
11474 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
11475 (decl_template_parm_p): Remove.
11476 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
11478 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
11479 * pt.c (push_inline_template_parms_recursive): Set it.
11480 (decl_template_parm_p): Remove.
11481 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
11482 (process_template_parm): Set it.
11484 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
11486 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
11487 if configured with cpplib.
11489 1998-12-15 Mark Mitchell <mark@markmitchell.com>
11491 * decl.c (poplevel): Make sure ns_binding is initialized.
11493 * decl.c (finish_function): Undo inadvertent change in previous
11496 1998-12-14 Mark Mitchell <mark@markmitchell.com>
11498 * class.c (pushclass): Tweak handling of class-level bindings.
11499 (resolve_address_of_overloaded_function): Update pointer-to-member
11501 (instantiate_type): Likewise.
11502 * cvt.c (cp_convert_to_pointer): Likewise.
11503 * decl.c (pop_binding): Take the DECL to pop, not just the name.
11504 Deal with `struct stat' hack.
11505 (binding_level): Add to documentation.
11506 (push_binding): Clear BINDING_TYPE.
11507 (add_binding): New function.
11508 (push_local_binding): Use it.
11509 (push_class_binding): Likewise.
11510 (poplevel): Adjust calls to pop_binding.
11511 (poplevel_class): Likewise.
11512 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
11513 declarations to current binding level.
11514 (push_class_level_binding): Likewise.
11515 (push_overloaded_decl): Adjust handling of OVERLOADs in local
11517 (lookup_namespace_name): Don't crash when confronted with a
11519 (lookup_name_real): Do `struct stat' hack in local binding
11521 (build_ptrmemfunc_type): Adjust documentation.
11522 (grokdeclarator): Don't avoid building real array types when
11523 processing templates unless really necessary.
11524 (finish_method): Adjust calls to pop_binding.
11525 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
11526 not reparse_decl_as_expr.
11527 (build_expr_from_tree): Deal with a template-id as the function to
11528 call in a METHOD_CALL_EXPR.
11529 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
11530 (maybe_adjust_types_For_deduction): Don't do peculiar things with
11532 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
11533 pointer-to-member types where necessary.
11534 * tree.c (build_cplus_array_type_1): Don't avoid building real
11535 array types when processing templates unless really necessary.
11536 (build_exception_variant): Compare the exception lists correctly.
11538 1998-12-13 Mark Mitchell <mark@markmitchell.com>
11540 * cp-tree.def (CPLUS_BINDING): Update documentation.
11541 * cp-tree.h (LOCAL_BINDING_P): New macro.
11542 (lang_identifier): Rename local_value to bindings.
11543 (tree_binding): Make `scope' of type `void*', not `tree'.
11544 (BINDING_SCOPE): Update documentation.
11545 (IDENTIFIER_LOCAL_VALUE): Remove.
11546 (IDENTIFIER_CLASS_VALUE): Document.
11547 (IDENTIFIER_BINDING): New macro.
11548 (IDENTIFIER_VALUE): Likewise.
11549 (TIME_IDENTIFIER_TIME): Likewise.
11550 (TIME_IDENTIFIER_FILEINFO): Likewise.
11551 (IMPLICIT_TYPENAME_P): Likewise.
11552 (set_identifier_local_value): Remove.
11553 (push_local_binding): New function.
11554 (push_class_binding): Likewise.
11555 * class.c (pushclass): Update comments; use push_class_binding.
11556 * decl.c (set_identifier_local_value_with_scope): Remove.
11557 (set_identifier_local_value): Likewise.
11558 (push_binding): New function.
11559 (pop_binding): Likewise.
11560 (binding_level): Update documentation. Remove shadowed.
11561 (BINDING_LEVEL): New macro.
11562 (free_binding_nodes): New variable.
11563 (poplevel): Adjust for new name-lookup scheme. Don't mess up
11564 BLOCK_VARs when doing for-scope extension. Remove effectively
11566 (pushlevel_class): Tweak formatting.
11567 (poplevel_class): Adjust for new name-lookup scheme.
11568 (print_binding_level): Likewise.
11569 (store_bindings): Likewise.
11570 (pushdecl): Likewise.
11571 (pushdecl_class_level): Likewise.
11572 (push_class_level_binding): Likewise.
11573 (push_overloaded_decl): Update comments. Adjust for new
11574 name-lookup scheme.
11575 (lookup_name_real): Likewise.
11576 (lookup_name_current_level): Likewise.
11577 (cp_finish_decl): Likewise.
11578 (require_complete_types_for_parms): Likewise. Remove misleading
11580 (grok_parms): Likewise. Don't call
11581 require_complete_types_for_parms here.
11582 (grok_ctor_properties): Don't treat templates as copy
11584 (grop_op_properties): Or as assignment operators.
11585 (start_function): Document. Adjust for new name-lookup scheme.
11586 (finish_function): Likewise.
11587 * decl2.c (do_local_using_decl): Use push_local_binding.
11588 * lex.c (begin_definition_of_inclass_inline): New function, split
11590 (do_pending_inlines): Here, and ...
11591 (process_next_inline): Here.
11592 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
11593 (init_filename_times): Likewise.
11594 (extract_interface_info): Likewise.
11595 (ste_typedecl_interface_info): Likewise.
11596 (check_newline): Likewise.
11597 (dump_time_statistics): Likewise.
11598 (handle_cp_pragma): Likewise.
11599 (do_identifier): Adjust for new name-lookup scheme.
11600 * parse.y (function_try_block): Return ctor_initializer_opt value.
11602 (fn.defpen): Pass appropriate values to start_function.
11603 (pending_inline): Use functor_try_block value, and pass
11604 appropriate values to finish_function.
11605 * pt.c (is_member_template): Update documentation; remove handling
11606 of FUNCTION_DECLs. As per name, this function should deal only in
11608 (decl_template_parm_p): Change name of olddecl parameter to decl.
11609 (check_template_shadow): Adjust for new name-lookup scheme.
11610 (lookup_template_class): Likewise.
11611 (tsubst_decl): Tweak so as not to confuse member templates with
11612 copy constructors and assignment operators.
11613 (unify): Handle UNION_TYPEs.
11614 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
11615 (lang_print_xnode): Adjust for new name-lookup scheme.
11616 * typeck.c (mark_addressable): Likewise.
11617 (c_expand_return): Likewise.
11619 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
11621 * decl.c (grokdeclarator): Allow field with same name as class
11624 * decl.c (lookup_name_real): Don't limit field lookup to types.
11625 * class.c (check_member_decl_is_same_in_complete_scope): No error
11626 if icv and x are the same.
11627 * lex.c (do_identifier): Tweak error message.
11629 1998-12-10 Mark Mitchell <mark@markmitchell.com>
11631 * decl.c (start_enum): Use push_obstacks, not
11632 end_temporary_allocation.
11633 (finish_enum): Call pop_obstacks.
11635 1998-12-10 Mark Mitchell <mark@markmitchell.com>
11637 * class.c (instantiate_type): Return error_mark_node rather than
11640 1998-12-09 Mark Mitchell <mark@markmitchell.com>
11642 * cp-tree.h (most_specialized_instantiation): New function.
11643 (print_candidates): Likewise.
11644 * class.c (validate_lhs): Remove.
11645 (resolve_address_of_overloaded_function): New function, split out
11646 and then substantially reworked, from ...
11647 (instantiate_type): Use it. Simplify.
11648 * cvt.c (convert_to_reference): Complain when caller has indicated
11649 that's the right thing to do. Don't crash if instantiate_type
11651 * pt.c: Substitute `parameters' for `paramters' throughout.
11652 (print_candidates): Don't make it static.
11653 (most_specialized_instantiation): Split out from ...
11654 (most_specialized): Here.
11656 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
11658 * lex.c (lang_init_options): Initialize cpplib.
11659 * decl2.c (parse_options,cpp_initialized): Removed.
11660 (lang_decode_option): Move initialization of cpplib to
11663 1998-12-09 Mark Mitchell <mark@markmitchell.com>
11665 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
11666 well as the TYPE_DECL, when a typedef name is assigned to a
11667 previously anonymous type.
11669 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
11671 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
11672 __cp_eh_info for getting the eh info pointer. Add table_index to
11674 (push_eh_cleanup): Don't increment 'handlers' data field.
11675 (process_start_catch_block): Don't set the 'caught' field.
11677 * cp/exception.cc (CP_EH_INFO): New macro for getting the
11678 exception info pointer within library routines.
11679 (__cp_eh_info): Use CP_EH_INFO.
11680 (__start_cp_handler): Get exception info pointer, set caught field,
11681 and increment the handlers field. Avoids this being done by handlers.
11682 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
11683 (uncaught_exception): Use CP_EH_INFO macro.
11685 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
11687 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
11689 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
11691 * lex.c (check_newline): Add support for \ as `natural'
11692 characters in file names in #line to be consistent with #include
11693 handling. We support escape processing in the # 1 "..." version of
11694 the command. See also support in cp/lex.c.
11696 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
11698 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
11701 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
11703 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
11705 * error.c (dump_simple_decl): Also print namespace context.
11706 (dump_function_decl): Likewise.
11708 * decl2.c (ambiguous_decl): Don't print old value if it's
11711 * decl.c (lookup_name_real): Fix handling of local types shadowed
11712 by a non-type decl. Remove obsolete code.
11713 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
11715 * lang-options.h: Add -fpermissive.
11716 * decl2.c: Likewise.
11717 * cp-tree.h: Add flag_permissive.
11718 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
11719 were specified, set flag_pedantic_errors.
11720 * call.c (build_over_call): Turn dropped qualifier messages
11721 back into pedwarns.
11722 * cvt.c (convert_to_reference): Likewise.
11723 * typeck.c (convert_for_assignment): Likewise.
11725 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
11727 * decl2.c (coerce_new_type): Use same_type_p.
11728 (coerce_delete_type): Likewise.
11730 * call.c (check_dtor_name): Return 1, not error_mark_node.
11732 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
11734 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
11735 if MULTIPLE_SYMBOL_SPACES.
11737 * pt.c (check_template_shadow): New fn.
11738 * decl2.c (grokfield): Use it.
11739 * decl.c (pushdecl): Likewise.
11740 (pushdecl_class_level): Likewise.
11741 (start_method): Likewise.
11742 (xref_tag): Don't try to use 't' if we're defining.
11744 * call.c (check_dtor_name): Just return an error_mark_node.
11745 * pt.c (lookup_template_class): Complain about using non-template here.
11746 * parse.y (apparent_template_type): Not here.
11748 * pt.c (check_explicit_specialization): Complain about specialization
11751 * lang-options.h: Add -f{no-,}implicit-inline-templates.
11753 * pt.c (convert_nontype_argument): Don't assume that any integer
11754 argument is intended to be a constant-expression.
11756 1998-12-03 Mark Mitchell <mark@markmitchell.com>
11758 * class.c (handle_using_decl): Fix comment. Don't lookup
11759 constructors in base classes.
11760 (validate_lhs): Fix typo in comment.
11761 * search.c (lookup_field_1): Don't return a USING_DECL.
11763 * cp-tree.h (DECL_ACCESS): Improve documentation.
11765 * decl.c (expand_static_init): Don't set the initialization-done
11766 flag until the initialization is done.
11768 1998-12-02 Mark Mitchell <mark@markmitchell.com>
11770 * decl2.c (validate_nonmember_using_decl): Complain about using
11771 declarations for class members.
11773 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
11775 * typeck2.c (process_init_constructor): Use same_type_p.
11777 * decl.c (check_tag_decl): Don't warn about null decl inside a
11780 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
11782 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
11783 (resolve_overloaded_unification): Strip baselinks.
11785 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11787 * g++spec.c: Don't prototype xmalloc.
11789 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
11791 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
11793 * decl.c (check_tag_decl): Do complain about null friend decl at
11796 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
11798 * lex.c (make_lang_type): Clear the whole struct lang_type, not
11799 only the first multiple of sizeof (int).
11801 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
11803 * decl.c (start_decl): An explicit specialization of a static data
11804 member is only a definition if it has an initializer.
11806 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
11807 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
11809 * init.c (expand_default_init): Check for DIRECT_BIND instead of
11812 * call.c (build_over_call): Use build_decl.
11814 * except.c (expand_throw): Just use convert, not
11815 build_reinterpret_cast.
11817 * lex.c (handle_generic_pragma): Use token_buffer.
11819 * decl.c (check_tag_decl): Don't complain about null friend decl.
11821 1998-11-24 Dave Pitts <dpitts@cozx.com>
11823 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
11825 * lex.c (check_newline): Use ISALPHA.
11826 (readescape): Use ISGRAPH.
11827 (yyerror): Use ISGRAPH.
11829 1998-11-24 Nathan Sidwell <nathan@acm.org>
11831 * search.c (get_abstract_virtuals): Do not use initial
11832 CLASSTYPE_ABSTRACT_VIRTUALS.
11833 * typeck2.c (abstract_virtuals_error): Show location of abstract
11835 * call.c (build_new_method_call): Use
11836 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
11837 * class.c (finish_struct_bits): Don't bother working out whether
11838 get_abstract_virtuals will do anything, just do it.
11840 1998-11-24 Graham <grahams@rcp.co.uk>
11842 * typeck.c (build_component_ref): Remove unused statement.
11844 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
11846 * class.c (add_method): Catch invalid overloads.
11848 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
11849 * search.c (lookup_conversions): Handle getting real OVERLOADs.
11850 (add_conversions): Likewise. Revert last change.
11851 * call.c (add_conv_candidate): Pass totype to add_candidate instead
11852 of fn. Don't add a new candidate if the last one was for the same
11854 (print_z_candidates): Handle getting a type as a function.
11855 (joust): If we got two conversion candidates to the same type,
11857 (build_object_call): Lose 'templates'.
11858 (build_user_type_conversion_1): Handle getting real OVERLOADs.
11860 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
11862 * typeck2.c (process_init_constructor): If there are elements
11863 that don't have initializers and they need to have constructors
11864 run, supply them with initializers.
11866 * class.c (finish_struct_1): A class with a 0-width bitfield is
11869 1998-11-23 Mark Mitchell <mark@markmitchell.com>
11871 * pt.c (instantiate_class_template): Don't try to figure out what
11872 specialization to use for a partial instantiation. Correct
11873 typos in a couple of comments. Avoid calling uses_template_parms
11876 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
11878 * method.c (process_overload_item): Add call to
11879 build_mangled_C9x_name for intTI_type_nodes.
11880 (build_mangled_C9x_name): Add prototype, define.
11881 * decl.c (init_decl_processing): Add names for
11884 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
11886 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
11888 * class.c (finish_struct_1): Set things up for 0-width bitfields
11889 like we do for others.
11891 * decl.c (check_tag_decl): New fn.
11892 (shadow_tag): Split out from here.
11893 * decl2.c (grok_x_components): Call it.
11895 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
11897 * decl.c: Lose warn_about_return_type.
11898 (grokdeclarator): Always complain about implicit int, except for
11901 * decl.c (tag_name): New fn.
11902 (xref_tag): Complain about using typedef-name after class-key.
11904 * init.c (expand_vec_init): Also keep going if from_array.
11906 * tree.c (is_overloaded_fn): Also handle the output of
11909 * decl.c (grokdeclarator): Use constructor_name when comparing
11910 field name against enclosing class.
11911 * class.c (finish_struct_anon): Likewise.
11913 1998-11-22 Mark Mitchell <mark@markmitchell.com>
11915 * decl.c (poplevel): Remove code to handle KEEP == 2.
11916 (finish_function): Don't confuse BLOCK-order when
11917 processing a destructor.
11919 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
11921 * decl.c (require_complete_types_for_parms): Call layout_decl
11922 after we've completed the type.
11924 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
11926 * decl2.c (validate_nonmember_using_decl): Allow using templates
11927 from the global namespace.
11929 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
11931 Handle specifying template args to member function templates.
11932 * tree.c (build_overload): Always create an OVERLOAD for a template.
11933 * search.c (add_conversions): Handle finding an OVERLOAD.
11934 * decl2.c (check_classfn): Likewise.
11935 * lex.c (identifier_type): See through a baselink.
11936 * parse.y (do_id): Don't call do_identifier if we got a baselink.
11937 * class.c (instantiate_type, case TREE_LIST): Recurse.
11939 * decl.c (grokdeclarator): Allow a boolean constant for array
11940 bounds, odd as that sounds.
11942 * pt.c (unify): Be more strict about non-type parms, except for
11944 (UNIFY_ALLOW_INTEGER): New macro.
11946 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
11948 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
11950 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
11952 * semantics.c (begin_class_definition): Call
11953 maybe_process_partial_specialization before push_template_decl.
11954 Don't call push_template_decl for a specialization.
11955 * search.c (lookup_field): Do return a member template class.
11956 * decl2.c (handle_class_head): Handle member template classes.
11958 * decl.c (grokdeclarator): A parm type need not be complete.
11960 * pt.c (convert_nontype_argument): Fix thinko.
11962 1998-11-18 Mark Mitchell <mark@markmitchell.com>
11964 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
11965 (global_delete_fndecl): New variable.
11966 * decl.c (global_delete_fndecl): Define it.
11967 (init_decl_processing): Set it.
11968 * init.c (build_builtin_delete_call): Use it.
11969 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
11972 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
11974 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
11977 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
11978 * call.c (build_object_call): Also support references to functions.
11979 * typeck.c (convert_for_initialization): Don't decay a function
11980 if the target is a reference to function.
11982 * search.c (add_conversions): Get all the overloads from a class.
11984 * decl.c (grok_ctor_properties): Complain about any constructor
11985 that will take a single arg of the class type by value.
11987 * typeck2.c (build_functional_cast): Can't create objects of
11988 abstract classes this way.
11989 * cvt.c (ocp_convert): Likewise.
11991 * decl.c (grokfndecl): Member functions of local classes are not
11994 1998-11-18 Mark Mitchell <mark@markmitchell.com>
11996 * Make-lang.in (cc1plus): Add dependency on hash.o.
11998 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
12000 * search.c (get_abstract_virtuals): Complain about virtuals with
12001 no final overrider.
12002 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
12003 with no final overrider.
12004 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
12005 on virtuals with no final overrider.
12007 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
12009 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
12012 * friend.c (do_friend): Don't set_mangled_name_for_decl.
12014 * class.c (finish_struct_anon): Complain about non-fields.
12015 * decl2.c (build_anon_union_vars): Likewise.
12017 * decl.c (grokdeclarator): Normal data members can't have the same
12018 name as the class, either.
12019 * class.c (finish_struct_anon): Neither can members of an
12022 1998-11-17 Mark Mitchell <mark@markmitchell.com>
12024 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
12025 (TYPE_BINFO): Likewise.
12026 (IS_AGGR_TYPE): Tweak.
12027 (SET_IS_AGGR_TYPE): New macro.
12028 (CLASS_TYPE_P): Tweak.
12029 (lang_type): Group mark bitfields together. Remove linenum.
12030 (CLASSTYPE_SOURCE_LINE): Remove macro.
12031 (CLASSTYPE_MARKED_N): New macro.
12032 (SET_CLASSTYPE_MARKED_N): Likewise.
12033 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
12034 (CLASS_TYPE_MARKED_*): Use them.
12035 (SET_CLASSTYPE_MARKED_*): Likewise.
12036 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
12037 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
12038 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
12039 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
12040 * class.c (class_cache_obstack): New variable.
12041 (class_cache_firstobj): Likewise.
12042 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
12043 (pushclass): Free the cache, when appropriate.
12045 (maybe_push_cache_obstack): Use class_cache_obstack.
12046 * decl.c (include hash.h).
12047 (typename_hash): New function.
12048 (typename_compare): Likewise.
12049 (build_typename_type): Check the hash table to avoid creating
12051 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
12052 (grokdeclarator): Use CLASS_TYPE_P.
12053 (xref_basetypes): Likewise.
12054 (start_function): Likewise. Don't put current_class_ref on the
12056 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
12058 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
12059 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
12060 fields for types other than class types. Do clear TYPE_ALIAS_SET
12061 for types other than class types, though.
12062 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
12063 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12064 * pt.c (process_template_parm): Don't set
12065 CLASSTYPE_GOT_SEMICOLON.
12066 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12067 Coerce arguments on the momentary obstack.
12068 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12069 (instantiate_class_template): Calculate template arguments on the
12070 momentary obstack. Tidy.
12071 (tsubst_template_arg_vector): Use make_temp_vec.
12072 (tsubst_aggr_type): Put template arguments on the momentary
12074 (tsubst_decl): Likewise.
12075 (tsubst): Copy the array bounds index to the permanent obstack
12076 before building index types. Use new macros.
12077 (unify): Use new macros.
12078 (do_type_instantiation): Likewise.
12079 * search.c (lookup_fnfields_1): Use new macros.
12080 (dfs_pushdecls): Build envelopes on the cache obstack.
12081 (dfs_compress_decls): Use new macros.
12082 (push_class_decls): Build on the cache obstack.
12083 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
12084 * sign.c (build_signature_pointer_or_reference_type): Use
12086 * tree.c (make_binfo): Check CLASS_TYPE_P.
12087 (copy_template_template_parm): Adjust.
12088 (make_temp_vec): Use push_expression_obstack.
12089 * typeck.c (complete_type): Use new macros.
12090 (comptypes): Likewise.
12092 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
12094 * pt.c (tsubst): Add diagnostics for invalid array, reference
12095 and pointer to member types.
12097 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
12099 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
12101 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
12104 * parse.y (structsp): Fix cut-and-paste error.
12106 * init.c (build_new): Complain about non-integral size.
12108 * parse.y (unary_expr): Complain about defining types in sizeof.
12110 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
12112 * rtti.c (build_x_typeid): Complain about typeid without
12113 including <typeinfo>.
12114 (get_typeid): Likewise. Complain about typeid of incomplete type.
12115 (get_tinfo_fn_dynamic): Likewise.
12116 (get_typeid_1): Not static anymore.
12117 * except.c (build_eh_type_type): Use get_typeid_1.
12119 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
12120 ambiguous or private bases. Fix warning for reference cast.
12122 1998-11-16 Mark Mitchell <mark@markmitchell.com>
12124 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
12125 * decl.c (duplicate_decls): Remove special-case code to deal with
12126 template friends, and just do the obvious thing.
12127 * pt.c (register_specialization): Tweak for clarity, and also to
12128 clear DECL_INITIAL for an instantiation before it is merged with a
12130 (check_explicit_specialization): Fix indentation.
12131 (tsubst_friend_function): Handle both definitions in friend
12132 declaration and outside friend declarations.
12133 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
12134 (regenerate_decl_from_template): Tweak accordingly.
12135 (instantiate_decl): Likewise.
12137 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
12139 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
12140 member function reference to error.
12141 * cvt.c (ocp_convert): Complain about converting an overloaded
12144 * init.c (build_offset_ref): Just return a lone static member
12147 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
12150 * typeck.c (build_binary_op_nodefault): Improve error handling.
12152 * decl.c (grokfndecl): Complain about making 'main' a template.
12154 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
12156 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
12157 TYPE_DECL in a template.
12159 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
12161 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
12163 * decl.c (struct cp_function): Add named_label_uses.
12164 (push_cp_function_context): Save it.
12165 (pop_cp_function_context): Restore it.
12166 (define_label): Also complain about jumping into the scope of
12167 non-POD objects that don't have constructors.
12168 * tree.c (pod_type_p): New fn.
12170 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
12171 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
12172 (get_tinfo_fn): Not here.
12173 * repo.c (repo_get_id): Abort if we get called for an incomplete
12176 1998-11-13 Mark Mitchell <mark@markmitchell.com>
12178 * except.c (expand_throw): Make sure first argument to
12179 __cp_push_exception is of type `void*' to avoid spurious error
12182 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
12184 * pt.c (try_one_overload): Take orig_targs again. Only check for
12185 mismatches against them; we don't care what a previous call found.
12186 (resolve_overloaded_unification): Adjust.
12188 * search.c (lookup_field): Don't return anything for a non-type
12189 field from a dependent type.
12190 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
12191 in an array declarator.
12192 (start_decl): Push into the class before looking for the field.
12194 1998-11-08 Mark Mitchell <mark@markmitchell.com>
12196 * method.c (build_overload_value): Handle REFERENCE_TYPE.
12198 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
12200 * decl.c (grokdeclarator): Allow namespace-scoped members if they
12203 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
12205 * pt.c (tsubst_decl): Don't mess with the global value of an
12206 un-mangled DECL_ASSEMBLER_NAME.
12208 1998-11-03 Christopher Faylor <cgf@cygnus.com>
12210 * decl.c (init_decl_processing): Remove CYGWIN conditional
12211 since CYGWIN is now able to deal with trapping signals.
12213 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12215 * cp-tree.h: Don't include gansidecl.h.
12216 * exception.cc: Include gansidecl.h (since we don't include config.h)
12217 * g++spec.c: Don't include gansidecl.h.
12219 1998-11-06 Mark Mitchell <mark@markmitchell.com>
12221 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
12223 (DECL_DEFINED_IN_CLASS_P): New macro.
12224 (TEMPLATE_PARMS_FOR_INLINE): Document.
12225 (check_static_variable_definition): New function.
12226 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
12228 (check_static_variable_definition): Split out from ...
12229 (grokdeclarator): Here.
12230 * pt.c (check_default_tmpl_args): New function, split out from ...
12231 (push_template_decl_real): Here.
12232 (instantiate_template): Fix comment.
12234 1998-11-04 Mark Mitchell <mark@markmitchell.com>
12236 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
12237 (CP_TYPE_VOLATILE_P): Likewise.
12238 (CP_TYPE_RESTRICT_P): Likewise.
12240 1998-11-03 Mark Mitchell <mark@markmitchell.com>
12242 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
12244 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
12246 * class.c (instantiate_type): Be more helpful.
12248 * decl2.c (import_export_decl): Call import_export_class.
12250 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
12251 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
12252 * pt.c (tsubst_copy): Likewise.
12254 1998-11-02 Mark Mitchell <mark@markmitchell.com>
12256 * init.c (expand_vec_init): Fix off-by-one error.
12258 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
12260 * parse.y (apparent_template_type): New type.
12261 (named_complex_class_head_sans_basetype): Use it.
12262 * Makefile.in (CONFLICTS): One new conflict.
12263 * parse.c: Regenerated.
12265 1998-11-01 Mark Mitchell <mark@markmitchell.com>
12267 * cp-tree.h (COMPARE_STRICT): New macro.
12268 (COMPARE_BASE): Likewise.
12269 (COMPARE_RELAXED): Likewise.
12270 (COMPARE_REDECLARATION): Likewise.
12271 (same_type_p): Likewise.
12272 (same_or_base_type_p): Likewise.
12273 * call.c (standard_conversion): Use them, in place of comptypes
12274 with numeric arguments.
12275 (reference_binding): Likewise.
12276 (convert_like): Likewise.
12277 (build_over_call): Likewise.
12278 (is_subseq): Likewise.
12279 (is_properly_derived_from): Likewise.
12280 (compare_ics): Likewise.
12282 * class.c (delete_duplicate_fields_1): Likewise.
12283 (resolves_to_fixed_type_p): Likewise.
12284 (instantiate_type): Likewise. Remove #if 0'd code.
12285 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
12286 (pushdecl): Likewise.
12287 (lookup_name_real): Likewise.
12288 (grokdeclarator): Likewise. Check for illegal array declarations.
12289 (grokparms): Likewise.
12290 (grok_op_properties): Likewise.
12291 * decl2.c (check_classfn): Likewise.
12292 * friend.c (is_friend): Likewise.
12293 (make_friend_class): Likewise.
12294 * init.c (expand_aggr_init): Likewise.
12295 (expand_vec_init): Likewise.
12296 * pt.c (is_member_template_class): Remove declaration.
12297 (is_specialization_of): Use COMPARE_* and new macros.
12298 (comp_template_parms): Likewise.
12299 (convert_nontype_argument): Likewise.
12300 (coerce_template_template_parms): Likewise.
12301 (template_args_equal): Likewise.
12302 (lookup_template_class): Likewise.
12303 (type_unification_real): Likewise.
12305 (get_bindings_real): Likewise.
12306 * search.c (covariant_return_p): Likewise.
12307 (get_matching_virtual): Likewise.
12308 * sig.c (match_method_types): Likewise.
12309 * tree.c (vec_binfo_member): Likewise.
12310 (cp_tree_equal): Likewise.
12311 * typeck.c (common_type): Likewise.
12312 (comp_array_types): Likewise. Get issues involving unknown array
12314 (comptypes): Update comments. Use new flags.
12315 (comp_target_types): Use new macros.
12316 (compparms): Likewise.
12317 (comp_target_parms): Likewise.
12318 (string_conv_p): Likewise.
12319 (build_component_ref): Likewise.
12320 (build_indirect_ref): Likewise.
12321 (build_conditional_expr): Likewise.
12322 (build_static_cast): Likewise.
12323 (build_reinterpret_cast): Likewise.
12324 (build_const_cast): Likewise.
12325 (build_modify_expr): Likewise.
12326 (convert_for_assignment): Likewise.
12327 (comp_ptr_ttypes_real): Likewise.
12328 (ptr_reasonably_similar): Likewise.
12329 (comp_ptr_ttypes_const): Likewise.
12331 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
12333 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
12335 1998-10-30 Mark Mitchell <mark@markmitchell.com>
12337 * decl2.c (delete_sanity): Pass integer_zero_node, not
12338 integer_two_node, to build_vec_delete.
12339 * init.c (build_array_eh_cleanup): Remove.
12340 (expand_vec_init_try_block): New function.
12341 (expand_vec_init_catch_clause): Likewise.
12342 (build_vec_delete_1): Don't deal with case that auto_delete_vec
12343 might be integer_two_node anymore.
12344 (expand_vec_init): Rework for initialization-correctness and
12345 exception-correctness.
12346 * typeck2.c (process_init_constructor): Make mutual exclusivity
12347 of cases more obvious.
12349 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
12351 * decl.c (lookup_name_real): OK, only warn if not lexing.
12352 Simplify suggested fix.
12354 * cp-tree.h (IDENTIFIER_MARKED): New macro.
12355 * search.c (lookup_conversions): Use breadth_first_search.
12356 (add_conversions): Avoid adding two conversions to the same type.
12357 (breadth_first_search): Work with base binfos, rather
12358 than binfos and base indices.
12359 (get_virtual_destructor): Adjust.
12360 (tree_has_any_destructor_p): Adjust.
12361 (get_matching_virtual): Adjust.
12363 * pt.c (push_template_decl_real): Generalize check for incorrect
12364 number of template parms.
12365 (is_member_template_class): #if 0.
12367 1998-10-29 Richard Henderson <rth@cygnus.com>
12369 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
12372 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
12374 * lex.c: Call check_newline from lang_init always. After
12375 calling cpp_start_read, set yy_cur and yy_lim to read from the
12376 cpplib token buffer.
12378 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
12380 * class.c (instantiate_type): Don't consider templates for a normal
12383 * class.c (finish_struct_1): Don't complain about non-copy
12384 assignment ops in union members.
12386 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
12387 (prepare_fresh_vtable): Likewise.
12388 (finish_struct_1): Don't call import_export_class.
12389 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
12390 (finish_prevtable_vardecl): Lose.
12391 (finish_file): Don't call it.
12392 * pt.c (instantiate_class_template): Likewise.
12393 * cp-tree.h: Remove it.
12395 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
12396 * decl.c (finish_function): Not here.
12397 (start_function): Do set DECL_INITIAL.
12399 * pt.c (push_template_decl_real): Complain about default template
12400 args for enclosing classes.
12402 * call.c (add_function_candidate): Treat conversion functions
12403 as coming from the argument's class.
12404 * cp-tree.h (DECL_CONV_FN_P): New fn.
12405 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
12406 * class.c (add_method): Use DECL_CONV_FN_P.
12407 * decl2.c (check_classfn): Likewise.
12408 * error.c (dump_function_name): Likewise.
12409 (dump_function_decl): Likewise.
12410 * pt.c (fn_type_unification): Likewise.
12411 * search.c (add_conversions): Likewise.
12413 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
12415 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
12416 * method.c (hack_identifier): Also check for using RESULT_DECL
12417 from outer context.
12419 1998-10-27 Mark Mitchell <mark@markmitchell.com>
12421 * decl.c (grokdeclarator): Use type_quals, rather than constp,
12424 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
12426 * call.c (standard_conversion): instantiate_type here.
12427 (reference_binding): And here.
12428 (implicit_conversion): Not here.
12429 (build_op_delete_call): No need to cons up an OVERLOAD.
12430 * cvt.c (cp_convert_to_pointer): instantiate_type here.
12431 (convert_to_reference): And here.
12432 * decl.c (grok_reference_init): Not here.
12433 (grokparms): Or here.
12434 * typeck2.c (digest_init): Or here.
12435 * typeck.c (decay_conversion): Take the address of overloaded
12437 (require_instantiated_type): Lose.
12438 (convert_arguments): Don't handle unknown types here.
12439 (build_c_cast): Likewise.
12440 (build_binary_op): Gut.
12441 (build_conditional_expr): Don't require_instantiated_type.
12442 (build_modify_expr): Likewise.
12443 (build_static_cast): Don't instantiate_type.
12444 (build_reinterpret_cast): Likewise.
12445 (build_const_cast): Likewise.
12446 (convert_for_initialization): Likewise.
12447 (build_ptrmemfunc): Use type_unknown_p.
12448 (convert_for_assignment): Also do default_conversion on overloaded
12449 functions. Hand them off to ocp_convert.
12451 1998-10-26 Mark Mitchell <mark@markmitchell.com>
12453 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
12454 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
12456 * class.c (finish_struct_1): Use build_cplus_array_type to build
12458 * decl.c (init_decl_processing): Likewise.
12459 * except.c (expand_end_eh_spec): Likewise.
12460 * search.c (expand_upcast_fixups): Simplify very slightly.
12462 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
12464 * decl.c (grokdeclarator): Complain about a variable using
12465 constructor syntax coming back null from start_decl.
12467 * friend.c (make_friend_class): Complain about trying to make
12468 a non-class type a friend.
12470 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
12471 (start_function): Not here.
12473 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
12475 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
12477 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
12479 * typeck2.c (process_init_constructor): Only skip anonymous fields
12480 if they are bitfields.
12482 * cp-tree.def (TYPEOF_TYPE): New code.
12483 * error.c (dump_type_real): Handle it.
12484 * pt.c (tsubst): Likewise.
12485 * tree.c (search_tree): Likewise.
12486 * semantics.c (finish_typeof): New fn.
12487 * parse.y (typespec): Use it.
12488 * cp-tree.h: Declare it.
12490 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
12492 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
12494 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
12496 * typeck.c (convert_arguments): Don't handle pmf references
12499 * init.c (build_member_call): Don't try to convert to the base type
12500 if it's ambiguous or pedantic.
12502 * typeck2.c (check_for_new_type): Only depend on pedantic for
12505 1998-10-25 Mark Mitchell <mark@markmitchell.com>
12507 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
12508 non-converting constructors.
12510 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
12512 * gxxint.texi: Correct documentation for n, N, Q, and B.
12514 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
12516 * parse.y (condition): Convert VAR_DECL from reference to indirect
12519 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
12521 * exception.cc (__cp_pop_exception): Free the original exception
12522 value, not the potentially coerced one.
12524 1998-10-23 Mark Mitchell <mark@markmitchell.com>
12526 * Makefile.in (hash.h): Run gperf when necessary.
12528 * cp-tree.h (CP_TYPE_READONLY): Remove.
12529 (CP_TYPE_VOLATILE): Likewise.
12530 (CP_TYPE_QUALS): New macro.
12531 (CP_TYPE_CONST_P): Likewise.
12532 (CP_TYPE_VOLATILE_P): Likewise.
12533 (CP_TYPE_RESTRICT_P): Likewise.
12534 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
12535 (cp_build_type_variant): Rename to ...
12536 (cp_build_qualified_type): New function.
12537 (c_apply_type_quals_to_decl): Declare.
12538 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
12539 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
12540 (cp_type_qual_from_rid): New function.
12541 (compparms): Remove unused parameter. All callers changed.
12542 (cp_type_quals): New function.
12543 (at_least_as_qualified_p): Likewise.
12544 (more_qualified_p): Likewise.
12546 * call.c (standard_conversion): Replace calls to
12547 cp_build_type_variant with cp_build_qualified_type. Use
12548 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
12549 compare them. Use CP_TYPE_* macros to check qualifiers.
12550 (reference_binding): Likewise.
12551 (implicit_conversion): Likewise.
12552 (add_builtin_candidates): Likewise.
12553 (build_over_call): Likewise.
12554 * class.c (overrides): Compare all qualifiers, not just `const',
12555 on method declarations.
12556 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
12557 (convert_pointer_to_real): Likewise.
12558 (type_promotes_to): Likewise.
12559 * decl.c (check_for_uninitialized_const_var): New function.
12560 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
12561 (cp_finish_decl): Use check_for_uninitialized_const_var.
12562 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
12564 (grok_ctor_properties): Likewise.
12565 (grok_op_properties): Likewise.
12566 (start_function): Likewise.
12567 (rever_static_member_fn): Likewise.
12568 * decl2.c (grok_method_quals): Likewise.
12569 (grokfield): Likewise.
12570 * error.c (dump_readonly_or_volatile): Rename to ...
12571 (dump_qualifiers): New function. Handle `restrict'.
12572 (dump_type_real): Use it.
12573 (dump_aggr_type): Likewise.
12574 (dump_type_prefix): Likewise.
12575 (dump_type_suffix): Likewise.
12576 (dump_function_decl): Likewise.
12577 (cv_as_string): Likewise.
12578 * gxx.gperf: Add __restrict and __restrict__.
12579 * gxxint.texi: Document `u' as used for `__restrict', and a few
12580 other previously undocumented codes.
12581 * hash.h: Regenerated.
12582 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
12583 (build_member_call): Likewise.
12584 (build_new_1): Likewise.
12585 * lex.c (init_parse): Add entry for RID_RESTRICT.
12586 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
12587 (cp_type_qual_from_rid): Define.
12588 * lex.h (enum rid): Add RID_RESTRICT.
12589 * method.c (process_modifiers): Deal with `restrict'.
12590 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
12591 * parse.c: Regenerated.
12592 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
12593 (tsubst_aggr_type): Likewise.
12594 (tsubst): Likewise.
12595 (check_cv_quals_for_unify): Likewise.
12597 * rtti.c (init_rtti_processing): Likewise.
12598 (build_headof): Likewise.
12599 (get_tinfo_var): Likewise.
12600 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
12601 (expand_class_desc): Likewise.
12602 (expand_attr_desc): Likewise.
12603 (synthesize_tinfo_fn): Likewise.
12604 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
12605 (get_matching_virtual): Likewise.
12606 (expand_upcast_fixups): Likewise.
12607 * sig.c (build_signature_pointer_or_reference_name): Take
12608 type_quals, not constp and volatilep.
12609 (build_signature_pointer_or_reference_type): Likewise.
12610 (match_method_types): More CP_TYPE_QUALS conversion, etc.
12611 (build_signature_pointer_constructor): Likewise.
12612 (build_signature_method_call): Likewise.
12613 * tree.c (build_cplus_array_type): Likewise.
12614 (cp_build_type_variant): Rename to ...
12615 (cp_build_qualified_type): New function. Deal with `__restrict'.
12616 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
12617 (build_exception_variant): Likewise.
12618 (mapcar): Likewise.
12619 * typeck.c (qualif_type): Likewise.
12620 (common_type): Likewise.
12621 (comptypes): Likewise.
12622 (comp_cv_target_types): Likewise.
12623 (at_least_as_qualified_p): Define.
12624 (more_qualified_p): Likewise.
12625 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
12626 (compparms): Likewise.
12627 (inline_conversion): Likewise.
12628 (string_conv_p): Likewise.
12629 (build_component_ref): Likewise.
12630 (build_indirect_ref): Likewise.
12631 (build_array_ref): Likewise.
12632 (build_unary_op): Likewise.
12633 (build_conditional_expr): Likewise.
12634 (build_static_cast): Likewise.
12635 (build_c_cast): Likewise.
12636 (build_modify_expr): Likewise.
12637 (convert_For_assignment): Likewise.
12638 (comp_ptr_ttypes_real): Likewise.
12639 (cp_type_quals): New function.
12641 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
12643 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
12644 (CP_TYPE_VOLATILE): Likewise.
12645 * decl.c (grokdeclarator): Use them.
12646 * tree.c (canonical_type_variant): Likewise.
12648 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
12650 * parse.y (named_class_head): Push into class while parsing the
12652 * decl2.c (push_scope, pop_scope): New functions.
12653 * cp-tree.h: Declare them.
12654 * init.c (build_new_1): Delay cleanup until end of full expression.
12656 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
12658 * typeck.c (build_component_ref): Use of a type here is an error.
12660 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
12662 Revamp references to member functions.
12663 * method.c (hack_identifier): Call build_component_ref for a
12664 reference to a member function.
12665 * typeck.c (build_component_ref): Only return a single function
12666 if it's static. Otherwise, return a COMPONENT_REF.
12667 (build_x_function_call): Handle a COMPONENT_REF.
12668 (build_unary_op): Handle all unknown-type things.
12669 * decl2.c (arg_assoc): Handle COMPONENT_REF.
12670 * class.c (instantiate_type): Complain if the function we get is a
12671 nonstatic member function. Remove code for finding "compatible"
12673 * pt.c (tsubst_copy): Handle NOP_EXPR.
12674 * tree.c (build_dummy_object): New fn.
12675 (maybe_dummy_object): New fn.
12676 (is_dummy_object): New fn.
12677 * cp-tree.h: Declare them.
12678 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
12679 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
12680 * init.c (build_member_call): Use maybe_dummy_object and
12682 (build_offset_ref): Use maybe_dummy_object.
12683 (resolve_offset_ref): Use is_dummy_object.
12684 * typeck.c (build_x_function_call): Call build_dummy_object.
12685 (unary_complex_lvalue): Call is_dummy_object.
12687 * typeck.c (build_component_addr): Make sure field is a field.
12689 * call.c (build_new_op): Delete obsolete code.
12691 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
12693 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
12695 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
12696 std if std is ignored.
12698 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
12700 * decl.c (grokvardecl): Fix thinko.
12702 * decl.c (grokdeclarator): Embedded attrs bind to the right,
12705 * parse.y (fn.def2): Fix 'attrs' format.
12707 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
12709 * Makefile.in (CONFLICTS): Update.
12710 * parse.y (expr_or_declarator_intern): New rule.
12711 (expr_or_declarator, direct_notype_declarator, primary,
12712 functional_cast): Use it.
12713 (notype_declarator_intern): New rule.
12714 (notype_declarator, complex_notype_declarator): Use it.
12716 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
12718 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
12719 (grokvardecl): Likewise.
12721 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12723 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
12724 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
12726 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
12728 * pt.c (process_partial_specialization): Cast 1st argument of
12731 * tree.c (build_base_fields): Cast `base_align' to (int) when
12732 comparing against one.
12734 1998-10-16 Mark Mitchell <mark@markmitchell.com>
12736 * decl.c (lookup_name_real): Handle template parameters for member
12737 templates where said parameters have the same name as the
12740 * decl.c (expand_static_init): Build cleanups before entering the
12741 anonymous function used to do them to avoid access-checking
12744 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
12745 accidentally removed by previous change, and make DECL_RTL here.
12746 * class.c (add_method): Don't make DECL_RTL here.
12748 * pt.c (for_each_template_parm): Don't examine uninstantiated
12751 1998-10-16 Dave Brolley <brolley@cygnus.com>
12753 * lex.c (real_yylex): Fix unaligned access of wchar_t.
12755 1998-10-16 Mark Mitchell <mark@markmitchell.com>
12757 * class.c (add_method): Fix documentation to reflect previous
12758 changes. Check for duplicate method declarations here.
12759 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
12760 correctly; such things never match.
12761 (grokfndecl): Don't look for duplicate methods here.
12762 * decl2.c (check_classfn): Don't assume names are mangled.
12763 Don't add bogus member function declarations to a class before the
12764 class type is complete.
12765 (grokfield): Reformat error message.
12766 * method.c (set_mangled_name_for_decl): Don't mangle names while
12767 processing_template_decl.
12769 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
12771 * typeck.c (build_indirect_ref): Complain about a pointer to data
12773 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
12775 * init.c (resolve_offset_ref): Don't undo the above.
12777 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
12778 (struct lang_decl_flags): Add `bitfield'.
12779 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
12781 * decl2.c (grokbitfield, grok_alignof): Likewise.
12782 * init.c (build_offset_ref): Likewise.
12783 * typeck.c (build_component_addr, expr_sizeof): Likewise.
12784 * cvt.c (build_up_reference): Don't crash if taking the address
12785 returns error_mark_node.
12787 * decl.c (grokfndecl): Also check ctype when checking for ::main().
12789 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
12791 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
12793 (grokdeclarator): Instead of here.
12794 * friend.c (do_friend): Lose special handling of ::main and
12796 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
12798 * spew.c (yylex): Clear looking_for_typename if we got
12801 1998-10-15 Mark Mitchell <mark@markmitchell.com>
12803 * class.c (maybe_warn_about_overly_private_class): Improve error
12804 messages for class with only private constructors.
12806 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
12807 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
12808 (build_typename_type): New function.
12809 * decl.c (build_typename_type): Broken out from ...
12810 (make_typename_type): Use it.
12811 * search.c (lookup_field): Likewise.
12813 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12815 * pt.c (convert_nontype_argument): Check against type_referred_to.
12816 * decl.c (grokvardecl): Check for declarator name before building
12817 DECL_ASSEMBLER_NAME.
12819 1998-10-14 Mark Mitchell <mark@markmitchell.com>
12821 * pt.c (lookup_template_class): Add comment.
12822 (instantiate_class_template): Don't mark the _TYPE node for
12823 member class templates as an instantiation.
12825 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
12827 * decl.c (grokfndecl): Fix my thinko.
12829 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
12831 * tinfo2.cc (fast_compare): Remove.
12832 (before): Just use strcmp.
12833 * tinfo.cc (operator==): Just use strcmp.
12835 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
12837 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
12840 1998-10-13 Mark Mitchell <mark@markmitchell.com>
12842 * cp-tree.h (specializations_of_same_template_p): Remove.
12843 * search.c (get_template_base): Don't use it.
12844 (get_template_base_recursive): Likewise.
12845 * pt.c (specializations_of_same_template_p): Remove.
12846 (unify): Don't use it.
12847 (lookup_template_class): Find the correct parent when setting
12848 CLASSTYPE_TI_TEMPLATE.
12850 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
12852 * tinfo.cc (operator==): Always compare names.
12854 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
12856 * decl.c (start_function): Fix cut-and-paste error.
12858 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
12860 * inc/typeinfo: Add #pragma interface.
12861 (operator!=): Just call operator==.
12862 * tinfo.cc: Add #pragma implementation.
12863 (operator==): Move from inc/typeinfo and tinfo2.cc.
12864 Check __COMMON_UNRELIABLE instead of _WIN32.
12866 * typeck2.c (my_friendly_abort): Add URL.
12868 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
12870 * decl.c (start_method): Added extra parameter for attributes.
12871 * cp-tree.h (start_method): Update prototype.
12872 * parse.y (fn.def2): Update start_method parameter list.
12874 1998-10-11 Mark Mitchell <mark@markmitchell.com>
12876 * cp-tree.h (specializations_of_same_template_p): Declare.
12877 * pt.c (specializations_of_same_template_p): New function.
12879 * search.c (get_template_base): Use it.
12880 (get_template_base_recursive): Likewise.
12882 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
12884 * decl2.c (start_objects): Add new variable `joiner' and
12885 initialize it properly.
12887 1998-10-09 Mark Mitchell <mark@markmitchell.com>
12889 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
12890 change to vtable types.
12892 * cvt.c (ocp_convert): Avoid infinite recursion caused by
12895 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
12897 * pt.c (resolve_overloaded_unification): New fn.
12898 (try_one_overload): Likewise.
12899 (unify): Don't fail on unknown type.
12900 (type_unification_real): Likewise. Use resolve_overloaded_unification
12901 to handle an overloaded argument.
12902 (template_args_equal): Split out...
12903 (comp_template_args): From here.
12904 (determine_specialization): Also allow a template with more
12905 parms than were explicitly specified.
12906 * cp-tree.h: Add template_args_equal.
12907 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
12909 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
12911 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
12914 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
12916 * typeck.c (unsigned_type): Only return TItype nodes when
12917 HOST_BITS_PER_WIDE_INT is >= 64 bits.
12918 (signed_type): Likewise.
12919 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
12920 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
12921 (init_decl_processing): Only create TItype nodes when
12922 HOST_BITS_PER_WIDE_INT is >= 64 bits.
12923 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
12924 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
12926 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12928 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
12929 (gxx.gperf): Update comments describing invocation flags.
12930 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
12932 1998-10-07 Mark Mitchell <mark@markmitchell.com>
12934 * class.c (finish_struct_1): Add commentary on previous change.
12936 * cp-tree.h (vtbl_ptr_type_node): New variable.
12937 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
12938 already of the right type.
12939 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
12940 Simplify code to grow vtable.
12941 * decl.c (vtbl_ptr_type_node): Define.
12942 (init_decl_processing): Initialize it.
12944 1998-10-06 Mark Mitchell <mark@markmitchell.com>
12946 * cp-tree.def (PTRMEM_CST): New tree node.
12947 * cp-tree.h (ptrmem_cst): New type.
12948 (lang_type): Remove local_typedecls.
12949 (dummy): Increase to 12 bits from 11.
12950 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
12951 (PTRMEM_CST_CLASS): New macro.
12952 (PTRMEM_CST_MEMBER): Likewise.
12953 (current_access_specifier): New variable.
12954 (current_class_type): Remove duplicate declaration.
12955 (finish_struct): Change prototype.
12956 (unreverse_member_declarations): New function.
12957 (pushdecl_class_level): Change prototype.
12958 (grok_enum_decls): Remove.
12959 (fixup_anonymous_union): New function.
12960 (grok_x_components): Change prototype.
12961 (tsubst_chain): Remove.
12962 (finish_member_template_decl): Likewise.
12963 (check_explicit_specialization): Fix indentation.
12964 (finish_class_definition): Change prototype.
12965 (finish_member_class_template): Likewise.
12966 (finish_member_declaration): New function.
12967 (check_multiple_declarators): Likewise.
12968 * class.c (class_stack_node_t): New type.
12969 (current_class_base): Remove.
12970 (current_class_stack): Change type.
12971 (current_access_specifier): New variable.
12972 (grow_method): Remove.
12973 (check_member_decl_is_same_in_complete_scope): Break out from
12975 (make_method_vec): New function.
12976 (free_method_vec): Likewise.
12977 (add_implicitly_declared_members): Break out from finish_struct_1.
12978 (free_method_vecs): New variable.
12979 (add_method): Rework for direct use from parser.
12980 (handle_using_decl): Watch for NULL_TREE while iterating through
12981 CLASSTYPE_METHOD_VEC.
12982 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
12983 just do some error-checking.
12984 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
12985 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
12986 (finish_struct): Change prototype. Simplify; fields and methods
12987 are already set up at this point.
12988 (init_class_processing): Set up current_class_stack.
12989 (pushclass): Save current_access_specifier.
12990 (popclass): Restore it.
12991 (currently_open_class): Simplify.
12992 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
12993 * decl.c (saved_scope): Add access_specifier.
12994 (maybe_push_to_top_level): Save it.
12995 (pop_from_top_level): Restore it.
12996 (maybe_process_template_type_declaration): Use
12997 finish_member_declaration.
12998 (pushtag): Likewise.
12999 (pushdecl_class_level): Don't return a value.
13000 (fixup_anonymous_union): Break out from grok_x_components.
13001 (shadow_tag): Use it.
13002 (xref_tag): Complain about using an elaborated type specifier to
13003 reference a template type parameter or typedef name.
13004 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
13005 (current_local_enum): Remove.
13006 (build_enumerator): Call finish_member_declaration.
13007 (grok_enum_decls): Remove.
13008 * decl2.c (grok_x_components): Simplify.
13009 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
13010 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
13011 (merge_functions): Add to comment.
13012 (arg_assoc_type): Prototype.
13013 (arg_assoc): Pass as many arguments as there are parameters.
13014 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
13016 * expr.c (cpls_expand_expr): Remove dead code. Handle
13018 * friend.c (do_friend): Lookup friends when in nested classes.
13020 * init.c (build_offset_ref): Do lookup even for classes that are
13021 only partially defined.
13022 (decl_constant_value): Remove dead code.
13023 * method.c (build_overload_value): Remove hack where by TYPE was
13024 not a TYPE. Handle PTRMEM_CST.
13025 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
13027 * parse.y (components, notype_components, component_decl,
13028 component_decl_1, component_declarator, component_declarator0):
13029 Now all are itype rather than ttype. Rework to add members to
13030 classes on the fly.
13031 (typesqpecqual_reserved): Use check_multiple_declarators.
13032 (structsp): Update class to finish_class_definition.
13033 (do_xref_defn): Unsplit into named_class_head.
13034 (access_specifier): Set current_access_specifier.
13035 * pt.c (set_current_access_from_decl): New function.
13036 (finish_member_template_decl): Don't take the parameters.
13037 (comp_template_args): Make more robust.
13038 (lookup_template_class): Don't use current_local_enum.
13039 (for_each_template_parm): Handle PTRMEM_CST.
13040 (instantiate_class_template): Use set_current_access_from_decl,
13041 finish_member_declaration and unreverse_member_declarations. Set
13042 lineno/input_filename before generating implicit member functions.
13043 (type_unification_real): Don't assume back-unification happens
13044 only for the last argument.
13045 (regenerate_decl_from_template): Call pushclass a bit earlier.
13046 (tsubst_chain): Remove.
13047 (tsubst_enum): Use set_current_access_from_decl.
13048 (set_mangled_name_for_template_decl): Fix indentation.
13049 * search.c (lookup_fnfields_1): Change iteration through
13050 CLASSTYPE_METHOD_VEC.
13051 (dfs_pushdecls): Likewise.
13052 (dfs_compress_decls): Likewise.
13053 (add_conversions): Likewise.
13054 * semantics.c (finish_class_definition): Don't take components.
13055 Change call to finish_struct.
13056 (finish_member_declaration): New function.
13057 (finish_member_class_template): Don't take template parameters.
13058 Change call to grok_x_components. Call finish_member_template_decl.
13059 (check_multiple_declarators): New function.
13060 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
13061 a passed in fieldlist.
13062 * tree.c (search_tree): Handle PTRMEM_CST.
13063 (mapcar): Likewise.
13064 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
13065 INTEGER_CSTs, for pointer-to-data members.
13067 * call.c (resolve_args): Resolve template specializations, if
13070 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13072 * Makefile.in (spew.o): Depend on toplev.h.
13074 * call.c (compare_ics): Initialize variables `deref_from_type2',
13075 `deref_to_type1' and `deref_to_type2'.
13077 * except.c (get_eh_type): Hide prototype and definition.
13078 (process_start_catch_block_old): Remove unused static prototype.
13080 * pt.c (tsubst_decl): Initialize variable `argvec'.
13082 * spew.c: Include toplev.h.
13084 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
13086 * pt.c (instantiate_decl): Do save and restore file position.
13088 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
13090 * method.c (build_decl_overload_real): Clear
13091 numeric_output_need_bar after __.
13093 1998-10-05 Nathan Sidwell <nathan@acm.org>
13095 * call.c (build_new_method_call): Issue 'incomplete type' error,
13096 if class is not defined.
13098 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13100 * call.c (build_object_call): Move declaration of variable
13101 `fn' into the scope where it is used. Don't access variable
13102 `fn' when it is uninitialized, instead use `fns'.
13104 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13106 * errfn.c (cp_thing): Print buf as a string not as a printf format
13107 to avoid problems with the operator%. Consequently, `%%' sequences
13108 in format are copied as `%' in buf.
13110 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
13112 * pt.c (pop_tinst_level): Call extract_interface_info.
13113 (instantiate_decl): Don't save and restore file position.
13115 * decl.c (cp_finish_decl): Make statics in extern inlines and
13116 templates common, if possible and the target doesn't support weak
13119 * decl.c (grokdeclarator): Remove redundant calls to
13120 build_type_variant and some duplicated code.
13121 * sig.c (build_signature_reference_type): Only take the type parm.
13122 (build_signature_pointer_type): Likewise.
13123 * tree.c (build_cplus_method_type): Adjust.
13124 * cp-tree.h: Update.
13126 1998-10-04 Mark Mitchell <mark@markmitchell.com>
13128 * call.c (build_over_call): Make pedwarns about dropped qualifiers
13129 into full-fledged errors.
13130 * cvt.c (convert_to_reference): Likewise.
13131 * typeck.c (convert_for_assignment): Likewise.
13133 * search.c (expand_upcast_vtables): In addition to unsetting
13134 TREE_READONLY, remove top-level const type qualifier.
13136 1998-10-03 Mark Mitchell <mark@markmitchell.com>
13138 * class.c (current_class_ptr, current_class_ref): Clarify
13140 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
13141 NOP type conversions.
13142 * decl.c (decls_match): Use comptypes directly; ignore
13143 qualifiers on the DECL.
13144 (duplicate_decls): Remove qualifier checks on DECL.
13145 (grokdeclarator): Make the type built up include top-level
13147 * decl2.c (do_dtors): Fix spelling error.
13148 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
13149 when printing type information.
13150 * init.c (build_new_1): Add documentation. Deal with the fact
13151 that type of allocated memory now contains qualifiers.
13152 * lex.c (is_global): Improve error-recovery.
13153 * sig.c (build_member_function_pointer): Don't cast away const
13154 on fields of sigtable_entry_type.
13155 * tree.c (lvalue_type): Don't look at top-level qualifiers on
13157 * typeck.c (decay_conversion): Likewise.
13158 (build_component_ref): Make sure the type of the COMPONENT_REF
13159 contains top-level qualifiers, as appropriate. Improve
13161 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
13162 (build_array_ref): Likewise.
13163 (build_unary_op): Improve error-recovery.
13164 (unary_complex_lvalue): Make taking the address a bound member
13165 function an error, not a sorry.
13166 (build_conditional_expr): Look at the type qualifiers, not the
13167 qualifiers on the expression itself.
13169 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
13171 * decl2.c (merge_functions): Remove duplicates.
13173 * decl2.c: Add -f{no-,}implicit-inline-templates.
13174 (import_export_decl): Check it.
13176 * decl.c (lookup_name_real): Template parms also take precedence
13177 over implicit typename. Only warn if yylex.
13179 * typeck.c (build_conditional_expr): Only fold if ifexp is an
13182 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
13183 instead of linkage.
13185 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
13187 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
13188 * class.c (build_vbase_pointer): Use it.
13189 * rtti.c (expand_class_desc): Likewise.
13190 * tree.c (build_vbase_pointer_fields): Likewise.
13192 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
13194 * decl.c (start_decl): Add invocation of
13195 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
13196 (start_function): Add invocation of
13197 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
13199 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
13200 HANDLE_GENERIC_PRAGMAS.
13202 1998-09-28 Anthony Green <green@cygnus.com>
13204 * semantics.c (finish_asm_stmt): Always permit volatile asms.
13206 1998-09-28 Mark Mitchell <mark@markmitchell.com>
13208 * decl.c (grokdeclarator): Tighten checks for invalid
13209 destructors. Improve error-messages and error-recovery.
13210 * decl2.c (check_classfn): Don't assume that mangled destructor
13211 names contain type information.
13213 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
13215 * search.c (get_base_distance): Remove assert.
13217 * decl2.c (build_anon_union_vars): Don't process a field with no
13219 (finish_anon_union): Also complain about local anon unions with no
13222 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
13224 * decl.c (lookup_namespace_name): If the name is a namespace,
13225 return it immediately.
13227 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13229 * cp-tree.h (define_case_label): Remove unused parameter.
13230 (check_java_method): Likewise.
13231 (grokclassfn): Likewise.
13232 (expand_aggr_init): Likewise.
13233 (build_x_delete): Likewise.
13234 (maybe_end_member_template_processing): Likewise.
13235 (unshare_base_binfos): Add prototype.
13236 (string_conv_p): Likewise.
13237 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
13239 * cvt.c (build_up_reference): Remove unused parameter
13240 `checkconst', all callers changed.
13241 (build_type_conversion): Mark parameter `code' with
13243 (build_expr_type_conversion): Initialize variable `conv'.
13245 * decl.c (push_namespace): Initialize variable `d'.
13246 (define_case_label): Remove unused parameter `decl', all callers
13249 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
13250 `argc' with ATTRIBUTE_UNUSED.
13251 (grokclassfn): Remove unused parameter `cname', all callers
13253 (check_java_method): Likewise for parameter `ctype'.
13254 (copy_assignment_arg_p): Mark parameter `virtualp' with
13256 (finish_prevtable_vardecl): Likewise for parameter `prev'.
13258 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
13260 * init.c (expand_aggr_init_1): Remove unused parameter
13261 `alias_this', all callers changed.
13262 (expand_aggr_init): Likewise.
13263 (expand_default_init): Likewise.
13264 (build_new_1): Initialize variable `susp'.
13265 (build_x_delete): Remove unused parameter `type', all callers
13268 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
13270 (readescape): Use (unsigned) value in shift.
13271 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
13272 comparing to a signed quantity.
13274 * pt.c (maybe_end_member_template_processing): Remove unused
13275 parameter `decl', all callers changed.
13276 (check_explicit_specialization): Add braces around empty body in
13278 (current_template_args): Initialize variable `args'.
13279 (lookup_template_class): Likewise for variable `prev_local_enum'.
13280 (tsubst_decl): Likewise for variable `r'.
13281 (set_mangled_name_for_template_decl): Initialize variable
13284 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
13285 Likewise for variable `i'.
13286 (yylex): Initialize variable `trrr'.
13288 * typeck.c (compparms): Mark variable `strict' with
13291 * xref.c (simplify_type): Cast argument of ctype function to
13294 1998-09-24 Mark Mitchell <mark@markmitchell.com>
13296 * cp-tree.h (language_lvalue_valid): Remove.
13297 * decl.c (grokdeclarator): Don't disallow references to functions.
13298 * tree.c (lvalue_p_1): New function, combining duplicated
13300 (lvalue_p): Use it.
13301 (real_lvalue_p): Likewise.
13302 * typeck.c (language_lvalue_valid): Remove.
13303 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
13304 they don't have TREE_READONLY set.
13305 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
13307 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
13309 * spew.c (yylex): Give diagnostic.
13310 * hash.h (is_reserved_word): Add export.
13311 * gxx.gperf: Likewise.
13312 * lex.h (rid): Add RID_EXPORT.
13313 * lex.c (init_parse): Likewise.
13315 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
13317 * friend.c (do_friend): Make warning a full sentence.
13319 1998-09-22 Mark Mitchell <mark@markmitchell.com>
13321 * parse.y (component_decl_list): Improve error-recovery.
13323 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
13325 * decl.c (make_typename_type): Move error to point where name
13326 variable can be used by dump_type.
13328 1998-09-22 Mark Mitchell <mark@markmitchell.com>
13330 * decl.c (grokfndecl): Improve error-recovery.
13331 * decl2.c (grokfield): Likewise.
13332 * pt.c (finish_member_template_decl): Likewise.
13334 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
13336 * method.c (hack_identifier): Finding multiple members is always
13339 1998-09-21 Per Bothner <bothner@cygnus.com>
13341 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
13343 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
13345 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
13347 1998-09-20 Mark Mitchell <mark@markmitchell.com>
13349 * class.c (maybe_warn_about_overly_private_class): Reformat.
13351 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
13353 * exception.cc (__cplus_type_matcher): Realign some code.
13355 1998-09-16 Mark Mitchell <mark@markmitchell.com>
13357 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
13358 (tinfo2.o): Likewise.
13359 (exception.o): Likewise.
13361 (opnew.o): Likewise.
13362 (opnewnt.o): Likewise.
13363 (opvnew.o): Likewise.
13364 (opvnewnt.o): Likewise.
13365 (opdel.o): Likewise.
13366 (opdelnt.o): Likewise.
13367 (opvdel.o): Likewise.
13368 (opvdelnt.o): Likewise.
13370 1998-09-16 Richard Henderson <rth@cygnus.com>
13372 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
13374 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
13376 * call.c (build_field_call): Handle static data members too.
13378 * typeck.c (comptypes): When comparing pointer types, check
13379 whether referred types match even in strictest modes.
13381 1998-09-15 Mark Mitchell <mark@markmitchell.com>
13383 * cp-tree.h: Revert previous change.
13384 (finish_struct_methods): Remove declaration.
13385 * class.c: Revert previous change.
13386 (maybe_warn_about_overly_private_class): New function.
13387 (finish_struct_methods): Declare here, and make static. Remove
13388 unnecessary parameters. Tidy slightly. Use
13389 maybe_warn_about_overly_private_class.
13390 (finish_struct_1): Adjust. Remove check for private constructors,
13391 now done elsewhere.
13392 (finish_struct): Adjust.
13394 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
13396 * except.c (expand_start_catch_block): No need to check for new
13398 (process_start_catch_block_old): Deleted.
13399 (process_start_catch_block): Add call to start_decl_1().
13400 (expand_end_catch_block): Add call to end_catch_handler().
13401 * exception.cc (__cplus_type_matcher): Only check the exception
13402 language if there is an exception table.
13404 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
13406 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
13407 as used to prevent conflicts with virtual function tables.
13409 1998-09-14 Mark Mitchell <mark@markmitchell.com>
13411 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
13412 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
13413 * class.c (maybe_class_too_private_p): New function.
13414 (finish_struct_methods): Use it.
13415 (finish_struct_1): Likewise.
13416 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
13419 * pt.c (check_specialization_scope): Fix spelling error.
13420 (check_explicit_specialization): Remove code to handle explicit
13421 specializations in class scope; they are now correctly diagnosed
13424 1998-09-10 Mark Mitchell <mark@markmitchell.com>
13426 * decl.c (pushdecl): Don't copy types if the
13427 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
13430 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
13432 * class.c (get_enclosing_class): New function.
13433 (is_base_of_enclosing_class): Likewise.
13434 * cp-tree.h (get_enclosing_class): Declare.
13435 (is_base_of_enclosing_class): Likewise.
13436 * pt.c (coerce_template_parms): Use them.
13438 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
13440 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
13441 null to decide whether to use it.
13443 * error.c (dump_type_real): Handle NAMESPACE_DECL.
13444 * parse.y (base_class.1): Avoid crash on error.
13446 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
13448 * decl.c (make_typename_type): If context is a namespace, the code
13451 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
13453 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
13455 1998-09-08 Mark Mitchell <mark@markmitchell.com>
13457 * cp-tree.h (anonymous_namespace_name): Declare.
13458 * decl.c: Define it.
13459 (push_namespace): Use anonymous_namespace_name, rather than local
13461 * error.c (dump_decl): If a namespace is named
13462 anonymous_namespace_name, call it {anonymous}.
13464 * decl.c (grokparms): Distinguish between references and pointers
13467 1998-09-08 Richard Henderson <rth@cygnus.com>
13468 Mark Mitchell <mark@markmitchell.com>
13470 * pt.c (process_partial_specialization): Consistently allocate
13471 and zero tpd.parms based on ntparms. Use tpd2.parms, not
13472 tpd.parms, where appropriate.
13474 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
13476 * Makefile.in (INCLUDES): Update after recent toplevel gcc
13479 1998-09-05 Mark Mitchell <mark@markmitchell.com>
13481 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
13482 * class.c (finish_struct): Remove hackery to deal with explicit
13483 specializations in class scope.
13484 * decl.c (grokfndecl): Improve error-recovery.
13485 * decl2.c (grokfield): Likewise.
13486 * pt.c (check_specialization_scope): New function.
13487 (begin_specialization): Call it.
13488 (process_partial_specialization): New function, split out from
13489 push_template_decl. Check partial specializations more
13491 (push_template_decl): Call it.
13492 (check_explicit_specialization): Don't attempt to handle explicit
13493 specializations in class scope.
13494 (template_parm_data): Document. Add current_arg and
13495 arg_uses_template_parms.
13496 (mark_template_parm): Set it.
13497 (tsubst_arg_types): Remove unused variable.
13498 * semantics.c (begin_class_definition): Tweak.
13500 1998-09-04 Mark Mitchell <mark@markmitchell.com>
13502 * inc/typeinfo (type_info::type_info(const char*)): Make
13505 * cp-tree.h (hash_tree_cons_simple): New macro.
13506 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
13507 (coerce_template_parms): Use make_temp_vec, instead of
13508 make_tree_vec. Document this behavior.
13509 (lookup_template_class): Likewise.
13510 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
13511 Remove dead code (and add assertion to check its deadness). Fix
13512 bug w.r.t. exception specifications.
13514 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
13516 * decl2.c (import_export_vtable): Always make artificials comdat.
13517 (import_export_decl): Likewise.
13518 * pt.c (mark_decl_instantiated): Likewise.
13520 1998-09-03 Mark Mitchell <mark@markmitchell.com>
13522 * cp-tree.h (finish_globally_qualified_member_call_expr):
13524 (finish_qualified_call_expr).
13525 * semantics.c: Likewise.
13526 * parse.y (primary): Use it.
13527 * method.c (hack_identifier): Remove redundant code.
13529 * init.c (resolve_offset_ref): Call convert_from_reference to
13530 handle members of reference type. Improve error recovery.
13532 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
13534 * cp-tree.h: Declare warn_nontemplate_friend.
13535 * decl2.c (lang_decode_option): Set.
13536 * lang-options.h: Add -Wnon-template-friend.
13537 * friend.c (do_friend): Use to toggle non-template function warning.
13539 1998-09-03 Mark Mitchell <mark@markmitchell.com>
13541 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
13542 corresponding INTEGER_CSTs when processing_template_decl.
13543 * pt.c (tsubst_enum): Tweak accordingly.
13545 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13547 * decl.c (pushdecl_class_level): Add warning here.
13550 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
13552 * cvt.c (convert_pointer_to_real): Tidy.
13553 * search.c (get_base_distance_recursive): Simplify.
13554 (get_base_distance): Likewise.
13556 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
13559 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
13561 * lex.c (check_newline): Call HANDLE_PRAGMA before
13562 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
13563 if unknown pragmas are encountered.
13564 (handle_sysv_pragma): Interpret return code from
13565 handle_pragma_token (). Return success/failure indication rather
13566 than next unprocessed character.
13567 (pragma_getc): New function: retrieves characters from the
13568 input stream. Defined when HANDLE_PRAGMA is defined.
13569 (pragma_ungetc): New function: replaces characters back into the
13570 input stream. Defined when HANDLE_PRAGMA is defined.
13572 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
13574 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
13575 * class.c (build_vtable_entry_ref): Likewise.
13577 1998-09-01 Mark Mitchell <mark@markmitchell.com>
13579 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
13580 * decl2.c (import_export_decl): Likewise.
13581 * pt.c (instantiate_decl): Use it.
13583 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
13585 * decl.c (lookup_name_real): Also do implicit typename thing for
13586 artificial TYPE_DECLs.
13587 * search.c (lookup_field): Likewise.
13588 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
13589 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
13590 (enter_scope_of): Extract type from implicit typename.
13591 (begin_class_definition): Likewise.
13592 * lex.c (identifier_type): Handle implicit typename when checking
13595 * cp-tree.h: Declare flag_strict_prototype.
13596 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
13597 -fstrict-prototype.
13598 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
13599 specified, set it to the value of pedantic.
13601 1998-09-01 Mark Mitchell <mark@markmitchell.com>
13603 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
13605 1998-08-31 Mark Mitchell <mark@markmitchell.com>
13607 * decl.c (finish_enum): Handle member enums of classes declared in
13608 template functions.
13610 * decl2.c (grok_x_components): Strip attributes before calling
13613 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
13615 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
13616 -fenum-int-equivalence and -fno-nonnull-objects.
13617 * class.c (check_for_override): Remove support for -fall-virtual.
13618 (finish_struct_1): Likewise.
13619 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
13620 * typeck.c (build_binary_op_nodefault): Likewise.
13621 * cvt.c (ocp_convert): Likewise.
13622 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
13623 * class.c (build_vbase_path): Likewise.
13625 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
13627 * Makefile.in (INTERFACE): New, set to 1.
13629 1998-08-30 Mark Mitchell <mark@markmitchell.com>
13631 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
13632 comparing with global_namespace.
13633 (dump_aggr_type): Likewise.
13635 * decl.c (grokfndecl): Issue error on declaration of friend
13636 templates with explicit template arguments.
13638 * pt.c (convert_template_argument): New function, split out
13640 (coerce_template_parms): Here.
13641 (tsubst): Attempt better error-recovery.
13643 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
13645 * pt.c (decl_template_parm_p): Add checks for
13646 TEMPLATE_TEMPLATE_PARM.
13648 1998-08-28 Mark Mitchell <mark@markmitchell.com>
13650 * lex.c (do_identifier): Fix thinko in previous change.
13652 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
13654 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
13655 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
13657 1998-08-28 Richard Henderson <rth@cygnus.com>
13659 Add support for discarding unused virtual functions.
13660 * lang-options.h: Add -fvtable-gc.
13661 * cp-tree.h: Add flag_vtable_gc.
13662 * decl2.c (output_vtable_inherit): New fn.
13663 (finish_vtable_vardecl): Call it.
13664 * class.c (build_vtable_entry_ref): New fn.
13665 (build_vtbl_ref): Call it.
13667 1998-08-28 Mark Mitchell <mark@markmitchell.com>
13669 * cp-tree.h (build_enumerator): Take the enumeration type as a
13671 * decl.c (finish_enum): Don't set the TREE_TYPE for the
13672 enumeration constant values if we're processing_template_decls.
13673 Don't set the type for the CONST_DECLs either; that's done in
13675 (build_enumerator): Take the enumeration type as a
13677 * lex.c (do_identifier): Don't resolve enumeration constants while
13678 processing template declarations, even if they happen to be
13679 TEMPLATE_PARM_INDEXs.
13681 * parse.y (current_enum_type): New variable.
13682 (primary): Don't allow statement-expression in local classes just
13683 as we don't in global classes.
13684 (structsp): Use current_enum_type.
13685 (enum_list): Likewise.
13686 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
13687 finish_enum; they no longer occur.
13689 * cp-tree.h (finish_base_specifier): New function.
13690 * parse.y (base_class): Use it.
13691 * semantics.c (finish_base_specifier): Define it.
13693 * parse.y (structsp): Warn on use of typename outside of template
13696 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
13698 * lex.c (handle_cp_pragma): Remove #pragma vtable.
13699 * lang-options.h: Remove +e options.
13700 * decl2.c (lang_decode_option): Likewise.
13701 (import_export_vtable): Don't check write_virtuals.
13702 (finish_vtable_vardecl, finish_file): Likewise.
13703 * search.c (dfs_debug_mark): Likewise.
13704 * semantics.c (begin_class_definition): Likewise.
13705 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
13707 * call.c (build_over_call): Check flag_elide_constructors.
13708 * decl2.c: flag_elide_constructors defaults to 1.
13709 * typeck.c (convert_arguments): Remove return_loc parm.
13710 (build_function_call_real): Adjust.
13712 * search.c: Tear out all mi_matrix and memoize code.
13713 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
13714 * lang-options.h: Remove documentation for -fhandle-exceptions,
13715 -fmemoize-lookups and -fsave-memoized.
13716 * cp-tree.h: Lose mi_matrix and memoize support.
13717 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
13718 * class.c: Lose struct class_level.
13719 (pushclass, popclass): Lose memoize support.
13720 * init.c (build_offset_ref): Likewise.
13722 Never change BINFO_INHERITANCE_CHAIN.
13723 * init.c (emit_base_init): Change modification of
13724 BINFO_INHERITANCE_CHAIN to an assert.
13725 * search.c (get_base_distance_recursive): Likewise.
13726 (get_base_distance): Likewise.
13727 (lookup_member): Likewise.
13728 (convert_pointer_to_single_level): Likewise.
13729 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
13730 (lookup_fnfields): Likewise.
13731 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
13732 (unshare_base_binfos): Don't call propagate_binfo_offsets.
13733 (layout_basetypes): Call propagate_binfo_offsets instead of
13734 unshare_base_binfos.
13735 * decl.c (xref_basetypes): Call unshare_base_binfos.
13736 * pt.c (instantiate_class_template): Likewise.
13737 * tree.c (reverse_path): Remove 'copy' parm; always make a
13739 * class.c (build_vbase_path): Just call it.
13740 * search.c (compute_access): Likewise. Don't re-reverse.
13742 1998-08-27 Mark Mitchell <mark@markmitchell.com>
13744 * class.c (build_vbase_path): Use reverse_path.
13745 (finish_base_struct): Move warnings for inaccessible bases to
13747 (modify_one_vtable): Remove check of TREE_USED (binfo).
13748 (fixup_vtable_deltas1): Likewise.
13749 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
13750 (xref_tag): Remove binfos parameter.
13751 (make_binfo): Remove chain parameter.
13752 (reverse_path): Add copy parameter.
13753 * decl.c (init_decl_processing): Change calls to xref_tag.
13754 (xref_tag): Remove binfos parameter.
13755 (xref_basetypes): Change calls to make_binfo.
13756 * decl2.c (grok_x_components): Change calls to xref_tag.
13757 (handle_class_head): Likewise.
13758 * friend.c (do_friend): Likewise.
13759 * lex.c (make_lang_type): Change calls to make_binfo.
13760 * parse.y (structsp): Change calls to xref_tag.
13761 (named_complex_class_head_sans_basetype): Likewise.
13762 (named_class_head): Likewise.
13763 * rtti.c (init_rtti_processing): Likewise.
13764 * search.c (compute_access): Change calls to reverse_path.
13765 (dfs_get_vbase_types): Change calls to make_binfo.
13766 (get_vbase_types): Remove dead code.
13767 * tree.c (unshare_base_binfos): Change calls to make_binfo.
13768 (layout_basetypes): Warn here about inaccessible bases.
13769 (make_binfo): Remove chain parameter.
13770 (reverse_path): Add copy parameter.
13772 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
13774 * class.c: #if 0 complete_type_p.
13775 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
13776 * method.c (process_overload_item): Likewise.
13777 * typeck.c (comp_target_types): Likewise.
13779 Stop sharing binfos for indirect virtual bases.
13780 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
13781 (layout_basetypes): Likewise.
13782 (unshare_base_binfos): Copy vbases, too.
13783 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
13784 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
13785 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
13786 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
13787 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
13788 reference to BINFO_VIA_PUBLIC.
13789 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
13790 (push_class_decls): Use them.
13791 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
13792 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
13794 1998-08-27 Mark Mitchell <mark@markmitchell.com>
13796 * decl.c (build_enumerator): Set DECL_CONTEXT for the
13799 1998-08-26 Mark Mitchell <mark@markmitchell.com>
13801 * cp-tree.h (finish_enum): Change prototype.
13802 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
13803 VALUES parameter. Don't try to compute mins/maxs if
13804 processing_template_decl.
13805 * parse.y (structsp): Use new calling sequence for finish_enum.
13806 * pt.c (tsubst_enum): Likewise. Take the new type as input.
13807 (lookup_template_class): Remove unused variables. Tweak.
13808 Register enums on instantiation list before substituting
13809 enumeration constants.
13810 (tsubst_decl): Remove unused variables.
13811 (regenerate_decl_from_template): Likewise.
13813 * decl.c (duplicate_decls): Don't obliterate the
13814 DECL_TEMPLATE_INFO for a template if we're not replacing it with
13817 * lex.c (do_identifier): Fix typo in comment.
13819 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13821 * errfn.c: Remove stdarg.h/varargs.h.
13822 * tree.c: Likewise.
13824 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
13826 * pt.c (tsubst_copy): Only do typename overloading on an
13827 IDENTIFIER_NODE that happens to look like a typename if it actually
13828 has a type for us to use.
13830 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
13832 * typeck.c (comp_cv_target_types): Split out...
13833 (comp_target_types): From here. Don't allow cv-qual changes under
13834 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
13835 (build_ptrmemfunc): Pass 1 to nptrs.
13836 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
13838 1998-08-25 Mark Mitchell <mark@markmitchell.com>
13840 * search.c (dependent_base_p): Don't compare a binfo to
13841 current_class_type; use the TREE_TYPE of the binfo instead.
13843 * cp-tree.h (CLASS_TYPE_P): Revise definition.
13845 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
13847 * decl.c (duplicate_decls): Don't complain about different
13848 exceptions from an internal decl even if pedantic.
13850 * typeck.c (convert_for_assignment): Converting from pm of vbase
13851 to derived is an error, not a sorry.
13853 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
13854 * class.c (fixed_type_or_null): Rename from
13855 resolves_to_fixed_type_p. Return the dynamic type of the
13856 expression, if fixed, or null.
13857 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
13858 does not match the static type.
13859 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
13860 resolves_to_fixed_type_p again.
13862 1998-08-24 Mark Mitchell <mark@markmitchell.com>
13864 * pt.c (tsubst_decl): Move special case code for dealing with
13865 tricky friend templates here from ...
13866 (regenerate_decl_from_template): Here.
13868 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
13870 * decl.c (start_decl): Remove redundant linkage check.
13872 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
13874 * typeck.c (c_expand_return): Handle the case that valtype
13875 is wider than the functions return type.
13877 1998-08-24 Mark Mitchell <mark@markmitchell.com>
13879 * cp-tree.h (CLASS_TYPE_P): New macro.
13880 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
13881 * pt.c (process_template_parm): Undo previous change.
13883 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
13885 * cp-tree.h: Declare.
13886 * pt.c (decl_template_parm_p): New function.
13887 * decl.c (pushdecl): Check decls for redeclaring template parms.
13888 (xref_tag): Make redeclaration an error, print decl.
13889 * decl2.c (grokfield): Check field_decls for redeclaration as well.
13891 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
13893 * parse.y (primary): Fix up the type of string constants.
13895 1998-08-24 Mark Mitchell <mark@markmitchell.com>
13897 * typeck.c (convert_for_initialization): Move check for odd uses
13898 of NULL to avoid duplicate warnings.
13900 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
13902 * tree.c (lvalue_type): Fix for arrays.
13903 * typeck.c (string_conv_p): New fn.
13904 (convert_for_assignment): Use it.
13905 (build_unary_op): Use lvalue_type.
13906 * call.c (standard_conversion, convert_like): Use string_conv_p.
13907 (add_function_candidate): Use lvalue_type.
13908 * cvt.c (convert_to_reference): Likewise.
13909 * decl2.c (lang_decode_option): Ignore -traditional.
13910 * decl.c (init_decl_processing): flag_writable_strings inhibits
13911 flag_const_strings.
13913 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
13915 * lang-options.h (lang_options): Add fconst-strings to the list
13917 * decl2.c (lang_f_options, lang_decode_option): Likewise.
13919 1998-08-24 Nathan Sidwell <nathan@acm.org>
13921 * lex.c (real_yylex): Don't warn about long long constants if
13922 we're allowing long long.
13924 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
13926 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
13927 accessing bindings directly.
13929 * search.c (my_tree_cons): Reimplement.
13931 * lang-specs.h: Remove __HONOR_STD.
13932 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
13934 1998-08-23 Mark Mitchell <mark@markmitchell.com>
13936 * decl.c (grokdeclarator): Complain about in-class initialization
13937 of aggregates and/or references.
13938 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
13939 TEMPLATE_TYPE_PARMs.
13941 * decl2.c (grok_array_decl): Add comment.
13942 (mark_used): Don't instantiate an explicit instantiation.
13943 * friend.c (make_friend_class): Remove bogus comment. Fix check
13944 for partial specializations.
13945 * pt.c (check_explicit_specialization): Don't
13946 SET_DECL_EXPLICIT_INSTANTIATION here.
13947 (mark_decl_instantiated): Or here.
13948 (do_decl_instantiation): Do it here, instead. Add checks for
13949 duplicate explicit instantiations, etc. Tidy.
13950 (do_type_instantiation): Likewise.
13951 (instantiate_decl): Improve comments. Complain about explicit
13952 instantiations where no definition is available.
13954 * cp-tree.h (ansi_null_node): Remove.
13955 * call.c (build_over_call): Warn about converting NULL to an
13957 * cvt.c (build_expr_type_conversion): Likewise. Use
13958 null_ptr_cst_p instead of expanding it inline.
13959 * decl.c (ansi_null_node): Remove.
13960 (init_decl_processing): Make null_node always have integral type.
13961 * except.c (build_throw): Warn about converting NULL to an
13963 * lex.c (init_parse): Remove handling of ansi_null_node.
13964 * pt.c (type_unification_real): Don't convert NULL to void* type.
13965 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
13966 (convert_for_assignment): Warn about converting NULL to an
13968 (convert_for_initialization): Likewise.
13970 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
13972 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
13973 * pt.c (coerce_template_parms): Use no_linkage_check.
13974 * decl.c (grokvardecl): Likewise.
13975 (grokfndecl): Likewise. Members of anonymous types have no linkage.
13977 * method.c (process_overload_item): Remove useless code.
13979 1998-08-20 Per Bothner <bothner@cygnus.com>
13981 Handle new'ing of Java classes.
13982 * init.c (build_class_classref): New function.
13983 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
13984 constructor does not return this; don't need to exception-protect.
13986 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
13987 * decl2.c (acceptable_java_type): Handle template-derived types.
13989 1998-08-20 Per Bothner <bothner@cygnus.com>
13991 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
13993 1998-08-20 Mark Mitchell <mark@markmitchell.com>
13995 * decl.c (duplicate_decls): Always merge the old and new patterns
13996 for templates, regardless of whether or not the new one has
13997 DECL_INITIAL. Don't throw away specializations. Merge
13999 * pt.c (tsubst_decl): Use the right pattern when calculating the
14000 complete args for a new template instance.
14001 (do_decl_instantiation): Fix typo in comment.
14002 (regenerate_decl_from_template): Deal with tricky friend template
14004 (instantiate_decl): Likewise.
14006 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
14008 * init.c (build_builtin_delete_call): Add missing assemble_external
14011 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
14013 * parse.y (notype_unqualified_id): Also accept ~A<int>.
14015 1998-08-19 Mark Mitchell <mark@markmitchell.com>
14017 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
14019 * except.c (build_throw): Warn when NULL is thrown, even with
14020 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
14023 * cp-tree.h (ansi_null_node): New variable.
14024 * decl.c (ansi_null_node): New variable.
14025 (init_decl_processing): Initialize its type.
14026 * lex.c (init_parse): Initialize its value. Use ansi_null_node
14027 for null_node in non-ANSI mode.
14028 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
14029 place of null_node to avoid spurious errors.
14031 1998-08-17 Mark Mitchell <mark@markmitchell.com>
14033 * cp-tree.h (enter_scope_of): New function.
14034 * parse.y (complex_direct_notype_declarator): Use it.
14035 * semantics.c (enter_scope_of): New function.
14037 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
14039 * decl.c (grokparms): No, here.
14041 * decl.c (grokdeclarator): Catch parm with pointer to array of
14042 unknown bound here...
14043 * method.c (process_overload_item): ...not here.
14045 * gxxint.texi: Remove obsolete documentation of overloading code.
14047 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
14048 * class.c (finish_struct_bits): Likewise.
14050 * tree.c (lvalue_type): Fix for arrays.
14051 * typeck.c (build_unary_op): Use lvalue_type.
14052 * call.c (add_function_candidate): Likewise.
14053 * cvt.c (convert_to_reference): Likewise.
14055 * decl2.c (lang_decode_option): Ignore -traditional.
14057 * init.c (build_offset_ref): Don't mess with error_mark_node.
14058 * lex.c (do_scoped_id): Use cp_error.
14060 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
14062 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
14064 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
14066 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
14068 * cp-tree.h (set_identifier_local_value): Provide prototype.
14070 * decl2.c (do_namespace_alias): Remove unused variables `binding'
14073 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
14075 * Makefile.in: Rename BBISON to BISON so that it can be properly
14076 inherited from the parent makefile.
14078 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
14080 * lang-options.h: Add -finit-priority.
14081 * decl2.c: Likewise. Check flag_init_priority instead of
14084 * decl2.c (setup_initp): New fn.
14085 (start_objects, finish_objects, do_ctors): Handle init_priority.
14086 (do_dtors, finish_file): Likewise.
14088 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
14090 * pt.c (tsubst_copy): Hush warning.
14092 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
14094 1998-08-12 Mark Mitchell <mark@markmitchell.com>
14096 * pt.c (print_template_context): Don't abort when instantiating a
14097 synthesized method.
14099 * decl.c (grokdeclarator): Issue errors on namespace qualified
14100 declarators in parameter lists or in class scope.
14102 1998-08-09 Mark Mitchell <mark@markmitchell.com>
14104 * pt.c (check_explicit_specialization): Don't abort on bogus
14105 explicit instantiations.
14107 1998-08-07 Mark Mitchell <mark@markmitchell.com>
14109 * typeck.c (require_complete_type): Use complete_type_or_else.
14110 (complete_type_or_else): Always return NULL_TREE on failure, as
14113 * pt.c (tsubst_aggr_type): Prototype.
14114 (tsubst_decl): New function, split out from tsubst. Set
14115 input_filename and lineno as appropriate.
14116 (pop_tinst_level): Restore the file and line number saved in
14118 (instantiate_class_template): Set input_filename and lineno as
14120 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
14121 context for a TYPENAME_TYPE is complete.
14123 * decl2.c (grokbitfield): Issue errors on bitfields declared with
14125 (do_dtors): As in do_ctors, pretend to be a member of the same
14126 class as a static data member while generating a call to its
14129 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
14130 conversions, even in complex virtual base class hierarchies.
14132 1998-08-06 Mark Mitchell <mark@markmitchell.com>
14134 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
14135 (TYPE_TEMPLATE_INFO): Likewise.
14136 (SET_TYPE_TEMPLATE_INFO): Likewise.
14137 (ENUM_TI_TEMPLATE): Likewise.
14138 (ENUM_TI_ARGS): Likewise.
14139 (lookup_nested_type_by_name): Remove.
14140 * decl.c (maybe_process_template_type_declaration): Handle enums.
14141 (start_enum): Don't check for primary-template enum declarations
14143 (finish_enum): Clean up, document. Make sure template enum
14144 constants get the correct type.
14145 (build_enumerator): Copy initializers for template enumerations,
14147 (grok_enum_decls): Document.
14148 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
14149 better. Build LOOKUP_EXPRs for local variables, even if they are
14151 * pt.c (tsubst_enum): Remove field_chain parameter.
14152 (template_class_depth): Include the depth of surrounding function
14154 (push_template_decl): Check for primary-template enum declarations
14155 here. Deal with enumeration templates.
14156 (lookup_template_class): Likewise.
14157 (for_each_template_parm): Likewise.
14158 (instantiate_class_template): Don't call tsubst_enum directly,
14159 call tsubst instead, to instantiate enums. Deal with all
14160 field_chain issues here, not in tsubst_enum.
14161 (lookup_nested_type_by_name): Remove.
14162 (tsubst_aggr_type): Revise handling of enumeration types.
14163 (tsubst): Likewise.
14164 (tsubst_copy): Likewise.
14165 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
14167 1998-08-04 Mark Mitchell <mark@markmitchell.com>
14169 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
14170 uses template parameters.
14171 * method.c (build_template_parm_names): Use the full set of
14172 template arguments for tsubst'ing.
14173 (build_overload_identifier): Pass the full set of template
14174 arguments to build_template_parm_names, not just the
14176 * pt.c (TMPL_ARGS_DEPTH): Define using
14177 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
14178 (NUM_TMPL_ARGS): New macro.
14179 (add_outermost_template_args): Deal with the case where the outer
14180 args will be completely discarded.
14181 (coerce_template_parms): Use the full set of template arguments
14182 for tsubst'ing. Simplify. Add some asserts. Improve
14184 (lookup_template_class): Pass the full set of template arguments
14185 to coerce_template_parms.
14186 (tsubst): Add assertion.
14187 (do_type_instantiation): Don't instantiate member template
14190 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
14191 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
14193 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
14195 * method.c (set_mangled_name_for_decl): Change return type to void.
14197 * decl.c (lookup_name_real): A namespace-level decl takes priority
14198 over implicit typename. Avoid doing the same lookup twice.
14200 * search.c (dependent_base_p): New fn.
14201 (dfs_pushdecls, dfs_compress_decls): Use it.
14203 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
14204 virtual functions if the type doesn't have any.
14206 1998-08-03 Mark Mitchell <mark@markmitchell.com>
14208 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
14209 uses template parameters.
14211 1998-08-02 Mark Mitchell <mark@markmitchell.com>
14213 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
14214 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
14215 * lex.c (do_identifier): Don't use a second argument, or a type,
14216 when building LOOKUP_EXPRs.
14217 (do_identifier): Likewise.
14218 (do_scoped_id): Likewise.
14219 * method.c (hack_identifier): Improve error message.
14220 * pt.c (lookup_template_function): Don't needlessly call
14221 copy_to_permanent or build_min.
14222 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
14224 (do_decl_instantiation): Improve error message.
14225 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
14226 (build_min): Copy the type to the permanent obstack, too.
14228 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
14230 * init.c (init_init_processing): Remove BI* handling.
14231 (build_builtin_call): Remove.
14232 (build_builtin_delete_call): New fn.
14233 (build_delete): Use it.
14235 1998-07-31 Mark Mitchell <mark@markmitchell.com>
14237 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
14238 (maybe_check_template_type): New function.
14239 * decl.c (maybe_process_template_type_declaration): New function,
14240 split out from pushtag Call maybe_check_template_type.
14241 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
14242 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
14243 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
14244 * pt.c (template_class_depth_real): Generalization of ...
14245 (template_class_depth): Use it.
14246 (register_specialization): Use duplicate_decls for duplicate
14247 declarations of specializations.
14248 (maybe_check_template_type): New function.
14249 (push_template_decl_real): Fix comment.
14250 (convert_nontype_argument): Likewise.
14251 (lookup_template_class): Likewise. Avoid an infinite loop on
14253 (tsubst_friend_function): Fix comment.
14254 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
14255 an IDENTIFIER_NODE.
14256 * semantics.c (begin_function_definition): Use
14257 reset_specialization to note that template headers don't apply
14258 directly to declarations after the opening curly for a function.
14260 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
14262 * decl.c (push_overloaded_decl): Use current_namespace instead of
14263 DECL_CONTEXT (decl) to determine where we go.
14265 * decl.c (lookup_name_real): Fix typo.
14267 1998-07-28 Mark Mitchell <mark@markmitchell.com>
14269 * friend.c (is_friend): Be lenient with member functions to deal
14270 with nested friends.
14272 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
14274 * class.c (finish_struct_1): Convert integer_zero_node to
14275 ssizetype before passing it to set_rtti_entry.
14276 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
14277 of any size to a pointer.
14279 1998-07-27 Mark Mitchell <mark@markmitchell.com>
14281 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
14282 (build_template_decl_overload): Remove.
14283 (set_mangled_name_for_decl): New function.
14284 (innermost_args): Remove is_spec parameter.
14285 (most_specialized, most_specialized_class): Remove declarations.
14286 (lookup_template_class): Add entering_scope parameter.
14287 (maybe_process_partial_specialization): New function.
14288 (finish_template_decl): Likewise.
14289 (finish_template_type): Likewise.
14290 * class.c (finish_struct): Clean up processing of member template
14292 * decl.c (pushtag): Fix formatting.
14293 (lookup_tag): Improve handling of pseudo-global levels.
14294 (make_typename_type): Adjust call to lookup_template_class.
14295 (shadow_tag): Use maybe_process_partial_specialization.
14296 (xref_tag): Improve handling of member friends.
14297 (start_function): Call push_nested_class before
14298 push_template_decl. Don't call push_template_decl for
14300 * decl2.c (grok_x_components): Don't call xref_tag for
14301 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
14302 (grokclassfn): Use set_mangled_name_for_decl.
14303 (arg_assoc_class): Adjust call to innermost_args.
14304 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
14305 * error.c (dump_function_name): Improve printing of template
14307 * friend.c (is_friend): Don't compare types of decls to determine
14308 friendship, unless flag_guiding_decls.
14309 (make_friend_class): Partial specializations cannot be friends.
14310 (do_friend): Use set_mangled_name_for_decl. Call
14311 push_template_decl_real instead of push_template_decl.
14312 * method.c (build_decl_overload_real): Remove prototype. Give it
14314 (build_overload_identififer): Adjust call to innermost_args.
14315 (build_template_decl_overload): Remove.
14316 (set_mangled_name_for_decl): New function.
14317 * parse.y (.finish_template_type): New non-terminal.
14318 (template_def): Use finish_template_decl. Use template_extdef
14320 (template_extdef, template_datadef): New non-terminals, containing
14321 only those rules for things which can be templates.
14323 (template_type, self_template_type): Use .finish_template_type.
14324 (named_class_head): Use maybe_process_partial_specialization.
14325 * pt.c (mangle_class_name_for_template): Remove context parameter.
14326 (get_class_bindings): Remove outer_args parameter.
14327 (complete_template_args): Remove.
14328 (add_outermost_template_args): New function.
14329 (register_specialization): Return the specialization.
14330 (unregister_specialization): New function.
14331 (tsubst_template_parms): Likewise.
14332 (most_specialized, most_specialized_class): Prototype here as
14334 (original_template): Rename to most_general_template.
14335 (tsubst_template_parms): New function.
14336 (set_mangled_name_for_template_decl): Likewise.
14337 (TMPL_ARGS_DEPTH): New macro.
14338 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
14339 (TMPL_ARGS_LEVEL): New macro.
14340 (SET_TMPL_ARGS_LEVEL): Likewise.
14341 (TMPL_ARG): Likewise.
14342 (SET_TMPL_ARG): Likewise.
14343 (TMPL_ARGS_DEPTH): Likewise.
14344 (finish_member_template_decl): Use finish_template_decl.
14345 (maybe_process_partial_specialization): New function, split out
14347 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
14348 (maybe_begin_member_template_processing): Use new macros.
14349 (is_member_template): Likewise.
14350 (is_member_template_class): Likewise.
14351 (add_to_template_args): Likewise. Deal with multiple levels of
14353 (maybe_process_partial_specialization): New function.
14354 (retrieve_specialization): Add consistency check.
14355 (determine_specialization): Return full argument list.
14356 (check_explicit_specialization): Tweak friend handling. Use full
14357 argument lists. Simplify.
14358 (current_template_args): Use new macros.
14359 (push_template_decl_real): Change ill-named mainargs to specargs.
14360 Check that a partial specialization actually specializes at least
14361 one parameter. Improve friend handling. Modify for full
14362 template arguments.
14363 (classtype_mangled_name): Don't mangle the names of
14365 (lookup_template_class): Add entering_scope parameter. Use it to
14366 avoid finding a template type when an instantiation is required.
14367 Simplify. Use full template arguments.
14368 (tsubst_friend_function): Use unregister_specialization. Use new
14369 macros. Use full template arguments.
14370 (tsubst_friend_class): Substitute, using tsubst_template_parms,
14371 into the template parameters before passing them to
14372 redeclare_class_template.
14373 (instantiate_class_template): Simplify. Use full template
14374 arguments. Adjust calls to get_class_bindings. Use
14375 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
14376 (innermost_args): Use new macros.
14377 (tsubst_aggr_type): New function, split out from tsubst.
14378 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
14379 conventions for lookup_template_class. Refine handling of partial
14380 instantiations. Remove calls to complete_template_args.
14381 Simplify. Add consistency checks. Use set_mangled_name_for_decl
14382 and set_mangled_name_for_template_decl.
14383 (tsubst_copy): Use tsubst_aggr_type.
14384 (instantiate_template): Use full template arguments.
14385 (more_specialized): Improve formatting.
14386 (more_specialized_class): Adjust calls to get_class_bindings.
14387 (get_bindings_real): Don't call complete_template_args.
14388 (most_specialized): Don't overwrite input; create a new list.
14389 (most_specialized_class): Use most_general_template.
14390 (regenerate_decl_from_template): Use unregister_specialization.
14391 Use full template arguments.
14392 (instantiate_decl): Use full template arguments.
14393 (set_mangled_name_for_template_decl): New function.
14394 * semantics.c (begin_class_definition): Use
14395 maybe_process_partial_specialization.
14396 (finish_member_class_template): New function.
14397 (finish_template_decl): Likewise.
14398 (finish_template_type): Likewise.
14399 (typeck.c): Don't crash after issuing a compiler_error.
14400 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
14402 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
14404 * typeck2.c (build_functional_cast): Handle default-initialization.
14406 * call.c (build_over_call): Pass 1 to popclass.
14408 * parse.y (direct_notype_declarator): Add precedence declaration
14409 to notype_unqualified_id case.
14410 * Makefile.in (EXPECT): Adjust.
14412 * tree.c (ovl_member): Fix for single function in OVL.
14414 1998-07-27 Dave Brolley <brolley@cygnus.com>
14416 * c-lex.c (yylex): Fix boundary conditions in character literal and
14417 string literal loops.
14419 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
14421 * decl.c (lookup_name_real): OK, do return the from_obj value
14422 unless got_object depends on template parms.
14424 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
14426 * pt.c (coerce_template_parms): Also complain about local enums.
14428 * cp-tree.h: Add prototype for set_identifier_local_value.
14429 * decl.c (set_identifier_local_value_with_scope): Make static,
14431 * search.c (covariant_return_p): Likewise.
14432 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
14434 * call.c (build_method_call): Only pull out the type of a destructor
14435 if it's a template type parm.
14436 * decl.c (lookup_name_real): Never return the from_obj value.
14438 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
14440 * except.c (process_start_catch_block_old): Call start_decl_1 for
14442 * decl.c (start_decl_1): Avoid duplicate error.
14444 * init.c (expand_default_init): Only perform the initialization if
14445 it will do something.
14447 1998-07-23 H.J. Lu (hjl@gnu.org)
14449 * parse.y (base_class): Check for invalid base class.
14451 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
14453 * decl2.c (import_export_template): Fold in...
14454 (import_export_class): ...to here. Handle dllimport/export.
14456 * class.c (build_vtable): Pass at_eof to import_export_vtable.
14457 (prepare_fresh_vtable): Likewise.
14458 * decl2.c (import_export_class): Split out...
14459 (finish_prevtable_vardecl): From here.
14460 * class.c (finish_struct_1): Call import_export_class if at_eof.
14462 * decl.c (start_function): #if 0 mysterious code I wrote and have
14464 * rtti.c (get_tinfo_fn): If this is for a class type, set
14467 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
14469 * inc/exception: Change terminate and unexpected to ().
14471 * parse.y (named_class_head_sans_basetype_defn): A
14472 named_class_head_sans_basetype followed by '{' or ':' is a defn.
14474 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
14476 * tree.c (canonical_type_variant): New fn to handle arrays.
14477 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
14478 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
14479 * method.c (process_overload_item): Use build_overload_value for
14482 1998-07-20 Dave Brolley <brolley@cygnus.com>
14484 * lex.c (mbchar.h): #include it.
14485 (GET_ENVIRONMENT): New macro.
14486 (init_parse): Set character set based on LANG environment variable.
14487 (real_yylex): Handle multibyte characters in character literals.
14488 (real_yylex): Handle multibyte characters in string literals.
14490 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
14492 * lex.c (do_identifier): Look for class value even if we don't
14493 have a global value. Do implicit declaration if parsing is 2.
14494 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
14497 1998-07-19 Mark Mitchell <mark@markmitchell.com>
14499 * decl.c (pushtag): Revert previous change.
14500 * pt.c (lookup_template_class): Don't put out debugging
14501 information for types that use template parameters.
14503 * decl.c (pushtag): Don't put out debugging information for
14504 compiler-generated typedefs.
14506 * error.c (dump_type_real): Don't crash when presented with
14507 intQI_type_node or the like.
14509 * semantics.c (finish_translation_unit): Fix spelling error in
14512 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
14514 * decl.c (lookup_name_real): Pull out single function here.
14515 (select_decl): Not here.
14516 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
14518 * decl.c (qualify_lookup): Tweak again.
14520 * pt.c (lookup_template_class): Don't mess with the context of the
14522 * decl2.c (current_decl_namespace): Remove special handling for
14525 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
14526 a member template specialization.
14528 * tree.c (ovl_member): Use decls_match to compare functions.
14529 * decl.c (decls_match): Check the context of a function.
14531 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
14532 in Koenig lookup support rules.
14533 * semantics.c (finish_call_expr): Handle the new cases.
14535 * typeck.c (build_x_function_call): Handle overloaded methods.
14537 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
14539 1998-07-16 Mark Mitchell <mark@markmitchell.com>
14541 * semantics.c (finish_object_call_expr): Revert previous change.
14542 * call.c (build_new_method_call): Likewise. Instead, convert
14543 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
14545 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
14547 * decl.c (qualify_lookup): Handle templates.
14549 * decl2.c (do_using_directive): Don't pass ancestor.
14550 * decl.c (push_using_directive): Calculate ancestor.
14552 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
14553 * decl.c (pushdecl): Move type shadowing handling from here...
14554 (duplicate_decls): ...to here.
14555 * decl.c (set_identifier_local_value_with_scope): New fn.
14556 (pushdecl): Use it.
14557 (set_identifier_local_value, lookup_type_current_level): New fns.
14558 * decl2.c (do_local_using_decl): Handle types and binding level
14561 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
14562 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
14563 (lookup_namespace_name): Likewise.
14564 * typeck.c (build_unary_op): Not here anymore.
14566 * decl2.c (do_class_using_decl): Make sure we get an identifier.
14567 * class.c (handle_using_decl): Ignore TYPE_DECLs.
14569 * decl.c (qualify_lookup): New fn.
14570 (lookup_name_real): Use it.
14572 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
14574 * decl2.c (add_using_namespace): When directly using a namespace
14575 that was indirect before, promote it.
14577 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
14578 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
14579 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
14580 * decl.c (select_decl): Replace two flag parameters by one.
14581 (unqualified_namespace_lookup): Likewise, pass flag.
14582 (lookup_flags): New function.
14583 (lookup_name_real): Compute flags, pass them.
14584 (lookup_namespace_name): Call with zero-flag.
14585 * decl2.c (ambiguous_decl): Add flag parameter, complain only
14586 according to flags.
14587 (lookup_using_namespace, qualified_lookup_using_namespace):
14588 Add flag parameter, pass them through.
14589 * lex.c (do_scoped_id): Call with zero-flag.
14591 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
14593 * typeck.c (convert_for_assignment): Use comptypes.
14595 1998-07-16 Mark Mitchell <mark@markmitchell.com>
14597 * semantics.c (finish_object_call_expr): Move test for the
14598 function called being a TYPE_DECL to ...
14599 * call.c (build_new_method_call): Here.
14601 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
14603 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
14604 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
14606 * lex.c (looking_for_typename): Don't initialize.
14608 * decl2.c (ambiguous_decl): Clarify error message.
14610 * decl.c (push_using_directive): Iterate over namespaces used
14613 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14615 * decl2.c (add_using_namespace): Iterate over namespaces used
14618 * decl.c (lookup_name_real): Accept namespace aliases as locals.
14619 (cat_namespace_levels): Ignore aliases.
14620 (duplicate_decls): Ignore duplicate aliases.
14621 * decl2.c (do_namespace_alias): Process block level namespace
14622 aliases. Store alias with pushdecl. Remove odr errors.
14623 * parse.y (namespace_alias): New non-terminal.
14626 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
14628 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
14629 Handle TEMPLATE_TYPE_PARM.
14630 (arg_assoc): Rewrite.
14632 * pt.c (complete_template_args): Don't look at the context unless
14635 * method.c (build_decl_overload_real): Fix namespace handling.
14637 * typeck.c (build_unary_op): Extract a lone function from an
14640 * call.c (build_scoped_method_call): Handle getting a namespace
14641 for basetype in a destructor call.
14642 (check_dtor_name): Handle enums.
14644 * parse.y (using_directive): New nonterminal.
14645 (extdef, simple_stmt): Use it.
14647 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
14649 * decl2.c (add_function): Move error message ...
14650 (arg_assoc_namespace): ... from here.
14652 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
14654 * parse.y (namespace_qualifier): Fix multiple level handling.
14655 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
14656 (arg_assoc): Don't skip the first argument of a function.
14658 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
14660 * search.c (my_tree_cons): Clean up.
14662 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
14664 * call.c (joust): Don't warn about "confusing" conversions to the
14667 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
14669 * class.c (push_nested_class): Complain about namespaces.
14670 * decl.c (start_decl): Enter the object's namespace.
14671 (cp_finish_decl): Leave it.
14672 (grokdeclarator): Likewise.
14673 * decl2.c (check_decl_namespace): New function.
14674 (finish_file): Call it.
14675 * parse.y (complex_direct_notype_declarator): Set complexity
14676 of namespace-qualified ids to -1, enter the namespace.
14678 * method.c (build_template_decl_overload): Expect _DECL as first
14679 parameter. Put context temporarily into current_namespace.
14680 * pt.c (check_explicit_specialization): Change caller.
14681 (tsubst): Likewise.
14683 * init.c (build_offset_ref): Call mark_used and
14684 convert_from_reference for namespace members.
14686 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
14688 * search.c (my_tree_cons): The bitfield is at index 2.
14690 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
14692 * lang-options.h: Format changed to work with new --help support
14695 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
14697 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
14698 Do Koenig lookup in CALL_EXPR.
14699 (arg_assoc): Handle error_mark.
14700 * lex.c (is_global): New function.
14701 (do_identifier): Expect arguments for Koenig lookup.
14702 * parse.y (primary): Add rules for calls of unqualified function calls.
14703 (do_id): Change call of do_identifier.
14704 * pt.c (finish_stmt_expr): Likewise.
14705 * semantics.c (finish_id_expr): Likewise.
14706 (finish_call_expr): Add integer parameter to indicate
14707 argument-dependent lookup.
14709 * decl.c (struct binding_level): New field using_directives.
14710 (push_using_decl): Not sorry anymore.
14711 (push_using_directive): New function.
14712 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
14713 (unqualified_namespace_lookup): New function, code from ...
14714 (lookup_name_real): ... here.
14715 * decl2.c (lookup_using_namespace): Pass using list instead of
14717 (validate_nonmember_using_decl): New function.
14718 (do_nonmember_using_decl): New function.
14719 (do_toplevel_using_decl): Use them.
14720 (do_local_using_decl): New function.
14721 (do_using_directive): Support block-level directives.
14722 * parse.y (simple_stmt): Support using declarations and
14724 (namespace_qualifier, namespace_using_decl): New non-terminals.
14726 * xref.c (classname): New function.
14727 (GNU_xref_hier): Change class and base parameters to tree.
14728 * decl.c (xref_baseypes): Change caller.
14729 * friend.c (make_friend_class): Likewise.
14731 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
14733 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
14736 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
14737 template template parameter, record its use.
14738 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
14739 its template arguments if exists.
14741 * pt.c (coerce_template_template_parms): New function equivalent
14742 to coerce_template_parms when IS_TMPL_PARM is true.
14743 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
14744 all callers changed.
14746 (coerce_template_parms): Access ARGLIST properly when creating a
14747 new vector. Only accept implicit TYPE_DECL as valid argument for
14748 a template template parameter when it is a base class of
14749 current_class_type. Don't display error message when COMPLAIN is
14752 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
14754 * repo.c (get_base_filename): Use file_name_nondirectory.
14755 (open_repo_file): Likewise.
14756 * cp-tree.h (file_name_nondirectory): Add prototype.
14758 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
14760 * friend.c (do_friend): Pull the identifier out of declarator.
14761 Use cp_error and friends.
14762 * decl2.c (qualified_lookup_using_namespace): Fix call to
14764 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
14765 (grokvardecl): Use DECL_CLASS_SCOPE_P.
14766 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
14767 * class.c (warn_hidden): Fix for OVERLOAD.
14768 From grahams@rcp.co.uk:
14769 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
14770 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
14772 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
14774 * g++.1 (-traditional): Remove duplicated documentation.
14776 1998-07-11 Mark Mitchell <mark@markmitchell.com>
14778 * method.c (flush_repeats): Add nrepeats parameter.
14779 (issue_nrepeats): Likewise.
14780 (is_back_referenceable_type): New function. Don't back-reference
14781 TEMPLATE_TYPE_PARMs as well as simple types like integers.
14782 (build_mangled_name_for_type): Likewise.
14783 (build_mangled_name_for_type_with_Gcode): Likewise.
14784 (lasttype): Remove.
14785 (nrepeats): Likewise.
14786 (Nrepeats): Likewise.
14787 (start_squangling): Don't clear the variables removed above.
14788 (end_squangling): Likewise.
14789 (flush_repeats): Tidy. Use nrepeats parameter rather than
14791 (issue_nrepeats): Likewise, but with nrepeats global. Use
14792 is_backreferenceable_type.
14793 (build_overload_nested_name): Tidy. Add comment. Use
14794 build_mangled_name_for_type.
14795 (build_underscore_int): Comment.
14796 (build_overload_scope_ref): Use build_mangled_name_for_type.
14797 (build_overload_int): Likewise.
14798 (build_template_template_parm_names): Tidy.
14799 (build_template_parm_names): Use build_mangled_name_for_type.
14800 (build_overload_identifier): Add comments.
14801 (build_mangled_name_for_type_with_Gcode): Split out from
14802 build_mangled_name.
14803 (build_mangled_name_for_type): Use it.
14804 (build_mangled_name): Rework to use build_mangled_name_for_type
14805 and to not use global nrepeats/Nrepeats. Tidy.
14806 (process_modifiers): Tidy.
14807 (check_btype): Use is_backreferenceable_type. Add comment.
14808 Rename `node' to `type'.
14809 (process_overload_item): Set numeric_output_need_bar here.
14810 Use build_mangled_name_for_type. Tidy.
14811 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
14812 build_mangled_name_for_type.
14814 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
14817 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
14819 * cp-tree.h (warn_long_long): Define.
14820 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
14821 warning "ANSI C++ does not support `long long'".
14822 * decl2.c (warn_long_long): Define.
14823 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
14825 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
14827 * decl.c (xref_tag): Handle attributes between 'class' and name.
14828 * parse.y (aggr): Likewise.
14829 * semantics.c (finish_class_definition): Likewise.
14830 * Makefile.in (EXPECTED): Adjust.
14832 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
14833 * decl2.c: Define them.
14834 (lang_decode_option): Handle them.
14835 * lang-options.h: Add -foptional-diags.
14836 * class.c (finish_struct): Don't complain about multiple meanings of
14837 name if -fno-optional-diags.
14838 * decl.c (pushdecl_class_level): Likewise.
14839 * lex.c (real_yylex): Check warn_multichar.
14841 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
14843 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
14845 * tree.c (make_binfo): Fix length.
14847 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
14849 * decl2.c (lang_decode_option): Remove warn_template_debugging.
14850 * lang-options.h: Likewise.
14852 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14854 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
14855 (process_start_catch_block): Likewise for variables
14856 `false_label_rtx', `call_rtx' and `return_value_rtx'.
14858 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
14860 * tree.c (build_srcloc): Make sure we allocate this node on the
14863 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
14865 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
14866 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
14867 (lang_specific_driver): Only add -lm automatically if need_math is
14870 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
14872 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
14874 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14876 * Makefile.in (EXPR_H): New dependency variable.
14877 (decl2.o): Depend on $(EXPR_H).
14878 (typeck.o): Likewise.
14879 (init.o): Likewise.
14880 (expr.o): Likewise.
14882 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
14884 * decl.c (start_enum): Put local enums on permanent_obstack.
14886 1998-06-25 Mark Mitchell <mark@markmitchell.com>
14888 * cp-tree.h (c_get_alias_set): Declare.
14889 * decl.c (init_decl_processing): Set lang_get_alias_set.
14891 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
14893 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
14894 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
14895 flag for all function decls which are in the exception table.
14896 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
14897 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
14898 code is emitted for any referenced rtti function.
14900 1998-06-25 Dave Brolley <brolley@cygnus.com>
14902 * lang-specs.h: Use new | syntax to eliminate
14903 string concatenation.
14905 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
14907 * cp-tree.h (CP_DECL_CONTEXT): New macro.
14908 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
14909 * method.c (build_overload_nested_name): Likewise.
14910 * sig.c (build_signature_pointer_or_reference_type): Don't set
14913 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14915 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
14916 * cp-tree.h (FROB_CONTEXT): New macro.
14917 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
14918 * decl.c (namespace_binding): Replace NULL_TREE with
14920 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
14921 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
14923 * decl.c (pushtag): Use FROB_CONTEXT.
14924 (pushdecl, make_typename_type, define_function, grokdeclarator):
14926 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
14927 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
14929 * decl2.c (decl_namespace): Return global_namespace if no context.
14930 * method.c (build_overload_nested_name): Expect null as context.
14931 * pt.c (mangle_class_name_for_template): Do nothing for null
14933 (lookup_template_class): Allow for null id_context.
14935 1998-06-25 Richard Henderson <rth@cygnus.com>
14937 * method.c (emit_thunk): Set current_function_is_thunk for the
14938 ASM_OUTPUT_MI_THUNK case as well.
14940 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
14942 * exception.cc (__cplus_type_matcher): Get a match_info pointer
14943 instead of an exception table entry as a parameter.
14945 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
14947 * parse.y (function_try_block): Don't call start_catch_handler.
14948 * except.c (call_eh_info): Remove coerced field from declaration.
14949 (build_eh_type_type_ref): New function to create an address of a
14950 rtti function for the new style exception tables.
14951 (expand_start_catch_block): Split function, this contains the
14953 (process_start_catch_block_old): New function to perform the rest
14954 of expand_start_catch_block under old style exceptions.
14955 (process_start_catch_block_old): New function to perform the rest
14956 of expand_start_catch_block under new style exceptions.
14957 (expand_end_catch_block): Only pop the false label off the stack under
14958 the old style of exceptions.
14959 * semantics.c (finish_try_block): Don't call start_catch_handler.
14960 * exception.cc (struct cp_eh_info): Add original_value field.
14961 (__cplus_type_matcher): Perform type matching on the original exception
14962 value, and if we have a match, set the current value.
14963 (__cp_push_exception): Set the original exception value.
14965 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
14967 * call.c (joust): Fix confusing conversion warning.
14969 * call.c (build_op_delete_call): Add placement parm. Check
14970 LOOKUP_SPECULATIVELY.
14971 * cp-tree.h, decl2.c, init.c: Adjust.
14972 * decl.c (finish_function): Use it.
14974 * pt.c (tsubst): Diagnose creating void fields or variables.
14976 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14978 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
14980 * cp-tree.h (check_dtor_name): Add prototype.
14982 * init.c (expand_member_init): Remove unused variables
14983 `ptr_type_node', `parm' and `rval'.
14985 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
14986 in call to fprintf.
14987 (lang_print_xnode): Likewise.
14989 * typeck2.c (enum_name_string): Cast argument to sprintf to long
14990 and use %ld specifier.
14992 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
14993 specifier in call to fprintf.
14994 (GNU_xref_member): Cast argument to sprintf to int.
14996 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14998 * typeck2.c (pop_init_level): Warn about implicit zero initialization
15001 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15003 * cp-tree.h: Prototype function `check_java_method'.
15005 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
15007 * class.c (finish_struct): Make conflicting use of id a pedwarn.
15008 * decl.c (pushdecl_class_level): Likewise.
15010 1998-06-17 Mark Mitchell <mark@markmitchell.com>
15012 * pt.c (convert_nontype_argument): Issue an error when presented
15013 with an integer (real) constant that cannot be simplified to an
15014 INT_CST (REAL_CST).
15016 * cp-tree.h (c_get_alias_set): Remove declaration added in
15017 1998-06-13 change that should never have been checked in.
15019 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
15021 * typeck.c (build_binary_op_nodefault): Change % in format strings
15024 * decl.c (grokvardecl): Don't build_static_name for decls that
15025 aren't at namespace scope.
15027 * init.c (perform_member_init): Catch default-initialization of
15030 1998-06-17 Mark Mitchell <mark@markmitchell.com>
15032 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
15034 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
15036 * method.c (hack_identifier): Complain about getting a namespace
15038 * typeck.c (decay_conversion): Remove check for namespaces.
15039 * typeck2.c (incomplete_type_error): Likewise.
15040 * parse.y (template_arg): Add PTYPENAME expansion.
15042 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
15044 * decl.c (grokvardecl): Don't build external assembler names for
15045 TYPENAMEs in other namespaces as there is no declarator.
15046 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
15047 info from DECL_CONTEXT if it is NULL.
15049 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
15051 * call.c (check_dtor_name): Split out.
15052 (build_scoped_method_call): Use it.
15053 (build_method_call): Use it.
15054 * init.c (build_offset_ref): Use it.
15056 * typeck.c (build_static_cast): Fix handling of pointers to members.
15058 * decl.c (finish_function): Just return nothing from a constructor.
15059 * typeck.c (c_expand_return): Complain about returning a void
15060 expression from a destructor.
15062 1998-06-13 Mark Mitchell <mark@markmitchell.com>
15064 * class.c (alter_access): Accept a BINFO explaining how to get
15065 from the entity whose accessed is being altered to the type doing
15067 (handle_using_decl): New function containing code split out from ...
15068 (finish_struct_1): Here.
15070 * cp-tree.h (complete_type_or_else): Declare.
15071 * init.c (build_new_1, build_delete): Use it.
15072 * typeck.c (require_complete_type): Use complete_type, rather than
15073 expanding it inline.
15074 (complete_type_or_else): New function.
15075 (build_component_ref): Use it.
15076 (pointer_int_sum): Make sure the type pointed to is complete.
15077 (pointer_diff): Likewise.
15079 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
15082 * search.c (get_matching_virtual): Note that member templates
15083 cannot override virtual functions.
15085 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
15087 * pt.c (check_explicit_specialization): If DECLARATOR turned into
15088 an error_mark_node from lookup_template_function, return the same.
15089 (determine_specialization): Also make sure TEMPLATE_ID isn't an
15090 error_mark_node, before we try to read its operands.
15091 * decl.c (grokdeclarator): If we got an error_mark_node from
15092 check_explicit_specialization, just return it right back.
15094 1998-06-12 Mark Mitchell <mark@markmitchell.com>
15096 * class.c (instantiate_type): Don't treat template-ids that don't
15097 specify any template arguments as equivalent to ordinary
15098 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
15099 pointer-to-members for member templates. Tidy slightly.
15100 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
15101 * init.c (build_offset_ref): Handle template-ids like ordinary
15102 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
15103 offset part of the OFFSET_REF.
15104 * typeck.c (build_unary_op): Change check for unknown types to
15105 look for OFFSET_REFs, not SCOPE_REFs.
15107 1998-06-11 Mark Mitchell <mark@markmitchell.com>
15109 * pt.c (is_member_template_class): New function.
15110 (push_template_decl_real): Use it.
15112 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
15114 * friend.c (do_friend): Add support for nested classes using
15115 member functions of the enclosing class as friends.
15117 1998-06-10 Mark Mitchell <mark@markmitchell.com>
15119 * call.c (convert_default_arg): Make global, not static.
15120 (convert_arg_for_ellipsis): Split out from ...
15121 (build_over_call): Here.
15122 * cp-tree.h (convert_default_arg); Declare.
15123 (convert_arg_to_ellipsis): Likewise.
15124 (do_member_init): Remove.
15125 * init.c (do_member_init): Remove; this code is dead.
15126 (expand_member_init): Remove much of this code; it is dead.
15127 * typeck.c (convert_arguments): Use convert_default_arg and
15128 convert_arg_for_ellipsis, rather than duplicating here.
15130 * call.c (convert_like): Don't fail silently if
15131 build_user_type_conversion fails. Always return error_mark_node
15134 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
15136 * search.c (covariant_return_p): Complain about ambiguous base.
15138 * typeck.c (build_component_ref): Diagnose ref to nested type.
15140 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
15142 * decl.c (grokparms): Check that INIT isn't an error_mark_node
15143 before giving error about invalid type for default arg.
15145 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
15147 * call.c (build_method_call): Fix thinko.
15149 1998-06-10 Dave Brolley <brolley@cygnus.com>
15151 * decl2.c (lang_decode_option): New argc/argv interface.
15152 * cp-tree.h (lang_decode_option): New argc/argv interface.
15153 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
15154 specified for cpplib-enabled compilers.
15155 * lex.c (lang_init): Don't check_newline for cpplib.
15156 (init_parse): Don't initialize cpplib here.
15158 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
15160 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
15161 piece before checking DECL_MUTABLE_P.
15163 1998-06-10 John Carr <jfc@mit.edu>
15165 * tree.c (debug_binfo): Make printf format match arguments.
15167 * error.c (OB_PUTI): Make printf format match arguments.
15169 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
15171 * init.c (perform_member_init): Handle default-initialization.
15173 * except.c (build_throw): Handle throwing NULL.
15175 * typeck.c (build_x_function_call): Use resolve_offset_ref.
15177 * search.c (compute_access): Only strip an anonymous union
15180 * call.c (add_builtin_candidates): Tweak.
15182 * cvt.c (build_expr_type_conversion): Restore code for conversion
15184 * decl2.c (delete_sanity): Use it. Clean up.
15186 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
15188 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
15190 * typeck.c (c_expand_return): Don't warn about void expressions on
15191 return statements in functions returning void.
15193 1998-06-09 Mark Mitchell <mark@markmitchell.com>
15195 * pt.c (fn_type_unification): Revise documentation. Tidy.
15196 (type_unification): Likewise.
15198 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
15200 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
15202 * parse.y (function_try_block): Rename expand_start_catch, and delete
15204 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
15207 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
15209 * search.c (lookup_member): New fn.
15210 * class.c (finish_struct_1): Use it.
15211 * decl.c (lookup_name_real): Use it.
15213 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15215 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
15217 * cp-tree.h: Add prototype for `maybe_print_template_context' and
15218 `maybe_make_one_only'.
15220 * decl.c (auto_function): Remove unused variable `decl'.
15222 * decl2.c: Include dwarf2out.h and dwarfout.h.
15224 * lex.c: Remove redundant declarations of `set_float_handler' and
15227 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
15229 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
15230 time flag. Call __cp_eh_info instead of __cp_exception_info.
15231 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
15232 (__cp_exception_info): Return offset into cp_eh_info structure to
15233 match what use to be the start of this structure.
15234 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
15235 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
15237 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
15238 __cp_eh_info instead of __cp_exception_info.
15240 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
15242 * decl.c (cp_finish_decl): Disable inlining of extern inlines
15243 with static variables.
15245 1998-06-08 Mark Mitchell <mark@markmitchell.com>
15247 * init.c (build_offset_ref): Correct previous change to use build,
15250 1998-06-07 Mark Mitchell <mark@markmitchell.com>
15252 * class.c (instantiate_type): Handle pointer-to-members where the
15253 member is a template.
15254 * init.c (build_offset_ref): Likewise.
15255 * typeck.c (build_unary_op): Likewise.
15257 1998-06-07 Richard Henderson <rth@cygnus.com>
15259 * lex.c (lang_init_options): New function.
15260 (lang_init): Remove flag_exceptions == 2 hack.
15262 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
15264 * search.c (envelope_add_decl): Tweak for implicit typename.
15266 * call.c (joust): Also warn about confusing conversion op/constructor
15267 overload resolution.
15269 * spew.c (yylex): Also return the TYPE_DECL if got_object.
15270 Don't clear got_object after '~'.
15271 * call.c (build_scoped_method_call): Tweak destructor handling.
15272 (build_method_call): Likewise.
15273 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
15274 TYPE_MAIN_VARIANT for destructors.
15275 * semantics.c (finish_object_call_expr): Complain about calling a
15278 1998-06-05 Per Bothner <bothner@cygnus.com>
15280 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
15281 Define - update needed by gcc.c change.
15283 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
15285 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
15287 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
15289 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
15290 * decl.c (lookup_name_real): Add namespaces_only parameter.
15291 If set, return only NAMESPACE_DECLs.
15292 (select_decl): Likewise.
15293 (identifier_type_value): Give additional parameter.
15294 (lookup_name_nonclass): Likewise.
15295 (lookup_name): Likewise.
15296 (find_binding): Skip namespace aliases.
15297 (binding_for_name): Likewise.
15298 (push_namespace): Check for namespace aliases.
15299 (lookup_name_namespace_only): New function.
15300 (begin_only_namespace_names, end_only_namespace_names): New functions.
15301 * decl2.c (set_decl_namespace): Skip namespace aliases.
15302 (do_using_directive): Likewise.
15303 (do_namespace_alias): Produce namespace aliases, fix alias
15305 * error.c (dump_decl): Support SCOPE_REF.
15306 * parse.y (extdef): Wrap lookup with namespace_only for namespace
15307 aliases and using declarations.
15309 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
15311 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
15313 * error.c (dump_expr): Clean up NEW_EXPR case.
15315 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
15317 Suggested by Brendan Kehoe
15318 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
15319 treat it as using ::decl.
15321 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
15323 * tree.c (mapcar): Support NEW_EXPR.
15325 * error.c (dump_expr): Support NEW_EXPR.
15327 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
15329 * method.c (make_thunk): Use overload machinery to make name.
15330 * search.c (covariant_return_p): New fn.
15331 (get_matching_virtual): Use it.
15333 * init.c (build_new_1): Fix check for void.
15335 1998-06-01 Per Bothner <bothner@cygnus.com>
15337 * cp-tree.h (TYPE_FOR_JAVA): New macro.
15338 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
15339 java_int_type_node, java_long_type_node, java_float_type_node,
15340 java_double_type_node, java_char_type_node, java_boolean_type_node):
15341 New "primitive" types, with predefined names __java_byte etc.
15342 (record_builtin_java_type): New function.
15343 (init_decl_processing): Make Java types with record_builtin_java_type.
15344 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
15345 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
15346 (grokfndecl): Call check_java_method for Java classes.
15347 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
15348 (process_overload_item): Match types against specific
15349 java_XX_type_node types, rather than using is_java_type.
15350 * class.c (finish_struct_1): Don't add default copy constructor
15351 or operator= if TYPE_FOR_JAVA.
15352 (pop_lang_conext): Restore strict_prototyp proper if Java.
15353 * decl2.c (acceptable_java_type, check_java_method): New functions.
15354 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
15355 (tsubst): Move common statement after if statement.
15356 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
15358 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
15360 * pt.c (for_each_template_parm): Use first_rtl_op.
15362 * tree.c (build_cplus_array_type_1): Also check index_type for
15365 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
15367 * pt.c (tsubst): Always copy BINFO_BASETYPES.
15369 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
15371 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
15372 TYPE_SIZE_UNIT too.
15374 1998-05-29 Mark Mitchell <mark@markmitchell.com>
15376 * decl.c (grokdeclarator): Don't complain about in-class
15377 initialization of static consts if we don't really know the type
15380 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
15382 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
15383 * method.c (build_destructor_name): New fn.
15384 * decl2.c (maybe_retrofit_in_chrg): Split out...
15385 (grokclassfn): From here. Reorganize.
15386 * decl.c (grok_ctor_properties): Make sure ctors for types with
15387 vbases have the in_chrg parm.
15388 * pt.c (instantiate_class_template): Update
15389 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
15391 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
15393 1998-05-28 Mark Mitchell <mark@markmitchell.com>
15395 * pt.c (instantiate_decl): Make test for whether or not static
15396 variables should be instantiated early match its comment.
15398 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
15400 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
15402 (start_function): Call check_default_args.
15403 * decl2.c (grokfield): Don't call check_default_args.
15404 (check_default_args): Use cp_error_at.
15405 * lex.c (do_pending_defargs): Call check_default_args.
15407 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
15409 * call.c (build_method_call): Make sure get_type_value returns
15410 something before we try to use its TYPE_MAIN_VARIANT.
15411 (build_scoped_method_call): Likewise.
15413 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
15415 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
15416 initialize an array.
15418 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
15421 * friend.c (do_friend): Clarify template warning.
15423 1998-05-27 Mark Mitchell <mark@markmitchell.com>
15425 * decl.c (shadow_label): Don't treat decls as identifiers.
15426 (maybe_push_to_top_level): Clear shadowed_labels.
15428 * pt.c (instantiate_decl): Reset lineno and filename after calling
15429 regenerate_decl_from_template.
15431 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
15434 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
15436 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
15438 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15440 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
15441 (convert_nontype_argument): Handle cases when nontype template
15442 parameters become classes after substitution.
15444 1998-05-26 Mark Mitchell <mark@markmitchell.com>
15446 * friend.c (is_friend): Use comptypes, rather than == to compare
15447 types. Modify for new representation of template friends.
15448 (make_friend_class): Likewise.
15449 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
15450 (instantiate_class_template): Deal with template friends.
15452 * decl.c (store_parm_decls): Remove redundant call to
15453 expand_main_function.
15455 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
15457 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
15460 1998-05-26 Per Bothner <bothner@cygnus.com>
15462 * language_as_string: Handle lang_java.
15464 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
15466 * decl.c (pushdecl): Don't copy the type_decl.
15468 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15470 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
15471 current_class_type.
15472 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
15474 * parse.y (complex_direct_notype_declarator): Use $1 to access
15475 scope of notype_qualified_id.
15477 1998-05-26 Dave Brolley <brolley@cygnus.com>
15479 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
15480 (init_parse): Initialize cpplib interface.
15482 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
15483 empty continuation.
15485 1998-05-26 Mark Mitchell <mark@markmitchell.com>
15487 * decl.c (pushtag): Avoid crashing on erroneous input.
15489 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15491 * decl.c (push_namespace): Only produce one unique name for
15492 anonymous namespaces.
15493 (get_unique_name): Remove.
15495 1998-05-25 Mark Mitchell <mark@markmitchell.com>
15497 * call.c (tourney): Don't do any extra comparisons.
15499 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
15501 * cp-tree.h (processing_template_parmlist): Declare.
15502 * decl.c (pushtag): Don't call push_template_decl when we
15504 * pt.c (processing_template_parmlist): New variable.
15505 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
15506 (complete_template_args): Use it.
15507 (add_to_template_args): Likewise.
15508 (innermost_args): Likewise.
15509 (tsubst): Likewise.
15510 (begin_template_parm_list): Use processing_template_parmlist.
15511 (end_template_parm_list): Likewise.
15513 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
15514 * decl.c (grokdeclarator): Use it.
15515 * decl2.c (grok_x_components): Likewise.
15516 * init.c (initializing_context): Likewise.
15517 * method.c (do_build_copy_constructor): Likewise.
15518 (do_build_assign_ref): Likewise.
15519 * search.c (compute_access): Likewise.
15520 * typeck.c (build_component_ref): Likewise.
15522 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
15523 unnamed type a typedef name "for linkage purposes".
15525 * pt.c (lookup_template_class): Don't look at
15526 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
15528 * method.c (build_overload_int): Handle error cases gracefully.
15530 * pt.c (instantiate_decl): Handle static member variables
15533 * pt.c (tsubst): Use the tsubst'd type when producing new
15534 TEMPLATE_PARM_INDEX nodes.
15536 1998-05-24 Mark Mitchell <mark@markmitchell.com>
15538 * tree.c (cp_tree_equal): Handle pointers to member functions.
15540 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
15541 sure the type of the REF_BIND is a reference type.
15542 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
15543 target_type for clarity.
15545 * parse.y (xcond): Move call to condition_conversion ...
15546 * semantics.c (finish_for_cond): Here.
15547 * parse.c: Regenerated.
15549 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
15551 * decl.c (push_namespace): Namespaces have type void.
15552 * typeck2.c (incomplete_type_error): Complain about namespace
15553 used as expression.
15554 * typeck.c (decay_conversion): Likewise.
15556 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
15558 * error.c (dump_expr): Support namespaces.
15560 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
15562 * cp-tree.def: Add SRCLOC.
15563 * cp-tree.h: Add struct tree_srcloc and accessor macros.
15564 * tree.c (build_srcloc, build_srcloc_here): New fns.
15565 * pt.c (add_pending_template): Use build_srcloc_here.
15566 (push_tinst_level): Update last_template_error_tick before erroring.
15567 (instantiate_decl): Restore lineno and input_filename before
15568 calling add_pending_template.
15569 * decl2.c (finish_file): Set up lineno and input_filename for
15572 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
15574 * decl.c (lang_print_error_function): New fn.
15575 (init_decl_processing): Set print_error_function to use it.
15576 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
15578 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
15581 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
15582 copy-initialization.
15584 * class.c (build_vtable_entry): Use int_fits_type_p.
15585 (build_vtable): Pass a signed offset to build_vtable_entry.
15586 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
15587 set_rtti_entry): Likewise.
15589 1998-05-22 Per Bothner <bothner@cygnus.com>
15591 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
15592 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
15594 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
15596 * pt.c (print_template_context): Use fprintf instead of cp_error.
15598 * pt.c (determine_specialization): Just return an error_mark_node.
15599 Also print the decl we want in error messages. If we complain,
15600 return error_mark_node.
15601 (tsubst_friend_function): Set lineno and input_filename so
15602 error messages will be useful.
15603 (instantiate_template): Just return an error_mark_node.
15604 (check_explicit_specialization): Don't mess with a returned
15607 * pt.c (print_template_context): Add new argument.
15608 (maybe_print_template_context): New fn.
15609 (push_tinst_level): Increment tinst_level_tick.
15610 (pop_tinst_level): Likewise.
15611 * errfn.c (cp_thing): Call maybe_print_template_context. Use
15612 xrealloc instead of xmalloc.
15614 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
15616 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
15618 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
15619 if the template we looked up is the same as the one we already
15622 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
15624 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
15625 (cpp_reader,parse_in): Add for cpplib.
15626 (check_newline): Call handle_sysv_pragma with new interface.
15627 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
15629 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
15630 (sub_getch): Call GETC for cpplib.
15632 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
15633 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
15635 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
15637 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
15639 * decl2.c (maybe_make_one_only): New fn.
15640 (import_export_vtable): Use it.
15641 (import_export_decl): Likewise.
15642 * pt.c (mark_decl_instantiated): Likewise.
15644 1998-05-21 Mark Mitchell <mmitchell@usa.net>
15646 * decl2.c (find_representative_member): Rename to ...
15647 (build_anon_union_vars): New function.
15648 (finish_anon_union): Fix stupidity of previous change.
15650 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
15652 * decl.c (grokfndecl): Handle definition of specialization in
15653 friend declaration.
15655 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
15657 1998-05-20 Mark Mitchell <mmitchell@usa.net>
15659 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
15660 to look for type declarations.
15661 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
15662 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
15663 (finish_member_class_template): Declare.
15664 * decl.c (pushtag): Put member class templates on the
15665 CLASSTYPE_TAGS list, just as for ordinary member classes.
15666 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
15667 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
15668 IDENTIFIER_NAMESPACE_VALUEs.
15669 * parse.y (component_decl): Move code to ...
15670 * semantics.c (finish_member_class_template): New function.
15671 Don't put member class templates on the list of components for a
15673 * parse.c: Regenerated.
15674 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
15675 In fact, don't use DECL_CONTEXT at all here.
15677 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
15679 * decl.c (record_unknown_type): New function.
15680 (init_decl_processing): Call it for the unknown and global type
15683 1998-05-20 Mark Mitchell <mmitchell@usa.net>
15685 * decl2.c (find_representative_member): New function.
15686 (finish_anon_union): Use it.
15688 * cp-tree.h (MAIN_NAME_P): New macro.
15689 (DECL_MAIN_P): Likwise.
15690 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
15691 (grokfndecl): Use the new macros.
15692 (grokdeclarator): Likewise.
15693 (start_function): Likewise.
15694 (store_parm_decls): Likewise.
15695 (finsh_function): Likewise.
15696 * friend.c (do_friend): Likewise.
15697 * typeck.c (build_function_call_real): Likewise.
15698 (build_unary_op): Likewise.
15700 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
15702 * decl2.c (start_objects, finish_objects, do_dtors,
15703 do_ctors): Split out from...
15704 (finish_file): ...here.
15706 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
15708 * tree.c (is_overloaded_fn): Don't abort on placeholders from
15711 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
15713 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
15715 * error.c (dump_expr): Handle an ARROW_EXPR.
15717 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
15719 * decl.c (saveable_obstack): Declare.
15720 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
15721 declare, if necessary.
15723 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
15725 * call.c (compare_qual): Remove.
15726 (is_subseq): Tweak.
15727 (is_properly_derived_from): New function.
15728 (maybe_handle_ref_bind): Likewise.
15729 (maybe_handle_implicit_object): Likewise.
15730 (compare_ics): Modify substantially to bring into conformance with
15732 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
15733 (comp_cv_qualification): Declare.
15734 (comp_cv_qual_signature): Likewise.
15735 * typeck.c (comp_cv_qualification): Likewise.
15736 (comp_cv_qual_signature): Likewise.
15738 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15740 * Makefile.in (parse.o): Depend on toplev.h.
15742 * class.c (typecode_p): Remove prototype and definition.
15744 * cp-tree.h (currently_open_class, is_empty_class, member_p):
15747 * decl.c (push_overloaded_decl_top_level): Remove prototype and
15750 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
15751 in call to `cp_thing'.
15752 (cp_warning): Likewise for function pointer `warning'.
15754 * except.c (do_function_call): Remove prototype and definition.
15755 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
15757 * method.c (is_java_type): Add prototype and make it static.
15759 * parse.y: Include toplev.h.
15761 * pt.c (type_unification): Remove unused variable `arg'.
15762 (instantiate_decl): Likewise for `save_ti'.
15764 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
15766 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
15768 * init.c (build_member_call): Handle template_ids.
15769 * parse.y (primary): Add global_scope template_id.
15771 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
15773 * decl2.c (get_sentry): Use end_temporary_allocation.
15774 Don't declare permanent_obstack.
15776 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
15778 * parse.y (.finish_new_placement): New non-terminal.
15779 (unary_expr, new_type_id): Use it.
15780 * parse.c: Regenerated.
15782 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
15784 * pt.c (redeclare_class_template): Say where the original definition
15785 of the template-parameter's default argument appeared.
15787 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
15789 * call.c (build_over_call): Tweak empty class handling.
15791 * decl.c (make_typename_type): Use currently_open_class.
15793 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
15795 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
15797 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
15798 for a type unless it is one.
15800 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
15802 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
15804 * Makefile.in (program_transform_name, objdir): Define.
15806 * Makefile.in (BISON): Use bison from the build tree if it exists.
15809 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
15811 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
15813 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
15815 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
15817 * call.c (build_scoped_method_call): Likewise.
15819 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
15821 * init.c (build_new_1): Call suspend_momentary around the creation
15822 of values that must be saved for exception handling.
15823 * parse.y (.build_new_placement): New non-terminal.
15824 (unary_expr, new_placement): Use it.
15825 * parse.c: Regenerated.
15827 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
15829 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
15832 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
15835 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
15837 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
15839 * decl.c (start_decl): Revert problem change.
15841 * Makefile.in (CONFLICTS): Fix.
15843 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15845 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
15847 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
15849 * class.c (finish_struct_1): Use BINFO_SIZE.
15851 * decl.c (start_decl): Use 'tem'.
15853 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
15855 * exception.cc: Include eh-common.h.
15856 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
15857 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
15858 (__cp_push_exception): Initialize eh_info struct as well.
15859 * except.c: Remove local structs and include eh-common.h.
15860 (init_exception_processing): Set language and version codes.
15861 (call_eh_info): Add presence of eh_info to runtime description of
15863 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
15864 * semantics.c (finish_try_block): Call start_catch_block() and
15866 * parse.y (function_try_block): Call start_catch_block() and
15869 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
15871 * typeck.c (original_type): New function.
15872 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
15873 to see if they're actually the same.
15874 * cp-tree.h (original_type): Declare.
15876 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15878 * Makefile.in (lex.o): Depend on output.h.
15880 * call.c (add_function_candidate): Remove unused variable `cand'.
15881 (add_conv_candidate): Likewise.
15882 (build_builtin_candidate): Likewise.
15884 * cp-tree.h: Add prototype for `types_overlap_p'.
15886 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
15888 * decl2.c (merge_functions): Remove unused variables `tmp' and
15891 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
15892 (code_as_string): Likewise.
15893 (language_as_string): Likewise.
15894 (parm_as_string): Likewise.
15895 (op_as_string): Likewise.
15896 (assop_as_string): Likewise.
15897 (cv_as_string): Likewise.
15899 * lex.c: Include output.h.
15901 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
15903 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
15906 * tinfo.cc (__class_type_info::dcast): Change the type of variable
15907 `i' from int to size_t.
15909 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
15912 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
15914 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
15915 DECL_NAMESPACE_SCOPE_P.
15916 (lang_decl_name): Likewise.
15917 * pt.c (tsubst_friend_function, tsubst): Likewise.
15918 * decl.c (pushdecl, redeclaration_error_message, start_decl,
15919 cp_finish_decl, start_function): Likewise.
15920 * class.c (finish_struct_1): Likewise.
15921 * call.c (build_over_call): Likewise.
15922 (compare_ics): Use DERIVED_FROM_P.
15924 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
15926 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
15927 * method.c (build_mangled_name): Use it.
15928 (build_decl_overload_real): Likewise.
15930 * error.c (dump_simple_decl): New function, broken out from ...
15931 (dump_decl): Use it.
15933 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
15935 * ptree.c (lang_print_xnode): Add missing `break'.
15937 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
15939 * call.c (add_template_candidate): Adjust for changes to
15940 fn_type_unification.
15941 (add_template_candidate_real): Likewise.
15942 (add_template_conv_candidate): Likewise.
15943 (build_user_type_conversion_1): Likewise.
15944 (build_new_function_call): Likewise.
15945 (build_object_call): Likewise.
15946 (build_new_op): Likewise.
15947 (build_new_method_call): Likewise.
15948 * class.c (instantiate_type): Likewise.
15949 * cp-tree.h (unification_kind_t): New type.
15950 (fn_type_unification): Adjust prototype.
15951 (type_unificaiton): Likewise.
15952 * pt.c (UNIFY_ALLOW_NONE): New macro.
15953 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
15954 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
15955 (UNIFY_ALLOW_DERIVED): Likewise.
15956 (unify): Change prototype.
15957 (maybe_adjust_types_for_deduction): New function.
15958 (check_cv_quals_for_unify): Likewise.
15959 (determine_specialization): Adjust.
15960 (fn_type_unification): Likewise.
15961 (type_unification): Likewise.
15962 (type_unification_real): Likewise. Use
15963 maybe_adjust_types_for_deduction. Fix mishandling of
15964 back-unification of template functions passed as arguments. Pass
15965 appropriate combination of UNIFY_ALLOW_* to unify.
15966 (unify): Remove unused NTPARMS parameter. Use
15967 check_cv_quals_for_unify. Remove bogus code that allowed
15968 too-generous unification in order to adhere more closely to standard.
15969 (get_bindings_real): Adjust.
15970 (get_class_bindings): Likewise.
15972 * method.c (build_overload_identifier): Only use the innermost
15973 template arguments when mangling.
15974 * pt.c (tsubst_template_argument_vector): New function.
15975 (complete_template_args): Deal with the situation where the
15976 extra_args contain more than one level of arguments.
15977 (lookup_template_class): Deal with member template classes, which
15978 may have more than one level of arguments.
15979 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
15980 Improve handling of member template classes. Use
15981 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
15982 tsubst_template_argument_vector where appropriate.
15983 (regenerate_decl_from_template): Break out from ...
15984 (instantiate_decl): Here.
15986 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
15987 * parse.h: Regenerated.
15988 * parse.c: Really regenerated.
15990 * cp-tree.h (finish_unary_op_expr): New function.
15991 (finish_id_expr): Likewise.
15992 (begin_new_placement): Likewise.
15993 (finish_new_placement): Likewise.
15994 (finish_declarator): Likewise.
15995 (finish_translation_unit): Likewise.
15996 (finish_parmlist): Likewise.
15997 (begin_class_definition): Likewise.
15998 (finish_class_definition): Likewise.
15999 (finish_default_args): Likewise.
16000 (finish_inline_definitions): Likewise.
16001 * parse.y (GCC_ASM_KEYWORD): Remove.
16002 (TYPENAME_ELLIPSIS): Likewise.
16003 * parse.c: Regenerated.
16004 Use new functions in semantics.c in the actions for many rules.
16005 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
16006 * hash.h: Regenerated.
16007 * semantics.c (finish_expr_stmt): Allow NULL expr.
16008 (finish_unary_op_expr): New function, containing
16009 code previously in parse.y.
16010 (finish_id_expr): Likewise.
16011 (begin_new_placement): Likewise.
16012 (finish_new_placement): Likewise.
16013 (finish_declarator): Likewise.
16014 (finish_translation_unit): Likewise.
16015 (finish_parmlist): Likewise.
16016 (begin_class_definition): Likewise.
16017 (finish_class_definition): Likewise.
16018 (finish_default_args): Likewise.
16019 (finish_inline_definitions): Likewise.
16021 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
16023 * typeck.c (build_c_cast): Don't decay arrays and functions to
16024 pointer type when converting to a class type.
16026 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
16028 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
16029 (DECL_CLASS_SCOPE_P): Likewise.
16031 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
16033 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
16034 * decl2.c (constructor_name_full): Likewise.
16036 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
16038 * tree.c (mapcar): Add OVERLOAD support.
16040 * init.c (resolve_offset_ref): We must use basetype_path before we
16041 destroy it with a call to convert_pointer_to.
16043 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
16045 * class.c (currently_open_class): New fn.
16046 * decl.c (lookup_name_real): Use it.
16047 * search.c (lookup_field): Likewise.
16049 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
16051 * cp-tree.def (OVERLOAD): New node.
16052 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
16053 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
16054 (NAMESPACE_BINDING): Remove.
16055 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
16057 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
16059 (tree_overload): New struct.
16060 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
16061 (REAL_IDENTIFIER_TYPE_VALUE): Define.
16062 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
16063 (lang_decl_flags): Remove in_namespace.
16064 (lang_decl): Remove chain.
16065 (DECL_CHAIN, DECL_NAMESPACE): Remove.
16066 (flag_honor_std): Declare extern.
16067 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
16068 namespace_binding, set_namespace_binding,
16069 lookup_function_nonclass, cat_namespace_levels,
16070 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
16071 scratch_ovl_cons, ovl_member, build_overload): Declare.
16072 (decl_list_length, get_namespace_id, current_namespace_id,
16073 overloaded_globals_p): Remove.
16074 (lookup_using_namespace, qualified_lookup_using_namespace): Change
16076 (push_scratch_obstack): New macro.
16077 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
16078 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
16080 (build_new_function_call): Iterate using OVL_CHAIN.
16081 Print DECL_NAME in when reporting ambiguities.
16082 (build_object_call): Iterate using OVL_NEXT for fns, convs.
16083 (build_new_op): Call lookup_function_nonclass.
16084 Iterate using OVL_NEXT.
16085 (build_op_delete_call): Change detection of members.
16086 Do not wrap TREE_LIST around fields and single global functions.
16087 (build_over_call): Don't push a class level if the context is a
16089 (build_new_method_call): Iterate using OVL_NEXT.
16090 * class.c (add_method): Chain overloaded members using
16091 build_overload. Remove copying of method.
16092 (grow_method): When iterating through the obstack, expect OVERLOAD
16093 nodes. Chain overload members.
16094 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
16095 nodes in call to get_baselinks.
16096 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
16097 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
16098 fdecls that are OVERLOAD nodes.
16099 (validate_lhs): New function.
16100 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
16101 code. Use DECL_NAME in error messages. Split code between global
16102 and member function processing.
16103 * decl.c (global_type_node): New static variable.
16104 (in_std): New global.
16105 (struct binding_level): New field usings.
16106 (resume_binding_level): Assert that we are not in a class.
16107 (toplevel_bindings_p): Just check for namespace_p or
16109 (resume_level): Remove.
16110 (find_binding): New function.
16111 (binding_for_name): Call it.
16112 (namespace_binding, set_namespace_binding): New functions.
16113 (push_namespace): Associate binding level with new namespace,
16114 resume_binding_level for existing namespace. Remove old code.
16115 Fake std by counting.
16116 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
16117 (maybe_push_to_top_level): Save current namespace.
16118 (pop_from_top_level): Restore saved namespace.
16119 (pop_namespace): Call suspend_binding_level. Remove old code.
16120 (cat_namespace_levels): New function.
16121 (set_identifier_type_value_with_scope): For namespace bindings,
16122 set BINDING_TYPE, and use global_type_node.
16123 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
16124 (identifier_type_value): New function.
16125 (pushtag): If no context, use current_namespace.
16126 (duplicate_decls): Don't process DECL_CHAIN.
16127 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
16128 already set. Never reset it to NULL_TREE. Lookup global variables
16129 in their namespace. Push overloaded templates if they are on
16131 (pushdecl_namespace_level): New function.
16132 (pushdecl_top_level): Implement using pushdecl_namespace_level.
16133 (pushdecl_using_decl): New function.
16134 (overloaded_globals_p): Remove.
16135 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
16136 them. Use namespace_binding and set_namespace_value.
16137 (redeclaration_error_message): Complain if the declarations come
16138 from different namespaces.
16139 (lookup_tag): On namespace level, look in the BINDING_TYPE.
16140 (lookup_namespace_name): Pass tree_bindings from stack. Remove
16142 (select_decl): New function.
16143 (lookup_name_real): Call it for qualified and unqualified lookup.
16144 Pass tree_bindings from the stack.
16145 If prefer_type is 1, also accept namespaces.
16146 (lookup_function_nonclass): New function.
16147 (init_decl_processing): Set the binding level of the global
16148 namespace to global_binding_level.
16149 Build a proper type list for __builtin_apply.
16150 Initialize std_node to "fake std" if flag_honor_std is set.
16151 Initialize global_type_node.
16152 Allocated bad_alloc in namespace std if flag_honor_std.
16153 (define_function): Set the DECL_CONTEXT to the current_namespace.
16154 (start_decl): A namespace is not considered as a context here. If
16155 the DECL_CONTEXT is a namespace, push the decl.
16156 (cp_finish_decl): Check for namespaces used as initializers.
16157 (grokfndecl): Add namespace parameter. Remove processing of
16159 (grokvardecl): Add namespace parameter.
16160 (grokdeclarator): Process SCOPEs that are namespaces. For
16161 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
16162 (start_function): Check for contexts that are namespaces.
16163 Set context for declarations that have not been pushed.
16164 (store_parm_decls): Check for ::main only.
16165 (finish_function): Likewise.
16166 (start_method): Check for contexts that are namespaces.
16167 (start_method): Remove DECL_CHAIN processing.
16168 * decl2.c (flag_honor_std): Declare.
16169 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
16170 (decl_namespace_list): New static global.
16171 (grok_x_components): Ignore namespaces as type contexts.
16172 (check_classfn): Expect OVERLOAD nodes.
16173 (grokfield): Remove DECL_CHAIN processing.
16174 (finish_file): Call cat_namespace_levels.
16175 (merge_functions): New function.
16176 (ambiguous_decl): Rewrite.
16177 (lookup_using_namespace): Produce tree_bindings.
16178 (qualified_lookup_using_namespace): Likewise.
16179 (set_decl_namespace, decl_namespace, current_decl_namespace,
16180 push_decl_namespace, pop_decl_namespace): New functions.
16181 (arg_lookup): New struct.
16182 (add_function, arg_assoc_namespace, arg_assoc_class,
16183 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
16185 (get_namespace_id, current_namespace_id): Remove.
16186 (do_toplevel_using_decl): Rewrite.
16187 (do_class_using_decl): Complain about namespace qualifiers.
16188 (do_using_directive): Sorry if not on namespace level. Complain
16189 about unknown namespaces.
16190 * error.c (dump_aggr_type): Check for namespace contexts.
16191 * except.c (init_exception_processing): Push terminate into std.
16192 * friend.c (is_friend): A namespace is not a context, here.
16193 * init.c (expand_member_init): Remove DECL_CHAIN processing.
16194 (build_offset_ref): Process OVERLOAD nodes.
16195 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
16196 * lex.c (identifier_type): Loop using OVL_CHAIN.
16197 (see_typename): Set looking_for_typename to 2.
16198 (real_yylex): Likewise.
16199 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
16200 (do_scoped_id): Expect OVERLOAD nodes.
16201 Change calling convention for qualified_lookup_using_namespace.
16202 (build_lang_decl): Don't set in_namespace anymore.
16203 * method.c (typevec_size): New global.
16204 (build_overload_nested_name): Return if global_namespace.
16205 Otherwise, always expect a declaration context.
16206 (build_qualified_name): Likewise.
16207 Make sure we don't write beyond typevec_size.
16208 (build_decl_overload_real): Likewise.
16209 Allocate one extra slot for the namespace.
16210 (hack_identifier): Mark code dead.
16211 Process OVERLOAD and NAMESPACE_DECL nodes.
16212 * parse.y (program): Pop namespaces until in global namespace.
16213 (extdef): In a using-declaration, don't discard the identifier if
16214 there is no declaration.
16215 (left_curly): Ignore type contexts which are namespaces.
16216 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
16218 * pt.c (template_class_depth): Expect types to be namespaces.
16219 (determine_specialization): Simplify by expecting OVERLOAD nodes.
16220 (push_template_decl): Push into namespace level.
16221 Reset ctx if it is a namespace.
16222 Set DECL_CONTEXT to current_namespace if not set already.
16223 Ignore real contexts that are namespaces.
16224 (mangle_class_name_for_template): Skip global_namespace.
16225 Mangle other namespaces as declarations.
16226 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
16227 (lookup_template_class): Push into namespace of context.
16228 If the context is a namespace, set it to global_namespace.
16229 Use id_context for mangling.
16230 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
16231 (tsubst_friend_function): Ignore namespace contexts.
16232 Push into namespace level.
16233 (tsubst): Handle NAMESPACE_DECL nodes.
16234 Remove DECL_CHAIN processing.
16235 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
16236 * ptree.c (print_lang_identifier): Print bindings.
16237 (lang_print_xnode): Print OVERLOAD nodes.
16238 * rtti.c (init_rtti_processing): Push type_info into std.
16239 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
16240 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
16241 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
16242 lookup_fnfields_here): Likewise.
16243 Process all nodes, instead of going through TREE_CHAIN.
16244 * sig.c (build_signature_pointer_or_reference_type): Set context
16245 to global_namespace.
16246 (build_signature_table_constructor): Expect OVERLOAD nodes.
16247 * spew.c (yylex): Save old setting of looking_for_typename.
16248 * tree.c (decl_list_length): Remove.
16249 (binding_init): New function.
16250 (count_functions): Rewrite.
16251 (is_overloaded_fn): Expect OVERLOAD nodes.
16252 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
16253 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
16254 ovl_member): New functions.
16255 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
16256 (type_unknown_p): Likewise.
16257 (require_instantiated_type): Likewise.
16258 (build_component_ref): Declare code dead.
16259 (build_x_function_call): Create and expect OVERLOAD nodes.
16260 (build_function_call_real): Check for ::main only.
16261 (build_unary_op): Likewise. Expect OVERLOAD nodes.
16262 (convert_for_assignment): Check for TREE_LIST before accessing
16264 * decl.c (duplicate_decls): Check for namespace bindings instead
16265 of global bindings.
16266 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
16267 lookup_name_current_level, start_decl, xref_tag,
16268 finish_enum): Likewise.
16269 * init.c (build_offset_ref): Likewise.
16270 * search.c (lookup_field): Likewise.
16271 (lookup_fnfields): Likewise.
16272 (dfs_debug_mark): Likewise.
16273 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
16274 (poplevel_class, pop_from_top_level): Likewise.
16275 * decl2.c (finish_method): Likewise.
16276 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
16277 * decl.c (record_builtin_type): Likewise.
16278 (init_decl_processing, grokfndecl): Likewise.
16279 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
16280 (make_lang_type): Likewise.
16281 * parse.y (make_thunk): Likewise.
16282 * pt.c (tsubst): Likewise.
16283 * tree.c (debug_binfo): Likewise.
16284 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
16285 tinfo2.cc, inc/new.h: Add std qualifications.
16286 * inc/new: Wrap with namespace std if __HONOR_STD.
16287 * inc/typeinfo: Likewise.
16289 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
16291 * call.c (build_user_type_conversion_1): Handle second_conv
16292 properly for templates.
16294 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
16296 * method.c (build_decl_overload_real): Set TREE_USED flag to
16297 zero for build_type_variants nodes as well.
16299 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
16301 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
16303 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
16305 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
16306 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
16307 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
16308 xref.o): Add toplev.h dependencies.
16310 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
16312 * errfn.c (cp_error, cp_warning): Remove declarations for
16313 error and warning respectively.
16315 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16317 * error.c: Convert to using ctype macros defined in system.h.
16318 * method.c: Likewise.
16319 * xref.c: Likewise.
16320 * lex.c: Likewise. Also remove redundant system header stuff.
16322 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
16324 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
16325 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
16326 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
16327 xref.c: Add include of toplev.h.
16329 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
16331 * tree.c (perm_manip): Also regenerate the RTL of an extern.
16332 (copy_to_permanent): Use end_temporary_allocation.
16334 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
16336 * init.c (expand_vec_init): The initialization of each array
16337 element is a full-expression.
16339 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
16341 * method.c (build_mangled_name): Add a call to build_type_variant
16342 to get the right type.
16344 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
16346 * Makefile.in: Add .SUFFIXES.
16348 * cp-tree.def: Remove NAMESPACE_DECL.
16350 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
16352 * call.c (build_over_call): Do evaluate arg even if it has empty
16354 * decl.c (start_function): Don't push a member function.
16356 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
16358 * Makefile.in (g++FAQ.info): Put -o option before input file.
16360 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
16362 * gxxint.texi: Add info for squangling codes K and B.
16364 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
16366 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
16367 the expression in templates.
16368 (finish_stmt_expr): Likewise.
16370 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
16372 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
16374 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
16376 * decl.c (maybe_push_to_top_level): Always clear
16377 current_template_parms and processing_template_decl.
16378 (pushtag): Remove check of current_class_type and some comments,
16379 since maybe_push_to_top_level no longer creates confusion.
16381 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
16383 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
16384 (DECL_CLASS_TEMPLATE_P): Likewise.
16385 (DECL_PRIMARY_TEMPLATE): Likewise.
16386 (PRIMARY_TEMPLATE_P): Use it.
16387 (push_template_decl_real): New function.
16388 (redeclare_class_template): Take new template parameters as
16390 (is_specialization_of): New function.
16391 (comp_template_args): Declare.
16392 * decl.c (pushtag): Handle friend template classes.
16393 (xref_tag): Likewise. Use new calling convention for
16394 redeclare_class_template.
16395 * decl2.c (grok_x_components): Handle friend templates.
16396 * friend.c (is_friend): Use is_specialization_of where
16397 appropriate. Deal with friend class templates.
16398 (make_friend_class): Let a class template be friends with itself.
16399 * pt.c (comp_template_args): Remove declaration.
16400 (tsubst_friend_class): New function.
16401 (push_template_decl_real): New function.
16402 (push_template_decl): Use it.
16403 (redeclare_class_template): Adjust for new calling convention.
16404 (comp_template_args): Give it external linkage.
16405 (instantiate_class_type): Use tsubst_friend_class to deal
16406 with friend templates.
16407 * typeck.c (comptypes): Use comp_template_args, rather than
16408 expanding it inline.
16409 * parse.y (component_decl): Handle a nested template type
16410 like other component type declarations.
16412 * pt.c (check_explicit_specialization): Handle overloaded
16413 constructors correctly.
16415 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
16416 (lookup_template_class): Use it.
16418 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
16420 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
16421 * cp-tree.h: Add WRAPPER support.
16422 * call.c (add_candidate): Split out from add_*_candidate fns.
16423 (build_over_call): Take the candidate instead of function and args.
16424 Enforce access control here. Emit overload warnings here.
16425 (add_warning): New fn.
16426 (joust): Add WARN parm. If not set, call add_warning instead of
16427 printing a warning. Re-enable some warnings.
16428 (tourney): Pass it.
16429 (convert_like): Adjust.
16430 (build_new_op): Adjust.
16431 (build_new_function_call): Adjust.
16432 (build_user_type_conversion_1): Adjust.
16433 (USER_CONV_FN): Adjust.
16434 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
16435 build_int_wrapper): New fns.
16437 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
16439 * pt.c (unify): Fix typo in previous change.
16441 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
16443 * error.c (dump_type_real): Declare canonical_name.
16445 * typeck.c (comp_target_types): Fix PMFs.
16447 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
16449 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
16450 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
16453 * pt.c (tsubst): Decrease the template-level of
16454 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
16455 TEMPLATE_PARM_INDEX.
16456 (template_decl_level): New function.
16457 (unify): Make sure to record unifications for template
16458 parameters, even when the parameters exactly match the arguments.
16459 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
16460 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
16461 aren't from the level we're currently working on.
16463 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
16465 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
16467 * decl2.c (check_member_template): Set DECL_IGNORED for member
16468 class templates, too.
16470 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
16472 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16474 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
16476 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
16478 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
16479 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
16480 (init_decl_processing): Handle TI types.
16481 * typeck.c (unsigned_type, signed_type): Handle TI types.
16483 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
16485 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
16486 New local added_libraries. Increment count when add library to
16489 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
16491 * cp-tree.h (type_as_string_real): New function.
16492 * pt.c (mangle_class_name_for_template): Use it.
16493 * error.c (dump_aggr_type): Change prototype.
16494 (dump_type_prefix): Likewise.
16495 (dump_type_suffix): Likewise.
16496 (dump_type_real): Convert from dump_type. If desired, the
16497 "canonica" name of a typedef, i.e., the name of the underlying
16498 type, can be printed.
16499 (dump_type): Call dump_type_real.
16501 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
16503 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
16505 * typeck.c (comp_target_types): Tweak pedantic case.
16506 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
16507 Return -1 or 1 instead of 1 or 2.
16508 (compparms): Remove STRICT handling.
16509 (convert_for_assignment): Fix handling of pmfs.
16511 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
16513 * typeck.c (comp_target_types): Handle references like pointers.
16514 (comp_target_parms): Note that return code from comp_target_types
16515 can be negative to indicate failure.
16517 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16519 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
16520 which requires a working target compiler to build.
16522 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
16524 * tree.c (avoid_overlap): Add prototype.
16526 * spew.c (num_tokens): Add prototype.
16527 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
16529 * search.c (dfs_check_overlap): Add prototype.
16530 (dfs_no_overlap_yet): Likewise.
16532 * pt.c (original_template): Add prototype.
16533 (inline_needs_template_parms): Likewise.
16534 (push_inline_template_parms_recursive): Likewise.
16535 (retrieve_specialization, register_specialization): Likewise.
16536 (print_candidates, reduce_template_parm_level): Likewise.
16537 (build_template_decl, mark_template_parm): Likewise.
16538 (tsubst_friend_function, get_bindings_real): Likewise.
16540 * method.c (start_squangling): Add prototype.
16541 (end_squangling, check_ktype, issue_ktype): Likewise.
16542 (build_overloaded_scope_ref, check_btype): Likewise.
16543 (build_mangled_template_parm_index): Likewise.
16545 * lex.c (init_cpp_parse): Add prototype.
16546 (handle_cp_pragma, handle_sysv_pragma): Likewise.
16547 (reduce_cmp, token_cmp): Likewise.
16549 * except.c (call_eh_info): Add prototype.
16550 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
16551 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
16553 * decl2.c (is_namespace_ancestor): Add prototype.
16554 (namespace_ancestor, add_using_namespace): Likewise.
16555 (ambiguous_decl): Likewise.
16557 * decl.c (indent): Add prototype.
16559 * call.c (add_template_candidate_real): Add prototype.
16561 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
16563 * decl2.c (build_expr_from_tree): Just return a PMF.
16565 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
16567 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
16568 when doing initializations.
16570 * pt.c (unify): Use comptypes to compare type args.
16572 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
16574 * decl.c (duplicate_decls): Fix check for when it's safe to free
16577 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
16580 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
16582 * pt.c (build_template_parm_index): Add prototype.
16584 * search.c (my_tree_cons): Don't clear words outside the
16585 newly allocated node.
16587 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
16589 * lex.c (init_parse): Now returns char* containing the filename.
16591 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
16592 Jeff Law <law@cygnus.com>
16594 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
16597 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16599 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
16601 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
16603 * decl.c (duplicate_decls): Don't warn for redundant decls if
16604 friend: let add_friend take care of it.
16606 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
16608 * sig.c (build_signature_pointer_constructor): Don't set
16609 TREE_HAS_CONSTRUCTOR for a signature pointer.
16610 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
16611 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
16613 * typeck.c (build_unary_op): Only allow taking the address of a
16615 * typeck2.c (digest_init): Simplify.
16616 (store_init_value): Don't pedwarn about using { } for pmfs.
16618 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
16620 * cp-tree.h (start_decl): Update prototype.
16621 * decl.c (start_decl): Like the C version, new parameters
16622 for the attributes. Call cplus_decl_attributes here,
16623 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
16624 (grokdeclarator): Pass NULL for new start_decl arguments.
16625 * pt.c (tsubst_expr): Likewise.
16626 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
16627 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
16628 * lex.c (build_lang_decl): Add lang_name_java.
16629 * class.c (push_lang_context): Add lang_name_java.
16630 * method.c (build_mangled_name): Check for is_java_type.
16632 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
16634 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
16635 * call.c (build_scoped_method_call): Check for TREE_CODE for
16636 VOID_TYPE instead of type == void_type_node.
16637 (build_method_call): Likewise.
16638 * decl.c (lookup_name_real): Likewise.
16639 (grokdeclarator): Likewise.
16640 (start_decl): Likewise.
16641 (grokparms): Likewise.
16642 (start_function): Likewise.
16643 (finish_function): Likewise.
16644 (start_method): Likewise.
16646 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
16648 * lex.c (finput): New variable.
16649 (init_cpp_parse): Renamed from init_parse.
16650 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
16651 (finish_parse): New function.
16652 * cp-tree.h (init_lex, init_parse): Remove declarations.
16654 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
16656 * call.c (build_call): Still evaluate the actual argument.
16657 * class.c (is_empty_class): Update for -fnew-abi.
16659 * decl2.c: -fnew-abi implies -fsquangle.
16661 * method.c (do_build_assign_ref): Don't do anything to copy
16663 (do_build_copy_constructor): Likewise.
16664 * call.c (build_over_call): Likewise.
16666 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
16668 * tree.c (avoid_overlap): Return a value.
16670 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
16672 * method.c (check_btype): Add missing argument to xrealloc.
16673 (check_ktype): Likewise.
16675 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
16677 Implement empty base optimization.
16678 * class.c (finish_struct_1): Add vbase fields earlier. Set
16679 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
16680 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
16681 (types_overlap_p): New fn.
16682 * tree.c (avoid_overlap): New fn.
16683 (build_base_fields): Use it to avoid overlapping empty bases.
16684 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
16686 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
16688 Re-implement allocation of base class subobjects.
16689 * tree.c (unshare_base_binfos): New fn.
16690 (layout_basetypes): Use it. Now handles offsets of both virtual and
16691 non-virtual bases, after layout_type.
16692 (layout_vbasetypes): Remove.
16693 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
16694 (build_vbase_pointer_fields): Split out from old layout_basetypes.
16695 * class.c (finish_base_struct): Lose offset handling code.
16696 Move nonvdtor warning here. Don't mess with t_binfo anymore.
16697 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
16698 * cp-tree.h: Adjust.
16700 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
16702 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
16703 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
16704 * class.c (duplicate_tag_error): Likewise.
16705 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
16706 * tree.c (layout_vbasetypes): Update from layout_record, remove
16707 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
16708 (layout_basetypes): Likewise.
16710 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
16712 * class.c, Make sure system.h is included just after config.h.
16713 Delete lingering stdio and errno references too.
16714 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
16716 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
16718 * friend.c (is_friend): Fix access control for local classes.
16720 * class.c (is_empty_class): New fn.
16721 * call.c (build_call): Don't pass empty class objects to a function.
16723 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
16725 * call.c (build_over_call): Do name resolution for default
16726 arguments of function templates in the scope of the templates.
16728 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
16730 * call.c: Include system.h. Remove includes, declarations and
16731 defines provided by system.h.
16732 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
16733 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
16734 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
16735 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
16736 * typeck2.c, xref.c: Likewise.
16737 * Makefile.in: Dependencies updated as appropriate.
16738 * Make-lang.in: Likewise.
16740 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
16742 * pt.c (fn_type_unification): Allow incomplete unification without
16743 an immediate error message.
16745 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
16747 * tree.c (member_p): New fn.
16748 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
16749 initializing class members.
16751 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
16752 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
16754 * call.c (build_method_call): Handle non-scoped destructors, too.
16755 * pt.c (tsubst_copy): Likewise.
16757 * pt.c (print_template_context): Split out...
16758 (push_tinst_level): ...from here.
16760 * friend.c (is_friend): Don't pass a type to decl_function_context.
16762 * typeck.c (convert_for_initialization): Always hand off
16763 conversions to class type.
16765 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
16767 * friend.c (is_friend): Local classes have the same access as the
16768 enclosing function.
16770 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
16772 * typeck.c (expand_target_expr): Delete dead function.
16774 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
16776 * repo.c (save_string): Delete dead function.
16778 * method.c (thunk_printable_name): Delete dead function.
16780 * lex.c (yynextch): Delete dead function.
16782 * expr.c (tree_extract_aggr_init): #if 0 out.
16784 * except.c (do_unwind): Delete dead function.
16785 (easy_expand_asm): Likewise.
16787 * cvt.c (build_conversion_type_1): Delete dead function.
16789 * cp-tree.h (push_expression_obstack): Declare.
16791 * call.c (source_type): #if 0 out.
16793 * class.c (alter_access): Remove unused label. Add braces
16794 around empty else clause.
16796 * lex.c (yyprint): Fix argument to printf.
16798 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
16800 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
16802 * pt.c (instantiate_class_template): Make sure template
16803 arguments are permanent.
16804 * init.c (resolve_offset_ref): Don't go looking around in
16807 * semantics.c: Add routines to handle expressions, and some
16808 declaration processing.
16809 * parse.y: Use them.
16810 (current_class_depth): Move declaration to cp-tree.h.
16811 * parse.c: Regenerated.
16812 * cp-tree.h: Use them.
16813 (current_class_depth): Declare.
16814 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
16816 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
16818 * error.c (dump_decl): Be a bit more explicit with template
16819 type arguments, when verbose.
16821 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
16823 * inc/exception: Reorder closing braces.
16825 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
16827 * pt.c (redeclare_class_template): New function.
16828 * cp_tree.h (redeclare_class_template): Declare it.
16829 * decl.c (xref_tag): Use it.
16831 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
16833 * call.c (build_over_call): Check IS_AGGR_TYPE, not
16834 TYPE_LANG_SPECIFIC.
16835 * typeck.c (convert_arguments): Likewise.
16837 * decl.c (grokdeclarator): Remove const and volatile from type after
16838 setting constp and volatilep.
16840 * class.c (finish_struct_1): Don't warn about bool bitfield larger
16843 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
16845 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
16847 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
16849 * call.c (build_object_call): Complain about ambiguous operator(),
16850 rather that crashing.
16851 (build_new_op): Likewise.
16852 (build_op_delete_call): Likewise.
16854 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
16856 * cvt.c (perform_qualification_conversions): Use comp_target_types
16857 instead of comp_ptr_ttypes.
16859 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
16861 * cp-tree.h (enforce_access): Declare.
16862 * call.c (enforce_access): Make it extern, not static.
16863 * class.c (alter_access): Use enforce_access; modify code for ISO
16864 compliance, rather than ARM rules.
16866 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16868 * cp-tree.h: Fix typo.
16870 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
16872 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
16873 if (aggregate_value_p (type)).
16875 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
16877 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
16879 * tree.c (mapcar): When dealing with a DECL, use it's constant
16881 * pt.c (lookup_template_class): Don't mangle the names of template
16882 classes whose arguments are unknown.
16884 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
16886 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
16888 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
16890 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
16892 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
16893 boolean_type_node to 1.
16895 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
16897 * error.c (dump_expr): Remove unused variable `l'.
16899 * pt.c (for_each_template_parm): New function, created by
16900 converting uses_template_parms.
16901 (tree_fn_t): New typedef.
16902 (uses_template_parms): Use it.
16903 (mark_template_parm): New function.
16904 (push_template_decl): Check that the argument list of a partial
16905 specialization uses all the template parameters.
16907 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
16908 with it; we might want it for debugging.
16909 * cp-tree.h (type_unification): Change interface.
16910 * class.c (finish_struct_1): Skip nested template types, just like
16911 ordinary nested types.
16912 (instantiate_type): Use new interface to type_unification.
16913 * lex.c (init_lex): Add __sz as opname for sizeof.
16914 * method.c (build_overload_scope_ref): New function.
16915 (build_overload_int): Handle complex expressions. Set
16916 numeric_output_need_bar if necessary.
16917 (build_overload_value): Handle non-PARM_DECL nodes; this
16918 routine is now used by build_overload_int. Remove some
16919 assignments to numeric_output_need_bar. Use
16920 build_overload_scope_ref.
16921 (build_qualified_name): Note that some template mangled names end
16922 with digits, and set numeric_output_need_bar appropriately. Use
16923 build_underscore_int.
16924 * pt.c (unify): Change interface.
16925 (type_unification_real): Likewise.
16926 (determine_specialization): Use new interfaces.
16927 (tsubst): Deal gracefully with situations in which the argument
16928 vector is not fully filled.
16929 (fn_type_unification): Use new interfaces.
16930 (type_unification): Likewise. Remove NOP_EXPR hack.
16931 (type_unification_real): Likewise.
16932 (unify): Likewise. Deal with unification of complex expressions.
16934 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
16936 * pt.c (complete_template_args): Initialize skip properly.
16938 * decl.c (make_typename_type): Revert.
16939 (make_implicit_typename): Remove.
16940 (lookup_name_real): Don't call it. Call lookup_field if we see a
16941 TYPE_DECL from a template base.
16942 * search.c (lookup_field): Do implicit typename stuff.
16944 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
16945 Geoff Noer <noer@cygnus.com>
16947 * Makefile.in: Various fixes for building cygwin32 native toolchains.
16948 * Make-lang.in: Likewise.
16950 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16952 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
16954 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
16956 * decl.c (make_implicit_typename): Rewrite removed code.
16957 (make_typename_type): Call it if the type we look up comes from
16958 a base that uses template parms.
16960 * pt.c (complete_template_args): Rewrite.
16961 (tsubst, FUNCTION_DECL): Use it.
16963 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
16965 * semantics.c (finish_asm_stmt): Fix combine strings. Call
16966 c_expand_asm_operands () if output_operands, input_operands or
16967 clobbers is not NULL_TREE.
16969 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16971 * pt.c (complete_template_args): New function.
16972 (get_bindings): Deal with specializations of function templates
16973 with return type containing parameters from outer class
16975 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
16976 substitute arguments and compose a new type.
16978 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
16980 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
16983 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
16985 * decl.c (make_implicit_typename): Lose useless code.
16987 * call.c (standard_conversion): Handle A* -> const A* properly.
16989 * pt.c (get_bindings_real): Rename from get_bindings. Add
16990 check_rettype parm.
16991 (get_bindings): Pass 1.
16992 (get_bindings_overload): Pass 0.
16994 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
16996 * pt.c (check_explicit_specialization): When reverting a static
16997 member function, also remove the `this' parameter from
16998 last_function_parms.
17000 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
17002 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
17003 a function context.
17005 * decl.c (store_bindings): Use free_binding_vecs.
17006 (pop_from_top_level): Likewise.
17008 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
17010 * decl.c (make_implicit_typename): Only change the type of a
17013 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
17015 * semantics.c: New file, containing routines to perform the
17016 semantic phase of parsing.
17018 * pt.c (tsubst_expr): Likewise.
17019 * cp-tree.h: Declare the various functions in semantics.c.
17020 Provide macros to access _STMT tree nodes.
17021 * cp-tree.def: Add ASM_STMT tree node.
17022 * Makefile.in, Make-lang.in: Add dependencies on and for
17025 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
17027 * pt.c (push_template_decl): Only check primary templates.
17029 * pt.c (check_explicit_specialization): Complain about default args
17030 in explicit specialization.
17032 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
17033 constructor_declarator.
17035 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
17037 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
17038 has no overloaded operator ->.
17040 * call.c (build_field_call): Don't crash when presented with a
17041 field that is actually a nested type.
17043 * decl.c (pushtag): Deal with friend class injection in local
17046 * call.c (build_object_call): Don't crash if OBJ is a
17047 pointer-to-member-function.
17049 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
17051 * pt.c (push_template_decl): Complain about template with C linkage,
17052 anonymous template class.
17054 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
17056 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
17057 * search.c: Likewise.
17059 * lex.c (do_pending_defargs): Only call
17060 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
17062 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
17064 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
17066 * parse.y: Deal with CONSTRUCTORS in new_initializers.
17068 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
17070 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
17071 closely mimics the behavior in parse.y.
17072 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
17073 into a compound statement.
17075 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
17077 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
17078 * pt.c (inline_needs_template_parms): New fn.
17079 (original_template): New fn.
17080 (push_inline_template_parms_recursive): New fn.
17081 (maybe_begin_member_template_processing): Use them.
17082 (maybe_end_member_template_processing): Likewise.
17083 (is_member_or_friend_template): Rename to is_member_template.
17084 Member functions of local classes are never member templates.
17086 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17088 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
17089 added in the class scope to catch redefinition error.
17091 * pt.c (reduce_template_parm_level): Also copy
17092 the DECL_TEMPLATE_PARMS field.
17094 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
17096 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
17097 reduced-level template type parameter.
17099 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
17101 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
17102 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
17103 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
17104 * decl.c (duplicate_decls): Propagate it.
17105 * typeck2.c (abstract_virtuals_error): Use two loops to emit
17106 abstract virtual functions and virtual functions which need a
17107 final overrider separately.
17109 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
17111 * lang-specs.h: Properly put brackets around array elements in
17114 * typeck.c (build_binary_op_nodefault): Correctly place parens around
17115 && and || in expression.
17117 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
17119 * call.c (default_parm_conversions): Remove prototype definition.
17120 (build_method_call): Remove unused variable result.
17122 * cvt.c (ocp_convert): Remove unused variable conversion.
17124 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
17126 * except.c (do_unwind): #if 0 definition of unused variables fcall
17129 * expr.c (extract_scalar_init): #if 0 prototype and function
17132 * init.c (expand_aggr_init_1): Remove unused variable init_type.
17133 (build_new_1): Remove unused variable t.
17135 * pt.c (instantiate_class_template): Remove unused variable newtag;
17136 cast called function return value to void.
17137 (do_decl_instantiation): Remove unused variables name and fn.
17139 * tree.c (get_type_decl): Add default return to shut up compiler from
17140 complaining control reaches end of non-void function.
17142 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
17144 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
17146 * call.c (default_parm_conversions): Remove prototype definition.
17147 (build_method_call): Remove unused variable result.
17148 (build_over_call): Add default case in enumeration switch.
17150 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
17152 * decl2.c (lang_decode_option): Change j's type to size_t.
17154 * tree.c (layout_vbasetypes): record_align and desired_align are of
17155 type unsigned int; const_size and nonvirtual_const_size likewise.
17157 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
17159 * parse.y (new_initializer): Make sure all initializers are
17162 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
17164 * decl2.c (import_export_decl): Mark tinfo functions for
17165 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
17167 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
17169 * method.c: Fix typo.
17171 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17173 * method.c: Include "system.h" to get stdlib.h, stdio.h,
17174 ctype.h, string.h, etc.
17175 (issue_nrepeats): Add default case in enumeration switch.
17176 (check_btype): Likewise.
17177 (process_overload_item): Likewise.
17179 * Makefile.in (method.o): Depend on system.h.
17181 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
17183 * lex.c (do_scoped_id): Fix parenthesizing.
17185 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
17187 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
17188 FLAG_RTTI is unset, initialize type info machinery and continue
17189 with FLAG_RTTI enabled.
17190 (get_typeid): Likewise.
17192 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
17194 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
17197 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
17199 * pt.c (finish_member_template_decl): Deal more gracefully with
17200 invalid declarations.
17202 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
17204 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
17205 cp-tree.h: Clean up more old overloading code, old RTTI code, and
17206 some formatting quirks.
17208 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
17209 method.c, pt.c, ptree.c, typeck.c: Remove support for
17210 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
17212 * Makefile.in: Adjust.
17214 * pt.c (unify): Don't allow reduced cv-quals when strict.
17216 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
17217 *type_unification* and unify.
17219 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
17221 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
17222 (nested_name_specifier): And add it before this use.
17223 (typename_sub0): And this use. Also add use without the keyword.
17224 (typename_sub1): Likewise.
17225 * pt.c (instantiate_class_template): Don't actually instantiate
17226 anything if our type uses template parms.
17228 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
17230 * decl.c (start_function): Don't call temporary_allocation for a
17233 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
17235 * pt.c (instantiate_class_template): Don't mess with friends if
17236 our type uses template parms.
17238 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
17240 * parse.y (nested_name_specifier): Use explicit_template_type.
17241 (typename_sub): Allow a template_type, an explicit_template_type,
17242 or an implicit template type at the end.
17243 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
17244 * decl.c (make_typename_type): Handle template-id where the name
17245 is a TEMPLATE_DECL.
17246 * call.c (build_scoped_method_call): Handle member template
17248 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
17249 destructor is represented by the type.
17251 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
17252 * parse.y (nested_name_specifier): Add 'template' case.
17253 (explicit_template_type): New rule.
17254 (typename_sub): Use it.
17255 * decl.c (make_typename_type): Handle getting a template-id for NAME.
17256 * pt.c (tsubst): Likewise.
17258 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
17260 * pt.c (add_to_template_args): Fix thinko.
17261 (instantiate_class_template): Call it later.
17263 * pt.c (get_class_bindings): Add outer_args parm.
17264 (most_specialized_class): Likewise.
17265 (instantiate_class_template): Pass it.
17266 (more_specialized_class): Likewise.
17267 (lookup_template_class): Get context from template if none
17269 (finish_member_template_decl): Don't do anything with a
17270 partial specialization.
17271 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
17273 * class.c (finish_struct): Member class templates have already been
17274 checked for name clashes.
17275 * decl.c (pushdecl_with_scope): Handle pushing at class level.
17277 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
17279 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
17280 (tsubst, *_PARM): Support multiple levels of template classes.
17281 (instantiate_class_template): Look up the pattern from the
17283 (lookup_template_class): Handle getting a template for d1.
17284 (push_template_decl): Correct setting of 'primary'.
17285 (reduce_template_parm_level): Add 'levels' parm.
17286 (finish_member_template_decl): Support member class templates.
17287 (template_class_depth): Handle multiple levels.
17288 * parse.y (component_decl_1, fn.def2): Remove member template case.
17289 (component_decl): Add member template cases.
17290 * decl2.c (check_member_template): We now handle member template
17292 * decl.c (pushtag): Handle member templates.
17293 * method.c (do_inline_function_hair): Don't touch
17294 IDENTIFIER_GLOBAL_VALUE.
17295 * init.c (build_offset_ref): If name isn't an identifier, just
17297 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
17299 * typeck.c (get_delta_difference): Do adjust for conversions to
17300 and from virtual base.
17302 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
17304 * typeck.c (get_delta_difference): Give hard error for conversion
17307 * cp-tree.h: Tweak formatting.
17309 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
17311 * decl.c (push_namespace): Handle redeclaration error.
17313 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
17314 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
17315 (NAMESPACE_BINDING): New macro.
17316 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
17319 * pt.c (push_template_decl): Use innermost_args.
17321 * decl.c (get_unique_name): Tweak from earlier in the name.
17323 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
17325 * cp-tree.def: Add CPLUS_BINDING node.
17326 * cp-tree.h (tree_binding): New struct.
17327 (BINDING_SCOPE, BINDING_VALUE): New macros.
17328 (current_namespace, global_namespace): Declare extern.
17329 (struct lang_decl_flags): New field in_namespace.
17330 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
17331 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
17332 (TREE_INDIRECT_USING): New macro.
17333 * decl2.c (current_namespace, global_namespace): Declare. The
17334 value is a NAMESPACE_DECL now, not a TREE_LIST.
17335 (is_namespace_ancestor, namespace_ancestor): New static functions.
17336 (add_using_namespace, ambiguous_decl): Likewise.
17337 (lookup_using_namespace): New support function for lookup_name.
17338 (qualified_lookup_using_namespace): New support function for
17339 do_scoped_id and lookup_namespace_name.
17340 (get_namespace_id): Mark as obsolete.
17341 (current_namespace_id): Likewise.
17342 (do_namespace_alias): Implement.
17343 (do_using_directive): Implement as call to add_using_namespace.
17344 * decl.c (binding_for_name): New function.
17345 (push_namespace, pop_namespace): Implement.
17346 (push_decl): Don't install a FUNCTION_DECL in the global branch.
17347 (lookup_namespace_name): Implement using qualified lookup.
17348 (lookup_name_real): For global scoping, lookup in
17349 global_namespace. For namespace scoping, lookup in given
17350 namespace. For unscoped lookup, iterate over namespace,
17351 considering using directives.
17352 (init_decl_processing): Initialize global_namespace.
17353 (grokvardecl): Build assembler name as static name for globals.
17354 (grokdeclarator): Remove old namespace mangling.
17355 (xref_tag): When installing a global binding for the
17356 tag, make sure we have an identifier.
17357 * method.c (build_overload_nested_name): Mangle namespaces.
17358 (build_qualified_name): Likewise.
17359 (build_decl_overload_real): Likewise.
17360 * lex.c (build_lang_decl): Set namespace for new declaration to
17362 (do_scoped_id): Find global names in global or current
17363 namespace, or using qualified namespace lookup, depending on
17365 * init.c (build_member_call): When scope is namespace, use
17366 build_x_function_call instead.
17367 (build_offset_ref): When scope is namespace, collapse processing
17368 to lookup_namespace_name instead.
17369 * error.c (dump_decl): Support NAMESPACE_DECL.
17370 * decl.c (pushdecl): Bind globals to current namespace.
17371 (push_overloaded_decl): Likewise.
17372 (lookup_tag): Likewise.
17373 (lookup_name_current_level): Likewise.
17374 (xref_tag): Likewise.
17375 (start_function): Likewise.
17376 * lex.c (do_identifier): Likewise.
17377 (identifier_typedecl_value): Likewise.
17378 (real_yylex): Likewise.
17379 * method.c (do_inline_function_hair): Likewise.
17380 * parse.y (unscoped): Likewise.
17381 * pt.c (check_explicit_specialization): Likewise.
17382 (lookup_template_class): Likewise.
17383 * rtti.c (call_void_fn): Likewise.
17384 * sig.c (build_sigtable): Likewise.
17385 * ptree.c (lang_print_xnode): New function.
17387 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
17389 * pt.c (instantiate_class_template): Don't instantiate if pedantic
17390 and the args use template parms.
17392 * pt.c (push_tinst_level): If the instantiation uses template parms,
17394 * decl.c (xref_basetypes): Do call complete_type for basetypes
17395 that involve template parameters.
17397 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
17399 * typeck2.c (process_init_constructor): Fix labeled init check.
17401 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
17403 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
17404 argument to tsubst and friends.
17406 * pt.c (tsubst, FUNCTION_DECL): Tidy.
17408 * typeck.c (build_x_function_call): Handle static member function
17409 templates like non-templates. Handle friend templates like normal
17410 function templates.
17411 * pt.c (tsubst, *_PARM): Don't use orig_level.
17412 (get_bindings): Don't call add_to_template_args.
17413 (instantiate_template): Likewise.
17414 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
17415 * ptree.c (print_lang_type): Print index/level for template parms.
17417 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
17419 * Make-lang.in (cc1plus): Note that cc1plus depends on
17420 cp/cp-tree.h and cp/cp-tree.def.
17422 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
17423 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
17424 position in a template parameter list.
17425 * cp-tree.h (template_parm_index): New structure, used as the tree
17426 structure for a TEMPLATE_PARM_INDEX.
17427 (TEMPLATE_PARM_IDX): New macro.
17428 (TEMPLATE_PARM_LEVEL): Likewise.
17429 (TEMPLATE_PARM_DESCENDANTS): Likewise.
17430 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
17431 (TEMPLATE_PARM_DECL): Likewise.
17432 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
17433 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
17434 (TEMPLATE_TYPE_DECL): Likewise.
17435 (TEMPLATE_CONST_IDX): Remove.
17436 (TEMPLATE_CONST_LEVEL): Likewise.
17437 (TEMPLATE_CONST_SET_INFO): Likewise.
17438 (TEMPLATE_TYPE_SET_INFO): Likewise.
17439 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
17441 (TEMPLATE_TYPE_LEVEL): Likewise.
17442 * decl.c (decls_match): Call comp_template_parms, rather than
17443 expanding it inline.
17444 (duplicate_decls): If two template declarations are being merged,
17445 then their TEMPLATE_INFOs should be merged as well.
17446 (grokfndecl): Save template-id information when declaring a friend
17447 with explicit template arguments. Pass arguments to
17448 check_explicit_specialization via correct convention; at some
17449 point check_explicit_specialization changed, but these call-sites
17451 (grokdeclarator): Tidy up slightly.
17452 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
17453 two template functions with the same DECL_ASSEMBLER_NAME the same,
17454 since the names are not yet mangled.
17455 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
17456 TEMPLATE_CONST_PARM.
17457 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
17458 decl for a non-type parameter, rather than printing `<tparm ...>'.
17459 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
17460 (do_friend): Deal with template friends.
17461 * lex.c (do_pending_inlines): Call
17462 maybe_begin_member_template_processing, rather than
17463 conditionally calling begin_member_template_processing.
17464 (process_next_inline): Likewise. Call
17465 maybe_end_member_template_processing, rather than
17466 conditionally calling end_member_template_processing.
17467 (do_pending_defargs): Likewise.
17468 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
17469 TEMPLATE_CONST_PARM.
17470 * method.c (build_mangled_template_parm_index): New function.
17471 (build_overload_value): Use it.
17472 (build_overload_name): Likewise.
17473 * pt.c (finish_member_template_decl): Allow friend declarations.
17474 (template_class_depth): New function.
17475 (is_member_template): Rename, and modify, to become...
17476 (is_member_or_friend_template): New function.
17477 (end_member_template_processing): Rename, and modify, to become...
17478 (maybe_end_member_template_processing).
17479 (build_template_parm_index): New function.
17480 (reduce_template_parm_level): New function.
17481 (process_template_parm): Modify to use build_template_parm_index.
17482 (push_template_decl): Deal with friend templates.
17483 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
17484 TEMPLATE_CONST_PARM.
17485 (tsubst_friend_function): New function.
17486 (instantiate_class_template): Generate the DECL_FRIENDLIST
17487 for a new instantiation by using tsubst_friend_function rather
17489 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
17490 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
17491 appropriate new macros. Use reduce_template_parm_level to
17492 generate lower-level template parameters. Handle tsubst'ing into
17493 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
17494 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
17495 templates. Similarly for the template parameters for a new
17497 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
17498 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
17499 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
17500 (get_bindings): Call add_to_template_args if necessary.
17501 (instantiate_decl): Handle instantiations of friend templates.
17502 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
17503 TEMPLATE_TYPE_PARM as a list of fields; it's not!
17504 * spew.c (yylex): Do a little manual constant propagation to
17507 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
17509 * error.c: Include sys/types.h.
17511 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
17513 * method.c (build_mangled_name): Start CPP directives in column zero.
17515 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
17517 * typeck2.c (process_init_constructor): Sorry about non-trivial
17518 labeled initializers.
17519 * parse.y (initlist): Re-enable labeled initializers.
17521 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17523 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
17524 all callers changed. Rely on the new parameter instead of arg
17525 being a TREE_LIST when determine whether we are working inside
17526 template template parameter. Clean up is_type test.
17528 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
17530 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
17531 * typeck2.c (initializer_constant_valid_p): Allow conversions
17532 between pointers and references.
17534 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
17536 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
17537 if pedantic || warn_pointer_arith.
17539 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17541 * pt.c (unify): Handle TEMPLATE_DECL.
17543 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
17545 * cp-tree.h (strip_attrs): Remove decl.
17547 1998-02-18 Doug Evans <devans@cygnus.com>
17549 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
17550 Update olddecl's attributes too.
17551 (strip_attrs): Remove function.
17552 * typeck.c (common_type): Call merge_machine_type_attributes.
17554 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
17556 * parse.y (initdcl0_innards): New grammar symbol.
17557 (nomods_initdecls, nomods_initdcl0): Change type from itype to
17558 none, since the resulting value is never used.
17559 (parse_decl): New function.
17560 (datadef): Remove redundant actions.
17561 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
17562 * parse.c: Regenerated.
17564 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
17566 * parse.y (simple_stmt): Use getdecls() to check for decl.
17568 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
17570 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
17572 (c++.install-common): Install c++filt properly as native or as cross
17574 (c++.uninstall): Add c++filt.
17576 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
17578 * call.c (standard_conversion): Fix multi-level ptr conversions.
17580 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
17582 * init.c (build_new): Propagate error_mark_node up.
17584 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
17586 * parse.y (simple_stmt): If the condition isn't a declaration,
17587 start the controlled block after the test.
17589 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
17591 * call.c (build_over_call): Convert builtin abs, labs and fabs to
17593 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
17596 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
17598 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
17600 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
17602 * cp-tree.h: Add access_protected_virtual_node.
17603 * class.c (init_class_processing): Initialize it.
17604 * decl.c (xref_basetypes): Use it.
17605 * parse.y (base_class_access_list): Likewise.
17607 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
17608 (c++.install-common): Install c++filt.
17610 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17612 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
17614 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
17616 * call.c (reference_binding): Use comptypes when comparing
17617 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
17619 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
17621 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
17622 (really_overloaded_fn): Move check here from is_overloaded_fn.
17623 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
17625 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
17627 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
17630 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
17632 * cp-tree.h (push_template_decl): Return the decl passed in, or an
17633 equivalent duplicate.
17634 * decl.c (pushtag): Use the return value from push_template_decl.
17635 (duplicate_decls): When duplicating a template declaration, merge
17636 the DECL_TEMPLATE_RESULTs as well.
17637 (make_implicit_typename): Don't try to dive into typename types to
17638 find a context for making a new implicit typename.
17639 (start_decl): Use the return value from push_template_decl.
17640 (grokdeclarator): Complain about declarations list `const operator
17641 int'. Since we don't correctly handle in-class initializations of
17642 non-static data members, complain about this (now illegal)
17643 practice. Issue an error for initializations of non-const statics
17644 since that is illegal as well, and since we don't handle that case
17646 (start_function): Use the return value from push_template_decl.
17647 (start_method): Likewise.
17648 * decl2.c (grokfield): Likewise. Since the change to
17649 grokdeclarator ensures that all initialized fields are in fact
17650 static, remove a redundant test for TREE_PUBLIC.
17651 * parse.y (initlist): Disable labeled initializers since they do
17652 not work as per the documentation, and since they do not use the
17653 same syntax as the C front end.
17654 * pt.c (push_template_decl): Return the decl passed in, or an
17655 equivalent duplicate.
17656 (lookup_template_class): When searching in a nested context,
17657 use the right arguments.
17658 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
17659 * typeck.c (build_component_ref): Assign the correct type to the
17660 result of build_vfn_ref.
17662 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
17664 * pt.c (convert_nontype_argument): Fix typo.
17665 (check_explicit_specialization): Allow old-style specialization
17666 of class template members.
17668 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
17669 Manfred Hollstein <manfred@s-direktnet.de>
17671 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
17672 when deciding to override DECL_ASSEMBLER_NAME.
17674 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
17676 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
17677 * cp-tree.h (flag_do_squangling): Add declaration.
17678 * lang-options.h: Add -fsquangle and -fno-squangle.
17679 * method.c: Add macros and static variables for squangling.
17680 (build_overload_name): Rename to build_mangled_name, add logic for B
17681 compression, and split into process_modifiers and
17682 process_overload_item.
17683 (process_modifiers): New function, to handle constant, reference,
17685 (process_overload_item): New function, handles issue of type codes.
17686 (build_overload_name): New function, start squangling and call
17687 build_mangled_name.
17688 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
17689 (start_squangling): New function to initialize squangling structs.
17690 (end_squangling): New function to destroy squangling structs.
17691 (nrepeats): Rename variable to Nrepeats.
17692 (issue_nrepeats): New function for issuing 'n' type repeats.
17693 (check_ktype): New function to check for type K name compression.
17694 (build_overload_nested_name): Add a check for K name compression.
17695 (build_qualified_name): Add a check for K name compression and don't
17696 use DECL_ASSEMBLER_NAME when squangling is on.
17697 (check_btype): New function, checks for B type compression.
17698 (build_static_name, build_decl_overload_real): Initiate squangling.
17699 (build_typename_overload, build_overload_with_type): Initiate
17702 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
17704 * method.c (make_thunk): Avoid name buffer overflow.
17706 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
17708 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
17709 don't define them yet.
17711 * parse.y (nomods_initdcl0): Add constructor_declarator case.
17713 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17715 * config-lang.in (diff_excludes): Use basename only.
17717 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
17719 * tinfo2.cc: Add tinfo for signed char.
17721 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
17723 * search.c (compute_access): Handle protected constructors in derived
17724 classes as accessible.
17726 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
17728 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
17729 Call convert_from_reference sooner.
17731 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
17733 * cvt.c (ocp_convert): Obtain the constant values from constant
17734 decls even if the destination type is the same as the type of the
17737 * decl2.c (finish_file): Make sure that static inlines with
17738 definitions are not marked DECL_EXTERNAL before returning.
17740 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
17742 * decl.c: Lose arg_looking_for_template.
17743 (lookup_name_real): Likewise.
17744 * parse.y: Lose processing_template_arg, template_arg1.
17745 (primary): Likewise.
17746 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
17748 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17750 * error.c (dump_decl): Fix type of default arguments for template
17751 template parameters and nontype template parameters.
17752 * parse.y (template_parm): Handle invalid default template
17753 template arguments here.
17755 * parse.y (template_parm): Use template_arg instead of PTYPENAME
17756 for default template template argument.
17757 * pt.c (coerce_template_parms): Merge default template argument
17758 codes. Can treat RECORD_TYPE as template name if it is implicitly
17759 created. Fix argument index in error message.
17760 * typeck.c (comptypes): Merge template argument comparison codes in
17761 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
17763 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
17765 * lex.c (file_name_nondirectory): Also check for '/'.
17767 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
17769 * parse.y (primary): Deal with statement-expressions in
17771 * pt.c (tsubst_copy): Handle BIND_EXPR.
17772 * tree.c (mapcar): Likewise.
17774 * call.c (add_template_candidate_real): Pass extra parameter to
17775 fn_type_unification.
17776 * cp-tree.h (fn_type_unification): Add parameter.
17777 * pt.c (fn_type_unification): Add additional parameter to deal with
17778 static member functions.
17779 (get_bindings): Deal with static member functions.
17781 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
17782 (revert_static_member_fn): Declare.
17783 * decl.c (revert_static_member_fn): Remove declaration. Change
17784 linkage from internal to external.
17785 (cp_finish_decl): Deal with virtual functions in classes local to
17786 template functions.
17787 * decl2.c (finish_file): Don't forget to emit increment/decrement
17788 expressions in initializers for file-scope variables.
17789 * parse.y (typename_sub2): If the typename doesn't names a
17790 template, rather than a type, issue an error message.
17791 * pt.c (check_explicit_specialization): Handle specializations of
17792 static member functions.
17793 (coerce_template_parms): Handle offset references to lists of
17795 * search.c (note_debug_info_needed): Don't crash when handed a
17796 type which is being defined.
17797 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
17798 that can happen with some illegal code.
17800 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17802 * call.c (user_harshness): Initialize `code' to 0.
17803 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
17804 (null_ptr_cst_p): Add parentheses around && within ||.
17805 (standard_conversion): Likewise.
17806 (z_candidate): Likewise.
17807 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
17808 (build_object_call): Likewise for `mem_args'.
17809 (build_new_op): Likewise for `mem_arglist'. Add `return' from
17810 default case in enumeration switch.
17812 * class.c (build_vtable_entry): Add explicit braces to avoid
17814 (build_class_init_list): Likewise.
17815 (finish_struct_1): Initialize `width' to 0.
17816 (instantiate_type): Initialize `name' to NULL_TREE. Add
17817 explicit braces to avoid ambiguous `else'.
17819 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
17822 * decl.c (grok_reference_init): Eliminate unused parameter, all
17824 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
17825 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
17826 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
17827 (grokdeclarator): Add parentheses around && within ||. Add
17828 explicit braces to avoid ambiguous `else'.
17829 (grokparms): Initialize `type' to NULL_TREE.
17830 (xref_tag): Remove unused label `just_return'.
17831 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
17832 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
17833 (hack_incomplete_structures): Add parentheses around assignment
17834 used as truth value.
17836 * decl2.c (coerce_delete_type): Hide definition of `e3'.
17838 * error.c: Include <stdlib.h>.
17839 (dump_expr): Change the type of `i' to size_t. Remove unused
17842 * except.c (init_exception_processing): Remove unused variable `d'.
17843 (expand_throw): Likewise for `label'.
17845 * friend.c (add_friends): Add explicit braces to avoid ambiguous
17848 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
17849 (sort_base_init): Likewise for `binfo'.
17850 (expand_member_init): Likewise for `rval'.
17851 (build_member_call): Add parentheses around assignment used as
17853 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
17854 (build_new): Initialize `nelts' to NULL_TREE. Initialize
17855 `old_immediate_size_expand' to 0.
17856 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
17857 (build_vec_delete_1): Remove unused variable `block'.
17858 (expand_vec_init): Initialize `itype' to NULL_TREE.
17860 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
17861 declaration of `index' and `rindex' with autoconf macros.
17862 (reinit_parse_for_expr): Remove unused variables
17863 `look_for_semicolon' and `look_for_lbrac'.
17864 (cons_up_default_function): Initialize `args' to NULL_TREE.
17865 (readescape): Initialize `firstdig' to 0.
17866 (real_yylex): Add parentheses around assignment used as truth value.
17868 * method.c: Include <strings.h> if we don't have <string.h>.
17869 Protect declaration of `index' with autoconf macro.
17871 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
17872 Initialize `type' to NULL_TREE.
17873 (structsp): Remove unused variable `id'.
17875 * pt.c (coerce_template_parms): Add explicit braces to avoid
17877 (lookup_template_class): Initialize `template' to NULL_TREE.
17878 (instantiate_class_template): Remove unused variable `name' and `e'.
17879 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
17880 (do_poplevel): Initialize `saved_warn_unused' to 0.
17881 (type_unification): Remove unused varable `parm'.
17882 (unify): Likewise for `j'.
17884 * repo.c (init_repo): Add parentheses around assignment used as
17886 (finish_repo): Remove unused varable `p'.
17888 * search.c (get_binfo): Initialize `type' to NULL_TREE.
17889 (get_base_distance): Likewise.
17890 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
17891 and `new_v' to NULL_TREE.
17892 (lookup_fnfields): Likewise for `rval_binfo_h'.
17893 (breadth_first_search): Add parentheses around assignment used as
17895 (get_template_base): Initialize `type' to NULL_TREE.
17897 * sig.c (append_signature_fields): Initialize `last_mfptr' to
17899 (build_signature_table_constructor): Likewise for
17900 `last_rhs_field', `pfn' and `vt_off'.
17901 (build_sigtable): Likewise for `init'.
17903 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
17904 (propagate_binfo_offsets): Likewise for `delta'.
17905 (hash_tree_cons): Initialize hashcode to 0.
17906 (can_free): Likewise for `size'.
17907 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
17909 * typeck.c (convert_sequence): Hide prototype.
17910 (common_type): Add explicit braces to avoid ambiguous `else'.
17911 (comp_target_types): Likewise.
17912 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
17913 (build_function_call_real): Add explicit braces to avoid ambiguous
17915 (convert_arguments): Initialize `called_thing' to 0.
17916 (convert_for_initialization): Initialize `savew' and `savee' to 0.
17918 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
17919 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
17920 (build_x_arrow): Likewise for `last_rval'.
17922 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
17924 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
17926 * decl.c (init_decl_processing): Use set_sizetype.
17927 * decl2.c (sizetype): Don't declare.
17928 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
17929 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
17930 (build_component_addr, unary_complex_lvalue): Likewise.
17931 * rtti.c (expand_class_desc): Likewise.
17932 * class.c (get_vfield_offset): Likewise.
17934 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
17936 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
17937 early to avoid bogus error. Handle overloaded function
17938 names provided as template arguments correctly.
17939 (coerce_template_parms): Don't mishandle overloaded functions when
17940 dealing with template template parameters.
17941 (lookup_template_class): Issue an error message, rather than
17942 crashing, when the TYPE_DECL provided is not a template type.
17944 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
17946 * class.c (instantiate_type): Don't just return a known type if
17949 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
17951 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
17952 since that code could never be reached.
17954 * error.c (dump_decl): Avoid aborting in the midst of printing an
17955 error message about an illegal template declaration.
17957 * parse.y (structsp): Print an error message, rather than crashing,
17958 when a class-head does not name a class.
17960 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
17961 template arguments as a g++ extension.
17963 * cp-tree.def (ALIGNOF_EXPR): New tree code.
17964 * decl2.c (grok_alignof): If processing_template_decl, just store
17966 * typeck.c (c_alignof): Likewise.
17967 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
17968 * error.c (dump_expr): Likewise.
17969 * pt.c (tsubst_copy): Likewise.
17970 * tree.c (cp_tree_equal): Likewise.
17971 * pt.c (uses_template_parms): Correctly determine whether or not a
17972 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
17973 folding can be done.
17975 * cp-tree.h (grok_enum_decls): Remove type parameter.
17976 * decl.c (grok_enum_decls): Likewise.
17977 * decl2.c (grok_x_components): Call grok_enum_decls
17978 unconditionally, since it will do nothing if there is no
17979 current_local_enum. Use the new calling sequence.
17980 * pt.c (tsubst_enum): Use the new calling sequence for
17983 * decl.c (start_function): Make member functions of local classes
17984 in extern inline functions have comdat linkage here...
17985 (grokdeclarator): Rather than here.
17987 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
17989 * pt.c (convert_nontype_argument): Use decl_constant_value.
17991 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
17993 * call.c (add_template_candidate_real): New function.
17994 (add_template_candidate): Use it.
17995 (add_template_conv_candidate): Likewise.
17996 (joust): Pass extra argument to more_specialized.
17997 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
17998 (is_local_class): Remove.
17999 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
18000 * cp-tree.h (is_local_class): Remove.
18001 (perform_array_to_pointer_conversion): Likewise.
18002 (finish_member_template_decl): Add.
18003 (check_explicit_specialization): Return a tree, not an int.
18004 (more_specialized): Take additional argument.
18005 (get_bindings): Likewise.
18006 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
18007 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
18008 (perform_array_to_pointer_conversion): Remove.
18009 * decl.c (saved_scope): Add processing_specialization,
18010 processing_explicit_instantiation fields.
18011 (maybe_push_to_top_level): Save them.
18012 (pop_from_top_level): Restore them.
18013 (grokfndecl): Use new return value from
18014 check_explicit_specialization.
18015 (start_decl): Don't check flag_guiding_decls before pushing
18017 (cp_finish_decl): Remove previous (bogus) change.
18018 (grok_declarator): Use decl_function_context rather than
18020 * decl2.c (finish_file): Pass extra argument to get_bindings.
18021 (build_expr_from_tree): Let build_x_component_ref check
18022 validity of arguments rather than doing it here.
18023 * lex.c (cons_up_default_function): Remove code fooling with
18024 processing_specialization, processing_explicit_instantiation
18025 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
18026 * method.c (build_overload_identifier): Mangle local classes in
18027 template functions correctly.
18028 * parse.y (finish_member_template_decl): Move to pt.c.
18029 * pt.c (finish_member_template_decl): Moved here from parse.y.
18030 (print_candidates): New function.
18031 (determine_specialization): Change interface. Properly look for
18032 most specialized versions of template candidates.
18033 (check_explicit_specialization): Fully process explicit
18035 (push_template_decl): Avoid looking at CLASSTYPE fields in
18037 (determine_overloaded_function): Remove.
18038 (convert_nontype_argument): Change name from
18039 convert_nontype_parameter. Use determine_overloaded_function
18040 instead of instantiate_type.
18041 (mangle_class_name_for_template): Handle type contexts as well as
18043 (classtype_mangled_name): Likewise.
18044 (lookup_template_class): Likewise.
18045 (tsubst): Likewise.
18046 (more_specialized): Take explict template arguments as a
18048 (most_specialized): Likewise.
18049 (get_bindings): Likewise. Check that return types match before
18050 proclaiming a function a match.
18051 (do_decl_instantiation): Remove code searching for function to
18052 instantiate; that is now done in check_explicit_specialization.
18053 (add_maybe_template): Pass extra argument to get_bindings.
18054 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
18056 * typeck.c (build_component_ref): Check for invalid arguments.
18058 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
18060 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
18061 return_target and call_target are equivalent.
18063 * pt.c (type_unification_real): Just accept function parms that
18064 don't use any template parms.
18066 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
18068 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
18069 unset DECL_NOT_REALLY_EXTERN.
18071 * parse.y (typename_sub*): Fix std::.
18073 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
18075 * error.c (dump_decl): Fix type default template args.
18076 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
18078 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
18080 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
18081 (file_name_nondirectory): Use.
18083 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
18085 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
18086 that are not really present. Substitute default arguments in
18087 template template arguments. Correctly convert TEMPLATE_DECL to
18088 TEMPLATE_TEMPLATE_PARM.
18089 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
18090 are no longer treated specially here.
18091 * parse.y (template_template_parm): Fix copy error.
18092 * decl.c (grokdeclarator): Warn about missing `typename' for nested
18093 type created from template template parameters.
18094 * parse.y (bad_parm): Likewise
18096 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
18097 (push_nested_class): Likewise.
18098 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
18099 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
18100 (copy_template_template_parm): Declare.
18101 * decl.c (arg_looking_for_template): New variable.
18102 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
18103 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
18104 node if arg_looking_for_template is nonzero.
18105 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
18106 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
18107 (grokdeclarator): Handle TEMPLATE_DECL.
18108 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
18109 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
18110 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
18111 (dump_decl): Handle unnamed template type parameters.
18112 Handle template template parameters.
18113 (dump_function_name): Handle template template parameters.
18114 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
18115 Handle TEMPLATE_TEMPLATE_PARM.
18116 * method.c (build_template_template_parm_names): New function.
18117 (build_template_parm_names): Handle TEMPLATE_DECL.
18118 (build_overload_nested_name, build_overload_name):
18119 Handle TEMPLATE_TEMPLATE_PARM.
18120 * parse.y (maybe_identifier): New nonterminal.
18121 (template_type_parm): Use it.
18122 (template_template_parm, template_arg1): New nonterminal.
18123 (template_parm): Add template_template_parm rules.
18124 (template_arg): Set processing_template_arg.
18125 (template_arg1): Rules moved from template_arg.
18126 (primary, nonnested_type): Set arg_looking_for_template if we are
18127 processing template arguments.
18128 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
18129 (process_template_parm): Handle template template parameters.
18130 (coerce_template_parms, comp_template_args): Likewise.
18131 (mangle_class_name_for_template, lookup_template_class): Likewise.
18132 (uses_template_parms): Handle TEMPLATE_DECL and
18133 TEMPLATE_TEMPLATE_PARM.
18134 (current_template_args): Handle TEMPLATE_DECL.
18135 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
18136 * search.c (dfs_walk, dfs_record_inheritance):
18137 Handle TEMPLATE_TEMPLATE_PARM.
18138 * tree.c (copy_template_template_parm): New function.
18139 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
18140 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
18142 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
18144 * decl.c (start_decl): Don't allow duplicate definitions of static
18147 * call.c (build_user_type_conversion_1): Handle user-defined
18148 template conversion operators correctly.
18150 * decl2.c (build_expr_from_tree): Issue an error message if the
18151 object in a COMPONENT_REF is a TEMPLATE_DECL.
18153 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
18155 * class.c (is_local_class): New function.
18156 * cp-tree.h (is_local_class): Declare it.
18157 (last_tree): Likewise.
18158 (begin_tree): Likewise.
18159 (end_tree): Likewise.
18160 (lookup_template_class): Change prototype.
18161 * decl.c (cp_finish_decl): Check for NULL where necessary.
18162 Consider FUNCTION_DECLS to declare objects with top-level binding,
18163 when calling make_decl_rtl.
18164 (grokdeclarator): Give members of local classes internal linkage.
18165 (start_function): Remove declaration of last_tree.
18166 (finish_function): Set flag_keep_inline_functions around call to
18167 rest_of_compilation if we are processing a member function in a
18169 (start_method): Call push_template_decl for member functions of
18170 local classes in template functions.
18171 * decl2.c (import_export_decl): Don't give external linkage to
18172 instantiations of templates with internal linkage.
18173 * parse.y (last_tree): Remove declaration.
18174 (template_type): Pass extra parameter to lookup_template_class.
18175 (self_template_type): Likewise.
18176 (structsp): Move call to reset_specialization into left_curly.
18177 (left_curly): Call reset_specialization, and begin_tree.
18178 * pt.c (saved_trees): New variable.
18179 (mangle_class_name_for_template): Change prototype. Use
18180 additional function context to name local classes in templates
18182 (classtype_mangled_name): Pass the context.
18183 (push_template_decl): Handle local classes and templates, and
18184 member functions for such classes.
18185 (convert_nontype_parameter): Fix handling of pointer-to-member
18187 (lookup_template_class): Handle local classes in templates.
18188 (tsubst): Likewise. Don't assume that template instantiations
18189 have external linkage; pay attention to the template declaration.
18190 (mark_decl_instantiated): Likewise.
18191 (begin_tree): New function.
18192 (end_tree): Likewise.
18194 * decl.c (xref_basetypes): Don't call complete_type for basetypes
18195 that involve template parameters; that can lead to infinite
18196 recursion unnecessarily.
18198 * pt.c (register_specialization): Do not register specializations
18199 that aren't ready to be registered yet.
18200 (check_explicit_specialization): Handle explicit specialization of
18201 constructors and destructors.
18202 (build_template_decl): New function.
18203 (push_template_delc): Handle out-of-class specializations of
18206 * pt.c (check_explicit_specialization): Set up the template
18207 information before registering the specialization.
18208 (coerce_template_parms): Fix thinko.
18209 (tsubst): Handle specializations of member templates correctly.
18211 * class.c (finish_struct_methods): Remove calls to
18212 check_explicit_specialization from here.
18213 (finish_struct): And insert them here.
18214 * cp-tree.h (perform_qualification_conversions): New function.
18215 (perform_array_to_pointer_conversion): Likewise.
18216 (begin_explicit_instantiation): Likewise.
18217 (end_explicit_instantiation): Likewise.
18218 (determine_specialization): Renamed from
18219 determine_explicit_specialization.
18220 (comp_template_parms): New function.
18221 (processing_explicit_instantiation): New variable.
18222 * cvt.c (perform_qualification_conversions): New function.
18223 (perform_array_to_pointer_conversion): Likewise.
18224 * decl.c (duplicate_decls): Don't consider template functions
18225 alike unless they have the same parameters. Refine handling of
18226 instantiation/specialization mismatches.
18227 (start_decl): Don't call pushdecl for template specializations,
18228 since they don't affect overloading.
18229 (start_function): Likewise.
18230 (grokfndecl): Call check_explicit_specialization a little later.
18231 Don't call duplicate_decls for memberm template specializations.
18232 (grokdeclarator): Don't update template_count for classes that are
18233 themselves specializations. Remove use of `2' as parameter to
18234 grokfndecl since that value isn't used.
18235 * lex.c (cons_up_default_function): Save and restore
18236 processing_explicit_instantiation around calls to grokfield.
18237 * parse.y (finish_member_template_decl): New function.
18238 (component_decl_1): Use it.
18239 (fn.def2): Likewise.
18240 (template_arg_list_opt): New nonterminal.
18241 (template_type): Use it.
18242 (self_template_type): Likewise.
18243 (template_id): Likewise.
18244 (object_template_id): Likewise.
18245 (notype_template_declarator): Likwise.
18246 (begin_explicit_instantiation): Likewise.
18247 (end_explicit_instantiation): Likewise.
18248 (explicit_instantiation): Use them.
18249 * pt.c (coerce_template_parms): Add parameters.
18250 (processing_explicit_instantiation): New variable.
18251 (convert_nontype_parameter): New function.
18252 (determine_overloaded_function): Likewise.
18253 (begin_explicit_instantiation): Likewise.
18254 (end_explicit_instantiation): Likewise.
18255 (retrieve_specialization): Likewise.
18256 (register_specialization): Likewise.
18257 (processing_explicit_specialization): Removed.
18258 (determine_specialization): Handle specializations of member
18259 functions of template class instantiations.
18260 (check_explicit_specialization): Refine to conform to standard.
18261 (comp_template_parms): New function.
18262 (coerce_template_parms): Call convert_nontype_parameter.
18263 (tsubst): Refine handling of member templates. Use
18264 register_specialization.
18265 (instantiate_template): Use retrieve_specialization.
18266 (do_decl_instantiation): Likewise.
18267 (instantiate_decl): Likewise.
18268 (type_unification): Improve handling of explict template
18270 * tree.c (mapcar): Return error_mark_node, rather than aborting,
18271 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
18272 * typeck.c (build_unary_op): Call determine_specialization, rather
18273 than determine_explicit_specialization.
18275 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
18277 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
18279 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
18281 * error.c (dump_decl): For enum tags, output the tag, not its value.
18283 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
18285 * decl.c (init_decl_processing): Only call init_rtti_processing
18288 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
18290 * init.c (build_new_1): Split out from build_new.
18291 (build_new): Just return a NEW_EXPR.
18292 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
18294 * decl2.c (get_temp_regvar): Tweak.
18296 * cp-tree.h (TREE_CALLS_NEW): Comment out.
18297 * class.c (resolves_to_fixed_type_p): Remove use.
18298 * method.c (build_opfncall): Likewise.
18299 * call.c (build_new_op): Likewise.
18301 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
18303 * exception.cc (__eh_alloc, __eh_free): New fns.
18304 (__cp_push_exception, __cp_pop_exception): Use them.
18305 (__uncatch_exception): Call terminate here if no exception.
18306 * except.c (build_terminate_handler): New fn.
18307 (expand_start_catch_block): Use it.
18308 (expand_exception_blocks): Likewise.
18309 (alloc_eh_object): New fn.
18310 (expand_throw): Use it. Protect exception init with terminate.
18311 * typeck.c (build_modify_expr): Remove code that ignores trivial
18314 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18316 * call.c (add_builtin_candidate): Add default case in enumeration
18318 (build_new_op): Likewise.
18319 (convert_like): Likewise.
18320 * cvt.c (build_expr_type_conversion): Likewise.
18321 * tree.c (real_lvalue_p): Likewise.
18322 (lvalue_p): Likewise.
18323 (cp_tree_equal): Likewise.
18324 * typeck.c (comptypes): Likewise.
18325 (build_component_ref): Likewise.
18326 (build_function_call_real): Likewise.
18327 (build_binary_op_nodefault): Likewise.
18328 (build_unary_op): Likewise.
18329 (build_modify_expr): Likewise.
18330 * typeck2.c (initializer_constant_valid_p): Likewise.
18332 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
18334 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
18336 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
18338 * pt.c (coerce_template_parms): Make sure to digest_init if
18341 * decl.c (duplicate_decls): Make the newdecl virtual if the
18342 olddecl was, just as is done with other attributes of olddecl.
18344 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
18346 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
18347 address of an OFFSET_REF.
18349 * cp-tree.def: Add AGGR_INIT_EXPR.
18350 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
18351 AGGR_INIT_EXPR where appropriate.
18352 * expr.c (cplus_expand_expr): Likewise. Simplify.
18354 * decl2.c (finish_file): Remove call to register_exception_table.
18356 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18358 * pt.c (instantiate_class_template): Don't do injection when
18359 processing_template_decl is true, as pollutes current_binding_level
18362 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
18364 * pt.c (maybe_fold_nontype_arg): Add prototype.
18366 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
18368 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
18369 * error.c (dump_expr): Likewise.
18371 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
18373 * typeck.c (build_function_call_real): Remove "inline called before
18374 definition" pedwarn.
18376 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
18378 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
18380 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
18382 * pt.c (type_unification_real): Change __null to type void* with
18385 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
18387 * call.c (implicit_conversion): Don't call
18388 build_user_type_conversion_1 with a NULL expr, since it will
18391 * pt.c (unify): Don't try to unify array bounds if either array is
18394 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
18396 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
18397 Replace extern decls with casts.
18399 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
18400 Update last_parm_cleanup_insn.
18401 (store_after_parms): Remove.
18402 * cp-tree.h: Adjust.
18404 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
18406 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
18407 (finish_file): Check DECL_COMDAT instead of weak|one_only.
18408 (import_export_vtable): Use make_decl_one_only instead of
18409 comdat_linkage for win32 tweak.
18410 (import_export_decl): Likewise.
18411 * pt.c (mark_decl_instantiated): Likewise.
18413 * decl2.c (finish_file): Lose handling of templates in pending_statics.
18415 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
18417 * decl2.c (finish_file): Lose call to expand_builtin_throw.
18418 * except.c (expand_builtin_throw): Remove.
18419 * cp-tree.h: Remove ptr_ptr_type_node.
18420 * decl.c: Likewise.
18422 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
18424 * decl.c (ptr_ptr_type_node): Define.
18425 (init_decl_processing): Initialize it.
18426 * cp-tree.h: Declare it.
18427 * exception.cc (__cp_exception_info): Use __get_eh_info.
18428 (__cp_push_exception): Likewise.
18429 (__cp_pop_exception): Likewise.
18431 From Scott Snyder <snyder@d0sgif.fnal.gov>:
18432 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
18434 (init_exception_processing): Removed saved_pc initialization.
18436 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
18438 * pt.c (instantiate_decl): Defer all templates but inline functions.
18440 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
18442 * init.c (expand_vec_init): Don't fold a list of parameters.
18444 * decl.c (copy_args_p): Handle copy elision for types with virtual
18446 * call.c (build_over_call): Likewise.
18448 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
18450 * pt.c (lookup_template_function): Copy the template arguments,
18451 not just the list containing them, to the permanent obstack.
18453 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
18455 * except.c (expand_start_catch_block): suspend_momentary for the
18458 * error.c (dump_decl): Handle LOOKUP_EXPR.
18460 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
18462 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
18463 permanent obstack if we are processing a template decl.
18464 * typeck.c (build_static_cast): Likewise.
18465 (build_const_cast): Likewise.
18466 (build_reinterpret_cast): Likewise.
18468 * pt.c (coerce_template_parms): Coerce some expressions, even
18469 when processing_template_decl.
18471 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
18473 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
18474 handling of pointer difference expressions.
18476 * typeck.c (comp_target_types): Comparison of function/method types
18477 is independent of nptrs.
18479 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
18481 * pt.c (tsubst): Avoid creating pointer to reference and
18482 reference to reference types.
18484 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
18486 * parse.y (do_id): New nonterminal.
18487 (template_id): Use it.
18489 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
18491 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
18492 * spew.c (yylex): Don't do_identifier here.
18493 * decl2.c (build_expr_from_tree): Revert last change.
18495 * decl2.c (build_expr_from_tree): Expand the name for a method call.
18496 * parse.y (object_template_id): Don't try to take the DECL_NAME.
18498 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
18500 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
18502 * call.c (build_op_delete_call): Adjust.
18504 * except.c (expand_end_catch_block): Lose rethrow region.
18505 (expand_start_catch_block): Likewise.
18506 (expand_end_catch_block): Don't expand_leftover_cleanups.
18508 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18510 * pt.c (tsubst): Remove tree_cons call (places redundant info into
18511 DECL_TEMPLATE_INSTANTIATION).
18513 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
18515 * tree.c (is_overloaded_fn): Handle getting a fn template.
18516 (really_overloaded_fn): Likewise.
18517 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
18518 * pt.c (check_explicit_specialization): Tweak.
18519 (determine_explicit_specialization): Tweak.
18521 * tree.c, cp-tree.h (get_target_expr): New fn.
18523 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
18525 * pt.c (check_explicit_specialization): Fix misspelling in
18526 diagnostic: `preceeded'.
18527 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
18530 1997-12-02 Mark Mitchell <mmitchell@usa.net>
18532 * pt.c (determine_explicit_specialization): Avoid an internal
18533 error for bad specializations.
18535 * method.c (build_overload_value): Handle SCOPE_REF.
18537 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
18539 * class.c (prepare_fresh_vtable): Enable even more complex MI
18542 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
18544 * exception.cc (__check_eh_spec): Optimize a bit.
18546 * exception.cc (__cp_pop_exception): Lose handler arg.
18547 * except.c (do_pop_exception): Likewise.
18548 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
18549 (expand_end_catch_block): Likewise.
18551 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
18553 * pt.c (check_explicit_specialization): Complain about using a
18554 template-id for a non-specialization.
18556 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
18558 * repo.c: Prototype rindex only if needed.
18559 * xref.c: Likewise.
18561 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
18563 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
18565 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
18567 * typeck.c (build_const_cast): Handle references here instead of
18568 handing off to convert_to_reference.
18570 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
18571 TerminateFunctionCall.
18572 (init_exception_processing): Likewise. Terminate et al are now
18573 the fns, not ADDR_EXPRs.
18574 (various): Lose redundant assemble_external calls.
18575 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
18577 * cp-tree.h (struct lang_decl_flags): Add comdat.
18578 (DECL_COMDAT): New macro.
18579 * decl.c (duplicate_decls): Propagate it.
18580 (cp_finish_decl): Handle it.
18581 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
18583 * class.c: Remove static pending_hard_virtuals.
18584 (add_virtual_function): Take pointers to pending_virtuals
18585 and pending_hard_virtuals.
18586 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
18588 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
18590 * decl2.c (import_export_vtable): If we support one_only but not
18591 weak symbols, mark instantiated template vtables one_only.
18592 (import_export_decl): Likewise for tinfo functions.
18593 (finish_vtable_vardecl): Also write out vtables from explicitly
18594 instantiated template classes.
18595 * pt.c (mark_class_instantiated): Revert last change.
18597 * except.c (expand_throw): Call mark_used on the destructor.
18599 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
18601 * lex.c (lang_init): Enable flag_exceptions by default if no
18602 command line switch was specified.
18604 1997-11-26 Mark Mitchell <mmitchell@usa.net>
18606 * pt.c (unify): Handle `void' template parameters in
18609 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
18611 * rtti.c (build_dynamic_cast): Handle template case here.
18612 (build_dynamic_cast_1): Not here.
18614 * typeck2.c (digest_init): Make copies where appropriate.
18616 * decl2.c (delete_sanity): resolve_offset_ref.
18618 * except.c: Call terminate without caching so many bits.
18620 * except.c (expand_start_catch_block): Fix catching a reference
18623 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
18625 * init.c (build_new): Copy size to the saveable obstack.
18627 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
18628 TRY_CATCH_EXPR for now.
18630 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
18632 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
18633 has DECL_LANG_SPECIFIC.
18635 * exception.cc (struct cp_eh_info): Add handlers field.
18636 (__cp_push_exception): Initialize it.
18637 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
18638 (__throw_bad_exception): Remove.
18639 * except.c (call_eh_info): Add handlers field.
18640 (get_eh_handlers): New fn.
18641 (push_eh_cleanup): Increment handlers.
18643 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
18645 * except.c (expand_start_eh_spec): Use the try/catch code.
18646 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
18647 doing everything inline.
18648 (init_exception_processing): throw_type_match now takes
18649 const void pointers.
18650 * exception.cc (__check_eh_spec): New fn.
18651 * inc/exception: Neither terminate nor unexpected return.
18652 * decl.c: Make const_ptr_type_node public.
18653 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
18655 * except.c (expand_start_catch_block): We only need the rethrow
18656 region for non-sjlj exceptions.
18657 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
18659 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
18661 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
18662 (various.o): Likewise.
18663 * inc/new: Add placement deletes. Add throw specs for default new.
18664 * new.cc (set_new_handler): Move here from libgcc2.
18665 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
18666 (new): Move from libgcc2. Throw bad_alloc.
18667 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
18668 * decl.c (init_decl_processing): Update exception specs on new and
18671 * method.c (build_decl_overload_real): Don't mess with global
18674 * init.c (build_new): Check for null throw spec, not nothrow_t.
18676 * decl.c (duplicate_decls): Don't complain about different exceptions
18677 from an internal declaration.
18679 * call.c (build_op_delete_call): Fix check for member fns again.
18681 * decl2.c (import_export_decl): Interface hackery affects
18682 virtual synthesized methods.
18684 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
18686 * decl.c (start_decl): Don't just complain about a mismatched
18689 * decl.c (make_implicit_typename): Handle case where t is not
18690 actually from context.
18691 * tree.c (get_type_decl): Lose identifier case.
18692 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
18693 * parse.y (nonnested_type): Just use lookup_name.
18694 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
18696 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
18698 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
18699 T was built in C language context (for example, by
18700 output_func_start_profiler).
18702 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
18704 * decl.c (make_implicit_typename): New fn.
18705 (lookup_name_real): Use it. Use current_class_type as the context.
18707 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
18709 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
18711 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
18713 * friend.c (do_friend): Warn about non-template friends in templates.
18715 * call.c (build_op_delete_call): Fix handling of inherited delete.
18717 * search.c (dfs_record_inheritance): Ignore template type parms.
18719 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
18721 * call.c (build_new_op): Fix copy error.
18722 (build_op_new_call): New fn.
18723 (build_op_delete_call): New fn.
18724 * cp-tree.h: Declare them.
18725 * init.c (build_new): Use them. Support placement delete.
18726 (build_x_delete): Use build_op_delete_call.
18727 (build_delete): Likewise.
18728 * decl2.c (delete_sanity): Likewise.
18729 (coerce_delete_type): Don't complain about placement delete.
18731 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
18733 * call.c (build_new_function_call): Remove unused 'obj' parm.
18734 * cp-tree.h, typeck.c: Adjust.
18736 * init.c (build_new): Make the cleanup last longer.
18737 (expand_vec_init): Call do_pending_stack_adjust.
18739 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
18741 * pt.c (do_type_instantiation): Fix typo.
18742 (mark_class_instantiated): If we support one_only but not weak
18743 symbols, don't mark this as known.
18745 * init.c (build_new): Handle vec delete in EH cleanup.
18747 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18749 * call.c (build_method_call): Call complete_type before checking
18752 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
18754 * decl.c (add_block_current_level): Delete.
18755 * init.c (build_vec_delete_1): Delete build_block and
18756 add_block_current_level calls.
18758 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
18760 * init.c (build_new): Handle freeing allocated memory when the
18761 constructor throws.
18763 * call.c (build_new_method_call): Fix flags arg.
18765 * pt.c (do_type_instantiation): Don't try to instantiate
18767 (mark_decl_instantiated): If we support one_only but not
18768 weak symbols, mark this one_only.
18769 * decl2.c (import_export_vtable): Don't defer handling of vtables
18770 if MULTIPLE_SYMBOL_SPACES.
18772 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
18774 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
18776 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
18778 * except.c (do_pop_exception): Return a value.
18780 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
18782 * call.c (build_new_method_call): Handle getting a
18783 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
18784 if we got template parms.
18785 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
18787 * decl2.c (build_expr_from_tree): Tweak last change.
18788 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
18789 (maybe_fold_nontype_arg): Split out from tsubst_copy.
18790 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
18792 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
18794 * pt.c (tsubst_copy): Handle explicit template arguments in
18796 * typeck.c (build_x_function_call): Likewise.
18797 * decl2.c (build_expr_from_tree): Lookup function name if it
18800 * pt.c (tsubst): Instantiate template functions properly when
18801 template parameter does not appear in function arguments and return
18803 (comp_template_args): Handle member templates required by tsubst.
18805 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
18807 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
18810 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
18812 * pt.c (coerce_template_parms): Tweak error message.
18814 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
18815 return type defaults to `int', even if there are storage-class
18818 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
18820 Complete nested exception support.
18821 * except.c (do_pop_exception): Split out...
18822 (push_eh_cleanup): From here. Handle the EH region by hand.
18823 (expand_start_catch_block): Add a new level for the catch parm.
18824 Move the rethrow region outside the two cleanup regions.
18825 Protect the initializer for the catch parm with terminate.
18826 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
18827 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
18828 popping off the middle of the stack.
18829 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
18830 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
18831 (build_cplus_new): Only wrap CALL_EXPRs.
18832 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
18833 the constructor call.
18835 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18837 * Make-lang.in (c++.distdir): Make inc subdirectory.
18839 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
18841 * decl2.c (finish_file): Put back some code.
18843 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
18845 * decl2.c (finish_file): Remove redundant code.
18846 * method.c (emit_thunk): Don't let the backend defer generic thunks.
18848 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
18850 * except.c (call_eh_info): Split out...
18851 (push_eh_info): From here.
18852 (expand_builtin_throw): Use it.
18853 (expand_start_catch_block): Move region start back.
18855 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
18857 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
18858 (real_yylex): Record wide strings using target endianness, not host.
18860 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
18862 * repo.c (rindex): Add decl unconditionally.
18863 (get_base_filename, open_repo_file): Don't cast rindex.
18864 * xref.c (rindex): Add decl unconditionally.
18865 (index): Remove unused decl.
18866 (open_xref_file): Don't cast rindex.
18868 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
18870 * class.c (build_vbase_path): Propagate the result type properly.
18872 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
18874 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
18875 remaining use of saved_throw_type with a call to get_eh_type.
18877 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
18879 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
18880 (file_name_nondirectory): New function, doing the same as the macro.
18881 (set_typedecl_interface_info): Use it instead of the macro.
18882 (check_newline): Likewise.
18883 (handle_cp_pragma): Likewise.
18885 * repo.c (get_base_filename): Cast result of rindex to char*.
18886 (open_repo_file): Likewise.
18887 * xref.c (open_xref_file): Likewise.
18888 * error.c (dump_char): Make its arg int, not char.
18890 * except.c (push_eh_info): Pass the number of fields - 1 down, not
18891 the exact number of fields.
18893 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
18895 Support for nested exceptions.
18896 * tinfo2.cc (__is_pointer): New fn.
18897 * exception.cc (struct cp_eh_info): Define.
18898 (__cp_exception_info, __uncatch_exception): New fns.
18899 (__cp_push_exception, __cp_pop_exception): New fns.
18900 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
18902 (init_exception_processing): Likewise. __eh_pc is now external.
18903 (push_eh_info): New fn.
18904 (get_eh_{info,value,type,caught}): New fns.
18905 (push_eh_cleanup): Just call __cp_pop_exception.
18906 (expand_start_catch_block): Use push_eh_info. Start the eh region
18908 (expand_end_eh_spec): Use push_eh_info.
18909 (expand_throw): Call __cp_push_exception to set up the exception info.
18910 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
18912 (expand_builtin_throw): Don't refer to empty_fndecl.
18914 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
18916 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
18918 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
18920 * method.c (build_template_parm_names, build_decl_overload_real):
18921 Add static to definitions.
18922 * pt.c (add_to_template_args, note_template_header,
18923 processing_explicit_specialization, type_unification_real): Likewise.
18924 ({determine,check}_explicit_specialization): Use a single string for
18927 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
18929 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
18930 (expand_end_catch_block): Likewise.
18931 (expand_end_eh_spec): Likewise.
18933 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
18935 * decl.c (duplicate_decls): Handle template specializations
18937 * error.c (dump_function_name): Fix printing of specializations of
18938 member functions that are not member templates.
18939 * cp-tree.h (processing_specialization): Make global.
18940 * pt.c (processing_specialization): Likewise.
18941 * lex.c (cons_up_default_function): Save and restore
18942 processing_specialization to avoid confusion.
18944 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
18946 * decl.c (init_decl_processing): Give null_node unknown* type.
18947 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
18948 (common_type): Likewise.
18949 * error.c (args_as_string): Recognize null_node.
18951 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18953 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
18954 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
18956 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
18958 * Make-lang.in (g++): Include prefix.o.
18960 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
18962 * pt.c (determine_explicit_specialization): Initialize "dummy"
18963 to keep Purify quiet.
18965 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
18967 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
18968 (build_overload_int): Not here.
18970 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
18972 * class.c (build_type_pathname): Remove.
18973 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
18975 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
18977 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
18978 &&label GNU extension.
18980 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
18982 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
18983 so as to avoid incorrect manglings.
18984 * method.c (build_decl_overload_real): Don't mangle return types
18987 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
18989 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
18990 scratch_tree_cons): Define as macros for now.
18991 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
18992 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
18993 typeck2.c: Use them and the expression_obstack variants.
18995 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18997 * decl.c (store_return_init): Allow classes with explicit ctors to
18998 be used with the named return values extension.
19000 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
19002 * pt.c (instantiate_decl): Fix previous change.
19004 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
19006 * pt.c (tsubst): Fix thinko.
19007 (instantiate_decl): Really use the original template.
19009 * call.c (build_new_method_call): Use simple constructor_name for
19012 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
19014 * method.c (build_underscore_int): Don't use ANSI specific
19017 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
19019 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
19020 for our key method; it might have been inlined by -O3.
19022 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
19024 * decl.c (make_typename_type): Do not try to call lookup_field for
19025 non-aggregate types.
19027 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
19029 * typeck.c (build_reinterpret_cast): Tweak.
19031 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
19033 * typeck.c (build_reinterpret_cast): Converting a void pointer
19034 to function pointer with a reinterpret_cast produces a warning
19035 if -pedantic is issued.
19037 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
19039 * typeck.c (c_expand_return): Don't warn about returning a
19040 reference-type variable as a reference.
19042 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
19044 * method.c (build_static_name): Fix typo.
19046 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
19048 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
19049 OLDDECL before we try to do DECL_USE_TEMPLATE.
19051 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
19053 * decl.c (duplicate_decls): Don't warn about template instances.
19055 * typeck.c (mark_addressable): Lose ancient code that unsets
19058 * pt.c (do_decl_instantiation): Lose support for instantiating
19061 * call.c (build_new_function_call): Fix handling of null explicit
19063 (build_new_method_call): Likewise.
19065 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
19067 * method.c (build_underscore_int): Fix typo.
19069 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
19071 * tree.c (print_lang_statistics): #if 0 call to
19072 print_inline_obstack_statistics until its definition is checked in.
19074 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
19076 * decl2.c (finish_file): Move dump_tree_statistics to end.
19078 * pt.c (instantiate_decl): Look for the original template.
19079 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
19080 of member templates.
19082 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
19084 * Makefile.in (g++FAQ.*): New rules.
19085 (CONFLICTS): Update.
19086 * g++FAQ.texi: Moved from libg++.
19088 * parse.y (PFUNCNAME): Only specify the type once.
19090 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
19092 * lex.c (real_yylex): Clean up the code to fully behave the way
19093 the c-lex.c parser does for complex and real numbers.
19095 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
19097 * method.c (build_decl_overload_real): Reformat.
19099 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
19101 * method.c (synthesize_method): If at_eof, determine our linkage.
19103 1997-09-29 Paul Eggert <eggert@twinsun.com>
19105 * lex.c (real_yylex): Treat `$' just like `_', except issue a
19106 diagnostic if !dollars_in_ident or if pedantic.
19108 * lang-specs.h (@c++): -ansi no longer implies -$.
19110 * decl2.c (lang_decode_option):
19111 -traditional and -ansi now do not mess with
19114 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
19116 * Makefile.in (parse.o, decl.o): Also depend on
19117 $(srcdir)/../except.h $(srcdir)/../output.h.
19118 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
19119 $(srcdir)/../except.h $(srcdir)/../output.h.
19120 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
19123 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
19125 * expr.c (cplus_expand_expr): Make it static.
19127 * decl2.c, init.c, typeck.c: Include "expr.h".
19128 (expand_expr): Use proper values when calling the function.
19130 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
19132 * lang-options.h: New -Wold-style-cast flag.
19133 * cp-tree.h (warn_old_style_cast): New variable.
19134 * decl2.c (warn_old_style_cast): Likewise.
19135 (lang_decode_option): Support -Wold-style-cast.
19136 (reparse_absdcl_as_casts): Produce old-style-cast warning.
19138 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
19140 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
19141 TREE_USED, reset value based on already_used.
19143 * init.c (expand_member_init): Revert change.
19145 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
19147 * cp-tree.h, decl.c, decl2.c, pt.c:
19148 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
19150 * decl2.c (lang_decode_option): Add missing ;.
19152 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
19154 * friend.c (do_friend): Disable injection for all template-derived
19156 * decl2.c (lang_decode_option): Handle -fguiding-decls.
19157 * parse.y (notype_template_declarator): New nonterminal.
19158 (direct_notype_declarator): Use it.
19159 (complex_direct_notype_declarator): Likewise.
19160 (object_template_id): Accept any kind of identifier after TEMPLATE.
19161 (notype_qualified_id): Don't add template declarators here.
19163 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
19165 * call.c (add_template_candidate): Add explicit_targs parameter.
19166 (build_scoped_method_call): Use it.
19167 (build_overload_call_real): Likewise.
19168 (build_user_type_conversion_1): Likewise.
19169 (build_new_function_call): Likewise.
19170 (build_object_call): Likewise.
19171 (build_new_op): Likewise.
19172 (build_new_method_call): Likewise.
19173 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
19174 (build_new_method_call): Likewise.
19176 * class.c (finish_struct_methods): Add specialization pass to
19177 determine which methods were specializing which other methods.
19178 (instantiate_type): Handle TEMPLATE_ID_EXPR.
19180 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
19182 * cp-tree.h (name_mangling_version): New variable.
19183 (flag_guiding_decls): Likewise.
19184 (build_template_decl_overload): New function.
19185 (begin_specialization): Likewise.
19186 (reset_specialization): Likewise.
19187 (end_specialization): Likewise.
19188 (determine_explicit_specialization): Likewise.
19189 (check_explicit_specialization): Likewise.
19190 (lookup_template_function): Likewise.
19191 (fn_type_unification): Add explicit_targs parameter.
19192 (type_unification): Likewise.
19194 * decl.c (duplicate_decls): Add smarts for explicit
19196 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
19198 (grokfndecl): Call check_explicit_specialization.
19200 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
19201 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
19202 (check_classfn): Handle specializations.
19204 * error.c (dump_function_name): Print specialization arguments.
19206 * friend.c (do_friend): Don't call pushdecl for template
19209 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
19211 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
19212 and -fno-guiding-decls.
19214 * lex.c (identifier_type): Return PFUNCNAME for template function
19217 * method.c (build_decl_overload_real): New function.
19218 (build_template_parm_names): New function.
19219 (build_overload_identifier): Use it.
19220 (build_underscore_int): New function.
19221 (build_overload_int): Use it. Add levels for template
19223 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
19224 (build_overload_nested_names): Handle template type parameters.
19225 (build_template_decl_overload): New function.
19227 * parse.y (YYSTYPE): New ntype member.
19228 (nested_name_specifier): Use it.
19229 (nested_name_specifier_1): Likewise.
19230 (PFUNCNAME): New token.
19231 (template_id, object_template_id): New non-terminals.
19232 (template_parm_list): Note specializations.
19233 (template_def): Likewise.
19234 (structsp): Likewise.
19235 (fn.def2): Handle member template specializations.
19236 (component_decl_1): Likewise.
19237 (direct_notype_declarator): Handle template-ids.
19238 (component_decl_1): Likewise.
19239 (direct_notype_declarator): Handle template-ids.
19240 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
19242 * pt.c (processing_specializations): New variable.
19243 (template_header_count): Likewise.
19244 (type_unification_real): New function.
19245 (processing_explicit_specialization): Likewise.
19246 (note_template_header): Likewise.
19247 (is_member_template): Handle specializations.
19248 (end_template_decl): Call reset_specialization.
19249 (push_template_decl): Handle member template specializations.
19250 (tsubst): Likewise.
19251 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
19252 (instantiate_template): Handle specializations.
19253 (instantiate_decl): Likewise.
19254 (fn_type_unification): Handle explicit_targs.
19255 (type_unification): Likewise. Allow incomplete unification
19256 without an error message, if allow_incomplete.
19257 (get_bindings): Use new calling sequence for fn_type_unification.
19259 * spew.c (yylex): Handle PFUNCNAME.
19261 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
19262 (really_overloaded_fn): Likewise.
19263 (get_first_fn): Handle function templates.
19265 * typeck.c (build_x_function_call): Use really_overloaded_fn.
19266 Handle TEMPLATE_ID_EXPR.
19267 (build_x_unary_op): Likewise.
19268 (build_unary_op): Likewise.
19269 (mark_addressable): Templates whose address is taken are marked
19272 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
19274 * decl.c (init_decl_processing): Declare __builtin_constant_p as
19275 accepting any kind of type, not only int.
19277 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
19279 * search.c (get_matching_virtual): Notice virtual bases when sorrying
19280 about covariant returns.
19282 * parse.y (member_init): Also imply typename here. Remove ancient
19283 extension for initializing base members.
19285 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
19287 Handle multi-level typenames and implicit typename in base list.
19288 * parse.y (typename_sub{,[0-2]}): New rules.
19289 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
19290 (nonnested_type): New rule.
19291 (complete_type_name): Use it.
19292 (base_class.1): Use typename_sub and nonnested_type.
19293 (nested_name_specifier): Don't elide std:: here.
19294 * decl.c (make_typename_type): Handle getting a type for NAME.
19295 (lookup_name_real): Turn std:: into :: here.
19297 Rvalue conversions were removed in London.
19298 * call.c (is_subseq): Don't consider lvalue transformations.
19299 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
19300 (joust): Re-enable ?: kludge.
19302 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
19304 * decl.c (start_function): Up warning of no return type to be a
19307 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
19309 * init.c (expand_member_init): Don't set TREE_USED.
19310 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
19311 set,don't clear TREE_USED wholesale.
19313 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
19315 * call.c (build_over_call): Do require_complete_type before
19318 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
19320 * search.c (lookup_field): Call complete_type in all cases.
19322 * decl.c (finish_function): Just warn about flowing off the end.
19324 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
19326 * decl.c (grokparms): Don't bash a permanent list node if we're
19329 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
19331 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
19333 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
19335 * call.c (build_new_op): Give better error for syntactically
19336 correct, but semantically invalid, use of undeclared template.
19338 * call.c (compare_qual): Handle pmfs.
19340 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
19341 after the exception spec.
19343 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
19345 * call.c (null_ptr_cst_p): Integer type, not integral type.
19347 * call.c (joust): Disable warnings until they can be moved to the
19350 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
19352 * Makefile.in, config-lang.in: Convert to autoconf.
19354 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
19356 * decl.c (lookup_name_real): Add implicit 'typename' to types from
19359 * pt.c (most_specialized_class): Fix typo.
19360 (tsubst): Move constant folding to TREE_VEC case.
19362 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
19364 * pt.c (do_poplevel): Don't warn about unused local variables
19365 while processing_template_decl since we don't always know whether
19366 or not they will need constructing/destructing.
19368 * pt.c (uses_template_parms): Check the values of an enumeration
19369 type to make sure they don't depend on template parms.
19371 * decl.c (make_typename_type): Don't lookup the field if the
19372 context uses template parms, even if we're not
19373 processing_template_decl at the moment.
19375 * pt.c (coerce_template_parms): Avoid looking at the
19376 TYPE_LANG_DECL portion of a typename type, since there won't be
19378 (tsubst): Do constant folding as necessary to make sure that
19379 arguments passed to lookup_template_class really are constants.
19381 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
19383 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
19384 * decl2.c (finish_file): Only register exception tables if we
19387 * decl.c (init_decl_processing): Add __builtin_[fs]p.
19389 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
19391 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
19393 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
19395 * error.c (dump_decl): Avoid crashing when presented with a
19396 uninitialized constant, as can occur with a template parameter.
19397 (dump_expr): Make sure that there are enough levels of
19398 current_template_parms before we start diving through them.
19400 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
19402 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
19405 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
19407 * except.c (expand_throw): Call build_delete for all
19408 exception types, not just objects with destructors.
19410 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
19412 * decl.c (current_local_enum): Remove static.
19413 * pt.c (tsubst_enum): Save and restore value of current_local_enum
19414 in case template is expanded in enum decl.
19415 (instantiate_class_template): Use new tsubst_enum signature.
19416 (tsubst_expr): Likewise.
19418 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
19420 * pt.c (begin_member_template_processing): Take a function as
19421 argument, not a set of template arguments. Use the template
19422 parameters, rather than the arguments. Handle non-type parameters
19423 correctly. Push a binding level for the parameters so that multiple
19424 member templates using the same parameter names can be declared.
19425 (end_member_template_processing): Pop the binding level.
19426 (push_template_decl): Mark member templates as static when
19429 * lex.c (do_pending_inlines): Pass the function, not its template
19430 arguments, to begin_member_template_processing.
19431 (process_next_inline): Likewise.
19432 (do_pending_defargs): Likewise.
19434 * error.c (dump_expr): Obtain the correct declaration for a
19435 TEMPLATE_CONST_PARM.
19437 * call.c (add_template_conv_candidate): New function.
19438 (build_object_call): Handle member templates, as done in the other
19441 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
19443 * decl.c (replace_defag): Undo previous change.
19444 * lex.c (do_pending_defargs): Deal with member templates.
19446 * pt.c (is_member_template): Avoid crashing when passed a
19447 non-function argument.
19449 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
19451 * class.c (grow_method): Remove check for redeclaration.
19453 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
19455 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
19456 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
19457 (PRIMARY_TEMPLATE_P): Use it.
19458 * call.c (build_overload_call_real): Use it.
19459 * class.c (instantiate_type): Likewise.
19460 * decl.c (decls_match): Likewise.
19461 * method.c (build_overload_identifier): Likewise.
19462 * pt.c (push_template_decl): Likewise.
19463 (classtype_mangled_name): Likewise.
19464 (lookup_template_class): Likewise.
19466 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
19467 DECL_NTPARMS to conform to usage elsewhere.
19468 * call.c (add_template_candidate): Likewise.
19469 * class.c (instantiate_type): Likewise.
19470 * pt.c (instantiate_template): Likewise.
19471 (get_bindings): Likewise.
19473 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
19474 is_member_template.
19476 * pt.c (unify): Undo changes to allow multiple levels of template
19478 (type_unification): Likewise.
19479 (fn_type_unification): Likewise.
19480 (get_class_bindings): Likewise.
19481 * cp-tree.h (Likewise).
19483 * decl.c (replace_defarg): Check that the type of the default
19484 parameter does not invlove a template type before complaining
19485 about the initialization.
19487 * error.c (dump_expr): Deal with template constant parameters in
19488 member templates correctly.
19490 * pt.c (is_member_template): Deal with class specializations
19492 (tsubst): Handle "partial instantiation" of member templates
19495 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
19497 * pt.c (type_unification): Change calling sequence to allow for
19498 multiple levels of template parameters.
19499 (tsubst_expr): Likewise.
19500 (tsubst): Likewise.
19501 (tsubst_copy): Likewise.
19502 (instantiate_template): Likewise.
19504 * call.c (build_overload_call_real): Use it.
19505 (add_builtin_candidate): Use it.
19506 (build_new_method_call): Use it.
19507 * class.c (instantiate_type): Use it.
19508 * decl.c (grokdeclarator): Use it.
19509 * decl2.c (finish_file): Use it.
19510 * method.c (build_overload_identifier): Use it.
19512 * call.c (add_template_candidate): Add additional parameter for
19513 the function return type. Call fn_type_unification istead of
19515 (build_user_type_conversion_1): Handle member templates.
19516 (build_new_function_call): Likewise.
19517 (build_new_op): Likewise.
19518 (build_new_method_call): Likewise.
19520 * class.c (grow_method): Don't give an error message indicating
19521 that two member templates with the same name are ambiguous.
19522 (finish_struct): Treat member template functions just like member
19525 * cp-tree.h (check_member_template): Add declaration.
19526 (begin_member_template_processing): Likewise.
19527 (end_member_template_processing): Likewise.
19528 (fn_type_unification): Likewise.
19529 (is_member_template): Likewise.
19530 (tsubst): Change prototype.
19531 (tsubst_expr): Likewise.
19532 (tsubst_copy): Likewise.
19533 (instantiate_template): Likewise.
19534 (get_bindings): Likewise.
19536 * decl.c (decls_match): Handle multiple levels of template
19538 (pushdecl): Handle template type params just like other type
19540 (push_class_level_binding): Return immediately if the
19541 class_binding_level is NULL.
19542 (grokfndecl): If check_classfn() returns a member_template, use
19543 the result of the template, not the template itself.
19545 * decl2.c (check_member_template): New function. Check to see
19546 that the entity declared to be a member template can be one.
19547 (check_classfn): Allow redeclaration of member template functions
19548 with different types; the new functions can be specializations or
19549 explicit instantiations.
19551 * error.c (dump_decl): Handle multiple levels of template
19553 (dump_function_decl): Update to handle function templates.
19555 * lex.c (do_pending_inlines): Set up template parameter context
19556 for member templates.
19557 (process_next_inline): Likewise.
19559 * method.c (build_overload_identifier): Adjust for multiple levels
19560 of template parameters.
19562 * parse.y (fn.def2): Add member templates.
19563 (component_decl_1): Likewise.
19565 * pt.c (begin_member_template_processing): New function.
19566 (end_member_template_processing): Likewise.
19567 (is_member_template): Likewise.
19568 (fn_type_unification): Likewise.
19569 (current_template_parms): Return a vector of all the template
19570 parms, not just the innermost level of parms.
19571 (push_template_decl): Deal with the possibility of member
19573 (lookup_template_class): Likewise.
19574 (uses_template_parms): Likewise.
19575 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
19576 TEMPLATE_CONST_PARM to deal with multiple levels of template
19577 arguments. Add processing of TEMPLATE_DECL to produce new
19578 TEMPLATE_DECLs from old ones.
19579 (do_decl_instantiation): Handle member templates.
19581 * search.c (lookup_fnfields_1): Handle member template conversion
19584 * tree.c (cp_tree_equal): Check the levels, as well as the
19585 indices, of TEMPLATE_CONST_PARMs.
19587 * typeck.c (comptypes): Check the levels, as well as the indices,
19588 fo TEMPLATE_TYPE_PARMs.
19589 (build_x_function_call): Treat member templates like member
19592 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
19594 * typeck.c (c_expand_return): Always convert_for_initialization
19595 before checking for returning a pointer to local.
19597 * pt.c (type_unification): If strict and the function parm doesn't
19598 use template parms, just compare types.
19600 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
19602 * method.c (build_overloaded_value): Replace direct call
19603 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
19605 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
19607 * typeck.c (convert_arguments): Don't arbitrarily choose the first
19608 of a set of overloaded functions.
19610 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
19612 * lex.c (real_yylex): Don't elide __FUNCTION__.
19614 * method.c (build_overload_value): Add in_template parm.
19615 (build_overload_int): Likewise.
19616 (build_overload_identifier): Pass it.
19618 * decl.c (duplicate_decls): Don't bash a previous template
19619 definition with a redeclaration.
19621 * pt.c (unify): float doesn't match double.
19623 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
19624 TYPE_DECL. Handle getting non-template types.
19625 * parse.y (explicit_instantiation): Use typespec instead of
19626 aggr template_type.
19628 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
19630 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
19632 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
19634 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
19635 (compare_ics): Likewise.
19637 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
19639 * call.c (joust): Warn about choosing one conversion op over
19640 another because of 'this' argument when the other return type is
19642 (source_type): New fn.
19644 * call.c (build_new_op): Strip leading REF_BIND from first operand
19645 to builtin operator.
19647 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
19650 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
19652 * call.c (null_ptr_cst_p): Remove support for (void*)0.
19654 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
19656 * typeck.c (expand_target_expr): Make definition match declaration.
19658 * class.c (get_basefndecls): Make definition match declaration.
19660 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
19662 * input.c (sub_getch): Eventually give up and release the input file.
19664 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
19667 * call.c (joust): Tweak message.
19669 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
19671 * error.c (type_as_string): Put const/volatile on template type
19672 parameters where appropriate.
19674 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
19676 * call.c (strictly_better): Make arguments unsigned ints.
19678 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
19680 * lex.c (real_yylex): Refer to __complex instead of complex.
19682 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
19684 * lex.c (real_yylex): Don't use getc directly.
19686 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
19688 * call.c (is_subseq): Don't try to be clever.
19690 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
19692 * parse.y, pt.c: Include "except.h".
19693 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
19694 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
19695 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
19696 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
19699 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
19701 * decl2.c (mark_vtable_entries): Instead of replacing pure
19702 virtuals with a reference to __pure_virtual, copy the decl and
19705 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
19707 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
19709 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
19711 * pt.c (instantiate_class_template): Call repo_template_used
19712 before finish_prevtable_vardecl.
19714 * call.c (is_subseq): New fn.
19715 (compare_ics): Use it.
19717 * repo.c (finish_repo): Don't crash on no args.
19719 * parse.y (named_complex_class_head_sans_basetype): Handle
19720 explicit global scope.
19721 * decl2.c (handle_class_head): New fn.
19723 * pt.c (unify): Add CONST_DECL case.
19725 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19727 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
19729 * cp-tree.h (report_type_mismatch): Add prototype.
19730 * call.c (build_overload_call_real): Remove erroneous fourth
19731 argument to report_type_mismatch.
19732 (build_user_type_conversion_1): Remove erroneous second arg to
19734 (build_new_function_call): Likewise.
19735 (build_object_call): Likewise.
19736 (build_new_op): Likewise.
19737 (build_new_method_call): Likewise.
19739 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
19741 * error.c (dump_decl): Don't bother processing a function with no
19742 DECL_LANG_SPECIFIC.
19744 * method.c (emit_thunk): Call init_function_start in the macro case.
19746 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
19748 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
19749 defined and used to set flag_vtable_thunks.
19751 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
19753 * parse.y: Don't clear the inlines from their obstack until they've
19754 all been processed.
19756 * decl.c (duplicate_decls): Don't complain about exception
19757 specification mismatch if flag_exceptions is off.
19759 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
19761 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
19763 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
19765 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
19766 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
19767 Include <stdio.h> before include files that formerly used STDIO_PROTO.
19769 * decl.c, g++spec.c, lex.c, method.c, repo.c:
19770 Include "config.h" first, as per autoconf manual.
19772 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
19774 * decl.c (duplicate_decls): Tweak wording.
19775 * lex.c (do_pending_defargs): Don't die if we see a default arg
19776 that isn't a DEFAULT_ARG.
19777 * error.c (dump_expr): Handle DEFAULT_ARG.
19779 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
19780 * lang-options.h: Add -fhandle-exceptions.
19782 * class.c (build_vtable): Vtables are artificial.
19783 (prepare_fresh_vtable): Likewise.
19785 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
19787 * cvt.c (ocp_convert): After converting to the target type, set
19788 LOOKUP_NO_CONVERSION.
19790 * call.c (joust): Warn about potentially confusing promotion rules
19792 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
19794 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
19796 * exception.cc: Declare __terminate_func with noreturn attribute.
19798 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
19800 * parse.y: Break out eat_saved_input, handle errors.
19801 (function_try_block): Use compstmt instead of compstmt_or_error.
19803 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
19805 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
19807 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
19809 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
19810 existence of cc1plus check whether $(LANGUAGES) contains C++.
19812 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
19814 * method.c (do_build_copy_constructor): When copying an anonymous
19815 union member loop around to handle nested anonymous unions. Use
19816 the offset of the member relative to the outer structure, not the
19819 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
19821 * call.c (resolve_args): New fn.
19822 (build_new_function_call): Use it.
19823 (build_object_call): Likewise.
19824 (build_new_method_call): Likewise.
19826 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
19828 * call.c (build_over_call): tsubst all default parms from templates.
19830 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
19832 * decl.c (struct cp_function): Add static_labelno.
19833 (push_cp_function_context): Save it.
19834 (pop_cp_function_context): Restore it.
19836 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
19838 * typeck.c (build_component_ref_1): Convert from reference.
19840 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19842 * parse.y (current_declspecs, prefix_attributes): Initialize to
19845 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
19846 before we try to force it to be a TREE_LIST.
19847 (decl): Make sure $1.t is non-nil.
19849 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
19851 * pt.c (uses_template_parms): Handle template first-parse codes.
19853 * decl.c (cp_finish_decl): Only warn about user-defined statics.
19855 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
19857 * pt.c (unify): Handle BOOLEAN_TYPE.
19859 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
19860 * pt.c (tsubst): Don't set it.
19861 * call.c (build_over_call): Use uses_template_parms.
19863 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
19865 * method.c (build_overload_nested_name): Use static_labelno
19866 instead of var_labelno.
19867 (build_qualified_name): New fn.
19868 (build_overload_name): Split out from here.
19869 (build_static_name): Use build_qualified_name.
19870 * decl.c (cp_finish_decl): Statics in extern inline functions
19871 have comdat linkage.
19872 (start_function): Initialize static_labelno.
19874 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
19876 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
19877 before "all member functions in class [] are private".
19879 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
19881 * lex.c (do_scoped_id): convert_from_reference.
19882 * init.c (build_offset_ref): Likewise.
19884 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
19886 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
19888 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
19890 * typeck.c (get_member_function_from_ptrfunc): Promote index
19893 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
19895 * tree.c (layout_basetypes): Move non-virtual destructor warning.
19896 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
19898 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
19900 * decl.c (grokdeclarator): Call add_defarg_fn for the function
19902 * lex.c (add_defarg_fn): Adjust.
19903 (do_pending_defargs): Adjust. Don't skip the first parm.
19905 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
19907 * decl.c (build_enumerator): Global enumerators are also readonly.
19909 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
19910 (build_dynamic_cast): Call it and convert_from_reference.
19912 * lex.c (add_defarg_fn): New fn.
19913 (snarf_defarg): Don't add to defarg_types.
19914 (do_pending_defargs): Lose defarg_types. All fns we process now
19916 * decl.c (grokfndecl): Call add_defarg_fn.
19918 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
19919 * cp-tree.def: Add DEFAULT_ARG.
19920 * spew.c (yylex): Call snarf_defarg as appropriate.
19921 * parse.y: New tokens DEFARG and DEFARG_MARKER.
19922 (defarg_again, pending_defargs, defarg, defarg1): New rules.
19923 (structsp): Use pending_defargs.
19924 (parms, full_parm): Use defarg.
19925 * lex.c (init_lex): Initialize inline_text_firstobj.
19926 (do_pending_inlines): Never pass the obstack to feed_input.
19927 (process_next_inline): Call end_input instead of restore_pending_input.
19928 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
19929 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
19930 * input.c (end_input): New fn.
19931 (sub_getch): At the end of some fed input, just keep returning EOF
19932 until someone calls end_input.
19933 Remove 'obstack' field from struct input_source.
19934 * decl.c (grokparms): Handle DEFAULT_ARG.
19935 (replace_defarg): New fn.
19936 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
19938 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
19940 * call.c (implicit_conversion): If nothing else works, try binding
19941 an rvalue to a reference.
19943 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
19945 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
19946 ifndef for Cygwin32 to include SIGSEGV.
19948 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
19950 * class.c (finish_struct_1): Only complain about pointers without
19951 copy stuff if there are any constructors.
19953 * rtti.c (build_dynamic_cast): Call complete_type on the types.
19955 * decl.c (grokfndecl): If the function we chose doesn't actually
19958 * decl2.c (grokclassfn): Don't specify 'const int' for the
19959 artificial destructor parm.
19961 * pt.c (type_unification): If we are called recursively, nothing
19964 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
19966 * decl.c (init_decl_processing): Stop trying to catch signals
19967 other than SIGABRT since the Cygwin32 library doesn't support
19968 them correctly yet. This fixes a situation in which g++ causes
19969 a hang on SIGSEGVs and other such signals in our Win32-hosted
19972 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
19974 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
19976 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
19978 * typeck2.c (store_init_value): Always return the value if our
19979 type needs constructing.
19981 * method.c (hack_identifier): Convert class statics from
19984 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
19986 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
19988 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
19990 * typeck.c (c_expand_return): Make sure we clean up temporaries at
19991 the end of return x;
19993 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19995 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
19997 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
19999 * except.c (expand_builtin_throw): Add support
20000 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
20002 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
20004 * repo.c (extract_string): Null-terminate.
20006 * cp-tree.h (TI_SPEC_INFO): New macro.
20007 (CLASSTYPE_TI_SPEC_INFO): New macro.
20008 * pt.c (push_template_decl): Correctly determine # of template parms
20011 * call.c (compare_ics): Really fix 'this' conversions.
20013 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
20016 * pt.c (push_template_decl): Complain about mismatch in # of
20017 template parms between a class template and a member template.
20019 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
20021 * method.c (synthesize_method): You can't call
20022 function_cannot_inline_p after finish_function.
20023 * decl.c (finish_function): Turn on flag_inline_functions and turn
20024 off DECL_INLINE before handing a synthesized method to the
20027 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
20029 * method.c (synthesize_method): Remove July 30 change to never set
20030 DECL_INLINE if at_eof.
20032 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
20034 * xref.c (GNU_xref_member): Ensure that the node has a
20035 decl_lang_specific part before checking DECL_FRIEND_P.
20037 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
20039 * pt.c (instantiate_class_template): Diagnose non-class types used
20042 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
20044 * typeck.c (build_conditional_expr): Use convert_for_initialization
20045 instead of convert_and_check.
20047 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20049 * parse.y (typespec): Don't pedwarn for typeof.
20051 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
20053 * repo.c (finish_repo): Only check changes if we would write a
20056 * call.c (compare_ics): Fix handling of 'this' conversions.
20058 * pt.c (do_decl_instantiation): Support static data too. Rename
20059 from do_function_instantiation.
20060 * cp-tree.h: Adjust.
20063 * repo.c (extract_string): New fn.
20064 (get_base_filename): Use it.
20065 (init_repo): Compare old args with current args.
20067 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
20069 * Makefile.in, Make-lang.in: Protect C-ls with a comment
20070 character, idea from Paul Eggert <eggert@twinsun.com>.
20072 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
20074 * typeck.c (c_expand_return): Be more persistent in looking for
20077 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
20078 pointer to reference.
20080 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
20082 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
20084 * init.c (build_member_call, build_offset_ref):
20085 Use do_scoped_id instead of do_identifier.
20087 * cvt.c (convert): Remove bogosity.
20089 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20091 * cvt.c (build_up_reference): Do checks of ARGTYPE and
20092 TARGET_TYPE before trying to use get_binfo.
20094 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
20096 * cvt.c (build_up_reference): Call get_binfo to get access control.
20098 * decl2.c (import_export_decl): If we don't support weaks, leave
20101 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
20103 * except.c (expand_builtin_throw): Add support for machines that
20104 cannot access globals after throw's epilogue when
20105 -fno-sjlj-exceptions is used.
20107 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
20109 * parse.y: 'std::' becomes '::'.
20110 * lex.c (real_yylex): Remove 'namespace' warning.
20111 * init.c (build_member_call): Ignore 'std::'.
20112 (build_offset_ref): Likewise.
20113 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
20114 (do_toplevel_using_decl): Ignore 'using std::whatever'.
20115 * decl.c (push_namespace): Just sorry.
20116 (pop_namespace): Nop.
20117 (init_decl_processing): Declare std namespace.
20119 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
20121 * search.c (push_class_decls): A name which ambiguously refers to
20122 several instantiations of the same template just refers to the
20125 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
20127 * decl.c (build_enumerator): Fix problem with unsigned long
20128 enumerated values being smashed to ints, causing overflow
20129 when computing next enumerated value (for enum values around
20132 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
20134 * typeck.c (build_component_ref): Only call mark_used on a decl.
20136 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20138 * typeck.c (build_c_cast): Make the check for a ptr to function
20139 more specific before possible default_conversion call.
20141 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
20143 * except.c (expand_exception_blocks): Simplify and fix and make
20144 sure we don't end a region in a sequence, as expand_end_bindings
20147 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
20149 * except.c (init_exception_processing): Mark terminate as not
20150 returning so that the optimizer can optimize better.
20152 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
20154 * cvt.c (convert): Don't do any extra work, if we can avoid it
20157 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
20159 * *.[chy]: Change cp_convert to ocp_convert, change convert to
20160 cp_convert. convert is now reserved for the backend, and doesn't
20161 have the semantics a frontend person should ever want.
20163 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
20165 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
20166 Lose -traditional support.
20168 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
20170 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
20172 * parse.y (self_reference): Do it for templates, too.
20173 * class.c (pushclass): Don't overload_template_name; the alias
20174 generated by build_self_reference serves the same purpose.
20176 * tree.c (list_hash): Make static, take more args.
20177 (list_hash_lookup): Likewise.
20178 (list_hash_add): Make static.
20179 (list_hash_canon): Lose.
20180 (hash_tree_cons): Only build a new node if one isn't already in the
20182 (hash_tree_chain): Use hash_tree_cons.
20183 * cp-tree.h: Adjust.
20184 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
20185 of calling lookup_name.
20187 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
20189 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
20190 doesn't refer to the CONST_DECLs.
20192 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
20194 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
20196 (expand_class_desc): Convert the last argument to a sizetype.
20198 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20200 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
20201 __real__): Add reswords.
20202 * hash.h: Regenerate.
20203 * lex.h (rid): Add RID_COMPLEX.
20204 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
20205 * lex.c (init_lex): Add building of RID_COMPLEX.
20206 (real_yylex): General cleanup in line with what c-lex.c also has,
20207 sans the cruft for traditional; add handling of SPEC_IMAG, complex
20208 types, and imaginary numeric constants.
20209 * parse.y (REALPART, IMAGPART): Add tokens.
20210 (unary_expr): Add REALPART and IMAGPART rules.
20211 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
20212 * decl.c (complex_{integer,float,double,long}_type_node): Define
20214 (init_decl_processing): Set up the types.
20215 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
20216 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
20217 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
20218 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
20219 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
20221 * method.c (build_overload_name): Add handling of the different
20222 COMPLEX_TYPEs, prefixing them with `J'.
20223 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
20224 as a template parm.
20225 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
20226 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
20227 (mapcar): Handle COMPLEX_CST.
20228 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
20229 (common_type): Add code for complex types.
20230 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
20231 (convert_for_assignment): Likewise.
20232 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
20234 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
20236 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
20237 tsubst_expr, as it might try to do overload resolution.
20239 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
20241 * pt.c (instantiate_class_template): Oops.
20243 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
20245 * cp-tree.def: Add TAG_DEFN.
20246 * pt.c (tsubst_enum): New fn.
20247 (instantiate_class_template): Use it.
20248 (tsubst_expr): Support TAG_DEFN.
20249 (tsubst): Support local enums.
20250 (tsubst_copy): Likewise.
20251 * decl.c (finish_enum): Likewise.
20252 (start_enum): If this is a local enum, switch to permanent_obstack.
20254 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
20256 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
20257 (finish_function): Put the base init code for constructors just
20258 after the parm cleanup insns.
20259 (struct cp_function): Add last_parm_cleanup_insn.
20260 (push_cp_function_context): Likewise.
20261 (pop_cp_function_context): Likewise.
20263 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
20265 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
20267 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20269 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
20270 for THUNK_FNDECL before we switch to temporary allocation.
20272 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
20274 * call.c (build_new_op): Handle null arg2 for ?:.
20276 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
20278 * except.c (expand_exception_blocks): Ensure that we flow through
20279 the end of the exception region for the exception specification.
20280 Move exception region for the exception specification in, so that
20281 it doesn't protect the parm cleanup. Remove some obsolete code.
20282 * decl.c (store_parm_decls): Likewise.
20283 (finish_function): Likewise.
20285 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
20287 * init.c (build_new): Fix nothrow handling.
20289 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20291 * init.c (emit_base_init): Don't warn about the initialization
20292 list for an artificial member.
20294 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20296 * expr.c (do_case): Handle !START case for the error msg.
20298 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
20300 * decl2.c, lang-options.h: New option -Weffc++.
20301 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
20304 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
20305 to MULTIPLE_SYMBOL_SPACES.
20307 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
20309 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
20311 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
20313 * typeck.c (c_expand_return): Don't complain about returning void
20314 to void in an artificial function.
20315 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
20316 don't set DECL_RESULT, set DECL_ARTIFICIAL.
20317 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
20319 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
20321 * init.c (init_decl_processing): Add support for setjmp/longjmp based
20322 exception handling.
20323 * except.c (init_exception_processing): Likewise.
20324 (expand_end_catch_block): Likewise.
20325 (expand_exception_blocks): Likewise.
20326 (expand_throw): Likewise.
20327 * exception.cc (__default_terminate): Likewise.
20329 * init.c (perform_member_init): Use new method of expr level
20330 cleanups, instead of cleanups_this_call and friends.
20331 (emit_base_init): Likewise.
20332 (expand_aggr_vbase_init_1): Likewise.
20333 (expand_vec_init): Likewise.
20334 * decl.c (cp_finish_decl): Likewise.
20335 (expand_static_init): Likewise.
20336 (store_parm_decls): Likewise.
20337 (cplus_expand_expr_stmt): Likewise.
20338 * decl2.c (finish_file): Likewise.
20340 * Make-lang.in (exception.o): Ok to compile with -O now.
20342 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
20343 we know it will be done later by the backend.
20345 * decl2.c (lang_f_options): Remove support for short temps.
20346 * lang-options.h: Likewise.
20348 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
20350 * tree.c (varargs_function_p): New fn.
20351 * method.c (emit_thunk): Replace broken generic code with code to
20352 generate a heavyweight thunk function.
20354 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
20356 * pt.c (process_template_parm): pedwarn about floating-point parms.
20358 * decl.c (grokdeclarator): inline no longer implies static.
20360 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
20362 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
20364 * class.c (check_for_override): The signature of an overriding
20365 function is not changed.
20367 * call.c (build_over_call): Move setting of conv into the loop.
20368 Note: this change, along with the related changes of the 18th thru
20369 the 20th of April, fix an infinite loop problem in conversions.
20371 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
20373 * call.c (build_user_type_conversion_1): Really ignore rvalue
20374 conversions when looking for a REFERENCE_TYPE.
20376 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
20377 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
20378 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
20379 (build_unary_op): Likewise.
20380 * call.c (build_over_call): See through a CONVERT_EXPR around the
20381 ADDR_EXPR for on a temporary.
20382 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
20383 the ADDR_EXPR for a local variable.
20385 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
20387 * call.c (build_user_type_conversion_1): If we're trying to
20388 convert to a REFERENCE_TYPE, only consider lvalue conversions.
20389 (build_new_function_call): Print candidates.
20390 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
20391 (reference_binding): Binding a temporary of a reference-related type
20394 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20396 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
20397 * tinfo2.cc (type_info::before): Likewise.
20399 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
20401 * call.c (implicit_conversion): Oops.
20403 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
20405 * call.c (implicit_conversion): Try to find a reference conversion
20406 before binding a const reference to a temporary.
20408 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
20410 * exception.cc (__default_unexpected): Call terminate by default,
20411 so that if the user overrides terminate, the correct function will
20414 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
20416 * parse.y (left_curly): Avoid trying to use any fields of
20417 error_mark_node, as there aren't any.
20419 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
20421 * lex.c (do_identifier): Avoid breaking on overloaded methods
20422 as default arguments.
20424 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
20426 * call.c (add_template_candidate): Initialize the variable "dummy".
20428 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
20430 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
20431 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
20433 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20435 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
20436 (debug_binfo): Delete decl, not needed.
20438 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
20439 promotes_to_aggr_type): Delete fns.
20440 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
20441 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
20442 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
20444 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
20446 * friend.c (is_friend_type): Delete fn.
20447 * cp-tree.h (is_friend_type): Delete decl.
20449 * decl.c (original_result_rtx, double_ftype_double,
20450 double_ftype_double_double, int_ftype_int, long_ftype_long,
20451 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
20452 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
20454 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
20456 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
20458 * decl.c (pushdecl_nonclass_level): #if 0, unused.
20459 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
20461 * lex.c (reinit_lang_specific): #if 0, unused.
20462 * cp-tree.h (reinit_lang_specific): #if 0 decl.
20464 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
20465 * cp-tree.h (revert_static_member_fn): Delete decl.
20467 * class.c (root_lang_context_p): Delete fn.
20468 * cp-tree.h (root_lang_context_p): Delete decl.
20470 * decl.c (set_current_level_tags_transparency): #if 0, unused.
20471 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
20473 * lex.c (set_vardecl_interface_info): Make static.
20474 * cp-tree.h (set_vardecl_interface_info): Delete decl.
20476 * call.c (find_scoped_type): Make static.
20477 * cp-tree.h (find_scoped_type): Delete decl.
20479 * search.c (convert_pointer_to_vbase): Make static.
20480 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
20482 * decl.c (const_ptr_type_node): Likewise.
20483 * cp-tree.h (const_ptr_type_node): Delete decl.
20485 * typeck.c (common_base_type): Make static.
20486 * cp-tree.h (common_base_types): Delete erroneous decl.
20488 * pt.c (classtype_mangled_name): Make static.
20489 * cp-tree.h (classtype_mangled_name): Delete decl.
20491 * lex.c (check_newline): Make static.
20492 * cp-tree.h (check_newline): Delete decl.
20494 * typeck.c (build_x_array_ref): Delete fn, same idea as
20496 * cp-tree.h (build_x_array_ref): Delete decl.
20498 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
20500 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
20502 * class.c (build_vtable_entry): Make static.
20503 * cp-tree.h (build_vtable_entry): Delete decl.
20505 * class.c (build_vbase_pointer): Make static.
20506 * cp-tree.h (build_vbase_pointer): Delete decl.
20508 * sig.c (build_sptr_ref): Add forward decl and make static.
20509 * cp-tree.h (build_sptr_ref): Delete decl.
20511 * call.c (build_new_method_call): Add forward decl and make static.
20512 * cp-tree.h (build_new_method_call): Delete decl.
20514 * call.c (build_object_call): Make static.
20515 * class.c (check_for_override, complete_type_p, mark_overriders):
20517 * decl.c (cp_function_chain): Likewise.
20518 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
20520 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
20522 * tree.c (build_cplus_array_type_1): Likewise.
20523 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
20524 (comp_target_parms): Likewise.
20526 * init.c (build_builtin_call): Make static.
20527 * cp-tree.h (build_builtin_call): Delete decl.
20529 * typeck.c (binary_op_error): Delete decl.
20530 * cp-tree.h (binary_op_error): Likewise.
20532 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20534 * call.c (build_method_call): Compare against error_mark_node
20535 directly, rather than the ERROR_MARK tree code.
20536 * cvt.c (cp_convert): Likewise.
20537 * decl.c (print_binding_level): Likewise.
20538 (duplicate_decls): Likewise.
20539 (grokdeclarator): Likewise.
20540 (grokdeclarator): Likewise.
20541 * init.c (expand_aggr_init_1): Likewise.
20542 (decl_constant_value): Likewise.
20543 * method.c (build_opfncall): Likewise.
20544 (hack_identifier): Likewise.
20545 * typeck.c (build_modify_expr): Likewise.
20547 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
20549 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
20551 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
20553 * pt.c (coerce_template_parms): Add new error message.
20555 * method.c (build_overload_value): Implement name mangling for
20556 floating-point template arguments.
20558 * method.c (build_overload_int, icat, dicat): Fix mangling of template
20559 arguments whose absolute value doesn't fit in a signed word.
20561 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20563 * friend.c: New file; put all of the friend stuff in here.
20564 * init.c: Instead of here.
20565 * Makefile.in (CXX_OBJS): Add friend.o.
20566 (friend.o): Add dependencies.
20567 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
20569 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
20571 * call.c (build_scoped_method_call): Complain if the scope isn't a
20574 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
20576 * parse.y (left_curly): Don't crash on erroneous type.
20578 * init.c (build_delete): Fix type of ref.
20580 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
20582 * search.c (get_vbase_1): Renamed from get_vbase.
20583 (get_vbase): Wrapper, now non-static.
20584 (convert_pointer_to_vbase): Now static.
20586 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
20587 * init.c (build_delete): Pass one.
20588 (build_partial_cleanup_for): Use build_scoped_method_call.
20589 * decl.c (finish_function): Pass a binfo.
20591 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
20593 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
20595 * typeck.c (build_c_cast): Lose other reference to flag.
20597 * call.c (build_field_call): Don't look for [cd]tor_identifier.
20598 * decl2.c (delete_sanity): Remove meaningless use of
20599 LOOKUP_HAS_IN_CHARGE.
20600 * decl.c (finish_function): Use build_scoped_method_call instead
20601 of build_delete for running vbase dtors.
20602 * init.c (build_delete): Call overload resolution code instead of
20603 duplicating it badly.
20605 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
20607 * call.c (build_over_call): Call mark_used before trying to elide
20610 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
20612 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20614 * typeck.c (build_modify_expr): Always pedwarn for a cast to
20615 non-reference used as an lvalue.
20617 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
20619 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
20621 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
20623 * parse.y (handler): Fix template typo.
20625 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
20627 * error.c (lang_decl_name): New fn.
20628 * tree.c (lang_printable_name): Use it.
20630 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
20632 * g++spec.c: Include config.h so that we can catch bzero #defines
20633 from the config file.
20635 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
20637 * new1.cc: Include a declaration for malloc, to avoid warning, and
20638 avoid lossing on systems that require one (ones that define malloc
20641 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
20643 * decl2.c (max_tinst_depth): New variable.
20644 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
20646 * pt.c (max_tinst_depth): Variable moved.
20647 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
20650 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
20652 * decl.c (xref_basetypes): Allow a base class that depends on
20653 template parms to be incomplete.
20655 * decl2.c (build_expr_from_tree): Support typeid(type).
20656 * rtti.c (get_typeid): Support templates.
20657 (expand_si_desc, expand_class_desc): Fix string length.
20658 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
20660 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
20662 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
20664 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
20666 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
20668 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
20669 smashes together template and non-template decls of the same
20672 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
20674 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
20676 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20678 * decl.c (duplicate_decls): Next route, pedwarn about different
20679 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
20681 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20683 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
20684 (struct lang_type): Delete has_default_implementation member.
20685 Increase dummy to 21.
20686 * decl.c (start_method): Delete usage.
20688 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
20689 store_after_parms, start_decl_1, auto_function): Add decls.
20690 (get_arglist_len_in_bytes, declare_implicit_exception,
20691 have_exceptions_p, make_type_decl, typedecl_for_tag,
20692 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
20693 build_component_type_expr, cplus_exception_name,
20694 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
20695 * call.c (build_this): Make static.
20696 (is_complete): Likewise.
20697 (implicit_conversion): Likewise.
20698 (reference_binding): Likewise.
20699 (standard_conversion): Likewise.
20700 (strip_top_quals): Likewise.
20701 (non_reference): Likewise.
20702 (build_conv): Likewise.
20703 (user_harshness): Likewise.
20704 (rank_for_ideal): Likewise.
20705 * decl.c (start_decl_1): Delete forward decl.
20706 (push_decl_level): Make static.
20707 (resume_binding_level): Make static.
20708 (namespace_bindings_p): Make static.
20709 (declare_namespace_level): Make static.
20710 (lookup_name_real): Make static.
20711 (duplicate_decls): Make static. Take register off NEWDECL and
20712 OLDDECL parm decls.
20713 * decl2.c (get_sentry): Make static.
20714 (temp_name_p): Delete fn.
20715 * except.c (auto_function): Delete decl.
20716 * lex.c (handle_{cp,sysv}_pragma): Make static.
20717 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
20718 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
20719 * pt.c (tsubst_expr_values): Make static.
20720 * rtti.c (combine_strings): Delete decl.
20722 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
20724 * pt.c (push_template_decl): Handle getting a typedef.
20726 * call.c (build_new_function_call): Complain about void arg.
20728 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20730 * decl.c (duplicate_decls): Give pedwarn of different exceptions
20731 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
20733 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
20735 * except.c (expand_throw): Don't expand the cleanup tree here,
20736 since we are not going to write the rtl out. Fixes problem with
20739 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
20741 * Make-lang.in: Add $(exeext) as necessary.
20743 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
20745 * parse.y (handler_seq): Must have at least one catch clause.
20747 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
20749 * call.c (add_builtin_candidate): Restore ?: hack.
20751 * decl.c (grok_op_properties): More warnings.
20753 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20755 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
20756 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
20758 * decl.c (duplicate_decls): Scale back to a warning, and only do
20761 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
20763 * decl.c (duplicate_decls): pedwarn mismatched exception
20766 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
20768 * call.c (build_new_method_call): Don't display the invisible
20769 argument for controlling virtual bases.
20771 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
20773 * new: Add nothrow new and delete, bad_alloc and throw specifications
20775 * decl.c (init_decl_processing): Add throw specification for delete.
20776 * new.cc (nothrow): Define.
20777 * lex.c (real_yylex): Removing warning that throw and friends are
20779 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
20780 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
20781 * Make-lang.in: Add new{1,2}.{cc,o}.
20783 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
20785 * lex.c (cons_up_default_function): Fix return type of synth op=.
20787 * init.c (emit_base_init): Add warnings for uninitialized members
20790 * decl.c (xref_basetypes): Add warning for non-polymorphic type
20791 with destructor used as base type.
20793 * decl.c (grok_op_properties): Add warning for op= returning void.
20794 * typeck.c (c_expand_return): Add warning for op= returning anything
20797 * class.c (finish_struct_1): Add warning for class with pointers
20798 but not copy ctor or copy op=.
20800 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
20801 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
20802 (instantiate_template): If -fexternal-templates, add this
20803 instantiation to pending_templates.
20805 * decl2.c (copy_assignment_arg_p): Disable old hack to support
20808 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
20810 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
20812 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
20814 * call.c (standard_conversion): Handle getting references. Tack
20815 on RVALUE_CONV here. Do it for non-class types, too.
20816 (reference_binding): Pass references to standard_conversion.
20817 (implicit_conversion): Likewise.
20818 (add_builtin_candidate): Disable one ?: kludge.
20819 (convert_like): Handle RVALUE_CONVs for non-class types.
20820 (joust): Disable the other ?: kludge.
20822 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20824 * decl.c (init_decl_processing): Add code to build up common
20825 function types beforehand, to avoid creation then removal of
20826 things already in the hash table.
20828 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
20830 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
20833 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
20834 current_template_parms.
20836 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
20838 * search.c (lookup_field): Don't return a function, check want_type.
20840 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20842 * init.c (build_new): Make sure PLACEMENT has a type.
20844 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
20846 * init.c (build_new): Support new (nothrow).
20848 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
20850 * pt.c (instantiate_decl): Also do push_to_top_level before setting
20853 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
20854 * pt.c (tsubst): Defer instantiation of default args.
20855 * call.c (build_over_call): Until here.
20857 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20859 * search.c (lookup_field): Make sure we have an
20860 IDENTIFIER_CLASS_VALUE before we try to return it.
20862 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20864 * call.c (build_method_call): Delete unused var PARM.
20865 (build_overload_call_real): Likewise.
20866 (build_object_call): Delete unused var P.
20867 (build_new_op): Likewise.
20868 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
20869 var definitions, which are never used.
20870 (shadow_tag): Delete unused var FN.
20871 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
20872 * init.c (build_new): Delete unused var ALLOC_TEMP.
20873 * method.c (hack_identifier): Delete unused var CONTEXT.
20874 (do_build_copy_constructor): Delete unused var NAME.
20875 (synthesize_method): Delete unused var BASE.
20876 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
20877 * rtti.c (build_headof): Delete unused var VPTR.
20878 (get_typeid): Delete unused var T.
20879 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
20881 (build_ptrmemfunc): Delete unused vars U and NINDEX.
20882 * typeck2.c (build_functional_cast): Delete unused var BINFO.
20884 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
20886 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
20887 things in a type being defined.
20888 * decl.c (finish_enum): Reverse the values so that they are in
20891 * pt.c (instantiate_class_template): Don't initialize
20892 BINFO_BASETYPES until the vector is filled out.
20893 (unify): Don't abort on conflicting bindings, just fail.
20894 (instantiate_decl): Do push_tinst_level before any tsubsting.
20896 * method.c (build_overload_value): Handle getting a
20897 TEMPLATE_CONST_PARM for a pointer.
20899 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
20901 * init.c (expand_member_init): Don't give 'not a base' error for
20904 * pt.c (instantiate_decl): Call import_export_decl later.
20906 * pt.c (instantiate_class_template): Return a value.
20908 * parse.y (extension): New rule for __extension__.
20909 (extdef, unary_expr, decl, component_decl): Use it.
20911 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
20913 * class.c (base_binfo): Remove unused base_has_virtual member.
20914 (finish_base_struct): Likewise.
20915 (finish_struct_1): Likewise.
20917 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
20919 * search.c (expand_upcast_fixups): Fix bogus code generation
20920 problem where the generated code uses the wrong index into the
20921 runtime built vtable on the stack. Old code could clobber random
20924 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
20926 * init.c (perform_member_init): Make sure the partial EH cleanups
20927 live on the function_obstack.
20929 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
20931 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
20932 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
20934 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
20936 * decl.c (grokvardecl): Avoid ANSI style initialization.
20938 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
20940 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
20942 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
20944 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
20946 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20948 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
20949 arguments we compare against. Start the count of I at 1, not 0,
20950 since argv[0] is still the command.
20952 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
20954 * lang-specs.h: Accept .cp as an C++ extension.
20956 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20958 * cp-tree.h (ptr_reasonably_similar): Add decl.
20960 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20962 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
20963 pointer. New local SPECBITS with the parm's value.
20964 (grokdeclarator): Pass &specbits down.
20966 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
20967 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
20969 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
20970 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
20972 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
20973 not an error_mark_node.
20975 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
20977 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
20978 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
20980 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20982 * decl.c (grokdeclarator): When giving an anonymous struct a name,
20983 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
20986 * typeck2.c (build_m_component_ref): If component is a pointer
20987 to data member, resolve the OFFSET_REF now.
20989 * call.c (convert_like): Don't go into infinite recursion.
20991 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
20993 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
20994 * tree.c (layout_basetypes): And on the vbase ptr.
20996 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20998 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
20999 CHAR_TYPE_SIZE so bool is always the same size as another type.
21001 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
21003 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
21005 * decl2.c (grok_x_components): Remove synthesized methods from
21006 TYPE_METHODS of an anonymous union, complain about member
21008 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
21010 (finish_function): Just clear the DECL_RTL of our arguments.
21012 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
21014 * decl2.c (finish_file): Emit DWARF debugging info for static data
21017 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
21019 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
21021 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
21024 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
21026 * Make-lang.in (g++-cross$(exeext)): Fix typo.
21028 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21030 Make the g++ driver now be a standalone program, rather than one
21031 that tries to run the gcc driver after munging up the options.
21032 * Make-lang.in (g++.c, g++spec.o): New rules.
21033 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
21035 (g++$(exeext)): New rule, based on xgcc rule.
21036 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
21037 * g++spec.c: New file.
21038 * g++.c: Removed file.
21040 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
21042 * cvt.c (build_up_reference): Arrange for any temporary values
21043 that have been keep in registers until now to be put into memory.
21045 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21047 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
21048 that make -j3 bootstrap works better.
21050 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
21052 * decl.c (pushtag): Do pushdecl for anon tags.
21054 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
21056 * typeck.c (c_expand_return): Fix logic.
21057 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
21059 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
21061 * g++.c (main): Make sure arglist has a final NULL entry. Add
21062 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
21063 stdin/stdout of the invoked program are redirected to
21066 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
21068 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
21070 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
21072 * init.c (resolve_offset_ref): Handle obj.vfn better.
21073 * typeck.c (build_component_ref): Set TREE_TYPE on result from
21076 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
21078 * typeck.c (convert_for_assignment): Also handle anachronistic
21079 implicit conversions from (::*)() to cv void*.
21080 * cvt.c (cp_convert_to_pointer): Likewise.
21082 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
21084 * lex.c (handle_cp_pragma): Fix bogus warning.
21086 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
21088 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
21089 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
21091 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
21093 * class.c (finish_struct_1): Support DWARF2_DEBUG.
21094 * search.c (dfs_debug_mark): Likewise.
21095 * decl2.c (finish_vtable_vardecl): Likewise.
21096 * decl.c (pushtag, finish_enum): Likewise.
21097 * lex.c (check_newline): Use debug_* instead of calling *out
21098 functions directly.
21100 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21102 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
21103 on some picky hosts.
21105 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
21107 * class.c (finish_struct_1): A class has a non-trivial copy
21108 constructor if it has virtual functions.
21110 * cvt.c (cp_convert): Always call a constructor.
21112 * call.c (reference_binding): Still tack on a REF_BIND
21113 for bad conversions.
21114 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
21116 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
21117 (c_expand_return): Likewise.
21118 * typeck2.c (digest_init): Likewise for { }.
21119 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
21120 * cvt.c (cp_convert): Handle failure better.
21122 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21124 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
21125 of GCC be path-relative.
21127 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
21129 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
21130 it does need choose-temp.o and pexecute.o.
21132 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21134 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
21135 that we still use it.
21136 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
21138 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
21140 * init.c (expand_default_init): Avoid calling constructors to
21141 initialize reference temps.
21143 * cvt.c (convert_to_reference): Fix.
21145 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
21147 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
21148 (convert_to_reference): Likewise.
21149 * typeck.c (convert_for_initialization): Likewise.
21150 * init.c (expand_default_init): Likewise.
21151 (expand_aggr_init_1): Likewise.
21152 * cp-tree.h (CONV_NONCONVERTING): Lose.
21153 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
21155 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
21157 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
21159 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
21161 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
21163 * init.c (expand_aggr_init_1): Don't crash on non-constructor
21166 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21168 * g++.c: Include gansidecl.h.
21169 (VPROTO, PVPROTO, VA_START): Delete.
21170 (choose_temp_base_try, choose_temp_base, perror_exec,
21171 run_dos) [__MSDOS__]: Delete fns.
21172 (pfatal_with_name): Delete fn.
21173 (temp_filename): Declare like in gcc.c.
21174 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
21175 (error_count, signal_count): Define.
21176 (error): Delete both definitions.
21177 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
21178 (pfatal_pexecute): Add fn from gcc.c.
21179 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
21180 code to use the pexecute stuff also used by gcc.c.
21181 (MIN_FATAL_STATUS): Define.
21182 * Make-lang.in (g++): Add dependency on and linking with
21183 choose-temp.o and pexecute.o.
21185 * cp-tree.h: Include gansidecl.h.
21186 (STDIO_PROTO): Delete #undef/#define.
21187 * cvt.c (NULL): Delete #undef/#define.
21188 * expr.c (NULL): Likewise.
21189 * init.c (NULL): Likewise.
21190 * rtti.c (NULL): Likewise.
21191 * xref.c (NULL): Likewise.
21193 * cp-tree.h (build_user_type_conversion): Add prototype.
21194 * call.c (build_user_type_conversion): Delete prototype. Correct
21195 decl of FLAGS arg to be an int.
21196 * cvt.c (build_user_type_conversion): Likewise.
21198 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
21200 * cp-tree.def: Add TRY_BLOCK and HANDLER.
21201 * except.c (expand_start_catch_block): Support templates.
21202 * parse.y (try_block, handler_seq): Likewise.
21203 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
21205 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
21207 * pt.c (current_template_args): New fn.
21208 (push_template_decl): Use it.
21209 * decl.c (grokdeclarator): Use it.
21211 * decl2.c (build_expr_from_tree): Dereference ref vars.
21213 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
21214 the decl-specifier-seq.
21216 * decl.c (grok_op_properties): Don't force the type of a conversion
21217 op to be complete. Don't warn about converting to the same type
21218 for template instantiations.
21220 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
21223 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
21225 * typeck.c (get_delta_difference): Remove previous bogusness.
21226 Don't give errors if force is set.
21228 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
21230 * decl2.c (finish_file): Don't emit debug info.
21231 * decl.c (pushdecl): Lose obsolete code.
21232 (grokdeclarator): Still do the long long thing after complaining.
21233 * search.c (note_debug_info_needed): Don't do anything if we're in a
21235 * method.c (synthesize_method): For non-local classes,
21236 push_to_top_level first.
21238 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
21240 * typeck.c (get_delta_difference): Add no_error parameter.
21241 (build_ptrmemfunc): Call get_delta_difference with no_error set;
21242 we don't want error messages when converting unrelated
21243 pointer-to-member functions.
21245 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
21247 * error.c (dump_expr): Improve the wording on error messages that
21248 involve pointer to member functions.
21250 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
21252 * cvt.c (cp_convert_to_pointer): Move code for conversions from
21253 (::*)() to void* or (*)() up a bit, so that we can convert from
21254 METHOD_TYPEs as well.
21256 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
21258 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
21259 There are no 'member' types.
21260 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
21261 (build_x_typeid): Handle errors.
21263 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
21265 * typeck.c (convert_for_assignment): Handle anachronistic implicit
21266 conversions from (::*)() to void* or (*)().
21267 * cvt.c (cp_convert_to_pointer): Likewise.
21268 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
21269 conversions from here.
21270 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
21271 * lang-options.h: Likewise.
21272 * decl2.c (warn_pmf2ptr): Define.
21273 * cp-tree.h: Declare it.
21274 * typeck2.c (digest_init): Allow pmfs down into
21275 convert_for_initialization.
21277 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
21279 * typeck.c (c_expand_return): Fix for returning overloaded fn.
21281 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
21283 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
21284 * decl.c (grok_reference_init): Pass DIRECT_BIND.
21285 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
21287 * call.c (convert_like): Don't pass INDIRECT_BIND.
21288 * typeck.c (convert_arguments): Likewise.
21289 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
21291 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
21293 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
21294 similar code in build_up_ref.
21295 * cvt.c (build_up_reference): Drastically simplify.
21297 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
21299 * typeck.c (signed_or_unsigned_type): If the given type already
21300 as the correct signedness, then just return it.
21302 * typeck.c ({un,}signed_type): If can't do anything, call
21303 signed_or_unsigned_type.
21305 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
21307 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
21308 current_class_type is NULL.
21310 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
21312 * class.c (finish_struct_1): Avoid empty structs by adding a field
21313 so layout_type gets the mode right.
21315 * typeck.c (c_expand_return): Drastically simplify.
21317 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
21319 * typeck.c (decay_conversion): Handle overloaded methods.
21321 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
21323 * call.c (build_over_call): A TARGET_EXPR has side-effects.
21325 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
21327 * cvt.c (convert_to_pointer_force): Add code to support pointer to
21328 member function to pointer to function conversions.
21329 * init.c (resolve_offset_ref): Add code to allow faked up objects,
21330 ignoring them if they are not used, and giving an error, if they
21332 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
21333 code, and so that we can give an error, if we needed an object,
21334 and one was not provided.
21335 (build_c_cast): Don't call default_conversion when we want to
21336 convert to pointer to function from a METHOD_TYPE.
21338 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
21340 * Make-lang.in (cplib2.ready): Fix logic.
21342 * decl.c (shadow_tag): Only complain about non-artificial function
21345 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
21347 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
21349 * expr.c (cplus_expand_expr): Pre-tweak call_target like
21350 expand_inline_function would.
21352 * pt.c (mark_decl_instantiated): If extern_p, call
21353 mark_inline_for_output.
21355 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
21357 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
21360 * typeck.c (get_delta_difference): Fix wording, as we can be used
21361 for pointer to data members.
21363 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
21365 * pt.c (tsubst): If the function decl isn't a member of this
21366 template, return a copy of the decl (including copying the
21367 lang-specific part) so we don't hose ourselves later.
21369 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
21371 * class.c (finish_struct): Remove DWARF-specific tag handling.
21372 * decl.c (pushtag): Likewise.
21373 (finish_function): Always clear DECL_ARGUMENTS on function decls with
21375 * decl2.c (finish_file): Emit DWARF debugging info for static data
21378 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
21380 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
21381 isn't the same as the new one before we whack it.
21383 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
21385 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
21386 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
21387 warn_traditional and warn_strict_prototypes; remove ancient
21388 'overload' code; remove references to flag_traditional.
21390 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
21392 * input.c (sub_getch): Handle 8-bit characters in string literals.
21394 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
21396 * tree.c (mapcar): Handle CONSTRUCTORs.
21397 (copy_to_permanent): Handle expression_obstack properly.
21399 * Make-lang.in (cplib2.txt): Also depend on the headers.
21401 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
21403 (expand_class_desc): Use USItype for offset field.
21404 * tinfo.h (struct __class_type_info): Likewise.
21406 * method.c (build_overload_int): TYPE_PRECISION should be applied
21409 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
21411 * call.c (build_new_op): A COND_EXPR involving void must be a
21414 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21416 * typeck.c (build_x_component_ref): New fn.
21417 (build_object_ref): Use it.
21418 * parse.y (primary): Use it.
21419 * decl2.c (build_expr_from_tree): Use it.
21420 * cp-tree.h: Declare it.
21422 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
21423 * error.c (dump_type_suffix): Handle variable arrays.
21425 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21427 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
21429 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
21431 * decl.c (lookup_name_real): Don't try to look up anything in a
21434 * tinfo2.cc (__throw_type_match_rtti): Oops.
21436 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21438 * Make-lang.in (exception.o): Use -fno-PIC for now.
21440 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
21442 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
21444 (get_tinfo_fn_dynamic): Extracted from build_typeid.
21445 * tinfo2.cc (__dynamic_cast): Adjust.
21447 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
21448 (build_x_typeid): Likewise.
21450 * parse.y: Call build_x_typeid instead of build_typeid.
21451 * cp-tree.def: Add TYPEID_EXPR.
21452 * pt.c (tsubst_copy): Handle typeid.
21453 * decl2.c (build_expr_from_tree): Likewise.
21454 * rtti.c (build_x_typeid): Throw bad_typeid from here.
21455 (build_typeid): Not here.
21456 * cp-tree.h: Declare build_x_typeid.
21458 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
21460 * call.c (convert_like): Pull out constant values.
21462 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
21464 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
21466 * decl.c (init_decl_processing): Create short int types before
21467 creating size_t in case a machine description needs to use
21468 unsigned short for size_t.
21470 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
21472 * Make-lang.in (exception.o): Turn off pic.
21474 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
21475 type, multi-level ptr conversions.
21477 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
21478 (throw_bad_cast): Use it.
21479 (throw_bad_typeid): New fn.
21480 (build_typeid): Throw bad_typeid as needed.
21482 (synthesize_tinfo_fn): Handle functions and arrays before checking
21485 * Remove .h from standard C++ headers, add new.h, move into inc
21488 * exception*: Remove pointer from object, constructors. Add
21489 default exception::what that uses type_info::name. Add
21490 __throw_bad_typeid.
21492 * init.c (build_new): Don't add a cookie to new (void *) T[2].
21494 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
21496 * Make-lang.in: Building C++ code depends on cc1plus.
21498 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21500 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
21501 a HOST_WIDE_INT, not a tree.
21503 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
21505 * exception.cc: Don't include <stdlib.h>.
21507 * Make-lang.in (c++.clean): Remove cplib2.*.
21509 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
21511 * parse.y (component_decl_1, component_costructor_declarator case):
21512 Pass attributes/prefix_attributes in tree list.
21514 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
21516 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
21518 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21520 * lex.c (do_identifier): Don't do deferred lookup in a template
21523 * typeck2.c (store_init_value): Oops.
21525 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
21526 New files for C++ lang-support library.
21527 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
21528 (CXX_LIB2FUNCS): Define.
21529 And rules for building the C++ lang-support code.
21530 * config-lang.in (headers): Define.
21531 (lib2funcs): Define.
21533 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
21535 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
21537 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
21538 * typeck2.c (store_init_value): Check for initializing pmf with { }
21540 (process_init_constructor): Not here.
21542 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
21544 * pt.c (begin_template_parm_list): Increment
21545 processing_template_decl here.
21546 (end_template_parm_list): Not here.
21547 (process_template_parm): No need to add 1 to it now.
21548 * *.c: Use processing_template_decl instead of current_template_parms
21549 to check for being in a template.
21551 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
21552 (tsubst_copy): Handle CONSTRUCTOR.
21553 (instantiate_decl): Set up context properly for variables.
21554 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
21555 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
21557 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21559 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
21561 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
21563 * method.c (make_thunk): Call comdat_linkage before setting the
21566 * decl2.c (comdat_linkage): Use make_decl_one_only.
21567 (import_export_decl): Likewise.
21568 * decl.c (init_decl_processing): Check supports_one_only instead of
21571 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
21573 * decl2.c (grokfield): Tighten checking for access decls.
21575 * decl.c (make_typename_type): Resolve references to
21576 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
21577 (lookup_name_real): Types that depend on a template parameter get
21578 an implicit 'typename' unless they're in the current scope.
21579 (start_decl_1): We don't care about incomplete types that depend
21580 on a template parm.
21581 (grokdeclarator): Resolve 'typename's in the type specifier that
21582 refer to members of the current scope.
21584 * call.c (build_over_call): Remove 'inline called before
21585 definition' diagnostic.
21586 (build_method_call): Likewise.
21587 * decl.c (duplicate_decls): Downgrade 'used before declared
21588 inline' to a warning, only with -Winline.
21590 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
21592 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
21594 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
21596 * call.c (build_method_call): When calling a signature
21597 default implementation, as in other cases, let instance_ptr simply
21600 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
21602 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
21604 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
21606 * except.c (expand_start_catch_block): Add a pushlevel so that -g
21607 works on hppa and SPARC.
21609 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21611 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
21613 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
21615 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
21616 before testing whether it's a signature.
21618 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
21620 * call.c (build_new_method_call): Don't complain about signature
21621 pointers and references not being an aggr type.
21622 (build_this): If a signature pointer or reference was passed in,
21624 (build_new_method_call): If instance is a signature pointer, set
21625 basetype to the signature type of instance.
21626 * sig.c (build_signature_method_call): Deleted basetype and
21627 instance parameters, they can be found as the DECL_CONTEXT of
21628 function and as the first argument passed in.
21629 * cp-tree.h: Changed declaration of build_signature_method_call.
21630 * call.c (build_method_call): Deleted first two arguments in call
21631 of build_signature_method_call.
21632 (build_over_call): Added call to build_signature_method_call.
21634 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
21636 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
21639 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21641 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
21643 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
21645 * except.c (expand_start_try_stmts): Move to except.c in the backend.
21646 (expand_end_try_stmts): Remove.
21648 * init.c (perform_member_init): Use add_partial_entry () instead
21649 of directly manipulating lists.
21650 (emit_base_init): Likewise.
21652 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
21654 * except.c (expand_exception_blocks): Always make sure USE and
21655 CLOBBER insns that came at the end still do, the backend relies
21658 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
21660 * call.c (build_over_call): We can only use a TARGET_EXPR of the
21663 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
21665 * cvt.c (convert_to_reference): Revert last change, don't complain
21666 about temp without target decl.
21668 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
21670 * decl.c (grokdeclarator): Don't core dump when void() is given.
21672 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
21674 * decl.c (copy_args_p): Don't crash.
21676 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
21678 * pt.c (tsubst): And support template args inside the exception
21681 * pt.c (tsubst): Add support for exception specifications in
21682 template functions.
21684 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
21686 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
21688 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
21689 (start_function): Likewise.
21690 (start_method): Likewise.
21691 (grokfield): Likewise.
21692 (make_call_declarator): Add throw spec parameter.
21693 (set_quals_and_spec): Add routine.
21694 * lex.c (set_quals_and_spec): Likewise.
21695 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
21696 * decl.c (shadow_tag): Eliminate the throw spec parameter to
21698 (groktypename): Likewise.
21699 (start_decl): Eliminate the throw spec parameter. Eliminate the
21700 throw spec parameter to grokdeclarator. Eliminate the throw spec
21701 field in DECL_STMT.
21702 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
21703 (grokfndecl): Remove useless set of raises.
21704 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
21705 the throw spec parameter to start_decl. Pull the throw spec out
21706 of the call declarator.
21707 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
21708 (start_function): Eliminate the throw spec parameter. Eliminate
21709 the throw spec parameter to grokdeclarator.
21710 (start_method): Likewise.
21711 * decl2.c (grokfield): Likewise.
21712 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
21713 (grokoptypename): Likewise.
21714 (finish_file): Eliminate the throw spec parameter to
21715 start_function. Add throw spec to make_call_declarator.
21716 * except.c (init_exception_processing): Add throw spec to
21717 make_call_declarator. Eliminate the throw spec parameter to
21719 (expand_start_catch_block): Eliminate the throw spec parameter to
21721 (expand_builtin_throw): Add throw spec to make_call_declarator.
21722 Eliminate the throw spec parameter to start_function.
21723 (start_anon_func): Likewise.
21724 * lex.c (make_call_declarator): Add throw spec parameter.
21725 (set_quals_and_spec): New routine.
21726 (cons_up_default_function): Add throw spec to make_call_declarator.
21727 Eliminate the throw spec parameter to grokfield.
21728 * method.c (synthesize_method): Eliminate the throw spec parameter
21730 * pt.c (process_template_parm): Eliminate the throw spec parameter
21732 (tsubst): Add throw spec to make_call_declarator.
21733 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
21734 (do_function_instantiation): Eliminate the throw spec parameter to
21735 grokdeclarator. Eliminate the throw spec parameter to
21737 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
21739 * parse.y (datadef): Remove non-winning optimization.
21741 (fndef): Remove ambiguous error productions uncovered by grammar
21743 (constructor_declarator): Add exception_specification_opt here.
21744 (component_constructor_declarator): Likewise.
21745 (direct_after_type_declarator): Likewise.
21746 (complex_direct_notype_declarator): Likewise.
21747 (direct_abstract_declarator): Likewise.
21748 (fn.def1): Remove exception_specification_opt.
21749 (fn.def2): Likewise.
21750 (condition): Likewise.
21751 (initdcl0): Likewise.
21752 (initdcl): Likewise.
21753 (notype_initdcl0): Likewise.
21754 (nomods_initdcl0): Likewise.
21755 (component_decl_1): Likewise.
21756 (component_declarator): Likewise.
21757 (after_type_component_declarator0): Likewise.
21758 (after_type_component_declarator): Likewise.
21759 (notype_component_declarator): Likewise.
21761 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21763 * call.c (build_over_call): Also use an INIT_EXPR when
21764 initializing anything from an rvalue.
21766 * call.c (build_over_call): Call stabilize_reference when building
21767 an INIT_EXPR instead of calling the copy ctor.
21769 * call.c (joust): Extend the previous change to all comparisons.
21771 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
21772 NO_LINKAGE_HEURISTICS.
21774 * decl2.c (finish_file): Emit any statics that weren't already.
21776 * typeck.c (build_static_cast): Implement.
21777 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
21778 * decl.c (grokparms): Use can_convert_arg instead of
21779 implicit_conversion directly.
21780 (copy_args_p): New fn.
21781 * cvt.c (convert_to_reference): Don't complain about temp with
21783 (build_up_reference): Handle TARGET_EXPRs.
21784 * call.c (build_over_call): Elide unnecessary temps.
21785 (can_convert*): Use new overloading code.
21787 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
21789 * call.c: Move TYPE_PTR*_MACROS ...
21790 * cp-tree.h: To here.
21791 * typeck.c (build_reinterpret_cast): Implement.
21793 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
21795 (joust): If we're comparing a function to a builtin and the worst
21796 conversion for the builtin is worse than the worst conversion for the
21797 function, take the function.
21799 * typeck.c (build_const_cast): Implement.
21800 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
21801 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
21803 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
21805 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
21806 too early. Make sure we explode if exprtype turns out to be a
21807 NULL_TREE when it shouldn't be.
21809 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
21811 * cp-tree.h: New routine make_call_declarator.
21812 * lex.c (make_call_declarator): Define it.
21813 * except.c (init_exception_processing): Use it.
21814 (expand_builtin_throw): Likewise.
21815 (start_anon_func): Likewise.
21816 * decl2.c (finish_file): Likewise.
21817 * lex.c (cons_up_default_function): Likewise.
21818 * parse.y: Likewise.
21819 * pt.c (tsubst): Likewise.
21821 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
21823 * decl2.c (groktypefield): Remove unused code.
21825 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
21827 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
21828 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
21829 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
21830 nonempty_cv_qualifiers.
21833 * lex.c (make_pointer_declarator): Change type_quals into
21835 (make_reference_declarator): Likewise.
21837 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21839 * decl.c (start_function): Only check interface_* for templates
21840 with flag_alt_external_templates.
21842 * call.c (build_new_op): Check for comparison of different enum types.
21843 (build_over_call): Fix arg # output.
21845 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
21847 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
21849 * call.c (build_new_op): Check for erroneous args.
21851 * call.c (build_new_method_call): Add missing args to cp_error.
21853 * tree.c (error_type): Don't print reference-to-array.
21855 * typeck.c (convert_for_assignment): Don't say contravariance for
21858 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
21860 * call.c (build_over_call): Diagnose bad convs for `this'.
21862 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
21865 * call.c (convert_like): Handle bad convs.
21866 (build_over_call): Handle bad convs better.
21868 * decl2.c: -fansi-overloading is now the default.
21870 * call.c (build_new_method_call): Check for erroneous args.
21872 * pt.c (instantiate_class_template): Propagate
21873 TYPE_USES_MULTIPLE_INHERITANCE.
21875 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
21877 * call.c (enforce_access): Add static to routine.
21879 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
21881 * call.c (build_user_type_conversion_1): Fix bad handling.
21882 (compare_ics): Likewise.
21884 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
21886 * call.c (standard_conversion): Oops.
21888 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
21890 * g++.c: Update test for win32 (&& ! cygwin32).
21892 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
21894 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
21895 (ptr_reasonably_similar): New fn.
21896 * call.c (BAD_RANK): New rank.
21897 (ICS_BAD_FLAG): New macro.
21898 (standard_conversion): Handle almost-right pointer conversions.
21899 (reference_binding): Handle bad rvalue bindings.
21900 (add_*_candidate): Stuff.
21901 (build_over_call): Pass bad conversions to convert_for_initialization.
21902 (compare_ics): Handle bad convs.
21905 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
21907 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
21908 integer_type_node when computing pointer offsets.
21910 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
21912 * tree.c (lvalue_type): New fn.
21913 (error_type): New fn.
21914 * call.c (op_error): Use error_type.
21915 (add_conv_candidate): Use lvalue_type.
21916 (add_builtin_candidates): Likewise.
21917 * error.c (args_as_string): Use error_type.
21919 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
21921 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
21922 (tsubst): Not here.
21924 * decl.c (init_decl_processing): With -ansi, __null's type is the
21925 signed integral type with the same number of bits as a pointer.
21926 Introduce a new variable null_node for it.
21927 * cp-tree.h: Adjust.
21928 * call.c (null_ptr_cst_p): Adjust.
21930 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
21932 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
21935 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
21937 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
21938 fns of classes without virtual functions.
21940 * call.c (add_function_candidate): Handle `this' specially.
21941 (compare_ics): Likewise.
21943 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
21945 * typeck.c (build_conditional_expr): Fix handling of __null.
21947 * decl2.c (comdat_linkage): New fn.
21948 (import_export_vtable): Use it.
21949 (import_export_decl): Use it.
21950 * method.c (make_thunk): Use it.
21952 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
21954 * pt.c (end_template_decl): If we don't actually have parms, return.
21955 * parse.y (template_header): Accept 'template <>'.
21957 * errfn.c: Allow 5 args.
21959 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
21961 * tree.c (make_temp_vec): New fn.
21962 * pt.c (push_template_decl): Handle partial specs.
21963 (instantiate_class_template): Likewise.
21964 (more_specialized): Use get_bindings.
21965 (more_specialized_class): New fn.
21966 (get_class_bindings): New fn.
21967 (most_specialized_class): New fn.
21968 (do_function_instantiation): List candidates for ambiguous case.
21969 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
21970 (shadow_tag): Call push_template_decl for partial specializations.
21971 * parse.y: Likewise.
21972 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
21973 DECL_TEMPLATE_MEMBERS.
21974 * call.c (print_z_candidates): Reduce duplication.
21976 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21978 * decl2.c (lang_decode_option): Allow -fansi-overloading.
21980 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
21982 * pt.c (get_bindings): New fn.
21983 (most_specialized): Likewise.
21984 (do_function_instantiation): Use them.
21985 (add_maybe_template): New fn.
21986 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
21987 * call.c (build_new_op): Handle guiding decls.
21988 (build_new_function_call): Likewise.
21989 * decl2.c (finish_file): Likewise.
21991 * decl2.c (mark_used): Do synthesis here.
21992 * call.c (build_method_call): Not here.
21993 (build_over_call): Or here.
21994 * typeck.c (build_function_call_real): Or here.
21995 * tree.c (bot_manip): Call mark_used on functions used in default
21998 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
22000 * decl2.c (import_export_vtable): Delete code that disabled vtable
22001 heuristic on systems with ASM_OUTPUT_EXTERNAL.
22003 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
22005 * typeck.c (build_x_function_call): Handle static call context
22008 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
22009 the function, not its outer block.
22011 * call.c (build_field_call): Pass fields on to build_opfncall
22012 regardless of TYPE_OVERLOADS_CALL_EXPR.
22013 (build_method_call): Pass on to build_new_method_call sooner.
22015 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
22017 * class.c (instantiate_type): Don't put a POINTER_TYPE to
22018 METHOD_TYPE on an expression. Also make a copy of rhs instead of
22021 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
22023 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
22024 (add_builtin_candidate): Don't take enums for ++.
22025 (build_new_method_call): Handle non-aggregates and field calls.
22026 Move new overloading code from...
22029 * decl.c (grokparms): Don't check default args in templates.
22031 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
22033 * cvt.c (build_new_op): Fix args to build_unary_op.
22034 (add_builtin_candidates): Don't call type_promotes_to on float.
22036 * decl.c (grokparms): Check the type of the default arg.
22038 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
22039 returning NULL_TREE.
22041 * typeck.c (build_x_binary_op): Avoid doing extra work.
22042 (build_x_unary_op): Likewise.
22043 (build_x_conditional_expr): Likewise.
22044 * cvt.c (build_over_call): Return.
22045 (add_builtin_candidate): Fix MEMBER_REF.
22046 (build_new_op): Likewise.
22048 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
22050 * method.c (build_overload_name): Put bug fix into code but leave
22051 disabled for now so we can be bug compatible with older releases
22052 that do repeats incorrectly. In the future, we can enable it.
22054 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
22056 * cvt.c (convert_like): Don't call build_cplus_new twice.
22058 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
22059 Control new overloading code with -fansi-overloading.
22061 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
22063 * cvt.c (build_over_call): Call build_cplus_new.
22064 * call.c (build_method_call): Likewise.
22065 * typeck.c (build_function_call_real): Likewise.
22066 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
22067 the COND_EXPR in a TARGET_EXPR so they use the same slot.
22069 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
22071 * typeck.c (complete_type): Propagate
22072 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
22074 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
22076 * cvt.c (joust): More ?: kludging. Sigh.
22077 (build_over_call): Don't try to synthesize global fns.
22079 * search.c (lookup_conversions): Use binfo marking.
22081 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
22083 * search.c (build_mi_matrix): Use the correct value of cid
22084 when determining the new mi_size.
22086 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
22088 * cvt.c (add_builtin_candidates): Do consider type conversion ops
22089 for the first parms of += et al.
22090 (strip_top_quals): New fn.
22091 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
22092 (implicit_conversion): Likewise.
22093 (add_builtin_candidates): Be careful about arrays.
22094 (build_new_method_call): Handle vtable optimization.
22096 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
22098 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
22099 * cvt.c (reference_binding): Use it.
22100 (implicit_conversion): Use it.
22101 (add_builtin_candidate, COND_EXPR): Use it.
22103 * cvt.c (build_new_function_call): Check for error args.
22105 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
22107 * gxx.gperf: Add __null.
22108 * hash.h: Regenerate.
22109 * lex.h: Add RID_NULL.
22110 * lex.c (init_lex): Create null_pointer_node here, stick it in
22112 * decl.c (init_decl_processing): Still set its type here.
22113 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
22114 (convert_to_pointer_force): Likewise.
22115 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
22117 * call.c (convert_harshness): Use null_ptr_cst_p.
22118 * typeck.c (convert_for_assignment): Likewise. Don't produce
22121 * error.c (args_as_string): Handle lists of actual args, too.
22122 * cvt.c (null_ptr_cst): Support (void*)0 for now.
22123 (build_user_type_conversion_1): Improve diagnostics.
22124 (build_new_function_call): Likewise.
22125 (build_object_call): Likewise.
22126 (build_new_method_call): Likewise. Move call before def diagnostic...
22127 (build_over_call): Here.
22129 * cvt.c (build_new_method_call): Don't complain about no match if
22130 LOOKUP_SPECULATIVELY.
22131 (build_over_call): Fix 'this' for virtual fn.
22132 (build_new_method_call): Add diagnostic.
22134 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22136 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
22137 constructors to be passed in.
22138 (build_over_call): Likewise.
22139 (build_user_type_conversion_1): Pass them in.
22140 (convert_like): Likewise.
22141 (build_object_call): Handle overloaded conversions.
22142 (build_over_call): Pass the right args to build_vfn_ref.
22143 (standard_conversion): Fix pmf convs.
22144 (joust): Handle comparing statics and non-statics.
22145 (build_new_method_call): New fn.
22146 * call.c (build_method_call): Call it if NEW_OVER.
22148 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
22150 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
22153 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
22155 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
22156 instead of just maybe_build_cleanup so that we deallocate the
22159 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22161 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
22162 * cp-tree.h (finish_prevtable_vardecl): Add decl.
22164 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
22166 * pt.c (instantiate_class_template): Call complete_type. Also, if
22167 we're at the end of the file and we just instantiated a template
22168 class with a vtable, call finish_prevtable_vardecl.
22170 * error.c (dump_decl): Don't explode (or explode more gracefully
22171 as appropriate) if the object being dumped has a null type.
22172 (dump_expr): Likewise.
22174 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
22175 by counting the number of nodes that we'll need before allocating
22177 (lookup_fnfields): Fix comment.
22178 (breadth_first_search): Fix comment.
22180 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
22182 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
22184 * class.c (finish_struct): Call cplus_decl_attributes here.
22185 (finish_struct_1): Not here.
22186 * cp-tree.h: Adjust.
22188 * pt.c (type_unification): New parameter STRICT.
22189 (unify): If STRICT, don't allow cv addition or base deduction.
22190 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
22192 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
22194 * search.c (get_template_base{_recursive}): New fns.
22195 * pt.c (more_specialized): New fn.
22196 (do_function_instantiation): Use it.
22197 (unify): Handle base deduction.
22198 * cvt.c (joust): Use more_specialized.
22199 Don't arbitrarily choose between non-builtin candidates.
22200 (build_over_call): Call require_complete_type.
22202 * decl.c (start_function): Statics are static even in a #pragma
22205 * decl2.c (import_export_vtable): Disable vtable heuristic on
22206 systems with ASM_OUTPUT_EXTERNAL.
22208 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
22209 (standard_conversion): No std conv to enum type.
22211 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
22214 * cvt.c (reference_binding): Bind directly to a base subobject of
22217 * cvt.c (build_new_op): Enforce access control.
22219 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
22221 * typeck2.c (process_init_constructor): When scanning the
22222 union for a named field, skip things that aren't FIELD_DECLs.
22224 * method.c (synthesize_method): Don't scan fndecl's rtl if
22225 we're at the end of the file; just assume the function can't
22228 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22230 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
22233 * cvt.c (build_user_type_conversion_1): Handle overloaded
22236 * cvt.c (add_builtin_candidates): Don't consider type conversion
22237 operators for the first parameter of operator=.
22239 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
22241 * typeck.c (complete_type): Only call layout_type if we're not
22242 expanding a template.
22244 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
22246 * cvt.c (compare_ics): Oops.
22248 * cvt.c (op_error): Oops.
22250 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
22251 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
22252 (build_conv): Use them.
22253 (implicit_conversion): Use them.
22254 (convert_like): Handle them.
22255 (build_new_op): Handle builtin COND_EXPR again.
22256 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
22257 in lists of types for COND_EXPR.
22258 (add_builtin_candidate): Add enum candidates for COND_EXPR.
22260 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
22262 * typeck.c (build_modify_expr): Always attempt to build a call to
22263 the assignment operator, even if we're using a default one.
22264 (convert_for_initialization): Call complete_type.
22266 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
22268 * cvt.c (reference_binding): A REF_BIND gets the reference type.
22269 (implicit_conversion): Likewise.
22270 (convert_like): Likewise.
22271 (compare_ics): Likewise.
22272 (compare_qual): Likewise.
22273 (print_z_candidates): Handle no candidates.
22274 (build_new_op): Don't handle builtin COND_EXPR for now.
22276 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
22278 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
22280 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
22282 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
22284 * cvt.c (build_builtin_candidate): Oops.
22285 (build_new_op): Oops.
22287 * method.c (build_opfncall): Pass COND_EXPR on.
22288 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
22289 (add_builtin_candidate{,s}): Likewise.
22290 (add_builtin_candidates): Likewise.
22291 (print_z_candidates, op_error, build_new_op): Likewise.
22292 (type_decays_to): New fn.
22293 * lex.c (init_lex): Just say ?: for COND_EXPR.
22295 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22297 * typeck.c (complete_type): Call layout_type rather than building
22300 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
22301 only use ptrdiff_t.
22303 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
22305 * cvt.c: Always compile the new overloading code (but don't use it).
22306 (implicit_conversion): Add a BASE_CONV when converting to
22307 the same class type.
22308 (convert_like): Handle BASE_CONV.
22310 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22312 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
22313 (add_builtin_candidate): Likewise.
22316 * typeck.c (build_x_function_call): Try an operator function
22317 whenever we call an object of class type.
22318 * method.c (build_opfncall): Pass CALL_EXPRs through.
22319 * cvt.c (implicit_conversion): Do const-ref case first.
22320 (add_conv_candidate, build_object_call, op_error): New fns.
22321 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
22322 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
22323 builtin candidates.
22324 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
22325 Fall back on preincrement handling. Use op_error.
22327 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
22328 an error_mark_node.
22329 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
22332 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
22334 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
22336 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
22338 * typeck.c (build_component_ref_1): Use build_component_ref
22339 instead of open coding it here.
22341 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
22343 * g++.c (main): Don't link with -lg++.
22346 * cvt.c (convert_to_reference): Don't use convert_from_reference on
22347 result of build_type_conversion.
22348 (cp_convert): Only call build_method_call for ctors if
22349 build_type_conversion failed.
22350 (ptr_complete_ob): New function.
22351 (TYPE_PTR{,OB,MEM}_P): New macros.
22352 ({add,build}_builtin_candidate{,s}): New functions.
22353 (print_z_candidates): Handle builtins.
22354 (build_user_type_conversion_1): Don't use conversion fns for
22355 converting to a base type.
22356 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
22357 (build_user_type_conversion): Use convert_from_reference.
22358 (build_new_op): New function.
22359 (build_over_call): Fix handling of methods.
22360 (compare_ics): Handle AMBIG_CONV properly.
22361 * typeck2.c: Increment abort count.
22362 * method.c (build_opfncall): Forward most requests to build_new_op.
22363 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
22365 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22367 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
22368 invalid second argument to dump_expr_list.
22370 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
22372 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
22374 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
22376 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
22379 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
22381 * typeck2.c (process_init_constructor): New pedwarn for using { }
22382 to initialize a pointer to member function.
22383 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
22384 we can avoid the new error.
22386 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
22388 * typeck.c (build_ptrmemfunc1): New function to hide details of
22389 pointer to member functions better.
22391 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
22393 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
22394 methods into the actual method, as we know the implied object is
22397 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22399 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
22400 inside a system header.
22402 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
22404 * call.c (build_method_call): Call complete_type on the
22407 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
22409 * typeck.c (build_component_ref): Always build up an OFFSET_REF
22410 for obj_ptr->func so that we can know which object to use in a
22413 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
22415 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
22416 around things. Also improve maintainability.
22418 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
22420 * decl.c (grokdeclarator): Check for overflow when evaluating an
22423 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
22425 * cvt.c (cp_convert): Don't check for ambiguity with constructor
22428 * typeck.c (build_x_function_call): Pass function overload
22429 questions to new overloading code if NEW_OVER.
22430 * init.c (expand_aggr_init_1): Only check for type conversion ops
22431 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
22432 Don't check for ambiguity with constructor if NEW_OVER.
22433 * cvt.c (convert_to_reference): Dereference the result of a type
22434 conversion operator.
22435 (build_conv): Propagate ICS_USER_FLAG.
22436 (implicit_conversion): Call instantiate_type.
22437 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
22438 (add_function_candidate): Fix cv-quals on argtype.
22439 (print_z_candidates): New function.
22440 (build_new_function_call): Call it.
22441 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
22442 consider non-converting constructors.
22443 Call print_z_candidates.
22444 Return an AMBIG_CONV for an ambiguous conversion.
22445 (build_user_type_conversion): Handle AMBIG_CONV.
22446 (convert_like): Fix test for building TARGET_EXPR.
22447 Call instantiate_type.
22448 Handle AMBIG_CONV and LVALUE_CONV.
22449 (build_over_call): Handle 0 args and ellipsis.
22450 * cp-tree.def: Add AMBIG_CONV.
22452 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
22454 * decl.c (lookup_name_real): If we find mem in obj when parsing
22455 `obj->mem', make sure we return the right value.
22457 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
22459 * search.c (get_base_distance): Call complete_type.
22461 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
22463 * decl.c (store_bindings): Make static.
22465 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
22467 * init.c (expand_aggr_init_1): Don't check type conversions if
22470 * cvt.c (z_candidate): Put back template field.
22471 (add_function_candidate): Set it.
22472 (add_template_candidate): Likewise.
22474 (compare_qual): Handle references and pointers to members.
22475 (compare_ics): Handle reference bindings.
22477 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
22479 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
22481 * call.c (compute_conversion_costs): Call complete_type.
22483 * tree.c (vec_binfo_member): Use comptypes instead of comparing
22484 pointers, so we can handle template parameters.
22486 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
22488 * cvt.c (cp_convert_to_pointer): We have to call complete_type
22489 here; let's make it explicit instead of a side effect of an
22492 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
22494 * cvt.c (z_candidate): Remove template field.
22495 (reference_binding): Handle binding to temporary.
22496 (implicit_conversion): Likewise.
22497 (add_function_candidate): Handle artificial constructor parms.
22498 Handle functions with too few parms.
22499 (add_template_candidate): New function.
22500 (build_user_type_conversion_1): Handle constructors.
22501 (convert_like): Likewise.
22502 (build_over_call): Likewise.
22503 (build_new_function_call): Support templates.
22504 (compare_ics): Fix reference, inheritance handling.
22506 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
22508 * decl.c: Add signed_size_zero_node.
22509 (init_decl_processing): Build it.
22510 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
22511 when we're trying to make a negative delta.
22513 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22515 Stop doing this damn index==strchr variable name confusion.
22516 * class.c (add_virtual_function): Change local var INDEX to be
22518 (add_method): Likewise.
22519 * lex.c (print_parse_statistics): Likewise.
22520 * search.c (make_memoized_table_entry): Likewise.
22521 (lookup_fnfields_here): Likewise.
22522 (lookup_field): Likewise.
22523 (lookup_fnfields): Likewise.
22524 (get_baselinks): Likewise.
22525 * sig.c (build_signature_table_constructor): Likewise.
22526 (build_signature_method_call): Likewise.
22527 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
22528 (get_member_function_from_ptrfunc): Likewise.
22529 (build_ptrmemfunc): Change local var INDEX to be IDX.
22530 (c_expand_start_case): Likewise.
22532 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
22534 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
22535 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
22536 (convert_to_reference): Use build_type_conversion to convert to
22537 the reference type directly.
22538 (standard_conversion): Fix void* case, non-conversions.
22539 (reference_binding): Fix expr == 0 case, non-conversions.
22540 (convert_like): Support REF_BIND.
22541 (compare_qual): Split out from compare_ics.
22542 (compare_ics): Use it, handle icses with only a qual_conv.
22544 * init.c (expand_vec_init): Don't crash if decl is NULL.
22546 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
22548 * mpw-config.in: New file, configury for Mac MPW.
22549 * mpw-make.sed: New file, makefile editing for MPW.
22551 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22553 * pt.c (instantiate_class_template): Call repo_template_used.
22555 * search.c (lookup_conversions): Only lookup conversions in
22558 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22560 * cp-tree.def: Renamed from tree.def, to avoid confusion with
22562 * cp-tree.h, lex.c: Include cp-tree.def.
22563 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
22565 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
22567 * init.c (build_vec_delete_1): Call complete_type.
22569 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
22571 * except.c (start_anon_func): Make sure anonymous functions are
22574 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
22576 * decl.c (finish_function): If function_depth > 1, set nested.
22578 * decl2.c (grokbitfield): Revert Bob's change.
22579 * class.c (finish_struct_1): Fix handling of named bitfield widths.
22581 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
22583 * pt.c (add_pending_template): Handle types.
22584 (lookup_template_class): With -fexternal-templates, just add the class
22585 to pending_templates instead of instantiating it now.
22586 * decl2.c (finish_file): Handle types in pending_templates.
22588 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
22590 * decl2.c (grokbitfield): Handle constant decls appropriately.
22591 Give an appropriate error message now instead of spewing core
22594 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
22596 * decl2.c: Don't turn on thunks by default for now.
22598 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
22600 * typeck.c (complete_type): Handle error_mark_node.
22601 (common_type, OFFSET_TYPE): Handle template_type_parms.
22603 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
22605 * pt.c (instantiate_decl): If at_eof, call import_export_decl
22606 regardless of DECL_INLINE.
22608 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
22610 * class.c (finish_struct_bits): Copy TYPE_SIZE.
22612 * rtti.c (build_dynamic_cast): Support templates.
22613 * tree.def: Support DYNAMIC_CAST_EXPR.
22614 * pt.c (tsubst_copy): Likewise.
22615 * decl2.c (build_expr_from_tree): Likewise.
22617 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
22619 * typeck.c (build_static_cast): Support templates.
22620 (build_const_cast): Likewise.
22621 * tree.def: Support CONST/STATIC_CAST_EXPR.
22622 * pt.c (tsubst_copy): Likewise.
22623 * decl2.c (build_expr_from_tree): Likewise.
22625 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
22627 * decl2.c (finish_vtable_vardecl): Don't trust
22628 TREE_SYMBOL_REFERENCED for vtables of local classes.
22630 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
22632 * pt.c (tsubst_copy): Handle operator T.
22634 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22636 * init.c (build_delete): Move creation of PARMS inside test of
22637 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
22639 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
22641 * typeck.c (build_conditional_expr): Don't assume that
22642 the arguments to ?: are always pointers or records.
22644 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
22646 * decl2.c (import_export_decl): Still emit static/weak/comdat
22647 copies of inline template functions with -fno-implicit-templates.
22649 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
22651 * init.c (build_delete): Determine the complete basetype
22652 path to the destructor we're calling.
22654 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
22656 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
22657 initialize the enum, because we really and truly don't know where
22659 (start_enum): Don't copy integer_zero_node because
22660 build_enumerator will do it.
22662 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22664 * decl.c (finish_function): Do access control on base destructors.
22666 * pt.c (tsubst, case FUNCTION_DECL): Set up
22667 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
22670 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
22672 * cvt.c (build_up_reference): If we have already extended the
22673 lifetime of the temporary, don't try it again.
22674 * typeck.c (c_expand_return): Don't try and convert the return
22675 value twice when we want a reference, once is enough.
22677 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
22679 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
22680 LOOKUP_ONLYCONVERTING at all for now.
22682 * search.c (add_conversions): Put the conversion function in
22683 TREE_VALUE, the basetype in TREE_PURPOSE.
22684 * cvt.c (build_type_conversion): Adjust.
22685 * cvt.c (build_expr_type_conversion): Adjust.
22686 * call.c (user_harshness): Adjust.
22688 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
22690 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
22693 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
22695 * except.c (expand_start_catch_block): Add a dummy region, if we
22696 get an error, so that we can avoid core dumping later.
22698 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
22700 * cp-tree.h (OFFSET_REF): Remove.
22701 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
22702 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
22703 * init.c (expand_aggr_init_1): Likewise.
22704 (build_new): Likewise.
22705 * typeck.c (expand_target_expr): Likewise.
22707 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
22709 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
22712 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
22714 * cvt.c (build_up_reference): Redo how and when temporaries are
22716 * decl.c (grok_reference_init): Don't try and be smart about
22719 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
22721 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
22722 (TARGET_EXPR...), now that it has 4 arguments.
22723 * tree.c (build_cplus_new): Likewise.
22725 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22727 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
22729 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
22730 * decl.c (struct saved_scope): Remove named_labels,
22731 {base,member}_init_list.
22732 (maybe_push_to_top_level): Don't set them. Call
22733 push_cp_function_context if appropriate.
22734 (pop_from_top_level): Likewise.
22736 * method.c (do_build_assign_ref): Remove obsolete check of
22737 TYPE_HAS_ASSIGN_REF (basetype).
22739 * decl.c (grokfndecl): Diagnose user definition of
22740 implicitly-declared methods.
22742 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
22744 * method.c (do_build_copy_constructor): Add code to give
22745 meaningful error messages instead of crashing.
22746 (do_build_assign_ref): Don't synthesize assignment operators for
22747 classes containing reference or const members.
22749 * class.c (struct base_info): Remove cant_synth_copy_ctor
22750 and cant_synth_asn_ref.
22751 (finish_base_struct): Remove the code that tries to conditionalize
22752 synthesis of copy constructors & assignment operators based on
22753 access permissions. Instead, let it fail when it tries to
22754 synthesize the copy constructor. This will give meaningful error
22755 messages instead of silently generating code to perform a bitcopy.
22757 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
22759 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
22760 determining types for constant values.
22762 * decl.c (struct named_label_list): Use instead of stuffing
22763 random items into a TREE_LIST node.
22764 (named_label_uses): Use the new struct.
22765 (poplevel): Likewise.
22766 (lookup_label): Likewise.
22767 (define_label): Add an error message to tell the user the line
22768 where the goto is located in addition to the destination of the
22770 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
22772 (finish_function): Likewise.
22774 (start_decl): Complain about defining a static data member
22775 in a different type from which it was declared.
22777 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
22779 * cvt.c (build_expr_type_conversion): Adjust.
22781 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
22783 * call.c (build_method_call): Always convert 'this' to the
22786 * search.c (add_conversions): Put the conversion function in
22787 TREE_VALUE, the type in TREE_PURPOSE.
22788 * cvt.c (build_type_conversion): Adjust.
22789 * call.c (user_harshness): Adjust.
22791 * method.c (emit_thunk): Call temporary_allocation and
22792 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
22794 * tree.c (build_cplus_array_type): Handle tweaking of
22795 TYPE_MAIN_VARIANT here.
22796 * typeck.c (common_type): Not here.
22798 * typeck.c (complete_type): Only try to complete an array type if
22801 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
22803 * decl.c (grokvardecl): Call complete_type.
22804 (grokdeclarator): Call complete_type for PARM_DECLs.
22806 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
22808 * pt.c (instantiate_class_template): Re-set
22809 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
22811 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
22813 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
22814 smart enough to do it right.
22815 * tree.c (cp_expand_decl_cleanup): Likewise.
22816 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
22817 cp_expand_decl_cleanup.
22818 (store_parm_decls): Likewise.
22819 (hack_incomplete_structures): Likewise.
22820 * except.c (push_eh_cleanup): Likewise.
22822 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
22824 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
22825 frontend to the backend where it belongs.
22826 * tree.c (unsave_expr): Likewise.
22827 (unsave_expr_now): Likewise.
22828 * tree.def (UNSAVE_EXPR): Likewise.
22829 * cp-tree.h (unsave_expr): Likewise.
22830 (unsave_expr_now): Likewise.
22832 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
22834 * init.c (emit_base_init): Make sure the partial EH cleanups live
22835 on the function_obstack.
22837 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
22839 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
22840 when checking for pointer types.
22842 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
22844 * pt.c (instantiate_class_template): Remove obsolete check for
22845 access declarations.
22847 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
22849 * call.c (build_overload_call): Simplify calls to
22850 build_overload_call by removing last parameter.
22851 (build_method_call): Likewise.
22852 * cp-tree.h: Likewise.
22853 * method.c (build_opfncall): Likewise.
22854 * typeck.c (build_x_function_call): Likewise.
22856 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
22858 * call.c (default_parm_conversions): Factor out common code.
22859 (build_method_call): Use it.
22860 (build_overload_call_real): Use it.
22862 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
22864 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
22865 but pedwarn as the code is bogus.
22866 * typeck.c (decay_conversion): Likewise.
22867 (build_function_call_real): Use build_addr_func instead of
22868 default_conversion. Don't allow pointer-to-method functions down
22870 (build_unary_op): Use real pointer-to-member functions instead of
22872 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
22873 (convert_for_assignment): Removed some obsolete code.
22874 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
22875 build_x_function_call instead of current_class_ptr. Only call
22876 digest_init once on an initializer, we do this just checking
22878 (build_expr_from_tree): Pass current_class_ref to
22879 build_x_function_call instead of current_class_ptr.
22880 * init.c (build_member_call): Likewise.
22881 * pase.y: Likewise.
22882 * error.c (dump_expr): Handle OFFSET_REFs better.
22883 * pt.c (unify): Handle pointer-to-member functions better.
22884 * decl.c (finish_function): Clear out current_class_ref just like
22885 we do for current_class_ptr.
22887 * typeck.c (get_delta_difference): Handle virtual bases better.
22889 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
22891 * sig.c (build_signature_table_constructor): Use the delta for
22892 the original basetype for this virtual function with thunks.
22893 (build_signature_method_call): We still need to adjust 'this'
22896 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
22898 * call.c (build_addr_func): New routine. Used to get the `real'
22899 address of a function or a method. Needed to avoid getting a
22900 pointer-to-member function.
22901 (build_call): New routine to build CALL_EXPRs.
22902 (build_method_call): Use it.
22903 * cvt.c (convert_to_aggr): Likewise.
22904 * typeck.c (build_function_call_real): Likewise.
22905 * sig.c (build_signature_table_constructor): Use build_addr_func.
22906 * cp-tree.h (build_call, build_addr_func): Declare them.
22908 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
22910 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
22911 * parse.y: Remove uses of LOOKUP_AGGR.
22913 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
22915 * *.[chy]: Rename current_class_decl to current_class_ptr, and
22916 C_C_D to current_class_ref.
22918 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
22920 * call.c (convert_harshness): Tighten up pointer conversions.
22922 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
22924 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
22925 (finish_file): Likewise.
22927 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
22929 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
22931 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
22934 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22936 * decl2.c: Turn on thunks by default where supported.
22938 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
22940 * cp-tree.h (build_overload_call_maybe): Removed.
22941 * call.c (build_overload_call_real): Invert meaning of last arg to
22942 be require_complete.
22943 (build_overload_call): Likewise.
22944 * typeck.c (build_x_function_call): Use build_overload_call_real
22945 instead of build_overload_call_maybe.
22947 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
22949 * decl2.c (finish_file): Don't try to emit functions that haven't
22952 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
22954 * decl2.c (finish_vtable_vardecl): Oops.
22956 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
22957 Also store the bindings from previous_class_values.
22958 (pop_from_top_level): Restore them.
22960 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
22962 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
22963 symbol has been referenced.
22964 (finish_file): Re-join synthesis/vtable loop with inline emission
22965 loop, disable inlining when an inline is output.
22967 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
22969 * except.c (init_exception_processing): Setup saved_in_catch.
22970 (push_eh_cleanup): Reset __eh_in_catch.
22971 (expand_start_catch_block): Set __eh_in_catch.
22973 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
22975 * except.c (push_eh_cleanup): Add tracking for whether or not we
22976 have an active exception object.
22977 (expand_builtin_throw): Use it to make sure a rethrow without an
22978 exception object is caught.
22980 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
22982 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
22985 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
22987 * decl2.c (finish_file): Also use sentries for vars with
22988 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
22991 * lex.c (handle_cp_pragma): Disable #pragma
22992 interface/implementation if SUPPORTS_ONE_ONLY > 1.
22994 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
22996 * method.c (emit_thunk): Wrap default case in
22997 temporary/permanent_allocation.
22999 * method.c (make_thunk): Use DECL_ONE_ONLY.
23000 (emit_thunk): Call assemble_end_function.
23002 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
23004 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
23005 (import_export_decl): Likewise.
23006 (finish_prevtable_vardecl): Disable vtable hack if
23007 SUPPORTS_ONE_ONLY > 1.
23009 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
23011 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
23012 PREDECREMENT_EXPRs take two arguments, not one.
23014 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
23016 * class.c (build_vtable_entry): Don't build thunks for abstract
23019 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
23022 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
23024 * class.c (set_rtti_entry): Use size_zero_node.
23025 (build_vtable): Likewise.
23027 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
23029 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
23030 (prepare_fresh_vtable): Likewise.
23032 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
23034 * method.c (emit_thunk): Call mark_used on the target function.
23036 * call.c (build_method_call): Don't warn about pending templates.
23038 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
23040 * decl2.c (finish_file): Fix list walking logic.
23042 * typeck2.c (check_for_new_type): Only warn if -pedantic.
23044 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
23046 * class.c (finish_struct_1): Remove old code for
23047 dont_allow_type_definitions.
23048 * cp-tree.h: Likewise.
23049 * spew.c: Make sure cp-tree.h is included before parse.h, so the
23050 definition of flagged_type_tree is found before it is used.
23052 * parse.y: Added the ftype member to the type union, and changed a
23053 number of rules to use it instead of ttype. Added calls to
23054 check_for_new_type() as appropriate.
23055 * typeck2.c (check_for_new_type): New function for checking
23056 if a newly defined type appears in the specified tree.
23057 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
23058 for check_for_new_type().
23060 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
23062 * decl2.c (finish_file): Only use a sentry if the decl is public.
23064 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
23065 don't pass LOOKUP_ONLYCONVERTING.
23067 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
23069 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
23070 properly keeps track of const and volatile type modifiers.
23072 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
23074 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
23075 * pt.c (comp_template_args): Use it.
23077 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
23078 assemble_external for artificial function decls.
23080 * decl.c (cp_finish_decl): Oops.
23082 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
23084 * decl2.c (import_export_decl): Put static data member templates
23085 into common storage, or make them weak, depending on whether they
23086 are dynamically or statically initialized.
23087 (get_sentry): New function.
23088 (finish_file): Do import_export_decl for static data members before
23089 building the init/fini functions. Don't init/fini a variable that's
23090 EXTERNAL. Use a sentry for variables in common. Fix mismatching
23091 push/pop_temp_slots.
23092 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
23093 expand_static_init thang.
23094 * method.c (get_id_2): New function.
23096 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
23098 * parse.y (empty_parms): Make sure we use C++-style prototypes
23099 when we're declaring member functions.
23101 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
23103 * Makefile.in (CONFLICTS): 16 s/r conflicts.
23104 * parse.y (self_template_type): New nonterminal.
23106 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
23108 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
23110 * parse.y (base_class.1): Allow 'typename foo::bar'.
23112 * lex.c (check_newline): Remove #pragma code that plays with the
23113 input stream, since we now deal with tokens. Clear nextchar when
23115 (handle_cp_pragma): Use real_yylex.
23116 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
23119 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
23121 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
23123 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23125 * parse.y: New token SELFNAME for potential constructor.
23126 * spew.c (yylex): Handle it.
23127 * lex.c (identifier_type): Produce it.
23129 * parse.y (complete_type_name): In :: case, don't push class binding.
23130 (complex_type_name): Likewise.
23132 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
23134 * typeck.c (build_reinterpret_cast): Handle pointer to member
23137 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23139 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
23141 (check_newline): Put the vtable/unit/implementation/interface pragma
23142 code into handle_cp_pragma, replacing it with a call.
23143 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
23144 args. Get the next token after handling the pragma token.
23146 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
23148 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
23149 (convert_to_pointer_force): Likewise.
23151 * init.c (build_new): Fix array new without -fcheck-new.
23153 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
23155 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
23156 tree.c: Lose TYPE_NESTED_NAME.
23158 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
23161 * tree.def: Add VEC_INIT_EXPR.
23162 * expr.c (cplus_expand_expr): Handle it.
23163 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
23164 the extra file-scope symbol nastiness.
23166 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
23168 * method.c (make_thunk): Thunks are static.
23169 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
23171 * decl2.c (mark_vtable_entries): Emit thunks as needed.
23172 (finish_file): Don't emit them here.
23174 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
23176 * rtti.c (build_dynamic_cast): Handle null pointers.
23177 (ifnonnull): New function.
23179 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
23181 * call.c (build_method_call): Remember the original basetype we
23182 were called with. Give an error message instead of trying
23183 (incorrectly) to call a non-static member function through a
23184 non-inherited class.
23186 * search.c (expand_upcast_fixups): Mark the new fixup as
23189 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
23191 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
23193 * class.c (set_rtti_entry): Fix for thunks.
23195 * decl2.c (import_export_decl): Still emit typeinfo fns for
23196 cv-variants of builtin types.
23198 * rtti.c (expand_class_desc): Set up base_info_type_node here.
23199 (init_rtti_processing): Instead of here.
23201 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
23203 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
23204 (build_typeid): Only complain about taking dynamic typeid without
23207 * decl2.c: flag_rtti defaults to 1.
23209 * rtti.c (get_tinfo_var): The general class case is now smaller.
23210 (init_rtti_processing): Pack the latter three fields of base_info
23213 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
23215 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
23217 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
23219 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
23220 (push_memoized_context): Split out code to undefer pop_type_level to
23221 (clear_memoized_cache): here.
23222 (pop_memoized_context): We can only handle one layer of deferral of
23223 pop_type_level so clear the cache, if there was a previous level.
23225 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
23227 * rtti.c (init_rtti_processing): Build up base_info_type_node.
23228 (expand_class_desc): Use one pointer to an array of base_info
23229 structs, passed using a CONSTRUCTOR.
23231 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
23233 * class.c (build_vbase_path): Remove block extern for
23234 flag_assume_nonnull_objects here.
23235 (build_vfn_ref): Split out functionality into build_vtbl_ref.
23236 (build_vtbl_ref): New routine.
23237 (build_vtable): Set up rtti info here.
23238 (add_virtual_function): Note in CLASSTYPE_RTTI the best
23239 place where we can get the rtti pointers from to avoid having to
23240 search around for a place.
23241 (finish_base_struct): Likewise.
23242 (finish_struct_1): Likewise. Never create totally new vtables
23243 with totally new vtable pointers for rtti. Disable code to layout
23244 vtable pointers better until we want to break binary
23246 * rtti.c (build_headof_sub): New routine to convert down to a
23247 sub-object that has an rtti pointer in the vtable.
23248 (build_headof): Use it. Also, use build_vtbl_ref now to be more
23250 (build_dynamic_cast): Make sure we have saved it, if we need to.
23251 * search.c (dfs_init_vbase_pointers): Disable code that deals with
23252 a more efficient vtable layout, enable later.
23253 * call.c (flag_assume_nonnull_objects): Moved declaration to
23254 * cp-tree.h: here. Declare build_vtbl_ref.
23255 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
23256 function calls that want a tree.
23258 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
23260 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
23261 other X subobjects in the most derived type. Ack.
23263 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
23264 get_typeid will do it for us.
23265 (get_typeid_1): Break out call-building for expand_*_desc to use.
23266 (get_typeid): Call it.
23267 (expand_*_desc): Likewise.
23268 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
23270 (init_decl_processing): Lose builtin_type_tdescs lossage.
23271 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
23273 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
23275 * pt.c (tsubst): When calling set_nested_typename, use
23276 TYPE_NESTED_NAME (current_class_type) instead of
23277 current_class_name.
23279 * decl.c (pushdecl): Likewise.
23280 (pushdecl_class_level): Likewise.
23281 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
23282 set_nested_typename.
23284 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
23286 * rtti.c (synthesize_tinfo_fn): Handle arrays.
23288 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
23290 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
23292 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
23293 (init_rtti_processing): Lose bad_cast_type.
23294 (build_dynamic_cast): Use throw_bad_cast.
23296 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
23298 * decl2.c (finish_file): Don't synthesize artificial functions
23299 that are external and not inline.
23301 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
23303 * decl2.c (finish_file): Handle having new inlines added to
23304 saved_inlines by synthesis.
23306 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
23308 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
23310 RTTI rewrite to initialize nodes as needed, not require that
23311 users #include <typeinfo>, complete functionality and reduce wasted
23313 * rtti.c (init_rtti_processing): New fn.
23314 (build_typeid): The vtable entry is now a function.
23315 (get_tinfo_var): New fn.
23316 (get_tinfo_fn): Likewise.
23317 (get_typeid): Use it.
23318 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
23319 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
23321 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
23322 (synthesize_tinfo_fn): New fn.
23323 * method.c (build_t_desc_overload): Lose.
23324 (build_overload_with_type): More generic.
23325 * decl.c (init_decl_processing): Call init_rtti_processing.
23326 * class.c (set_rtti_entry): Use get_tinfo_fn.
23327 * decl2.c (mark_vtable_entries): Mark the rtti function.
23328 (finish_prevtable_vardecl): Don't build_t_desc.
23329 (import_export_decl): Handle tinfo functions.
23330 (finish_file): Likewise.
23331 * typeck.c (inline_conversion): New fn.
23332 (build_function_call_real): Use it.
23333 * cp-tree.h: Add decls.
23335 * method.c (hack_identifier): Also convert component_refs from
23338 * lex.c (cons_up_default_function): Use the type, not the name, in
23341 * decl2.c (import_export_vtable): Fix weak vtables.
23343 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
23345 * search.c (get_base_distance_recursive): Fix access checks for
23348 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23350 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
23352 (convert_harshness): Add prototypes wrapped by PROTO.
23353 * decl2.c (grok_function_init): Likewise.
23354 (do_toplevel_using_decl): Change to void return type.
23355 * class.c (build_vtable_entry): Remove decl of make_thunk.
23356 (merge_overrides): Fix order of arg definitions.
23357 (finish_vtbls): Likewise.
23358 (fixup_vtable_deltas): Likewise.
23359 (modify_all_direct_vtables): Likewise.
23360 (modify_all_indirect_vtables): Likewise.
23361 * search.c (get_base_distance_recursive): Likewise.
23362 (get_abstract_virtuals_1): Likewise.
23363 (fixup_virtual_upcast_offsets): Likewise.
23364 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
23365 * init.c (perform_member_init): Fix order of arg definitions.
23366 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
23367 * cp-tree.h (make_thunk): Add decl.
23368 (overload_template_name, push_template_decl): Add decls.
23369 (do_toplevel_using_decl): Change to void return type.
23370 (vec_binfo_member): Add decl.
23372 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23374 * typeck.c (mark_addressable, convert_for_assignment,
23375 convert_for_initialization, pointer_int_sum, pointer_diff,
23376 unary_complex_lvalue): Add prototypes wrapped by PROTO.
23377 (convert_sequence): #if 0 fn decl, since definition also is.
23379 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
23381 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
23382 cast to pointer types for type searching.
23384 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23386 * typeck.c (get_delta_difference): Use cp_error, not error, in the
23387 case where BINFO == 0.
23389 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
23391 * call.c (build_method_call): Fix wording of error messages so
23392 constructors come out right.
23394 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
23396 * decl.c (push_overloaded_decl): Don't warn about hidden
23397 constructors when both the type and the function are declared
23398 in a system header file.
23400 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
23402 * class.c (finish_struct_1): Propagate the TYPE_PACKED
23403 flag for the type to the type's fields.
23405 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23407 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
23409 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
23411 * class.c (base_info, finish_base_struct): Replace
23412 needs_virtual_dtor with base_has_virtual.
23414 (finish_struct_1): Remove the old code that tried to make default
23415 destructors virtual. Use base_has_virtual when checking if we need
23416 to add a vtable entry for the rtti code.
23418 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
23420 * pt.c (push_template_decl): Complain about template decl with
23421 inappropriate declaration.
23423 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
23425 * typeck.c (build_x_unary_op): Remove bogus check for taking
23426 the address of a member function.
23428 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
23430 * parse.y (constructor_declarator): Only push the class if
23431 we are not already in the class.
23433 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
23435 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
23436 Add additional argument to INIT_CUMULATIVE_ARGS.
23438 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
23440 * decl.c (shadow_tag): Fix error about anon union with methods.
23442 * parse.y (self_reference): Only generate a self-reference if this
23443 is a non-template class.
23444 (opt.component_decl_list): Only use it if it was generated.
23446 * parse.y (component_decl_1): Use constructor_declarator.
23447 (fn.def2): Likewise.
23448 (notype_component_declarator0): Likewise.
23450 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
23452 * typeck.c (build_x_unary_op): Add checks for taking the address
23453 of a TARGET_EXPR or of a member function, and give appropriate
23456 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
23458 * pt.c (process_template_parm): Allow template type parms to be
23459 used as types for template const parms.
23461 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
23463 * init.c (expand_vec_init): Ensure the eh cleanups are on the
23466 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
23468 * decl.c (lookup_name_real): Be even more picky about the
23469 ambiguous lookup warning.
23470 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
23471 * parse.y (constructor_declarator): Rather than here.
23473 * parse.y (constructor_declarator): New nonterminal.
23475 (explicit_instantiation): Likewise.
23477 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23479 Add implicit declaration of class name at class scope.
23480 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
23481 * parse.y (self_reference): New nonterminal.
23482 (opt.component_decl_list): Use it.
23483 (fn.def1): Add nested_name_specifier type_name cases.
23484 * class.c (build_self_reference): New function.
23485 (finish_struct): Handle access_default later, move self-reference
23487 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
23488 * cp-tree.h: Adjust.
23490 * pt.c (do_function_instantiation): Separate handling of member
23491 functions and non-member functions properly.
23493 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
23495 * pt.c (process_template_parm): Improve error for 'volatile class K'.
23497 * class.c (finish_struct_1): Check the right slot for destructors.
23499 * decl.c (start_enum): Complain about enum templates.
23501 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
23503 * init.c (resolve_offset_ref): Offset pointers to member data by one.
23504 * typeck.c (unary_complex_lvalue): Likewise.
23506 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
23508 * typeck.c (c_expand_return): Check for a returned local
23509 array name, similar to the check for an ADDR_EXPR.
23511 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
23513 * decl.c (cp_finish_decl): Don't build cleanups for static
23516 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
23518 * typeck.c (build_modify_expr): Fix error messages to be more
23520 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
23521 assignment operators.
23522 * error.c (assop_as_string): Likewise. Add support for `%Q' for
23523 assignment operators.
23525 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
23527 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
23528 give an error if initialized. pedwarn about nested type with the
23529 same name as its enclosing class.
23531 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
23533 * typeck.c (require_complete_type): Be sure to instantiate the
23534 MAIN_VARIANT of the type.
23536 * decl2.c (finish_file): Instantiate pending templates before
23537 processing static constructors and destructors.
23539 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
23542 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
23544 * decl2.c (delete_sanity): If error_mark_node is passed
23545 in as an expression, quit while we're ahead.
23547 * decl.c (grokdeclarator): Give an error message if `friend'
23548 is combined with any storage class specifiers.
23550 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
23552 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
23553 definition of nonexistent nested type.
23555 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
23556 not to say 'typedef'.
23558 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23560 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
23561 * search.c (dfs_walk, dfs_init_vbase_pointers,
23562 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
23563 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
23565 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
23567 * except.c (build_throw): Support minimal parse.
23568 * pt.c (tsubst_copy): Support THROW_EXPR.
23569 * decl2.c (build_expr_from_tree): Likewise.
23571 * pt.c (mangle_class_name_for_template): Always allocate
23574 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
23576 * cvt.c (cp_convert_to_pointer): Give an appropriate error
23577 when trying to cast from an incomplete type.
23579 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23581 * pt.c (instantiate_class_template): Don't bother setting up
23582 CLASSTYPE_TAGS explicitly, as the nested types will add
23585 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
23587 * decl.c (shadow_tag): Remove old error check for usage of
23588 an enum without a previous declaration.
23589 (xref_tag): Add error message about usage of enums without a
23590 previous declaration.
23592 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
23594 * lex.c (do_identifier): Only do name consistency check if we're
23597 * pt.c (push_template_decl): Don't crash if we get a member defn
23598 that doesn't match.
23600 * decl.c (xref_tag_from_type): New function to do an xref without
23601 always having to figure out code_type_node.
23602 * cp-tree.h: Declare it.
23603 * pt.c (instantiate_class_template): Use it for friend classes.
23604 (lookup_template_class): Use it.
23606 * typeck2.c (build_functional_cast): Pull out a single parm before
23607 passing it to build_c_cast.
23609 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
23611 * expr.c (do_case): Give an error message if a pointer is
23612 given as a case value.
23614 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
23616 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
23619 * lex.c (cons_up_default_function): Really, now, interface hackery
23620 does not apply to synthesized methods.
23622 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
23624 * call.c (build_method_call): Ctors and dtors now have special names
23625 with respect to lookups.
23626 * class.c (add_method): Likewise.
23627 (grow_method): Likewise.
23628 (finish_struct_methods): Likewise.
23629 (warn_hidden): Likewise.
23630 (finish_struct_1): Likewise.
23631 * cvt.c (convert_to_reference): Likewise.
23632 (convert_to_aggr): Likewise.
23633 (cp_convert): Likewise.
23634 * decl2.c (check_classfn): Likewise.
23635 * init.c (expand_member_init): Likewise.
23636 (expand_default_init): Likewise.
23637 (expand_aggr_init_1): Likewise.
23638 (build_offset_ref): Likewise.
23639 (build_new): Likewise.
23640 (build_delete): Likewise.
23641 * lex.c (do_inline_function_hair): Likewise.
23642 * search.c (lookup_field_1): Likewise.
23643 (lookup_fnfields_here): Likewise.
23644 (lookup_field): Likewise.
23645 (lookup_fnfields): Likewise.
23646 (get_virtual_destructor): Likewise.
23647 (dfs_debug_mark): Likewise.
23648 (dfs_pushdecls): Likewise.
23649 (dfs_compress_decls): Likewise.
23650 * tree.c (layout_basetypes): Likewise.
23651 * typeck.c (build_component_ref): Likewise.
23652 (build_x_function_call): Likewise.
23653 (build_modify_expr): Likewise.
23654 (convert_for_initialization): Likewise.
23655 (build_functional_cast): Likewise.
23656 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
23659 * decl.c (ctor_identifier): New.
23660 (dtor_identifier): New.
23661 (init_decl_processing): Set them.
23663 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
23665 * typeck.c (build_component_ref): Don't get confused by fields whose
23666 context has no type name, like pointer to member functions.
23668 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
23670 * decl.c (grokdeclarator): Handle typedef without declarator.
23672 * pt.c (tsubst): Handle SCOPE_REF in declarator.
23674 * parse.y (bad_parm): Catch another case of missing `typename'.
23676 * lex.c (yyprint): Handle TYPE_DECLs.
23678 * decl.c (start_function): Don't try to be clever.
23680 * lex.c: Lose compiler_error_with_decl.
23681 * typeck2.c: Lose error_with_aggr_type.
23682 (incomplete_type_error): Use cp_* instead of old functions.
23683 (readonly_error): Likewise.
23684 * typeck.c (convert_arguments): Likewise.
23685 * search.c (lookup_nested_field): Likewise.
23686 * method.c (make_thunk): Likewise.
23687 * decl.c (grokparms): Likewise.
23688 * cp-tree.h: Update.
23690 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
23693 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
23695 * method.c (build_opfncall): When deleting a pointer to an
23696 array, build a new pointer to the tree past any ARRAY_TYPE
23699 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23701 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
23703 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
23705 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
23708 * decl.c (finish_function): Don't set nested based on
23709 hack_decl_function_context.
23710 * parse.y (function_try_block): Check for nested function.
23711 (pending_inlines): Likewise.
23713 * decl2.c (build_expr_from_tree): If a unary op already has a
23714 type, just return it.
23716 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
23718 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
23719 (finish_file): Check the return value of walk_vtables.
23720 (finish_prevtable_vardecl): Return int.
23721 (finish_vtable_vardecl): Likewise.
23722 (prune_vtable_vardecl): Likewise.
23723 * lex.c (set_vardecl_interface_info): Likewise.
23724 * cp-tree.h: Adjust return types.
23726 * class.c (delete_duplicate_fields_1): Don't complain about
23727 duplicate nested types if they're the same type.
23728 (finish_struct): Remove check for duplicate.
23729 * decl2.c (grokfield): Don't check for typedef of anonymous type.
23731 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
23733 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
23735 * decl.c (grokdeclarator): Lose special handling of class-level
23736 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
23737 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
23739 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
23741 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
23743 * search.c (compute_access): Fix handling of anonymous union
23745 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
23746 from anonymous unions to their members.
23748 * typeck.c (build_x_function_call): For static member functions,
23749 hand off to build_member_call.
23751 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
23753 * typeck.c (build_component_ref): Handle OFFSET_REFs.
23755 * init.c (expand_vec_init): Fix init == 0 case.
23757 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
23759 * init.c (build_new): pedwarn about init and array new.
23760 (expand_vec_init): Handle lists, use convert_for_initialization.
23762 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
23763 when converting to an aggregate type.
23764 * cvt.c (cp_convert): Pass it through.
23766 * typeck.c (build_conditional_expr): Handle user-defined
23767 conversions to slightly different types.
23769 * decl.c (grokdeclarator): Force an array type in a parm to be
23772 * decl2.c (do_using_directive): Sorry.
23773 (do_namespace_alias): Likewise.
23774 * lex.c (real_yylex): Warn about using the `namespace' keyword.
23776 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
23778 * parse.y (datadef): Move call to note_list_got_semicolon up.
23780 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
23782 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
23784 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
23786 * decl.c (cp_finish_decl): The exception regions have to be
23787 nested, not overlapping. We start the exception region for a
23788 decl, after it has been fully built, and all temporaries for it
23789 have been cleaned up.
23791 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
23793 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
23795 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
23797 * tree.def: Add RETURN_INIT.
23798 * pt.c (instantiate_decl): Handle RETURN_INIT.
23799 * decl.c (store_return_init): Handle minimal_parse_mode.
23801 * tree.c (cp_build_type_variant): Just return an error_mark_node.
23802 * decl.c (make_typename_type): Don't try to get the file and line
23804 * typeck.c (comptypes): Handle TYPENAME_TYPE.
23806 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
23808 * decl.c (poplevel): Make sure we clear out and restore old local
23809 non-VAR_DECL values by default when they go out of scope.
23811 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
23813 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
23814 referring to addresses of variables and functions.
23816 * error.c (dump_expr): Support SIZEOF_EXPR.
23818 * init.c (do_friend): Use the return value of check_classfn.
23820 * typeck.c (convert_arguments): Call complete_type.
23822 * method.c (hack_identifier): After giving an error, set value to
23825 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
23827 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
23828 lossage for local classes.
23829 * cp-tree.h: Declare it.
23830 * decl.c (lookup_name_real): Evil, painful hack for local classes.
23831 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
23832 Use hack_decl_function_context.
23833 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
23834 (start_function): Use hack_decl_function_context.
23835 (finish_function): Likewise.
23836 * method.c (synthesize_method): Likewise.
23837 * lex.c (process_next_inline): Likewise.
23838 (do_pending_inlines): Likewise.
23839 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
23842 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
23844 * sig.c (build_signature_pointer_or_reference_type): Align
23845 signature pointers/references on 8-byte boundaries so they can be
23846 grabbed 2 words at a time on a Sparc.
23848 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
23850 * method.c (hack_identifier): Requiring a static chain is now a
23852 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
23855 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23857 * init.c (build_offset_ref): Call complete_type.
23859 * decl.c (pop_from_top_level): Always pop previous_class_type.
23861 * parse.y: Handle multiple decls in a for-init-statement.
23862 * pt.c (tsubst_expr): Likewise.
23864 * pt.c (tsubst): Use tsubst_expr for the second operand of an
23867 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
23868 (poplevel_class): Set it here.
23869 (pop_from_top_level): Pop it here if we're returning to class scope.
23870 * class.c (pushclass): Don't set it here.
23872 * decl.c (maybe_push_to_top_level): Save current_template_parms,
23873 and clear it if !pseudo.
23874 (pop_from_top_level): Restore it.
23876 * decl2.c (finish_file): Push the dummy each time we walk the list
23879 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
23880 something for CAST_EXPR.
23882 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
23884 * cvt.c (cp_convert): Warn about implicit conversion of the
23885 address of a function to bool, as it is always true.
23887 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
23889 * typeck.c (c_expand_return): Fix warning for local externs returned.
23891 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
23893 * tree.c (mapcar): Propagate const and volatile properly.
23895 * typeck.c (complete_type): Be sure to instantiate the
23896 MAIN_VARIANT of the type.
23898 * method.c (synthesize_method): Class interface hackery does not
23899 apply to synthesized methods.
23901 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
23903 * pt.c (comp_template_args): Use comptypes rather than just
23904 checking for TEMPLATE_TYPE_PARM equivalence.
23906 * typeck.c (build_x_function_call): Call complete_type before
23907 checking TYPE_OVERLOADS_CALL_EXPR.
23909 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
23911 * g++.c (main): Check also for new define ALT_LIBM.
23913 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23915 * pt.c (instantiate_class_template): If we don't have a pattern
23917 (coerce_template_parms): If we see a local class, bail.
23919 * decl.c (grok_reference_init): Make sure there's a type before
23922 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
23923 (push_template_decl): Likewise.
23925 * parse.y (named_class_head): Set
23926 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
23928 * decl.c (xref_tag): Diagnose redeclaration of template
23929 type-parameter name.
23931 * error.c (dump_type): Handle anonymous template type parms.
23933 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
23935 (coerce_template_parms): Likewise.
23937 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
23939 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
23940 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
23942 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
23944 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
23945 before trying to get its STUB_DECL.
23946 (coerce_template_parms): Likewise.
23948 * parse.y (template_type_parm): If they didn't use 'class',
23949 pretend they did after giving an error.
23951 * pt.c (coerce_template_parms): Diagnose use of local class.
23953 * decl.c (grok_reference_init): Use instantiate_type.
23955 * error.c (dump_expr): Handle TEMPLATE_DECLs.
23957 * parse.y (named_class_head): Diagnose mismatching types and tags.
23959 * decl.c (pushdecl): Type decls and class templates clash with
23960 artificial type decls, not hide them.
23962 * decl.c (redeclaration_error_message): Diagnose redefinition of
23963 templates properly.
23964 (duplicate_decls): Diagnose disallowed overloads for template
23967 * decl.c (start_decl): Call complete_type before checking for a
23970 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
23972 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
23974 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
23976 * decl.c (grok_op_properties): Don't check for operator++(int) in
23979 * tree.c (perm_manip): Return a copy of variable and function
23980 decls with external linkage.
23982 * tree.def: Change some of the min tree codes to type "1".
23983 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
23984 * method.c (build_overload_int): Emit something arbitrary for
23985 anything but an INTEGER_CST if we're in a template.
23987 * decl.c (cp_finish_decl): Call complete_type before deciding
23988 whether or not to lay out the decl.
23990 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
23992 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
23994 * typeck2.c (build_x_arrow): Call complete_type.
23996 * pt.c (add_pending_template): Broken out.
23997 (lookup_template_class): If -fexternal-templates, call it for all
23998 the methods of implemented types.
23999 (instantiate_class_template): Instead of instantiating them here.
24000 (instantiate_decl): Handle -fexternal-templates earlier.
24002 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24004 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
24005 memoized lookup stuff inside GATHER_STATISTICS.
24007 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
24009 * decl.c (start_decl): Complain about array of incomplete type
24011 (grokdeclarator): Not here.
24013 * parse.y (template_parm): Expand full_parm inline so we can set
24014 the rule's precedence.
24016 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
24017 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
24018 * decl2.c (grokbitfield): Don't check for integer constant here.
24019 * class.c (finish_struct_1): Check here.
24021 * decl.c (define_label): Make the min decl go on permanent_obstack.
24023 * pt.c (unify): Don't handle CONST_DECLs.
24024 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
24025 (tsubst_copy): Likewise.
24027 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
24028 CONST_DECL for a template parm.
24030 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
24032 * decl.c (grokdeclarator): Complain about array of incomplete type
24034 (start_decl_1): Not here.
24036 * pt.c (tsubst): Handle pointer-to-function declarators.
24038 * method.c (hack_identifier): If pedantic, diagnose local class
24039 methods that require a static chain.
24041 * decl.c (grok_op_properties): No longer static.
24042 * cp-tree.h: Declare it.
24043 * pt.c (tsubst): Call it for operators.
24044 Use tsubst_copy for TREE_VECs.
24046 * parse.y (template_arg): The expr has precedence like '>'.
24048 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
24050 * pt.c (coerce_template_parms): Don't coerce an expression using
24052 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
24053 (tsubst): Don't use build_index_2_type if the max_value uses template
24055 * method.c (build_overload_int): Emit something arbitrary for an
24056 expression using template parms.
24058 * parse.y (template_close_bracket): New non-terminal to catch use
24059 of '>>' instead of '> >' in template class names.
24060 (template_type): Use it.
24061 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
24063 * tree.def: Add CAST_EXPR.
24064 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
24065 CONVERT_EXPR for minimal_parse_mode.
24066 * typeck.c (build_c_cast): Likewise.
24067 * pt.c (tsubst_copy): Likewise.
24068 * decl2.c (build_expr_from_tree): Likewise.
24069 * error.c (dump_expr): Likewise.
24071 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24073 * except.c (SetTerminate, SetUnexpected): Put back global vars.
24074 (init_exception_processing): Put back decl/init of
24075 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
24076 fns from libstdc++.
24078 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
24079 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
24081 * cp-tree.h (declare_uninstantiated_type_level,
24082 uninstantiated_type_level_p): Delete prototypes.
24084 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
24086 * pt.c (tsubst_expr): Add default return.
24088 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24090 * error.c (fndecl_as_string): Delete unused arg CNAME.
24091 * sig.c (build_signature_table_constructor,
24092 build_signature_method_call): Fix calls.
24094 * class.c (the_null_vtable_entry): Delete var definition.
24095 (init_class_processing): Delete tree the_null_vtable_entry init.
24096 * decl.c (no_print_{functions, builtins}): Declare as static.
24097 (__tp_desc_type_node): #if 0 var definition.
24098 (init_type_desc): #if 0 init of __tp_desc_type_node.
24099 (vb_off_identifier): Move var decl into init_decl_processing.
24100 (current_function_assigns_this): Declare as static.
24101 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
24102 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
24103 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
24104 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
24105 * init.c (BI_header_type, BI_header_size): Declare as static.
24106 * pt.c (template_classes): Delete unused var.
24107 (add_pending_template): Delete decl for non-existent fn.
24108 (lookup_template_class): Delete vars CODE and TAG_CODE.
24109 (instantiate_template): Delete unused var TARGS.
24110 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
24112 (__tp_desc_type_node): #if 0 var decl.
24113 (fndecl_as_string): Fix prototype.
24115 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
24117 * tree.def: Add GOTO_STMT.
24118 * pt.c (tsubst_expr): Support goto and labels.
24119 * decl.c (define_label): Support minimal parsing.
24120 * parse.y (simple_stmt): Likewise.
24122 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24124 * xref.c (GNU_xref_member): Only define/set var I if
24125 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
24127 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
24128 (GNU_xref_end): Fix call.
24129 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
24130 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
24132 * tree.c (build_exception_variant): Delete unused vars I, A, T,
24134 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
24135 (mapcar): Delete unused var CODE.
24136 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
24137 (break_out_cleanups): Fix call.
24138 (bot_manip): Likewise.
24139 * call.c (build_method_call): Likewise.
24140 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
24142 * typeck.c (unary_complex_lvalue, build_modify_expr,
24143 convert_for_initialization): Likewise.
24144 * typeck2.c (build_functional_cast): Likewise.
24145 * cp-tree.h (build_cplus_new): Fix prototype.
24147 * repo.c (open_repo_file): Delete unused var Q.
24148 (repo_compile_flags, repo_template_declared,
24149 repo_template_defined, repo_class_defined, repo_inline_used,
24150 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
24151 (repo_get_id, repo_vtable_used): Declare as static.
24152 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
24155 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
24157 * parse.y (pending_inlines): Add function_try_block case.
24159 * pt.c (unify): Fix for template const parms.
24161 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24163 * lex.c (extract_interface_info): Delete forward decl.
24164 (default_copy_constructor_body, default_assign_ref_body): Delete
24165 decls for non-existent functions.
24166 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
24167 (init_lex): Delete setting them.
24168 (cons_up_default_function): Delete unused vars FUNC_BUF,
24169 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
24170 #if 0'd synth code.
24171 (toplevel, expression_obstack): Delete unused extern decls.
24172 (tree_node_kind): Delete unused enum.
24173 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
24175 (tree_node_kind_names): Delete unused extern decl.
24176 (synth_obstack): Delete unused var.
24177 (init_lex): Don't set it.
24178 (init_parse): Add decl before use.
24179 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
24180 (current_unit_{name, language}): Delete unused vars.
24181 (check_newline): Don't bother setting them, just accept the #pragma.
24182 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
24183 (current_unit_{name, language}): Delete decls.
24185 * search.c: Wrap all of the memoized functions, macros, and
24186 variables inside #ifdef GATHER_STATISTICS.
24187 (lookup_field, lookup_fnfields): Likewise.
24188 (init_search_processing): Likewise.
24189 (reinit_search_statistics): Wrap whole function.
24190 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
24192 * decl.c (finish_function): Only call pop_memoized_context if
24193 GATHER_STATISTICS is defined.
24194 (start_function): Likewise for push_memoized_context.
24195 * class.c (pushclass, popclass): Likewise.
24197 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
24198 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
24200 * cvt.c (cp_convert): Delete unused local var FORM.
24201 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
24204 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
24206 * pt.c (do_poplevel): Oops; really return what we get from
24207 poplevel this time.
24209 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24211 * cp-tree.h (is_aggr_type): Add prototype.
24213 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
24214 * method.c ({push,pop}_cp_function_context): Delete decls.
24215 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
24216 (SetUnexpected, SetTerminate): Delete unused vars.
24217 (init_exception_processing): Don't set SetUnexpected or
24218 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
24219 (output_exception_table_entry): Delete unused array LABEL.
24220 (expand_internal_throw): Delete unused var PARAMS.
24221 (expand_start_catch_block): Delete unused var CLEANUP.
24222 (emit_exception_table): Delete unused var EH_NODE_DECL.
24223 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
24224 GOTO_UNWIND_AND_THROW. Don't set them.
24225 (end_eh_unwinder): Add top decl.
24226 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
24227 (exception_section, push_rtl_perm, do_function_call,
24228 lang_interim_eh, push_eh_cleanup, eh_outer_context,
24229 expand_end_eh_spec, end_eh_unwinder): Declare as static.
24230 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
24231 throw_used): Likewise.
24232 * cp-tree.h (expand_end_eh_spec): Delete prototype.
24234 * search.c (dfs_mark, dfs_mark_vtable_path,
24235 dfs_unmark_vtable_path, dfs_mark_new_vtable,
24236 dfs_unmark_new_vtable, dfs_clear_search_slot,
24237 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
24238 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
24239 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
24241 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
24242 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
24243 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
24244 Only define #ifdef GATHER_STATISTICS.
24245 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
24247 (vbase_decl): Delete var definition.
24248 (init_search): Delete old decl.
24249 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
24250 never actually used.
24251 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
24252 (get_base_distance_recursive): Delete unused fourth arg
24253 BASETYPE_PATH. Fix call .
24254 (get_base_distance): Fix call.
24255 (push_class_decls): Delete unused var ID.
24256 (make_memoized_table_entry): Declare as static.
24257 (breadth_first_search): Declare as static.
24258 (tree_has_any_destructor_p): Declare as static.
24259 (pop_class_decls): Delete unused arg pop_class_decls.
24260 * class.c (popclass): Fix call to pop_class_decls.
24261 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
24262 tree_has_any_destructor_p): Delete prototypes.
24264 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
24265 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
24266 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
24267 (build_user_desc): Delete unused var T.
24268 (build_class_desc): Delete unused vars T and OFF.
24269 (build_t_desc): Delete unused var NAME_STRING.
24270 (build_headof): Make static.
24271 (get_bad_cast_node): Likewise.
24272 (get_def_to_follow): Likewise.
24273 * cp-tree.h (init_type_desc): Add prototype.
24274 (build_headof): Remove prototype.
24276 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
24278 * pt.c (tsubst): Only look for matching decls at file scope for
24279 non-member functions.
24281 * call.c (build_scoped_method_call): Handle scoped destructor
24282 calls in templates.
24284 * decl.c (*_top_level): Also save previous_class_values.
24286 * pt.c (tsubst_expr): Support do {} while loops.
24287 * parse.y (simple_stmt): Likewise.
24288 * tree.def: Likewise.
24290 * method.c (build_overload_identifier): For a class nested in a
24291 template class, don't mangle in the template parms from our
24294 * lex.c, cp-tree.h: Remove support for template instantiations in
24295 the pending_inlines code.
24296 * pt.c: Remove dead functions and unused arguments.
24297 (uses_template_parms): TYPENAME_TYPEs always use template parms.
24298 * parse.y: Stop passing anything to end_template_decl.
24299 * tree.c (print_lang_statistics): Only print tinst info #ifdef
24302 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24304 * init.c (expand_recursive_init{,_1}): Delete decls.
24305 (sort_member_init): Delete unused var INIT.
24306 (emit_base_init): Delete unused var X.
24307 (build_offset_ref): Delete unused var CNAME.
24308 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
24309 (emit_base_init): Delete unused local var BASE. Delete extern
24310 decl of IN_CHARGE_IDENTIFIER.
24311 (build_delete): Delete unused local var VIRTUAL_SIZE.
24313 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
24314 (build_delete): Fix call.
24315 * decl2.c (delete_sanity): Likewise.
24316 * cp-tree.h (build_vec_delete): Update prototype.
24318 * typeck.c (common_base_type): Delete unused var TMP.
24319 (build_binary_op): Delete local var ARGS_SAVE.
24320 (build_array_ref): Delete unused var ITYPE.
24321 (c_expand_return): Delete unused var USE_TEMP.
24323 * typeck.c (compexcepttypes): Delete unused arg STRICT.
24324 (comptypes): Fix calls.
24325 * decl.c (duplicate_decls): Likewise.
24326 * cp-tree.h (compexcepttypes): Delete extra arg.
24328 * decl2.c (check_classfn): Delete unused second arg CNAME.
24329 * decl.c (start_decl, grokfndecl): Fix calls.
24330 * init.c (do_friend): Likewise.
24331 * cp-tree.h (check_classfn): Update prototype.
24333 * cp-tree.h (signature_error, import_export_vtable,
24334 append_signature_fields, id_in_current_class, mark_used,
24335 copy_assignment_arg_p): Add decls.
24336 * decl2.c (mark_used): Delete decl.
24338 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
24340 * class.c (get_vtable_entry): Disable unused function.
24341 (doing_hard_virtuals): Delete unused static global var.
24342 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
24343 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
24344 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
24345 (modify_one_vtable): Delete unused var OLD_RTTI.
24346 (finish_struct_anon): Delete unused vars OFFSET and X.
24347 (finish_struct_bits): Delete unused var METHOD_VEC.
24348 (get_basefndecls): Delete unused var PURPOSE. Delete unused
24349 for-scope local variable METHODS.
24351 * call.c (user_harshness): Delete unused/unneeded arg PARM.
24352 (ideal_candidate): Delete unused args BASETYPE and PARMS.
24353 (build_method_call): Delete unused args passed into ideal_candidate.
24354 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
24355 * cp-tree.h (synthesize_method): Add decl.
24357 * decl.c (note_level_for_for): Give void return type.
24358 (pushdecl_nonclass_level): Likewise.
24359 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
24360 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
24361 (suspend_binding_level): Delete unused var LEVEL.
24362 (duplicate_decls): Delete unused var CTYPE.
24363 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
24364 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
24366 (grokdeclarator): Delete unused var C.
24367 (grokdeclarator): Delete unused var SIZE_VARIES.
24368 (grokparms): Delete unused var SAW_VOID.
24369 (start_function): Delete unused var OLDDECL.
24370 (cplus_expand_expr_stmt): Delete unused var
24371 REMOVE_IMPLICIT_IMMEDIATELY.
24373 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
24375 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
24377 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
24379 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
24380 (build_min_nt): Likewise.
24381 * pt.c (do_pushlevel): Emit line note.
24382 (do_poplevel): Return what we get from poplevel.
24383 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
24384 * parse.y: Use do_pushlevel and do_poplevel.
24385 * cp-tree.h: Declare do_poplevel.
24387 * cp-tree.h: Declare at_eof.
24388 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
24389 * decl2.c (import_export_decl): Renamed from import_export_inline.
24390 (finish_file): Call it to do interface handling for statics.
24391 * pt.c (tsubst_copy): Call mark_used on variables and functions
24394 * decl2.c (finish_file): Don't emit statics we can't generate.
24395 * pt.c (instantiate_decl): Don't set interface on instantiations
24398 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
24399 * tree.c (print_lang_statistics): Print max template depth.
24400 * pt.c (push_tinst_level): Dump entire instantiation context.
24401 (instantiate_class_template): Use it and pop_tinst_level.
24402 (instantiate_decl): Likewise.
24404 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
24405 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
24407 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
24409 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
24410 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
24411 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
24412 the new template implementation.
24414 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24416 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
24418 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
24420 * decl.c (cp_finish_decl): Delay emitting the debug information for
24421 a typedef that has been installed as the canonical typedef, if the
24422 type has not yet been defined.
24424 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
24426 * decl2.c (grokfield): Still call pop_nested_class for access decls.
24428 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24430 * decl.c (lookup_label): Call label_rtx.
24432 * decl.c (make_binding_level): New function.
24433 (pushlevel, pushlevel_class): Call it instead of explicit
24434 duplicate calls to xmalloc.
24436 * decl.c (init_decl_processing): Delete useless build_pointer_type
24439 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
24440 (sizet_ftype_string): Delete variable.
24441 (init_decl_processing): Add built-in functions fabsf, fabsl,
24442 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
24443 variable strlen_ftype, used for strlen.
24445 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
24447 * decl.c (push_to_top_level): Start from current_binding_level
24448 again for now; the stl hacks depend on g++ being broken in this
24449 way, and it'll be fixed in the template rewrite.
24451 * tree.def: Add USING_DECL.
24452 * decl2.c (do_class_using_decl): Implement.
24453 (grokfield): Pass access decls off to do_class_using_decl instead of
24455 * error.c (dump_decl): Handle USING_DECLs.
24456 * decl.c (grokdeclarator): Remove code for handling access decls.
24457 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
24458 as access decls for now.
24459 (finish_struct): Don't check USING_DECLs for other uses of the name.
24461 * search.c (get_matching_virtual): Use cp_error_at.
24463 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24465 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
24467 (self_promoting_args_p): Move the check that TYPE is non-nil
24468 before trying to look at its main variant.
24469 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
24471 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
24473 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
24474 (do_friend): Delete call to xref_friend.
24475 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
24477 * typeck.c (convert_sequence): #if 0 unused function.
24479 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
24480 be in decl_in_memory_p.
24481 (decl_in_memory_p): Delete decl.
24482 * expr.c (decl_in_memory_p): Delete fn.
24483 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
24485 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
24487 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
24489 * class.c (finish_struct_1): Check for a pure-specifier on a
24490 non-virtual function here.
24492 * decl2.c (grok_function_init): Don't check whether the function
24494 (grokfield): Don't call check_for_override here.
24496 * decl.c (push_to_top_level): Start from inner_binding_level,
24497 check class_shadowed in class levels.
24499 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
24501 * decl.c (resume_level): Ignore things that don't have names, instead
24504 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24506 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
24508 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
24510 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
24513 * parse.y (complete_type_name): Bind global_scope earlier.
24514 (complex_type_name): Likewise.
24515 (qualified_type_name): Remove.
24517 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
24519 * decl.c (grokfndecl): Move code that looks for virtuals in base
24521 * class.c (check_for_override): ... to a new function.
24522 (finish_struct_1): Call it.
24524 * cp-tree.h: Declare warn_sign_compare.
24526 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
24527 rather than extra_warnings to decide whether to warn about
24528 comparison of signed and unsigned.
24530 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
24531 implies -Wsign-compare. -Wall doesn't imply -W.
24533 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
24535 * typeck.c (build_component_ref): Fix to handle anon unions in base
24538 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24540 * class.c (resolves_to_fixed_type_p): Delete code dealing with
24541 a WITH_CLEANUP_EXPR, since we don't generate them any more.
24542 * cvt.c (build_up_reference): Likewise.
24543 * decl.c (grok_reference_init): Likewise.
24544 (cp_finish_decl): Likewise.
24545 * error.c (dump_expr): Likewise.
24546 * tree.c (real_lvalue_p): Likewise.
24547 (lvalue_p): Likewise.
24548 (build_cplus_new): Likewise.
24549 (unsave_expr_now): Likewise.
24550 * typeck.c (unary_complex_lvalue, build_modify_expr,
24551 c_expand_return): Likewise.
24553 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24555 Make the C++ front-end pay attention to attributes for structures.
24556 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
24558 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
24559 Take out old round_up_size use and setting the DECL_ALIGN possibly
24560 using it. Take out setting of TYPE_ALIGN to round_up_size, which
24561 can override what the attribute set.
24562 * cp-tree.h (finish_struct): Update prototype.
24563 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
24564 attributes to finish_struct.
24565 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
24566 value down into finish_struct.
24567 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
24569 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
24571 * decl.c (poplevel): Re-word dead for local handling.
24572 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
24573 (cp_finish_decl): If is_for_scope, check for duplicates so
24574 we can disable is_for_scope. Otherwise, preserve_temp_slots.
24576 * lex.c (do_identifier): Use global binding in preference of
24577 dead for local variable.
24579 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
24581 * init.c (initializing_context): Handle anon union changes, the
24582 context where fields of anon unions can be initialized now has to be
24583 found by walking up the TYPE_CONTEXT chain.
24585 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
24587 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
24588 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
24589 (obscure_complex_init): If bss is supported, always set
24590 DECL_INITIAL to error_mark_node.
24592 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24594 * init.c (is_friend): Make sure there's a context before we see if
24597 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
24599 * init.c (is_friend): Classes are not friendly with nested classes.
24601 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
24603 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
24604 and record its result.
24606 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
24608 * class.c (finish_struct_anon): Switch around code to not move anon
24609 union elements around, nor mess up their contexts, nor offsets,
24610 instead we now build up the right number of COMPONENT_REFs for all
24611 the anon unions that may be present at build_component_ref time.
24612 * typeck.c (lookup_anon_field): New routine to handle field lookup
24613 on fields without names. We find them, based upon their unique type
24615 * typeck.c (build_component_ref): Allow FIELD_DECL components.
24616 Handle finding components in anonymous unions, and ensure that a
24617 COMPONENT_REF is built for each level as necessary.
24619 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
24621 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
24622 code that ensures that copy ctors are used if appropriate.
24624 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24626 * init.c (build_vec_delete): Only give an error if base isn't an
24629 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
24631 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
24632 (yylex): If we see `new', keep slurping.
24634 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
24636 * class.c (finish_struct_1): Move code for handling anon unions...
24637 (finish_struct_anon): to here. Fixup so that we do the offset
24638 calculations right, and so that the fields are physically moved to
24639 the containers's chain.
24641 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24643 * decl.c (grokdeclarator): Avoid trying to get an operand off an
24646 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
24648 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
24649 POINTER_SIZE to agree with expr.c.
24651 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
24653 * search.c (lookup_field): Don't report ambiguities if protect is 0,
24654 instead return NULL_TREE.
24656 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
24658 * class.c (finish_struct_1): Call warn_hidden if we want warnings
24659 about overloaded virtual functions.
24660 (warn_hidden): New routine to warn of virtual functions that are
24661 hidden by other virtual functions, that are not overridden.
24662 (get_basefndecls): New routine, used by warn_hidden.
24663 (mark_overriders): New routine, used by warn_hidden.
24664 * search.c (get_matching_virtual): Remove old warning that just
24667 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24669 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
24671 * typeck.c (null_ptr_cst_p): Delete unused fn.
24672 (build_function_call_maybe): Delete unused fn.
24674 * expr.c (extract_init): #if 0 the code after unconditional return 0
24677 Delete old cadillac code.
24678 * edsel.c: Remove file.
24679 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
24680 * Makefile.in (CXX_OBJS): Delete edsel.o.
24681 (edsel.o): Delete rule.
24682 * cp-tree.h (flag_cadillac): Delete var decl.
24683 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
24684 * decl2.c (flag_cadillac): Delete var definition.
24685 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
24686 (grokfield): Delete code depending on flag_cadillac.
24687 (finish_anon_union): Likewise.
24688 * class.c (finish_struct_1): Likewise.
24689 (pushclass): Likewise.
24690 (popclass): Likewise.
24691 (push_lang_context): Likewise.
24692 (pop_lang_context): Likewise.
24693 * decl.c (init_decl_processing): Likewise.
24694 (start_decl): Likewise.
24695 (cp_finish_decl): Likewise.
24696 (xref_tag): Likewise.
24697 (finish_enum): Likewise.
24698 (start_function): Likewise.
24699 (finish_function): Likewise.
24700 (finish_stmt): Likewise.
24701 * lex.c (lang_init): Likewise.
24702 (check_newline): Likewise.
24704 * lex.c (do_pending_inlines): Delete synthesized method kludge.
24706 Delete defunct, ancient garbage collection implementation.
24707 * rtti.c: New file with the RTTI stuff from gc.c.
24708 * gc.c: Removed file (moved the remaining stuff into rtti.c).
24709 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
24710 (rtti.o): New rule, replacing gc.o.
24711 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
24712 * cp-tree.h: Delete gc-related fn decls.
24713 (DECL_GC_OFFSET): Delete macro.
24714 (flag_gc): Delete extern decl.
24715 * decl.c (current_function_obstack_index): Delete var decl.
24716 (current_function_obstack_usage): Delete var decl.
24717 (start_function): Delete clearing of current_function_obstack_index
24718 and current_function_obstack_usage.
24719 (init_decl_processing): Delete code relying on -fgc.
24720 Delete call to init_gc_processing.
24721 (cp_finish_decl): Delete calls to build_static_gc_entry and
24722 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
24723 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
24724 and to expand_expr of a __gc_main call.
24725 (maybe_gc_cleanup): Delete var decl.
24726 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
24727 * decl2.c (flag_gc): Delete var decl.
24728 (lang_f_options): Delete offering of -fgc.
24729 (lang_decode_option): Delete -fgc and -fno-gc handling.
24730 (get_temp_regvar): Delete gc code.
24731 * init.c (build_new): Delete gc code.
24732 * lex.c (init_lex): Delete checking of flag_gc.
24734 * typeck.c (convert_arguments): Delete gc code.
24735 (build_component_addr): Delete -fgc warning.
24736 (build_modify_expr): Delete gc code.
24738 * decl2.c (build_push_scope): Delete fn.
24739 * cp-tree.h (build_push_scope): Delete decl.
24741 * search.c (clear_search_slots): Delete fn.
24742 * cp-tree.h (clear_search_slots): Delete decl.
24744 * search.c (tree_needs_constructor_p): Delete fn.
24745 * cp-tree.h (tree_needs_constructor_p): Delete decl.
24747 * tree.c (id_cmp): Delete fn.
24749 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
24750 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
24752 * tree.c (decl_value_member): Delete fn.
24753 * cp-tree.h (decl_value_member): Delete decl.
24755 * tree.c (list_hash_lookup_or_cons): Delete fn.
24756 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
24758 * method.c (cplus_exception_name): Delete fn.
24759 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
24761 * spew.c (shift_tokens): Delete fn.
24763 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
24765 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
24767 * parse.y: Likewise.
24769 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24771 * tree.c (build_cplus_staticfn_type): Delete function definition;
24773 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
24775 * tree.c (virtual_member): Delete function definition; never used.
24776 * cp-tree.h (virtual_member): Delete decl.
24778 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
24780 * typeck.c (build_component_ref): Handle getting vbase pointers
24781 out of complex multiple inheritance better.
24783 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
24785 * typeck.c (build_object_ref): Make sure we use the real type, not
24786 any reference type.
24788 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
24790 * tree.c (build_exception_variant): Don't create new types if we
24791 don't have to, also build new types on the right obstack.
24793 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
24795 * decl.c (store_bindings): Split out from push_to_top_level.
24796 (push_to_top_level): Call it for b->type_shadowed on class binding
24799 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
24801 * search.c (expand_upcast_fixups): Fix so that offsets stored in
24802 vbase_offsets are always right. Fixes a problem where virtual base
24803 upcasting and downcasting could be wrong during conversions on this
24804 during virtual function dispatch at ctor/dtor time when dynamic
24805 vtable fixups for deltas are needed. This only sounds easier than
24807 (fixup_virtual_upcast_offsets): Change to reflect new calling
24808 convention for expand_upcast_fixups.
24810 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24812 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
24813 check that it's usable as the bitfield width.
24815 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24817 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
24818 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
24819 only ever used for functions in it.
24821 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
24823 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
24824 (nested_type): Likewise.
24825 (nested_name_specifier): Use lastiddecl.
24827 * decl.c (grokdeclarator): Adjust accordingly.
24828 * init.c (expand_member_init): Likewise.
24829 * parse.y (base_class): Likewise.
24830 * typeck2.c (build_functional_cast): Likewise.
24832 * typeck2.c (build_functional_cast): Fill in name after we've
24833 checked for non-aggr type.
24835 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
24837 * decl2.c (warn_pointer_arith): Default to on.
24839 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
24841 * lex.c (is_rid): New function.
24842 * decl.c (grokdeclarator): Diagnose reserved words used as
24845 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
24847 * tree.c (get_decl_list): Don't lose cv-quals.
24849 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
24850 typespecs used as declarator-ids.
24852 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
24854 * decl.c (poplevel): When poping a level, don't give a warning for
24855 any subblocks that already exist.
24857 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
24859 * typeck.c (build_object_ref): Finish what I started.
24861 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
24863 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
24865 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
24868 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
24870 * decl.c (xref_tag): Handle passing a type in directly.
24872 * parse.y (qualified_type_name): Pull out the type.
24873 (nested_type): Likewise.
24874 Take types directly instead of as identifiers.
24875 * call.c (build_scoped_method_call): Take types directly instead of
24877 * decl.c (xref_basetypes): Likewise.
24878 * init.c (expand_member_init): Likewise.
24879 (build_member_call): Likewise.
24880 (build_offset_ref): Likewise.
24881 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
24882 * method.c (do_build_assign_ref): Likewise.
24883 * decl.c (grokdeclarator): Handle a type appearing as the
24884 declarator-id for constructors.
24885 * method.c (do_build_copy_constructor): current_base_init_list now
24886 uses the types directly, not their names.
24887 * init.c (sort_base_init): Likewise.
24888 (expand_member_init): Likewise.
24889 * init.c (is_aggr_type): New function, like is_aggr_typedef.
24891 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
24893 * tree.c (layout_basetypes): Call build_lang_field_decl instead
24894 of build_lang_decl if first arg is a FIELD_DECL.
24896 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24898 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
24900 * except.c (expand_start_catch_block): Set TREE_USED to avoid
24901 warnings about the catch handler.
24903 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
24905 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
24906 expand_target_expr.
24908 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24910 Fix access control to use trees rather than integers.
24911 * class.c (access_{default, public, protected, private,
24912 default_virtual, public_virtual, private_virtual}_node): Add
24914 (init_class_processing): Do creation of those nodes.
24915 * cp-tree.h (access_type): Delete enum decl.
24916 (access_{default, public, protected, private, default_virtual,
24917 public_virtual, private_virtual}_node): Add decls.
24918 (compute_access): Change return type.
24919 * search.c (compute_access): Have tree return type, instead of enum.
24920 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
24921 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
24922 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
24923 * parse.y (VISSPEC): Make ttype rather than itype.
24924 (base_class_access_list): Likewise.
24925 * *.[cy]: Change all refs of `access_public' to `access_public_node',
24927 * call.c (build_method_call): Make ACCESS be a tree.
24928 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
24929 * cvt.c (convert_to_aggr): Likewise.
24930 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
24932 * method.c (hack_identifier): Likewise.
24933 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
24935 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
24937 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
24938 frontend, and make it more consistent with respect to
24939 warn_pointer_arith.
24941 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
24943 * decl.c (pushdecl): Check for duplicate parameter names.
24945 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
24947 * decl.c (expand_static_init): Call assemble_external for atexit.
24949 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
24951 * except.c (do_unwind): Remove some generated dead code.
24952 (eh_outer_context): New routine, factor out some common code from
24953 expand_builtin_throw and end_eh_unwinder. Add code to do return
24954 address masking for the PA.
24955 (expand_builtin_throw): Use eh_outer_context instead of open coding
24957 (end_eh_unwinder): Likewise.
24959 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
24961 * except.c (expand_throw): Call assemble_external for __empty, if we
24964 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
24966 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
24967 NORMAL_RETURN_ADDR_OFFSET.
24968 (end_eh_unwinder): Likewise.
24970 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
24972 * gc.c (build_dynamic_cast): Make sure we don't cast away const
24973 when dealing with references, and make sure we handle dynamic
24974 casting to a cv qualified reference.
24976 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
24978 * except.c (struct eh_context): New structure top hold eh context
24980 (push_eh_context): New routine.
24981 (pop_eh_context): Likewise.
24982 * decl.c (push_cp_function_context): Use them.
24983 (pop_cp_function_context): Likewise.
24985 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
24987 * decl2.c (finish_file): Also prune uninteresting functions in the
24988 inline emission loop.
24990 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
24992 * sig.c (build_signature_table_constructor): Mark functions
24993 in the signature as referenced.
24995 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
24997 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
24998 the inline emission stuff.
25000 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
25002 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
25004 * lang-options.h: Add -f{no-,}weak.
25005 * decl.c (init_decl_processing): If the target does not support weak
25006 symbols, don't use them.
25007 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
25009 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
25011 * init.c (expand_member_init): warning for base init after members.
25013 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
25015 * cvt.c (build_expr_type_conversion): Don't convert to a reference
25018 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
25020 * method.c (report_type_mismatch): Improve wording for volatile
25023 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
25025 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
25026 expand_assignment, as the later doesn't handle things that have
25027 copy constructors well. The compiler would do bitwise copying,
25028 instead of ctor calling in some cases.
25030 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
25032 * g++.c (my_strerror): Return "cannot access" if errno is 0.
25033 (pfatal_with_name, perror_exec): Don't assume that
25034 the returned value from my_strerror contains no '%'s.
25036 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
25038 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
25040 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
25041 TYPE_METHODS/TREE_CHAIN mean what they used to.
25042 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
25043 instead of TYPE_METHODS.
25044 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
25045 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
25046 * cp-tree.h (CLASSTYPE_METHODS): Lose.
25047 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
25049 (struct lang_decl): Lose next_method field.
25050 (DECL_NEXT_METHOD): Lose.
25051 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
25052 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
25054 (finish_struct_methods): Don't mess with the TREE_CHAINs in
25057 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
25060 * call.c (build_method_call): Synthesize here even when not inlining.
25061 * typeck.c (build_function_call_real): Likewise.
25063 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
25065 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
25066 == DBX_DEBUG, call dbxout_start_new_source_file and
25067 dbxout_resume_previous_source_file when appropriate.
25069 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
25071 * except.c (start_anon_func): Push to the top level.
25072 (end_anon_func): Pop from the top level.
25074 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
25076 * cp-tree.h (build_cleanup): New routine to build cleanups.
25077 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
25078 call at ctor time and use atexit to run it later.
25079 * decl2.c (build_cleanup): New routine, taken from finish_file.
25080 (finish_file): Use build_cleanup instead, and don't put function
25081 local statics in global dtor list.
25083 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
25085 * except.c (expand_throw): Ensure that we have cleanups, if we try
25086 and expand cleanups.
25088 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
25090 * except.c (expand_throw): Add logic to manage dynamic cleanups for
25092 (expand_end_catch_block): Use the magic of expand_goto, instead of
25093 emit_jump so that we get the cleanup for any catch clause parameter
25094 and the cleanup for the exception object. Update to reflect label
25096 (push_eh_cleanup): New routine to register a cleanup for an
25098 (empty_fndecl): Used to default cleanup actions to
25100 (init_exception_processing): Setup empty_fndecl. Setup
25102 (expand_start_catch_block): Update to reflect label changes. Call
25103 push_eh_object to register the cleanup for the EH object.
25104 (start_anon_func): New routine to start building lambda expressions
25106 (end_anon_func): New routine to end them.
25107 (struct labelNode): Change so that we can use tree labels, or rtx
25109 (saved_cleanup): Object to check for dynamic cleanups for the
25110 exception handling object.
25111 (push_label_entry): Change so that we can use tree labels, or rtx
25113 (pop_label_entry): Likewise.
25114 (top_label_entry): Likewise.
25115 (expand_start_all_catch): Use tree label instead of rtx label, so
25116 that we can get the magic of expand_goto.
25117 (expand_end_all_catch): Update to reflect label changes.
25119 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
25121 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
25122 building_cleanup logic, as we now use UNSAVE_EXPRs.
25123 * cp-tree.h (unsave_expr): Declare it.
25124 * decl.c (building_cleanup): Remove.
25125 (maybe_build_cleanup): Remove building_cleanup logic, and use
25126 UNSAVE_EXPR instead.
25128 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
25130 * gc.c (build_t_desc): Update error message to say <typeinfo>.
25132 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
25134 * decl.c (pushdecl): Only warn about shadowing a local variable if
25135 warn_shadow is true.
25137 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
25139 * typeck.c (build_binary_op_nodefault): Added warning about
25140 comparisons between different enum types with -Wall, unless
25141 -fenum-int-equiv set.
25143 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
25145 * class.c (finish_struct_1): Skip down to the inner type in
25146 multidimensional arrays. Ensures ctors will be made for types that
25149 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
25151 * decl.c (last_dtor_insn): New to track the last compiler generated
25153 (store_parm_decls): Set it.
25154 (finish_function): Use it to see if the dtor is empty. Avoid doing
25155 vtable setup all the time, if we can.
25156 (struct cp_function): Add last_dtor_insn.
25157 (push_cp_function_context): Save it.
25158 (pop_cp_function_context): Restore it.
25160 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
25162 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
25165 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
25167 * typeck.c (expand_target_expr): Make sure targets get put into the
25168 current temp_slot_level, so that the free_temp_slots call will reuse
25171 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
25173 * class.c (finish_struct_1): Delay delta fixups for virtual bases
25174 until after we have done the hard virtuals, to avoid a bogus `every
25175 virtual function must have a unique final overrider' for virtual
25176 functions that are only overridden by hard virtuals.
25178 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
25180 * pt.c (do_function_instantiation): Don't try to find a file-scope
25181 template for a member function.
25183 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
25185 * g++.c (main): Add handling of -nodefaultlibs.
25187 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
25189 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
25190 distinguish between direct bindings of reference variables, and
25191 indirect bindings of reference variables.
25192 * cvt.c (build_up_reference): Use it.
25193 * typeck.c (convert_arguments): Use it to indicate this is an
25195 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
25196 as they are unused.
25197 (expand_static_init): Likewise.
25198 (cplus_expand_expr_stmt): Likewise.
25199 * decl2.c (finish_file): Likewise.
25200 * init.c (perform_member_init): Likewise.
25201 (emit_base_init): Likewise.
25202 (expand_aggr_vbase_init_1): Likewise.
25204 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
25206 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
25207 get a DECL_LANG_SPECIFIC node.
25208 * cp-tree.h (lang_decl_flags): Add new member `level'.
25209 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
25210 decl_flags level member.
25212 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
25214 * call.c (build_method_call): Make sure instance has a
25215 TYPE_LANG_SPECIFIC node before we dive into it.
25217 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
25219 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
25221 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
25223 * decl.c (duplicate_decls): When smashing decls, smash staticness in
25226 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
25228 * decl.c (poplevel): Handle the merging of subblocks of cleanups
25229 when finishing blocks that have already been created (usually due to
25230 the fixup goto code). Fixes bad debugging information.
25232 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
25234 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
25235 that's not a list of overloaded functions.
25237 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
25239 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
25240 before trying to use DECL_ABSTRACT_VIRTUAL_P.
25242 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
25244 * decl2.c (mark_used): New function for hooking into setting of
25245 TREE_USED on decls.
25246 * call.c (build_method_call): Use it.
25247 * class.c (instantiate_type): Likewise.
25248 * init.c (build_offset_ref): Likewise. Don't call assemble_external
25249 for all like-named functions.
25250 * method.c (hack_identifier): Likewise.
25251 (emit_thunk): Don't call assemble_external.
25252 (make_thunk): Create thunk as a FUNCTION_DECL so that it
25253 gets the right mode and ENCODE_SECTION_INFO works.
25255 * parse.y: Use mark_used. Pass operator names to do_identifier.
25256 * lex.c (do_identifier): Handle operator names.
25258 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
25260 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
25262 * errfn.c: Include stdio.h.
25263 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
25265 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
25267 * typeck2.c (digest_init): Always convert initializers to the
25270 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
25272 * init.c (member_init_ok_or_else): Don't allow member initializers
25273 for indirect members, as it is invalid.
25275 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
25277 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
25279 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
25281 * parse.y (for.init.statement): Catch compound statements inside for
25282 initializations, if we're being pedantic.
25284 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
25286 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
25289 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
25291 * error.c (dump_expr): Don't core dump when a boolean expression is
25292 used as a default argument.
25294 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
25296 * class.c (finish_struct_bits): Check aggregate_value_p instead of
25299 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
25301 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
25302 BLKmode type that would otherwise be returned in registers.
25304 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
25306 * g++.c (WITHLIBC): New macro.
25307 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
25308 saw_libc and pass it at the end if it was set.
25310 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
25312 * parse.y (fn.def1): Call split_specs_attrs in
25313 declmods notype_declarator case.