1 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
3 * tree.def: Add RETURN_INIT.
4 * pt.c (instantiate_decl): Handle RETURN_INIT.
5 * decl.c (store_return_init): Handle minimal_parse_mode.
7 * tree.c (cp_build_type_variant): Just return an error_mark_node.
8 * decl.c (make_typename_type): Don't try to get the file and line
10 * typeck.c (comptypes): Handle TYPENAME_TYPE.
12 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
14 * decl.c (poplevel): Make sure we clear out and restore old local
15 non-VAR_DECL values by default when they go out of scope.
17 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
19 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
20 referring to addresses of variables and functions.
22 * error.c (dump_expr): Support SIZEOF_EXPR.
24 * init.c (do_friend): Use the return value of check_classfn.
26 * typeck.c (convert_arguments): Call complete_type.
28 * method.c (hack_identifier): After giving an error, set value to
31 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
33 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
34 lossage for local classes.
35 * cp-tree.h: Declare it.
36 * decl.c (lookup_name_real): Evil, painful hack for local classes.
37 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
38 Use hack_decl_function_context.
39 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
40 (start_function): Use hack_decl_function_context.
41 (finish_function): Ditto.
42 * method.c (synthesize_method): Ditto.
43 * lex.c (process_next_inline): Ditto.
44 (do_pending_inlines): Ditto.
45 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
48 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
50 * sig.c (build_signature_pointer_or_reference_type): Align
51 signature pointers/references on 8-byte boundaries so they can be
52 grabbed 2 words at a time on a Sparc.
54 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
56 * method.c (hack_identifier): Requiring a static chain is now a
58 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
61 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
63 * init.c (build_offset_ref): Call complete_type.
65 * decl.c (pop_from_top_level): Always pop previous_class_type.
67 * parse.y: Handle multiple decls in a for-init-statement.
68 * pt.c (tsubst_expr): Ditto.
70 * pt.c (tsubst): Use tsubst_expr for the second operand of an
73 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
74 (poplevel_class): Set it here.
75 (pop_from_top_level): Pop it here if we're returning to class scope.
76 * class.c (pushclass): Don't set it here.
78 * decl.c (maybe_push_to_top_level): Save current_template_parms,
79 and clear it if !pseudo.
80 (pop_from_top_level): Restore it.
82 * decl2.c (finish_file): Push the dummy each time we walk the list
85 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
86 something for CAST_EXPR.
88 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
90 * cvt.c (cp_convert): Warn about implicit conversion of the
91 address of a function to bool, as it is always true.
93 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
95 * typeck.c (c_expand_return): Fix warning for local externs returned.
97 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
99 * tree.c (mapcar): Propagate const and volatile properly.
101 * typeck.c (complete_type): Be sure to instantiate the
102 MAIN_VARIANT of the type.
104 * method.c (synthesize_method): Class interface hackery does not
105 apply to synthesized methods.
107 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
109 * pt.c (comp_template_args): Use comptypes rather than just
110 checking for TEMPLATE_TYPE_PARM equivalence.
112 * typeck.c (build_x_function_call): Call complete_type before
113 checking TYPE_OVERLOADS_CALL_EXPR.
115 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
117 * g++.c (main): Check also for new define ALT_LIBM.
119 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
121 * pt.c (instantiate_class_template): If we don't have a pattern
123 (coerce_template_parms): If we see a local class, bail.
125 * decl.c (grok_reference_init): Make sure there's a type before
128 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
129 (push_template_decl): Ditto.
131 * parse.y (named_class_head): Set
132 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
134 * decl.c (xref_tag): Diagnose redeclaration of template
137 * error.c (dump_type): Handle anonymous template type parms.
139 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
141 (coerce_template_parms): Ditto.
143 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
145 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
146 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
148 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
150 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
151 before trying to get its STUB_DECL.
152 (coerce_template_parms): Ditto.
154 * parse.y (template_type_parm): If they didn't use 'class',
155 pretend they did after giving an error.
157 * pt.c (coerce_template_parms): Diagnose use of local class.
159 * decl.c (grok_reference_init): Use instantiate_type.
161 * error.c (dump_expr): Handle TEMPLATE_DECLs.
163 * parse.y (named_class_head): Diagnose mismatching types and tags.
165 * decl.c (pushdecl): Type decls and class templates clash with
166 artificial type decls, not hide them.
168 * decl.c (redeclaration_error_message): Diagnose redefinition of
170 (duplicate_decls): Diagnose disallowed overloads for template
173 * decl.c (start_decl): Call complete_type before checking for a
176 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
178 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
180 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
182 * decl.c (grok_op_properties): Don't check for operator++(int) in
185 * tree.c (perm_manip): Return a copy of variable and function
186 decls with external linkage.
188 * tree.def: Change some of the min tree codes to type "1".
189 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
190 * method.c (build_overload_int): Emit something arbitrary for
191 anything but an INTEGER_CST if we're in a template.
193 * decl.c (cp_finish_decl): Call complete_type before deciding
194 whether or not to lay out the decl.
196 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
198 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
200 * typeck2.c (build_x_arrow): Call complete_type.
202 * pt.c (add_pending_template): Broken out.
203 (lookup_template_class): If -fexternal-templates, call it for all
204 the methods of implemented types.
205 (instantiate_class_template): Instead of instantiating them here.
206 (instantiate_decl): Handle -fexternal-templates earlier.
208 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
210 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
211 memoized lookup stuff inside GATHER_STATISTICS.
213 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
215 * decl.c (start_decl): Complain about array of incomplete type
217 (grokdeclarator): Not here.
219 * parse.y (template_parm): Expand full_parm inline so we can set
220 the rule's precedence.
222 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
223 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
224 * decl2.c (grokbitfield): Don't check for integer constant here.
225 * class.c (finish_struct_1): Check here.
227 * decl.c (define_label): Make the min decl go on permanent_obstack.
229 * pt.c (unify): Don't handle CONST_DECLs.
230 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
231 (tsubst_copy): Ditto.
233 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
234 CONST_DECL for a template parm.
236 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
238 * decl.c (grokdeclarator): Complain about array of incomplete type
240 (start_decl_1): Not here.
242 * pt.c (tsubst): Handle pointer-to-function declarators.
244 * method.c (hack_identifier): If pedantic, diagnose local class
245 methods that require a static chain.
247 * decl.c (grok_op_properties): No longer static.
248 * cp-tree.h: Declare it.
249 * pt.c (tsubst): Call it for operators.
250 Use tsubst_copy for TREE_VECs.
252 * parse.y (template_arg): The expr has precedence like '>'.
254 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
256 * pt.c (coerce_template_parms): Don't coerce an expression using
258 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
259 (tsubst): Don't use build_index_2_type if the max_value uses template
261 * method.c (build_overload_int): Emit something arbitrary for an
262 expression using template parms.
264 * parse.y (template_close_bracket): New non-terminal to catch use
265 of '>>' instead of '> >' in template class names.
266 (template_type): Use it.
267 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
269 * tree.def: Add CAST_EXPR.
270 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
271 CONVERT_EXPR for minimal_parse_mode.
272 * typeck.c (build_c_cast): Ditto.
273 * pt.c (tsubst_copy): Ditto.
274 * decl2.c (build_expr_from_tree): Ditto.
275 * error.c (dump_expr): Ditto.
277 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
279 * except.c (SetTerminate, SetUnexpected): Put back global vars.
280 (init_exception_processing): Put back decl/init of
281 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
284 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
285 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
287 * cp-tree.h (declare_uninstantiated_type_level,
288 uninstantiated_type_level_p): Delete prototypes.
290 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
292 * pt.c (tsubst_expr): Add default return.
294 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
296 * error.c (fndecl_as_string): Delete unused arg CNAME.
297 * sig.c (build_signature_table_constructor,
298 build_signature_method_call): Fix calls.
300 * class.c (the_null_vtable_entry): Delete var definition.
301 (init_class_processing): Delete tree the_null_vtable_entry init.
302 * decl.c (no_print_{functions, builtins}): Declare as static.
303 (__tp_desc_type_node): #if 0 var definition.
304 (init_type_desc): #if 0 init of __tp_desc_type_node.
305 (vb_off_identifier): Move var decl into init_decl_processing.
306 (current_function_assigns_this): Declare as static.
307 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
308 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
309 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
310 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
311 * init.c (BI_header_type, BI_header_size): Declare as static.
312 * pt.c (template_classes): Delete unused var.
313 (add_pending_template): Delete decl for non-existent fn.
314 (lookup_template_class): Delete vars CODE and TAG_CODE.
315 (instantiate_template): Delete unused var TARGS.
316 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
318 (__tp_desc_type_node): #if 0 var decl.
319 (fndecl_as_string): Fix prototype.
321 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
323 * tree.def: Add GOTO_STMT.
324 * pt.c (tsubst_expr): Support goto and labels.
325 * decl.c (define_label): Support minimal parsing.
326 * parse.y (simple_stmt): Ditto.
328 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
330 * xref.c (GNU_xref_member): Only define/set var I if
331 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
333 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
334 (GNU_xref_end): Fix call.
335 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
336 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
338 * tree.c (build_exception_variant): Delete unused vars I, A, T,
340 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
341 (mapcar): Delete unused var CODE.
342 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
343 (break_out_cleanups): Fix call.
344 (bot_manip): Likewise.
345 * call.c (build_method_call): Likewise.
346 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
348 * typeck.c (unary_complex_lvalue, build_modify_expr,
349 convert_for_initialization): Likewise.
350 * typeck2.c (build_functional_cast): Likewise.
351 * cp-tree.h (build_cplus_new): Fix prototype.
353 * repo.c (open_repo_file): Delete unused var Q.
354 (repo_compile_flags, repo_template_declared,
355 repo_template_defined, repo_class_defined, repo_inline_used,
356 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
357 (repo_get_id, repo_vtable_used): Declare as static.
358 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
361 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
363 * parse.y (pending_inlines): Add function_try_block case.
365 * pt.c (unify): Fix for template const parms.
367 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
369 * lex.c (extract_interface_info): Delete forward decl.
370 (default_copy_constructor_body, default_assign_ref_body): Delete
371 decls for non-existent functions.
372 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
373 (init_lex): Delete setting them.
374 (cons_up_default_function): Delete unused vars FUNC_BUF,
375 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
377 (toplevel, expression_obstack): Delete unused extern decls.
378 (tree_node_kind): Delete unused enum.
379 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
381 (tree_node_kind_names): Delete unused extern decl.
382 (synth_obstack): Delete unused var.
383 (init_lex): Don't set it.
384 (init_parse): Add decl before use.
385 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
386 (current_unit_{name, language}): Delete unused vars.
387 (check_newline): Don't bother setting them, just accept the #pragma.
388 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
389 (current_unit_{name, language}): Delete decls.
391 * search.c: Wrap all of the memoized functions, macros, and
392 variables inside #ifdef GATHER_STATISTICS.
393 (lookup_field, lookup_fnfields): Likewise.
394 (init_search_processing): Likewise.
395 (reinit_search_statistics): Wrap whole function.
396 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
398 * decl.c (finish_function): Only call pop_memoized_context if
399 GATHER_STATISTICS is defined.
400 (start_function): Likewise for push_memoized_context.
401 * class.c (pushclass, popclass): Likewise.
403 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
404 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
406 * cvt.c (cp_convert): Delete unused local var FORM.
407 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
410 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
412 * pt.c (do_poplevel): Oops; really return what we get from
415 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
417 * cp-tree.h (is_aggr_type): Add prototype.
419 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
420 * method.c ({push,pop}_cp_function_context): Delete decls.
421 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
422 (SetUnexpected, SetTerminate): Delete unused vars.
423 (init_exception_processing): Don't set SetUnexpected or
424 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
425 (output_exception_table_entry): Delete unused array LABEL.
426 (expand_internal_throw): Delete unused var PARAMS.
427 (expand_start_catch_block): Delete unused var CLEANUP.
428 (emit_exception_table): Delete unused var EH_NODE_DECL.
429 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
430 GOTO_UNWIND_AND_THROW. Don't set them.
431 (end_eh_unwinder): Add top decl.
432 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
433 (exception_section, push_rtl_perm, do_function_call,
434 lang_interim_eh, push_eh_cleanup, eh_outer_context,
435 expand_end_eh_spec, end_eh_unwinder): Declare as static.
436 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
437 throw_used): Likewise.
438 * cp-tree.h (expand_end_eh_spec): Delete prototype.
440 * search.c (dfs_mark, dfs_mark_vtable_path,
441 dfs_unmark_vtable_path, dfs_mark_new_vtable,
442 dfs_unmark_new_vtable, dfs_clear_search_slot,
443 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
444 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
445 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
447 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
448 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
449 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
450 Only define #ifdef GATHER_STATISTICS.
451 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
453 (vbase_decl): Delete var definition.
454 (init_search): Delete old decl.
455 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
457 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
458 (get_base_distance_recursive): Delete unused fourth arg
459 BASETYPE_PATH. Fix call .
460 (get_base_distance): Fix call.
461 (push_class_decls): Delete unused var ID.
462 (make_memoized_table_entry): Declare as static.
463 (breadth_first_search): Declare as static.
464 (tree_has_any_destructor_p): Declare as static.
465 (pop_class_decls): Delete unused arg pop_class_decls.
466 * class.c (popclass): Fix call to pop_class_decls.
467 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
468 tree_has_any_destructor_p): Delete prototypes.
470 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
471 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
472 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
473 (build_user_desc): Delete unused var T.
474 (build_class_desc): Delete unused vars T and OFF.
475 (build_t_desc): Delete unused var NAME_STRING.
476 (build_headof): Make static.
477 (get_bad_cast_node): Likewise.
478 (get_def_to_follow): Likewise.
479 * cp-tree.h (init_type_desc): Add prototype.
480 (build_headof): Remove prototype.
482 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
484 * pt.c (tsubst): Only look for matching decls at file scope for
485 non-member functions.
487 * call.c (build_scoped_method_call): Handle scoped destructor
490 * decl.c (*_top_level): Also save previous_class_values.
492 * pt.c (tsubst_expr): Support do {} while loops.
493 * parse.y (simple_stmt): Ditto.
496 * method.c (build_overload_identifier): For a class nested in a
497 template class, don't mangle in the template parms from our
500 * lex.c, cp-tree.h: Remove support for template instantiations in
501 the pending_inlines code.
502 * pt.c: Remove dead functions and unused arguments.
503 (uses_template_parms): TYPENAME_TYPEs always use template parms.
504 * parse.y: Stop passing anything to end_template_decl.
505 * tree.c (print_lang_statistics): Only print tinst info #ifdef
508 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
510 * init.c (expand_recursive_init{,_1}): Delete decls.
511 (sort_member_init): Delete unused var INIT.
512 (emit_base_init): Delete unused var X.
513 (build_offset_ref): Delete unused var CNAME.
514 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
515 (emit_base_init): Delete unused local var BASE. Delete extern
516 decl of IN_CHARGE_IDENTIFIER.
517 (build_delete): Delete unused local var VIRTUAL_SIZE.
519 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
520 (build_delete): Fix call.
521 * decl2.c (delete_sanity): Likewise.
522 * cp-tree.h (build_vec_delete): Update prototype.
524 * typeck.c (common_base_type): Delete unused var TMP.
525 (build_binary_op): Delete local var ARGS_SAVE.
526 (build_array_ref): Delete unused var ITYPE.
527 (c_expand_return): Delete unused var USE_TEMP.
529 * typeck.c (compexcepttypes): Delete unused arg STRICT.
530 (comptypes): Fix calls.
531 * decl.c (duplicate_decls): Likewise.
532 * cp-tree.h (compexcepttypes): Delete extra arg.
534 * decl2.c (check_classfn): Delete unused second arg CNAME.
535 * decl.c (start_decl, grokfndecl): Fix calls.
536 * init.c (do_friend): Likewise.
537 * cp-tree.h (check_classfn): Update prototype.
539 * cp-tree.h (signature_error, import_export_vtable,
540 append_signature_fields, id_in_current_class, mark_used,
541 copy_assignment_arg_p): Add decls.
542 * decl2.c (mark_used): Delete decl.
544 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
546 * class.c (get_vtable_entry): Diable unused function.
547 (doing_hard_virtuals): Delete unused static global var.
548 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
549 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
550 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
551 (modify_one_vtable): Delete unused var OLD_RTTI.
552 (finish_struct_anon): Delete unused vars OFFSET and X.
553 (finish_struct_bits): Delete unused var METHOD_VEC.
554 (get_basefndecls): Delete unused var PURPOSE. Delete unused
555 for-scope local variable METHODS.
557 * call.c (user_harshness): Delete unused/unneeded arg PARM.
558 (ideal_candidate): Delete unused args BASETYPE and PARMS.
559 (build_method_call): Delete unused args passed into ideal_candidate.
560 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
561 * cp-tree.h (synthesize_method): Add decl.
563 * decl.c (note_level_for_for): Give void return type.
564 (pushdecl_nonclass_level): Likewise.
565 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
566 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
567 (suspend_binding_level): Delete unused var LEVEL.
568 (duplicate_decls): Delete unused var CTYPE.
569 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
570 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
572 (grokdeclarator): Delete unused var C.
573 (grokdeclarator): Delete unused var SIZE_VARIES.
574 (grokparms): Delete unused var SAW_VOID.
575 (start_function): Delete unused var OLDDECL.
576 (cplus_expand_expr_stmt): Delete unused var
577 REMOVE_IMPLICIT_IMMEDIATELY.
579 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
581 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
583 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
585 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
586 (build_min_nt): Ditto.
587 * pt.c (do_pushlevel): Emit line note.
588 (do_poplevel): Return what we get from poplevel.
589 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
590 * parse.y: Use do_pushlevel and do_poplevel.
591 * cp-tree.h: Declare do_poplevel.
593 * cp-tree.h: Declare at_eof.
594 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
595 * decl2.c (import_export_decl): Renamed from import_export_inline.
596 (finish_file): Call it to do interface handling for statics.
597 * pt.c (tsubst_copy): Call mark_used on variables and functions
600 * decl2.c (finish_file): Don't emit statics we can't generate.
601 * pt.c (instantiate_decl): Don't set interface on instantiations
604 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
605 * tree.c (print_lang_statistics): Print max template depth.
606 * pt.c (push_tinst_level): Dump entire instantiation context.
607 (instantiate_class_template): Use it and pop_tinst_level.
608 (instantiate_decl): Ditto.
610 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
611 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
613 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
615 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
616 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
617 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
618 the new template implementation.
620 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
622 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
624 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
626 * decl.c (cp_finish_decl): Delay emitting the debug information for
627 a typedef that has been installed as the canonical typedef, if the
628 type has not yet been defined.
630 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
632 * decl2.c (grokfield): Still call pop_nested_class for access decls.
634 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
636 * decl.c (lookup_label): Call label_rtx.
638 * decl.c (make_binding_level): New function.
639 (pushlevel, pushlevel_class): Call it instead of explicit
640 duplicate calls to xmalloc.
642 * decl.c (init_decl_processing): Delete useless build_pointer_type
645 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
646 (sizet_ftype_string): Delete variable.
647 (init_decl_processing): Add built-in functions fabsf, fabsl,
648 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
649 variable strlen_ftype, used for strlen.
651 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
653 * decl.c (push_to_top_level): Start from current_binding_level
654 again for now; the stl hacks depend on g++ being broken in this
655 way, and it'll be fixed in the template rewrite.
657 * tree.def: Add USING_DECL.
658 * decl2.c (do_class_using_decl): Implement.
659 (grokfield): Pass access decls off to do_class_using_decl instead of
661 * error.c (dump_decl): Handle USING_DECLs.
662 * decl.c (grokdeclarator): Remove code for handling access decls.
663 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
664 as access decls for now.
665 (finish_struct): Don't check USING_DECLs for other uses of the name.
667 * search.c (get_matching_virtual): Use cp_error_at.
669 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
671 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
673 (self_promoting_args_p): Move the check that TYPE is non-nil
674 before trying to look at its main variant.
675 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
677 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
679 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
680 (do_friend): Delete call to xref_friend.
681 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
683 * typeck.c (convert_sequence): #if 0 unused function.
685 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
686 be in decl_in_memory_p.
687 (decl_in_memory_p): Delete decl.
688 * expr.c (decl_in_memory_p): Delete fn.
689 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
691 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
693 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
695 * class.c (finish_struct_1): Check for a pure-specifier on a
696 non-virtual function here.
698 * decl2.c (grok_function_init): Don't check whether the function
700 (grokfield): Don't call check_for_override here.
702 * decl.c (push_to_top_level): Start from inner_binding_level,
703 check class_shadowed in class levels.
705 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
707 * decl.c (resume_level): Ignore things that don't have names, instead
710 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
712 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
714 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
716 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
719 * parse.y (complete_type_name): Bind global_scope earlier.
720 (complex_type_name): Ditto.
721 (qualified_type_name): Remove.
723 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
725 * decl.c (grokfndecl): Move code that looks for virtuals in base
727 * class.c (check_for_override): ... to a new function.
728 (finish_struct_1): Call it.
730 * cp-tree.h: Declare warn_sign_compare.
732 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
733 rather than extra_warnings to decide whether to warn about
734 comparison of signed and unsigned.
736 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
737 implies -Wsign-compare. -Wall doesn't imply -W.
739 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
741 * typeck.c (build_component_ref): Fix to handle anon unions in base
744 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
746 * class.c (resolves_to_fixed_type_p): Delete code dealing with
747 a WITH_CLEANUP_EXPR, since we don't generate them any more.
748 * cvt.c (build_up_reference): Likewise.
749 * decl.c (grok_reference_init): Likewise.
750 (cp_finish_decl): Likewise.
751 * error.c (dump_expr): Likewise.
752 * tree.c (real_lvalue_p): Likewise.
753 (lvalue_p): Likewise.
754 (build_cplus_new): Likewise.
755 (unsave_expr_now): Likewise.
756 * typeck.c (unary_complex_lvalue, build_modify_expr,
757 c_expand_return): Likewise.
759 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
761 Make the C++ front-end pay attention to attributes for structures.
762 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
764 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
765 Take out old round_up_size use and setting the DECL_ALIGN possibly
766 using it. Take out setting of TYPE_ALIGN to round_up_size, which
767 can override what the attribute set.
768 * cp-tree.h (finish_struct): Update prototype.
769 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
770 attributes to finish_struct.
771 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
772 value down into finish_struct.
773 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
775 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
777 * decl.c (poplevel): Re-word dead for local handling.
778 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
779 (cp_finish_decl): If is_for_scope, check for duplicates so
780 we can disable is_for_scope. Otherwise, preserve_temp_slots.
782 * lex.c (do_identifier): Use global binding in preference of
783 dead for local variable.
785 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
787 * init.c (initializing_context): Handle anon union changes, the
788 context where fields of anon unions can be initialized now has to be
789 found by walking up the TYPE_CONTEXT chain.
791 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
793 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
794 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
795 (obscure_complex_init): If bss is supported, always set
796 DECL_INITIAL to error_mark_node.
798 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
800 * init.c (is_friend): Make sure there's a context before we see if
803 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
805 * init.c (is_friend): Classes are not friendly with nested classes.
807 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
809 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
810 and record its result.
812 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
814 * class.c (finish_struct_anon): Switch around code to not move anon
815 union elements around, nor mess up their contexts, nor offsets,
816 instead we now build up the right number of COMPONENT_REFs for all
817 the anon unions that may be present at build_component_ref time.
818 * typeck.c (lookup_anon_field): New routine to handle field lookup
819 on fields without names. We find them, based upon their unique type
821 * typeck.c (build_component_ref): Allow FIELD_DECL components.
822 Handle finding components in anonymous unions, and ensure that a
823 COMPONENT_REF is built for each level as necessary.
825 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
827 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
828 code that ensures that copy ctors are used if appropriate.
830 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
832 * init.c (build_vec_delete): Only give an error if base isn't an
835 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
837 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
838 (yylex): If we see `new', keep slurping.
840 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
842 * class.c (finish_struct_1): Move code for handling anon unions...
843 (finish_struct_anon): to here. Fixup so that we do the offset
844 calculations right, and so that the fields are physically moved to
845 the containers's chain.
847 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
849 * decl.c (grokdeclarator): Avoid trying to get an operand off an
852 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
854 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
855 POINTER_SIZE to agree with expr.c.
857 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
859 * search.c (lookup_field): Don't report ambiguities if protect is 0,
860 instead return NULL_TREE.
862 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
864 * class.c (finish_struct_1): Call warn_hidden if we want warnings
865 about overloaded virtual functions.
866 (warn_hidden): New routine to warn of virtual functions that are
867 hidden by other virtual functions, that are not overridden.
868 (get_basefndecls): New routine, used by warn_hidden.
869 (mark_overriders): New routine, used by warn_hidden.
870 * search.c (get_matching_virtual): Remove old warning that just
873 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
875 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
877 * typeck.c (null_ptr_cst_p): Delete unused fn.
878 (build_function_call_maybe): Delete unused fn.
880 * expr.c (extract_init): #if 0 the code after unconditional return 0
883 Delete old cadillac code.
884 * edsel.c: Remove file.
885 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
886 * Makefile.in (CXX_OBJS): Delete edsel.o.
887 (edsel.o): Delete rule.
888 * cp-tree.h (flag_cadillac): Delete var decl.
889 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
890 * decl2.c (flag_cadillac): Delete var definition.
891 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
892 (grokfield): Delete code depending on flag_cadillac.
893 (finish_anon_union): Likewise.
894 * class.c (finish_struct_1): Likewise.
895 (pushclass): Likewise.
896 (popclass): Likewise.
897 (push_lang_context): Likewise.
898 (pop_lang_context): Likewise.
899 * decl.c (init_decl_processing): Likewise.
900 (start_decl): Likewise.
901 (cp_finish_decl): Likewise.
902 (xref_tag): Likewise.
903 (finish_enum): Likewise.
904 (start_function): Likewise.
905 (finish_function): Likewise.
906 (finish_stmt): Likewise.
907 * lex.c (lang_init): Likewise.
908 (check_newline): Likewise.
910 * lex.c (do_pending_inlines): Delete synthesized method kludge.
912 Delete defunct, ancient garbage collection implementation.
913 * rtti.c: New file with the RTTI stuff from gc.c.
914 * gc.c: Removed file (moved the remaining stuff into rtti.c).
915 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
916 (rtti.o): New rule, replacing gc.o.
917 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
918 * cp-tree.h: Delete gc-related fn decls.
919 (DECL_GC_OFFSET): Delete macro.
920 (flag_gc): Delete extern decl.
921 * decl.c (current_function_obstack_index): Delete var decl.
922 (current_function_obstack_usage): Delete var decl.
923 (start_function): Delete clearing of current_function_obstack_index
924 and current_function_obstack_usage.
925 (init_decl_processing): Delete code relying on -fgc.
926 Delete call to init_gc_processing.
927 (cp_finish_decl): Delete calls to build_static_gc_entry and
928 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
929 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
930 and to expand_expr of a __gc_main call.
931 (maybe_gc_cleanup): Delete var decl.
932 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
933 * decl2.c (flag_gc): Delete var decl.
934 (lang_f_options): Delete offering of -fgc.
935 (lang_decode_option): Delete -fgc and -fno-gc handling.
936 (get_temp_regvar): Delete gc code.
937 * init.c (build_new): Delete gc code.
938 * lex.c (init_lex): Delete checking of flag_gc.
940 * typeck.c (convert_arguments): Delete gc code.
941 (build_component_addr): Delete -fgc warning.
942 (build_modify_expr): Delete gc code.
944 * decl2.c (build_push_scope): Delete fn.
945 * cp-tree.h (build_push_scope): Delete decl.
947 * search.c (clear_search_slots): Delete fn.
948 * cp-tree.h (clear_search_slots): Delete decl.
950 * search.c (tree_needs_constructor_p): Delete fn.
951 * cp-tree.h (tree_needs_constructor_p): Delete decl.
953 * tree.c (id_cmp): Delete fn.
955 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
956 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
958 * tree.c (decl_value_member): Delete fn.
959 * cp-tree.h (decl_value_member): Delete decl.
961 * tree.c (list_hash_lookup_or_cons): Delete fn.
962 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
964 * method.c (cplus_exception_name): Delete fn.
965 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
967 * spew.c (shift_tokens): Delete fn.
969 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
971 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
975 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
977 * tree.c (build_cplus_staticfn_type): Delete function definition;
979 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
981 * tree.c (virtual_member): Delete function definition; never used.
982 * cp-tree.h (virtual_member): Delete decl.
984 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
986 * typeck.c (build_component_ref): Handle getting vbase pointers
987 out of complex multiple inheritance better.
989 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
991 * typeck.c (build_object_ref): Make sure we use the real type, not
994 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
996 * tree.c (build_exception_variant): Don't create new types if we
997 don't have to, also build new types on the right obstack.
999 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
1001 * decl.c (store_bindings): Split out from push_to_top_level.
1002 (push_to_top_level): Call it for b->type_shadowed on class binding
1005 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
1007 * search.c (expand_upcast_fixups): Fix so that offsets stored in
1008 vbase_offsets are always right. Fixes a problem where virtual base
1009 upcasting and downcasting could be wrong during conversions on this
1010 during virtual function dispatch at ctor/dtor time when dynamic
1011 vtable fixups for deltas are needed. This only sounds easier than
1013 (fixup_virtual_upcast_offsets): Change to reflect new calling
1014 convention for expand_upcast_fixups.
1016 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1018 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
1019 check that it's usable as the bitfield width.
1021 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1023 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
1024 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
1025 only ever used for functions in it.
1027 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
1029 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
1030 (nested_type): Ditto.
1031 (nested_name_specifier): Use lastiddecl.
1033 * decl.c (grokdeclarator): Adjust accordingly.
1034 * init.c (expand_member_init): Ditto.
1035 * parse.y (base_class): Ditto.
1036 * typeck2.c (build_functional_cast): Ditto.
1038 * typeck2.c (build_functional_cast): Fill in name after we've
1039 checked for non-aggr type.
1041 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
1043 * decl2.c (warn_pointer_arith): Default to on.
1045 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
1047 * lex.c (is_rid): New function.
1048 * decl.c (grokdeclarator): Diagnose reserved words used as
1051 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
1053 * tree.c (get_decl_list): Don't lose cv-quals.
1055 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
1056 typespecs used as declarator-ids.
1058 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
1060 * decl.c (poplevel): When poping a level, don't give a warning for
1061 any subblocks that already exist.
1063 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
1065 * typeck.c (build_object_ref): Finish what I started.
1067 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
1069 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
1071 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
1074 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
1076 * decl.c (xref_tag): Handle passing a type in directly.
1078 * parse.y (qualified_type_name): Pull out the type.
1079 (nested_type): Ditto.
1080 Take types directly instead of as identifiers.
1081 * call.c (build_scoped_method_call): Take types directly instead of
1083 * decl.c (xref_basetypes): Ditto.
1084 * init.c (expand_member_init): Ditto.
1085 (build_member_call): Ditto.
1086 (build_offset_ref): Ditto.
1087 * typeck2.c (build_scoped_ref): Ditto, remove bogus code.
1088 * method.c (do_build_assign_ref): Ditto.
1089 * decl.c (grokdeclarator): Handle a type appearing as the
1090 declarator-id for constructors.
1091 * method.c (do_build_copy_constructor): current_base_init_list now
1092 uses the types directly, not their names.
1093 * init.c (sort_base_init): Ditto.
1094 (expand_member_init): Ditto.
1095 * init.c (is_aggr_type): New function, like is_aggr_typedef.
1097 Mon Jan 15 08:45:01 1996 Jeffrey A Law (law@cygnus.com)
1099 * tree.c (layout_basetypes): Call build_lang_field_decl instead
1100 of build_lang_decl if first arg is a FIELD_DECL.
1101 (tree_copy_lang_decl_for_deferred_output): Reverse test for when
1102 to copy DECL_MAIN_VARIANT and DECL_CHAIN.
1104 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1106 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
1108 * except.c (expand_start_catch_block): Set TREE_USED to avoid
1109 warnings about the catch handler.
1111 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
1113 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
1116 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1118 Fix access control to use trees rather than integers.
1119 * class.c (access_{default, public, protected, private,
1120 default_virtual, public_virtual, private_virtual}_node): Add
1122 (init_class_processing): Do creation of those nodes.
1123 * cp-tree.h (access_type): Delete enum decl.
1124 (access_{default, public, protected, private, default_virtual,
1125 public_virtual, private_virtual}_node): Add decls.
1126 (compute_access): Change return type.
1127 * search.c (compute_access): Have tree return type, instead of enum.
1128 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
1129 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
1130 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
1131 * parse.y (VISSPEC): Make ttype rather than itype.
1132 (base_class_access_list): Likewise.
1133 * *.[cy]: Change all refs of `access_public' to `access_public_node',
1135 * call.c (build_method_call): Make ACCESS be a tree.
1136 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
1137 * cvt.c (convert_to_aggr): Likewise.
1138 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
1140 * method.c (hack_identifier): Likewise.
1141 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
1143 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
1145 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
1146 frontend, and make it more consistent with respect to
1149 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
1151 * decl.c (pushdecl): Check for duplicate parameter names.
1153 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
1155 * decl.c (expand_static_init): Call assemble_external for atexit.
1157 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
1159 * except.c (do_unwind): Remove some generated dead code.
1160 (eh_outer_context): New routine, factor out some common code from
1161 expand_builtin_throw and end_eh_unwinder. Add code to do return
1162 address masking for the PA.
1163 (expand_builtin_throw): Use eh_outer_context instead of open coding
1165 (end_eh_unwinder): Ditto.
1167 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
1169 * except.c (expand_throw): Call assemble_external for __empty, if we
1172 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
1174 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
1175 NORMAL_RETURN_ADDR_OFFSET.
1176 (end_eh_unwinder): Ditto.
1178 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
1180 * gc.c (build_dynamic_cast): Make sure we don't cast away const
1181 when dealing with references, and make sure we handle dynamic
1182 casting to a cv qualified reference.
1184 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
1186 * except.c (struct eh_context): New structure top hold eh context
1188 (push_eh_context): New routine.
1189 (pop_eh_context): Ditto.
1190 * decl.c (push_cp_function_context): Use them.
1191 (pop_cp_function_context): Ditto.
1193 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
1195 * decl2.c (finish_file): Also prune uninteresting functions in the
1196 inline emission loop.
1198 Wed Dec 20 02:32:07 1995 Jeffrey A Law (law@cygnus.com)
1200 * sig.c (build_signature_table_constructor): Mark functions
1201 in the signature as referenced.
1203 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
1205 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
1206 the inline emission stuff.
1208 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
1210 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
1212 * lang-options.h: Add -f{no-,}weak.
1213 * decl.c (init_decl_processing): If the target does not support weak
1214 symbols, don't use them.
1215 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
1217 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
1219 * init.c (expand_member_init): warning for base init after members.
1221 Sun Dec 17 22:06:56 1995 Jeffrey A Law (law@cygnus.com)
1223 * tree.c (tree_copy_lang_decl_for_deferred_output): Handle
1224 CONST_DECLs correctly.
1226 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
1228 * cvt.c (build_expr_type_conversion): Don't convert to a reference
1231 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
1233 * method.c (report_type_mismatch): Improve wording for volatile
1236 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
1238 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
1239 expand_assignment, as the later doesn't handle things that have
1240 copy constructors well. The compiler would do bitwise copying,
1241 instead of ctor calling in some cases.
1243 Wed Dec 13 17:05:54 PST 1995 Paul Eggert <eggert@twinsun.com>
1245 * g++.c (my_strerror): Return "cannot access" if errno is 0.
1246 (pfatal_with_name, perror_exec): Don't assume that
1247 the returned value from my_strerror contains no '%'s.
1249 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
1251 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
1253 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
1254 TYPE_METHODS/TREE_CHAIN mean what they used to.
1255 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
1256 instead of TYPE_METHODS.
1257 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
1258 * tree.c (tree_copy_lang_decl_for_deferred_output): Ditto.
1259 * cp-tree.h (CLASSTYPE_METHODS): Lose.
1260 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
1262 (struct lang_decl): Lose next_method field.
1263 (DECL_NEXT_METHOD): Lose.
1264 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
1265 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
1267 (finish_struct_methods): Don't mess with the TREE_CHAINs in
1270 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
1273 * call.c (build_method_call): Synthesize here even when not inlining.
1274 * typeck.c (build_function_call_real): Ditto.
1276 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
1278 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
1279 == DBX_DEBUG, call dbxout_start_new_source_file and
1280 dbxout_resume_previous_source_file when appropriate.
1282 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
1284 * except.c (start_anon_func): Push to the top level.
1285 (end_anon_func): Pop from the top level.
1287 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
1289 * cp-tree.h (build_cleanup): New routine to build cleanups.
1290 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
1291 call at ctor time and use atexit to run it later.
1292 * decl2.c (build_cleanup): New routine, taken from finish_file.
1293 (finish_file): Use build_cleanup instead, and don't put function
1294 local statics in global dtor list.
1296 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
1298 * except.c (expand_throw): Ensure that we have cleanups, if we try
1299 and expand cleanups.
1301 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
1303 * except.c (expand_throw): Add logic to manage dynamic cleanups for
1305 (expand_end_catch_block): Use the magic of expand_goto, instead of
1306 emit_jump so that we get the cleanup for any catch clause parameter
1307 and the cleanup for the exception object. Update to reflect label
1309 (push_eh_cleanup): New routine to register a cleanup for an
1311 (empty_fndecl): Used to default cleanup actions to
1313 (init_exception_processing): Setup empty_fndecl. Setup
1315 (expand_start_catch_block): Update to reflect label changes. Call
1316 push_eh_object to register the cleanup for the EH object.
1317 (start_anon_func): New routine to start building lambda expressions
1319 (end_anon_func): New routine to end them.
1320 (struct labelNode): Change so that we can use tree labels, or rtx
1322 (saved_cleanup): Object to check for dynamic cleanups for the
1323 exception handling object.
1324 (push_label_entry): Change so that we can use tree labels, or rtx
1326 (pop_label_entry): Ditto.
1327 (top_label_entry): Ditto.
1328 (expand_start_all_catch): Use tree label instead of rtx label, so
1329 that we can get the magic of expand_goto.
1330 (expand_end_all_catch): Update to reflect label changes.
1332 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
1334 typeck.c (get_member_function_from_ptrfunc): Remove remnants of
1335 building_cleanup logic, as we now use UNSAVE_EXPRs.
1336 * cp-tree.h (unsave_expr): Declare it.
1337 * decl.c (building_cleanup): Remove.
1338 (maybe_build_cleanup): Remove building_cleanup logic, and use
1339 UNSAVE_EXPR instead.
1341 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
1343 * gc.c (build_t_desc): Update error message to say <typeinfo>.
1345 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1347 * decl.c (pushdecl): Only warn about shadowing a local variable if
1348 warn_shadow is true.
1350 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
1352 * typeck.c (build_binary_op_nodefault): Added warning about
1353 comparisons between different enum types with -Wall, unless
1354 -fenum-int-equiv set.
1356 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
1358 * class.c (finish_struct_1): Skip down to the inner type in
1359 multidimensional arrays. Ensures ctors will be made for types that
1362 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
1364 * decl.c (last_dtor_insn): New to track the last compiler generated
1366 (store_parm_decls): Set it.
1367 (finish_function): Use it to see if the dtor is empty. Avoid doing
1368 vtable setup all the time, if we can.
1369 (struct cp_function): Add last_dtor_insn.
1370 (push_cp_function_context): Save it.
1371 (pop_cp_function_context): Restore it.
1373 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
1375 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
1378 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
1380 * typeck.c (expand_target_expr): Make sure targets get put into the
1381 current temp_slot_level, so that the free_temp_slots call will reuse
1384 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
1386 * class.c (finish_struct_1): Delay delta fixups for virtual bases
1387 until after we have done the hard virtuals, to avoid a bogus `every
1388 virtual function must have a unique final overrider' for virtual
1389 functions that are only overridden by hard virtuals.
1391 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
1393 * pt.c (do_function_instantiation): Don't try to find a file-scope
1394 template for a member function.
1396 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
1398 * g++.c (main): Add handling of -nodefaultlibs.
1400 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
1402 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
1403 distinguish between direct bindings of reference variables, and
1404 indirect bindings of reference variables.
1405 * cvt.c (build_up_reference): Use it.
1406 * typeck.c (convert_arguments): Use it to indicate this is an
1408 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
1410 (expand_static_init): Diotto.
1411 (cplus_expand_expr_stmt): Ditto.
1412 * decl2.c (finish_file): Ditto.
1413 * init.c (perform_member_init): Ditto.
1414 (emit_base_init): Ditto.
1415 (expand_aggr_vbase_init_1): Ditto.
1417 Fri Nov 10 09:19:31 1995 Jeffrey A Law (law@cygnus.com)
1419 * tree.c (tree_copy_lang_decl_for_deferred_output): Handle
1420 copying of DECL_ARGUMENTS field.
1421 (tree_copy_lang_type_for_deferred_output): Handle disgusting
1422 re-use of TYPE_LANG_SPECIFIC for pointer to member function
1425 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1427 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
1428 get a DECL_LANG_SPECIFIC node.
1429 * cp-tree.h (lang_decl_flags): Add new member `level'.
1430 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
1431 decl_flags level member.
1433 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1435 * call.c (build_method_call): Make sure instance has a
1436 TYPE_LANG_SPECIFIC node before we dive into it.
1438 Sat Nov 4 20:01:52 1995 Jason Molenda (crash@phydeaux.cygnus.com)
1440 * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
1442 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
1444 * decl.c (duplicate_decls): When smashing decls, smash staticness in
1447 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
1449 * decl.c (poplevel): Handle the merging of subblocks of cleanups
1450 when finishing blocks that have already been created (usually due to
1451 the fixup goto code). Fixes bad debugging information.
1453 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
1455 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
1456 that's not a list of overloaded functions.
1458 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1460 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
1461 before trying to use DECL_ABSTRACT_VIRTUAL_P.
1463 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
1465 * decl2.c (mark_used): New function for hooking into setting of
1467 * call.c (build_method_call): Use it.
1468 * class.c (instantiate_type): Ditto.
1469 * init.c (build_offset_ref): Ditto. Don't call assemble_external
1470 for all like-named functions.
1471 * method.c (hack_identifier): Ditto.
1472 (emit_thunk): Don't call assemble_external.
1473 (make_thunk): Create thunk as a FUNCTION_DECL so that it
1474 gets the right mode and ENCODE_SECTION_INFO works.
1476 * parse.y: Use mark_used. Pass operator names to do_identifier.
1477 * lex.c (do_identifier): Handle operator names.
1479 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
1481 Thu Oct 26 20:58:59 1995 Jeffrey A Law (law@cygnus.com)
1483 * cp/tree.c (tree_copy_lang_decl_for_deferred_output): Handle
1484 FIELD_DECLs and VAR_DECLs correctly.
1486 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1488 * errfn.c: Include stdio.h.
1489 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
1491 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
1493 * typeck2.c (digest_init): Always convert initializers to the
1496 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
1498 * init.c (member_init_ok_or_else): Don't allow member initializers
1499 for indirect members, as it is invalid.
1501 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1503 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
1505 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
1507 * parse.y (for.init.statement): Catch compound statements inside for
1508 initializations, if we're being pedantic.
1510 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
1512 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
1515 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
1517 * error.c (dump_expr): Don't core dump when a boolean expression is
1518 used as a default argument.
1520 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
1522 * class.c (finish_struct_bits): Check aggregate_value_p instead of
1525 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
1527 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
1528 BLKmode type that would otherwise be returned in registers.
1530 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1532 * g++.c (WITHLIBC): New macro.
1533 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
1534 saw_libc and pass it at the end if it was set.
1536 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1538 * parse.y (fn.def1): Call split_specs_attrs in
1539 declmods notype_declarator case.
1541 Sun Nov 26 14:47:42 1995 Richard Kenner <kenner@mole.gnu.ai.mit.edu>
1543 * Version 2.7.2 released.
1545 Mon Nov 20 14:05:00 1995 Mike Stump <mrs@cygnus.com>
1547 * g++.c (pfatal_with_name): Add missing third argument to concat.
1549 Thu Oct 26 13:59:54 1995 Mike Stump <mrs@cygnus.com>
1551 * init.c (expand_aggr_init): Handle cv qualifiers on the object's
1554 Sat Nov 11 08:25:55 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1556 * Version 2.7.1 released.
1558 Thu Nov 2 17:02:47 1995 Jason Merrill <jason@yorick.cygnus.com>
1560 * call.c (convert_harshness): Handle references to arrays.
1562 Fri Oct 27 14:20:21 1995 Jason Merrill <jason@yorick.cygnus.com>
1564 * typeck.c (comp_target_types): Check multi-level pointer
1565 conversions in both directions.
1567 Tue Oct 17 21:39:05 1995 Jason Merrill <jason@yorick.cygnus.com>
1569 * parse.y (explicit_instantiation): Fix 'extern template' with no
1572 Mon Oct 16 14:35:20 1995 Jason Merrill <jason@yorick.cygnus.com>
1574 * parse.y (explicit_instantiation): Support automatic instantiation
1576 (named_class_head_*): Support out-of-class definition of nested
1579 Wed Oct 11 12:20:56 1995 Mike Stump <mrs@cygnus.com>
1581 * search.c (envelope_add_decl): New routine. Fix so that
1582 methods are hidden in the same way that other members are.
1583 (dfs_pushdecls): Cleanup and move functionality out of line,
1584 into envelope_add_decl.
1586 Tue Oct 10 15:46:01 1995 Mike Stump <mrs@cygnus.com>
1588 * typeck.c (mark_addressable): Only call assemble_external if we
1589 have started the output file.
1591 Tue Oct 10 11:27:18 1995 Jason Merrill <jason@yorick.cygnus.com>
1593 * decl.c (start_function): Fix earlier cv-quals change.
1595 Mon Oct 9 23:53:05 1995 Mike Stump <mrs@cygnus.com>
1597 * parse.y (complex_direct_notype_declarator): Only push the class if
1598 we are not already in the class.
1600 Mon Oct 9 11:22:03 1995 Doug Evans <dje@canuck.cygnus.com>
1602 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
1603 Update olddecl's attributes too.
1604 (grokdeclarator): #if 0 out call to build_decl_attribute_variant.
1605 * typeck.c (common_type): Call merge_machine_type_attributes.
1607 Fri Oct 6 14:44:27 1995 Mike Stump <mrs@cygnus.com>
1609 * typeck.c (mark_addressable): Add missing call to
1612 Wed Oct 4 22:05:23 1995 Jeff Law (law@hurl.cygnus.com
1614 * cp/decl.c (deplicate_decls): Merge in deferred output
1615 status for variables.
1616 * cp/tree.c (tree_copy_lang_decl_for_deferred_output): New
1617 function to copy the g++ specific parts of a DECL node.
1618 (tree_copy_lang_type_for_deferred_output): Similarly for
1621 Wed Oct 4 15:06:39 1995 Mike Stump <mrs@cygnus.com>
1623 * decl.c (store_parm_decls): Make sure the unwinder start comes
1624 before the exception specification start.
1625 * except.c (expand_exception_blocks): Make sure the unwinder end
1626 comes after the terminate protected catch clause region and after
1627 the end of the exception specification region.
1629 Wed Oct 4 12:47:02 1995 Jason Merrill <jason@yorick.cygnus.com>
1631 * lex.c (real_yylex): Fix identifier case for linemode.
1632 (handle_sysv_pragma): Don't abort when we see a pragma we don't
1635 Tue Oct 3 14:09:46 1995 Mike Stump <mrs@cygnus.com>
1637 * decl.c (store_parm_decls): Add a call to start_eh_unwinder.
1638 * except.c (init_exception_processing): __throw doesn't take any
1640 (expand_builtin_throw): Ditto. Always use Pmode, instead of SImode
1641 for all pointers. Use expand_builtin_return_addr to unwind the
1642 first level off the stack.
1643 (do_unwind): Always use Pmode, instead of SImode for all pointers.
1644 (expand_exception_blocks): Add a call to end_eh_unwinder.
1645 (start_eh_unwinder, end_eh_unwinder): New routines to build machine
1646 independent stack unwinders for function/method calls.
1648 Mon Oct 2 17:20:42 1995 Mike Stump <mrs@cygnus.com>
1650 * tree.c (unsave_expr_now): Make sure we process the argument list
1651 of any called functions. Fixes incorrect code generation for
1654 Mon Oct 2 13:04:16 1995 Mike Stump <mrs@cygnus.com>
1656 * typeck.c (get_member_function_from_ptrfunc): Save function if it
1657 needs it. Cures core dump on things like (this->*(f()))().
1659 Sat Sep 23 22:51:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1661 * decl.c (start_function): Conform to gcc cv-quals convention (no
1662 expression has a cv-qualified type) in RESULT_DECLs.
1663 * method.c (make_thunk): Ditto.
1665 Fri Sep 22 10:21:13 1995 Mike Stump <mrs@cygnus.com>
1667 * decl.c (pushtag): Add in the namespace name for the tag.
1669 Thu Sep 21 13:11:13 1995 Mike Stump <mrs@cygnus.com>
1671 * parse.y (maybe_base_class_list, base_class_list, base_class,
1672 base_class_access_list): Make sure we see the typenames for base
1674 * lex.c (see_typename): Instead of failing to see a typename when
1675 there is no next token, perfer a typename, and get the next token.
1677 Wed Sep 20 12:35:27 1995 Michael Meissner <meissner@cygnus.com>
1679 * decl.c (init_decl_processing): Add __builtin_expect.
1681 Tue Sep 19 16:48:11 1995 Mike Stump <mrs@cygnus.com>
1683 * cvt.c (cp_convert_to_pointer): Don't allow leftover conversions to
1684 or from pointer to member functions, they must all be handled before
1687 Fri Sep 15 17:14:47 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1689 * init.c (resolve_offset_ref): Fix wording of non-static member
1690 being referenced as a static.
1692 Fri Sep 15 12:39:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1694 * typeck.c (build_indirect_ref): Only bash pointer if we actually
1695 call build_expr_type_conversion.
1697 Thu Sep 14 18:24:56 1995 Jason Merrill <jason@deneb.cygnus.com>
1699 * cvt.c (build_expr_type_conversion): Handle conversion from
1701 * typeck.c (build_indirect_ref): Avoid infinite recursion.
1703 Thu Sep 14 17:23:28 1995 Mike Stump <mrs@cygnus.com>
1705 * decl.c (expand_start_early_try_stmts): New routine to start a try
1706 block at the start of the function, for function-try-blocks.
1707 * cp-tree.h (expand_start_early_try_stmts): Declare it.
1708 * parse.y (function_try_block): Use it, instead of doing it here, as
1709 we don't want to include rtl.h here, as that conflicts with RETURN
1712 Wed Sep 13 18:32:24 1995 Mike Stump <mrs@cygnus.com>
1714 * lex.c (reinit_parse_for_block): Support saving inline
1715 function-try-blocks, uses peekyylex.
1716 * parse.y (eat_saved_input): New rule, permit the parser to see that
1717 END_OF_SAVED_INPUT is ok, as it can see this when parsing the
1718 handlers of a function-try-block.
1720 (component_decl): Make sure TRY and RETURN can come after fn.def2.
1721 * spew.c (peekyylex): New routine to peek at what will come next.
1723 Wed Sep 13 16:52:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1725 * typeck.c (comptypes): Tighten up comparisons of template type
1728 * decl.c (duplicate_decls): Turn off whining about virtual functions
1729 redeclared inline for now.
1731 Wed Sep 13 11:13:40 1995 Mike Stump <mrs@cygnus.com>
1733 * decl.c (store_in_parms): New routine to put things before we
1735 * cp-tree.h (store_in_parms): Declare it.
1736 * decl.c (store_parm_decls): Use it to makr sure the starting of the
1737 eh spec comes before base inits.
1738 (finish_function): Use sequences instead of the obsolete
1740 * parse.y (fndef): Enhance readability and maintainability. Update
1741 to include function_try_block syntax.
1742 (function_try_block): Add.
1744 Tue Sep 12 17:43:07 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1746 * call.c (convert_harshness): Use comptypes, not ==, to check if
1747 TYPE and PARMTYPE are equivalent on a function type.
1749 Tue Sep 12 17:31:33 1995 Douglas Rupp (drupp@cs.washington.edu)
1751 * Make-lang.in (cc1plus) : Removed unnecessary $(exeext).
1753 Mon Sep 11 23:24:07 1995 Mike Stump <mrs@cygnus.com>
1755 * except.c (expand_throw): Never allocate storage for thrown pointer
1758 Mon Sep 11 19:36:45 1995 Mike Stump <mrs@cygnus.com>
1760 * except.c (expand_start_catch_block): Pointers to objects come
1761 back from catch matching already dereferenced, don't dereference
1764 Mon Sep 11 15:46:28 1995 Mike Stump <mrs@cygnus.com>
1766 * except.c (expand_throw): Only decay the throw expression, don't do
1767 any default conversions. This is so that one can throw and catch
1768 characters, and not have them match integers.
1770 Mon Sep 11 13:46:45 1995 Mike Stump <mrs@cygnus.com>
1772 * error.c (dump_aggr_type): Deal with anonymous unions that don't
1775 Fri Sep 8 20:40:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1777 * lex.c (handle_sysv_pragma): Deal with getting a comma from yylex.
1779 Fri Sep 8 15:51:41 1995 Mike Stump <mrs@cygnus.com>
1781 * except.c (expand_end_eh_spec): Handle empty EH specifications.
1783 Fri Sep 8 15:27:22 1995 Mike Stump <mrs@cygnus.com>
1785 * cp-tree.h (expand_start_eh_spec): Declare new routine.
1786 (expand_end_eh_spec): Ditto.
1787 * decl.c (store_parm_decls): Call expand_start_eh_spec to process
1788 exception specifications.
1789 * except.c (expand_leftover_cleanups): Remove unused parameter.
1790 (expand_end_catch_block): Ditto.
1791 (expand_exception_blocks): Ditto.
1792 (expand_start_eh_spec): New routine to mark the start of an
1793 exception specification region.
1794 (expand_end_eh_spec): New routine to mark the end of an exception
1795 specification region.
1796 (expand_exception_blocks): Call expand_end_eh_spec to process
1797 exception specifications.
1799 Fri Sep 8 14:40:48 1995 Per Bothner <bothner@kalessin.cygnus.com>
1801 * lex.c (do_identifier): Use global binding in preference of
1802 dead for local variable.
1804 Wed Sep 6 19:32:59 1995 Mike Stump <mrs@cygnus.com>
1806 * cp-tree.h (build_exception_variant): Remove used first argument.
1807 * decl.c (duplicate_decls): Ditto.
1808 (grokfndecl): Ditto.
1809 (revert_static_member_fn): Ditto.
1810 * decl2.c (grok_method_quals): Ditto.
1811 * tree.c (build_exception_variant): Ditto.
1812 * typeck.c (common_type): Ditto.
1813 * decl2.c (grokclassfn): After changing the type, call
1814 build_exception_variant, if necessary.
1816 Tue Sep 5 15:56:27 1995 Mike Stump <mrs@cygnus.com>
1818 * except.c (expand_throw): Run cleanups for the throw expression.
1820 Wed Aug 30 15:24:38 1995 Stephen L. Favor (sfavor@tigger.intecom.com)
1822 * except.c (expand_builtin_throw): Moved gen_label_rtx calls beyond
1823 the store_parm_decls call which does initialization in the emit_*
1824 code concerning label numbering.
1826 Thu Aug 31 09:01:07 1995 Mike Stump <mrs@cygnus.com>
1828 * except.c (expand_internal_throw): Let the frontend be responsible
1829 for managing all frontend EH parameters, the backend routine only
1830 needs to deal with backend values. type and value are no longer
1832 (init_exception_processing): Ditto.
1833 (expand_start_all_catch): Ditto.
1834 (expand_end_all_catch): Ditto.
1835 (expand_leftover_cleanups): Ditto.
1836 (expand_end_catch_block): Ditto.
1837 (expand_builtin_throw): Ditto.
1838 (expand_throw): Ditto.
1840 Tue Aug 29 15:04:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1842 * cp-tree.h (DECL_REAL_CONTEXT): Give the real declaration context
1844 * decl.c (cp_finish_decl): Use it.
1846 Tue Aug 29 10:30:27 1995 Mike Stump <mrs@cygnus.com>
1848 * except.c (expand_internal_throw): Oops, almost forgot type and
1849 value are now trees.
1851 Mon Aug 28 17:57:45 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1853 Fix the attribute handling to make sure they get noted before we
1854 create the function's RTL, in case they can affect that.
1855 * decl.c (grokfndecl): New arg ATTRLIST. Run
1856 cplus_decl_attributes before creating the decl's rtl.
1857 (grokdeclarator): New arg ATTRLIST, passed down into grokfndecl.
1858 (shadow_tag, groktypename, start_decl, start_method): Pass a
1859 NULL_TREE to grokdeclarator's new last arg.
1860 * decl2.c (grokfield): New arg ATTRLIST, passed into grokdeclarator.
1861 (grokbitfield, grokoptypename): Pass a NULL_TREE to
1862 grokdeclarator's new last arg.
1863 * except.c (expand_start_catch_block): Likewise.
1864 * pt.c (process_template_parm, end_template_decl,
1865 do_function_instantiation): Likewise.
1866 * cp-tree.h (grokfield): Add arg.
1867 (grokdeclarator): Move the prototype from here...
1868 * decl.h: ...to here.
1869 * lex.c (cons_up_default_function): Pass NULL_TREE to grokfield
1871 * parse.y: Create a list for the grokfield arg where appropriate,
1872 and pass it down instead of calling cplus_decl_attributes.
1874 Mon Aug 28 15:07:24 1995 Mike Stump <mrs@cygnus.com>
1876 * except.c: Always allow turning on exception handling. Allow cross
1877 compilations to use EH.
1879 Thu Aug 24 17:39:24 1995 Mike Stump <mrs@cygnus.com>
1881 * except.c (saved_pc, saved_throw_type, saved_throw_value): Use
1882 trees, instead of rtxs, and don't depend on using special machine
1883 dependent registers.
1884 (expand_internal_throw): Ditto.
1885 (init_exception_processing): Ditto.
1886 (expand_start_all_catch): Ditto.
1887 (expand_end_all_catch): Ditto.
1888 (expand_start_catch_block): Ditto.
1889 (expand_leftover_cleanups): Ditto.
1890 (expand_end_catch_block): Ditto.
1891 (expand_builtin_throw): Ditto.
1892 (expand_throw): Ditto.
1894 Wed Aug 23 17:25:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1896 * cvt.c (build_expr_type_conversion): Handle conversions to
1899 Wed Aug 23 15:33:59 1995 Mike Stump <mrs@cygnus.com>
1901 * except.c (do_unwind): Work around backend bug with -fpic.
1903 Tue Aug 22 17:20:07 1995 Per Bothner <bothner@kalessin.cygnus.com>
1905 * decl2.c (flag_new_for_scope): Add a new mode that follows ANSI
1906 for-scoping, but supports (and warns about) old programs.
1907 Make the new mode (with value 1) the default.
1908 (lang_f_options): The on-value for flag_new_for_scope is now 2.
1909 * cp-tree.h (DECL_DEAD_FOR_LOCAL, DECL_ERROR_REPORTED): New macros
1910 (DECL_SHADOWED_FOR_VAR): Likewise.
1911 * decl.c (struct binding_level): New fields dead_vars_from_for
1913 (note_level_for_for): New function.
1914 (poplevel): Special processing if is_for_scope.
1915 (pushdecl): Warn if for-scope variable shadows local.
1916 * lex.c (do_identifier): Handle old (non-ANSI) for scoping,
1917 and warn if conflicts.
1918 * parse.y (FOR): Call note_level_for_for.
1920 Mon Aug 21 10:28:31 1995 Jason Merrill <jason@deneb.cygnus.com>
1922 * decl2.c (import_export_inline): Class interface hackery does not
1923 apply to synthesized methods.
1925 Sun Aug 20 16:29:00 1995 Mike Stump <mrs@cygnus.com>
1927 * search.c (virtual_context): Find the right context more often.
1928 Solves a `recoverable compiler error, fixups for virtual function'
1931 Sun Aug 20 13:53:24 1995 Mike Stump <mrs@cygnus.com>
1933 * except.c (expand_start_all_catch): Ensure that we always transfer
1934 control to the right EH handler, by rethrowing the end label on the
1935 region, instead of hoping we are nested and falling through.
1936 (expand_leftover_cleanups): Ditto.
1937 (end_protect): Since we now rethrow the end label, put a
1938 nop after it, so that outer regions are recognized.
1939 * init.c (build_vec_delete_1): New routine to handle most of vector
1940 deleting, all code moved here from build_vec_delete.
1941 (build_array_eh_cleanup): Use build_vec_delete_1 to do all the real
1943 (expand_vec_init): If the array needs partial destructing, setup an
1944 EH region to handle it.
1945 (build_vec_delete): Move lots of code to build_vec_delete_1, use
1946 build_vec_delete_1 to do the grunt work.
1948 Sat Aug 19 14:25:33 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1950 Handle decl attributes properly for function definitions without
1951 previous attribute-loaded declarations.
1952 * decl.c (start_function): New arg ATTRS. Add a call to
1953 cplus_decl_attributes with it before we create the RTL.
1954 * cp-tree.h (start_function): Update prototype.
1955 * parse.y (fn.def1): Pass ATTRS into start_function instead of
1956 trying to call cplus_decl_attributes too late. Pass a NULL_TREE
1958 * decl2.c (finish_file): Pass NULL_TREE as fourth arg to
1960 * method.c (synthesize_method): Likewise.
1961 * except.c (expand_builtin_throw): Likewise for start on __throw.
1963 Sat Aug 19 13:36:08 1995 Mike Stump <mrs@cygnus.com>
1965 * class.c (set_rtti_entry): Turn on -fvtable-thunk -frtti support.
1966 This changes -fvtable-thunks vtable layout, so a recompile will be
1967 necessary, if you use -fvtable-thunks.
1968 (get_vtable_entry): Use n, instead of i to be consistent with the
1969 rest of the compiler.
1970 (get_vtable_entry_n): Ditto.
1971 (add_virtual_function): Add a slot for the tdesc, if -fvtable-thunks
1973 (finish_struct_1): Ditto.
1974 (skip_rtti_stuff): New routine to collapse similar code from many
1975 different parts of the compiler. I think I got them all.
1976 (modify_one_vtable): Use it.
1977 (fixup_vtable_deltas1): Ditto.
1978 (override_one_vtable): Ditto.
1979 * decl2.c (mark_vtable_entries): Ditto.
1980 * tree.c (debug_binfo): Ditto.
1981 * search.c (expand_upcast_fixups): Ditto.
1982 (get_abstract_virtuals_1): Ditto. Use virtuals, instead of tmp to
1983 consistent with the rest of the compiler.
1984 (get_abstract_virtuals): Ditto.
1985 * cp-tree.h (skip_rtti_stuff): New routine, declare it.
1986 * gc.c (build_headof): Support -fvtable-thunk and -frtti together.
1987 (build_typeid): Ditto.
1988 (build_classof): Remove old style way of doing rtti. Remove support
1989 for `classof' and `headof'.
1994 Fri Aug 18 17:31:58 1995 Jason Merrill <jason@deneb.cygnus.com>
1996 * decl.c (start_function): Clear ctor_label and dtor_label.
1998 * class.c (finish_struct_1): Fix handling of access decls.
2000 Tue Aug 15 19:21:54 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2002 * class.c (finish_struct): Only do minimal processing here, so it
2003 can be used for class template definitions, as well.
2004 (finish_struct_1): New function with the rest of the code.
2006 Tue Aug 15 09:46:16 1995 Mike Stump <mrs@cygnus.com>
2008 * class.c (prepare_fresh_vtable): On second though, always build the
2009 offset (see Aug 10 change), unless -fvtable-thunks is given. It
2010 does this by calling the new routine set_rtti_entry.
2011 (finish_struct): Ditto.
2012 (set_rtti_entry): New routine to update the rtti information at the
2013 start of the vtable.
2015 Mon Aug 14 12:21:22 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2017 * error.c (dump_decl, case IDENTIFIER_NODE): Only work on a dtor
2018 if it's declared in the C++ language spec.
2019 (dump_function_decl): Likewise.
2020 (dump_function_name): Likewise.
2021 (ident_fndecl): Make sure we got something back from lookup_name.
2022 * decl.c (start_function): Likewise.
2024 Fri Aug 11 16:52:15 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2026 * call.c (build_method_call): Don't call build_new when calling a
2027 constructor without an instance.
2029 Thu Aug 10 20:00:17 1995 Mike Stump <mrs@cygnus.com>
2031 * class.c (prepare_fresh_vtable): Always build the offset to the
2032 complete object, as it doesn't cost much. This allows dynamic_cast
2033 to void * to work when -frtti isn't given.
2034 (finish_struct): Ditto.
2036 Thu Aug 10 16:31:28 1995 Mike Stump <mrs@cygnus.com>
2038 * except.c (build_eh_type): Split out some functionality to new
2039 routine named build_eh_type_type.
2040 (build_eh_type_type): New routine.
2041 (expand_start_catch_block): Use build_eh_type_type, as we never want
2042 the dynamic type of the catch parameter, just the static type.
2043 Fixes core dumps when -frtti is used and one catchs pointers to
2046 Thu Aug 10 14:55:29 1995 Mike Stump <mrs@cygnus.com>
2048 * except.c (expand_builtin_throw): Since we now use normal calling
2049 conventions for __throw, we have to remove the first layer off the
2050 stack, so that the next context we search for handlers is the outer
2051 context instead of the context that had the call to __throw, if we
2052 don't immediately find the desired context.
2054 Tue Aug 8 17:44:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2056 * tree.c (cp_expand_decl_cleanup): Returns int, not tree.
2057 * cp-tree.h: Update.
2059 * parse.y (template_type_parm): Add support for `typename'.
2061 Tue Aug 8 12:06:31 1995 Mike Stump <mrs@cygnus.com>
2063 * except.c (expand_internal_throw): New internal routine to throw a
2065 (expand_end_all_catch, expand_leftover_cleanups): All throwers
2066 changed to use `expand_internal_throw' instead of jumping to throw
2068 (expand_end_catch_block, expand_throw): Ditto.
2069 (throw_label): Removed.
2070 (expand_builtin_throw): Changed so that EH parameters are passed by
2071 normal function call conventions. Completes Aug 4th work.
2073 Fri Aug 4 17:17:08 1995 Mike Stump <mrs@cygnus.com>
2075 * cp-tree.h (expand_builtin_throw): Declare it.
2076 * decl2.c (finish_file): Call expand_builtin_throw.
2077 * except.c (make_first_label): Remove.
2078 (init_exception_processing): Don't use a LABEL_REF for throw_label,
2079 instead use a SYMBOL_REF, this is so that we don't use LABEL_REFs in
2080 other functions that don't really appear in those functions. This
2081 solves a problem where cc1plus consumed exponential amounts of
2082 memory when -Wall was used.
2083 (expand_end_all_catch, expand_leftover_cleanups,
2084 expand_end_catch_block, expand_throw): Change all uses of
2085 throw_label to match new style.
2086 (do_unwind): Rename parameter to inner_throw_label, as it is now
2087 different from throw_label. Also, assume that our caller will wrap
2088 the passed label with a LABEL_REF, if needed.
2089 (expand_builtin_throw): Make external, change so that the generated
2090 throw is now a real function.
2091 (expand_exception_blocks): Never generate throw code inside another
2094 Fri Aug 4 12:20:02 1995 Mike Stump <mrs@cygnus.com>
2096 * decl.c (grokdeclarator): Move checking of mutable const objects
2097 and mutable static objects down, as we might decide during parsing
2098 to unset staticp or constp (for example, when const is part of the
2099 object being pointed to).
2101 Thu Aug 3 17:13:43 1995 Mike Stump <mrs@cygnus.com>
2103 * except.c (output_exception_table_entry): Enhance portability to
2105 (emit_exception_table): Ditto.
2107 Thu Aug 3 16:41:38 1995 Mike Stump <mrs@cygnus.com>
2109 * typeck.c (build_ptrmemfunc): Handle casting of pointer to
2110 non-virtual member functions.
2112 Wed Aug 2 11:58:25 1995 Mike Stump <mrs@cygnus.com>
2114 * gc.c (build_typeid): Strip cv qualifiers so that const T&, T&, T
2115 and const T all match.
2117 Wed Aug 2 11:25:33 1995 Mike Stump <mrs@cygnus.com>
2119 * except.c (build_eh_type): Strip cv qualifiers so that const T&,
2120 T&, T and const T all match.
2122 Tue Aug 1 14:20:16 1995 Mike Stump <mrs@cygnus.com>
2124 * except.c: Fix up comments, cleanup code and eliminate exceptNode,
2125 exceptStack, exceptstack, push_except_stmts, pop_except_stmts,
2126 new_except_stack, push_last_insn, pop_last_insn, insn_save_node and
2127 InsnSave. Also, numerous speed improvements, and correctness
2128 improvements. Double faulting in all situations should now be
2130 (expand_start_all_catch): Instead of having many terminate protected
2131 regions, just have one.
2132 (expand_start_catch_block): No longer have to protect
2133 false_label_rtx, as it isn't used for EH region marking.
2134 (expand_end_catch_block): Expand out EH cleanups here by using
2135 expand_leftover_cleanups.
2136 (expand_end_all_catch): Use sequences instead of playing with insn
2138 (expand_exception_blocks): Ditto. Also protect all catch clauses
2139 with one terminate region.
2141 Mon Jul 31 13:24:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2143 * method.c (report_type_mismatch): Don't talk about an object
2144 parameter for non-methods.
2146 Sun Jul 30 13:13:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2148 * class.c (finish_struct): Catch private and protected members of
2149 anonymous unions here.
2150 * decl2.c (finish_anon_union): And here.
2151 * parse.y: Instead of here.
2153 * errfn.c (ARGSLIST): Support passing four args.
2154 * error.c (cv_as_string): New function.
2155 (cp_printers): Add it.
2156 * call.c (build_method_call): Report 'const' at end of pseudo-decl.
2158 * method.c (report_type_mismatch): Deal with a bad_arg of 0.
2160 * init.c (expand_aggr_init): Handle volatile objects, too.
2162 Sat Jul 29 13:42:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2164 * decl.c (struct binding_level): Keep list of incomplete decls.
2165 (print_binding_level): Use list_length to count them.
2166 (pushdecl): Build up the list.
2167 (hack_incomplete_structures): Walk it and prune completed decls.
2169 Fri Jul 28 15:26:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2171 * typeck.c (comp_target_types): Don't check const and volatile for
2173 (comp_ptr_ttypes_real): Ditto.
2175 Thu Jul 27 15:40:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2177 * typeck.c (comp_target_types): Fix.
2179 Thu Jul 27 15:10:48 1995 Mike Stump <mrs@cygnus.com>
2181 * cp-tree.h (unsave_expr_now, build_unsave_expr,
2182 cp_expand_decl_cleanup): Declare new routines.
2183 * decl.c (cp_finish_decl, store_parm_decls,
2184 hack_incomplete_structures): Change all cals from
2185 expand_decl_cleanup to cp_expand_decl_cleanup.
2186 * gc.c (protect_value_from_gc): Ditto.
2187 * expr.c (cplus_expand_expr): Handle UNSAVE_EXPRs.
2188 * tree.c (unsave_expr): New routine to build an UNSAVE_EXPR.
2189 (unsave_expr_now): Backend routine used by tree expander.
2190 (cp_expand_decl_cleanup): Wrap second argument in an UNSAVE_EXPR to
2191 work around a limitation in the backend. The backend uses the
2192 cleanups multiple times, on disjoint control flows, so we cannot
2193 pass unsaved SAVE_EXPRs to the backend.
2194 * tree.def (UNSAVE_EXPR): New tree code.
2195 * typeck.c (c_expand_return): Move goto/return code up inside
2196 conditional, as we don't always want to do this, we only want to do
2197 this when we don't otherwise finish with this control flow.
2199 Thu Jul 27 10:38:43 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2201 * parse.y (typespec): Only complain about typeof if we're not
2202 getting it from a system header.
2204 Thu Jul 27 10:26:23 1995 Doug Evans <dje@canuck.cygnus.com>
2206 Clean up prefix attribute handling.
2207 * parse.y (reserved_declspecs): Link prefix attributes with declspecs.
2208 (declmods): Likewise.
2209 (all rules that reference typed_declspecs and declmods): Call
2210 split_specs_attrs or strip_attrs to separate declspecs and attrs.
2211 (lang_extdef): Delete resetting of prefix_attributes.
2212 (template_def, notype_declarator rule): Use NULL_TREE for
2214 (condition): Use NULL_TREE for prefix_attributes.
2215 (setattrs): Deleted.
2216 (nomods_initdcl0): Set prefix_attributes to NULL_TREE.
2217 (component_decl): Delete resetting of prefix_attributes.
2218 (component_decl_1, notype_components rule): Use NULL_TREE for
2220 (simple_stmt): Delete resetting of prefix_attributes.
2222 Mon Jul 24 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2224 * call.c (convert_harshness): Deal with reference conversions before
2225 others. Actually do array->pointer decay. Call comp_target_types
2226 with pointer types rather than their targets.
2228 * typeck.c (comp_target_types): Avoid assigning D const * to B *.
2230 Mon Jul 24 08:54:46 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2232 * pt.c (to_be_restored): Move decl to global scope.
2234 Sat Jul 22 12:22:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2236 * decl.c (start_decl): Put back clearing of DECL_IN_AGGR_P.
2238 Fri Jul 21 17:09:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2240 * decl.c (grokdeclarator): Downgrade error about 'extern int A::i'
2243 * pt.c (instantiate_template): Also avoid instantiation if the
2244 function has already been declared to be a specialization.
2246 * decl2.c (check_classfn): Ignore cname argument, and return the
2249 * decl.c (start_decl): Handle declarations of member functions
2250 outside of the class (i.e. specialization declarations).
2252 Thu Jul 20 10:34:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2254 * class.c (finish_struct): Don't mess with the type of bitfields.
2256 * various.c: s/TYPE_POINTER_TO/build_pointer_type/.
2258 Thu Jul 20 01:43:10 1995 Mike Stump <mrs@cygnus.com>
2260 * init.c (expand_aggr_init): Assume LOOKUP_ONLYCONVERTING if init
2261 is not a parameter list (TREE_LIST).
2262 (expand_default_init): If LOOKUP_ONLYCONVERTING is set, then set
2263 LOOKUP_NO_CONVERSION so that we don't allow two-level conversions,
2264 but don't set it otherwise.
2266 Wed Jul 19 20:32:01 1995 Mike Stump <mrs@cygnus.com>
2268 * init.c (expand_default_init): Don't allow two-level conversions
2269 during construction.
2271 Wed Jul 19 18:06:37 1995 Mike Stump <mrs@cygnus.com>
2273 * gc.c (build_headof): The type of dyncasting to a pointer to cv
2274 void, should be pointer to cv void.
2276 Wed Jul 19 17:25:43 1995 Mike Stump <mrs@cygnus.com>
2278 * gc.c (build_dynamic_cast): Allow casting in const.
2280 Wed Jul 19 16:34:27 1995 Mike Stump <mrs@cygnus.com>
2282 * typeck.c (build_const_cast): If we are passed error_mark_node,
2285 Wed Jul 19 15:24:48 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2287 * class.c (push_nested_class): Make sure TYPE is non-nil.
2289 * cvt.c (type_promotes_to): Watch for error_mark_node on the
2292 Wed Jul 19 13:23:12 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
2294 * cp-tree.h (SIGTABLE_VT_OFF_NAME): Renamed from SIGTABLE_OFFSET_NAME.
2295 (SIGTABLE_VB_OFF_NAME): New macro.
2296 (vt_off_identifier): Renamed from offset_identifier.
2297 (vb_off_identifier): Added extern declaration.
2299 * decl.c (vt_off_identifier): Renamed from offset identifier.
2300 (vb_off_identifier): New variable to hold the identifier for the
2301 sigtable field vb_off.
2302 (init_decl_processing): Initialize vb_off_identifier.
2303 Renamed vt_off_identifier from offset_identifier.
2304 * sig.c (build_signature_method_call): Renamed offset_identifier and
2305 local variable offset to vt_off_identifer and vt_off, respecitively.
2306 * sig.c (build_signature_table_constructor): Renamed offset to vt_off.
2308 * decl.c (init_decl_processing): Add vb_off field to
2309 sigtable_entry_type. Reorder fields so that pfn gets properly
2310 aligned at a 64 bit boundary on the Alpha.
2311 * sig.c (build_signature_table_constructor): Build the constructor
2312 according to the new layout. Set the vb_off field to -1 for now.
2314 * decl.c (init_decl_processing): Align sigtable_entry_type on word
2315 boundaries instead of double word boundaries to save space.
2317 Tue Jul 18 16:58:37 1995 Mike Stump <mrs@cygnus.com>
2319 * cvt.c (cp_convert): Always call build_cplus_new for a ctor.
2321 Tue Jul 18 14:24:53 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2323 * parse.y (opt.component_decl_list): Only forbid private/protected
2324 in anonymous unions. We need to make this know when the type is
2325 defined for an object, to not give the error.
2327 Mon Jul 17 14:22:44 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2329 * parse.y (opt.component_decl_list): Don't allow access control
2330 as private or protected for union members.
2332 Sun Jul 16 14:01:00 1995 Jim Wilson <wilson@chestnut.cygnus.com>
2334 * lex.c (check_newline): For 'p' case, move goto skipline line to
2335 before end brace for 'pragma'.
2337 Fri Jul 7 13:55:58 1995 Mike Stump <mrs@cygnus.com>
2339 * g++.1: Tiny updates.
2341 Fri Jul 7 13:05:20 1995 Mike Stump <mrs@cygnus.com>
2343 * decl.c (cp_finish_decl): Only destruct local static variables if
2344 they are constructed, and only construct the first time control
2345 passes completely through its declaration (if not initialized with a
2346 constant-expression).
2347 (expand_static_init): Ditto.
2349 Wed Jul 5 14:05:04 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2351 * typeck.c (comptypes, case OFFSET_REF): If either offset basetype
2352 is a TEMPLATE_TYPE_PARM, give a match.
2354 Fri Jun 30 15:42:57 1995 Mike Stump <mrs@cygnus.com>
2356 * method.c (build_overload_value): Handle encoding of null pointer
2357 constants (or any pointer with a constant numeric value) for
2360 Fri Jun 30 13:45:51 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2362 * call.c (convert_harshness): Add QUAL_CODE when we're faced with
2363 const vs non-const for void conversions.
2365 Fri Jun 30 10:19:52 1995 Mike Stump <mrs@cygnus.com>
2367 * except.c (expand_start_all_catch): Fix problem with finding an
2368 outer nested try block when there is no code to separate it from an
2371 Fri Jun 30 02:22:26 1995 Mike Stump <mrs@cygnus.com>
2373 * search.c (dfs_pushdecls): Consume 2 or 3 orders of magnitude less
2374 memory please when virtual bases are used.
2376 Thu Jun 29 19:03:47 1995 Mike Stump <mrs@cygnus.com>
2378 * class.c (build_vbase_path): Avoid testing things that cannot be
2379 null to see if they are null.
2380 * cvt.c (convert_pointer_to_vbase): Remove code that doesn't work.
2381 * decl.c (finish_function): Pass a type into the new
2382 convert_pointer_to_vbase instead of a binfo.
2383 * search.c (convert_pointer_to_vbase): Rewritten to use get_vbase
2384 and convert_pointer_to_real.
2385 (expand_indirect_vtbls_init): Use convert_pointer_to_vbase instead
2386 of the more cryptic call to get_vbase.
2388 Thu Jun 29 09:35:05 1995 Mike Stump <mrs@cygnus.com>
2390 * decl.c (BOOL_TYPE_SIZE): Fix broken SLOW_BYTE_ACCESS check.
2392 Thu Jun 29 03:43:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2394 * pt.c (instantiate_template): Don't strip 'this' twice.
2396 * pt.c (coerce_template_parms): Allow null pointer constants.
2398 * decl.c (revert_static_member_fn): But only if DECL_ARGUMENTS is
2401 Wed Jun 28 18:39:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2403 * decl.c (revert_static_member_fn): Also remove 'this' from
2405 * decl2.c (check_classfn): Don't revert this function until we get a
2408 Wed Jun 28 14:07:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2410 * parse.y (component_decl): Clear PREFIX_ATTRIBUTES here.
2412 Wed Jun 28 11:05:13 1995 Mike Stump <mrs@cygnus.com>
2414 * decl2.c (finish_file): Handle global vector news.
2415 * init.c (build_new): Encode vector news so that later we will know
2416 how many elements there are.
2418 Mon Jun 26 13:38:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2420 * expr.c (cplus_expand_expr): Don't mess with temp slots.
2422 * decl2.c (warn_if_unknown_interface): Don't crash if tinst_for_decl
2425 * decl2.c (check_classfn): Use revert_static_member_fn.
2426 * decl.c (revert_static_member_fn): Diagnose static member functions
2427 declared const or volatile.
2429 * decl2.c (grokfield): Check for missing default args here, too.
2430 (check_default_args): Function to do the checking.
2431 * decl.c (pushdecl): Use it.
2433 * decl.c (pushdecl): Don't warn about shadowing a member of `this'
2434 if there is no `this'.
2436 Sun Jun 25 11:34:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2438 * call.c (build_method_call): Downgrade 'called before definition'
2439 to a warning, as it ought to go away after Monterey.
2441 Sat Jun 24 14:18:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2443 * pt.c (coerce_template_parms): Don't do extra checking on pointer
2444 to member arguments.
2446 * class.c (finish_struct): const and reference members don't prevent
2447 a class from being an aggregate.
2449 * class.c (finish_struct): Signatures are always aggregates.
2451 Fri Jun 23 17:20:29 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2453 * decl2.c (check_classfn): Improve error message.
2455 * pt.c (tsubst): Handle PROMOTE_PROTOTYPES.
2457 Thu Jun 22 01:50:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2459 * typeck.c (comptypes): Don't ignore method quals.
2461 * class.c (finish_struct): Non-abstract virtuals are always USED.
2463 * decl.c (build_ptrmemfunc_type): The underlying union type isn't
2464 IS_AGGR_TYPE, either.
2465 * class.c (finish_struct): Use CLASSTYPE_NON_AGGREGATE instead.
2468 * cp-tree.h (lang_type): Add aggregate.
2469 (CLASSTYPE_AGGREGATE): New macro.
2470 (TYPE_NON_AGGREGATE_CLASS): Ditto.
2471 * class.c (finish_struct): Determine whether a class is an
2473 * decl.c (cp_finish_decl): Check TYPE_NON_AGGREGATE_CLASS instead of
2474 TYPE_NEEDS_CONSTRUCTING.
2475 * typeck2.c (digest_init): Check TYPE_NON_AGGREGATE_CLASS for
2478 * pt.c (tsubst, PARM_TYPE): Propagate DECL_ARTIFICIAL.
2480 * decl.c (start_function): For pre-parsed functions, layout all of
2481 the parm decls again.
2482 (grokvardecl): TREE_PUBLIC depends on DECL_THIS_EXTERN, not
2485 * pt.c (coerce_template_parms): Improve checking for invalid
2488 Wed Jun 21 12:01:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2490 * decl.c (grokdeclarator): Forbid declaration of a static member
2491 with the same name as its enclosing class.
2493 Mon Jun 19 10:28:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2495 * decl.c (finish_function): Clear current_class_decl.
2497 * typeck.c (build_conditional_expr): Use convert (boolean_type_node
2498 instead of truthvalue_conversion.
2500 * class.c (finish_struct): A data member with the same name as the
2501 class doesn't suppress constructors.
2503 Fri Jun 16 18:11:39 1995 Gerald Baumgartner (gb@alexander.cs.purdue.edu)
2505 * decl.c (start_function): If current_class_decl is a signature
2506 pointer, don't dereference it but set C_C_D to current_class_decl.
2508 Fri Jun 16 17:06:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2510 * decl.c (duplicate_decls): Complain about virtual functions
2511 redeclared to be inline.
2513 Fri Jun 16 13:20:38 1995 Mike Stump <mrs@cygnus.com>
2515 * decl.c (get_unique_name): New routine to name unnamed namespaces.
2516 (push_namespace): Use get_unique_name for naming unnamed namespaces.
2518 Thu Jun 15 15:00:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2520 * parse.y: Call cplus_decl_attributes with prefix_attributes where
2523 Wed Jun 14 19:24:49 1995 Mike Stump <mrs@cygnus.com>
2525 * search.c (get_vbase): New routine to switch hierarchies from the
2526 CLASSTYPE_VBASECLASSES to the normal one.
2527 (expand_indirect_vtbls_init): Use get_vbase to figure out how we
2528 want to convert to a vbase pointer.
2530 Mon Jun 12 17:50:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2532 * pt.c (instantiate_class_template): Add the new instantiation to
2534 (do_pending_expansions): Call instantiate_member_templates on all of
2535 the classes in template_classes.
2537 Mon Jun 12 12:36:59 1995 Mike Stump <mrs@cygnus.com>
2539 * decl.c (complete_array_type): Fill in the TYPE_DOMAIN of our
2540 TYPE_MAIN_VARIANT if it is not filled in.
2541 * init.c (build_delete): If the TYPE_DOMAIN is not set, give an
2542 error instead of core dumping.
2544 Mon Jun 12 10:41:40 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2546 * call.c (can_convert): Also check for distance > 0.
2547 (can_convert_arg): Ditto.
2548 (user_harshness): Ditto.
2550 Fri Jun 9 19:17:21 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2552 * g++.c (MATH_LIBRARY): Provide default.
2553 (main): Always link with the math library if we link with libstdc++.
2555 * decl.c (start_function): Complain about redefinition of a function
2556 even when the pending_inline version is compiled after the other
2559 Thu Jun 8 15:44:38 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2561 * gc.c (build_dynamic_cast): Build up a reference to a parameter of
2564 Wed Jun 7 15:31:57 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
2566 * init.c (build_vec_delete): Resolve an offset ref before we try to
2569 Wed Jun 7 14:19:32 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2571 * typeck.c (build_modify_expr): If the class lacks a constructor or
2572 assignment operator, return error_mark_node.
2573 (common_type): Use build_cplus_array_type.
2575 Tue Jun 6 09:41:27 1995 Mike Stump <mrs@cygnus.com>
2577 * class.c (dont_allow_type_definitions): New variable set when types
2579 (finish_struct): Use it.
2580 * cp-tree.h (dont_allow_type_definitions): Define it.
2581 * parse.y (primary, handler_seq): Set it.
2583 Mon Jun 5 18:49:38 1995 Mike Stump <mrs@cygnus.com>
2585 * method.c (build_opfncall): Use DECL_CHAIN, not TREE_CHAIN for
2586 results from lookup_fnfields. Always give warning/error on bad
2589 Mon Jun 5 11:39:37 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
2591 * init.c (member_init_ok_or_else): Don't allow initialization of
2592 an ancestor's member from within a constructor.
2594 Mon Jun 5 11:20:34 1995 Gerald Baumgartner (gb@alexander.cs.purdue.edu)
2596 * sig.c (build_signature_table_constructor): Use DECL_CONTEXT
2597 instead of DECL_CLASS_CONTEXT for calculating the vfield offset so
2598 abstract virtual functions are handled correctly.
2600 * sig.c (build_signature_table_constructor): Store the correct
2601 delta in signature table entries. It does not yet work for
2602 classes with virtual base classes as implementations of signatures.
2603 (build_signature_method_call): Add the delta to the object_ptr
2604 before generating the function call.
2606 * call.c (build_method_call): Make instance_ptr the signature
2607 pointer itself instead of dereferencing the optr.
2608 * sig.c (build_signature_method_call): Dereference the optr for the
2609 direct and virtual calls.
2611 * sig.c (build_signature_table_constructor): Make the tag for
2612 default implementations -1 instead of 2.
2613 (build_signature_method_call): Change the generated conditional
2614 expression correspondingly.
2616 * sig.c (build_signature_pointer_constructor): Deleted the sorry
2617 message that said we can't handle multiple inheritance for
2618 implementations of signatures
2619 (build_signature_method_call): Use the offset from the sigtable
2620 entry instead of the vptr field from the signature pointer for
2621 building a virtual function call.
2623 * class.c (build_vfn_ref): Deleted signature specific code, we don't
2624 call this function anymore from build_signature_method_call.
2626 * cp-tree.h (SIGNATURE_VPTR_NAME): Deleted. We use the right vptr
2627 field in the object now instead of in the signature pointer/ref.
2628 (build_vptr_ref): Deleted extern declaration.
2629 * sig.c (build_vptr_ref): Deleted.
2630 (build_signature_pointer_or_reference_type): Deleted construction of
2632 (build_signature_pointer_constructor): Deleted initialization of/
2633 assignment to the vptr field.
2635 * sig.c (build_signature_table_constructor): Convert the signature
2636 table entry fields to their correct types.
2638 * sig.c (build_signature_table_constructor): Don't call digest_init
2639 for the fields of a sigtable entry, it's wasted time.
2641 * sig.c (build_signature_table_constructor): Correctly set the
2642 offset and index fields of a sigtable entry. Build the constructor
2643 the way digest_init does, digest_init can't handle initializing an
2644 anonymous union inside a struct.
2645 (build_signature_method_call): Use the index field instead of the
2646 delta field to get the vtable index.
2648 * decl.c (init_decl_processing): Fix number of fields for building
2649 sigtable_entry_type.
2651 * cp-tree.h (tag_identifier, offset_identifier): Added extern decls.
2652 (SIGTABLE_CODE_NAME): Renamed to SIGTABLE_TAG_NAME.
2653 (SIGTABLE_PFN_NAME): Deleted, we'll use VTABLE_PFN_NAME instead.
2654 * decl.c (tag_identifier, offset_identifier): New variables to
2655 hold the identifiers for the sigtable fields tag and offset.
2656 (init_decl_processing): Initialize these variables.
2657 (init_decl_processing): Use these variables to build the
2658 sigtable_entry_type structure. Rename the code and offset fields
2659 to tag and delta, respectively; add offset and index fields. Changed
2660 types of fields from short_integer_type_node to delta_type_node.
2661 * sig.c (build_signature_table_constructor): Rename code and offset
2662 to tag and delta, respectively.
2663 (build_signature_method_call): Ditto. Use above variables.
2665 Thu Jun 1 17:03:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2667 * decl.c (lookup_name_real): Don't try to look anything up in an
2670 Fri Jun 2 10:30:14 1995 Mike Stump <mrs@cygnus.com>
2672 * method.c (build_overload_int): New routine. Break out
2673 functionality from build_overload_value so we can reuse it.
2674 (build_overload_value): Handle pointer to member functions as value
2675 parameters for templates.
2676 (build_overload_identifier): Since template parameters are shared
2677 among all instantiations, we have to substitute in the real types
2678 in TREE_TYPE (parm).
2679 pt.c (coerce_template_parms): Ditto.
2680 (push_template_decls): Ditto.
2681 (grok_template_type): Deleted as template parameters are shared
2682 among all instantiations.
2684 Wed May 31 19:10:32 1995 Mike Stump <mrs@cygnus.com>
2686 * decl.c (grokdeclarator): Always give errors on constant overflow
2689 Wed May 31 11:39:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2691 * typeck.c (commonparms): Don't abort if simple_cst_equal returns < 0.
2692 (build_c_cast): Don't tack on a NON_LVALUE_EXPR when casting to
2694 (build_indirect_ref): Fix check for *&.
2696 Fri Jun 16 06:54:03 1995 Mike Stump <mrs@cygnus.com>
2698 * Version 2.7.0 released.
2700 Fri Jun 16 15:07:29 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
2702 * Make-lang.in (DEMANGLER_PROG): Add LIBS.
2704 Thu Jun 15 15:00:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2706 * decl.c (define_function): Don't set DECL_INTERFACE_KNOWN.
2708 Wed Jun 7 20:00:31 1995 Mike Stump <mrs@cygnus.com>
2710 * *.[chy]: Change all callers of finish_decl to cp_finish_decl.
2711 * decl.c (finish_decl): New routine to handle call backs from the
2712 mid end (declare_hidden_char_array).
2714 Wed Jun 7 19:02:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2716 * decl.c (start_function): Handle setting C_C_D here.
2717 (set_C_C_D): Removed.
2718 (struct saved_scope): Remove class_decl.
2719 (push_to_top_level): Don't save current_class_decl.
2720 (pop_from_top_level): Don't restore current_class_decl or C_C_D.
2721 (struct cp_function): Add C_C_D.
2722 (push_cp_function_context): Save C_C_D.
2723 (pop_cp_function_context): Restore C_C_D.
2725 Fri Jun 2 11:05:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2727 * decl.c (set_C_C_D): New function. suspend_momentary before
2729 (pop_from_top_level): Call it.
2730 (start_function): Ditto.
2731 (pop_cp_function_context): Ditto.
2733 * class.c, cp-tree.h, decl.c, decl2.c, parse.y: Lose all references
2734 to current_vtable_decl, CLASSTYPE_INST_VAR and CLASSTYPE_VTBL_PTR.
2736 * decl.c (push_cp_function_context): Save current_class_decl.
2737 (pop_cp_function_context): Restore current_class_decl and set C_C_D.
2738 (pop_from_top_level): Don't use CLASSTYPE_INST_VAR to set C_C_D.
2739 (start_function): Ditto.
2741 * class.c (popclass): Don't mess with current_class_decl,
2742 current_vtable_decl, or C_C_D.
2744 Mon May 29 12:45:10 1995 Paul Eggert <eggert@twinsun.com>
2746 * Make-lang.in (c++.mostlyclean): Remove $(DEMANGLER_PROG).
2748 Wed May 24 15:55:18 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
2750 * decl.c (duplicate_decls): Check simple_cst_equal result against 0.
2751 * decl2.c (finish_anon_union): Likewise.
2752 * method.c (largest_union_member): Likewise.
2754 Wed May 24 14:41:11 1995 H.J. Lu (hjl@nynexst.com)
2756 * Make-lang.in (cxxmain.o): Replace single quotes with backslashes.
2758 Mon May 22 17:38:48 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
2760 * Make-lang.in (g++, g++-cross, cc1plus, DEMANGLER_PROG):
2761 Use $@ instead of output name so works even if have .exe.
2762 (cxxmain.o): Use cp if ln -s fails.
2763 (c++.install-man): Use $(exeext) in executable names.
2764 (c++.mostlyclean, stage[1-4]): Use $(objext) in object file names.
2765 * Makefile.in (../cc1plus): Use $(exeext) in name of executable.
2767 Wed May 24 01:39:03 1995 Jason Merrill <jason@deneb.cygnus.com>
2769 * call.c (build_method_call): parms can be null, duh.
2771 Tue May 23 01:32:09 1995 Jason Merrill <jason@deneb.cygnus.com>
2773 * call.c (build_method_call): If convert_arguments failed, just bail.
2775 Fri May 19 10:31:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2777 * cvt.c (convert_force): Pass LOOKUP_NORMAL to cp_convert.
2779 * tree.c (copy_to_permanent): Oops.
2781 Fri May 19 10:01:07 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
2783 * cp-tree.h (break_out_target_exprs): Add decl.
2785 Thu May 18 13:02:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2787 * decl.c (start_function): Move *all* interface handling stuff after
2790 * tree.c (mapcar): Renamed from make_deep_copy and generalized.
2791 (perm_manip): Return t if permanent, otherwise 0.
2792 (copy_to_permanent): Use them.
2793 (bot_manip): Helper for break_out_target_exprs.
2794 (break_out_target_exprs): New function. Uses mapcar.
2796 * typeck.c (convert_arguments): Use it.
2798 * method.c (hack_identifier): Use convert_from_reference to
2799 dereference a reference.
2801 Wed May 17 17:54:54 1995 Mike Stump <mrs@cygnus.com>
2803 * call.c (convert_harshness): Move reference bashing before pointer
2806 Wed May 17 16:57:53 1995 Mike Stump <mrs@cygnus.com>
2808 * cvt.c (convert_to_reference): Only complain, if complaints are
2810 * typeck.c (build_function_call_real): Ditto. If LOOKUP_SPECULATIVELY
2811 is set and something won't work, return NULL_TREE.
2812 * cvt.c (cp_convert): Ditto. Pass flags down to build_method_call.
2813 (convert): Pass LOOKUP_NORMAL to cp_convert.
2814 * typeck.c (convert_for_assignment): Ditto.
2815 (convert_force): Pass LOOKUP_COMPLAIN to cp_convert.
2816 (convert_arguments): Get out early if we get an error_mark_node.
2817 (convert_for_initialization): Use cp_convert instead of convert so
2818 that we can pass flags down.
2819 * cp-tree.h (LOOKUP_SPECULATIVELY): Added documentation.
2821 Wed May 17 01:43:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2823 * typeck2.c (store_init_value): Don't take the MAIN_VARIANT of the
2826 * class.c (finish_struct): Don't complain about a class with no
2827 user-defined constructors but with a member that has no default
2828 constructor, as this is OK for aggregates.
2830 * expr.c (cplus_expand_expr, NEW_EXPR): If this is an explicit
2831 constructor call, mark slot addressable.
2833 Tue May 16 18:37:51 1995 Douglas Rupp (drupp@cs.washington.edu)
2835 * g++.c: Changed WINNT to _WIN32.
2837 Tue May 16 12:40:16 1995 Jason Merrill <jason@lisa.cygnus.com>
2839 * lex.c (handle_sysv_pragma): Don't use token_buffer.
2841 Tue May 16 12:05:26 1995 Mike Stump <mrs@cygnus.com>
2843 * call.c (resolve_scope_to_name): Add initial semantic support for
2845 * class.c (finish_struct): Ditto.
2846 * cp-tree.h (NAMESPACE_LEVEL): Ditto.
2847 * cvt.c (build_up_reference, convert_to_reference): Ditto.
2848 * decl.c (binding_level::namespace_p, suspend_binding_level): Ditto.
2849 (resume_binding_level, toplevel_bindings_p): Ditto
2850 (namespace_bindings_p, declare_namespace_level): Ditto.
2851 (resume_level, push_namespace, pop_namespace): Ditto.
2852 (pop_everything, pushtag, duplicate_decls, pushdecl): Ditto.
2853 (implicitly_declare, lookup_namespace_name, lookup_name_real): Ditto.
2854 (start_decl, make_temporary_for_reference), Ditto.
2855 (obscure_complex_init, finish_decl, expand_static_init): Ditto.
2856 (grokvardecl, grokdeclarator, parmlist_is_exprlist): Ditto.
2857 (store_parm_decls, hack_incomplete_structures): Ditto.
2858 * decl2.c (get_temp_name, finish_anon_union, current_namespace): Ditto.
2859 (push_namespace, pop_namespace, do_namespace_alias): Ditto.
2860 (do_toplevel_using_decl, do_class_using_decl): Ditto.
2861 * error.c (dump_decl): Ditto.
2862 * init.c (build_member_call, build_offset_ref): Ditto.
2863 * lex.c (identifier_type): Ditto.
2864 * parse.y (lang_extdef, using_decl, extdef, component_decl_1): Ditto.
2865 (nested_name_specifier_1): Ditto.
2866 * spew.c (yylex): Ditto.
2867 * tree.def (NAMESPACE_DECL): Ditto.
2869 Tue May 16 11:55:35 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2871 * decl.c (push_overloaded_decl): Return the new decl even if it
2874 Tue May 16 11:00:37 1995 Jason Merrill <jason@lisa.cygnus.com>
2876 * typeck.c (decay_conversion): Split out from default_conversion.
2877 (default_conversion): Call it.
2878 (build_binary_op): Ditto.
2879 (build_binary_op_nodefault): Use decay_conversion for truth ops.
2881 Mon May 15 12:47:56 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2883 * decl.c (warn_extern_redeclared_static): This is a pedwarn.
2884 (duplicate_decls): Always use the old decl's linkage info. Don't
2885 play with linkage of consts.
2886 (pushdecl): Don't play with linkage of consts.
2887 (redeclaration_error_message): Don't complain about an old public
2888 decl and a new non-public decl here.
2889 (grokvardecl): Handle linkage of consts here.
2890 (grokdeclarator): An 'extern inline' is public. Pass constp to
2892 (start_function): Wait until after the pushdecl to do some linkage
2895 * decl2.c (import_export_vtable): Make duplicates weak rather than
2896 static if supported.
2897 (import_export_inline): Ditto.
2898 * pt.c (do_pending_expansions): Ditto.
2900 * class.c (build_vbase_path): flag_assume_nonnull_objects only
2901 affects reference conversion.
2903 * init.c (emit_base_init): Build up an RTL_EXPR and add it to
2905 * decl.c, decl2.c: s/base_init_insns/base_init_expr/.
2907 Tue May 16 07:06:28 1995 Paul Eggert <eggert@twinsun.com>
2909 * method.c (numeric_output_need_bar): Renamed from misspelling.
2911 * typeck.c (build_ptrmemfunc): Fix misspellings in messages.
2913 Sun May 14 10:26:22 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2915 * lang-options.h, lang-specs.h: New files.
2917 Thu May 11 00:31:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2919 * typeck.c (default_conversion): Don't check for BLKmode before
2920 pulling out the decl_constant_value.
2922 * decl.c (start_function): Clear named_labels and shadowed_labels.
2924 * typeck.c (build_function_call_real): Also synthesize methods here.
2926 Wed May 10 00:55:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2928 * decl2.c (finish_file): Synthesize exported methods before the
2931 * parse.y: Move declaration of flag_new_for_scope to file scope.
2933 Tue May 9 19:10:33 1995 Mike Stump <mrs@cygnus.com>
2935 * decl2.c: Add flag_new_for_scope for new -ffor-scope flag.
2936 * parse.y (FOR): Conditionalize the pushing and poping of scope for
2937 the for-init-statement upon the new flag_new_for_scope.
2938 * parse.y (try_block): Simplify and use compstmt.
2940 Mon May 8 12:41:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2942 * decl.c (define_function): Mark function decl artificial.
2944 Sun May 7 00:51:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2946 * parse.y (simple_stmt, FOR): Put back push/pop for condition scope.
2948 * decl2.c (grokclassfn): DECLs don't have cv-qualified types.
2949 * tree.c (build_cplus_method_type): Ditto.
2951 * cp-tree.h (SET_DECL_ARTIFICIAL): Just set DECL_ARTIFICIAL to 1.
2953 * typeck.c (build_function_call_real): If convert_arguments failed,
2955 (convert_arguments): If one of the arguments is error_mark_node,
2958 Sat May 6 02:39:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2960 * decl.c (duplicate_decls): Don't check DECL_NOT_REALLY_EXTERN for
2961 decls that don't include it.
2963 Fri May 5 14:23:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2965 * decl.c (duplicate_decls): Decls that have DECL_INTERFACE_KNOWN or
2966 DECL_NOT_REALLY_EXTERN set aren't extern decls.
2968 * typeck.c (build_indirect_ref): Don't call default_conversion for a
2969 parameter of reference_type.
2970 * cvt.c (convert_from_reference): Just use build_indirect_ref.
2972 * pt.c (do_type_instantiation): Only instantiate member functions
2973 that actually come from templates.
2975 Fri May 5 09:46:05 1995 Mike Stump <mrs@cygnus.com>
2977 * parse.y: Generalized cleanup of poplevels, and compound statements
2978 and compound statements in try blocks. Rewritten `for' rule so that
2979 the scope of variables declared in the for clause is shortened to
2980 span just to the end of the statement, instead of the whole
2983 Fri May 5 00:37:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2985 * call.c (convert_harshness): Handle pointers to members better.
2987 Thu May 4 16:00:26 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2989 * decl2.c (delete_sanity): Do access control here.
2990 * init.c (build_delete): Instead of here.
2992 * Make-lang.in: Build c++filt.
2994 Wed May 3 02:59:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2996 * decl2.c (cplus_decl_attributes): If we just modified a TYPE_DECL,
2997 update our IDENTIFIER_TYPE_VALUE.
2999 Fri Apr 28 07:58:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3001 * lex.c (cons_up_default_function): Fix linkage of #pragma
3002 implemented functions.
3004 Thu Apr 27 16:56:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3006 * method.c (build_overload_name): Simplify and fix repeated type
3009 * decl.c (grokdeclarator): Prohibit pointers to void or reference
3012 Thu Apr 27 09:49:07 1995 Mike Stump <mrs@cygnus.com>
3014 * typeck2.c (process_init_constructor): Make sure initializers are
3017 Thu Apr 27 01:11:55 1995 Jason Merrill <jason@python.cygnus.com>
3019 * lex.c (cons_up_default_function): Always defer synthesis.
3021 Thu Apr 27 00:20:37 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3023 * decl2.c (mark_inline_for_output): Don't play with pending_inline
3026 Wed Apr 26 17:48:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3028 * call.c (user_harshness): New function; like build_type_conversion,
3029 but doesn't actually build anything.
3030 (compute_conversion_costs): Use it instead of build_type_conversion.
3032 Wed Apr 26 17:11:25 1995 Jason Merrill <jason@deneb.cygnus.com>
3034 * typeck.c (build_function_call_real): Improve error message for
3035 calling a non-function.
3037 * method.c (hack_identifier): Lose check for calling a data member.
3039 Wed Apr 26 16:59:13 1995 Mike Stump <mrs@cygnus.com>
3041 * typeck2.c (build_functional_cast): Remove very old cruft.
3042 Seems like good code is generated without it.
3044 Wed Apr 26 00:47:16 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3046 * method.c (do_build_assign_ref): Fix handling of anonymous unions.
3047 (do_build_copy_constructor): Ditto.
3049 * parse.y (simple_stmt, SWITCH): Call {push,pop}_switch.
3051 * decl.c (push_switch): New function.
3052 (pop_switch): Ditto.
3053 (define_case_label): Check for jumping over initialization.
3055 * call.c (build_method_call): Check for an inline function being
3056 called before its definition has been seen.
3057 * typeck.c (build_function_call_real): Ditto.
3059 * decl.c (duplicate_decls): Check for a function being redeclared
3060 inline after its address has been taken.
3062 * typeck.c (build_conditional_expr): Handle related class lvalues.
3064 Tue Apr 25 13:20:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3066 * pt.c (do_pending_expansions): Don't expand unused templates.
3068 * parse.y (component_decl): Accept a lone semicolon.
3070 Tue Apr 25 00:25:56 1995 Jason Merrill <jason@rtl.cygnus.com>
3072 * call.c (build_method_call): Don't allow an RTL_EXPR to serve as the
3073 object parameter anymore.
3075 * expr.c (cplus_expand_expr): Don't create RTL_EXPRs with no insns.
3077 Mon Apr 24 12:35:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3079 * parse.y (simple_stmt, decl case): Clear prefix_attributes.
3080 (lang_extdef): Ditto.
3082 * parse.y (maybe_parmlist): New rule for use in declarators where
3083 this could either be a list of expressions or parameters. Calls
3084 suspend_momentary before deciding which.
3085 (direct_after_type_declarator): Use it.
3086 (complex_direct_notype_declarator): Use it.
3088 * pt.c (tsubst): Propagate attributes const and noreturn.
3090 * typeck.c (build_modify_expr): If warn_synth, call build_opfncall
3091 before doing the default thing.
3093 Thu Apr 27 21:49:36 1995 Doug Evans <dje@cygnus.com>
3095 * typeck.c (common_type): Call lookup_attribute instead of
3098 Tue Apr 25 18:07:43 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
3100 * Make-lang.in: Change "realclean" to "maintainer-clean".
3102 Sun Apr 23 12:32:38 1995 Mike Stump <mrs@cygnus.com>
3104 * decl2.c (finish_file): Fix broken linked list handling.
3106 Fri Apr 21 18:08:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3108 * class.c (finish_base_struct): Don't set TYPE_HAS_COMPLEX_*_REF
3110 (finish_struct): Ditto.
3112 * various: Use TYPE_HAS_TRIVIAL_* instead of TYPE_HAS_COMPLEX_*.
3114 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): New macro.
3115 (TYPE_HAS_TRIVIAL_ASSIGN_REF): New macro.
3117 Fri Apr 21 15:52:22 1995 Jason Merrill <jason@python.cygnus.com>
3119 * typeck.c (c_expand_return): Only expand a returned TARGET_EXPR if
3120 it is of the same type as the return value.
3122 Fri Apr 21 03:01:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3124 * decl2.c (finish_file): Reconsider if synthesizing a method wrote
3127 * typeck.c (convert_for_initialization): Don't call a trivial copy
3130 * typeck2.c (store_init_value): Only abort if the type has a
3131 non-trivial copy constructor.
3133 * typeck.c (c_expand_return): If we're returning in a register and
3134 the return value is a TARGET_EXPR, expand it. Only do
3135 expand_aggr_init if we're returning in memory.
3136 (expand_target_expr): Function to expand a TARGET_EXPR.
3137 (build_modify_expr): Use it.
3139 * tree.c (build_cplus_new): Layout the slot.
3141 * expr.c (cplus_expand_expr): Use expand_call to expand the call
3142 under a NEW_EXPR, so the target is not discarded.
3144 Thu Apr 20 14:59:31 1995 Mike Stump <mrs@cygnus.com>
3146 * gc.c (build_dynamic_cast): Tighten error checking.
3148 Thu Apr 20 11:23:54 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3150 * expr.c (cplus_expand_expr): Only abort if the returned target is
3151 different from what we expected if the type has a non-trivial copy
3154 * decl2.c (cplus_decl_attributes): Attributes applied to a template
3155 really apply to the template's result.
3157 * tree.c (lvalue_p): Check IS_AGGR_TYPE instead of TREE_ADDRESSABLE
3158 to decide whether to consider a CALL_EXPR an lvalue.
3160 * class.c (finish_struct_bits): Only set TREE_ADDRESSABLE if the
3161 type has a non-trivial copy constructor.
3163 * decl.c (start_function): If interface_known, unset
3164 DECL_NOT_REALLY_EXTERN on the function.
3166 Wed Apr 19 16:53:13 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3168 * pt.c (do_function_instantiation): Handle explicit instantiation of
3170 (do_type_instantiation): Handle 'inline template class foo<int>',
3171 meaning just spit out the vtable.
3173 * lex.c (cons_up_default_function): Set DECL_NOT_REALLY_EXTERN on
3174 the consed functions.
3176 * decl2.c (import_export_inline): Set DECL_INTERFACE_KNOWN.
3178 Wed Apr 19 16:28:17 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3180 * call.c, class.c, decl2.c, gc.c, init.c, parse.y, pt.c, search.c,
3181 typeck.c: Include output.h.
3183 Wed Apr 19 14:57:21 1995 Gerald Baumgartner (gb@alexander.cs.purdue.edu)
3185 * call.c (build_method_call): Allow a signature member functions to
3186 be called from a default implementation.
3188 Wed Apr 19 10:21:17 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3190 * repo.c (finish_repo): Remember what directory we are in.
3192 * search.c (expand_upcast_fixups): Don't mess with abort_fndecl.
3194 * repo.c: Use obstacks instead of fixed-size buffers. Don't spit
3195 out the second copy of the symbol name. Don't remember COLLECT_GCC.
3197 Wed Apr 19 02:32:40 1995 Mike Stump <mrs@cygnus.com>
3199 * search.c (virtual_context): New function to get the virtual
3200 context of a function.
3201 (expand_upcast_fixups): New function to generate runtime vtables.
3202 (fixup_virtual_upcast_offsets): Ditto.
3203 (expand_indirect_vtbls_init): Use fixup_virtual_upcast_offsets to
3204 ensure that the this offsets for upcasts from virtual bases into
3205 other virtual bases or non-virtual bases are correct at construction
3206 time and destruction time.
3207 * class.c (fixup_vtable_deltas): Modify to fixup all offsets in all
3208 vtables in all virtual bases, instead of just one vtable in each
3210 (fixup_vtable_deltas1): Ditto.
3212 Tue Apr 18 03:57:35 1995 Michael Meissner (meissner@cygnus.com)
3214 * Makefile.in (lex.o): Add dependency on c-pragma.h.
3216 * lex.c (handle_sysv_pragma): Use NULL_PTR and NULL_TREE as
3217 appropriate, instead of 0.
3219 Mon Apr 17 12:28:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3221 * decl.c (pushdecl): Use decls_match, not duplicate_decls, for
3222 comparing local and global decls.
3224 Fri Apr 14 01:46:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3226 * typeck.c (convert_arguments): Only prohibit passing to ... of
3227 types with non-trivial copy constructors.
3229 * repo.c (repo_template_used): Don't try to mess with no id.
3231 Fri Apr 14 23:32:50 1995 Per Bothner <bothner@rtl.cygnus.com>
3233 * decl.c (duplicate_decls): Use cp_warning_at for redundant-decls.
3235 Thu Apr 13 15:37:42 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3237 * cp-tree.h (current_tinst_level): Delete declaration, since it's
3240 * typeck.c (build_modify_expr): Catch incompatible array assignment.
3242 * parse.y (attribute_list, attrib): Rewrite actions to feed the
3243 right stuff to decl_attributes.
3245 Thu Apr 13 11:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3247 * search.c (dfs_debug_mark): Check for magic virtual like
3248 import_export_vtable.
3250 * typeck.c (build_binary_op_nodefault): Don't call cp_pedwarn with
3253 Wed Apr 12 12:02:57 1995 Jason Merrill <jason@deneb.cygnus.com>
3255 * decl2.c (finish_file): Move prevtable pass before needs_messing_up
3258 Tue Apr 11 11:20:27 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3260 * decl.c (finish_decl): If we're writing out a static data member of
3261 a class, we want the debug info for that class.
3263 * gc.c (build_t_desc): Check linkage of a class properly.
3265 * class.c (finish_struct): Set the 'headof' offset for the main
3267 (prepare_fresh_vtable): Fix typeinfo pointer here.
3268 (modify_one_vtable): Instead of here.
3270 Mon Apr 10 12:15:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3272 * repo.c (repo_get_id): New function to return the interesting
3273 identifier for a repo entity.
3274 (repo_template_used): Use it.
3275 (repo_template_instantiated): Mark the id as chosen.
3276 (init_repo): Record whether or not the id was chosen.
3277 (finish_repo): Note if an id was newly chosen.
3279 * pt.c (do_function_instantiation): Call repo_template_instantiated.
3280 (do_type_instantiation): Ditto. Don't diagnose multiple
3283 * decl2.c (finish_file): Use DECL_NOT_REALLY_EXTERN when deciding
3284 whether or not to synthesize a method.
3287 * class.c (finish_vtbls): build more vtables if flag_rtti is on.
3288 * class.c (modify_all_direct_vtables): ditto.
3289 * init.c (expand_direct_vtbls_init): expand more vtables if
3292 Sat Apr 8 17:45:41 1995 Mike Stump <mrs@cygnus.com>
3294 * gc.c (build_headof): Use ptrdiff_type_node instead of
3295 integer_type_node on pointer arithmetic.
3297 Sat Apr 8 11:57:04 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3299 * typeck.c (build_modify_expr): Undo previous change.
3301 Thu Apr 6 01:23:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3303 * Makefile.in (compiler): Remove ../cc1plus before rebuilding it.
3305 * repo.c (get_base_filename): Put the .rpo file in the directory
3306 with the object file, not the source.
3308 * typeck.c (build_conditional_expr): Handle pmf's better.
3310 * repo.c (finish_repo): Also use ASM_OUTPUT_LABELREF to print out
3311 the name of the symbol.
3313 Wed Apr 5 15:24:12 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3315 * repo.c (open_repo_file): Make repo filename DOS-compliant.
3316 (*): Also write a new repo file if some previously-used
3317 templates are no longer used. Only remember the identifier.
3319 * lex.c (cons_up_default_function): If this function belongs to a
3320 template class, call repo_template_used for it.
3322 * repo.c (repo_template_used): Using a class means using its vtable,
3324 (finish_repo): Ditto.
3326 * typeck.c (build_modify_expr): Only wrap TARGET_EXPRs in RTL_EXPRs
3327 if the type has a complex copy constructor.
3329 * decl2.c (lang_decode_option): -frepo implies
3330 -fno-implicit-templates.
3332 * decl.c (start_function): Clear current_{base,member}_init_list.
3334 * lex.c (init_lex): Also unset *_eq if ! flag_operator_names.
3336 Tue Apr 4 16:11:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3338 * decl.c (struct cp_function): Add {base,member}_init_list.
3339 (push_cp_function_context): Save current_{base,member}_init_list.
3340 (pop_cp_function_context): Restore them.
3342 Mon Apr 3 16:55:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3344 * repo.c (get_base_filename): Take filename parm, fix logic bug.
3346 * typeck.c (build_compound_expr): Do not warn about a compound expr
3347 in which the first expression has no side effects.
3348 (build_x_compound_expr): Warn here instead.
3349 (build_conditional_expr): Don't warn about a conditional expression
3350 between an enum and the type it promotes to.
3352 * init.c (build_new): Handle initialization of arrays of builtins
3355 Mon Apr 3 15:08:04 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3357 * repo.c: Include config.h to get definitions of bcopy and rindex
3358 on systems that don't have them (e.g., SVR4).
3360 Mon Apr 3 14:41:55 1995 Mike Stump <mrs@cygnus.com>
3362 * decl2.c (finish_table): Pass NULL_TREE instead of init to
3363 finish_decl so that it won't try and do error checking on the
3366 Mon Apr 3 10:45:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3368 * repo.c (get_base_filename): Analyze COLLECT_GCC_OPTIONS to
3369 determine whether this compile used -c -o.
3370 (open_repo_file): Use get_base_filename. Remove the extension.
3371 (finish_repo): Spit out the values of main_input_filename,
3372 COLLECT_GCC and COLLECT_GCC_OPTIONS.
3374 * parse.y (structsp): Add TYPENAME_KEYWORD complex_type_name.
3376 Sun Apr 2 23:43:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3378 * search.c (compute_access): Don't try to do access control on
3381 Fri Mar 31 10:14:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3383 * repo.c: New file to handle things repo.
3385 * pt.c (instantiate_template): Call repo_template_used if the
3386 definition is accessible.
3387 (mark_function_instantiated): Split out from
3388 do_function_instantiation.
3389 (mark_class_instantiated): Split out from do_type_instantiation.
3391 * parse.y (template_instantiate_once): Call repo_template_used.
3393 * lex.c (lang_init): Call init_repo.
3395 * decl2.c: Handle flag_use_repository.
3396 (finish_file): Call finish_repo.
3398 * decl.c (start_method): Call repo_template_used if this is a
3401 * Makefile.in (CXX_OBJS): Add repo.o.
3402 (repo.o): Add dependencies.
3404 * Make-lang.in (CXX_SRCS): Add repo.c.
3406 * decl.c (start_function): If DECL_INTERFACE_KNOWN and
3407 DECL_NOT_REALLY_EXTERN are both set, unset DECL_EXTERNAL.
3409 * typeck.c (build_binary_op_nodefault): Identify the invalid operand
3412 * decl.c (duplicate_decls): Propagate DECL_NOT_REALLY_EXTERN.
3414 Thu Mar 30 17:54:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3416 * typeck.c (build_binary_op_nodefault): Tidy up use of build_type
3417 and result_type. When checking for comparison between signed
3418 and unsigned, use result_type rather than the (possibly shortened)
3419 type of op0. Also, don't warn about equality comparison of a
3420 signed operand to an unsigned constant that fits in the signed
3423 * method.c (do_build_copy_constructor): Reverse
3424 current_base_init_list after we've built it up.
3426 Thu Mar 30 14:35:18 1995 Mike Stump <mrs@cygnus.com>
3428 * except.c (build_throw): Never warn about the value of throw not
3431 Thu Mar 30 13:16:54 1995 Mike Stump <mrs@cygnus.com>
3433 * except.c (expand_start_catch_block): Check for bad catch parameter
3436 Thu Mar 30 13:06:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3438 * decl.c (finish_function): Only set DECL_NOT_REALLY_EXTERN if
3439 DECL_EXTERNAL is not already set.
3441 Thu Mar 30 11:26:24 1995 Mike Stump <mrs@cygnus.com>
3443 * method.c (emit_thunk): Let poplevel know that the last level is
3444 for a function so it can create a BLOCK_NODE and set DECL_INITIAL.
3446 Thu Mar 30 11:15:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3448 * decl2.c (import_export_inline): Don't set DECL_NOT_REALLY_EXTERN
3451 * decl.c (grokdeclarator): OK, don't abort if we see a decl with
3453 (finish_function): Set DECL_EXTERNAL and DECL_NOT_REALLY_EXTERN on
3454 all deferred inlines.
3456 Wed Mar 29 19:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3458 * cp-tree.h (DECL_THIS_INLINE): New macro.
3459 (DECL_NOT_REALLY_EXTERN): New macro.
3460 (DECL_THIS_STATIC): New macro.
3462 * decl.c: Lose all references to current_extern_inline. Break
3463 inline semantics into DECL_INLINE for actual inlining and
3464 DECL_THIS_INLINE for the linkage wierdness. Use DECL_THIS_STATIC.
3465 * decl2.c: Use DECL_NOT_REALLY_EXTERN to indicate that we want to
3466 emit an inline here. Associated changes.
3471 * call.c (build_method_call): Don't bother trying to handle inlines
3473 * cvt.c (convert_to_aggr): Ditto.
3475 * pt.c (do_function_instantiation): Handle instantiation of
3476 public inlines, too.
3478 Wed Mar 29 16:04:25 1995 Mike Stump <mrs@cygnus.com>
3480 * except.c (init_exception_processing): Change the interface for
3481 __throw_type_match and add decl for new rtti matching routine
3482 __throw_type_match_rtti.
3483 (build_eh_type): New routine to build a run time descriptor for the
3485 (expand_start_catch_block): Update to use new calling convention for
3487 (expand_throw): Update to use build_eh_type.
3489 Mon Mar 27 07:14:33 1995 Warner Losh <imp@village.org>
3491 * g++.c: Removed __NetBSD__ from conditional.
3492 Declare strerror if HAVE_STRERROR is defined; otherwise
3493 declare sys_errlist and sys_nerr.
3494 (my_strerror): New function.
3496 Tue Mar 28 14:16:35 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3498 * search.c (get_binfo): Don't try to be so clever.
3500 * tree.c (copy_to_permanent): Also suspend_momentary().
3502 * cvt.c (cp_convert_to_pointer): Hand off to convert_fn_pointer even
3503 if the types are the same.
3505 * decl.c (start_function): Handle extern inlines more like C++ says
3508 * init.c (build_member_call): Hand constructor calls off to
3509 build_functional_cast.
3511 * typeck2.c (build_functional_cast): Use DECL_NESTED_TYPENAME to get
3512 the name of the type.
3514 Tue Mar 28 13:13:56 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3516 * decl.c (grokdeclarator): Check for the decl returned by
3517 grokfndecl to be null before using build_decl_attribute_variant.
3519 Mon Mar 27 18:04:41 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3521 * init.c (build_new): Use build_pointer_type instead of
3524 Fri Mar 24 12:11:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3526 * typeck.c (build_conditional_expr): Handle pmfs.
3527 (convert_for_assignment): Fix pmf support.
3529 * cvt.c (convert_fn_ptr): Support !flag_vtable_thunks.
3530 (cp_convert_to_pointer): Handle pmfs.
3531 (cp_convert): Pass pmfs to cp_convert_to_pointer.
3533 * typeck.c (common_type): Handle inheritance for pmfs.
3535 * typeck2.c (build_m_component_ref): Do access control.
3537 * typeck.c (comp_target_types): Check for conversion to void *
3538 before checking trickier conversions.
3540 * decl.c (duplicate_decls): Propagate DECL_ABSTRACT_VIRTUAL_P.
3542 * pt.c (push_tinst_level): Complain if template instantiation depth
3543 is greater than max_tinst_depth.
3545 * typeck.c (common_type): Assume that we can call common_type to
3546 unify the target type of a pointer.
3548 Thu Mar 23 00:48:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3550 * decl2.c (finish_file): Don't synthesize methods at
3551 finish_vtable_prevardecl time. Do synthesize methods that are not
3552 used, but are public and not external.
3554 * cvt.c (build_type_conversion): Only give an error if for_sure.
3556 * typeck.c (comp_target_types): Only support pointer conversions if
3559 Wed Mar 22 19:30:15 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3561 * init.c (build_new): Catch use of an initializer list where it
3564 Wed Mar 22 16:21:07 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3566 * init.c (build_new): Wrap alloc_expr in an RTL_EXPR if nelts is
3569 * decl2.c: temp_name_counter is now public.
3571 * decl.c (struct cp_function): Add temp_name_counter field.
3572 (push_cp_function_context): Save it.
3573 (pop_cp_function_context): Restore it.
3575 * typeck.c (common_type): Handle unifying function types, and unify
3576 unmatched things to void* with a compiler_error, rather than
3577 silently like before.
3579 Wed Mar 22 15:10:34 1995 Mike Stump <mrs@cygnus.com>
3581 * decl2.c (finish_prevtable_vardecl, finish_vtable_vardecl): Revert
3582 Brendan's last change and fix latent problem that causes TD entries
3583 to not come out when the things that need them has yet to be
3586 Wed Mar 22 15:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3588 * typeck.c (build_binary_op_nodefault, comparison ops): Update type0
3589 and type1, since we might have changed op0 or op1.
3591 Wed Mar 22 13:33:45 1995 Jason Merrill <jason@python.cygnus.com>
3593 * typeck.c (common_type): Don't mess up templates.
3595 Wed Mar 22 04:56:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3597 * typeck.c (common_type): Handle ptms properly. Also handle
3599 (build_binary_op_nodefault): New variable build_type controls what
3600 type is given to the expression when it is created. Set this to
3601 boolean_type_node for comparison ops instead of using result_type.
3602 (comp_target_types): Allow T * -> void *.
3604 * cvt.c (cp_convert_to_pointer): Do access control when converting
3607 Tue Mar 21 17:25:06 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3609 * parse.y (extern_lang_string): Catch use of linkage specs that
3610 aren't all naming the same language.
3612 * class.c (finish_struct): Delete accidental duplicate code.
3614 Tue Mar 21 14:00:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3616 * typeck.c (build_binary_op_nodefault): Disable pedwarns about
3617 comparing functions and incomplete types.
3619 * decl.c (finish_function): Only unset current_function_decl if
3621 (duplicate_decls): Last change went too far; we only want to stop
3622 checking for value/reference ambiguity.
3624 Tue Mar 21 01:26:39 1995 Mike Stump <mrs@cygnus.com>
3626 * gc.c (build_generic_desc): Zap the DECL_SIZE so that we can lay it
3627 out fresh, as the new type may be larger.
3629 Mon Mar 20 19:01:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3631 * expr.c (extract_init): Try to expand the RTL for the
3632 initialization and figure out what it will look like so we can avoid
3633 run-time initialization. Disabled for now.
3634 (extract_scalar_init): Helper for scalar initialization.
3635 (extract_aggr_init): Helper for aggregate initialization.
3637 * decl.c (duplicate_decls): Don't complain about ambiguous
3639 (obscure_complex_init): Now returns a tree. Call extract_init if
3640 we're optimizing and this is a toplevel decl.
3641 (finish_decl): Update accordingly.
3643 * lex.c (check_newline): If we're just changing files (not pushing
3644 or popping), update input_file_stack->name.
3646 Mon Mar 20 17:55:04 1995 Mike Stump <mrs@cygnus.com>
3648 * pt.c (type_unification): Only TEMPLATE_DECLs are handled right now
3649 in the transitive unification code.
3651 Mon Mar 20 16:07:50 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3653 * decl.c (shadow_tag): Don't allow inline, virtual, or explicit on
3655 (grokdeclarator): Don't allow friends to be defined in local classes.
3657 Sat Mar 18 04:03:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3659 * decl2.c (finish_prevtable_vardecl): Use DECL_DECLARED_STATIC
3660 rather than DECL_SAVED_INSNS to decide whether or not this method
3661 was declared inline.
3663 * method.c (synthesize_method): Turn off DECL_INLINE if
3664 function_cannot_inline_p thinks we're too large.
3666 * typeck.c (build_indirect_ref): Use build_expr_type_conversion.
3668 Fri Mar 17 17:47:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3670 * class.c (instantiate_type): Handle pmfs.
3672 * typeck.c (convert_for_assignment): Check types when assigning one
3675 * decl.c (define_label): Fix logic for printing out the name of the
3676 label in an error message.
3678 * error.c (dump_expr): Support ARRAY_REF.
3680 Fri Mar 17 17:43:02 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3682 * decl2.c (finish_vtable_vardecl): Call build_t_desc here.
3683 (finish_prevtable_vardecl): Instead of here.
3685 Fri Mar 17 14:40:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3687 * decl.c (expand_static_init): Also use expand_aggr_init if the
3688 initializer is a TREE_LIST.
3689 (grokdeclarator): Only pedwarn about extra qualification if -pedantic.
3691 * pt.c (unify): Fix unification of return type.
3693 * expr.c (fixup_result_decl): Use store_expr, rather than
3694 emit_move_insn, to move the return value into the place where
3695 callers will expect it.
3697 Thu Mar 16 22:05:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3699 * init.c (build_offset_ref): Call assmble_external on functions.
3700 * typeck.c (build_component_ref): Ditto.
3702 Thu Mar 16 20:28:16 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3704 * decl.c (struct saved_scope): Add members base_init_list and
3706 (push_to_top_level): Save current_base_init_list and
3707 current_member_init_list to them.
3708 (pop_from_top_level): Put it back.
3710 Thu Mar 16 19:21:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3712 * pt.c (instantiate_template): Call assemble_external.
3714 Thu Mar 16 18:07:54 1995 Brendan Kehoe (brendan@phydeaux.cygnus.com)
3716 * class.c: Include rtl.h, to get NULL_RTX.
3717 (finish_struct): Also zero out DECL_SAVED_INSNS, to avoid problems
3718 on hosts with different sizes for each part of the union.
3719 * tree.c: Also include rtl.h.
3720 (layout_basetypes): Same change for DECL_SAVED_INSNS.
3722 Thu Mar 16 13:57:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3724 * pt.c (unify): Fix array domain unification for 64-bit targets.
3726 * decl2.c (finish_file): Push bizarre type decl before walking the
3727 vtables the first time.
3728 (walk_vtables): OK, don't set prev to vars if the vardecl_fn messed
3729 with TREE_CHAIN (prev).
3731 * init.c (emit_base_init): Use convert_pointer_to_real instead of
3732 convert_pointer_to when converting to a direct base.
3734 Wed Mar 15 20:26:29 1995 Mike Stump <mrs@cygnus.com>
3736 * pt.c (type_unification): Handle transitive unification better.
3738 Wed Mar 15 13:56:16 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3740 * decl2.c (walk_vtables): Always set prev to vars.
3741 (mark_vtable_entries): Call assemble_external on the vtable entries.
3743 * class.c (finish_struct): Set the vtable's size to NULL_TREE before
3744 calling layout_decl, so that it gets updated properly.
3746 Finally re-enable dynamic synthesis. This time it works.
3747 * method.c (synthesize_method): Pass decl_function_context (fndecl)
3748 to {push,pop}_cp_function_context.
3749 * decl.c (push_cp_function_context): Now takes a tree argument.
3750 (pop_cp_function_context): Ditto.
3751 * call.c (build_method_call): Enable synthesis.
3752 * lex.c (cons_up_default_function): Ditto.
3754 Tue Mar 14 19:14:19 1995 Doug Evans <dje@chestnut.cygnus.com>
3756 * parse.y (setattrs): Chain onto prefix_attributes rather than
3759 Wed Mar 15 13:00:00 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3761 * decl.c (pushdecl): Check if the type of the VAR_DECL is an
3762 error_mark_node before trying to read TYPE_LANG_SPECIFIC.
3764 Mon Mar 13 21:00:28 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3766 * decl.c (grokdeclarator, case ARRAY_REF): Wrap the exp with fold,
3767 and convert the size and integer_one_node to the index type.
3769 Mon Mar 13 08:01:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3771 * typeck.c (get_member_function_from_ptrfunc): Save the instance
3772 argument, and tack it onto the front of the COND_EXPR to make the
3773 semantics come out right. Grab the instance argument from
3774 '*instance_ptrptr', rather than having it passed in separately.
3776 * various: Change various consed-up comparison operations to have
3777 boolean type. Remove the instance argument in calls to
3778 get_member_function_from_ptrfunc.
3780 * error.c (dump_expr): Dump true and false as "true" and "false".
3782 * decl2.c (finish_file): Also set DECL_STATIC_FUNCTION_P on the
3783 global init function.
3785 * decl.c (finish_function): Only set DECL_EXTERNAL here if the
3786 inline function is public.
3788 Sat Mar 11 00:58:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3790 * init.c (is_friend): Be more careful about checking
3791 DECL_CLASS_CONTEXT on non-member functions.
3793 * decl2.c (finish_vtable_vardecl): Don't bother calling
3794 assemble_external here.
3795 (prune_vtable_vardecl): New function that just splices out the
3796 vtable decl from the top-level decls.
3797 (import_export_inline): Unset DECL_EXTERNAL at first.
3798 (finish_file): Don't bother calling assemble_external here. Do
3799 splice out all of the vtables.
3801 Fri Mar 10 14:42:29 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3803 * decl.c (finish_function): If we're not emitting the function yet,
3804 call assemble_external for it.
3806 * decl2.c (finish_prevtable_vardecl): Don't call mark_vtable_entries
3808 (finish_vtable_vardecl): Don't do the linkage deduction thing here.
3809 Also don't splice out the current vtable if it is unused.
3810 (finish_file): Move the second walk_vtables and the synthesis check
3811 inside the 'reconsider' loop. Move thunk emission after the
3814 Thu Mar 9 16:28:16 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3816 * pt.c (tsubst): Don't bother calling cp_build_type_variant, since it
3817 was passing bogus values for readonly and volatile from the original
3818 template decl, not the resultant type of the tsubst call.
3820 * class.c (duplicate_tag_error): Use cp_error_at to point out the
3821 previous definition of the tag.
3823 Thu Mar 9 10:46:17 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3825 * decl.c (start_function): Clear base_init_insns and protect_list.
3826 (struct cp_function): Add base_init_insns field.
3827 (push_cp_function_context): Also save base_init_insns.
3828 (pop_cp_function_context): Also restore base_init_insns.
3830 Wed Mar 8 13:31:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3832 * init.c (member_init_ok_or_else): Check for initializing a static
3834 (emit_base_init): Instead of here.
3836 Tue Mar 7 16:03:26 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3838 * call.c (build_method_call): Disable synthesis as needed.
3839 * lex.c (cons_up_default_function): Ditto.
3841 Tue Mar 7 10:14:29 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3843 * parse.y: New rules to allow attributes in a prefix position.
3844 (prefix_attributes): New variable. Pass it into cplus_decl_attributes.
3845 (setattr): New rule.
3846 (reserved_declspecs, declmods): Catch attributes here.
3847 * decl2.c (cplus_decl_attributes): Add PREFIX_ATTRIBUTES argument.
3848 * decl.c (duplicate_decls): Pass DECL_MACHINE_ATTRIBUTES to
3850 (grokdeclarator): Added code to support machine attributes.
3851 * Makefile.in (stamp-parse): Expect 5 shift/reduce failures.
3853 Mon Mar 6 15:07:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3855 * call.c (build_method_call): Don't synthesize methods outside of a
3858 Make base initialization more re-entrant so that synthesis on the
3859 fly will work (and, eventually, template instantation on the fly).
3860 * init.c (sort_member_init): Don't bother with members that can't be
3861 initialized. Reorganize a bit. Don't initialize base members here.
3862 (sort_base_init): New function, like sort_member_init, but for base
3863 classes. Steals some code from emit_base_init.
3864 (emit_base_init): Simplify. Call sort_{member,base}_init before
3865 doing any initialization, so we don't have to save
3866 current_{member,base}_init_list in push_cp_function_context.
3867 (expand_aggr_vbase_init_1): Adjust for sort_base_init.
3868 (expand_aggr_vbase_init): Simplify.
3869 * decl.c (struct cp_function): Add protect_list field.
3870 (push_cp_function_context): Also save protect_list.
3871 (pop_cp_function_context): Also restore protect_list.
3872 * call.c (build_method_call): Enable synthesis at point of call.
3873 * lex.c (cons_up_default_function): Ditto.
3875 * parse.y: Turn -ansi checks back into -pedantic checks.
3877 * init.c (build_new): Fix -fcheck-new for array new.
3879 Sat Mar 4 15:55:42 1995 Fergus Henderson <fjh@cs.mu.oz.au>
3881 * typeck.c (build_compound_expr): warn if left-hand operand of
3882 comma expression has no side-effects.
3884 Fri Mar 3 15:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3886 * parse.y (primary): Change 'object qualified_id *' rules to 'object
3887 overqualified_id *'.
3889 Fri Mar 3 12:48:17 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3891 * parse.y (unary_expr): Catch doing sizeof an overloaded function.
3892 Make the error look the same as the one we issue in c_sizeof.
3894 * typeck.c (build_binary_op_nodefault): Give an error for trying
3895 to compare a pointer-to-member to `void *'.
3897 Fri Mar 3 11:28:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3899 * typeck.c (build_unary_op): Handle bool increment with smoke and
3900 mirrors here, rather than in expand_increment where it belongs,
3901 because Kenner doesn't agree with me.
3903 Fri Mar 3 00:08:10 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3905 * decl.c (grokparms): Catch a PARM_DECL being used for a default
3908 Thu Mar 2 20:05:54 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3910 * init.c (build_new): Don't allow new on a function type.
3912 * parse.y (primary): Avoid a crash when seeing if the arg is of
3913 the same type as that given for the typespec in an explicit dtor call.
3915 Thu Mar 2 00:49:38 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3917 * decl.c (finish_function): Change test for calling
3918 mark_inline_for_output.
3920 Wed Mar 1 11:23:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3922 * typeck.c (build_modify_expr): Complain if
3923 build_default_binary_type_conversion fails.
3925 * init.c (expand_default_init): Handle arguments of unknown type
3928 * cvt.c (build_expr_type_conversion): Only complain about ambiguity
3930 * various: Pass 'complain'.
3932 * typeck.c (comptypes): Be more picky about comparing UPTs.
3934 Wed Mar 1 11:03:41 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3936 * decl.c (grokdeclarator): If declarator is null, say that the
3937 type used has an incomplete type.
3939 Wed Mar 1 10:06:20 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3941 * pt.c (instantiate_template): Copy the template arguments to the
3942 permanent_obstack. Also use simple_cst_equal to compare them when
3943 looking for a previous instantiation.
3945 * tree.c (make_deep_copy): Support copying INTEGER_TYPEs (assuming
3946 they are array domain types).
3948 Tue Feb 28 23:24:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3950 * cp-tree.h: Define WANT_* constants for passing to
3951 build_expr_type_conversion.
3952 * cvt.c (build_expr_type_conversion): New function to build
3953 conversion to one of a group of suitable types.
3954 (build_default_binary_type_conversion): Use it.
3955 * decl2.c (grok_array_decl): Ditto.
3956 * typeck.c (build_unary_op): Ditto.
3957 (build_array_ref): Tidy up a bit.
3958 (build_binary_op): Ditto.
3960 Tue Feb 28 19:57:31 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3962 * decl.c (grokdeclarator): Don't allow decl of an argument as `void'.
3964 Tue Feb 28 17:23:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3966 * parse.y (typed_declspecs1): Add 'typespec reserved_typespecquals
3967 reserved_declspecs' rule.
3969 * parse.y (expr_or_declarator): Remove notype_qualified_id rule.
3970 (direct_notype_declarator): Ditto.
3971 (complex_direct_notype_declarator): Add notype_qualified_id rule.
3973 * lex.c (real_yylex): Handle :> digraph properly.
3975 Tue Feb 28 12:26:29 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3977 * decl.c (grokdeclarator): Check if it's a friend, not if it's
3978 non-virtual, that's being initialized. Move the check up to
3979 before FRIENDP would get cleared. Catch an unnamed var/field
3980 being declared void. Say just `field' instead of `structure field'
3981 in the error message. Only go for the operator name if DECLARATOR
3984 Tue Feb 28 00:08:01 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3986 * decl.c (start_function): Complain about abstract return type.
3987 (grokdeclarator): Complain about declaring constructors and
3988 destructors to be const or volatile. Complain about declaring
3989 destructors to be static.
3991 * pt.c (uses_template_parms): Handle pmfs.
3993 * decl.c (grokdeclarator): Don't call variable_size for array bounds
3994 that only depend on template constant parameters.
3996 Mon Feb 27 15:38:16 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3998 * error.c (dump_decl): Only look to see if it's a vtable if we
3999 actually have a name to check out.
4001 Mon Feb 27 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4003 * cvt.c (convert_to_aggr): Lose misleading shortcut.
4005 Sun Feb 26 17:27:32 1995 Doug Evans <dje@canuck.cygnus.com>
4007 * decl.c (set_nested_typename): Always set DECL_IGNORED_P,
4010 Sun Feb 26 00:10:18 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4012 * decl.c (grokdeclarator): Don't allow a static member to be
4013 declared `register'.
4015 * init.c (make_friend_class): Move up to a pedwarn for the warning
4016 about a class declaring friends with itself.
4018 * decl.c (grokdeclarator): You can't do `volatile friend class foo'
4019 or `inline friend class foo'. Only try to make a friend out of
4020 TYPE if we didn't already reset it to integer_type_node.
4022 Sat Feb 25 22:32:03 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4024 * decl.c (grokdeclarator): Don't allow initialization of a
4025 non-virtual function.
4027 * decl.c (start_function): Do a pedwarn if we're changing `main'
4028 to have an int return type.
4030 Sat Feb 25 00:02:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4032 * typeck.c (build_modify_expr): Handle simple assignment from
4033 TARGET_EXPRs by building up an RTL_EXPR to force expansion. Whew.
4035 Fri Feb 24 18:27:14 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4037 * decl.c (grokdeclarator): Also don't allow virtual outside of a
4038 class decl for a scope method definition performed at global binding.
4040 * init.c (build_offset_ref): Don't allow creation of an OFFSET_REF
4043 * decl.c (grokdeclarator): Don't allow a const to be declared mutable.
4045 * typeck.c (build_binary_op): Return an error_mark_node if either
4046 one of the args turned into an error_mark_node when we tried to
4047 use default_conversion.
4049 * typeck.c (build_unary_op): Forbid using postfix -- on a bool.
4051 * decl.c (grokdeclarator): Allow `signed' and `unsigned' to be
4052 used on `__wchar_t'.
4054 Fri Feb 24 13:59:53 1995 Mike Stump <mrs@cygnus.com>
4056 * except.c (end_protect_partials): Do it the right way.
4058 Wed Feb 22 15:42:56 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4060 * typeck.c (build_binary_op_nodefault): Upgrade warning about
4061 comparing distinct pointer types to pedwarn.
4063 * typeck2.c (digest_init): Cope with extra braces.
4065 * typeck.c (build_binary_op_nodefault): Use tree_int_cst_sgn instead
4066 of INT_CST_LT (..., interger_zero_node).
4068 Wed Feb 22 14:45:52 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4070 * except.c [!TRY_NEW_EH] (end_protect_partials): Define dummy
4071 function for systems that don't have EH.
4073 Tue Feb 21 19:18:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4075 * call.c (can_convert_arg): Like can_convert, but takes an arg as
4078 * pt.c (type_unification): Allow implicit conversions for parameters
4079 that do not depend on template parameters.
4081 Tue Feb 21 18:43:48 1995 Douglas Rupp (drupp@cs.washington.edu)
4083 * Make-lang.in, config-lang.in: ($exeext): New macro.
4084 * Make-lang.in: Try a "cp" if "ln" fails.
4085 * cp-tree.h (decl_attributes): Added argument.
4086 * decl2.c (cplus_decl_attribute): Add arg to decl_attributes.
4087 * cp/g++.c: Added #ifdefs for sys/file.h and process.h for NT.
4088 Modified spawnvp to have to correct number of arguments for OS/2, NT.
4090 Tue Feb 21 18:36:55 1995 Mike Stump <mrs@cygnus.com>
4092 * decl.c (finish_function): Add calls to end_protect_partials to end
4093 the exception region that protects constructors so that partially
4094 constructed objects can be partially destructed when the constructor
4095 throws an exception.
4096 * init.c (perform_member_init, sort_member_init, emit_base_init):
4097 Added support for partially constructed objects.
4098 * init.c (build_partial_cleanup_for): New routine to do partial
4099 cleanups of a base class.
4100 * decl2.c (finish_file): Move the emitting of the exception table
4101 down, after we emit all code that might have exception regions in
4103 * except.c (end_protect_partials, might_have_exceptions_p): New
4105 (emit_exception_table): Always output table if called.
4106 * cp-tree.h (protect_list, end_protect_partials,
4107 might_have_exceptions_p, emit_exception_table): Added.
4109 Tue Feb 21 16:05:59 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4111 * gc.c (build_typeid): Pass a NULL_TREE, not the bogus, unused
4112 address of a local variable.
4113 * class.c (build_vfn_ref): Only try to build the PLUS_EXPR if we
4114 were given a non-null PTR_TO_INSTPTR.
4116 Tue Feb 21 01:53:18 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4118 * decl.c (duplicate_decls): Always lay out the merged decl.
4120 * decl2.c (finish_vtable_vardecl): Don't do vtable hack on templates.
4121 (finish_prevtable_vardecl): Ditto.
4123 * method.c (synthesize_method): Set interface_{unknown,only}
4124 according to the settings for our class, not the file where it comes
4127 Sat Feb 18 12:26:48 1995 Mike Stump <mrs@cygnus.com>
4129 * except.c: Handle systems that define __i386__ but not __i386.
4131 Fri Feb 17 15:31:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4133 * decl2.c (reparse_decl_as_expr): Support being called without a
4136 * parse.y (primary): Add '(' expr_or_declarator ')'. Adds 4 r/r
4139 Fri Feb 17 12:02:06 1995 Mike Stump <mrs@cygnus.com>
4141 * parse.y (template_def, fndef, fn.def1, return_init, condition,
4142 initdcl0, initdcl, notype_initdcl0, nomods_initdcl0,
4143 component_decl_1, after_type_component_declarator0,
4144 notype_component_declarator0, after_type_component_declarator,
4145 notype_component_declarator, after_type_component_declarator,
4146 full_parm, maybe_raises, exception_specification_opt): Fix up,
4147 include exception_specification_opt maybeasm maybe_attribute and
4148 maybe_init if missing. Rename maybe_raises to
4149 exception_specification_opt to match draft wording. Use maybe_init
4152 Fri Feb 17 01:54:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4154 * init.c (build_new): Set TREE_NO_UNUSED_WARNING on COMPOUND_EXPRs
4155 built for news of scalar types.
4157 Thu Feb 16 17:48:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4159 * typeck.c (build_binary_op_nodefault): Update code for warning
4160 about signed/unsigned comparisons from C frontend. Realize that the
4161 code in the C frontend is, if anything, even more bogus. Fix it.
4162 (build_binary_op): Undo default_conversion if it wasn't useful.
4164 * typeck.c (build_unary_op, ADDR_EXPR): Lose bogus special case for
4167 * decl2.c (import_export_vtable): Don't try the vtable hack
4168 if the class doesn't have any real non-inline virtual functions.
4169 (finish_vtable_vardecl): Don't bother trying to find a non-inline
4170 virtual function in a non-polymorphic class.
4171 (finish_prevtable_vardecl): Ditto.
4173 * decl2.c (import_export_vtable): Use and set DECL_INTERFACE_KNOWN.
4175 * cp-tree.h (DECL_INTERFACE_KNOWN): Use DECL_LANG_FLAG_5.
4177 * init.c (expand_virtual_init): Always call assemble_external.
4179 * class.c (build_vfn_ref): Always call assemble_external.
4180 (build_vtable): Always call import_export_vtable.
4181 (prepare_fresh_vtable): Ditto.
4182 (add_virtual_function): Don't bother setting TREE_ADDRESSABLE.
4184 Thu Feb 16 03:28:49 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4186 * class.c (finish_struct): Use TYPE_{MIN,MAX}_VALUE to determine
4187 whether an enumerated type fits in a bitfield.
4189 Wed Feb 15 15:38:12 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4191 * class.c (grow_method): Update method_vec after growing the class
4194 Wed Feb 15 13:42:59 1995 Mike Stump <mrs@cygnus.com>
4196 * parse.y (handler_seq): Push a level for the catch parameters.
4198 Wed Feb 15 12:42:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4200 * init.c (emit_base_init): Update BINFO_INHERITANCE_CHAIN on my
4201 bases, in case they've been clobbered.
4203 Wed Feb 15 12:07:29 1995 Mike Stump <mrs@cygnus.com>
4205 * class.c (finish_base_struct): Set up BINFO_INHERITANCE_CHAIN here,
4206 so that one day it will always be valid.
4207 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Ditto.
4209 * cp-tree.h (copy_binfo): Removed, unused.
4210 * tree.c (copy_binfo): Ditto.
4212 Wed Feb 15 00:05:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4214 * init.c (build_new): Save the allocation before calling
4215 expand_vec_init on it.
4217 * decl.c (finish_enum): The TYPE_PRECISION of the enum type mush
4218 match the TYPE_PRECISION of the underlying type for constant folding
4221 Tue Feb 14 15:31:25 1995 Mike Stump <mrs@cygnus.com>
4223 * except.c (push_eh_entry, expand_start_all_catch,
4224 expand_leftover_cleanups, expand_end_catch_block): Keep track of
4225 the context in which the exception region occurs.
4226 (build_exception_table): If the region was not output, don't output
4227 the entry in the eh table for it.
4229 Tue Feb 14 02:15:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4231 * init.c (expand_default_init): Only use a previous constructor call
4232 if it's a call to our constructor. Does the word "Duh" mean
4235 * decl.c (grokparms): Fine, just don't call
4236 convert_for_initialization at all. OK? Happy now?
4238 Mon Feb 13 02:23:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4240 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Make sure that the class
4241 method vector has a second element before returning it.
4243 * decl.c (grokparms): Don't strip REFERENCE_TYPE before calling
4244 convert_for_initialization.
4246 Sun Feb 12 03:57:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4248 * typeck.c (build_modify_expr): Compare function name to
4249 constructor_name (current_class_type) instead of current_class_name.
4251 * decl.c (grokparms): Don't do anything with the return value of
4252 convert_for_initialization.
4254 * error.c (dump_decl): Also dump_readonly_or_volatile on the decl.
4256 * decl.c (duplicate_decls): Tweak error message.
4258 * typeck.c (build_const_cast): Implement checking.
4259 (build_reinterpret_cast): Implement some checking.
4261 * cp-tree.h (CONV_FORCE_TEMP): Require a new temporary when
4262 converting to the same aggregate type.
4263 (CONV_STATIC_CAST): Include it.
4264 (CONV_C_CAST): Ditto.
4265 * cvt.c (convert_force): Use CONV_C_CAST instead of CONV_OLD_CONVERT.
4266 (cp_convert): Only force a new temporary if CONV_FORCE_TEMP.
4268 Fri Feb 10 16:18:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4270 * typeck.c (build_c_cast): Use non_lvalue to tack something on
4273 * decl.c (auto_function): Now a function.
4274 * except.c (init_exception_processing): terminate, unexpected,
4275 set_terminate, and set_unexpected have C++ linkage.
4277 * typeck.c (build_unary_op, TRUTH_NOT_EXPR): Use convert instead of
4278 truthvalue_conversion for converting to bool, as it handles
4279 user-defined conversions properly.
4280 (condition_conversion): Ditto.
4282 * except.c (expand_throw): Don't call convert_to_reference.
4283 Pass the correct parameters to build_new.
4285 * method.c (do_build_assign_ref): Don't use access control when
4286 converting to a base reference here.
4287 (do_build_copy_constructor): Or here.
4289 * init.c (build_new): Unset TREE_READONLY on the dereferenced
4290 pointer before assigning to it.
4292 * decl.c (maybe_build_cleanup): Don't bother stripping const here.
4294 * decl2.c (delete_sanity): You can now delete pointer to const.
4296 Fri Feb 10 13:28:38 1995 Jason Merrill <jason@python.cygnus.com>
4298 * decl.c (finish_function): Don't rely on actual parameters being
4299 evaluated left-to-right.
4300 * except.c (expand_end_catch_block): Ditto.
4302 Fri Feb 10 00:52:04 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4304 * tree.c (real_lvalue_p): Like lvalue_p, but class temps aren't
4306 * cvt.c (convert_to_reference): Use real_lvalue_p instead of
4309 * cvt.c (build_type_conversion_1): Don't call convert on aggregate
4311 (convert_to_reference): Fix erroneous text substitution.
4313 * typeck2.c (initializer_constant_valid_p): Update from C frontend.
4314 Add new argument to all callers.
4316 * typeck.c (convert_arguments): Check for error_mark_node before
4317 trying to do anything with the actual parameter.
4319 * typeck.c (condition_conversion): Build up a CLEANUP_POINT_EXPR and
4321 (bool_truthvalue_conversion): Remove. Fix all callers to call
4322 truthvalue_conversion instead.
4323 (various): Fold CLEANUP_POINT_EXPRs.
4325 * parse.y (conditions): Call condition_conversion rather than
4326 building up a CLEANUP_POINT_EXPR.
4328 * pt.c (end_template_decl): Don't warn_if_unknown_interface here
4329 under -falt-external-templates.
4331 Thu Feb 9 05:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4333 * init.c (build_new): Complain about new of const type without
4334 initializer. Other cleanup.
4336 * call.c (compute_conversion_costs): Don't call
4337 build_type_conversion with a reference type; convert to the target
4338 type and check its lvaluetude.
4339 * cvt.c (convert_to_reference): Ditto.
4341 * cvt.c (build_type_conversion_1): There will never be any need to
4342 dereference references here now.
4344 Thu Feb 9 00:37:47 1995 Mike Stump <mrs@cygnus.com>
4346 * except.c (expand_builtin_throw): Make sure we only `use' the
4347 value of return_val_rtx.
4349 Wed Feb 8 15:45:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4351 * parse.y (structsp): Don't complain about declaring a type being
4352 defined to be a friend.
4354 * decl2.c (warn_if_unknown_interface): Note the template in question
4355 and the point of instantiation, for -falt-external-templates.
4356 * lex.c (reinit_parse_for_method): Pass the decl to
4357 warn_if_unknown_interface.
4358 * pt.c (instantiate_template): Ditto.
4359 (end_template_decl): Ditto.
4361 * decl.c (set_nested_typename): Set IDENTIFIER_TYPE_VALUE on the
4362 nested name again, to make local classes work a bit better.
4364 * typeck.c (build_function_call_real): Dereference reference after
4365 checking for incomplete type.
4367 * init.c (build_new): Accept new of const and volatile types.
4369 Wed Feb 8 14:04:16 1995 Jason Merrill <jason@deneb.cygnus.com>
4371 * decl.c (grokdeclarator): Fix error message.
4373 Wed Feb 8 03:16:15 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4375 * typeck.c (convert_for_initialization): Do bash arrays when
4376 converting to a reference to non-array.
4378 Tue Feb 7 15:50:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4380 * cvt.c (cp_convert): Don't call convert_to_reference, or
4381 automatically dereference references. Do pass reference conversions
4382 to cp_convert_to_pointer.
4383 (cp_convert_to_pointer): Support references.
4385 * call.c (build_method_call): Don't build up a reference to the
4386 parameter here; let build_overload_call handle that.
4388 * typeck.c (build_c_cast): Call convert_to_reference directly if
4389 converting to a reference type.
4390 * method.c (do_build_copy_constructor): Ditto.
4391 * method.c (do_build_copy_constructor): Ditto.
4392 (do_build_assign_ref): Ditto.
4394 * call.c (build_method_call): Dereference a returned reference.
4395 * typeck.c (build_function_call_real): Ditto.
4397 * decl.c (xref_basetypes): Check for unions with basetypes here.
4398 (xref_tag): Instead of here.
4400 * pt.c (process_template_parm): Template type parm decls are
4403 Mon Feb 6 04:32:09 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4405 * parse.y (typed_declspecs): Add missing semicolon.
4406 (do_xref_defn): Resurrect.
4407 (named_class_head_sans_basetype): Move template specialization
4408 definition cases to named_class_head_sans_basetype_defn.
4410 * decl2.c (grokfield): Call pushdecl_class_level after setting the
4411 TYPE_NAME, not before.
4413 Sun Feb 5 02:50:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4415 * call.c (convert_harshness): Don't call sorry here. Don't allow
4416 conversions between function pointer types if pedantic.
4418 * pt.c (overload_template_name): Pass globalize=1 to xref_tag.
4420 * lex.c (cons_up_default_function): Use the full name for the return
4423 * decl.c (set_nested_typename): Don't worry about anonymous types,
4424 as they already have a unique name.
4425 (pushdecl): Remove redundant set_nested_typename
4426 (xref_tag): Split out base handling into xref_basetypes.
4428 * cp-tree.h (TYPE_INCOMPLETE): New macro; TEMPLATE_TYPE_PARMs are
4429 not considered incomplete even though their definition is unknown.
4431 * decl.c (xref_defn_tag): Lose.
4432 (xref_tag): xref_next_defn = ! globalize.
4433 (pushdecl): Don't set DECL_NESTED_TYPENAME on artificial decls. The
4434 ones that should have it set will have it set by pushtag.
4435 (pushdecl_class_level): Ditto.
4436 (pushtag): Tidy up a bit.
4437 (set_nested_typename): Push a decl for the nested typename from
4438 here, rather than from xref_defn_tag.
4440 * parse.y (do_xref): Lose.
4441 (named_class_head): If we see 'class foo:' we know it's a
4442 definition, so don't worry about base lists for non-definitions.
4444 * pt.c (push_template_decls): Template parm decls are artificial.
4446 * decl.c (duplicate_decls): Restore check for qualifier
4447 disagreement for non-functions.
4448 (decls_match): Remove check for qualifier disagreement.
4450 Fri Feb 3 14:58:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4452 * decl.c (grok_reference_init): Convert initializer from
4454 * typeck.c (convert_for_initialization): Ditto.
4456 * decl.c (duplicate_decls): Propagate DECL_NESTED_TYPENAME.
4458 * cvt.c (cp_convert): Don't convert to the same class type by just
4459 tacking on a NOP_EXPR.
4460 (convert_to_reference): Use comp_target_types instead of comptypes
4461 so that we don't allow conversions two levels down.
4463 Thu Feb 2 15:07:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4465 * class.c (build_vbase_path): Bash types to make the backend happy.
4466 * cvt.c (build_up_reference): Bash the types bashed by
4467 build_vbase_path to be reference types instead of pointer types.
4468 (convert_to_reference): Ditto.
4470 * typeck.c (build_c_cast): Don't strip NOPs if we're converting to a
4473 * parse.y (structsp): Put back error for 'struct B: public A;'.
4475 Wed Feb 1 23:02:06 1995 Mike Stump <mrs@cygnus.com>
4477 * except.c: Add support for mips systems that don't define __mips
4478 but do define mips, like Ultrix.
4480 Wed Feb 1 22:39:07 1995 Mike Stump <mrs@cygnus.com>
4482 * except.c: Add support for exception handling on the Alpha.
4484 Wed Feb 1 10:12:14 1995 Mike Stump <mrs@cygnus.com>
4486 * decl2.c (finish_file): Fix bug in Jan 31st change.
4488 Tue Jan 31 16:59:15 1995 Gerald Baumgartner (gb@lorenzo.cs.purdue.edu)
4490 * sig.c (build_signature_pointer_or_reference_type): Don't set
4491 IS_AGGR_TYPE for signature pointers/reference so expand_default_init
4492 doesn't expect to find a copy constructor.
4493 * call.c (build_method_call): Treat signature pointers/reference
4494 as if IS_AGGR_TYPE were set.
4496 Tue Jan 31 13:28:56 1995 Mike Stump <mrs@cygnus.com>
4498 * gc.c (get_typeid): Pawn off error messages to build_t_desc.
4499 (build_t_desc): Inform the user here if they try and build
4500 with -frtti and don't include <typeinfo.h>.
4502 * decl2.c (finish_prevtable_vardecl): Support rescanning.
4503 (finish_file): Move finish_prevtable_vardecl up to before the global
4504 initializers are done as tdecls are initialized in the global
4505 initializer. Also Pick up any new tdecls or vtables needed by
4506 synthesized methods.
4508 * class.c (finish_struct): Simplify. We have to do rtti scanning at
4509 end, so we might as well do all of it there.
4511 Tue Jan 31 05:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4513 * call.c (build_method_call): Fix -fthis-is-variable for 32-bit
4516 Tue Jan 31 00:11:04 1995 Mike Stump <mrs@cygnus.com>
4518 * decl2.c (finish_prevtable_vardecl): New routine, mostly split from
4519 finish_vtable_vardecl. It has the first half functionality from
4521 * decl2.c (finish_vtable_vardecl): Update to not include stuff not
4522 in finish_prevtable_vardecl.
4523 * decl2.c (finish_file): Call finish_prevtable_vardecl.
4524 * gc.c (build_generic_desc): Allow it to be called when not at the
4525 global binding layer, but behave as if we were.
4526 (build_t_desc): Rearrange a bit so that it really works and is
4528 * class.c (finish_struct): Don't decide on tdecls here, as we have
4529 to wait until the end of the file in general to decide whether or
4532 Mon Jan 30 01:00:40 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4534 * init.c (build_delete): Check access to operator delete before
4535 calling the destructor.
4536 * method.c (build_opfncall, DELETE_EXPR): build_method is allowed to
4537 return error_mark_node.
4538 * call.c (build_method_call): Use the one-argument op delete even if
4541 * init.c (build_new): Fix -fthis-is-variable support.
4542 * call.c (build_method_call): Ditto.
4544 * call.c (convert_harshness): Make conversion from a pointer to bool
4545 worse than conversion to another pointer.
4547 Sat Jan 28 16:46:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4549 * init.c (build_new): Check new return value if -fcheck-new.
4551 * lex.c (check_newline): Clear end_of_file when we're done, too.
4553 Sat Jan 28 10:38:39 1995 Mike Stump <mrs@cygnus.com>
4555 * decl2.c (finish_vtable_vardecl): Make rtti TD tables follow
4556 vtables whereever they go.
4558 * gc.c (build_t_desc): Remove old way of setting it up, as it wasn't
4561 Sat Jan 28 09:10:44 1995 Mike Stump <mrs@cygnus.com>
4563 * decl2.c (finish_vtable_vardecl): Now set the
4564 interface/implementation of vtables on the first virtual function,
4565 if one exists, otherwise we use the old method. This is a major win
4566 in terms of cutting down the size of objects and executables in
4567 terms of text space and data space. Now most of the savings that
4568 #pragma interface/implementation gives is automatic in a fair number
4571 Sat Jan 28 04:57:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4573 * decl.c (grokdeclarator): Discard the template parameters in a
4574 template constructor declaration so that the function is always
4575 named constructor_name (ctype).
4577 * lex.c (check_newline): Use ungetc to put back the character before
4578 calling HANDLE_PRAGMA.
4580 Fri Jan 27 17:23:47 1995 Mike Stump <mrs@cygnus.com>
4582 * decl2.c (check_classfn): If the cname is T<int> and fn_name is T,
4583 make sure we still match them.
4585 Fri Jan 27 16:32:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4587 * parse.y: Add END_OF_LINE token.
4589 * lex.c (check_newline): Set linemode when we see a # directive, and
4590 unset it when we're done. Turn all 'return's into 'goto skipline'.
4591 Fix all uses of '\n', since we won't see it anymore. Put back the
4592 character we read before checking for a sysv or target pragma.
4593 (real_yylex): If we see an EOF in linemode, return END_OF_LINE.
4594 (handle_sysv_pragma): Don't look at the input stream; quit when we
4595 see an END_OF_LINE token.
4597 * input.c (getch): Return EOF if we're in line mode and at the end
4599 (put_back): Don't put back an EOF.
4601 Thu Jan 26 19:26:34 1995 Mike Stump <mrs@cygnus.com>
4603 * except.c (expand_throw): Do the newing of the exception object
4604 before we load the type descriptor or the address so that we don't
4605 wipe any of the values out.
4607 Thu Jan 26 19:20:00 1995 Mike Stump <mrs@cygnus.com>
4609 * except.c (init_exception_processing): Don't use r12 on the rs6000.
4611 Tue Jan 24 16:36:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4613 * decl.c (grokparms): Don't try to build up a reference at this point.
4615 * typeck2.c (build_functional_cast): Don't assume that a NOP_EXPR
4616 will suffice to convert from integer_zero_node.
4618 Wed Jan 25 15:02:09 1995 David S. Miller (davem@nadzieja.rutgers.edu)
4620 * class.c (instantiate_type): Change error message text.
4621 * typeck2.c (store_init_value): Likewise.
4623 Mon Jan 23 21:57:14 1995 Mike Stump <mrs@cygnus.com>
4625 * pt.c (tsubst): When we copy a node, don't forget to copy
4626 TREE_CHAIN, we use it later.
4628 Mon Jan 23 03:33:47 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4630 * typeck.c (convert_for_assignment): Initialize variable before use.
4632 Fri Jan 20 01:17:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4634 * g++.c (main): Link with both libstdc++ and libg++ if called as
4635 something ending with "g++", otherwise only libstdc++. Move -lm to
4636 the end of the line.
4638 Thu Jan 19 15:43:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4640 * call.c (build_method_call): Don't mess with 'this' before calling
4641 compute_conversion_costs.
4643 Wed Jan 18 15:40:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4645 * search.c (get_matching_virtual): Give line number for previous
4648 * call.c (convert_harshness): Handle conversions to references
4651 * cvt.c (build_up_reference): OK, handle {MIN,MAX}_EXPR *properly*.
4653 Wed Jan 18 15:21:38 1995 Mike Stump <mrs@cygnus.com>
4655 * class.c (instantiate_type): Use DECL_CHAIN to walk lists instead,
4656 as the TREE_CHAIN for methods will take us to the next differently
4657 named function, DECL_CHAIN won't.
4659 Wed Jan 18 14:26:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4661 * tree.c (lvalue_p): Handle {MIN,MAX}_EXPR.
4663 * decl2.c (lang_decode_option): -Wall implies -Wparentheses.
4664 warn_parentheses defaults to 0.
4666 * decl.c (grokparms): Put back call to require_instantiated_type.
4668 Tue Jan 17 19:56:15 1995 Mike Stump <mrs@cygnus.com>
4670 * except.c (exception_section): Use the data section on the rs6000.
4671 Change calling convention for named_section.
4673 Wed Jan 17 18:20:57 1994 Fergus Henderson <fjh@munta.cs.mu.oz.au>
4675 * cp-tree.h : Make if (x=0) warn with wall
4676 * parse.y : Make if (x=0) warn with wall
4678 Tue Jan 17 14:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4680 * decl.c (BOOL_TYPE_SIZE): BITS_PER_WORD if SLOW_BYTE_ACCESS,
4681 BITS_PER_UNIT otherwise.
4683 * search.c (get_matching_virtual): Don't check the binfo if the
4686 * cvt.c (cp_convert): Just call truthvalue_conversion to convert to
4689 Mon Jan 16 13:28:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4691 * various: Use boolean_type_node, boolean_true_node,
4694 * search.c (get_matching_virtual): Allow covariant returns that
4695 don't require pointer adjustment.
4697 * typeck.c (build_conditional_expr): Don't call default_conversion
4700 * cvt.c (build_up_reference): Handle MIN_EXPR and MAX_EXPR.
4702 * decl.c (grokdeclarator): Upgrade warning about &const to pedwarn.
4704 Sun Jan 15 22:17:32 1995 dcb@lovat.fmrco.COM (David Binderman)
4706 * pt.c (do_function_instantiation): Free targs once we're done.
4708 Sun Jan 15 22:17:32 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4710 * decl.c (BOOL_TYPE_SIZE): Defaults to BITS_PER_WORD.
4711 (init_decl_processing): Use BOOL_TYPE_SIZE instead of CHAR_TYPE_SIZE
4714 Sat Jan 14 05:33:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4716 * decl2.c (finish_file): We need to mess up if there are any
4717 variables in the list, not just if there is one with a constructor.
4719 Fri Jan 13 14:42:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4721 * decl.c (duplicate_decls): Propagate DECL_STATIC_{CON,DE}STRUCTOR.
4722 (finish_function): Handle DECL_STATIC_{CON,DE}STRUCTOR.
4723 (finish_function): Trust rest_of_compilation.
4725 * decl2.c (finish_file): Also call functions designated as static
4726 constructors/destructors.
4728 * decl.c (grokdeclarator): Allow access decls of operator functions.
4729 (grokparms): Only do convert_for_initialization if the initializer
4731 (duplicate_decls): Put back push_obstacks_nochange call.
4733 * lex.c (real_yylex): Downgrade complaint about the escape sequence
4734 being too large from pedwarn to warning.
4736 * decl.c (grokdeclarator): Don't complain about long long in system
4739 * lex.c (real_yylex): Handle digraphs.
4741 Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4743 * decl.c (init_decl_processing): -f{no-,}strict-prototype only
4744 affects C linkage declarations now.
4746 * typeck.c (comp_target_types): Grok simple contravariant conversions.
4747 (common_type): t1 and t2 are interchangeable.
4749 * various: Test return value of comp_target_types differently in
4750 different places; it now returns -1 for a contravariant conversion
4751 (which is fine in symmetric cases).
4753 (common_type): Prefer long double to double even when
4754 they have the same precision.
4756 * decl.c (grokparms): Call convert_for_initialization to check
4759 * init.c (build_new): void_type_node has a size (of 0).
4761 * decl.c (decls_match): Also check for agreement of TREE_READONLY
4762 and TREE_THIS_VOLATILE.
4763 (push_class_level_binding): Properly handle shadowing of
4764 nested tags by fields.
4766 * search.c (dfs_pushdecls): Ditto.
4768 * decl2.c (finish_file): Don't second-guess self-initialization.
4770 * cvt.c (convert_to_reference): Work with expr directly, rather than
4773 * decl.c (push_overloaded_decl): Only shadow artificial TYPE_DECLs.
4775 * init.c (add_friend): Downgrade duplicate friend message from
4778 * decl.c (duplicate_decls): Push obstacks before calling common_type.
4780 Thu Jan 12 17:15:21 1995 Michael Ben-Gershon <mybg@cs.huji.ac.il>
4782 * except.c (push_eh_entry): set LABEL_PRESERVE_P flag for
4783 exception table labels.
4784 (expand_start_all_catch): Ditto.
4785 (expand_leftover_cleanups): Ditto.
4786 (expand_end_catch_block): Ditto.
4787 * except.c (make_first_label): new function.
4788 (expand_start_all_catch): add a call to make_first_label() before
4789 using a label as a jump destination.
4790 (expand_end_all_catch): Ditto.
4791 (expand_leftover_cleanups): Ditto.
4792 (expand_end_catch_block): Ditto.
4793 (expand_builtin_throw): Ditto.
4794 (expand_throw): Ditto.
4795 * except.c: Add ARM processor support for exception handling.
4797 Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4799 (complete_array_type): Copy code from C frontend.
4801 * lex.c (real_yylex): Don't multiply the length of a wide string
4802 literal by WCHAR_BYTES.
4804 * decl.c (pushdecl): Check for redeclaration of wchar_t here.
4805 (duplicate_decls): Instead of here.
4806 (define_label): Complain about a label named wchar_t.
4807 (grokdeclarator): Complain about declarations of
4808 operator-function-ids as non-functions.
4810 * typeck.c (unary_complex_lvalue): Also wrap prefix -- and ++ in
4812 (build_unary_op): Wrap unary plus in a NON_LVALUE_EXPR.
4814 * lex.c (real_yylex): Don't skip whitespace when reading the next
4817 Wed Jan 11 16:32:49 1995 Mike Stump <mrs@cygnus.com>
4819 * except.c: Allow cc1plus to be built with native compiler on rs6000.
4820 (expand_start_all_catch): Add assemble_external calls for various
4822 (expand_leftover_cleanups): Ditto.
4823 (expand_start_catch_block): Ditto.
4825 (expand_builtin_throw): Ditto.
4827 Wed Jan 11 01:05:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4829 * decl.c (pushtag): Only look for a previous decl in the current
4830 binding level. Use explicit global scope in DECL_NESTED_TYPENAME.
4832 * gxx.gperf: Add __signature__ and __sigof__ keywords.
4834 * decl2.c (lang_decode_option): -ansi does not set flag_no_asm. It
4835 does set flag_no_gnu_keywords and flag_operator_names.
4837 * lex.c (init_lex): 'overload' is not a keyword unless -traditional.
4838 Unset extension keywords if -fno-gnu-keywords.
4839 Allow operator names ('bitand') if -foperator-names.
4840 Never unset 'asm'; -fno-asm only affects 'typeof'.
4842 * decl.c (lookup_name_real): The got_object special lookup only
4845 Tue Jan 10 18:07:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4847 * spew.c (yylex): Also use DECL_NESTED_TYPENAME if got_object is set.
4849 * parse.y (primary): Unset got_object after all rules that use the
4850 'object' nonterminal.
4851 (object): Set got_object.
4853 * lex.h: Declare got_object.
4855 * decl.c (lookup_name_real): Also lookup names in the context of an
4858 Tue Jan 10 14:30:30 1995 Mike Stump <mrs@cygnus.com>
4860 * typeck.c (get_member_function_from_ptrfunc): Use ptrdiff_type_node
4861 for things that have to be added to pointers, not size_type. Cures
4862 problems with pointer to members on Alphas.
4863 (build_binary_op_nodefault): Ditto.
4864 (get_delta_difference_: Ditto.
4865 (build_ptrmemfunc): Ditto.
4867 Tue Jan 10 01:49:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4869 * decl.c (pushtag): Stick the new decl in TYPE_NAME before pushing
4872 * typeck.c (build_component_ref): Don't build up a COMPONENT_REF
4873 when dealing with overloaded member functions; just act like
4875 (commonparms): Remove misleading comment.
4877 * decl.c (duplicate_decls): Complain about repeated default
4879 (redeclaration_error_message): Instead of here.
4880 (pushdecl): Complain about missing default arguments here.
4881 (grokparms): Instead of here.
4882 (lookup_name_current_level): Also match on DECL_ASSEMBLER_NAME.
4883 (grok_reference_init): Do not complain about missing initializer if
4886 * search.c (lookup_field): Don't return a TYPE_DECL if there is a
4887 function alternative and want_type is not set.
4889 Mon Jan 9 18:16:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4891 * decl.c (pushtag): Don't set TYPE_NAME to an identifier. Do push
4892 the decl when the type has no TYPE_NAME.
4893 (lookup_nested_type): Don't assume that type has TYPE_NAME set.
4894 (lookup_name_real): Call lookup_field with want_type =
4897 * search.c (lookup_field): Handle want_type properly in the presence
4898 of fields with the same name.
4900 * decl.c (set_nested_typename): Set nested name for file-scope types
4901 to include leading ::.
4902 (pushdecl): Set the nested typename if the decl doesn't have one,
4903 rather than if the type's canonical decl doesn't have one.
4905 Mon Jan 9 03:44:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4907 * typeck.c (convert_for_assignment): Complain about contravariance
4909 (comp_target_types): Instead of here.
4910 (build_unary_op): resolve_offset_ref before checking for a valid
4913 * spew.c (yylex): Decrement looking_for_typename after we see a
4916 * decl.c (pushdecl): Don't install an artificial TYPE_DECL in
4917 IDENTIFIER_LOCAL_VALUE if we already have a decl with that name.
4919 * typeck.c (convert_for_assignment): Converting pointers to bool
4920 does not need a cast.
4922 Sun Jan 8 18:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4924 * class.c (instantiate_type): Initialize nsubsts parm.
4926 * pt.c (do_function_instantiation): Ditto.
4928 Sat Jan 7 14:37:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4930 * pt.c (tsubst): Use TREE_STATIC instead of DECL_INLINE &&
4931 DECL_SAVED_INSNS to determine whether or not we've seen a definition
4933 (instantiate_template): Ditto.
4935 * call.c (convert_harshness): Allow const reference binding when
4936 called from the overloading code, but not when called from
4937 can_convert (since it isn't a conversion).
4938 (convert_harshness): Put back some disabled code.
4940 Fri Jan 6 14:10:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4942 * call.c (convert_harshness): There is no implicit conversion from
4943 void* to other pointer types (unless the parameter is (void*)0).
4944 (convert_harshness): Non-lvalues do not convert to reference types.
4946 * class.c (finish_struct_methods): Still set
4947 TYPE_HAS_{INT,REAL}_CONVERSION.
4949 * call.c (can_convert): Don't use aggregate initialization.
4951 * cp-tree.h: Declare lookup_conversions.
4953 Thu Jan 5 21:08:00 1995 Mike Stump <mrs@cygnus.com>
4955 * parse.y (simple_stmt): Fix duplicate case value error messages to
4958 Wed Jan 4 16:44:19 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4960 * cvt.c (build_type_conversion): Total rewrite to use
4961 convert_harshness instead of reproducing conversion logic here. Now
4964 * call.c (convert_harshness): Support conversions to bool.
4965 (can_convert): Checks whether a conversion is less harsh
4966 than USER_CODE, for build_type_conversion.
4968 * search.c (add_conversions): Function for passing to dfs_walk which
4969 adds all the type conversion operators in the current type to a list.
4970 (lookup_conversions): Calls dfs_walk with add_conversions and return
4972 (dfs_walk): Don't require a qfn.
4974 * cp-tree.h: Lose CLASSTYPE_CONVERSIONS hackery.
4975 (CLASSTYPE_FIRST_CONVERSION): Points to elt 1 of CLASSTYPE_METHOD_VEC.
4977 * class.c (finish_struct_bits): Lose CLASSTYPE_CONVERSIONS hackery.
4978 (grow_method): A separate function for building onto the growing
4980 (finish_struct_methods): Use it. Put all type conversion operators
4981 right after the constructors. Perhaps we should sort the methods
4984 Mon Jan 2 14:42:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4986 * call.c (build_method_call): Lose another misleading shortcut.
4988 Fri Dec 30 17:57:30 1994 Mike Stump <mrs@cygnus.com>
4990 * gc.c (build_bltn_desc): Handle bool as a built-in type.
4992 Fri Dec 30 14:20:21 1994 Mike Stump <mrs@cygnus.com>
4994 * tree.c (layout_vbasetypes): Ensure that we don't loose alignment
4995 on the complete type because of small virtual bases.
4997 Fri Dec 30 12:22:29 1994 Mike Stump <mrs@cygnus.com>
4999 * decl.c (n_incomplete): Bump n_incomplete up to int to match C
5001 (pushdecl): Also count decls pushed that are of a type being defined
5002 as incomplete things.
5003 * class.c (finish_struct): Move hack_incomplete_structures up to
5004 just after we set it as not being defined, so that the decls we
5005 build for RTTI don't count as incomplete.
5007 Thu Dec 29 18:20:57 1994 Mike Stump <mrs@cygnus.com>
5009 * pt.c (tsubst): Fix problem with defining constructors in templated
5010 classes with virtual bases.
5012 Wed Dec 28 08:31:00 1994 Mike Stump <mrs@cygnus.com>
5014 * parse.y (TYPEID): Strip top-level cv-qualifiers on typeid
5016 * gc.c (build_typeid): Ditto.
5018 Thu Dec 22 17:26:33 1994 Mike Stump <mrs@cygnus.com>
5020 * cvt.c (build_up_reference): Fix breakage introduced on Nov 29,
5021 don't assert on complex AGGR inits.
5023 Thu Dec 22 14:32:31 1994 Mike Stump <mrs@cygnus.com>
5025 * method.c (build_overload_value): Handle pointer to members as
5028 Thu Dec 22 13:09:07 1994 Mike Stump <mrs@cygnus.com>
5030 * typeck.c (unary_complex_lvalue): Don't call sorry if we know how
5031 to do take the address of a data member for a pointer to data
5034 Thu Dec 22 10:04:19 1994 Mike Stump <mrs@cygnus.com>
5036 * decl.c (grokdeclarator): Use the typedef name for linkage if the
5037 type doesn't otherwise have a name.
5039 * decl2.c (grokfield): Ditto.
5041 * class.c (finish_struct): Since we reuse the TYPE_DECL for the
5042 DECL_NAME of enums, structs and classes, we have to avoid trying to
5043 put it in the TYPE_FIELDS again.
5045 Wed Dec 21 11:07:05 1994 Mike Stump <mrs@cygnus.com>
5047 * decl2.c (check_classfn): Ignore this parameter on static functions
5048 when checking to see if we match.
5050 Tue Dec 20 17:47:02 1994 Mike Stump <mrs@cygnus.com>
5052 * typeck.c (unary_complex_lvalue): Handle address of non-left most
5053 pointers to members by calling get_delta_difference.
5055 Mon Dec 19 22:40:53 1994 Mike Stump <mrs@cygnus.com>
5057 * decl2.c (check_classfn): Don't use decls_match yet, as it modifies
5058 static functions to early.
5060 Thu Dec 19 22:37:48 1994 Mike Stump <mrs@cygnus.com>
5062 * method.c (make_thunk): Handle encoding of positive thunk offsets.
5064 Sat Dec 17 13:29:50 1994 Doug Evans <dje@canuck.cygnus.com>
5066 * Make-lang.in (.PHONY): Tell GNU make C++ and c++ are phony targets.
5068 Thu Dec 15 16:32:12 1994 Mike Stump <mrs@cygnus.com>
5070 * decl2.c (check_classfn): Use decls_match to check if this has
5071 already been declared, as the DECL_ASSEMBLER_NAME may have been
5072 changed via asm("new_name").
5073 * decl.c (decls_match): Make public.
5075 Thu Dec 15 15:17:55 1994 Mike Stump <mrs@cygnus.com>
5077 * *.[chy] (expand_aggr_init) Add fourth argument to handle
5078 distinction between = init and (init) style of initializations.
5079 * *.[chy] (finish_decl): Add fifth argument to to handle
5080 distinction between = init and (init) style of initializations.
5082 Tue Dec 13 19:16:05 1994 Mike Stump <mrs@cygnus.com>
5084 Fix some random `explicit' bugs.
5086 * cvt.c (convert_to_reference): Add third parameter to
5088 (convert_force): Ditto.
5089 * call.c (build_method_call): Ditto.
5090 * decl2.c (setup_vtbl_ptr): Ditto.
5091 * init.c (expand_virtual_init): Ditto.
5092 (build_member_call): Ditto.
5093 (build_delete): Ditto.
5094 (build_vbase_delete): Ditto.
5095 * typeck.c (build_component_addr): Ditto.
5096 (build_c_cast): Ditto.
5097 (build_modify_expr): Ditto.
5098 * cp-tree.h (CONV_NONCONVERTING): Ditto. Add so that we can
5099 distinguish the context in which the conversion appears. Add thrid
5100 argument to build_c_cast.
5101 * cvt.c (cp_convert): Pass whether or not we want to consider
5102 non-converting constructors down to build_method_call.
5103 * decl2.c (reparse_absdcl_as_casts): Add third argument to
5105 * gc.c (build_m_desc): Ditto.
5106 * init.c (build_new): Ditto.
5107 * parse.y (expr_no_commas): Ditto.
5109 * typeck.c (build_x_function_call): Ditto.
5110 (build_static_cast): Ditto.
5111 (build_reinterpret_cast): Ditto.
5112 (build_const_cast): Ditto.
5113 (build_c_cast): Ditto.
5114 (build_ptrmemfunc): Ditto.
5115 * typeck2.c (build_functional_cast): Ditto.
5116 * init.c (expand_aggr_init): Added LOOKUP_ONLYCONVERTING to
5117 expand_aggr_init_1 as inits are converted to the destination type.
5119 Tue Dec 13 16:18:57 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5121 * Make-lang.in (cc1plus): Depends on c-pragma.o.
5123 * Makefile.in (OBJ{DEP,}S): Add ../c-pragma.o.
5125 * lex.c (check_newline): If the #pragma is not recognized by g++,
5126 try machine-specific ones too.
5127 (handle_sysv_pragma): Copied from c-lex.c.
5129 Mon Dec 12 23:53:06 1994 Mike Stump <mrs@cygnus.com>
5131 * except.c (expand_throw): Fix Dec 6th change, build_new likes a
5134 Mon Dec 12 18:01:00 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5136 * typeck.c (build_binary_op): Lose checks on TYPE_PTRMEMFUNC_P with
5137 IS_AGGR_TYPE, since now they will not both be set on the same type.
5139 * pt.c (do_pending_expansions): Don't clear TREE_PUBLIC on
5140 instantiations controlled by -fexternal-templates.
5142 * decl.c (duplicate_decls): Don't complain about different values of
5143 __attribute__ ((const)) and ((noreturn)).
5145 Fri Dec 9 18:17:37 1994 Doug Evans <dje@cygnus.com>
5147 * Makefile.in (BISONFLAGS): Delete --yacc.
5148 (PARSE_H): Depend on $(PARSE_C), for parallel makes.
5149 (PARSE_C): Undo last patch.
5151 Fri Dec 2 10:44:36 1994 Mike Stump <mrs@cygnus.com>
5153 * Makefile.in (BISONFLAGS): Add --yacc so that output winds up in
5156 Thu Dec 8 17:39:46 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5158 * decl.c (finish_decl): Don't call obscure_complex_init for decls
5159 of indeterminate size.
5161 Wed Dec 7 16:49:22 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5163 * decl.c (obscure_complex_init): Function to tweak the decl to
5164 prevent expand_decl from tring to initialize it.
5165 (finish_decl): Use it rather than writing the same code in three
5168 * parse.y (bad_parm): Stop trying to support parms without types.
5170 Wed Dec 7 12:06:56 1994 Mike Stump <mrs@cygnus.com>
5172 * decl2.c (grokfield): Make asm specs on static member functions
5175 Tue Dec 6 15:43:20 1994 Mike Stump <mrs@cygnus.com>
5177 * except.c (expand_throw): Make a copy of the thrown object.
5179 Tue Dec 6 14:16:34 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5181 * parse.y: : has lower precedence than =.
5183 Tue Dec 6 12:46:17 1994 Mike Stump <mrs@cygnus.com>
5185 * decl.c (pushdecl): Use DECL_NAME of VAR_DECLs to avoid namespace
5187 (grokvardecl): Add namespace into variable name.
5189 Tue Dec 6 11:26:55 1994 Mike Stump <mrs@cygnus.com>
5191 * decl2.c (current_namespace_id): New routine to transform a simple
5192 name into a name in a namespace.
5193 * decl.c (grokdeclarator): Use it.
5194 * decl2.c (get_namespace_id): Find the name of the current
5196 (push_namespace, pop_namespace): Complete out missing
5199 Mon Dec 5 17:11:51 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5201 * class.c (finish_struct): Don't use LONG_LONG_TYPE_SIZE, as it may
5202 not be defined. Fix warning message for enums and restore warning
5205 * decl2.c (push_namespace): Dummy function.
5206 (pop_namespace): Ditto.
5207 (do_namespace_alias): Ditto.
5208 (do_using_decl): Ditto.
5209 (do_using_directive): Ditto.
5211 * parse.y: New token NSNAME for namespace names.
5212 (extdef): Add namespace, using definitions.
5213 (using_decl): New rule for using declarations.
5214 (any_id): New rule for identifiers with any degree of scoping.
5215 (identifier): Add NSNAME.
5216 (notype_identifier): Ditto.
5217 (component_decl): Add using_decl.
5218 (nested_name_specifier): Add NSNAME SCOPE.
5220 * typeck.c (convert_for_assignment): Handle conversions between
5223 * decl.c (duplicate_decls): Only propagate DECL_MAIN_VARIANT on
5226 Mon Dec 5 13:03:16 1994 Mike Stump <mrs@cygnus.com>
5228 * class.c (finish_struct): Give an error if one tries to declare a
5229 bit-field's size greater than a long long, as the backend will dump.
5230 It is not an error to declare an enum bit-field greater than its
5231 precision. Warn if an enum bit-field is too small to hold all
5234 Mon Dec 5 11:41:50 1994 Mike Stump <mrs@cygnus.com>
5236 * typeck.c (convert_for_assignment): Use cp_convert instead of
5237 convert so that we don't get static casts.
5239 Sun Dec 4 11:59:01 1994 Mike Stump <mrs@cygnus.com>
5241 * cvt.c (cp_convert): Don't complain about int->enum conversion if
5242 we are doing static casts.
5244 Fri Dec 2 18:32:41 1994 Mike Stump <mrs@cygnus.com>
5246 * error.c (dump_expr): Do something more intelligent with SAVE_EXPRs
5247 when dumping expressions in error messages.
5249 Fri Dec 2 17:04:27 1994 Mike Stump <mrs@cygnus.com>
5251 * gc.c (build_dynamic_cast): Change interface to libg++, ensure that
5252 the return type is the right type, and make references work.
5254 Fri Dec 2 16:36:43 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5256 * decl.c (poplevel): Don't be confused by function-scope
5257 declarations of non-nested functions.
5258 (duplicate_decls): Propagate DECL_MAIN_VARIANT.
5259 (pushdecl): Use duplicate_decls to copy info from old decl into new
5260 function-scope one rather than doing it here.
5262 * decl2.c (mark_inline_for_output): Deal with the DECL_MAIN_VARIANT
5263 of this decl, in case this is a function-scope declaration.
5265 * decl.c (finish_enum): Make sure that the type has the right
5266 precision when we call fixup_*_type.
5268 Tue Nov 29 19:12:07 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5270 * cvt.c (build_up_reference): Strip superfluous NOP_EXPRs; we do
5271 want to build up references to rvalues if possible.
5272 (cp_convert): Stick on a NOP_EXPR when converting to the same type.
5274 Tue Nov 29 11:28:59 1994 Mike Stump <mrs@cygnus.com>
5276 * parse.y (maybe_raises): Handle throw ().
5277 * parse.y (ansi_raise_identifier): grok type-ids in exception
5279 * tree.c (build_exception_variant): Use list compare to check if
5280 two exception specifications match.
5281 * decl.c (duplicate_decls, bad_specifiers): Enhance wording on error
5283 * call.c (build_method_call): Remove TREE_RAISES.
5284 * cvt.c (convert_to_aggr): Ditto.
5285 * typeck.c (build_function_call_real, convert_arguments): Ditto.
5286 * init.c (expand_aggr_init_1): Ditto.
5288 Tue Nov 29 09:50:39 1994 Mike Stump <mrs@cygnus.com>
5290 * except.c: Add support for m68k and mips exception handling
5293 Tue Nov 29 08:48:33 1994 Mike Stump <mrs@cygnus.com>
5295 * except.c (expand_end_all_catch): Throw into outer context, if we
5296 fall off end of catch handlers.
5298 Mon Nov 28 16:44:41 1994 Mike Stump <mrs@cygnus.com>
5300 * Makefile.in: Make is easier to decide where parse.[ch] will be
5303 Thu Nov 17 20:11:24 1994 Doug Evans <dje@cygnus.com>
5305 * cp/Make-lang.in (CXX_INSTALL_NAME) Use program_transform_name.
5306 (GXX_INSTALL_NAME) Likewise.
5307 (CXX_CROSS_NAME) Use program_transform_cross_name.
5308 (GXX_CROSS_NAME) Likewise.
5309 (c++.install-man): Use program_transform_name on g++.1.
5310 (c++.uninstall): Likewise.
5312 Mon Nov 28 13:53:03 1994 Mike Stump <mrs@cygnus.com>
5314 * parse.y (THROW): Fix precedence of throw expressions.
5316 Mon Nov 28 13:15:16 1994 Mike Stump <mrs@cygnus.com>
5318 * typeck.c (build_unary_op): Allow promotions from bool to int on
5321 Sun Nov 27 00:16:21 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5323 * method.c (build_overload_name): Use DECL_ASSEMBLER_NAME for
5324 classes when appropriate.
5325 (build_overload_nested_name): When dealing with a function context,
5326 use ASM_FORMAT_PRIVATE_NAME to tweak the name of the function to
5327 avoid conflicts between local classes of the same name.
5329 Wed Nov 23 17:59:42 1994 Mike Stump <mrs@cygnus.com>
5331 * gxx.gperf, parse.y, lex.h, hash.h, lex.c (init_lex), delc.c
5332 (duplicate_decls, grokdeclarator), cp-tree.h: Add support for
5334 * cvt.c (convert_to_reference, cp_convert, build_type_conversion_1,
5335 build_type_conversion): Use LOOKUP_ONLYCONVERTING in
5336 build_method_calls so that non-converting constructors are not used.
5337 * call.c (build_method_call): If we shouldn't use a non-converting
5338 constructor, then don't.
5340 Wed Nov 23 14:46:56 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5342 * call.c (build_method_call): Don't try to synthesize methods yet.
5344 Tue Nov 22 12:45:21 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5346 * pt.c (push_template_decls): Create CONST_DECLs for template
5347 constant parameters, not VAR_DECLs.
5349 Sat Nov 19 15:28:31 1994 Jim Wilson (wilson@chestnut.cygnus.com)
5351 * typeck.c (build_binary_op_nodefault): Can shorten shift only if
5352 shift count is less than size in bits of arg0.
5354 Thu Nov 17 15:30:50 1994 Mike Stump <mrs@cygnus.com>
5356 * gxx.gperf, hash.h, lex.c (init_lex, real_yylex), parse.y: Add new
5357 ANSI keywords and, and_eq, bitand, bitor, explicit, namespace, not,
5358 not_eq, or, or_eq, typename, using, xor, xor_eq to g++. Still need
5359 to add support for explicit, namespace, typename, and using, support
5360 for the rest is already in.
5362 Fri Nov 4 19:04:18 1994 Mike Stump <mrs@cygnus.com>
5364 * gc.c (get_bad_cast_node): New routine to support compile time
5366 * gc.c (build_dynamic_cast): Support throwing of bad_cast at compile
5369 Fri Nov 4 11:12:00 1994 Mike Stump <mrs@cygnus.com>
5371 * except.c: Add hppa support.
5373 Fri Nov 4 10:50:50 1994 Mike Stump <mrs@cygnus.com>
5375 * except.c: Add rs6000 support.
5377 Thu Nov 3 14:24:23 1994 Mike Stump <mrs@cygnus.com>
5379 * except.c (do_unwind): Add i[34]86 support.
5381 Thu Nov 3 00:10:46 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5383 * pt.c (do_pending_expansions): Unset TREE_PUBLIC on implicit
5386 Wed Nov 2 15:08:24 1994 Kung Hsu (kung@mexican.cygnus.com)
5388 * decl.c (finish_function): emit types used in method parameters
5391 Wed Nov 2 15:05:47 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5393 * pt.c (process_template_parm): Allow pointer to member function
5394 template parameter types.
5395 (uses_template_parms): Handle pointer to member function
5398 * g++.c (main): Cast first argument of bzero to (char *).
5399 Pass -lstdc++ instead of -lg++ unless we are invoked as 'g++'.
5401 Mon Oct 31 14:50:48 1994 Kung Hsu (kung@mexican.cygnus.com)
5403 * gc.c (build_dynamic_cast): rewrite to make it work.
5404 * class.c (finish_vtbls): build more vtables if flag_rtti is on.
5405 * class.c (modify_all_direct_vtables): ditto.
5406 * init.c (expand_direct_vtbls_init): expand more vtables if
5408 * decl.c (init_type_desc): add default return.
5410 Tue Oct 25 17:13:09 1994 Kung Hsu (kung@mexican.cygnus.com)
5412 * tree.c (debug_binfo): get rid of the initial size entry of
5414 * cp-tree.h: change flag_dossier to flag rtti, define type
5415 descriptor type nodes.
5416 * decl.c (init_type_desc): new function to initialize type
5417 descriptor type nodes.
5418 * decl.c (record_builtin_type): change flag_dossier to flag_rtti.
5419 * lex.c (init_lex): ditto.
5420 * decl.c : change variable flag_dossier to flag_rtti.
5421 * decl.c (duplicate_decls): get rid initial size entry of vtable.
5422 * decl.c (hack_incomplete_structures): take out assert 164.
5423 * search.c (get_abstract_virtuals_1): ditto.
5424 * search.c (dfs_init_vbase_pointers): change CLASSTYPE_DOSSIER to
5427 * class.c (prepare_fresh_vtable): for virtual bases, get right
5429 * class.c (add_virtual_function): change flag_dossier to
5431 * class.c (modify_one_vtable): modify the right rtti entry.
5432 * class.c (override_one_vtable): get rid of size entry.
5433 * class.c (finish_struct): change flag_dossier to flag_rtti, and
5434 build extra vtables, build type descriptors for polymorphic
5436 * gc.c (build_headof): make headof() works correctly with new
5438 * gc.c (build_typeid): make this function work with new rtti.
5439 * gc.c (get_typeid): make this function work with new rtti.
5440 * gc.c (build_bltn_desc): new function for new rtti.
5441 * gc.c (build_user_desc): ditto.
5442 * gc.c (build_class_desc): ditto.
5443 * gc.c (build_ptr_desc): ditto.
5444 * gc.c (build_attr_desc): ditto.
5445 * gc.c (build_func_desc): ditto.
5446 * gc.c (build_ptmf_desc): ditto.
5447 * gc.c (build_ptmd_desc): ditto.
5448 * gc.c (build_t_desc): ditto.
5449 * gc.c : comment out old build_t_desc, build_i_desc, build_m_desc.
5451 Tue Oct 25 13:37:41 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5453 * call.c (convert_harshness): Check for TREE_UNSIGNED differences
5454 after checking for integral conversions.
5456 Wed Nov 30 19:13:50 1994 Mike Stump <mrs@cygnus.com>
5458 * Version 2.6.3 released.
5460 Thu Nov 17 10:56:50 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5462 * typeck2.c (build_m_component_ref): Check the basetype of the
5463 member pointer against the main variant of the object type.
5465 Mon Nov 14 14:21:52 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5467 * cvt.c (convert_to_reference): Make sure that the original expr
5468 gets its type back when converting a reference.
5470 * method.c (build_overload_name): Clear numeric_outputed_need_bar here.
5471 (build_decl_overload): Instead of here.
5473 Tue Nov 8 17:11:24 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5475 * cvt.c (cp_convert): Don't build a TARGET_EXPR if we're not in a
5478 * typeck.c (convert_for_initialization): Handle initialization from
5481 Sun Nov 6 01:34:24 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5483 * pt.c (lookup_nested_type_by_name): Fix list-walking logic.
5484 (tsubst): When replacing a TEMPLATE_TYPE_PARM, propagate
5485 TYPE_READONLY and TYPE_VOLATILE from the argument.
5486 (unify): When unifying with a TEMPLATE_TYPE_PARM, remove cv-quals
5487 present in parm from arg.
5488 (type_unification): Strip REFERENCE_TYPE from the argument type.
5489 (unify): Don't strip REFERENCE_TYPE from the argument type.
5491 Sat Nov 5 22:42:15 1994 Greg McGary (gkm@magilla.cichlid.com)
5493 * pt.c (do_type_instantiation): Check to see if there's a
5494 IDENTIFIER_TEMPLATE on a class before calling
5495 instantiate_member_templates().
5497 Sat Nov 12 06:35:42 1994 Mike Stump <mrs@cygnus.com>
5499 * Version 2.6.2 released.
5501 Thu Nov 3 18:48:19 1994 Paul Eggert <eggert@twinsun.com>
5503 * Makefile.in (spew.o, lex.o, pt.o):
5504 Depend on $(srcdir)/parse.h, not parse.h.
5506 Tue Nov 1 19:19:41 1994 Mike Stump <mrs@cygnus.com>
5508 * Version 2.6.1 released.
5510 Sun Oct 23 13:19:55 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5512 * decl2.c: Declare flag_access_control.
5513 (struct lang_f_options): Add access-control.
5514 * expr.c (cplus_expand_expr, NEW_EXPR): Unset flag_access_control
5515 for the call to expand_aggr_init to copy the object out of the
5516 pcc_struct_return slot.
5517 * search.c (compute_access): if (!flag_access_control) return
5520 Fri Oct 21 00:32:54 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5522 * lex.c (cons_up_default_function): Don't try to defer method
5525 * decl.c (init_decl_processing): Use __pure_virtual for abort_fndecl
5526 instead of abort, since the OSF/1 dynamic linker doesn't like to see
5527 relocation entries for abort.
5529 * tree.c (array_type_nelts_total): Use sizetype, not
5531 (array_type_nelts_top): Ditto.
5533 Thu Oct 20 15:48:27 1994 Mike Stump <mrs@cygnus.com>
5535 * decl.c (grokdeclarator): Added handling for catch parameters
5537 * except.c (expand_start_catch_block): Use the new CATCHPARM context
5539 * except.c (expand_throw): Don't let convert_to_reference complain
5540 about what we are doing.
5542 Thu Oct 20 12:55:24 1994 Jim Wilson (wilson@cygnus.com)
5544 * method.c (emit_thunk): Call instantiate_virtual_regs.
5546 Wed Oct 19 14:15:33 1994 Mike Stump <mrs@cygnus.com>
5548 * except.c (expand_exception_blocks): Make sure throw code doesn't
5549 get put in function that won't be output.
5551 Mon Oct 17 18:03:15 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5553 * decl.c (init_decl_processing): Make alloca a builtin.
5555 Thu Oct 27 21:10:25 1994 Craig Burley (craig@burley)
5557 * g++.c (main): Only decrement "added" and set "library" to
5558 NULL when "library" != NULL (just like 940829 fix).
5560 Mon Oct 17 15:56:11 1994 Mike Stump <mrs@cygnus.com>
5562 * except.c (expand_start_catch_block): Make sure the false label
5563 gets onto the permanent obstack, as it is used for the exception
5566 Fri Oct 14 18:54:48 1994 Mike Stump <mrs@cygnus.com>
5568 * class.c (modify_one_vtable): Since the DECL_CONTEXT of fndecl can
5569 be set just below, use current_fndecl instead.
5571 Fri Oct 14 15:12:22 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5573 * init.c (expand_aggr_vbase_init_1): Don't call expand_aggr_init_1
5574 with LOOKUP_SPECULATIVELY.
5575 (expand_default_init): Abort if build_method_call returns NULL_TREE.
5577 * typeck.c (build_modify_expr): Don't just build a MODIFY_EXPR if
5578 the rhs is a TARGET_EXPR.
5580 * parse.y (left_curly): Anonymous types are not affected by #pragma
5581 interface/implementation.
5583 * method.c (synthesize_method): Don't call setup_vtbl_ptr for the
5584 default constructor if it isn't needed.
5586 * lex.c (cons_up_default_function): Do synthesize methods for
5587 anonymous types if necessary.
5589 Thu Oct 13 17:44:55 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5591 * method.c (build_decl_overload): Set numeric_outputed_need_bar to 0.
5593 Wed Oct 12 13:27:57 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5595 * typeck.c (build_modify_expr): Understand how to copy an aggregate.
5597 * init.c (expand_default_init): Ditto. Also remove some of the
5598 crufty code that assumes methods will not be synthesized properly.
5600 * lex.c (cons_up_default_function): If the containing type has no
5601 name, these functions should never need to be called, so just
5604 * lex.c (real_yylex): Use HOST_BITS_PER_WIDE_INT to determine the
5605 bitmask for lexing character constants.
5607 * call.c (build_method_call): Disable code that tries to do tricky
5608 stuff with a default parameter that is a constructor call, but
5609 actually does other tricky stuff that breaks things.
5611 Wed Oct 12 16:14:01 1994 Benoit Belley <belley@cae.ca>
5613 * decl.c (finish_enum): Disable code which forces enums to be signed,
5614 since this conflicts with their use as bitfields. type_promotes_to
5615 handles promotion of enums of underlying unsigned types to signed
5618 Wed Oct 12 13:24:03 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5620 * cvt.c (type_promotes_to): Also promote enums to long if
5623 * typeck.c (default_conversion): Don't expect type_promotes_to to
5624 return a main variant.
5626 Wed Oct 12 12:19:45 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5628 * call.c (build_scoped_method_call): Don't lose side effects in the
5629 object expression when calling a non-existent destructor.
5631 Fri Sep 2 19:05:21 1994 Rohan Lenard (rjl@iassf.easams.com.au)
5633 * call.c (build_scoped_method_call): Remove erroneous error message
5634 when destructor call is written as a scoped call.
5636 Tue Oct 11 23:48:31 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5638 * various: Cast pointer arguments to bzero and bcopy to char *.
5640 Tue Oct 11 19:34:32 1994 Mike Stump <mrs@cygnus.com>
5642 * class.c (get_derived_offset): Added a type parameter to limit how
5643 far up the CLASSTYPE_VFIELD_PARENT chain we search.
5644 * class.c (modify_one_vtable, fixup_vtable_deltas): When forming the
5645 offset to put into the vtable for the this parameter, make sure we
5646 don't offset from a parent of the DECL_CONTEXT of the function.
5648 Tue Oct 11 16:10:52 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5650 * pt.c (do_function_instantiation): Set DECL_EXTERNAL and
5651 TREE_STATIC when setting DECL_INTERFACE_KNOWN.
5652 (do_type_instantiation): Ditto.
5654 * lex.c (cons_up_default_function): Set DECL_INTERFACE_KNOWN,
5655 DECL_EXTERNAL and TREE_STATIC as appropriate.
5657 * decl2.c (finish_file): Also synthesize methods that don't have
5658 DECL_EXTERNAL set. Set interface_unknown before doing so.
5660 * decl.c (start_function): If DECL_INTERFACE_KNOWN is set on the
5661 function decl, don't muck with TREE_PUBLIC and DECL_EXTERNAL.
5663 Mon Oct 10 00:56:53 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5665 * lex.c (cons_up_default_function): Mark methods in a template class
5666 as template instances. Store the values of interface_unknown and
5667 interface_only for do_pending_inlines.
5668 (do_pending_inlines): Use them.
5670 * decl2.c (finish_file): If we haven't seen a definition of a
5671 function declared static, make the decl non-PUBLIC so compile_file
5674 Sun Oct 9 02:42:29 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5676 * method.c (do_build_copy_constructor): Handle anonymous unions.
5677 (do_build_assign_ref): Ditto.
5678 (largest_union_member): Move from lex.c.
5680 Sat Oct 8 14:59:43 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5682 Re-implement g++'s vague linkage independent of TREE_PUBLIC.
5683 * pt.c (instantiate_member_templates): Lose redundant
5684 -fexternal-templates handling.
5685 (tsubst): Set TREE_PUBLIC and DECL_EXTERNAL on new decls. Don't set
5686 TREE_STATIC or DECL_INTERFACE_KNOWN.
5687 (do_pending_expansions): Predicate on DECL_INTERFACE_KNOWN instead
5688 of DECL_EXTERNAL for explicit instantiations.
5689 (do_function_instantiation): Do the new thing.
5690 (do_type_instantiation): Ditto.
5691 (instantiate_template): Deal with member templates defined in a .cc
5692 file with -fexternal-templates.
5693 * except.c (expand_exception_blocks): Use DECL_LINKAGE_KNOWN to
5694 decide whether to stick builtin_throw here.
5695 * decl2.c (import_export_inline): Predicate on DECL_INTERFACE_KNOWN
5696 rather than TREE_PUBLIC. Generally fix rules.
5697 (finish_file): Use DECL_INITIAL to determine whether or not a method
5698 has been synthesized, rather than TREE_ASM_WRITTEN.
5699 * decl.c (warn_extern_redeclared_static): Use DECL_PUBLIC instead of
5702 (duplicate_decls): Ditto. Deal with DECL_DECLARED_STATIC and
5703 DECL_INTERFACE_KNOWN.
5704 (redeclaration_error_message): Fix checking for conflicting linkage.
5705 (define_function): Set DECL_INTERFACE_KNOWN.
5706 (grokfndecl): Function decls are PUBLIC until we are sure about
5707 their linkage. Set DECL_DECLARED_STATIC as needed.
5708 (start_function): Deal with linkage. Move pushdecl after linkage
5710 (finish_function): Don't set TREE_ASM_WRITTEN on discarded inlines.
5711 * cp-tree.h (lang_decl_flags): Add interface_known and
5713 (DECL_INTERFACE_KNOWN): New macro.
5714 (DECL_DECLARED_STATIC): New macro.
5715 (DECL_PUBLIC): New macro.
5717 Clean up bogus use of TREE_PUBLIC.
5718 * class.c (alter_access): Fix mistaken use of TREE_PUBLIC (it
5719 doesn't correspond to TREE_PROTECTED and TREE_PRIVATE).
5720 * init.c (do_friend): Don't arbitrarily set TREE_PUBLIC.
5722 Wed Oct 5 13:44:41 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5724 * call.c (build_overload_call_real): Don't immediately do
5725 array->pointer conversion.
5727 * pt.c (type_unification): If not passing to a reference, strip
5728 cv-quals. Also handle array->pointer conversion.
5730 Tue Oct 4 17:45:37 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5732 * decl.c (grokdeclarator): Don't warn about applying const to a
5733 const typedef or template type parameter.
5735 * decl2.c (finish_file): Also synthesize methods after walking the
5736 vtables. Ugly ugly ugly.
5738 Mon Oct 3 15:02:41 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5740 * various: Remove lingering remnants of old exception handling code.
5742 * decl2.c (finish_file): Synthesize methods before walking the
5743 vtables, so that the vtables get emitted as needed.
5745 * decl.c (shadow_tag): Remove obsolete code for pushing tags and
5746 dealing with exceptions.
5748 Mon Oct 3 13:05:27 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
5750 * Make-lang.in (g++-cross): Depend upon version.o and $(LIBDEPS).
5752 Mon Oct 3 02:59:28 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5754 * decl2.c (finish_file): Fix inline handling.
5756 Sun Oct 2 00:21:56 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5758 * decl.c (grokdeclarator): Handle redundant scope even better.
5759 ({push,pop}_cp_function_context): Take toplev parameter.
5761 * method.c (synthesize_method): Pass toplev parameter to
5762 {push,pop}_cp_function_context depending on decl_function_context
5765 * typeck.c (build_x_unary_op): Unary & on OFFSET_REFs is always the
5768 * method.c (synthesize_method): Don't be confused by __in_chrg
5771 * class.c (popclass): Set C_C_D like start_function does.
5773 * decl.c (grokdeclarator): Handle redundant scope better.
5775 * parse.y (expr_or_declarator): Add '(' expr_or_declarator ')' rule.
5776 (direct_notype_declarator): Ditto.
5777 (complex_direct_notype_declarator): Remove it here.
5779 Sat Oct 1 21:42:18 1994 Jason Merrill (jason@deneb.cygnus.com)
5781 * init.c (resolve_offset_ref): Fix types used in resolving .*
5784 Sat Oct 1 15:18:49 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5786 Beginnings of work to synthesize methods only when needed.
5787 * call.c (build_method_call): Synthesize methods as necessary
5788 (currently never necessary).
5789 * class.c (popclass): Don't try to set C_C_D here, as it'll end up
5790 on the wrong obstack.
5791 * decl.c (push_cp_function_context): Mostly copied from
5792 push_c_function_context.
5793 (pop_cp_function_context): Similarly.
5794 (finish_function): Reverse order of poplevel and pop_nested_class so
5795 that current_class_decl is restored properly.
5796 (start_function): Ditto.
5797 (finish_function): Add parameter 'nested'. Don't call
5798 permanent_allocation if (nested).
5799 * various: Pass extra parameter to finish_function.
5800 * decl2.c (finish_file): Reorganize end-of-file inline handling,
5801 synthesizing methods as necessary.
5802 * lex.c (cons_up_default_function): Call mark_inline_for_output.
5803 Only synthesize methods immediately if #pragma implementation
5804 (currently disabled).
5805 (do_pending_inlines): Call synthesize_method.
5806 * method.c (synthesize_method): New function; all method synthesis
5807 goes through here. Calls do_build_assign_ref and
5808 do_build_copy_constructor.
5809 (build_default_constructor): Remove.
5810 (build_dtor): Ditto.
5811 (build_assign_ref): Rename to do_build_assign_ref and remove stuff
5812 done by synthesize_method.
5813 (build_copy_constructor): Similarly.
5815 Thu Sep 29 16:58:52 1994 Mike Stump <mrs@cygnus.com>
5817 * typeck.c (c_expand_return): Use magic so the backend can fixup the
5818 assignment into the return register, so cleanups won't clobber it.
5820 Thu Sep 29 13:08:50 1994 Jason Merrill (jason@deneb.cygnus.com)
5822 * method.c (hack_identifier): Don't call assemble_external for
5825 * decl.c (finish_decl): Also end temporary allocation if the decl in
5826 question has a type of error_mark_node.
5828 Wed Sep 28 21:45:00 1994 Mike Stump <mrs@cygnus.com>
5830 * typeck.c (build_modify_expr): When optimizing ?: on lhs, make sure
5831 that if the ?: was a reference type, that the subparts will be also.
5833 Wed Sep 28 16:14:04 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
5835 * except.c (register_exception_table): Use Pmode, not PTRmode.
5837 Fri Sep 23 13:54:27 1994 Jason Merrill (jason@deneb.cygnus.com)
5839 * lex.c (do_pending_inlines): Do method synthesis after the
5840 pending_inlines have been reversed.
5842 Thu Sep 22 12:53:03 1994 Per Bothner (bothner@kalessin.cygnus.com)
5844 * decl2.c (finish_file): Fix Brendan's fix: Only call
5845 register_exception_table if there is a non-empty exception table.
5847 Thu Sep 22 12:03:46 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
5849 * decl2.c (finish_file): Only do register_exception_table if
5850 -fhandle-exceptions is being used.
5852 Wed Sep 21 19:01:51 1994 Per Bothner (bothner@kalessin.cygnus.com)
5854 * except.c (output_exception_table_entry): Simplify
5855 by using assemble_integer.
5856 (build_exception_table): Change to return a count.
5857 Cleanup to use standard macros, instead of hard-wired
5858 sparc asm format. Don't make __EXCEPTION_TABLE__ global.
5859 (register_exception_table): New function. Generate call to builtin.
5860 * decl2.c (finish_file): Call register_exception_table.
5861 * cp-tree.h (build_exception_table): Fix prototype.
5863 Wed Sep 21 13:20:42 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
5865 * tree.c (break_out_calls): Don't try to duplicate the DECL_INITIAL.
5867 * decl2.c (delete_sanity): Give an error at trying to delete a
5870 Wed Sep 21 11:47:10 1994 Jason Merrill (jason@deneb.cygnus.com)
5872 * lex.c (cons_up_default_function): Mark synthesized destructors
5875 * decl.c (duplicate_decls): Ignore redeclarations of wchar_t as
5876 something other than __wchar_t, complaining if -pedantic and not in
5879 Tue Sep 20 09:43:28 1994 Jason Merrill (jason@deneb.cygnus.com)
5881 * decl.c (xref_tag): Set up BINFO_INHERITANCE_CHAIN on base binfos
5884 * typeck.c (build_modify_expr): Require complete type after checking
5885 for error_mark_node.
5887 * call.c (build_method_call): Print parmtypes when complaining of
5890 * typeck.c (build_modify_expr): Handle assignment to array from
5893 * decl.c (lookup_name_real): Deal with got_scope == error_mark_node.
5895 * call.c (build_method_call): Don't bother with the exact match.
5897 Mon Sep 19 00:51:39 1994 Jason Merrill (jason@deneb.cygnus.com)
5899 * init.c (expand_aggr_init): If we munge the type of the variable,
5900 also munge the type of the initializer.
5902 * decl.c (grokdeclarator): Use <= when comparing to RID_LAST_MODIFIER.
5903 (init_decl_processing): Push artificial declaration of wchar_t so
5904 people don't have to declare it before they can use it.
5906 * error.c (cp_line_of): return lineno in lieu of 0.
5908 * typeck.c (convert_for_assignment): Handle conversion of pmfs to
5910 (build_component_ref): Fold the COMPONENT_REF in case it can be
5913 * typeck2.c (store_init_value): Don't pedwarn about non-constant
5914 bracketed initializers for automatic variables.
5916 Sun Sep 18 10:12:12 1994 Jason Merrill (jason@deneb.cygnus.com)
5918 * error.c (dump_decl): Don't say `typedef enum foo foo'.
5920 * decl.c (start_decl): Don't set TREE_PUBLIC on template decls just
5921 because they're affected by #pragma i/i. We'll deal with that when
5922 they get instantiated.
5924 * typeck.c (build_unary_op): Clean up cruft in ADDR_EXPR case.
5926 * class.c (instantiate_type): Set TREE_CONSTANT on instantiated
5927 ADDR_EXPRs if appropriate.
5929 * decl.c (build_ptrmemfunc_type): Unset IS_AGGR_TYPE on pmf types.
5931 * typeck.c (build_ptrmemfunc): Handle &overloaded_method as an
5932 initializer properly.
5933 * typeck2.c (digest_init): Ditto.
5935 * tree.c (cp_build_type_variant): Like c_build_type_variant, except
5936 it uses build_cplus_array_type.
5937 * *.c: Use cp_build_type_variant instead of c_build_type_variant.
5939 * pt.c (do_type_instantiation): Don't try to instantiate nested
5942 Tue Sep 13 10:56:58 1994 Jason Merrill (jason@deneb.cygnus.com)
5944 * cvt.c (build_up_reference): Handle preincrement and predecrement
5947 Tue Sep 13 09:51:59 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
5949 * decl.c (finish_decl): Only lay out the rtl for DECL if it is, in
5952 Mon Sep 12 14:40:30 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
5954 * decl.c (finish_decl): Lay out the rtl for DECL before doing
5955 grok_reference_init, in case it's static.
5957 Mon Sep 12 12:45:38 1994 Jason Merrill (jason@deneb.cygnus.com)
5959 * class.c (finish_struct): Don't synthesize constructors if the
5960 class has a field with the same name as the class. Don't die on
5961 classes with no constructors or destructors. Don't die if the head
5962 and tail of the class are in different files.
5964 * decl.c (grokdeclarator): Don't treat a function pointer field
5965 with the same name as the class as a constructor.
5967 Fri Sep 9 13:17:00 1994 Jason Merrill (jason@deneb.cygnus.com)
5969 * typeck.c (build_c_cast): Pull constant values out of their
5972 * decl.c (duplicate_decls): Only propagate DECL_CHAIN in
5973 FUNCTION_DECLs and TEMPLATE_DECLs.
5975 Thu Sep 8 10:07:48 1994 Jason Merrill (jason@deneb.cygnus.com)
5977 * decl.c (duplicate_decls): Propagate DECL_CHAIN in all DECLs that
5980 * pt.c (unify): REALs and INTEGERs only unify with their own genus.
5981 (instantiate_member_templates): Don't muck with DECL_EXTERNAL and
5982 TREE_PUBLIC unless -fexternal-templates.
5984 Wed Sep 7 13:17:10 1994 Jason Merrill (jason@deneb.cygnus.com)
5986 * pt.c (do_type_instantiation): Call instantiate_member_templates.
5987 Deal with specializations.
5988 (tsubst): Don't stick the mangled name in DECL_NAME for function
5989 instantiations. Don't push them, either.
5991 * decl2.c (grokfield): Move code for generating the
5992 DECL_ASSEMBLER_NAME for static members from here.
5993 * method.c (build_static_name): To here.
5994 * decl.c (grokvardecl): Call build_static_name.
5995 (duplicate_decls): Keep old DECL_ASSEMBLER_NAME.
5997 Mon Sep 5 12:49:18 1994 Jason Merrill (jason@deneb.cygnus.com)
5999 * call.c (build_method_call): if -Wsynth, warn when selecting
6000 synthesized op= over user-supplied one cfront would select.
6001 * decl2.c (lang_decode_option): Handle -Wsynth.
6003 Fri Sep 2 15:11:59 1994 Jason Merrill (jason@deneb.cygnus.com)
6005 * decl.c (finish_enum): Overhaul to fix several bugs.
6006 (start_enum): Disable useless code.
6008 Thu Sep 1 16:04:54 1994 Jason Merrill (jason@deneb.cygnus.com)
6010 * typeck.c (c_expand_return): Warn about returning a reference to a
6012 (convert_arguments): Increment argument counter when using default
6015 Wed Aug 31 14:29:22 1994 Jason Merrill (jason@deneb.cygnus.com)
6017 * decl.c (finish_decl): If the type of decl is error_mark_node,
6018 don't bother trying to do anything.
6020 * typeck.c (convert_for_initialization): If the rhs contains a
6021 constructor call, pretend the lhs type needs to be constructed.
6023 * init.c (expand_default_init): If we stick the object inside the
6024 initializer, mark the initializer used.
6026 Tue Aug 30 13:50:18 1994 Jason Merrill (jason@deneb.cygnus.com)
6028 * method.c (build_assign_ref): return *this;
6029 (build_assign_ref): Fix base assignment order.
6030 (build_copy_constructor): Fix member init order.
6032 Mon Aug 29 13:54:39 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
6034 * g++.c (main): Remember to clear out SAW_SPECLANG after we see
6037 Sat Aug 27 09:36:03 1994 Jason Merrill (jason@deneb.cygnus.com)
6039 * method.c (build_copy_constructor): Also copy virtual bases.
6041 Fri Aug 26 17:05:15 1994 Jason Merrill (jason@deneb.cygnus.com)
6043 * lex.c (do_pending_inlines): Clear out pending_inlines before doing
6044 any synthesis. Also first set deja_vu on all pending_inlines.
6046 * method.c (build_assign_ref): Use build_member_call to invoke base
6047 operator=, rather than build_modify_expr. And use
6048 build_reference_type instead of TYPE_REFERENCE_TO.
6049 (build_copy_constructor): Use TYPE_NESTED_NAME to identify the
6052 * decl2.c (grokfield): Don't complain about undefined local class
6055 * class.c (finish_struct): Don't try to synthesize methods here.
6056 * lex.c (do_pending_inlines): Instead, synthesize them here.
6057 (init_lex): Initialize synth_obstack.
6058 (cons_up_default_function): Stick synthesis request on
6061 Fri Aug 26 12:24:14 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
6063 * call.c (build_method_call) [PCC_STATIC_STRUCT_RETURN]: Also
6064 accept an RTL_EXPR in what we're about to use for the instance,
6065 since anything which would end up with pcc_struct_return set
6066 inside cplus_expand_expr.
6068 * cp-tree.h (cons_up_default_function): Note change of prototype.
6070 Thu Aug 25 23:05:30 1994 Gerald Baumgartner (gb@cs.purdue.edu)
6072 * class.c (finish_struct): Undid change from Aug 21 testing
6073 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
6074 * parse.y (left_curly): Ditto, undid change from Aug 21.
6075 * decl.c (xref_tag): Undid change from Aug 21, set
6076 CLASSTYPE_INTERFACE correctly, and added comments.
6078 Thu Aug 25 00:36:31 1994 Jason Merrill (jason@deneb.cygnus.com)
6080 Rework approach to synthesized methods; don't go through the parser
6082 * class.c (finish_struct): Use new synthesis approach.
6083 * lex.c (cons_up_default_function): Now just creates declaration,
6085 (largest_union_member): #if 0 out.
6086 (default_assign_ref_body): Ditto.
6087 (default_copy_constructor_body): Ditto.
6088 * method.c (build_default_constructor): New function to synthesize X().
6089 (build_copy_constructor): Synthesize X(X&).
6090 (build_assign_ref): Synthesize X::operator=(X&).
6091 (build_dtor): Synthesize ~X().
6093 * error.c (cp_line_of): If we're dealing with an artificial
6094 TYPE_DECL, look at the type instead.
6096 Wed Aug 24 11:11:50 1994 Jason Merrill (jason@deneb.cygnus.com)
6098 * init.c (sort_member_init): Check warn_reorder.
6099 * decl2.c (lang_decode_option): Handle -W{no-,}reorder.
6101 * cp-tree.h (CLASSTYPE_SOURCE_LINE): New macro.
6102 * error.c (cp_line_of): Use CLASSTYPE_SOURCE_LINE for aggregates.
6103 * class.c (finish_struct): Set CLASSTYPE_SOURCE_LINE.
6105 Tue Aug 23 09:28:35 1994 Mike Stump <mrs@cygnus.com>
6107 * error.c (dump_decl): Improve wording, so that error messages
6108 dont't read template<, class foo>...
6110 Mon Aug 22 15:30:51 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
6112 * parse.y (label_colon): Also match a TYPENAME as a label name,
6113 since they may have declared a class by that name but have also
6114 tried to have a local label under the same name.
6116 * pt.c (coerce_template_parms): Call cp_error, not cp_error_at,
6117 for the message so they know at what point it was instantiated.
6119 Sun Aug 21 23:07:35 1994 Gerald Baumgartner (gb@cs.purdue.edu)
6121 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
6122 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures up to left_curly time.
6123 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
6124 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures down to left_curly time.
6125 * parse.y (left_curly): New final resting place for setting
6126 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING for signatures.
6128 * class.c (finish_struct): Don't test for function/field name
6129 conflicts in signatures, since all the fields are compiler-constructed.
6131 Fri Aug 19 14:04:47 1994 Kung Hsu (kung@mexican.cygnus.com)
6133 * method.c (build_overload_nested_name): in qualified name
6134 mangling, the template with value instantiation will have numeric
6135 at end and may mixed with the name length of next nested level.
6136 Add a '_' in between.
6137 * method.c (build_overload_name): ditto.
6138 * method.c (build_overload_identifier): ditto.
6140 Thu Aug 18 16:24:43 1994 Mike Stump <mrs@cygnus.com>
6142 * error.c (dump_decl): Handle NULL args.
6144 Thu Sep 29 16:15:36 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
6146 * g++.c: Rework last change so it's done like collect.c (and
6149 Wed Sep 14 10:17:27 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
6151 * g++.c: Include <sys/errno.h> in case `errno' is a macro
6152 as permitted by ANSI C.
6154 Thu Aug 18 12:48:09 1994 Mike Stump <mrs@cygnus.com>
6156 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
6157 CLASSTYPE_VTABLE_NEEDS_WRITING up to left_curly time.
6158 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
6159 CLASSTYPE_VTABLE_NEEDS_WRITING down to left_curly time.
6160 * parse.y (left_curly): New final resting place for setting
6161 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
6163 Thu Aug 11 11:32:42 1994 H.J. Lu (hjl@nynexst.com)
6165 * g++.c (main): Only decrement "added" and set "library" to
6166 NULL when "library" != NULL.
6168 Sat Aug 13 00:14:52 1994 Jason Merrill (jason@deneb.cygnus.com)
6170 * decl.c (grokdeclarator): Don't set TREE_PUBLIC on a function decl
6171 just because its class has a known interface.
6172 (decls_match): Deal with new format of template parms.
6174 * lex.c (cons_up_default_function): Don't play with TREE_PUBLIC and
6177 Fri Aug 12 01:55:15 1994 Jason Merrill (jason@deneb.cygnus.com)
6179 * decl.c (pushtag): SET_DECL_ARTIFICIAL on gratuitous typedefs.
6180 (xref_defn_tag): Ditto.
6181 (pushdecl): Only allow artificial typedefs to be shadowed.
6183 * init.c (emit_base_init): Pass the right binfos to
6186 * class.c (delete_duplicate_fields_1): Make it work right.
6187 (finish_struct): Catch function/field name conflict.
6189 * decl2.c (check_classfn): Pass the function to cp_error, not just
6192 * init.c (sort_member_init): Warn when order of member initializers
6193 does not match order of member declarations.
6194 (emit_base_init): Call expand_aggr_init_1 with LOOKUP_PROTECT.
6196 * error.c (dump_expr): Handle lists of functions.
6198 * decl.c (start_function): #pragma interface only affects functions
6199 that would otherwise be static.
6200 (finish_decl): Don't warn about an unused variable if it has both
6201 constructor and destructor, since the 'resource allocation is
6202 initialization' idiom is relatively common.
6204 * typeck.c (comp_target_types): Don't handle TEMPLATE_TYPE_PARMs.
6205 (comp_target_parms): Ditto.
6206 (compparms): Never consider default parms.
6207 (common_base_type): Don't choose a virtual baseclass if there is a
6208 more derived class in common.
6209 (build_conditional_expr): If pedantic, pedwarn about conversion to
6210 common base in conditional expr.
6212 * class.c (instantiate_type): Handle template instantiation better.
6214 * typeck.c (convert_arguments): Don't try to get tricky and convert
6215 to int directly when PROMOTE_PROTOTYPES is set, as it breaks
6216 user-defined conversions.
6218 * lex.c (check_for_missing_semicolon): Also give error at end of
6221 * call.c (build_method_call): Don't promote arrays to pointers here.
6223 * typeck.c (convert_arguments): Don't require the actual parameter
6224 to be of a complete type if the formal parameter is a reference.
6226 Thu Aug 11 15:21:40 1994 Jason Merrill (jason@deneb.cygnus.com)
6228 * decl.c (grokdeclarator): Soften 'static' on member function error
6231 * init.c (build_new): Don't automatically save rval.
6232 (build_offset_ref): Do field lookup with proper basetype_path.
6234 Thu Aug 11 12:46:54 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
6236 * errfn.c (cp_silent): Declare to mark when we should avoid
6237 emitting warnings and errors.
6238 (cp_error): Check it.
6239 (cp_warning): Likewise.
6240 (cp_pedwarn): Likewise.
6241 (cp_compiler_error): Likewise.
6242 (cp_error_at): Likewise.
6243 (cp_warning_at): Likewise.
6244 (cp_pedwarn_at): Likewise.
6245 * call.c (compute_conversion_costs): Set CP_SILENT when we start
6246 out, and make sure we turn it off before we leave.
6248 Thu Aug 11 00:02:54 1994 Jason Merrill (jason@deneb.cygnus.com)
6250 * decl2.c (grok_array_decl): Try computing *(A+B) if neither
6251 argument is obviously an array.
6253 Wed Aug 10 15:32:04 1994 Jason Merrill (jason@deneb.cygnus.com)
6255 * typeck.c (c_expand_start_case): Do cleanups here.
6257 * parse.y (xcond): Do bool conversion here, too.
6258 (simple_stmt, SWITCH case): Don't do cleanups here.
6260 * decl.c (duplicate_decls): Don't treat builtins that have been
6261 explicitly declared specially.
6263 Tue Aug 9 01:16:09 1994 Jason Merrill (jason@deneb.cygnus.com)
6265 * tree.c (make_deep_copy): Support copying pointer, reference,
6266 function, array, offset and method types.
6268 * decl.c (init_decl_processing): Mark exit and abort as
6269 BUILT_IN_NONANSI so that duplicate_decls is kinder about
6271 (duplicate_decls): Don't give two errors for redeclaring a C
6272 function with the same parms but a different return type.
6274 * parse.y (paren_cond_or_null): Do cleanup and bool conversion here.
6275 (condition): Instead of here.
6276 (simple_stmt, SWITCH case): Also do cleanup here.
6278 * decl2.c (finish_anon_union): Only break out FIELD_DECLs.
6280 * call.c (build_method_call): Don't throw away the side effects of
6281 the object in a call to a non-existent constructor.
6282 * parse.y (primary): Ditto.
6284 * method.c (build_decl_overload): Oop.
6286 * decl2.c (lang_decode_option): Deal with flag_no_nonansi_builtin,
6287 warn about uselessness of specifying -fansi-overloading.
6289 * method.c (build_decl_overload): Treat any non-member new with one
6290 parameter as __builtin_new.
6292 * decl.c (init_decl_processing): Setup built-in meanings of exit,
6295 Mon Aug 8 15:03:30 1994 Jason Merrill (jason@deneb.cygnus.com)
6297 * error.c (dump_readonly_or_volatile): Put a space between const and
6298 volatile if both apply.
6300 * init.c (perform_member_init): Clean up after this initialization.
6301 (emit_base_init): Clean up after each base init, not after all have
6303 (expand_aggr_vbase_init_1): Clean up after this init.
6305 Sun Aug 7 14:55:05 1994 Jason Merrill (jason@deneb.cygnus.com)
6307 * call.c (build_method_call): Deal with destroying references.
6309 * parse.y (condition): Do bool_truthvalue_conversion here.
6310 (paren_expr_or_null): And here.
6311 (simple_if): Not here.
6312 (simple_stmt): Or here.
6314 Sat Aug 6 22:29:45 1994 Jason Merrill (jason@deneb.cygnus.com)
6316 * parse.y (paren_expr_or_null): Wrap the expression in a
6320 Sat Aug 6 19:46:37 1994 Rohan Lenard (rjl@easams.com.au)
6322 * call.c (build_scoped_method_call): Fix error message when
6323 destructor call refers to a nonexistent type.
6325 Sat Apr 16 22:43:30 1993 Gerald Baumgartner (gb@cs.purdue.edu)
6327 * lex.h (rid): Deleted RID_RAISES, it's never used.
6328 Moved RID_PUBLIC, RID_PRIVATE, RID_PROTECTED, RID_EXCEPTION,
6329 RID_TEMPLATE and RID_SIGNATURE to the end of the enumeration,
6330 they don't need to be touched in `grokdeclarator.'
6331 (RID_LAST_MODIFIER): Defined macro to be RID_MUTABLE.
6333 * decl.c (grokdeclarator): Use RID_LAST_MODIFIER instead of
6334 RID_MAX as loop limit for finding declaration specifiers.
6336 Sat Apr 3 21:59:07 1993 Gerald Baumgartner (gb@cs.purdue.edu)
6338 * lex.c (debug_yytranslate): Moved to parse.y since it needs to
6339 access `yytname,' which is static in parse.c.
6341 Fri Apr 2 23:36:57 1993 Gerald Baumgarnter (gb@cs.purdue.edu)
6343 * cp-tree.h (GNU_xref_ref): Fixed typo in extern declaration, it
6344 was `GNU_xref_def' instead of `GNU_xref_ref.'
6346 Fri Aug 5 14:20:16 1994 Jason Merrill (jason@deneb.cygnus.com)
6348 * pt.c (do_function_instantiation): Don't set TREE_PUBLIC and
6349 DECL_EXTERNAL on 'extern' instantiations; wait until EOF to do that.
6350 (do_type_instantiation): Ditto.
6352 * decl2.c (import_export_inline): Decides at EOF what an inline's
6354 (finish_file): Call it.
6356 * decl.c (start_function): Don't rely on the settings of TREE_PUBLIC
6357 and DECL_EXTERNAL from do_*_instantiation. Only set
6358 DECL_DEFER_OUTPUT on inlines whose linkage might actually change.
6359 (finish_function): Use DECL_DEFER_OUTPUT to decide which inlines to
6360 mark for later consideration, rather than DECL_FUNCTION_MEMBER_P.
6362 Fri Aug 5 01:12:20 1994 Mike Stump <mrs@cygnus.com>
6364 * class.c (get_class_offset_1, get_class_offset): New routine to
6365 find the offset of the class where a virtual function is defined,
6366 from the complete type.
6367 * class.c (modify_one_vtable, fixup_vtable_deltas): Use
6368 get_class_offset instead of virtual_offset as get_class_offset will
6369 always provide the right answer.
6370 * tree.c (virtual_offset): Remove. It only ever worked some of the
6373 Tue Aug 2 12:44:21 1994 Jason Merrill (jason@deneb.cygnus.com)
6375 * call.c (build_method_call): Put back unary_complex_lvalue call
6376 that I thought was redundant.
6378 * typeck.c (c_expand_return): Fix a case I missed before.
6380 Sun Jul 31 17:54:02 1994 Jason Merrill (jason@deneb.cygnus.com)
6382 * pt.c (unify): Strip cv-quals from template type arguments (when
6383 'const T*' is matched to 'const char*', that does not mean that T is
6386 Fri Jul 29 01:03:06 1994 Jason Merrill (jason@deneb.cygnus.com)
6388 * pt.c (do_type_instantiation): Instantiate nested TAGS, not
6389 typedefs. Third time's the charm?
6391 * parse.y (template_parm): Support default template parms.
6392 * pt.c (process_template_parm): Ditto.
6393 (end_template_parm_list): Ditto.
6394 (coerce_template_parms): Ditto.
6395 (mangle_class_name_for_template): Ditto.
6396 (push_template_decls): Ditto.
6398 * method.c (build_overload_identifier): Ditto.
6399 * error.c (dump_decl): Ditto.
6401 Wed Jul 27 17:47:00 1994 Jason Merrill (jason@deneb.cygnus.com)
6403 * pt.c (do_type_instantiation): Only instantiate nested *classes*.
6405 Tue Jul 26 13:22:40 1994 Jason Merrill (jason@deneb.cygnus.com)
6407 * search.c (note_debug_info_needed): Also emit debugging information
6408 for the types of fields.
6410 Mon Jul 25 00:34:44 1994 Jason Merrill (jason@deneb.cygnus.com)
6412 * pt.c (lookup_template_class): Pass 'template' to
6413 coerce_template_parms instead of 'in_decl', since it's a more
6416 * typeck.c (c_expand_return): Make sure any cleanups for the return
6418 (build_c_cast): Use CONVERT_EXPR for conversion to void.
6420 * pt.c (do_type_instantiation): Also instantiate nested types.
6422 * typeck.c (convert_for_assignment): Don't die when comparing
6423 pointers with different levels of indirection.
6425 * decl.c (grokdeclarator): The sub-call to grokdeclarator for
6426 class-local typedefs sets DECL_ARGUMENTS, so we need to clear it
6429 * decl2.c (finish_anon_union): Don't die if the union has no
6432 * decl.c (grokdeclarator): Undo changes to declspecs when we're done
6433 so that 'typedef int foo, bar;' will work.
6435 * decl2.c (finish_file): Don't call expand_aggr_init for
6438 Mon Jul 25 00:03:10 1994 Teemu Torma (tot@trema.fi)
6440 * decl.c (finish_function): We can't inline constructors and
6441 destructors under some conditions with -fpic, but don't unset
6444 Mon Jul 25 00:03:10 1994 Jason Merrill (jason@deneb.cygnus.com)
6446 * typeck.c (build_object_ref): Make sure 'datum' is a valid object.
6448 Sun Jul 24 14:19:31 1994 Jason Merrill (jason@deneb.cygnus.com)
6450 * class.c (finish_struct): Don't set DECL_FIELD_BITPOS on
6452 (finish_struct_methods): Use copy_assignment_arg_p.
6454 * cvt.c (cp_convert): If expr is an OFFSET_REF, resolve it instead
6457 * typeck.c (build_binary_op_nodefault): Don't set result_type if we
6458 don't know how to compare the operands.
6460 * decl.c (grokdeclarator): Avoid seg fault when someone uses '__op'
6461 as a declarator-id in their program. Like the Linux headers do.
6464 * tree.c (lvalue_p): Treat calls to functions returning objects by
6465 value as lvalues again.
6467 * typeck.c (build_component_addr): Use convert_force to convert the
6468 pointer in case the component type is also a private base class.
6470 * search.c (get_matching_virtual): Fix bogus warning of overloaded
6473 * pt.c (overload_template_name): Set DECL_ARTIFICIAL on the created
6474 TYPE_DECL to fix bogus shadowing warnings.
6476 Fri Jul 22 01:15:32 1994 Jason Merrill (jason@deneb.cygnus.com)
6478 * init.c (expand_aggr_init_1): const and volatile mismatches do not
6479 prevent a TARGET_EXPR from initializing an object directly.
6481 Tue Jul 19 17:55:37 1994 Jason Merrill (jason@deneb.cygnus.com)
6483 * cvt.c (build_up_reference): Allow building up references to
6484 `this', don't warn about making references to artificial variables
6487 * tree.c (lvalue_p): `this' is not an lvalue.
6489 * call.c (build_method_call): Accept using a typedef name (or
6490 template type parameter) for explicit destructor calls.
6492 Thu Jul 14 09:42:23 1994 Mike Stump <mrs@cygnus.com>
6494 * Version 2.6.0 released.
6496 Wed Jul 13 03:57:54 1994 Jason Merrill (jason@deneb.cygnus.com)
6498 * method.c (hack_identifier): Put back old code so lists of
6499 non-functions will be handled properly.
6501 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): #if 0 out; this macro is now
6502 defined in the language-independent tree.h.
6504 * tree.c (count_functions): Avoid bogus warning when compiling this
6507 Mon Jul 11 18:37:20 1994 Jason Merrill (jason@deneb.cygnus.com)
6509 * decl.c (grok_reference_init): Always save the initializer of a
6512 Fri Jul 8 17:41:46 1994 Mike Stump <mrs@cygnus.com>
6514 * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside
6515 CLEANUP_POINT_EXPRs so that the stack slots can be reused.
6518 Fri Jul 8 12:59:38 1994 Jason Merrill (jason@deneb.cygnus.com)
6520 * method.c (hack_identifier): Fix for new overloading.
6522 * typeck.c (build_binary_op_nodefault): Don't mess with division by
6525 Fri Jul 8 13:20:28 1994 Gerald Baumgartner (gb@cs.purdue.edu)
6527 * decl2.c (finish_file): Only call walk_sigtables, if
6528 flag_handle_signatures is turned on, don't waste time otherwise.
6530 Fri Jul 8 02:27:41 1994 Jason Merrill (jason@deneb.cygnus.com)
6532 * decl.c (push_overloaded_decl): Don't create overloads of one when
6533 shadowing a class type.
6534 * typeck.c (build_x_function_call): Complain about overloads of one.
6536 * decl.c (grokdeclarator): Don't try to treat a char* as a tree.
6537 (grokdeclarator): Fix setting of TREE_STATIC.
6538 (start_decl): Clear DECL_IN_AGGR_P after calling duplicate_decls.
6540 Thu Jul 7 22:20:46 1994 Gerald Baumgartner (gb@andros.cygnus.com)
6542 * cp-tree.h (walk_sigtables): Created extern declaration.
6543 * decl2.c (walk_sigtables): Created function, patterned after
6544 walk_vtables, even though we only need it to write out sigtables.
6545 (finish_sigtable_vardecl): Created function.
6546 (finish_vtable_vardecl): Changed 0 to NULL_PTR.
6547 (finish_file): Call walk_sigtables.
6549 * sig.c (build_signature_table_constructor): Mark class member
6550 function pointed to from signature table entry as addressable.
6552 Thu Jul 7 13:39:37 1994 Jason Merrill (jason@deneb.cygnus.com)
6554 * decl.c (start_decl): Check new decl of static member variable
6555 against the declaration in the class here.
6556 (grokvardecl): Instead of here.
6558 * class.c (prepare_fresh_vtable): Call import_export_vtable if not
6560 (build_vtable): Ditto.
6562 * decl2.c (import_export_vtable): Move logic for deciding the
6563 interface of a template class from here.
6564 (import_export_template): To here.
6565 (finish_vtable_vardecl): Call import_export_template before
6566 import_export_vtable.
6568 Wed Jul 6 20:25:48 1994 Mike Stump <mrs@cygnus.com>
6570 * except.c (init_exception_processing): Setup interim_eh_hook to
6571 call lang_interim_eh.
6572 * except.c (do_unwind): Propagate throw object value across
6574 * except.c (saved_throw_value): Used to hold the value of the object
6575 being thrown. It is always a reference to the real value.
6576 * except.c (expand_start_catch_block): Add handling for the
6577 value of the exception object.
6578 * except.c (expand_start_catch_block): Add handler for the handler,
6579 so that throws inside the handler go to the outer block.
6580 * except.c (expand_end_catch_block): Ditto.
6581 * parse.y (handler_args): Use parm instead, as the other doesn't yet
6582 handle references correctly.
6584 Wed Jul 6 17:55:32 1994 Per Bothner (bothner@kalessin.cygnus.com)
6586 * decl2.c (mark_vtable_entries): If -ftable-thunks, set the
6587 vtable entry properly to abort.
6589 Tue Jul 5 14:07:54 1994 Jason Merrill (jason@deneb.cygnus.com)
6591 * typeck.c (build_binary_op_nodefault): Downgrade division by zero
6594 * call.c (build_overload_call_real): Handle fnname being a list of
6596 * typeck.c (build_x_function_call): Pass list of functions to
6597 build_overload_call, not just the name.
6598 * tree.c (count_functions): Complain when called for invalid
6601 * decl.c (grokdeclarator): Fix settings of TREE_STATIC, TREE_PUBLIC
6602 and DECL_EXTERNAL on static members and initialized const members.
6603 * decl2.c (grokfield): Reflect this change.
6605 Fri Jul 1 09:35:51 1994 Jason Merrill (jason@deneb.cygnus.com)
6607 * parse.y (init): ANSI C++ does not forbid { }.
6609 Thu Jun 30 00:35:22 1994 Jason Merrill (jason@deneb.cygnus.com)
6611 * decl2.c (lang_decode_option): Set warn_nonvdtor along with -Wall.
6612 warn_nonvdtor defaults to off.
6614 * class.c (instantiate_type): Use comptypes rather than relying on
6615 types to satisfy ==.
6617 * decl.c (start_function): Set DECL_DEFER_OUTPUT on all inlines that
6620 * tree.c (build_cplus_new): Never build WITH_CLEANUP_EXPRs.
6622 * decl.c (grok_reference_init): Deal with ADDR_EXPRs of TARGET_EXPRs.
6624 * cvt.c (cp_convert): Pass 0 to with_cleanup_p arg of
6627 Wed Jun 29 22:31:09 1994 Jason Merrill (jason@deneb.cygnus.com)
6629 * decl2.c (finish_file): Maybe consider static inlines multiple
6630 times, in case they reference each other.
6632 Tue Jun 28 11:58:38 1994 Gerald Baumgartner (gb@cs.purdue.edu)
6634 * class.c (finish_struct): Don't `cons_up_default_function's
6636 (finish_struct): Handle an empty method_vec correctly.
6638 * decl.c (grokdeclarator): Don't warn about a signature being
6639 empty in a signature pointer declaration if we only saw a
6640 forward declaration of the signature. Changed `warning's into
6643 * sig.c (build_sigtable): Don't die if a null signature table
6644 constructor is returned.
6645 (build_signature_pointer_constructor): If the signature table
6646 constructor is null, the _sptr field is set to a null pointer
6647 and cast to the appropriate type. Make copies of all null
6648 pointers so that the type null_pointer_node doesn't get changed.
6649 (build_signature_table_constructor): Added comments.
6651 * sig.c (build_signature_pointer_constructor): Complain if we
6652 try to assign to/initialize a signature pointer/reference of
6653 an undefined signature.
6655 Mon Jun 27 14:05:16 1994 Gerald Baumgartner (gb@cs.purdue.edu)
6657 * typeck2.c (store_init_value): Don't be pedantic about
6658 non-constant initializers of signature tables/pointers/references.
6660 Fri Jun 24 16:49:41 1994 Gerald Baumgartner (gb@cs.purdue.edu)
6662 * decl.c (grokdeclarator): If we are grokking an opaque typedef
6663 in a signature, don't complain about it begin static.
6665 Wed Jun 29 16:44:45 1994 Mike Stump <mrs@cygnus.com>
6667 Fixes a problem of the this pointer being wrong in virtual calls to
6668 methods that are not overridden in more derived classes.
6670 * class.c (fixup_vtable_delta): New routine. It will fixup the
6671 delta entries in vtables, wheever they need updating.
6672 * class.c (finish_struct): Call the new routine for all virtual
6673 bases, as they can have different offsets, than those used in base
6674 classes that we derive our vtable from.
6676 Tue Jun 28 23:49:28 1994 Jason Merrill (jason@deneb.cygnus.com)
6678 * typeck.c (build_binary_op): Use the types before default
6679 conversions in the error message.
6681 * *.c: Use c_build_type_variant instead of build_type_variant where
6682 the type might be an array.
6684 * call.c (build_method_call): Call build_type_variant and
6685 build_reference_type in the right order.
6686 * decl.c (record_builtin_type): Ditto.
6688 Wed Jun 29 16:58:53 1994 Jason Merrill (jason@deneb.cygnus.com)
6690 * call.c (build_method_call): Call build_type_variant and
6691 build_reference_type in the right order.
6692 * decl.c (record_builtin_type): Ditto.
6694 Tue Jun 28 23:49:28 1994 Jason Merrill (jason@deneb.cygnus.com)
6696 * typeck.c (build_binary_op): Use the types before default
6697 conversions in the error message.
6699 * *.c: Use c_build_type_variant instead of build_type_variant where
6700 the type might be an array.
6702 Sat Jun 25 11:50:54 1994 Jason Merrill (jason@deneb.cygnus.com)
6704 * cvt.c (convert_to_reference): Try UDC's before doing the
6705 reinterpret_cast thang, though.
6707 Fri Jun 24 01:24:01 1994 Jason Merrill (jason@deneb.cygnus.com)
6709 * typeck.c (c_expand_return): Don't USE the return value location
6710 after we've expanded the jump.
6712 * decl2.c (finish_file): Make sure DECL_SAVED_INSNS is not 0 before
6713 trying to write out an inline.
6715 * cvt.c (build_up_reference): Also do address adjustment when the
6716 target type uses MI.
6717 (convert_to_reference): Try UDCs only after built-in conversions.
6718 (build_type_conversion_1): Don't play games with the argument to the
6720 (build_type_conversion): #if 0 out code for binding to reference.
6722 Thu Jun 23 00:22:28 1994 Jason Merrill (jason@deneb.cygnus.com)
6724 * decl2.c (finish_file): Use TREE_SYMBOL_REFERENCED to decide
6725 whether to emit inlines.
6727 * decl.c (grokdeclarator): Set explicit_int for decls that just
6728 specify, say, 'long'.
6730 * init.c (do_friend): Do overload C functions (or call pushdecl,
6733 Wed Jun 22 13:40:49 1994 Jason Merrill (jason@deneb.cygnus.com)
6735 * cvt.c (build_up_reference): Don't call readonly_error.
6736 (convert_to_reference): Propagate const and volatile from expr to
6739 * tree.c (lvalue_p): Random CALL_EXPRs are not lvalues.
6741 * cvt.c (build_up_reference): Break out WITH_CLEANUP_EXPR when
6742 creating a temporary.
6743 (convert_to_reference): Lose excessive and incorrect trickiness.
6744 (cp_convert): Call build_cplus_new with with_cleanup_p set.
6746 * typeck2.c (build_functional_cast): Ditto.
6748 Tue Jun 21 17:38:38 1994 Jason Merrill (jason@deneb.cygnus.com)
6750 * decl.c (grokdeclarator): signed, unsigned, long and short all
6753 * decl.c (grokdeclarator): Allow "this is a type" syntax.
6754 (grok_reference_init): Simplify and fix.
6756 Sun Jun 19 17:08:48 1994 Jason Merrill (jason@deneb.cygnus.com)
6758 * decl.c (grokdeclarator): pedwarn about a typedef that specifies no
6761 Sat Jun 18 04:16:50 1994 Jason Merrill (jason@deneb.cygnus.com)
6763 * decl.c (start_function): Move TREE_PUBLIC and DECL_EXTERNAL
6764 tinkering to after call to pushdecl.
6766 Fri Jun 17 14:48:28 1994 Jason Merrill (jason@deneb.cygnus.com)
6768 * call.c (build_method_call): Handle destructors for non-aggregate
6771 Thu Jun 16 16:48:05 1994 Jason Merrill (jason@deneb.cygnus.com)
6773 * call.c (build_method_call): Make sure that the name given for the
6774 destructor matches the constructor_name of the instance.
6776 * pt.c (do_function_instantiation): A non-extern instantiation
6777 overrides a later extern one.
6778 (do_type_instantiation): Ditto.
6780 Wed Jun 15 19:34:54 1994 Jason Merrill (jason@deneb.cygnus.com)
6782 * init.c (expand_aggr_init): Use TYPE_MAIN_VARIANT to get the
6783 unqualified array type.
6785 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Tests whether NODE is a
6786 CONSTRUCTOR with no elements.
6788 * decl.c (various): Lose empty_init_node.
6789 (finish_decl): Use EMPTY_CONSTRUCTOR_P, do the empty CONSTRUCTOR
6790 thing depending on the value of DECL_COMMON instead of
6791 flag_conserve_space, do the empty CONSTRUCTOR thing for types that
6792 don't have constructors, don't treat a real empty CONSTRUCTOR
6795 * typeck2.c (process_init_constructor): Don't treat empty_init_node
6798 Wed Jun 15 19:05:25 1994 Mike Stump <mrs@cygnus.com>
6800 * class.c (override_one_vtable): Don't forget to merge in an old
6801 overrider when we wanted to reuse a vtable, but couldn't.
6803 Wed Jun 15 15:03:16 1994 Jason Merrill (jason@deneb.cygnus.com)
6805 * decl.c (start_decl): Put statics in common again.
6807 * decl.c (grokdeclarator): Return NULL_TREE for an error rather than
6808 setting the type to error_mark_node.
6810 * typeck.c (build_modify_expr): Build up a COMPOUND_EXPR for enum
6811 bitfield assignments.
6813 Tue Jun 14 12:23:38 1994 Jason Merrill (jason@deneb.cygnus.com)
6815 * decl.c (grok_op_properties): Const objects can be passed by value.
6817 Mon Jun 13 03:10:59 1994 Jason Merrill (jason@deneb.cygnus.com)
6819 * decl2.c (import_export_vtable): Force implicit instantiations to
6820 be interface_only when -fno-implicit-templates.
6822 * decl.c (duplicate_decls): Redeclaring a class template name is an
6825 * pt.c (end_template_decl): Call GNU_xref_decl for class templates.
6826 * xref.c (GNU_xref_decl): Support templates.
6828 Sat Jun 11 17:09:05 1994 Jason Merrill (jason@deneb.cygnus.com)
6830 * decl.c (grok_op_properties): Split out checking for whether this
6831 function should suppress the default assignment operator.
6832 * decl2.c (grok_function_init): Ditto.
6833 (copy_assignment_arg_p): New function do do just that.
6834 Now considers virtual assignment operators that take a base as an
6835 argument to count as copy assignment operators.
6837 * search.c (dfs_debug_mark): Lose checks for DWARF_DEBUG and
6838 TREE_ASM_WRITTEN, as they are redundant.
6840 * pt.c (end_template_decl): Don't try to set DECL_CLASS_CONTEXT on a
6841 decl that has no LANG_SPECIFIC part.
6842 (do_type_instantiation): Force the debugging information for this
6845 * decl.c (start_decl): Clear up uses of various types of templates
6846 (say sorry for static data members, rather than "invalid template").
6847 (expand_static_init): Fix initialization of static data members of
6850 Fri Jun 10 00:41:19 1994 Jason Merrill (jason@deneb.cygnus.com)
6852 * decl.c (grokdeclarator): Set DECL_CONTEXT on static data members.
6854 * g++.c (main): Use -xc++-cpp-output for .i files.
6856 * pt.c (tsubst): Give meaningful error about declaring template for
6857 a copy constructor which was not declared in the class template.
6858 (do_type_instantiation): Explicit instantiation before the class
6859 template is an error.
6860 (instantiate_template): Don't die if tsubst returns error_mark_node.
6862 Thu Jun 9 19:04:59 1994 Jason Merrill (jason@deneb.cygnus.com)
6864 Don't synthesize the copy assignment operator if the one in a base
6865 class is pure virtual.
6866 * cp-tree.h (TYPE_HAS_ABSTRACT_ASSIGN_REF): New macro to indicate
6867 whether the type has a pure virtual copy assignment operator.
6868 * class.c (finish_base_struct): Don't generate the copy assignment
6869 operator if a base class has a pure virtual one.
6870 * decl.c (grok_op_properties): Add disabled code to set
6871 TYPE_HAS_ABSTRACT_ASSIGN_REF with comment pointing to where it is
6873 * decl2.c (grok_function_init): Set TYPE_HAS_ABSTRACT_ASSIGN_REF.
6875 * decl2.c (import_export_vtable): Always treat template
6876 instantiations as if write_virtuals >= 2, and treat implicit
6877 instantiations as external if -fno-implicit-templates.
6878 (finish_file): Output all pending inlines if
6879 flag_keep_inline_functions.
6881 Wed Jun 8 20:48:02 1994 Mike Stump <mrs@cygnus.com>
6883 * tree.c (layout_vbasetypes): Align virtual base classes inside
6884 complete objects, so that we don't core dump on machines such as
6885 SPARCs when we access members that require larger than normal
6886 alignments, such as a double. Also, we bump up the total alignment
6887 on the complete type, as necessary.
6889 Wed Jun 8 16:18:14 1994 Jason Merrill (jason@deneb.cygnus.com)
6891 * gxxint.texi (Free Store): New section with code for examining
6893 (Limitations of g++): Remove operator delete entry, since it is no
6894 longer accurate. Fix access control entry.
6896 * typeck.c (build_unary_op): Pedwarn about taking the address of or
6897 incrementing a cast to non-reference type.
6898 (build_modify_expr): Use convert instead of convert_force again.
6900 * search.c (get_base_distance): Use IS_AGGR_TYPE_CODE to check for
6901 class type, not == RECORD_TYPE.
6903 * decl.c (grokdeclarator): Cope with grokfndecl returning NULL_TREE.
6905 * typeck2.c (report_case_error): #if 0 out.
6906 * lex.c (real_yylex): Lose RANGE.
6909 Tue Jun 7 18:17:35 1994 Jason Merrill (jason@deneb.cygnus.com)
6911 * parse.y (simple_stmt, case ranges): Use ELLIPSIS instead of RANGE.
6913 Mon Jun 6 19:39:57 1994 Jason Merrill (jason@deneb.cygnus.com)
6915 * typeck.c (build_c_cast): Don't shortcut conversions to the same
6916 type. Don't replace consts with their values here, since that's now
6919 * cvt.c (cp_convert): When converting to bool, take
6920 integer_zero_node to false_node and all other INTEGER_CSTs to
6922 (build_type_conversion): Don't complain about multiple conversions
6923 to float if we're not really converting.
6925 Fri Jun 3 02:10:56 1994 Jason Merrill (jason@deneb.cygnus.com)
6927 Implement 'extern template class A<int>;' syntax for suppressing
6928 specific implicit instantiations.
6929 * cp-tree.h: Update prototypes for do_*_instantiation.
6930 * pt.c (do_pending_expansions): Don't compile 'extern' explicit
6932 (do_function_instantiation): Set DECL_EXTERNAL on 'extern' explicit
6934 (do_type_instantiation): Ditto.
6935 * parse.y (explicit_instantiation): Support 'extern template class
6937 * decl.c (start_function): Don't modify the settings of TREE_PUBLIC
6938 and DECL_EXTERNAL on explicit instantiations.
6940 * cvt.c (cp_convert): Replace constants with their values before
6942 (cp_convert): Consistently use 'e' instead of 'expr'.
6944 Thu Jun 2 03:53:30 1994 Jason Merrill (jason@deneb.cygnus.com)
6946 * typeck2.c (build_x_arrow): Resolve OFFSET_REFs first.
6948 Wed Jun 1 18:57:35 1994 Jason Merrill (jason@deneb.cygnus.com)
6950 * typeck2.c (digest_init): Handle initializing a pmf with an
6952 * typeck.c (build_ptrmemfunc): Handle overloaded methods.
6954 * decl.c (pushtag): Use build_decl to make TYPE_DECLs.
6955 (xref_defn_tag): Ditto.
6956 * pt.c (process_template_parm): Ditto.
6957 (lookup_template_class): Ditto.
6958 (push_template_decls): Ditto.
6959 (instantiate_class_template): Ditto.
6960 (create_nested_upt): Ditto.
6961 * class.c (finish_struct): Don't try to set DECL_CLASS_CONTEXT on
6964 * typeck.c (convert_arguments): Make sure type is not NULL before
6965 checking its TREE_CODE.
6967 Wed Jun 1 17:40:39 1994 Mike Stump <mrs@cygnus.com>
6969 * class.c (get_derived_offset): New routine.
6970 * class.c (finish_base_struct): Make sure we set BINFO_VTABLE and
6971 BINFO_VIRTUALS when we choose a new base class to inherit from.
6972 * class.c (modify_one_vtable): Use get_derived_offset to get the
6973 offset to the most base class subobject that we derived this binfo
6975 * class.c (finish_struct): Move code to calculate the
6976 DECL_FIELD_BITPOS of the vfield up, as we need might need it for
6977 new calls to get_derived_offset in modify_one_vtable.
6979 Wed Jun 1 16:50:59 1994 Jason Merrill (jason@deneb.cygnus.com)
6981 * init.c (build_member_call): Use build_pointer_type instead of
6984 Wed Jun 1 11:11:15 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
6986 * decl.c (grokdeclarator): Make sure we have a DNAME set before we
6987 try to use it in an error.
6989 Wed Jun 1 09:48:49 1994 Mike Stump <mrs@cygnus.com>
6991 * typeck.c (convert_arguments, convert_for_initialization): Don't
6992 strip NOP_EXPRs, when we are converting to a reference.
6994 Wed Jun 1 01:11:38 1994 Jason Merrill (jason@deneb.cygnus.com)
6996 * typeck.c (build_modify_expr): Don't dereference references when
6999 * decl2.c (grokfield): Don't check for grokdeclarator returning
7000 error_mark_node any more.
7002 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
7003 (start_method): Return void_type_node instead of error_mark_node.
7005 * typeck.c (build_modify_expr): Resolve offset refs earlier.
7007 Tue May 31 16:06:58 1994 Jason Merrill (jason@deneb.cygnus.com)
7009 * call.c (build_method_call): Resolve OFFSET_REFs in the object.
7011 * typeck.c (build_modify_expr): Dereference references before trying
7014 * call.c (build_method_call): Don't confuse type conversion
7015 operators with constructors.
7016 * typeck2.c (build_functional_cast): Just call build_c_cast if there
7017 was only one parameter.
7018 * method.c (build_typename_overload): Don't set
7019 IDENTIFIER_GLOBAL_VALUE on these identifiers.
7020 * decl.c (grok_op_properties): Warn about defining a type conversion
7021 operator that converts to a base class (or reference to it).
7022 * cvt.c (cp_convert): Don't try to use a type conversion operator
7023 when converting to a base class.
7024 (build_type_conversion_1): Don't call constructor_name_full on an
7026 * cp-tree.h (DERIVED_FROM_P): Should be self-explanatory.
7028 * decl.c (start_decl): Don't complain that error_mark_node is an
7030 (finish_decl): Check for type == error_mark_node.
7032 Mon May 30 23:38:55 1994 Jason Merrill (jason@deneb.cygnus.com)
7034 * decl.c (start_function): Set DECL_DEFER_OUTPUT on implicit
7035 instantiations and inline members.
7037 * spew.c (yylex): Set looking_for_template if the next token is a '<'.
7039 * lex.h: Declare looking_for_template.
7041 * decl.c (lookup_name_real): Use looking_for_template to arbitrate
7042 between type and template interpretations of an identifier.
7044 Sat May 28 04:07:40 1994 Jason Merrill (jason@deneb.cygnus.com)
7046 * pt.c (instantiate_template): Zero out p if we found a
7049 * decl.c (grokdeclarator): Elucidate warning.
7050 (grokdeclarator): If pedantic AND -ansi, complain about long long.
7052 Make explicit instantiation work reasonably. It is now appropriate
7053 to deprecate the use of -fexternal-templates.
7054 * pt.c (instantiate_template): Set DECL_TEMPLATE_SPECIALIZATION or
7055 DECL_IMPLICIT_INSTANTIATION on fndecl as appropriate.
7056 (end_template_instantiation): Reflect changes in USE_TEMPLATE
7058 (do_pending_expansions): if (!flag_implicit_templates) DECIDE(0);
7059 (do_function_instantiation): Don't set EXPLICIT_INST if
7060 flag_external_templates is set. Do set TREE_PUBLIC and DECL_EXTERN
7061 appropriately otherwise.
7062 (do_type_instantiation): Set interface info for class. Set
7063 TREE_PUBLIC and DECL_EXTERN for methods. Do none of this if
7064 flag_external_templates is set.
7065 * parse.y: Reflect changes in USE_TEMPLATE semantics.
7066 * decl2.c: New flag flag_implicit_templates determines whether or
7067 not implicit instantiations get emitted. This flag currently
7068 defaults to true, and must be true for -fexternal-templates to work.
7069 (finish_file): Consider flag_implement_inlines when
7070 setting DECL_EXTERNAL. Consider flag_implicit_templates when
7071 deciding whether or not to emit a static copy.
7072 * decl.c (start_function): Set TREE_PUBLIC and DECL_EXTERNAL
7073 properly for template instantiations.
7074 (start_method): Set DECL_IMPLICIT_INSTANTIATION on methods of a
7076 * cp-tree.h (CLASSTYPE_USE_TEMPLATE): Change semantics.
7077 (DECL_USE_TEMPLATE): Parallel macro for FUNCTION and VAR_DECLs.
7078 (various others): Accessor macros for the above.
7080 Fri May 27 13:57:40 1994 Jason Merrill (jason@deneb.cygnus.com)
7082 * typeck.c (build_binary_op_nodefault): Division by constant zero is
7085 Fri May 27 13:50:15 1994 Mike Stump <mrs@cygnus.com>
7087 * class.c (override_one_vtable): Don't modify things we don't own.
7089 Fri May 27 01:42:58 1994 Jason Merrill (jason@deneb.cygnus.com)
7091 * decl.c (finish_decl): Don't postpone processing the initializer of
7092 a decl with DECL_EXTERNAL set, and do call rest_of_compilation for a
7093 PUBLIC const at toplevel.
7094 (grokdeclarator): pedwarn about initializing non-const or
7095 non-integral statics in the class body.
7097 * decl.c (pushtag): Don't try to set DECL_CLASS_CONTEXT on a
7100 * call.c (convert_harshness): Dereference reference on rhs before
7101 proceeding, properly grok passing const things to non-const
7104 * typeck.c (build_unary_op): Soften error about taking the address
7105 of main() to a pedwarn.
7107 * lex.c (default_copy_constructor_body): Unambiguously specify base
7108 classes (i.e. A((const class ::A&)_ctor_arg) ).
7109 (default_assign_ref_body): Ditto.
7111 Thu May 26 13:13:55 1994 Gerald Baumgartner (gb@mexican.cygnus.com)
7113 * decl2.c (grokfield): Don't complain about local signature
7114 method declaration without definition.
7116 * call.c (convert_harshness): If `type' is a signature pointer
7117 and `parmtype' is a pointer to a signature, just return 0. We
7118 don't really convert in this case; it's a result of making the
7119 `this' parameter of a signature method a signature pointer.
7121 * call.c (build_method_call): Distinguish calling the default copy
7122 constructor of a signature pointer/reference from a signature
7123 member function call.
7125 Thu May 26 12:56:25 1994 Jason Merrill (jason@deneb.cygnus.com)
7127 * decl2.c (grokfield): Don't set TREE_PUBLIC on member function
7130 * decl.c (duplicate_decls): A previous function declaration as
7131 static overrides a subsequent non-static definition.
7132 (grokdeclarator): Don't set TREE_PUBLIC on inline method
7135 Wed May 25 14:36:38 1994 Jason Merrill (jason@deneb.cygnus.com)
7137 * decl.c (grokdeclarator): Handle initialization of static const
7139 (finish_decl): Ditto.
7141 * decl2.c (grokfield): Allow initialization of static const members
7144 * decl2.c (grokfield): Deal with grokdeclarator returning
7147 * decl.c (grok_ctor_properties): Return 0 for A(A) constructor.
7148 (grokfndecl): Check the return value of grok_ctor_properties.
7149 (start_method): Ditto.
7151 * parse.y (absdcl): Expand type_quals inline.
7153 Tue May 24 19:10:32 1994 Jason Merrill (jason@deneb.cygnus.com)
7155 * decl.c (pushtag): Use IS_AGGR_TYPE rather than checking for a
7158 Tue May 24 18:09:16 1994 Per Bothner (bothner@kalessin.cygnus.com)
7160 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
7161 always use "__vt_%s".
7162 * decl2.c (finish_vtable_vardecl): Don't consider abstract virtuals
7163 when looking for a "sentinal" method (to decide on emitting vtables).
7164 * decl2.c (finish_file): Scan all decls for thunks that need
7166 * decl2.c (finish_vtable_vardecl): Don't bother calling emit_thunk.
7167 * method.c (make_thunk): Use a more meaningful label. If there
7168 exists a matching top-level THUNK_DECL re-use it; otherwise
7169 create a new THUNK_DECL (and declare it).
7170 * method.c (emit_thunk): Make thunk external/public depending
7171 on the underlying method.
7173 Tue May 24 00:22:04 1994 Jason Merrill (jason@deneb.cygnus.com)
7175 * pt.c (tsubst): Use lookup_name_nonclass to find guiding decls, not
7178 * call.c (build_overload_call_real): Don't immediately pick a
7179 function which matches perfectly.
7181 * decl.c (grokdeclarator): Use c_build_type_variant for arrays.
7182 (grokdeclarator): Warn about, and throw away, cv-quals attached to a
7183 reference (like 'int &const j').
7185 * typeck.c (convert_arguments): Don't mess with i for methods.
7186 * call.c (build_method_call): Pass the function decl to
7189 * typeck.c (comp_ptr_ttypes_real): New function. Implements the
7190 checking for which multi-level pointer conversions are allowed.
7191 (comp_target_types): Call it.
7192 (convert_for_assignment): Check const parity on the ultimate target
7193 type, too. And make those warnings pedwarns.
7195 Mon May 23 14:11:24 1994 Jason Merrill (jason@deneb.cygnus.com)
7197 * error.c (dump_char): Use TARGET_* for character constants.
7199 Mon May 23 13:03:03 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
7201 * tree.c (debug_no_list_hash): Make static.
7203 * decl.c (decls_match): Say the types don't match if newdecl ends up
7204 with a null type, after we've checked if olddecl does.
7205 (pushdecl): Check if the decls themselves match before looking for
7206 an extern redeclared as static, to avoid inappropriate and incorrect
7209 Fri May 20 14:04:34 1994 Jason Merrill (jason@deneb.cygnus.com)
7211 * decl.c (grokdeclarator): Make warning about duplicate short, etc.
7214 * typeck.c (build_c_cast): Casting to function or method type is an
7217 * class.c (finish_struct): Make warning for anonymous class with no
7218 instances a pedwarn.
7220 * Makefile.in (stamp-parse): Expect a s/r conflict.
7222 * typeck.c (build_modify_expr): pedwarn about using a non-lvalue
7225 Thu May 19 12:08:48 1994 Jason Merrill (jason@deneb.cygnus.com)
7227 * cvt.c (type_promotes_to): Make sure bool promotes to int rather
7228 than unsigned on platforms where sizeof(char)==sizeof(int).
7230 Wed May 18 14:27:06 1994 Jason Merrill (jason@deneb.cygnus.com)
7232 * typeck.c (build_c_cast): Tack on a NOP_EXPR when casting to
7234 (build_modify_expr): Don't strip NOP_EXPRs, and don't get tricky
7235 and treat them as lvalues.
7237 * decl.c (shadow_tag): Do complain about forward declarations of
7238 enums and empty declarations.
7239 * parse.y: Don't complain about forward declarations of enums and
7242 * typeck.c (convert_for_assignment): Complain about changing
7243 the signedness of a pointer's target type.
7245 * parse.y (stmt): Move duplicated code for checking case values from
7247 * decl2.c (check_cp_case_value): To here. And add a call to
7248 constant_expression_warning.
7250 * typeck.c (convert_for_assignment): Don't complain about assigning
7251 a negative value to bool.
7253 * decl.c (init_decl_processing): Make bool unsigned.
7255 * class.c (finish_struct): Allow bool bitfields.
7257 Wed May 18 12:35:27 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7259 * Make-lang.in (c++.install-man): Get g++.1 from $(srcdir)/cp.
7261 Wed May 18 03:28:35 1994 Jason Merrill (jason@deneb.cygnus.com)
7263 * cvt.c (build_type_conversion): Lose special handling of
7266 * search.c (dfs_pushdecls): Improve shadowing warning.
7268 Tue May 17 13:34:46 1994 Jason Merrill (jason@deneb.cygnus.com)
7270 * init.c (build_delete): Throw away const and volatile on `this'.
7272 * decl.c (finish_enum): Put the constants in TYPE_VALUES again,
7273 rather than the enumerators.
7274 (pushtag): s/cdecl/c_decl/g
7276 Mon May 16 23:04:01 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
7278 * cp/typeck.c (common_type): Attribute merging.
7279 (comp_types): Utilise COMP_TYPE_ATTRIBUTES macro.
7281 * cp/parse.y: Revamp attribute parsing.
7283 Mon May 16 01:40:34 1994 Jason Merrill (jason@deneb.cygnus.com)
7285 * decl.c (shadow_tag): Also check for inappropriate use of auto and
7288 * method.c (build_overload_name): Clarify that the illegal case is a
7289 pointer or reference to array of unknown bound.
7291 * error.c (dump_type_prefix): Print references to arrays properly.
7293 * typeck.c (various): Be more helpful in pointer
7294 comparison diagnostics.
7296 * tree.c (lvalue_p): MODIFY_EXPRs are lvalues again. Isn't this
7299 * parse.y: Also catch an error after valid stmts.
7301 * search.c (dfs_init_vbase_pointers): Don't abort because `this' is
7304 * typeck.c (convert_for_initialization): If call to
7305 convert_to_reference generated a diagnostic, print out the parm
7306 number and function decl if any.
7308 * errfn.c (cp_thing): Check atarg1 to determine whether or not we're
7309 specifying a line, not atarg.
7311 * tree.c (build_cplus_method_type): Always make `this' const.
7313 * decl2.c (grokclassfn): If -fthis-is-variable and this function is
7314 a constructor or destructor, make `this' non-const.
7316 * typeck.c (build_modify_expr): Don't warn specially about
7317 assignment to `this' here anymore, since it will be caught by the
7320 * various: Disallow specific GNU extensions (variable-size arrays,
7321 etc.) when flag_ansi is set, not necessarily when pedantic is set,
7322 so that people can compile with -pedantic-errors for tighter const
7323 checking and such without losing desirable extensions.
7325 * typeck2.c (build_functional_cast): Call build_method_call with
7327 (process_init_constructor): Only process FIELD_DECLs.
7329 * decl.c (finish_decl): Also force static consts with no explicit
7330 initializer that need constructing into the data segment.
7332 * init.c (build_delete): Undo last patch, as it interferes with
7335 Sat May 14 01:59:31 1994 Jason Merrill (jason@deneb.cygnus.com)
7337 * call.c, class.h, cp-tree.h, cvt.c, decl2.c: Lose old overloading
7340 * init.c (build_delete): pedwarn about using plain delete to delete
7343 Fri May 13 16:45:07 1994 Jason Merrill (jason@deneb.cygnus.com)
7345 * typeck.c (comp_target_types): Be more helpful in contravariance
7346 warnings, and make them pedwarns.
7348 * decl.c (grokdeclarator): Use decl_context to decide whether or not
7349 this is an access declaration.
7351 * class.c (finish_struct_bits): Set TYPE_HAS_INT_CONVERSION if it
7352 has a conversion to enum or bool, too.
7354 Fri May 13 16:31:27 1994 Mike Stump <mrs@cygnus.com>
7356 * method.c (emit_thunk): Make declaration for
7357 current_call_is_indirect local (needed for hppa).
7359 Fri May 13 16:16:37 1994 Jason Merrill (jason@deneb.cygnus.com)
7361 * pt.c (uses_template_parms): Grok BOOLEAN_TYPE.
7364 Fri May 13 16:23:32 1994 Mike Stump <mrs@cygnus.com>
7366 * pt.c (tsubst): If there is already a function for this expansion,
7368 * pt.c (instantiate_template): Ditto.
7370 Fri May 13 10:30:42 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
7372 * parse.y (implicitly_scoped_stmt, simple_stmt case): Use
7373 kept_level_p for MARK_ENDS argument to expand_end_bindings, to avoid
7374 generating debug info for unemitted symbols on some systems.
7376 * cp-tree.h (build_static_cast, build_reinterpret_cast,
7377 build_const_cast): Add declarations.
7379 Fri May 13 09:50:31 1994 Mike Stump <mrs@cygnus.com>
7381 * search.c (expand_indirect_vtbls_init): Fix breakage from Apr 27
7382 fix. We now try get_binfo, and if that doesn't find what we want,
7383 we go back to the old method, which still sometimes fails.
7385 Fri May 13 01:43:18 1994 Jason Merrill (jason@deneb.cygnus.com)
7387 * parse.y (initdcl): Call cplus_decl_attributes on the right
7389 * decl2.c (cplus_decl_attributes): Don't call decl_attributes for
7392 * typeck.c (build_binary_op_nodefault): Change result_type for
7393 comparison ops to bool.
7394 (build_binary_op): Convert args of && and || to bool.
7395 * cvt.c (build_default_binary_type_conversion): Convert args of &&
7397 (build_default_unary_type_conversion): Convert arg of ! to bool.
7398 (type_promotes_to): bool promotes to int.
7400 Fri May 13 01:43:18 1994 Mike Stump <mrs@cygnus.com>
7402 Implement the new builtin `bool' type.
7403 * typeck.c (build_binary_op_nodefault): Convert args of && and || to
7405 (build_unary_op): Convert arg of ! to bool.
7406 * parse.y: Know true and false. Use bool_truthvalue_conversion.
7407 * method.c (build_overload_value): Know bool.
7408 (build_overload_name): Ditto.
7409 * lex.c (init_lex): Set up RID_BOOL.
7410 * gxx.gperf: Add bool, true, false.
7411 * error.c (*): Know bool.
7412 * decl.c (init_decl_processing): Set up bool, true, false.
7413 * cvt.c (cp_convert): Handle conversion to bool.
7414 (build_type_conversion): Ditto.
7415 * *.c: Accept bool where integers and enums are accepted (use
7416 INTEGRAL_CODE_P macro).
7418 Thu May 12 19:13:54 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk)
7420 * g++.c: Use #ifdef for __MSDOS__, not #if.
7422 Thu May 12 18:05:18 1994 Mike Stump <mrs@cygnus.com>
7424 * decl2.c (lang_f_options): Handle -fshort-temps. -fshort-temps
7425 gives old behavior , and destroys temporaries earlier. Default
7426 behavior now conforms to the ANSI working paper.
7428 Thu May 12 14:45:35 1994 Jason Merrill (jason@deneb.cygnus.com)
7430 * typeck.c (build_modify_expr): Understand MODIFY_EXPR as an lvalue.
7431 Use convert_force to convert the result of a recursive call when we
7432 are dealing with a NOP_EXPR. Don't automatically wrap MODIFY_EXPRs
7433 in COMPOUND_EXPRs any more.
7434 (various): Lose pedantic_lvalue_warning.
7435 (unary_complex_lvalue): Understand MODIFY_EXPR.
7437 * cvt.c (convert_to_reference): Allow DECL to be error_mark_node if
7438 we don't know what we're initializing.
7440 Wed May 11 01:59:36 1994 Jason Merrill (jason@deneb.cygnus.com)
7442 * cvt.c (convert_to_reference): Modify to use convtype parameter.
7443 Only create temporaries when initializing a reference, not when
7445 (cp_convert): New main function.
7446 (convert): Call cp_convert.
7447 * cvt.c, decl.c, typeck.c: Fix calls to convert_to_reference.
7448 * cp-tree.h (CONV_*): New constants used by conversion code for
7449 selecting conversions to perform.
7451 * tree.c (lvalue_p): MODIFY_EXPRs are no longer lvalues.
7453 * typeck.c (build_{static,reinterpret,const_cast): Stubs that just
7455 * parse.y: Add {static,reinterpret,const}_cast.
7458 * typeck.c (common_type): Allow methods with basetypes of different
7460 (comptypes): Deal with UPTs.
7461 (build_modify_expr): Wrap all MODIFY_EXPRs in a COMPOUND_EXPR.
7463 * pt.c (end_template_decl): Check for multiple definitions of member
7466 * call.c (build_method_call): Complain about calling an abstract
7467 virtual from a constructor.
7469 * typeck.c (pointer_int_sum): Check for the integer operand being 0
7470 after checking the validity of the pointer operand.
7472 * typeck2.c (digest_init): Pedwarn about string initializer being
7475 Tue May 10 12:10:28 1994 Jason Merrill (jason@deneb.cygnus.com)
7477 * decl.c (push_overloaded_decl): Only throw away a builtin if the
7478 decl in question is the artificial one.
7480 * parse.y (simple_stmt, switch): Use implicitly_scoped_stmt because
7481 expand_{start,end}_case cannot happen in the middle of a block.
7483 * cvt.c (build_type_conversion_1): Use convert again.
7485 Tue May 10 11:52:04 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
7487 * typeck2.c (digest_init): Make sure we check for signed and
7488 unsigned chars as well when warning about string initializers.
7490 * init.c (emit_base_init): Check if there's a DECL_NAME on the
7491 member before trying to do an initialization for it.
7493 Tue May 10 11:34:37 1994 Mike Stump <mrs@cygnus.com>
7495 * except.c: Don't do anything useful when cross compiling.
7497 Tue May 10 03:04:13 1994 Jason Merrill (jason@deneb.cygnus.com)
7499 * decl.c (duplicate_decls): Fix up handling of builtins yet again.
7500 (push_overloaded_decl): Ditto.
7502 * cvt.c (convert): Don't look for void type conversion.
7504 Mon May 9 18:05:41 1994 Jason Merrill (jason@deneb.cygnus.com)
7506 * init.c (do_friend): Only do a pushdecl for friends, not
7509 Mon May 9 13:36:34 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
7511 * decl.c (lookup_name_current_level): Put empty statement after
7512 the label OUT to make the code valid C.
7514 Mon May 9 12:20:57 1994 Jason Merrill (jason@deneb.cygnus.com)
7516 * typeck.c (build_binary_op_nodefault): Only complain about
7517 comparing void * and a function pointer if void * is smaller.
7519 Sun May 8 01:29:13 1994 Jason Merrill (jason@deneb.cygnus.com)
7521 * decl.c (lookup_name_current_level): Move through temporary binding
7524 * parse.y (already_scoped_stmt): Revive.
7525 (simple_stmt): Use it again.
7527 * decl.c (poplevel): Always call poplevel recursively if we're
7528 dealing with a temporary binding level.
7530 Sat May 7 10:52:28 1994 Mike Stump <mrs@cygnus.com>
7532 * decl.c (finish_decl): Make sure we run cleanups for initial values
7533 of decls. Cures memory leak.
7534 * decl.c (expand_static_init): Ditto for static variables.
7535 * decl2.c (finish_file): Ditto for globals.
7537 Sat May 7 03:57:44 1994 Jason Merrill (jason@deneb.cygnus.com)
7539 * typeck.c (commonparms): Don't complain about redefining default
7542 * decl.c (duplicate_decls): Don't complain twice about conflicting
7544 (decls_match): Don't look at default args.
7545 (redeclaration_error_message): Complain about redefining default
7548 * call.c (build_overload_call_real): Also deal with guiding
7549 declarations coming BEFORE the template decl.
7551 * pt.c (unify): Allow different parms to have different
7553 (unify): Allow trivial conversions on non-template parms.
7555 Fri May 6 03:53:23 1994 Jason Merrill (jason@deneb.cygnus.com)
7557 * pt.c (tsubst): Support OFFSET_TYPEs.
7560 * decl2.c (finish_decl_parsing): Call push_nested_class with a type.
7562 * init.c (build_offset_ref): Fix error message.
7563 * search.c (lookup_field): Ditto.
7565 * call.c (build_scoped_method_call): Pass binfo to
7567 * typeck.c (build_object_ref): Ditto.
7569 * typeck2.c (binfo_or_else): Don't return a _TYPE.
7571 * class.c (finish_struct): Don't complain about re-use of inherited
7572 names or shadowing of type decls.
7573 * decl.c (pushdecl_class_level): Ditto.
7575 * decl.c (finish_enum): Set the type of all the enums.
7577 * class.c (finish_struct): Don't get confused by access decls.
7579 * cp-tree.h (TYPE_MAIN_DECL): New macro to get the _DECL for a
7580 _TYPE. You can stop using TYPE_NAME for that now.
7582 * parse.y: Lose doing_explicit (check $0 instead).
7583 * gxx.gperf: 'template' now has a RID.
7584 * lex.h (rid): Ditto.
7585 * lex.c (init_lex): Set up the RID for 'template'.
7587 * parse.y (type_specifier_seq): typed_typespecs or
7588 nonempty_type_quals. Use it.
7589 (handler_args): Fix bogus syntax.
7590 (raise_identifier{,s}, optional_identifier): Lose.
7591 * except.c (expand_start_catch_block): Use grokdeclarator to parse
7593 (init_exception_processing): The second argument to
7594 __throw_type_match is ptr_type_node.
7596 Fri May 6 07:18:54 1994 Chip Salzenberg (chip@fin)
7598 [ change propagated from c-decl.c of snapshot 940429 ]
7599 * cp/decl.c (finish_decl): Setting asmspec_tree should not
7600 zero out the old RTL.
7602 Fri May 6 01:25:38 1994 Mike Stump <mrs@cygnus.com>
7604 Add alpha exception handling support to the compiler.
7605 Quick and dirty backend in except.c.
7607 * cp/*: Remove most remnants of old exception handling support.
7608 * decl.c (finish_function): Call expand_exception_blocks to put
7609 the exception hanlding blocks at the end of the function.
7610 * dec.c (hack_incomplete_structures): Make sure expand_decl_cleanup
7611 comes after expand_decl_init.
7612 * except.c: Reimplementation.
7613 * expr.c (cplus_expand_expr): Handle THROW_EXPRs.
7614 * lex.c (init_lex): Always have catch, try and throw be reserved
7615 words, so that we may always parse exception handling.
7616 * parse.y: Cleanup to support new interface into exception handling.
7617 * tree.def (THROW_EXPR): Add.
7619 Thu May 5 17:35:37 1994 Jason Merrill (jason@deneb.cygnus.com)
7621 * parse.y (simple_stmt, for loops): Use implicitly_scoped_stmt.
7622 (various): Lose .kindof_pushlevel and partially_scoped_stmt.
7624 Thu May 5 16:17:27 1994 Kung Hsu (kung@mexican.cygnus.com)
7626 * parse.y (already_scoped_stmt): move expand_end_binding() to
7627 fix the unmatched LBB/LBE in stabs.
7629 Thu May 5 14:36:17 1994 Jason Merrill (jason@deneb.cygnus.com)
7631 * decl.c (set_nested_typename): Set TREE_MANGLED on the new
7633 (pushdecl): Check TREE_MANGLED.
7635 * cp-tree.h (TREE_MANGLED): This identifier is a
7636 DECL_NESTED_TYPENAME (named to allow for future use to denote
7637 mangled function names as well).
7639 Implement inconsistency checking specified in [class.scope0].
7640 * decl.c (lookup_name_real): Don't set ICV here after all.
7641 (finish_enum): Also set the type of the enumerators themselves.
7642 (build_enumerator): Put the CONST_DECL in the list instead of its
7644 (pushdecl_class_level): Check inconsistent use of a name in the
7646 * class.c (finish_struct): Check inconsistent use of a name in the
7647 class body. Don't set DECL_CONTEXT on types here anymore.
7648 * parse.y (qualified_type_name): Note that the identifier has now
7649 been used (as a type) in the class body.
7650 * lex.c (do_identifier): Note that the identifier has now been used
7651 (as a constant) in the class body.
7652 * error.c (dump_decl): Print type and enum decls better.
7654 Thu May 5 09:35:35 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
7656 * typeck.c (build_modify_expr): Warn about assignment to `this'.
7658 Wed May 4 15:55:49 1994 Jason Merrill (jason@deneb.cygnus.com)
7660 * init.c (build_delete): Use the global operator delete when
7663 * decl.c (lookup_name_real): If we find the type we're looking in a
7664 base class while defining a class, set IDENTIFIER_CLASS_VALUE for
7667 * class.c (finish_struct): Remove a couple of dependencies on
7670 * decl.c (pushtag): Classes do nest in extern "C" blocks.
7671 (pushdecl): Only set DECL_NESTED_TYPENAME on the canonical one for
7673 (pushtag): Remove another dependency on the language linkage.
7675 * lex.c (cons_up_default_function): Don't set DECL_CLASS_CONTEXT to
7676 a const-qualified type.
7678 * decl.c (push_overloaded_decl): Throw away built-in decls here.
7679 (duplicate_decls): Instead of here.
7681 Wed May 4 15:27:40 1994 Per Bothner (bothner@kalessin.cygnus.com)
7683 * typeck.c (get_member_function_from_ptrfunc): Do The Right
7684 Thing (I hope) if we're using thunks.
7686 Wed May 4 13:52:38 1994 Jason Merrill (jason@deneb.cygnus.com)
7688 * parse.y (specialization): aggr template_type_name ';'.
7689 (named_class_head_sans_basetype): Use it.
7690 (explicit_instantiation): Ditto.
7693 * cvt.c (build_type_conversion_1): Use convert_for_initialization,
7694 rather than convert, to do conversions after the UDC.
7696 * cp-tree.h (SHARED_MEMBER_P): This member is shared between all
7697 instances of the class.
7699 * search.c (lookup_field): If the entity found by two routes is the
7700 same, it's not ambiguous.
7702 Wed May 4 12:10:00 1994 Per Bothner (bothner@kalessin.cygnus.com)
7704 * decl.c (lookup_name_real): Check for a NULL TREE_VALUE,
7705 to prevent the compiler from crashing ...
7707 Wed May 4 11:19:45 1994 Jason Merrill (jason@deneb.cygnus.com)
7709 * call.c (build_method_call): If we don't have an object, check
7710 basetype_path to figure out where to look up the function.
7712 * typeck.c (convert_for_initialization): Pass TYPE_BINFO (type) to
7713 build_method_call in case exp is NULL_TREE.
7715 Tue May 3 16:02:53 1994 Per Bothner (bothner@kalessin.cygnus.com)
7717 Give a vtable entries a unique named type, for the sake of gdb.
7718 * class.c (build_vtable_entry): The addres of a thunk now has
7719 type vtable_entry_type, not ptr_type_node.
7720 * method.c (make_thunk): Fix type of THUNK_DECL.
7721 * class.c (add_virtual_function, override_one_vtable): Use
7722 vfunc_ptr_type_node, instead of ptr_type_node.
7723 * cp-tree.h (vfunc_ptr_type_node): New macro.
7724 * decl.c (init_decl_processing): Make vtable_entry_type
7725 be a unique type of pointer to a unique function type.
7727 Tue May 3 09:20:44 1994 Jason Merrill (jason@deneb.cygnus.com)
7729 * parse.y (do_explicit): Sets doing_explicit to 1.
7730 (explicit_instantiation): Use do_explicit rather than TEMPLATE
7731 directly, add "do_explicit error" rule.
7732 (datadef): Set doing_explicit to 0 after an explicit instantiation.
7733 (tmpl.2): Don't instantiate if we see a ';' unless we're doing an
7734 explicit instantiation.
7735 (named_class_head_sans_basetype): Remove aggr template_type_name
7738 Mon May 2 23:17:21 1994 Jason Merrill (jason@deneb.cygnus.com)
7740 * search.c (lookup_nested_tag): Lose.
7742 * decl2.c (grokfield): Set DECL_CONTEXT on TYPE_DECLs.
7743 (lookup_name_nonclass): Lose.
7745 * decl.c (poplevel_class): Add force parameter.
7746 (lookup_name_real): Fix handling of explicit scoping which specifies
7747 a class currently being defined. Add 'nonclass' argument.
7748 (lookup_name, lookup_name_nonclass): Shells for lookup_name_real.
7750 * class.c (finish_struct): Don't unset IDENTIFIER_CLASS_VALUEs here.
7751 (popclass): Force clearing of IDENTIFIER_CLASS_VALUEs if we're being
7752 called from finish_struct.
7754 Mon May 2 19:06:21 1994 Per Bothner (bothner@kalessin.cygnus.com)
7756 * decl.c (init_decl_processing), cp-tree.h: Removed memptr_type.
7757 (It seeems redundant, given build_ptrmemfunc_type.)
7758 * typeck.c (get_member_function_from_ptrfunc), gc.c (build_headof,
7759 build_classof): Use vtable_entry_type instead of memptr_type.
7760 * method.c (emit_thunk): Call poplevel with functionbody==0
7761 to prevent DECL_INITIAL being set to a BLOCK.
7763 Mon May 2 15:02:11 1994 Jason Merrill (jason@deneb.cygnus.com)
7765 * parse.y (named_class_head_sans_basetype): Add "aggr
7766 template_type_name ';'" rule for forward declaration of
7769 Mon May 2 15:02:11 1994 Jason Merrill (jason@deneb.cygnus.com)
7771 * class.c (instantiate_type): Deal with pmf's.
7773 * Make-lang.in (cc1plus): Don't depend on OBJS or BC_OBJS, since
7776 * Makefile.in (../cc1plus): Depend on OBJDEPS.
7777 (OBJDEPS): Dependency version of OBJS.
7779 Mon May 2 12:51:31 1994 Kung Hsu (kung@mexican.cygnus.com)
7781 * search.c (dfs_debug_mark): unmark TYPE_DECL_SUPPRESS_DEBUG, not
7784 Fri Apr 29 12:29:56 1994 Jason Merrill (jason@deneb.cygnus.com)
7786 * class.c (finish_struct): Clear out memory of local tags. And
7789 * decl2.c (grokclassfn): Don't set DECL_CONTEXT to a cv-qualified
7791 * search.c (get_matching_virtual): Be more helpful in error message.
7793 * *: Use DECL_ARTIFICIAL (renamed from DECL_SYNTHESIZED).
7795 * lex.c (default_assign_ref_body): Expect TYPE_NESTED_NAME to work.
7796 (default_copy_constructor_body): Ditto.
7798 * class.c (finish_struct): Don't gratuitously create multiple decls
7801 Thu Apr 28 23:39:38 1994 Jason Merrill (jason@deneb.cygnus.com)
7803 Avoid clobbering the arg types of other functions when reverting
7804 static member functions.
7805 * decl.c (revert_static_member_fn): Rearrange arguments, don't
7806 require values for 'fn' and 'argtypes', add warning to comment
7808 (decls_match): Rearrange arguments in call to rsmf.
7809 (grok_op_properties): Don't pass values for fn and argtypes.
7810 * pt.c (instantiate_template): Don't pass values for fn and argtypes.
7812 Thu Apr 28 16:29:11 1994 Doug Evans (dje@canuck.cygnus.com)
7814 * Make-lang.in (cc1plus): Depend on stamp-objlist.
7815 * Makefile.in (BC_OBJS): Delete.
7816 (OBJS): Cat ../stamp-objlist to get language independent files.
7817 Include ../c-common.o.
7818 (../cc1plus): Delete reference to BC_OBJS.
7820 Thu Apr 28 02:12:08 1994 Jason Merrill (jason@deneb.cygnus.com)
7822 * search.c (compute_access): No really, deal with static members
7823 properly. Would I lie to you?
7825 Implement lexical hiding of function declarations.
7826 * pt.c (tsubst): Use lookup_name to look for function decls to guide
7828 * method.c (build_opfncall): Use lookup_name_nonclass to look for
7829 non-member functions.
7830 * init.c (do_friend): Use lookup_name_nonclass to look for
7832 * error.c (ident_fndecl): Use lookup_name to look for functions.
7833 * decl2.c (lookup_name_nonclass): New function, skips over
7835 * decl.c (struct binding_level): Lose overloads_shadowed field.
7836 (poplevel): Don't deal with overloads_shadowed.
7837 (push_overloaded_decl): Do lexical hiding for functions.
7838 * class.c (instantiate_type): Don't check non-members if we have
7839 members with the same name.
7840 * call.c (build_method_call): Use lookup_name_nonclass instead of
7841 IDENTIFIER_GLOBAL_VALUE to check for non-member functions.
7842 (build_overload_call_real): Ditto.
7844 * decl.c (duplicate_decls): Check for ambiguous overloads here.
7845 (push_overloaded_decl): Instead of here.
7847 * decl.c (pushdecl): Back out Chip's last change.
7849 * decl.c (grok_op_properties): operators cannot be static members.
7851 * cp-tree.h (DECL_SYNTHESIZED): DECL_SOURCE_LINE == 0
7852 (SET_DECL_SYNTHESIZED): DECL_SOURCE_LINE = 0
7853 * lex.c (cons_up_default_function): Use SET_DECL_SYNTHESIZED.
7855 * method.c (do_inline_function_hair): Don't put friends of local
7856 classes into global scope, either.
7858 * typeck2.c (build_functional_cast): Don't look for a function call
7861 Thu Apr 28 15:19:46 1994 Mike Stump <mrs@cygnus.com>
7863 * cp-tree.h: disable use of backend EH.
7865 Wed Apr 27 21:01:24 1994 Doug Evans (dje@canuck.cygnus.com)
7867 * Make-lang.in (c++.distdir): mkdir tmp/cp first.
7868 * Makefile.in (INCLUDES): Move definition to same place as
7871 (OLDAR_FLAGS): Delete.
7876 (SUBDIR_USE_ALLOCA): Don't use ALLOCA if compiling with gcc.
7878 Wed Apr 27 19:10:04 1994 Kung Hsu (kung@mexican.cygnus.com)
7880 * decl.c (xref_tag): not to use strstr(), it's not available on
7883 Wed Apr 27 18:10:12 1994 Jason Merrill (jason@deneb.cygnus.com)
7885 * class.c (finish_struct): Resolve yet another class/pmf confusion.
7887 * call.c (build_overload_call_real): Don't take the single-function
7888 shortcut if we're dealing with an overloaded operator.
7890 Wed Apr 27 17:35:37 1994 Mike Stump <mrs@cygnus.com>
7892 * search.c (get_base_distance): Search the virtual base class
7893 binfos, incase someone wants to convert to a real virtual base
7895 * search.c (expand_indirect_vtbls_init): Use convert_pointer_to_real
7896 instead of convert_pointer_to, as it now will work.
7898 Wed Apr 27 15:36:49 1994 Jason Merrill (jason@deneb.cygnus.com)
7900 * cvt.c (convert_to_reference): Don't complain about casting away
7903 * typeck.c (build_unary_op): References are too lvalues.
7905 Wed Apr 27 13:58:05 1994 Mike Stump <mrs@cygnus.com>
7907 * class.c (override_one_vtable): We have to prepare_fresh_vtable
7908 before we modify it, not after, also, we cannot reuse an old vtable,
7909 once we commit to a new vtable. Implement ambiguous overrides in
7910 virtual bases as abstract. Hack until we make the class
7913 Wed Apr 27 01:17:08 1994 Jason Merrill (jason@deneb.cygnus.com)
7915 * parse.y (unary_expr): Expand new_placement[opt] and
7916 new_initializer[opt] inline.
7918 * search.c (lookup_fnfields): Don't throw away the inheritance
7919 information here, either.
7920 (compute_access): Handle static members properly.
7922 * init.c (build_member_call): Always set basetype_path, and pass it
7925 * search.c (lookup_field): Deal properly with the case where
7926 xbasetype is a chain of binfos; don't throw away the inheritance
7928 (compute_access): protected_ok always starts out at 0.
7930 * init.c (resolve_offset_ref): Don't cast `this' to the base type
7931 until we've got our basetype_path.
7933 * cp-tree.h (IS_OVERLOAD_TYPE): aggregate or enum.
7935 * cvt.c (build_up_reference): Use build_pointer_type rather than
7938 * call.c (convert_harshness_ansi): Call type_promotes_to for reals
7941 * cvt.c (type_promotes_to): Retain const and volatile, add
7942 float->double promotion.
7944 * decl.c (grokdeclarator): Don't bash references to arrays into
7945 references to pointers in function parms. Use type_promotes_to.
7947 Tue Apr 26 23:44:36 1994 Mike Stump <mrs@cygnus.com>
7949 Finish off Apr 19th work.
7951 * class.c (finish_struct_bits): Rename has_abstract_virtuals to
7952 might_have_abstract_virtuals.
7953 * class.c (strictly_overrides, override_one_vtable,
7954 merge_overrides): New routines to handle virtual base overrides.
7955 * class.c (finish_struct): Call merge_overrides to handle overrides
7958 Tue Apr 26 12:45:53 1994 Jason Merrill (jason@deneb.cygnus.com)
7960 * typeck.c (build_function_call): Call build_function_call_real with
7963 * *: Don't deal with TYPE_EXPRs.
7965 * tree.c (lvalue_p): If the type of the expression is a reference,
7968 * cvt.c (convert_to_reference): Complain about passing const
7969 lvalues to non-const references.
7970 (convert_from_reference): Don't arbitrarily throw away const and
7971 volatile on the target type.
7973 * parse.y: Simplify and fix rules for `new'.
7975 * decl.c (grok_op_properties): operator void is illegal.
7977 Mon Apr 25 02:36:28 1994 Jason Merrill (jason@deneb.cygnus.com)
7979 * parse.y (components): Anonymous bitfields can still have declspecs.
7981 * decl.c (pushdecl): Postpone handling of function templates like we
7984 * search.c (expand_indirect_vtbls_init): Fix infinite loop when
7985 convert_pointer_to fails.
7987 * call.c (compute_conversion_costs_ansi): A user-defined conversion
7988 by itself is better than that UDC followed by standard conversions.
7989 Don't treat integers and reals specially.
7991 * cp-tree.h: Declare flag_ansi.
7993 * typeck.c (c_expand_return): pedwarn on return in void function
7994 even if the expression is of type void.
7995 (build_c_cast): Don't do as much checking for casts to void.
7996 (build_modify_expr): pedwarn about array assignment if this code
7997 wasn't generated by the compiler.
7999 * tree.c (lvalue_p): A comma expression is an lvalue if its second
8002 * typeck.c (default_conversion): Move code for promoting enums and
8004 * cvt.c (type_promotes_to): To here.
8005 * call.c (convert_harshness_ansi): Use type_promotes_to. Also fix
8006 promotion semantics for reals.
8008 Sun Apr 24 16:52:51 1994 Doug Evans (dje@canuck.cygnus.com)
8010 * Make-lang.in (c++.install-common): Check for g++-cross.
8011 * Makefile.in: Remove Cygnus cruft.
8012 (config.status): Delete.
8014 (TREE_H): Use complete pathname, some native makes have minimal
8016 (*.o): Use complete pathname to headers in parent dir.
8017 (doc, info, dvi): Delete.
8019 Sun Apr 24 16:52:51 1994 Doug Evans (dje@canuck.cygnus.com)
8021 * Make-lang.in (c++.install-common): Check for g++-cross.
8022 * Makefile.in: Remove Cygnus cruft.
8023 (config.status): Delete.
8025 (TREE_H): Use complete pathname, some native makes have minimal
8027 (*.o): Use complete pathname to headers in parent dir.
8028 (doc, info, dvi): Delete.
8030 Sun Apr 24 00:47:49 1994 Jason Merrill (jason@deneb.cygnus.com)
8032 * decl.c (pushdecl): Avoid redundant warning on redeclaring function
8033 with different return type.
8034 (decls_match): Compare return types strictly.
8036 Fri Apr 22 12:55:42 1994 Jason Merrill (jason@deneb.cygnus.com)
8038 * cvt.c (build_type_conversion): Do try to convert through other
8039 pointers. This will fail if the class defines multiple pointer
8042 * error.c (dump_type_prefix): Print out pointers to arrays properly.
8043 (dump_type_suffix): Ditto. (was 'int *[]', now 'int (*)[]')
8045 * typeck.c (build_unary_op): Disallow ++/-- on pointers to
8048 * decl.c (duplicate_decls): Check mismatched TREE_CODES after
8049 checking for shadowing a builtin. If we're redeclaring a builtin
8050 function, bash the old decl to avoid an ambiguous overload.
8052 * cvt.c (convert_to_reference): Don't force arrays to decay here.
8054 * tree.c (lvalue_p): A MODIFY_EXPR is an lvalue.
8056 * decl.c (duplicate_decls): Don't assume that the decls will have
8059 Mon Apr 18 11:35:32 1994 Chip Salzenberg (chip@fin.uucp)
8061 [ cp/* changes propagated from c-* changes in 940318 snapshot ]
8062 * c-decl.c (pushdecl): Warn if type mismatch with another external decl
8065 Fri Apr 22 06:38:56 1994 Chip Salzenberg (chip@fin.uucp)
8067 * cp/typeck2.c (signature_error): Use cp_error for "%T".
8069 Mon Apr 18 11:59:59 1994 Chip Salzenberg (chip@fin.uucp)
8071 [ cp/* changes propagated from c-* changes in 940415 snapshot ]
8072 * cp/decl.c (duplicate_decls, pushdecl, builtin_function):
8073 Use DECL_FUNCTION_CODE instead of DECL_SET_FUNCTION_CODE.
8075 Mon Apr 18 11:55:18 1994 Chip Salzenberg (chip@fin.uucp)
8077 [ cp/* changes propagated from c-* changes in 940409 snapshot ]
8078 * cp/decl.c (duplicate_decls): Put new type in same obstack as
8079 old ones, or permanent if old ones in different obstacks.
8081 Mon Apr 18 11:48:49 1994 Chip Salzenberg (chip@fin.uucp)
8083 [ cp/* changes propagated from c-* changes in 940401 snapshot ]
8084 * cp/parse.y (attrib): Handle string args as expressions,
8085 merging the two rules. `mode' attribute now takes a string arg.
8086 Delete the rule for an identifier as arg.
8088 Mon Apr 18 11:24:00 1994 Chip Salzenberg (chip@fin.uucp)
8090 [ cp/* changes propagated from c-* changes in 940312 snapshot ]
8091 * cp/typeck.c (pointer_int_sum): Multiplication should be done signed.
8092 (pointer_diff): Likewise the division.
8094 Sun Mar 6 19:43:39 1994 Chip Salzenberg (chip@fin.uucp)
8096 [ cp/* changes propagated from c-* changes in 940304 snapshot ]
8097 * cp/decl.c (finish_decl): Issue warning for large objects,
8100 Sat Feb 19 22:20:32 1994 Chip Salzenberg (chip@fin.uucp)
8102 [ cp/* changes propagated from c-* changes in 940218 snapshot ]
8103 * cp/parse.y (attrib): Handle attribute ((section ("string"))).
8104 * cp/decl.c (duplicate_decls): Merge section name into new decl.
8106 Tue Feb 8 09:49:17 1994 Chip Salzenberg (chip@fin.uucp)
8108 [ cp/* changes propagated from c-* changes in 940206 snapshot ]
8109 * cp/typeck.c (signed_or_unsigned_type): Check for any
8110 INTEGRAL_TYPE_P not just INTEGER_TYPE.
8112 Mon Dec 6 13:35:31 1993 Norbert Kiesel (norbert@i3.INformatik.rwth-aachen.DE)
8114 * cp/decl.c (finish_enum): Start from 0 when determining precision
8117 Fri Dec 3 17:07:58 1993 Ralph Campbell (ralphc@pyramid.COM)
8119 * cp/parse.y (unary_expr): Look at $1 for tree_code rather than
8122 Wed Nov 17 19:22:09 1993 Chip Salzenberg (chip@fin.uucp)
8124 * cp/typeck.c (build_binary_op_nodefault): Propagate code
8125 from C front-end to optimize unsigned short division.
8126 (build_conditional_expr): Fix bug in "1 ? 42 : (void *) 8".
8128 Wed Nov 17 19:17:18 1993 Chip Salzenberg (chip@fin.uucp)
8130 * cp/call.c (convert_harshness_ansi): Given an (e.g.) char
8131 constant, prefer 'const char &' to 'int'.
8133 Wed Feb 3 13:11:48 1993 Chip Salzenberg (chip@fin.uucp)
8135 * cp/class.c (finish_struct_methods): Handle multiple
8136 constructors in fn_fields list.
8138 Fri Apr 22 12:48:10 1994 Kung Hsu (kung@mexican.cygnus.com)
8140 * class.c (finish_struct): use TYPE_DECL_SUPPRESS_DEBUG to flag
8141 types not to be dumped in stabs, like types in #pragma interface.
8142 * decl.c (init_decl_processing): use TYPE_DECL_SUPPRESS_DEBUG to
8145 Fri Apr 22 03:27:26 1994 Doug Evans (dje@cygnus.com)
8147 * Language directory reorganization.
8148 See parent makefile.
8150 Thu Apr 21 18:27:57 1994 Per Bothner (bothner@kalessin.cygnus.com)
8152 * cp-tree.h (THUNK_DELTA): It is normally negative, so
8153 use signed .i variant of frame_size rather than unsigned .u.
8154 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
8155 use "VT" rather than "vt" due to binary incompatibility.
8156 * class.c (get_vtable_name): Use strlen of VTABLE_NAME_FORMAT,
8157 rather than sizeof, since it is now an expression.
8158 * class.c (modify_one_vtable): Modify to skip initial element
8159 containing a count of the vtable.
8161 Thu Apr 21 00:09:02 1994 Jason Merrill (jason@deneb.cygnus.com)
8163 * lex.c (check_newline): Force interface_unknown on main input file.
8165 * pt.c (do_pending_expansions): Always emit functions that have been
8166 explicitly instantiated.
8167 (do_function_instantiation): Set DECL_EXPLICITLY_INSTANTIATED.
8168 (do_type_instantiation): Set CLASSTYPE_VTABLE_NEEDS_WRITING and
8169 DECL_EXPLICITLY_INSTANTIATED on all my methods.
8170 * parse.y (explicit_instantiation): Call do_type_instantiation for
8172 * decl2.c (finish_vtable_vardecl): Call import_export_vtable.
8173 * decl.c (start_function): Don't set DECL_EXTERNAL on a function
8174 that has been explicitly instantiated.
8175 * cp-tree.h (DECL_EXPLICITLY_INSTANTIATED): Alias for
8177 * class.c: Move import_export_vtable to decl2.c, and comment out all
8180 Wed Apr 20 16:51:06 1994 Jason Merrill (jason@deneb.cygnus.com)
8182 * lex.c (process_next_inline): Don't muck with DECL_INLINE.
8183 (do_pending_inlines): Ditto.
8185 Tue Apr 19 22:25:41 1994 Mike Stump <mrs@cygnus.com>
8187 Reimplement vtable building, and most vtable pointer setting.
8188 Allows for earier maintenance, easier understandability, and most
8189 importantly, correct semantics.
8191 * class.c (build_vtable): Removed unneeded
8192 SET_BINFO_VTABLE_PATH_MARKED.
8193 * class.c (prepare_fresh_vtable): Ditto. Added argument.
8194 * class.c (modify_vtable_entry): General cleanup.
8195 * class.c (related_vslot, is_normal, modify_other_vtable_entries,
8196 modify_vtable_entries): Removed.
8197 * class.c (add_virtual_function): General cleanup.
8198 * class.c (finish_base_struct): Setup BINFO_VTABLE and
8199 BINFO_VIRTUALS as early as we can, so that modify_all_vtables can
8201 * class.c (finish_vtbls): New routine, mostly from
8202 unmark_finished_struct.
8203 * class.c (overrides): New routine.
8204 * class.c (modify_one_vtable): New routine, mostly from
8205 modify_other_vtable_entries and modify_vtable_entries.
8206 * class.c (modify_all_direct_vtables, modify_all_indirect_vtables,
8207 modify_all_vtables): New routines.
8208 * class.c (finish_struct): Added arguemnt to prepare_fresh_vtable
8209 call. General cleanup on how pending_hard_virtuals are handled.
8210 General cleanup on modifying vtables. Use finish_vtbls, instead of
8211 unmark_finished_struct.
8212 * cp-tree.h (init_vtbl_ptrs, expand_direct_vtbls_init,
8213 get_first_matching_virtual, get_matching_virtual,
8214 expand_vbase_vtables_init, expand_indirect_vtbls_init): Update.
8215 * cvt.c (convert_pointer_to_real): cleanup error message.
8216 * decl.c (grokfndecl): General cleanup.
8217 * decl.c (finish_function): Change init_vtbl_ptrs call to
8218 expand_direct_vtbls_init. Change expand_vbase_vtables_init call to
8219 expand_indirect_vtbls_init.
8220 * init.c (expand_virtual_init): Remove unneeded argument.
8221 * init.c (init_vtbl_ptrs): Rename to expand_direct_vtbls_init, added
8222 two arguments to make more general. Made more general. Now can be
8223 used for vtable pointer initialization from virtual bases.
8224 * init.c (emit_base_init): Change expand_vbase_vtables_init call to
8225 expand_indirect_vtbls_init. Change init_vtbl_ptrs call to
8226 expand_direct_vtbls_init.
8227 * init.c (expand_virtual_init): General cleanup.
8228 * init.c (expand_default_init): Change expand_vbase_vtables_init
8229 call to expand_indirect_vtbls_init.
8230 * init.c (expand_recursive_init_1): Change expand_vbase_vtables_init
8231 call to expand_indirect_vtbls_init.
8232 * init.c (expand_recursive_init): Change expand_vbase_vtables_init
8233 call to expand_indirect_vtbls_init.
8234 * search.c (get_first_matching_virtual): Rename to
8235 get_matching_virtual. General cleanup and remove setting of
8236 DECL_CONTEXT. That is now done in a cleaner way in
8237 modify_vtable_entry and add_virtual_function.
8238 * search.c (expand_vbase_vtables_init): Rename to
8239 expand_indirect_vtbls_init. General cleanup. Use
8240 expand_direct_vtbls_init to do hard work. Ensures that _all_ vtable
8241 pointers from virtual bases are set up.
8242 * search.c (bfs_unmark_finished_struct, unmark_finished_struct):
8245 * *.[chy]: Remove support for VTABLE_USES_MASK.
8247 Tue Apr 19 12:51:59 1994 Jason Merrill (jason@deneb.cygnus.com)
8249 * cvt.c (convert_to_reference): Use NOP_EXPRs to switch between
8250 reference and pointer types instead of bashing the types directly.
8252 * call.c (build_overload_call_real): Use the TREE_CODE to determine
8253 whether the function is overloaded or not, rather than
8255 * *: Remove all uses of TREE_OVERLOADED.
8257 * decl.c (grokdeclarator): Only complain about initializing const
8258 fields when -ansi or -pedantic.
8260 Tue Apr 19 12:42:42 1994 Doug Evans (dje@canuck.cygnus.com)
8262 * cp-tree.h (THUNK_DELTA): frame_size is now a union.
8264 Mon Apr 18 00:17:13 1994 Jason Merrill (jason@deneb.cygnus.com)
8266 Do overloading on a block-by-block basis, not function-by-function.
8267 * decl.c: Lose overloads_to_forget.
8268 (struct binding_level): Add overloads_shadowed field.
8269 (poplevel): Restore overloads_shadowed.
8270 (push_overloaded_decl): Use overloads_shadowed instead of
8271 overloads_to_forget.
8272 (finish_function): Don't look at overloads_to_forget.
8274 Copy enum_overflow logic from c-decl.c.
8275 * decl.c (start_enum): Initialize enum_overflow.
8276 (build_enumerator): Use enum_overflow. Also use current_scope().
8278 * search.c (current_scope): Move Brendan's comment from
8279 build_enumerator here.
8281 * typeck.c (convert_for_assignment): Change warnings to pedwarns for
8282 discarding const/volatile.
8284 Sat Apr 16 01:18:21 1994 Jason Merrill (jason@deneb.cygnus.com)
8286 * typeck.c (comp_target_parms): Accept TEMPLATE_TYPE_PARMs on the rhs.
8287 (comp_target_types): Ditto.
8289 * decl.c (lookup_name): Don't unset got_scope here.
8291 * spew.c (yylex): Only replace yylval with the TYPE_NESTED_NAME if
8292 got_scope != NULL_TREE.
8294 Fri Apr 15 16:36:33 1994 Jason Merrill (jason@deneb.cygnus.com)
8296 Horrible kludge to prevent templates from being instantiated by
8298 * parse.y (template_instantiate_once): Unset TYPE_BEING_DEFINED
8299 before we get to left_curly.
8300 * pt.c (instantiate_class_template): Set TYPE_BEING_DEFINED.
8302 * error.c (dump_decl): If it's a typedef, print out the name of the
8303 decl, not just the underlying type.
8305 * decl.c (pushdecl): If the old duplicate decl was a TYPE_DECL,
8306 update the IDENTIFIER_TYPE_VALUE of its name.
8308 * decl2.c (finish_file): When processing the initializer for a
8309 static member, pretend that the dummy function is a member of the
8312 Fri Apr 15 15:56:35 1994 Kung Hsu (kung@mexican.cygnus.com)
8314 * class.c (build_vtable_entry): revert Apr 4 change.
8315 * decl2.c (mark_vtable_entries): replace pure virtual function
8318 Fri Apr 15 13:49:33 1994 Jason Merrill (jason@deneb.cygnus.com)
8320 * typeck.c (build_conditional_expr): Pedwarn on pointer/integer
8321 mismatch, and don't pedwarn on 0/function pointer mismatch.
8323 * typeck2.c (digest_init): Lose code for special handling of unions.
8324 (process_init_constructor): Since they're handled just fine here.
8325 Pedwarn on excess elements.
8327 * decl2.c (grokfield): Complain about local class method declaration
8330 Fri Apr 15 13:19:40 1994 Per Bothner (bothner@kalessin.cygnus.com)
8332 * method.c (emit_thunk): Add extern declaration for
8333 current_call_is_indirect (needed for hppa).
8335 Thu Apr 14 16:12:31 1994 Jason Merrill (jason@deneb.cygnus.com)
8337 Improve local class support; allow classes in different blocks to
8339 * decl.c (pushtag): Support local classes better.
8340 (pushdecl_nonclass_level): New function for pushing mangled decls of
8341 nested types into the appropriate scope.
8342 (xref_defn_tag): Use pushdecl_nonclass_level instead of
8344 (grokfndecl): Don't mess with IDENTIFIER_GLOBAL_VALUE for local
8346 * method.c (do_inline_function_hair): Ditto.
8348 * class.c (finish_struct): It is legal for a class with no
8349 constructors to have nonstatic const and reference members.
8351 Thu Apr 14 07:15:11 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
8353 * decl.c (push_overloaded_decl): Avoid giving errors about
8354 built-ins, since duplicate_decls will have given warnings/errors
8357 Thu Apr 14 03:45:12 1994 Jason Merrill (jason@deneb.cygnus.com)
8359 * cvt.c (convert_to_reference): Warn about casting pointer type to
8360 reference type when this is probably not what they wanted.
8362 Wed Apr 13 13:12:35 1994 Per Bothner (bothner@kalessin.cygnus.com)
8364 * decl.c (finish_decl): Don't mindlessly set TREE_USED for
8365 static consts any more (toplev.c has now been modified to
8366 not emit warnings if they are unused).
8368 Wed Apr 13 00:22:35 1994 Jason Merrill (jason@deneb.cygnus.com)
8370 * decl.c (grok_op_properties): If op new/delete get here with
8371 METHOD_TYPEs, do a revert_static_member_fn.
8373 * cp-tree.h (IDENTIFIER_CLASS_TYPE_VALUE): Lose.
8374 * init.c (is_aggr_typedef): Don't look at
8375 IDENTIFIER_CLASS_TYPE_VALUE.
8376 (get_aggr_from_typedef): Ditto.
8377 (get_type_value): Ditto.
8378 * call.c (build_scoped_method_call): Don't rely on overloaded
8379 template names having IDENTIFIER_CLASS_VALUE set.
8381 * parse.y (component_decl_1, fn.def2): Revert rules for
8383 (component_decl_1, fn.def2): Use $1 instead of $$, since $$ is being
8386 * decl.c (start_function): Only warn about `void main()' if pedantic
8387 || warn_return_type.
8389 Tue Apr 12 02:14:17 1994 Jason Merrill (jason@deneb.cygnus.com)
8391 Clean up overloading of the template name.
8392 * class.c (pushclass): overload the template name whenever pushing
8393 into the scope of a template class, not just if it is
8395 (popclass): Correspondingly.
8396 * search.c (push_class_decls): Don't overload_template_name.
8397 * pt.c (overload_template_name): Don't set IDENTIFIER_LOCAL_VALUE or
8398 DECL_CONTEXT on things.
8399 * parse.y (left_curly): Don't overload_template_name.
8400 * class.c (finish_struct): Don't undo_template_name_overload.
8402 * method.c (build_opfncall): Only pass one argument to global op
8405 * call.c (build_method_call): Use TYPE_VEC_DELETE_TAKES_SIZE to
8406 decide how many arguments to use for vec delete.
8408 * decl.c (grok_op_properties): Be consistent in modifying
8410 (grokdeclarator): Only complain about function decls with no return
8411 type if we're being pedantic.
8413 Mon Apr 11 00:10:53 1994 Jason Merrill (jason@deneb.cygnus.com)
8415 Add support for operator new [] and operator delete [].
8417 * tree.def: Add VEC_NEW_EXPR and VEC_DELETE_EXPR.
8418 * ptree.c (print_lang_type): Indicate vec new/delete.
8419 * parse.y: Support vec new/delete.
8420 * method.c (build_decl_overload): Deal with vec new/delete.
8421 (build_opfncall): Ditto.
8422 * lex.c (init_lex): Set up values of ansi_opname and opname_tab for
8423 vec new/delete. vec new uses "__vn", and vec delete uses "__vd".
8424 * init.c (init_init_processing): Set up BIVN and BIVD.
8425 (do_friend): Don't clean up after mistaken setting of TREE_GETS_NEW,
8426 since it doesn't happen any more.
8427 (build_new): Support vec new. Always call something.
8428 (build_x_delete): Support vec delete.
8429 (build_vec_delete): Lose dtor_dummy argument, add use_global_delete,
8430 and pass it to build_x_delete.
8431 * decl2.c (delete_sanity): Don't change behavior by whether or not
8432 the type has a destructor. Pass use_global_delete to
8434 (coerce_delete_type): Make sure that the type returned has a first
8435 argument of ptr_type_node.
8436 * decl.c (init_decl_processing): Also declare the global vec
8438 (grokdeclarator): Also force vec new/delete to be static.
8439 (grok_op_properties): Note presence of vec new/delete, and play with
8440 their args. If vec delete takes the optional size_t argument, set
8441 TYPE_VEC_DELETE_TAKES_SIZE.
8442 * cp-tree.h (TYPE_GETS_{REG,VEC}_DELETE): New macros to simplify
8443 checking for one delete or the other.
8444 (lang_type): gets_new and gets_delete are now two bits long. The
8445 low bit is for the non-array version. Lose gets_placed_new.
8446 (TYPE_VEC_DELETE_TAKES_SIZE): New macro indicating that the vec
8447 delete defined by this class wants to know how much space it is
8449 (TYPE_VEC_NEW_USES_COOKIE): New macro to indicate when vec new must
8450 add a header containing the number of elements in the vector; i.e.
8451 when the elements need to be destroyed or vec delete wants to know
8453 * class.c (finish_struct_methods): Also check for overloading vec
8455 * call.c (build_method_call): Also delete second argument for vec
8458 * decl.c (grokdeclarator): Correct complaints again.
8459 (grokdeclarator): Fix segfault on null declarator.
8460 (decls_match): Also accept redeclaration with no arguments if both
8461 declarations were in C context. Bash TREE_TYPE (newdecl) here.
8462 (duplicate_decls): Instead of here.
8464 * parse.y (nested_name_specifier_1): Lose rules for dealing with
8465 syntax errors nicely, since they break parsing of 'const i;'.
8467 * decl.c (lookup_name): if (got_scope == current_class_type)
8468 val = IDENTIFIER_CLASS_VALUE (name).
8470 * search.c (lookup_nested_tag): Look in enclosing classes, too.
8472 * spew.c (yylex): Only look one character ahead when checking for a
8475 * lex.c (check_newline): Read first nonwhite char before
8476 incrementing lineno.
8478 * decl.c (grokdeclarator): Don't claim that typedefs are variables
8481 * parse.y: Divide up uses of unqualified_id into
8482 notype_unqualified_id and unqualified_id, so that TYPENAME can be
8483 used as an identifier after an object.
8485 * class.c (push_nested_class): Don't push into non-class scope.
8487 * decl.c (grokdeclarator): If an identifier could be a type
8488 conversion operator, but has no associated type, it's not a type
8489 conversion operator.
8491 * pt.c (unify): Check for equality of constants better.
8493 * decl.c (grokdeclarator): Don't complain about access decls.
8495 Sun Apr 10 02:39:55 1994 Jason Merrill (jason@deneb.cygnus.com)
8497 * decl.c (grokdeclarator): pedwarn about data definitions without
8500 * parse.y (datadef): Don't pedwarn about decls without types here,
8501 since that is valid for functions.
8502 (fn.def2, component_decl): Support constructors with declmods again.
8503 (nomods_initdecls): For decls without any mods, so that we don't try
8504 to get declspecs from some arbitrary $0.
8506 * search.c (lookup_field): Use cp_error.
8508 * parse.y (nested_name_specifier_1): Don't check aggr/non-aggr type
8509 here; it breaks destructors for non-aggr types.
8511 * decl.c (lookup_name): Only look for TYPE_DECLs in base classes of
8512 a type being defined, like the comment says.
8513 If got_scope is not an aggregate, just return NULL_TREE.
8515 * pt.c (create_nested_upt): Kung's code for creating types nested
8516 within uninstantiated templates now lives here (it used to live in
8517 hack_more_ids). It needs to be expanded.
8519 * parse.y: Stop calling see_typename so much.
8521 * decl.c (lookup_name): Deal with TTPs and UPTs.
8523 * lex.c (real_yylex): Don't set looking_for_typename just because we
8525 (dont_see_typename): #if 0 out.
8527 * spew.c (yylex): Increment looking_for_typename if the next
8528 character is SCOPE, rather than setting it to 1; this way, the value
8529 from seeing an aggr specifier will not be lost. This kinda relies
8530 on looking_for_typename never being < 0, which is now true.
8532 * parse.y (nested_name_specifier_1): Accept TEMPLATE_TYPE_PARMs,
8534 (named_class_head_sans_basetype): Accept template types, too. Oops.
8536 Fri Apr 8 16:39:35 1994 Jason Merrill (jason@deneb.cygnus.com)
8538 * decl2.c (reparse_decl_as_expr1): Handle SCOPE_REFs.
8540 * parse.y: Lose START_DECLARATOR.
8542 * search.c (lookup_nested_tag): New function to scan CLASSTYPE_TAGS
8545 * parse.y: Simplify fn.def2 and component_decl. Support 'enum
8546 A::foo' syntax. Catch invalid scopes better.
8548 * parse.y, lex.c: lose TYPENAME_COLON.
8550 * decl2.c (groktypefield): #if 0 out.
8552 * decl.c (lookup_name): If the type denoted by got_scope is
8553 currently being defined, look in CLASSTYPE_TAGS rather than FIELDS.
8555 * class.c (push_nested_class): Don't try to push into
8558 Fri Apr 8 07:26:36 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
8560 * Makefile.in (stamp-parse): Update count of conflicts to 33.
8562 Thu Apr 7 17:47:53 1994 Jason Merrill (jason@deneb.cygnus.com)
8564 A saner implementation of nested types that treats template types
8565 no differently from non-template types. There are still some
8566 shortcomings of our system; most notably, it is difficult to look
8567 for a nested type that is hidden by another name, because of the way
8568 we keep track of hidden types. But this shouldn't be a problem for
8569 just about anyone. Perhaps lookup_field should be fixed up a bit.
8571 * spew.c: Moved handling of nested types/scoping from the lexer
8572 into the parser. Removed variable template_type_seen_before_scope.
8573 Removed functions frob_identifier, hack_more_ids, and various cruft
8574 that was #if 0'd out in the past, reducing the size of the file from
8575 1146 lines to 450 lines. We can't quite do away with spew.c yet,
8576 though; we still need it for do_aggr () and checking for SCOPE after
8577 the current identifier. And setting lastiddecl.
8579 * parse.y: Moved handling of nested types/scoping from the lexer
8580 into the parser, using a new global variable `got_scope'. Reduced
8581 the number of states by 53. Implemented all uses of explicit global
8582 scope. Removed terminals SCOPED_TYPENAME and SCOPED_NAME. Removed
8583 nonterminals tmpl.1, scoped_base_class, id_scope, typename_scope,
8584 scoped_typename. Added nonterminals nested_type,
8585 qualified_type_name, complete_type_name, qualified_id, ptr_to_mem,
8586 nested_name_specifier, global_scope, overqualified_id, type_name.
8587 Changed many others. Added 9 new reduce/reduce conflicts, which are
8588 nested type parallels of 9 that were already in the grammar for
8589 non-nested types. Eight of the now 33 conflicts should be removed
8590 in the process of resolving the late binding between variable and
8593 * gxxint.texi (Parser): Update.
8595 * cp-tree.h (IS_AGGR_TYPE_CODE): Add UNINSTANTIATED_P_TYPE.
8597 * lex.h: Add decl for got_scope.
8599 * lex.c (see_typename): Claim to be the lexer when calling
8602 * decl.c (lookup_name): When called from the lexer, look at
8603 got_scope and looking_at_typename; otherwise don't.
8605 Thu Apr 7 22:05:47 1994 Mike Stump <mrs@cygnus.com>
8607 31th Cygnus<->FSF merge.
8609 Thu Apr 7 17:47:53 1994 Jason Merrill (jason@deneb.cygnus.com)
8611 * decl2.c (mark_vtable_entries): Call this to mark all the
8612 entries in the vtable addressable.
8613 (finish_decl_parsing): Handle SCOPE_REFs.
8615 * decl.c (decls_match): Always call compparms with strict == 1.
8616 Handle the special case of C function redecl here.
8617 (duplicate_decls): Only keep the old type if the new decl takes no
8620 * typeck.c (compparms): Also allow t1 to be ... if strict == 0.
8622 Thu Apr 7 16:17:50 1994 Mike Stump <mrs@cygnus.com>
8624 * class.c (build_vtable_entry): Fix breakage introduced Apr 5
8627 Wed Apr 6 16:05:10 1994 Per Bothner (bothner@kalessin.cygnus.com)
8629 * init.c (build_virtual_init), search.c (build_vbase_vtables_init),
8630 ch-tree.h: Every place these functions were called, the result was
8631 immediately passed to expand_expr_stmt. Reduce redundancy by
8632 calling expand_expr_init *inside* these functions. These
8633 makes for a simpler interface, and we don't have to build
8634 compound expressions. Hence, rename these function to:
8635 expand_virtual_init and expand_vbase_vtables_init respectively.
8636 * init.c, decl.c: Change callers of these functions.
8637 * init.c, cp-tree.h (expand_virtual_init): Make static.
8639 * decl2.c (finish_file): Check TREE_PUBLIC||TREE_ADDRESSABLE
8640 rather than DECL_SAVED_INSNS before emitting inlines.
8642 Wed Apr 6 13:06:39 1994 Jason Merrill (jason@deneb.cygnus.com)
8644 * spew.c (init_spew): #if 0 out stuff used by arbitrate_lookup.
8646 * decl.c (duplicate_decls): If this is a new declaration of an
8647 extern "C" function, keep the type (for the argtypes).
8648 (redeclaration_error_message): Don't check DECL_LANGUAGE here.
8649 (decls_match): Call compparms with a value of strict dependent on
8650 the value of strict_prototypes for DECL_LANGUAGE (oldecl).
8652 * typeck.c (compparms): ... is only equivalent to non-promoting
8653 parms if we're not being strict.
8655 * parse.y (empty_parms): Don't check flag_ansi || pedantic here.
8657 * decl.c (init_decl_processing): if (flag_ansi || pedantic)
8658 strict_prototypes_lang_c = strict_prototypes_lang_cplusplus;
8660 * decl2.c (grok_function_init): Don't set DECL_INITIAL on pure
8663 Tue Apr 5 17:48:41 1994 Per Bothner (bothner@kalessin.cygnus.com)
8665 Support for implementing vtables with thunks.
8666 * tree.def (THUNK_DECL): New TREE_CODE.
8667 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY), tree.c
8668 (fnaddr_from_vtable_entry): Handle flag_vtable_thunks case.
8669 * cp-tree.h (memptr_type): New variable.
8670 * class.c (build_vtable_entry): Build thunk if necessary.
8671 * class.c (build_vfn_ref): If using thunks, don't need
8672 to add delta field from vtable (there is none!).
8673 * decl.c: Add memptr_type as well as vtable_entry_type.
8674 If using thunks, the latter is just ptr_type_node.
8675 * gc.c, typeck.c: Use memptr_typeChange, not vtable_entry_type.
8676 * decl2.c (finish_vtable_vardecl): Handle thunks.
8677 * expr.c (cplus_expand_expr): Support THUNK_DECL.
8679 * decl.c (grokdeclarator): Set DECL_THIS_EXTERN if "extern".
8680 * decl.c (start_function): Set current_extern_inline based on
8681 DECL_THIS_EXTERN, not TREE_PUBLIC.
8682 * decl.c (finish_function): Call mark_inline_for_output if needed,
8684 Improve intelligence about when to emit inlines.
8685 * cp-tree.h (lang_decl_flags): New field saved_inline.
8686 * cp-tree.h (DECL_SAVED_INLINE): New macro.
8687 * class.c (add_virtual_function): Don't set TREE_ADDRESSABLE.
8688 * decl.h, decl.c (pending_addressable_inlines): Removed.
8689 * decl2.c (pending_addressable_inlines): Renamed to saved_inlines.
8690 * decl2.c (mark_inline_for_output): Do nothing if
8691 DECL_SAVED_INLINE; otherwise set it (and add to saved_inlines list).
8692 * decl2.c (finish_vtable_vardecl): SET_CLASSTYPE_INTERFACE_KNOWN
8693 and set CLASSTYPE_INTERFACE_ONLY if there is a non-inline virtual.
8694 * decl2.c (finish_file): Writing out inlines later, so we can
8695 also handle the ones needed for vtbales.
8696 * decl2.c (write_vtable_entries, finish_vtable_typedecl): Removed.
8698 * cp-tree.h, class.c, decl2.c, search.c: Remove -fvtable-hack
8699 and flag_vtable_hack. Use -fvtable-thunks and flag_vtable_thunks
8700 instead. (The rationale is that these optimizations both break binary
8701 compatibility, but should become the default in a future release.)
8703 Wed Apr 6 10:53:56 1994 Mike Stump <mrs@cygnus.com>
8705 * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT
8706 of a fndecl, as we might not be from that vfield.
8708 Tue Apr 5 17:43:35 1994 Kung Hsu (kung@mexican.cygnus.com)
8710 * class.c (add_virtual_function): fix bug for pure virtual, so
8711 that DECL_VINDEX of the dummy decl copied won't be error.
8712 (see also Apr 4 change)
8714 Tue Apr 5 17:23:45 1994 Per Bothner (bothner@kalessin.cygnus.com)
8716 * typeck.c (c_expand_return): Before checking that we're not
8717 returning the address of a local, make sure it's a VAR_DECL.
8718 (And don't worry about it being a TREE_LIST.)
8720 Tue Apr 5 13:26:42 1994 Jason Merrill (jason@deneb.cygnus.com)
8722 * parse.y (YYDEBUG): Always define.
8723 * lex.c (YYDEBUG): Ditto.
8725 Mon Apr 4 11:28:17 1994 Kung Hsu (kung@mexican.cygnus.com)
8727 * class.c (finish_struct): backup out the change below, put the
8728 new change for the same purpose. The change below breaks code.
8730 * class.c (finish_struct): if pure virtual, copy node and make
8731 RTL point to abort, then put in virtual table.
8732 * decl2.c (grok_function_iit): reinstate Mar 31 change.
8734 Sat Apr 2 03:12:58 1994 Jason Merrill (jason@deneb.cygnus.com)
8736 * init.c (build_new): pedwarn about newing const and volatile
8739 * tree.c (get_identifier_list): Only do the special handling
8740 thing if we're dealing with the main variant of the record type.
8742 * cvt.c (convert_to_reference): When converting between
8743 compatible reference types, use the pointer conversion machinery.
8744 Don't just blindly overwrite the old type.
8746 Fri Apr 1 17:14:42 1994 Jason Merrill (jason@deneb.cygnus.com)
8748 * call.c (build_method_call): When looking at global functions,
8749 be sure to use instance_ptr for the first argument, not some version
8750 of it that has been cast to a base class. Also do this before
8751 comparing candidates.
8753 Thu Mar 31 19:50:35 1994 Jason Merrill (jason@deneb.cygnus.com)
8755 * call.c (build_method_call): Constructors can be called for
8758 Thu Mar 31 16:20:16 1994 Kung Hsu (kung@mexican.cygnus.com)
8760 * decl2.c (grok_func_init): do not abort as rtl for pur virtual
8761 fucntions. They can be defined somewhere else.
8763 Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
8765 * decl.c (init_decl_processing): Declare __builtin_return_address
8766 and __builtin_frame_address for C++ as well.
8768 Thu Mar 31 12:35:49 1994 Mike Stump <mrs@cygnus.com>
8770 * typeck2.c (store_init_value): Integral constant variables are
8771 always constant, even when doing -fpic.
8773 Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
8775 * decl.c (redeclaration_error_message): Pass the types to
8778 Wed Mar 30 21:29:25 1994 Mike Stump <mrs@cygnus.com>
8780 Cures incorrect errors about pure virtuals in a class, when they
8781 have been overridden in a derived class.
8783 * search.c (get_abstract_virtuals): Reimplement.
8784 * search.c (get_abstract_virtuals_1): New routine.
8786 Wed Mar 30 14:10:04 1994 Jason Merrill (jason@deneb.cygnus.com)
8788 * pt.c (push_template_decls): Make the pushed level pseudo
8791 * parse.y (extdefs): Don't pop everything if the current binding
8792 level is pseudo_global.
8794 * decl.c (pop_everything): Stop on reaching a pseudo-global
8797 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Change to more reliable test.
8799 * decl.c (duplicate_decls): Only copy DECL_SOURCE_{FILE_LINE} if
8800 the old decl actually had an initializer.
8802 * {various}: Clean up gcc -W complaints.
8804 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Currently defined to be
8805 (DECL_CONTEXT (NODE) != NULL_TREE).
8807 * parse.y (lang_extdef): Call pop_everything if necessary.
8809 * decl.c (pop_everything): New function for popping binding
8810 levels left over after a syntax error.
8811 (pushdecl): Use DECL_FUNCTION_MEMBER_P to decide whether or not
8812 a function is a member.
8814 Wed Mar 30 14:20:50 1994 Mike Stump <mrs@cygnus.com>
8816 Cures calling a more base base class function, when a more derived
8817 base class member should be called in some MI situations.
8819 * search.c (make_binfo): Use more the more specialized base
8820 binfos from the binfo given as the second argument to make_binfo,
8821 instead of the unspecialized ones from the TYPE_BINFO.
8822 * class.c (finish_base_struct): Ditto, update callers.
8823 * search.c (dfs_get_vbase_types): Ditto.
8824 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Ditto.
8825 * decl.c (xref_tag): Use NULL_TREE instead of 0.
8826 * lex.c (make_lang_type): Ditto.
8828 Wed Mar 30 14:10:04 1994 Jason Merrill (jason@deneb.cygnus.com)
8830 * decl.c (pushdecl): If pushing a C-linkage function, only do a
8831 push_overloaded_decl.
8832 (duplicate_decls): Standard overloading does not shadow built-ins.
8834 Tue Mar 29 00:54:18 1994 Jason Merrill (jason@deneb.cygnus.com)
8836 * pt.c (end_template_decl): Don't call push_overloaded_decl.
8838 * init.c (do_friend): Don't call push_overloaded_decl.
8840 * decl.c (pushdecl): Call push_overloaded_decl for functions and
8842 (duplicate_decls): functions and function templates are not
8843 duplicates, but don't complain about calling this function to
8845 (push_overloaded_decl): Don't deal with linkage. Call
8847 (redeclaration_error_message): Deal with linkage.
8849 * decl.c (start_function): If push_overloaded_decl returns an
8850 older version of the function, deal with it.
8852 * decl.c (start_function): Be sure only to push_overloaded_decl
8855 * decl.c (grokfndecl): Put back clearing of DECL_CHAIN for
8857 (start_function): Lose broken and redundant code for checking old
8860 * init.c (add_friend): Give line numbers of both friend decls
8861 when warning about re-friending.
8863 * pt.c (tsubst): Use comptypes rather than == to compare the
8864 types of the method as declared and as defined, since default
8865 parameters may be different.
8867 * call.c (build_method_call): Use brendan's candidate printing
8870 * decl.c (start_method): Methods defined in the class body are
8871 inline whether or not it's a template class.
8873 Mon Mar 28 16:39:26 1994 Jason Merrill (jason@deneb.cygnus.com)
8875 * parse.y (initdcl0): Add "extern" to current_declspecs if
8876 have_extern_spec && ! used_extern_spcec.
8878 * tree.c (really_overloaded_fn): A fn with more than one
8881 * pt.c (end_template_decl): Use really_overloaded_fn.
8883 * decl.c (duplicate_decls): When smashing a decl into a previous
8884 definition, keep the old file and line.
8885 Don't deal with overloaded functions.
8886 Lose old code for checking arg types of functions.
8887 Check for overloaded C functions.
8888 (pushdecl): Deal with overloaded functions.
8889 (start_decl): Expect pushdecl to return an appropriate function decl.
8890 (start_function): Ditto.
8891 (push_overloaded_decl): Don't check for overloaded C functions.
8893 * *.c: Stop using DECL_OVERLOADED, it being archaic.
8894 TREE_OVERLOADED should probably go, too.
8896 Mon Mar 28 14:00:45 1994 Ron Guilmette (rfg@netcom.com)
8898 * typeck.c (comp_target_types): Call comp_target_parms with
8901 Sun Mar 27 00:07:45 1994 Jason Merrill (jason@deneb.cygnus.com)
8903 * parse.y (empty_parms): Don't parse () as (...) in extern "C"
8904 sections if we're compiling with -ansi or -pedantic.
8906 * decl.c (decls_match): Don't treat (int) and (int&) as matching.
8908 * decl2.c (grokfield): Don't pedwarn twice about initializing
8911 * decl.c (push_overloaded_decl): Warn about shadowing
8913 (redeclaration_error_message): Don't allow 'int a; int a;'
8915 * cvt.c (build_up_reference): Only check for valid upcast if
8916 LOOKUP_PROTECT is set, not just any flag.
8918 Fri Mar 25 01:22:31 1994 Jason Merrill (jason@deneb.cygnus.com)
8920 * lex.c (check_newline): When we see a #pragma implementation,
8921 also set it for the main input file.
8923 * init.c (build_new): Convert array size argument to size_t.
8925 * parse.y (primary): If we're doing a parenthesized type-id, call
8926 groktypename before passing it to build_new.
8928 * call.c (build_method_call): Deal properly with const and
8929 volatile for instances of reference type.
8931 * decl.c (store_return_init): Change 'if (pedantic) error' to 'if
8932 (pedantic) pedwarn'.
8934 * decl.c (grokdeclarator): Don't complain about putting `static'
8935 and `inline' on template function decls.
8937 Thu Mar 24 23:18:19 1994 Jason Merrill (jason@deneb.cygnus.com)
8939 * call.c (build_method_call): Preserve const & volatile on
8942 Thu Mar 24 16:21:52 1994 Mike Stump <mrs@cygnus.com>
8944 * init.c (build_new, build_vec_delete): Use global new and delete
8946 * decl2.c (delete_sanity): Ditto.
8948 Thu Mar 24 02:10:46 1994 Jason Merrill (jason@deneb.cygnus.com)
8950 * cvt.c (convert_to_reference): If i is an lvalue,
8951 (int &)i -> *(int*)&i, as per 5.2.8p9 of the latest WP.
8952 (convert_force): Call convert_to_reference with LOOKUP_COMPLAIN.
8954 Wed Mar 23 17:45:37 1994 Jason Merrill (jason@deneb.cygnus.com)
8956 * decl.c (duplicate_decls): Also propagate DECL_TEMPLATE_MEMBERS
8957 and DECL_TEMPLATE_INSTANTIATIONS.
8959 * init.c (build_new): Handle array typedefs properly.
8961 Wed Mar 23 18:23:33 1994 Mike Stump <mrs@cygnus.com>
8963 30th Cygnus<->FSF merge.
8965 Wed Mar 23 00:46:24 1994 Mike Stump <mrs@cygnus.com>
8967 * class.c (modify_vtable_entries): Avoid running off the end of the
8968 virtuals list when processing a virtual destructor.
8969 * class.c (get_vtable_entry): Ditto.
8971 Wed Mar 23 00:23:59 1994 Jason Merrill (jason@deneb.cygnus.com)
8973 * decl.c (duplicate_decls): If two template decls don't match,
8976 Tue Mar 22 23:49:41 1994 Jason Merrill (jason@deneb.cygnus.com)
8978 * typeck.c (convert_for_assignment): Don't pedwarn about
8979 converting function pointer to void *.
8981 Tue Mar 22 22:23:19 1994 Mike Stump <mrs@cygnus.com>
8983 Major revamp of pointer to member functions. Cures major
8984 nonfunctionality when used in casts, and MI situations.
8986 * cvt.c (convert_force): Update call site of build_ptrmemfunc.
8987 * typeck.c (convert_for_assignment): Ditto.
8988 * typeck2.c (digest_init): Ditto.
8989 * typeck2.c (process_init_constructor): Simplify by moving code into
8991 * typeck2.c (digest_init): Do default_conversions on init value, if
8992 we are processing pointer to member functions.
8993 * class.c (get_vfield_offset): Now non-static. Convert bit offset
8995 * cp-tree.h (get_vfield_offset): Ditto.
8996 * typeck.c (get_member_function_from_ptrfunc): Convert down to right
8997 instance, before fetching vtable pointer.
8998 * typeck.c (get_delta_difference): New routine.
8999 * typeck.c (build_ptrmemfunc): Revamp to handle casting better, also
9000 get vtable pointer out of right subobject.
9002 Tue Mar 22 17:56:48 1994 Mike Stump <mrs@cygnus.com>
9004 * search.c (get_binfo): Return NULL instead of aborting, when
9005 passed a UNION_TYPE.
9007 Tue Mar 22 12:44:54 1994 Jason Merrill (jason@deneb.cygnus.com)
9009 These patches implement handling of redefinition/redeclaration of
9012 * typeck.c (comptypes): Simplify. All TEMPLATE_TYPE_PARMs are
9013 considered compatible.
9015 * parse.y (template_def): Pass defn argument to end_template_decl.
9017 * pt.c (end_template_decl): Add defn argument. Check for
9018 redefinition. Simplify.
9020 * error.c (OB_UNPUT): New macro, to remove mistakes.
9021 (aggr_variety): Subroutine of dump_aggr_type.
9023 * decl.c (decls_match): Support templates.
9024 (duplicate_decls): No longer static. Don't try to lay out template
9026 (pushdecl): Simplify.
9028 * cp-tree.h (DECL_TEMPLATE_MEMBERS): Use DECL_SIZE instead of
9031 Mon Mar 21 11:46:55 1994 Jason Merrill (jason@deneb.cygnus.com)
9033 * error.c (dump_decl): Support class template decls.
9034 (dump_type): Don't adorn template type parms.
9036 * decl.c (duplicate_decls): Save DECL_TEMPLATE_INFO from old decl
9037 if it was a definition.
9038 (redeclaration_error_message): Do the cp_error thang, and reject
9039 redefinition of templates.
9041 Mon Mar 21 19:36:06 1994 Per Bothner (bothner@kalessin.cygnus.com)
9043 * decl.c (grokdeclarator): Set TREE_PUBLIC for METHOD_TYPE
9044 in FIELD context, when appropriate. Also,
9045 CLASSTYPE_INTERFACE_ONLY is irrelevant to setting TREE_PUBLIC.
9046 Also, simplify check for bogus return specifiers.
9048 Mon Mar 21 11:46:55 1994 Jason Merrill (jason@deneb.cygnus.com)
9050 * parse.y (after_type_declarator1): Expand type_quals.
9051 (notype_declarator1): Ditto.
9054 Sat Mar 19 01:05:17 1994 Jason Merrill (jason@deneb.cygnus.com)
9056 * decl.c (grokdeclarator): Treat class-local typedefs like static
9057 members; i.e. 'typedef int f();' means that f is a function type,
9060 * parse.y (decl): Change direct_* back to *.
9061 (type_id): Change direct_abstract_declarator to absdcl.
9062 (direct_declarator, direct_initdecls, direct_initdcl0): Remove again.
9064 Fri Mar 18 12:47:59 1994 Jason Merrill (jason@deneb.cygnus.com)
9066 These two patches fix crashes on instantiating a template inside a
9067 function with C linkage or containing labels.
9069 * class.c (current_lang_stacksize): No longer static.
9071 * decl.c (struct saved_scope): Add lang_base, lang_stack,
9072 lang_name, lang_stacksize, and named_labels.
9073 (push_to_top_level): Save them.
9074 (pop_from_top_level): Restore them.
9076 * gxxint.texi (Parser): Update.
9078 These two patches finish moving the task of expr/declarator
9079 ambiguity resolution from the lexer to the parser, and add one more
9080 r/r conflict. START_DECLARATOR can now be nuked.
9082 * parse.y (decl): Add "direct_" in typespec X rules.
9083 (direct_declarator): New nonterminal for
9084 direct_after_type_declarator and direct_notype_declarator.
9085 (direct_initdecls): Like initdecls, but uses direct_initdcl0.
9086 (direct_initdcl0): Like initdcl0, but uses direct_declarator.
9087 (named_parm): Add typespec direct_declarator rule.
9089 * spew.c (yylex): #if 0 out START_DECLARATOR insertion.
9091 These two patches disable some excessive cleverness on the part of
9092 g++; a non-class declaration always hides a class declaration in the
9093 same scope, and g++ was trying to unhide it depending on the
9094 enclosing expression.
9096 * spew.c (arbitrate_lookup): #if 0 out.
9098 * decl.c (lookup_name): Never call arbitrate_lookup.
9100 * parse.y (complex_notype_declarator1): Add '*'
9101 complex_notype_declarator1 and '&' complex_notype_declarator1 rules.
9103 * parse.y (complex_direct_notype_declarator): Restore id_scope
9104 see_typename TYPENAME rule, remove all other rules beginning with
9106 (notype_unqualified_id): Add '~' see_typename IDENTIFIER rule.
9108 Thu Mar 17 17:30:01 1994 Jason Merrill (jason@deneb.cygnus.com)
9110 These changes fix the compiler's handling of the functional cast/
9111 object declaration ambiguities in section 6.8 of the ARM. They also
9112 add 11 reduce/reduce conflicts. Sigh.
9114 * parse.y: Add precedence decls for OPERATOR and '~'.
9115 (notype_unqualified_id): New nonterminal, encompasses all of the
9116 ANSI unqualified-id nonterminal except TYPENAMEs.
9117 (expr_or_declarator): New nonterminal to delay parsing of code like
9119 (primary): Use notype_unqualified_id.
9120 (decl): Add typespec initdecls ';' and typespec declarator ';'
9122 (initdcl0): Deal with the above.
9123 (complex_notype_declarator1): A notype_declarator that is not also
9124 an expr_or_declarator.
9125 (complex_direct_notype_declarator): A direct_notype_declarator that
9126 doesn't conflict with expr_or_declarator. Use
9127 notype_unqualified_id. Remove id_scope see_typename TYPENAME rule.
9128 (functional_cast): New nonterminal, for the three functional cast
9129 rules. So that they can be moved after
9130 complex_direct_notype_declarator.
9131 (see_typename): Don't accept type_quals any more.
9133 * decl2.c (reparse_decl_as_expr): New function to deal with parse
9134 nodes for code like `int (*a)++;'.
9135 (reparse_decl_as_expr1): Recursive subroutine of the above.
9136 (finish_decl_parsing): New function to deal with parse nodes for
9137 code like `int (*a);'. See the difference?
9139 Thu Mar 17 12:16:10 1994 Mike Stump <mrs@cygnus.com>
9141 These changes break binary compatibility in code with classes
9142 that use virtual bases.
9144 * search.c (dfs_get_vbase_types): Simplify and correct to make
9145 sure virtual bases are initialized in dfs ordering.
9146 * search.c (get_vbase_types): Simplify and make readable.
9148 Thu Mar 17 12:01:10 1994 Jason Merrill (jason@deneb.cygnus.com)
9150 * parse.y: s/ typename / type_id /g
9152 Wed Mar 16 17:42:52 1994 Kung Hsu (kung@mexican.cygnus.com)
9154 * parse.y (typespec): add SCOPE TYPENAME for global scoped
9157 * decl.c (complete_array_type): fix a bug that in -pendantic
9158 mode even there's no initializer, it will continue to build
9161 Wed Mar 16 17:43:07 1994 Jason Merrill (jason@deneb.cygnus.com)
9163 * parse.y (direct_notype_declarator): Add PTYPENAME rule, remove
9164 all of the scoped PTYPENAME rules.
9166 Wed Mar 16 16:39:02 1994 Mike Stump <mrs@cygnus.com>
9168 * init.c (build_offset_ref): The value of A::typedef_name is
9169 always the TYPE_DECL, and never an error.
9171 Tue Mar 15 20:02:35 1994 Jason Merrill (jason@deneb.cygnus.com)
9173 * search.c (get_base_distance_recursive): Two binfos can only
9174 represent the same object if they are both via_virtual.
9176 * class.c (finish_base_struct): Check vbases for ambiguity, too.
9178 * search.c (get_vbase_types): Accept binfo argument, too.
9180 Tue Mar 15 19:22:05 1994 Kung Hsu (kung@mexican.cygnus.com)
9182 * decl.c (complete_array_type): complete TYPE_DOMAIN of the
9183 initializer also, because back-end requires it.
9185 Tue Mar 15 15:33:31 1994 Jason Merrill (jason@deneb.cygnus.com)
9187 * error.c (dump_expr): Support member functions (which show up as
9190 Mon Mar 14 16:24:36 1994 Mike Stump <mrs@cygnus.com>
9192 * init.c (build_new): Set the return type of multidimensional
9195 Fri Mar 11 15:35:39 1994 Kung Hsu (kung@mexican.cygnus.com)
9197 * call.c (build_method_call): if basetype not equal to type
9198 of the instance, use the type of the instance in building
9201 Thu Mar 10 17:07:10 1994 Kung Hsu (kung@mexican.cygnus.com)
9203 * parse.y (direct_notype_declarator): add push_nested_type for
9204 'template_type SCOPED_NAME' rule.
9206 Tue Mar 8 00:19:58 1994 Jason Merrill (jason@deneb.cygnus.com)
9208 * parse.y (parm): Add typed_declspec1 {absdcl, epsilon} rules.
9210 Sat Mar 5 04:47:48 1994 Jason Merrill (jason@deneb.cygnus.com)
9212 * parse.y (regcast_or_absdcl): New nonterminal to implement late
9213 reduction of constructs like `int ((int)(int)(int))'.
9214 (cast_expr): Use it.
9215 (sub_cast_expr): Everything that can come after a cast.
9216 (typed_declspecs1): typed_declspecs that are not typed_typespecs.
9217 (direct_after_type_declarator): Lose PAREN_STAR_PAREN rule.
9218 (direct_abstract_declarator): Replace '(' parmlist ')' rule with
9219 '(' complex_parmlist ')' and regcast_or_absdcl.
9221 (complex_parmlist): Parmlists that are not also typenames.
9222 (parms_comma): Enabler.
9223 (named_parm): A parm that is not also a typename. Use declarator
9224 rather than dont_see_typename abs_or_notype_decl. Expand
9225 typed_declspecs inline.
9226 (abs_or_notype_decl): Lose.
9227 (dont_see_typename): Comment out.
9228 (bad_parm): Break out abs_or_notype_decl into two rules.
9230 Fri Mar 4 18:22:39 1994 Jason Merrill (jason@deneb.cygnus.com)
9232 * decl2.c (reparse_decl_as_casts): New function to change parse
9233 nodes for `(int)(int)(int)' from "function taking int and returning
9234 function taking int and returning function taking int" to "... cast
9235 to int, cast to int, cast to int".
9237 * decl2.c (reparse_decl_as_expr): Recursive function to change
9238 parse nodes for `A()()' from "function returning function returning
9239 A" to "A().operator()".
9241 * parse.y (primary): Replace `typespec LEFT_RIGHT' rule with
9242 `typespec fcast_or_absdcl' rule.
9243 (fcast_or_absdcl): New nonterminal to implement late reduction of
9244 constructs like `A()()()()'.
9245 (typename): Replace `typespec absdcl1' rule with
9246 `typespec direct_abstract_declarator' rule.
9247 (direct_abstract_declarator): Replace `LEFT_RIGHT type_quals' rule
9248 with `fcast_or_absdcl type_quals' rule.
9250 Fri Mar 4 16:18:03 1994 Mike Stump <mrs@cygnus.com>
9252 * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it
9253 matches Section 5.5.
9255 Fri Mar 4 14:01:59 1994 Jason Merrill (jason@deneb.cygnus.com)
9257 * error.c (dump_type_prefix): Don't print basetype twice for
9260 Fri Mar 4 13:24:33 1994 Mike Stump <mrs@cygnus.com>
9262 * typeck.c (convert_arguments): Handle setHandler(A::handlerFn)
9263 so that it is like setHandler(&A::handlerFn). Cures an `invalid
9264 lvalue in unary `&''.
9266 Fri Mar 4 11:15:59 1994 Jason Merrill (jason@deneb.cygnus.com)
9268 * gxxint.texi (Copying Objects): New section discussing default
9269 op= problems with virtual inheritance.
9271 * decl2.c (grokoptypename): Just does grokdeclarator and
9272 build_typename_overload, since the parser can't call grokdeclarator
9275 * method.c (build_typename_overload): Set IDENTIFIER_GLOBAL_VALUE
9276 and TREE_TYPE on generated identifiers.
9278 * decl.c (grokdeclarator): Don't deal with TYPE_EXPRs anymore.
9280 * parse.y (parm): Convert `const char *' to `__opPCc' here.
9282 * error.c (dump_decl): Say sorry rather than my_friendly_aborting
9283 if we can't figure out what to do.
9284 (dump_type*): Ditto.
9286 * typeck2.c (build_m_component_ref): 'component' is an expr, not
9287 a decl. Also move the IS_AGGR_TYPE check after the stripping of
9290 Fri Mar 4 04:46:05 1994 Mike Stump <mrs@cygnus.com>
9292 * call.c (build_method_call): Handle b->setHandler(A::handlerFn)
9293 so that it is like b->setHandler(&A::handlerFn). Cures an `invalid
9294 lvalue in unary `&''.
9296 Thu Mar 3 12:38:15 1994 Jason Merrill (jason@deneb.cygnus.com)
9298 * parse.y: Add precedence specification for START_DECLARATOR.
9299 (type_quals): Move before primary.
9300 (typename): Move before typed_declspecs, add 'typespec absdcl1' rule.
9302 * decl2.c (grokoptypename): Lose.
9304 * decl.c (grokdeclarator): Parse TYPE_EXPRs in the initial scan,
9305 rather than waiting until later.
9307 Wed Mar 2 14:12:23 1994 Jason Merrill (jason@deneb.cygnus.com)
9309 * parse.y (unary_expr): Use 'typename' in 'new' rules, rather
9310 than expanding it inline.
9311 (typename): Expand empty option of (former) absdcl inline.
9312 (abs_or_notype_decl): Ditto.
9313 (absdcl): Lose empty rule.
9314 (conversion_declarator): New nonterminal for 'typename' of 'operator
9316 (operator_name): Use it instead of absdcl.
9318 * parse.y: Add precedence declarations for SCOPED_TYPENAME,
9320 (typed_declspecs): Accept typed_typespecs, rather than typespec
9321 directly. Add rules with reserved_typespecquals.
9322 (reserved_declspecs): Don't accept typespecqual_reserved at the
9323 beginning of the list. The typed_declspecs rule will deal with this
9325 (declmods): Accept nonempty_type_quals, rather than TYPE_QUAL
9328 * parse.y (direct_notype_declarator,
9329 direct_after_type_declarator, direct_abstract_declarator): Split up
9330 the declarator1 nonterminals to match the draft standard and avoid
9332 (new_type_id, new_declarator, direct_new_declarator,
9333 new_member_declarator): New nonterminals to implement the subset of
9334 'typename' allowed in new expressions.
9335 (unary_expr): Use new_type_id instead of typename.
9336 (after_type_declarator1, absdcl1): Fix semantics of member pointers.
9337 (abs_member_declarator, after_type_member_declarator): Lose.
9339 * parse.y (absdcl1): Don't require parens around
9340 abs_member_declarator.
9341 (abs_member_declarator): Lose see_typename from rules.
9342 (after_type_member_declarator): Ditto.
9344 * tree.c (get_identifier_list): New function, containing code
9345 previously duplicated in get_decl_list and list_hash_lookup_or_cons.
9346 (get_decl_list): Use it.
9347 (list_hash_lookup_or_cons): Ditto.
9349 * parse.y (typed_declspecs, declmods): It's not necessary to hash
9350 the declspecs on class_obstack, so don't. This way typed_typespecs
9351 can reduce to typed_declspecs.
9353 Wed Mar 2 14:29:18 1994 Jason Merrill (jason@cygnus.com)
9355 * cvt.c (build_up_reference): If we aren't checking visibility,
9356 also allow base->derived conversions.
9358 Mon Feb 28 15:14:29 1994 Per Bothner (bothner@kalessin.cygnus.com)
9360 * typeck.c (build_c_cast): Remove bogus hack when converting
9361 to a reference type.
9363 * cp-tree.h (lang_decl::vbase_init_list, DECL_VBASE_INIT_LIST):
9365 (lang_stype::methods, lang_decl::next_method): New fields.
9366 (CLASSTYPE_METHODS, DECL_NEXT_METHOD): New macros.
9367 * decl.c (duplicate_decls): Preserve DECL_NEXT_METHOD.
9369 * cp-tree.h, decl2.c (flag_vtable_hack): New flag.
9370 * decl2.c (finish_vtable_vardecl): If flag_vtable_hack,
9371 and !CLASSTYPE_INTERFACE_KNOWN, try to use the presence of
9372 a non-inline virtual function to control emitting of vtables.
9373 * class.c (finish_struct): Build CLASSTYPE_METHODS list.
9374 * search.c (build_vbase_vtables_init): Don't assemble_external
9375 (yet) if flag_vtable_hack.
9376 * class.c (build_vfn_ref): Ditto.
9378 Mon Feb 28 14:54:13 1994 Jason Merrill (jason@deneb.cygnus.com)
9380 * parse.y (component_decl): Don't include "typed_declspecs
9381 declarator ';'" speedup, since it breaks enums.
9383 Fri Feb 25 15:43:44 1994 Per Bothner (bothner@kalessin.cygnus.com)
9385 * class.c (finish_struct): Minor optimization for building
9388 Fri Feb 25 15:23:42 1994 Jason Merrill (jason@deneb.cygnus.com)
9390 * decl.c (start_function): Fix detection of function overloading.
9392 Thu Feb 24 22:26:19 1994 Mike Stump <mrs@cygnus.com>
9394 * lex.c (check_newline): #pragma interface can take a string
9395 argument, just like #pragma implementation. #pragma implementation
9396 checks for garbage on the line, line #pragma interface does. Main
9397 input files do not auto implement like named files, #pragma
9398 implementation must be used explicitly.
9400 Thu Feb 24 17:09:01 1994 Jason Merrill (jason@deneb.cygnus.com)
9402 * parse.y (components): Handle list of one again.
9403 (notype_components): Ditto.
9404 (after_type_declarator1): Take maybe_raises out again.
9406 * gxxint.texi (Parser): Document additional r/r conflict.
9408 Wed Feb 23 14:42:55 1994 Jason Merrill (jason@deneb.cygnus.com)
9410 * gxxint.texi (Parser): Add node.
9412 * Makefile.in (stamp-parse): Update expected conflict count.
9414 * parse.y (various): Replace "declmods declarator" with "declmods
9415 notype_declarator". The comment saying that "declmods declarator ';'"
9416 corresponds to "int i;" was wrong; it corresponds to "const i;".
9417 (component_decl): Add "typed_declspecs declarator ';'" rule; this
9418 *does* correspond to "int i;". Change "declmods components" to
9419 "declmods notype_components".
9420 (components): Don't deal with a list of one anymore.
9421 (notype_components): New nonterminal, corresponds to notype_declarator.
9422 ({after_,no}type_component_decl{,0}): More new nonterminals.
9423 ({after_,no}type_declarator): Fold in START_DECLARATOR token.
9424 Eliminates four reduce/reduce conflicts.
9426 (expr): Depend on nontrivial_exprlist instead of nonnull_exprlist.
9427 (nontrivial_exprlist): New nonterminal: A list of at least two
9429 (nonnull_exprlist): Depend on nontrival_exprlist.
9430 Eliminates four reduce/reduce conflicts.
9432 (named_class_head): Move intermediate code block into separate
9433 nonterminal so that we can stick %prec EMPTY on it.
9435 Add more %prec EMPTY's to eliminate remaining shift/reduce
9438 (after_type_declarator): Add maybe_raises to fndecl rules.
9439 (after_type_declarator_no_typename): Remove.
9442 Document remaining reduce/reduce conflicts.
9444 Tue Feb 22 12:10:32 1994 Jason Merrill (jason@deneb.cygnus.com)
9446 * search.c (get_base_distance): Only bash BINFO_INHERITANCE_CHAIN
9447 (TYPE_BINFO (type)) if we care about the path.
9449 * tree.c (lvalue_p): A COND_EXPR is an lvalue if both of the
9452 Mon Feb 21 19:59:40 1994 Mike Stump <mrs@cygnus.com>
9454 * Makefile.in (mostlyclean): lex.c is a source file, don't
9457 Sat Feb 19 01:27:14 1994 Jason Merrill (jason@deneb.cygnus.com)
9459 * parse.y: Eliminate 20 shift/reduce conflicts.
9461 Fri Feb 18 11:49:42 1994 Jason Merrill (jason@deneb.cygnus.com)
9463 * pt.c (type_unification): Add subr argument; if set, it means
9464 that we are calling ourselves recursively, so a partial match is OK.
9465 (unify): Support pointers to methods and functions.
9466 (tsubst): Support method pointers.
9467 * decl.c (build_ptrmemfunc_type): No longer static, so that
9468 tsubst can get at it.
9470 * init.c (is_aggr_typedef): Pretend template type parms are
9472 * decl2.c (build_push_scope): If cname refers to a template type
9473 parm, just grin and nod.
9475 * call.c (build_overload_call_real): Pass subr argument to
9477 * pt.c (do_function_instantiation): Ditto.
9478 * class.c (instantiate_type): Ditto.
9480 * search.c (get_base_distance): If BINFO is a binfo, use it and
9481 don't mess with its BINFO_INHERITANCE_CHAIN.
9483 * cvt.c (convert_to_reference): Fix temporary generation.
9484 If ambiguous, return error_mark_node.
9486 * init.c (build_new): Put back some necessary code.
9488 Thu Feb 17 15:39:47 1994 Jason Merrill (jason@deneb.cygnus.com)
9490 * init.c (build_new): Deal with array types properly.
9492 * search.c (get_binfo): Become a shell for get_base_distance.
9493 (get_binfo_recursive): Lose.
9494 (get_base_distance_recursive): Find the path to the via_virtual base
9495 that provides the most access.
9496 (get_base_distance): Ditto.
9498 * parse.y (explicit_instantiation): Syntax is 'template class
9499 A<int>', not 'template A<int>'.
9501 * typeck.c (convert_for_initialization): Remove bogus warning.
9503 * parse.y (datadef): Revert patch of Oct 27.
9505 Thu Feb 17 15:12:29 1994 Per Bothner (bothner@kalessin.cygnus.com)
9507 * class.c (build_vfn_ref): Cast delta field to ptrdiff_type_node,
9508 rather than integer_type_node. Does wonders for the Alpha.
9510 Thu Feb 17 13:36:21 1994 Jason Merrill (jason@deneb.cygnus.com)
9512 * decl.c (build_ptrmemfunc_type): Make sure that the pmf type
9513 goes onto the same obstack as its target type.
9515 Wed Feb 16 00:34:46 1994 Jason Merrill (jason@deneb.cygnus.com)
9517 * cvt.c (convert_to_reference): If converting via constructor
9518 on local level, go back to build_cplus_new approach.
9520 * tree.c (build_cplus_new): If with_cleanup_p, set cleanup slot
9521 to error_mark_node to prevent expand_expr from building a cleanup
9524 * lex.c (default_assign_ref_body): Return *this from the memcpy
9527 * decl.c (grok_reference_init): Just return if called with
9528 error_mark_node, don't worry about initializing non-const reference
9531 * cvt.c (convert_to_reference): Do the right thing for
9532 non-aggregate reference conversions, pedwarn when generating a
9533 non-const reference to a temporary.
9535 * class.c (finish_struct): TYPE_HAS_COMPLEX_{INIT,ASSIGN}_REF and
9536 TYPE_NEEDS_CONSTRUCTING all depend on TYPE_USES_VIRTUAL_BASECLASSES
9539 Tue Feb 15 19:47:19 1994 Jason Merrill (jason@deneb.cygnus.com)
9541 * decl.c (grok_reference_init): Pawn off a lot of the work on
9542 convert_to_reference. Generally do the right thing.
9544 * cvt.c (convert_to_reference): Conform to the initial comment;
9545 i.e. don't create temps if decl != error_mark_node. Handle
9546 cleanups better for temps that do get created. Don't pretend
9547 that we can use an 'A' to initialize a 'const double &' just by
9548 tacking on a NOP_EXPR. Support LOOKUP_SPECULATIVELY.
9550 * call.c (build_method_call): Set TREE_HAS_CONSTRUCTOR on
9553 Mon Feb 14 14:50:17 1994 Jason Merrill (jason@deneb.cygnus.com)
9555 * decl.c (grok_reference_init): Make a temporary for initializing
9556 const reference from constant expression.
9558 Mon Feb 14 11:31:31 1994 Per Bothner (bothner@kalessin.cygnus.com)
9560 * cp-tree.h, decl.c (set_identifier_local_value): Deleted function.
9561 * decl.c (pushdecl): Define decl in correct binding_level
9562 (which isn't always the inner_binding_level).
9564 * cvt.c (build_up_reference): Don't ever call expand_aggr_init.
9565 It's ugly, and I don't think it's the right thing to do.
9567 * cp-tree.h, class.c, decl.c, decl2.c, sp/search.c:
9568 Remove NEW_CLASS_SCOPING, assuming it is always 1.
9569 * decl.c (pop_decl_level): Removed; manually inlined.
9571 Sun Feb 13 19:04:56 1994 Jason Merrill (jason@deneb.cygnus.com)
9573 * class.h (candidate): Add basetypes field.
9575 * call.c (build_method_call): Do access checking after choosing a
9576 function, not before.
9578 * Makefile.in (cvt.o, call.o, method.o): Depend on class.h.
9579 (mostlyclean): Remove ../cc1plus.
9581 Fri Feb 11 11:52:26 1994 Jason Merrill (jason@deneb.cygnus.com)
9583 * class.c (finish_struct): Don't allow adjusting access to a field
9584 of a base class if a local field has the same name.
9586 * error.c (dump_type_prefix): Output basetype for METHOD_TYPEs.
9588 hu Jan 13 17:55:51 EST 1994 Gnanasekaran Swaminathan (gs4t@virginia.edu)
9590 * cp-tree.h (DESTRUCTOR_NAME_P): do not confuse AUTO_TEMP names
9591 with destructor names when either NO_DOLLAR_IN_LABEL or
9592 NO_DOT_IN_LABEL are not defined.
9594 Now `template <class T, T f(T&), const T*> class A {...}' works.
9596 * pt.c (grok_template_type): substitute template parm types
9597 with actual types in complex type as well.
9598 (coerce_template_parms): update the grok_template_type ()
9601 * pt.c (tsubst): Traverse method list using DECL_CHAIN.
9603 * decl.c (grok_op_properties): Allow operator++/-- to have
9606 * typeck2.c (store_init_value): Don't abort when called to
9607 initialize a type that needs constructing with a CONSTRUCTOR.
9609 * init.c (expand_aggr_init_1, CONSTRUCTOR case): If
9610 store_init_value fails, build and expand an INIT_EXPR. If
9611 store_init_value succeeds, call expand_decl_init.
9613 Fri Feb 11 02:49:23 1994 Mike Stump <mrs@cygnus.com>
9615 * class.c (build_vbase_path): Use complete_type_p instead of
9616 resolves_to_fixed_type_p to determine if the virtual bases are in
9617 their right place for the type of expr. Cures problem of thinking a
9618 virtual base class is one place, when it is in fact someplace else.
9620 Fri Feb 11 00:26:46 1994 Mike Stump <mrs@cygnus.com>
9622 * init.c (resolve_offset_ref): Make sure we first convert to
9623 intermediate type, if given, when dealing with members off `this'.
9624 Solves an incorrrect `type `foo' is not a base type for type
9625 `multiple'' when it is infact, a base type.
9627 Thu Feb 10 21:49:35 1994 Mike Stump <mrs@cygnus.com>
9629 * class.c (modify_other_vtable_entries): Use get_binfo, instead
9630 of binfo_value. Solves problem with compiler giving a `base class
9631 `B' ambiguous in binfo_value (compiler error)' on complex MI
9632 herarchies, when a virtual function is first defied in a virtual
9635 Thu Feb 10 17:19:32 1994 Mike Stump <mrs@cygnus.com>
9637 * class.c (build_vbase_path): Don't complain about ambiguous
9638 intermediate conversion when converting down to a virtual base
9639 class, even if they might seem to be ambiguous.
9641 Thu Feb 10 12:18:26 1994 Jason Merrill (jason@deneb.cygnus.com)
9643 * typeck2.c (build_functional_cast): #if 0 out constructor
9644 inheritance code, improve error messages.
9646 * class.c (finish_base_struct): Complain about base with only
9647 non-default constructors in derived class with no constructors.
9649 * decl.c (grokdeclarator): Fix detection of virtual new/delete.
9651 Wed Feb 9 22:02:32 1994 Mike Stump <mrs@cygnus.com>
9653 * search.c (build_mi_virtuals, add_mi_virtuals,
9654 report_ambiguous_mi_virtuals): Removed unneeded code.
9655 * class.c (finish_struct_bits): Ditto.
9657 Wed Feb 9 11:27:17 1994 Jason Merrill (jason@deneb.cygnus.com)
9659 * pt.c (end_template_instantiation): Push decl before
9662 * typeck2.c (build_m_component_ref): Make sure datum is of
9665 * init.c (get_type_value): New function, returns
9666 IDENTIFIER_TYPE_VALUE or IDENTIFIER_CLASS_TYPE_VALUE or NULL_TREE.
9668 * call.c (build_method_call): Don't die on call to destructor for
9671 * decl.c (grokdeclarator): Complain about virtual op new and op
9672 delete, make static virtuals unvirtual instead of unstatic.
9674 * typeck.c (build_c_cast): Also call default_conversion on
9677 * decl.c (grokdeclarator): Don't complain about anonymous
9680 * parse.y (simple_stmt, for loops): Move the continue point after
9683 * class.c (finish_struct): Fix setting of
9684 TYPE_HAS_COMPLEX_INIT_REF.
9686 Tue Feb 8 13:21:40 1994 Jason Merrill (jason@deneb.cygnus.com)
9688 * init.c (build_new): Deal with `new double (1)'.
9690 * class.c (finish_struct): TYPE_HAS_COMPLEX_*_REF are supersets of
9691 TYPE_HAS_REAL_*_REF, but TYPE_HAS_COMPLEX_INIT_REF is independent of
9692 TYPE_NEEDS_CONSTRUCTING.
9694 * decl.c (duplicate_decls): Propagate access decls.
9696 * typeck2.c (process_init_constructor): Accept empty_init_node
9697 for initializing unions.
9699 * class.c, lex.c, cp-tree.h: Use
9700 TYPE_HAS_COMPLEX_ASSIGN_REF where TYPE_HAS_REAL_ASSIGN_REF was used
9701 before, use TYPE_HAS_COMPLEX_INIT_REF for TYPE_NEEDS_CONSTRUCTING in
9704 * decl.c (finish_decl): Don't complain about uninitialized const
9705 if it was initialized before.
9707 Mon Feb 7 18:12:34 1994 Jason Merrill (jason@deneb.cygnus.com)
9709 * lex.c (default_assign_ref_body): Don't deal with vbases for
9712 * decl.c (finish_decl): Fix reversed logic for objects and other
9713 things that need to be constructed but have no initializer.
9715 * class.c (finish_struct): Don't set TYPE_HAS_* flags that are
9716 set by grok_op_properties or finish_decl.
9718 * decl.c: Don't warn about extern redeclared inline unless
9719 -Wextern-inline is given.
9720 * decl2.c (lang_decode_option): Ditto.
9723 Mon Feb 7 17:29:24 1994 Per Bothner (bothner@kalessin.cygnus.com)
9725 * decl.c (pushdecl_with_scope): Fix thinko. Add forward
9728 * decl.c (pushdecl_with_scope): New function.
9729 * decl.c (pushdecl_top_level): Use new function.
9730 * decl.c (pushtag): Initialize newdecl.
9731 * decl.c (pushtag): Push new type decl into correct scope.
9733 Mon Feb 7 14:42:03 1994 Jason Merrill (jason@deneb.cygnus.com)
9735 * call.c, cvt.c, init.c, search.c, cp-tree.h:
9736 Eradicate LOOKUP_PROTECTED_OK.
9738 Mon Feb 7 13:57:19 1994 Per Bothner (bothner@kalessin.cygnus.com)
9740 * decl.c (pushtag, xref_tag), cp-tree.h: Add extra parameter
9741 'globalize' to signify implicit declarations.
9742 * decl.c (globalize_nested_type, maybe_globalize_type): Removed.
9743 * decl.c (set_identifier_type_value_with_scope): New function.
9744 * decl.c (set_identifier_local_value): Simplify.
9745 * spew.c (yylex, do_addr): Modify to return a _DEFN if a
9746 forward declaration (followed by ';' and not preceded by 'friend').
9747 * class.c, decl.c, except.c, init.c, parse.y,
9748 pt.c, search.c: Add new argument to calls to xref_tag and
9751 Mon Feb 7 00:22:59 1994 Jason Merrill (jason@deneb.cygnus.com)
9753 * cp-tree.h (ACCESSIBLY_UNIQUELY_DERIVED_P): New macro, means what
9754 ACCESSIBLY_DERIVED_FROM_P meant before.
9755 (ACCESSIBLY_DERIVED_FROM_P): Now disregards ambiguity.
9757 * cvt.c (build_up_reference): Call get_binfo with PROTECT == 1.
9759 * search.c (get_base_distance_recursive): Members and friends of
9760 a class X can implicitly convert an X* to a pointer to a private or
9761 protected immediate base class of X.
9762 (get_binfo_recursive): Ditto.
9763 (get_base_distance): Ignore ambiguity if PROTECT < 0.
9764 (get_binfo): Lose multiple values of PROTECT.
9765 (compute_access): Protected is OK if the start of the
9766 search is an accessible base class of current_class_type.
9768 * method.c (build_opfncall): Do check access on operator new here.
9770 * decl.c (finish_function): Don't check access on operator new
9773 Sun Feb 6 14:06:58 1994 Jason Merrill (jason@deneb.cygnus.com)
9775 * decl.c (xref_tag): The base of a derived struct is NOT always
9778 * pt.c (do_explicit_instantiation): New function, called from
9779 parser to do explicit function instantiation.
9780 (type_unification): Allow the args list to be terminated with
9782 (do_pending_expansions): Look at i->interface for non-member
9785 * parse.y (datadef): Move explicit_instantiation here.
9786 (structsp): From here.
9787 (datadef): Complain about `int;'.
9789 Sun Feb 6 12:33:18 1994 Per Bothner (bothner@kalessin.cygnus.com)
9791 * pt.c (end_template_instantiation), cp-tree.h: Remove unused
9792 second parameter, and simplify first from a TREE_LIST where
9793 we only care about its TREE_VALUE to just the value (an IDENTIFIER).
9794 * pt.c (instantiate_member_templates): Simplify argument list
9795 from a TREE_LIST to just an IDENTIFIER.
9796 * lex.c (yyprint): PRE_PARSED_CLASS_DECL is now just an IDENTIFIER.
9797 * parse.y (template_instantiate_once): Simplify accordingly.
9798 * decl.c (inner_binding_level): New. Use various places to
9801 Sun Feb 6 02:49:37 1994 Jason Merrill (jason@deneb.cygnus.com)
9803 * typeck2.c (build_functional_cast): int() -> int(0).
9805 Sat Feb 5 00:53:21 1994 Jason Merrill (jason@deneb.cygnus.com)
9807 * class.c (finish_struct): Don't do a bitwise copy for op= if the
9808 class has a virtual function table.
9810 * typeck.c (convert_for_initialization): Restore warnings about
9811 not using defined op=. Should really be my_friendly_aborts, I
9814 Fri Feb 4 14:21:00 1994 Jason Merrill (jason@deneb.cygnus.com)
9816 * class.c (finish_struct): Tidy up conditions for doing bitwise
9819 * decl.c (build_default_constructor): #if 0 out.
9821 * *: Eradicate TYPE_GETS_{ASSIGNMENT,ASSIGN_REF,CONST_ASSIGN_REF,
9822 CONST_INIT_REF}, TYPE_HAS_REAL_CONSTRUCTOR.
9824 * decl.c (grokdeclarator): Don't return void_type_node for
9825 friends being defined here.
9827 * init.c (perform_member_init): Only do the init if it's useful.
9829 * lex.c (default_copy_constructor_body): If we don't need to do
9830 memberwise init, just call __builtin_memcpy.
9831 (default_assign_ref_body): Ditto.
9833 * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0.
9835 Fri Feb 4 13:02:56 1994 Mike Stump <mrs@cygnus.com>
9837 * lex.c (reinit_parse_for_method, cons_up_default_function):
9838 Don't give warn_if_unknown_interface warning when it came from a
9840 * pt.c (end_template_decl, instantiate_template): Ditto.
9841 * decl.c (start_decl): Ditto.
9843 Fri Feb 4 00:41:21 1994 Jason Merrill (jason@deneb.cygnus.com)
9845 * decl.c (grokdeclarator): Don't try to set TYPE_WAS_ANONYMOUS on
9848 * decl2.c (constructor_name_full): Use IS_AGGR_TYPE_CODE instead of
9849 IS_AGGR_TYPE, since we don't know it's a type.
9851 Thu Feb 3 11:36:46 1994 Jason Merrill (jason@deneb.cygnus.com)
9853 * decl.c (grokdeclarator): Don't complain about anonymous unions.
9855 * cp-tree.h (TYPE_WAS_ANONYMOUS): This struct was originally
9856 anonymous, but had a name given to it by a typedef.
9858 * decl.c (grokdeclarator): When renaming an anonymous struct, set
9861 * decl2.c (constructor_name_full): Use TYPE_WAS_ANONYMOUS.
9863 * cp-tree.h (DECL_UNDEFINED_FRIENDS): #if 0 out.
9865 * init.c (xref_friend): Don't set up DECL_UNDEFINED_FRIENDS.
9866 (embrace_waiting_friends): Don't use DECL_UNDEFINED_FRIENDS.
9868 * decl.c (grokdeclarator): Set TYPE_NESTED_NAME properly on nested
9869 anonymous structs that get typedef'd.
9871 * decl.c (grokdeclarator): Always return void_type_node for
9874 * error.c (dump_function_decl): Don't use DECL_CLASS_CONTEXT for
9876 (dump_function_decl): Don't print out default args for
9877 a function used in an expression.
9879 * decl.c (grokdeclarator): Give error on abstract declarator used
9880 in an invalid context (i.e. `void (*)();').
9882 * error.c (cp_line_of): Support _TYPE nodes.
9883 (cp_file_of): Ditto.
9885 * cvt.c (build_up_reference): Don't abort if passed a SAVE_EXPR;
9886 it can happen for the RHS of an assignment stmt where the LHS is
9889 * init.c (expand_aggr_init_1): Deal with bracketed initializer
9892 * class.c (finish_struct): Deal with enumerators and typedefs
9895 Wed Feb 2 11:30:22 1994 Jason Merrill (jason@deneb.cygnus.com)
9897 * class.c (finish_struct): Tidy up loop over fields.
9899 * errfn.c (cp_thing): Don't advance twice after a format.
9901 * class.c (finish_struct): Complain about needing a constructor
9902 if a member has only non-default constructors, and don't try to
9903 generate a default constructor.
9905 * decl.c (finish_decl): Also do the constructor thing if
9906 TYPE_NEEDS_CONSTRUCTING is set (for arrays).
9908 * search.c (unuse_fields): New function: mark all fields in this
9910 (dfs_unuse_fields): Helper function.
9912 * class.c (pushclass): If the new class is the same as the old
9913 class, still unuse the fields.
9914 (unuse_fields): Move to search.c.
9916 * decl.c (grok_op_properties): Add friendp argument.
9917 (grokfndecl): Pass it.
9918 (start_method): Ditto.
9920 * decl2.c (delete_sanity): Add use_global_delete parameter to catch
9923 * parse.y (unary_expr): Pass new parameter to delete_sanity.
9925 * lex.c (default_copy_constructor_body): Don't choke if the union
9927 (default_assign_ref_body): Ditto.
9929 * call.c (compute_conversion_costs_ansi): Do the right thing for
9932 * decl.c (push_to_top_level): Optimize.
9934 * decl.c (start_function): Look for the lexical scope of a friend
9935 in DECL_CLASS_CONTEXT.
9937 * init.c (do_friend): Set DECL_CLASS_CONTEXT on global friends.
9939 Tue Feb 1 15:59:24 1994 Jason Merrill (jason@deneb.cygnus.com)
9941 * cp-tree.h (TREE_GETS_PLACED_NEW): New macro.
9943 * init.c (init_init_processing): Don't assign BIN/BID to the
9944 IDENTIFIER_GLOBAL_VALUEs of their respective operators.
9945 (build_new): Check TREE_GETS_PLACED_NEW.
9947 * decl.c (grok_op_properties): Don't set TREE_GETS_NEW for a decl of
9948 op new with placement, set TREE_GETS_PLACED_NEW.
9950 * cp-tree.h (ANON_UNION_P): New macro. Applies to decls.
9952 * class.c (finish_struct): Don't treat anonymous unions like
9953 other aggregate members. Do synthesize methods for unions without
9954 a name, since they may or may not be "anonymous unions".
9956 * decl2.c (grok_x_components): Wipe out memory of synthesized methods
9957 in anonymous unions.
9959 * lex.c (default_copy_constructor_body): Support unions.
9960 (default_assign_ref_body): Ditto.
9962 Mon Jan 31 12:07:30 1994 Jason Merrill (jason@deneb.cygnus.com)
9964 * cp-tree.h: Fix documentation of LOOKUP_GLOBAL, add prototypes.
9966 * error.c (args_as_string): New function (%A), like type_as_string
9967 except NULL_TREE -> "..."
9969 * call.c (build_overload_call_real): Fix for new overloading.
9971 * decl.c (grok_op_properties): Set all of the TYPE_OVERLOADS_* flags
9974 * parse.y (operator_name): Instead of here.
9976 * typeck2.c (build_functional_cast): Treat a TREE_LIST as a list
9979 * call.c (build_overload_call_real): Support LOOKUP_SPECULATIVELY.
9981 * method.c (build_opfncall): Don't need to massage return value
9982 any more, call build_overload_call with all flags.
9984 * typeck.c (build_x_binary_op): Put back speculative call to
9986 (build_x_unary_op): Ditto.
9987 (build_x_conditional_expr): Ditto.
9989 Mon Jan 31 10:00:30 1994 Mike Stump <mrs@cygnus.com>
9991 * cvt.c (build_type_conversion_1): Change call to pedwarn into
9992 warning, and conditionalize upon warn_cast_qual.
9994 Fri Jan 28 11:48:15 1994 Jason Merrill (jason@deneb.cygnus.com)
9996 * search.c (lookup_field): If xbasetype is a binfo, copy it to
9997 avoid clobbering its inheritance info.
9999 * call.c (build_method_call): Don't overwrite basetype_path with
10000 TYPE_BINFO (inst_ptr_basetype) if they have the same type.
10002 * search.c (compute_access): Fix handling of protected inheritance
10003 and friendship with the enclosing class.
10005 * typeck2.c (store_init_value): Allow passing of TREE_CHAIN for
10006 initialization of arbitrary variable.
10008 * typeck2.c (build_functional_cast): Only try calling a method if
10011 * decl.c (grokdeclarator): Move handling of constructor syntax
10012 initialization into first loop for generality.
10013 (parmlist_is_random): Lose.
10015 * lex.c (cons_up_default_function): Set TREE_PARMLIST on arguments
10016 to default function.
10018 Thu Jan 27 19:26:51 1994 Jason Merrill (jason@deneb.cygnus.com)
10020 * decl.c (grokparms): Abort if we get called with something we don't
10023 Thu Jan 27 17:37:25 1994 Mike Stump <mrs@cygnus.com>
10025 * call.c (build_overload_call_real): Change argument complain to
10026 flags to match style of rest of code. Pass it down to
10027 build_function_call_real as necessary.
10028 * call.c (build_overload_call, build_overload_call_maybe): Change
10029 argument complain to flags to match style of rest of code.
10030 * cp-tree.h (build_function_call_real): Added fourth flags
10032 * cvt.c (convert_to_reference): Only give warning messages, if
10033 LOOKUP_COMPLAIN is set.
10034 * typeck.c (build_x_function_call): Change simple complain
10035 argument to build_overload_call_maybe and build_overload_call, to
10036 LOOKUP_COMPLAIN to match style of rest of code.
10037 * typeck2.c (build_functional_cast): Ditto.
10038 * typeck.c (build_function_call_real): Add flags, so that we can
10039 not complain, if we don't want to complain. Complain about
10040 arguments, if we are complaining, otherwise don't.
10041 * typeck.c (build_function_call, build_function_call_maybe):
10042 Stick in flags argument.
10043 * typeck.c (build_x_binary_op, build_x_unary_op,
10044 build_x_conditional_expr, build_x_compound_expr): Follow style of
10045 build_x_indirect_ref, as it is more correct and more common.
10047 Thu Jan 27 14:36:20 1994 Jason Merrill (jason@deneb.cygnus.com)
10049 * call.c (build_method_call): Don't check for being called with
10052 * decl2.c (finish_file): Don't play with DECL_CLASS_CONTEXT for the
10053 static initializer function.
10055 * init.c (build_member_call): Use convert_force here, too.
10057 * search.c (compute_access): Only treat static members specially
10058 if they are referenced directly.
10060 Wed Jan 26 18:28:14 1994 Jason Merrill (jason@deneb.cygnus.com)
10062 * gxxint.texi (Access Control): New node.
10064 * search.c (current_scope): New function; returns whichever of
10065 current_class_type and current_function_decl is the most nested.
10066 (compute_access): Total overhaul to make it clearer and more
10067 correct. Don't use the cache for now; in the only situation where
10068 it was used before, it gained nothing. This frees up three of the
10069 DECL_LANG_FLAGs for possible other use!
10071 * cp-tree.h: #if 0 out DECL_PUBLIC & friends.
10073 * typeck.c (build_component_ref_1): Don't check DECL_PUBLIC.
10075 * call.c (build_method_call): Use convert_force to cast `this' --
10076 rely on the access checking for the method itself.
10078 * init.c (is_friend): Do the nesting thing, handle types. I am
10080 (is_friend_type): Become a shell for is_friend.
10081 (add_friend): Never stick in ctype.
10082 Why are the friendship functions in init.c, anyway?
10084 Wed Jan 26 17:50:00 1994 Mike Stump <mrs@cygnus.com>
10086 * cvt.c (build_type_conversion_1): Don't conditionalize call to
10087 pedwarn upon pedantic.
10089 Wed Jan 26 17:20:46 1994 Mike Stump <mrs@cygnus.com>
10091 * cvt.c (convert_to_reference): Add 8.4.3 checking so that one
10092 gets a warning if one tries to initialize a non-const & from a
10094 * cvt.c (convert_to_reference): Use %P format for argument
10095 numbers in warnings.
10097 Wed Jan 26 14:35:06 1994 Mike Stump <mrs@cygnus.com>
10099 * init.c (build_delete): Follow style in call.c to construct the
10100 virtual call to the desctructor, as that code is right. Fixes a
10101 problem of the compiler saying a pointer conversion is ambiguous.
10103 Wed Jan 26 11:28:14 1994 Jason Merrill (jason@deneb.cygnus.com)
10105 * cp-tree.h (VTABLE_NAME_P): Change other occurrence of
10106 VTABLE_NAME_FORMAT to VTABLE_NAME.
10108 * *: s/visibility/access/g
10110 Tue Jan 25 18:39:12 1994 Jason Merrill (jason@deneb.cygnus.com)
10112 * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR.
10114 Tue Jan 25 13:54:29 1994 Mike Stump <mrs@cygnus.com>
10116 * init.c (build_delete): Back out Jan 17th & 18th pacthes, as
10119 Tue Jan 25 13:11:45 1994 Jason Merrill (jason@deneb.cygnus.com)
10121 * decl.c (duplicate_decls): Fix pointer arithmetic.
10123 Mon Jan 24 15:50:06 1994 Chip Salzenberg (chip@fin.uucp)
10125 [ cp-* changes propagated from c-* changes in 940114 snapshot ]
10126 * cp-parse.y (maybe_attribute): Allow multiple __attribute__
10127 clauses on a declaration.
10129 Mon Jan 24 17:06:23 1994 Jason Merrill (jason@deneb.cygnus.com)
10131 * class.c (finish_struct): Do synthesize methods for anon
10132 structs, just not unions.
10134 Mon Jan 24 13:50:13 1994 Kung Hsu (kung@mexican.cygnus.com)
10136 * decl.c (xref_tag): handle anonymous nested type.
10137 * decl.c (globalize_nested_type): add no globalize bit check.
10138 * spew.c (hack_more_ids) : templated nested decl not push top
10141 * parse.y : get rid of 'goto do_components'. It is much better
10144 * decl.c (is_anon_name): get rid of the function and use the
10145 macro ANON_AGGRNAME_P.
10148 Fri Jan 21 14:06:02 1994 Jason Merrill (jason@deneb.cygnus.com)
10150 * class.c (finish_struct): Don't synthesize any methods for
10151 anonymous structs/unions.
10153 * typeck.c (build_modify_expr): Don't treat pmf's as class objects.
10155 Thu Jan 20 18:56:46 1994 Jason Merrill (jason@deneb.cygnus.com)
10157 * method.c (build_opfncall): Call build_indirect_ref on
10158 synthesized instance for operator delete.
10160 * pt.c (type_unification): Don't abort if called with a list of
10163 * class.c (instantiate_type): Deal with function templates.
10165 Thu Jan 20 16:55:35 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
10167 * Makefile.in (CC): Default to cc not gcc.
10169 Thu Jan 20 13:47:54 1994 Jason Merrill (jason@deneb.cygnus.com)
10171 * typeck.c (build_modify_expr): Call constructor if appropriate.
10173 * decl.c (push_to_top_level): Clear out class-level bindings cache.
10175 Wed Jan 19 13:51:22 1994 Jason Merrill (jason@deneb.cygnus.com)
10177 * call.c (resolve_scope_to_name): Work recursively (previously only
10178 looked down one level).
10180 * lex.c (do_pending_inlines): If we're still dealing with the last
10181 batch of inlines, don't start working on a new one.
10183 * Makefile.in (stamp-parse): Update conflict count.
10186 * parse.y (explicit_instantiation): New rule; implements
10187 'template A<int>' syntax (though not 'template foo(int)' yet).
10188 (structsp): Add explicit_instantiation.
10190 Tue Jan 18 13:53:05 1994 Jason Merrill (jason@deneb.cygnus.com)
10192 * class.c (finish_struct, etc.): Simplify decision to synthesize
10195 * call.c, class.c, cp-tree.h, decl.c, init.c,
10196 ptree.c, search.c, typeck.c, typeck2.c: Nuke
10197 TYPE_NEEDS_CONSTRUCTOR (change all calls to TYPE_NEEDS_CONSTRUCTING).
10198 * init.c (expand_aggr_init_1): Don't try non-constructor methods
10199 of initializing objects.
10200 (build_new): Don't try other methods if the constructor lookup fails.
10202 * class.c (finish_base_struct): Set cant_have_default_ctor and
10203 cant_synth_copy_ctor properly.
10204 (finish_struct): Ditto.
10206 Mon Jan 17 13:58:18 1994 Jason Merrill (jason@deneb.cygnus.com)
10208 * typeck.c (build_modify_expr_1): #if 0 out again.
10209 (build_modify_expr): #if 0 out memberwise init code again.
10211 * lex.c (default_copy_constructor_body): Be const-correct.
10212 (default_assign_ref_body): Ditto.
10214 * init.c (perform_member_init): Use TYPE_HAS_CONSTRUCTOR to decide
10215 whether or not to use it, rather than TYPE_NEEDS_CONSTRUCTING.
10216 (expand_aggr_init): Disable silent conversion from initializer list
10217 to list of args for a constructor.
10219 * class.c (base_info): Lose needs_default_ctor.
10220 (finish_base_struct): Ditto.
10221 (finish_struct): Ditto.
10223 * decl.c (init_decl_processing): Don't turn off flag_default_inline
10224 just because flag_no_inline is on.
10225 (finish_decl): Use TYPE_HAS_CONSTRUCTOR to decide to use
10228 * class.c (finish_struct): Synthesize default ctor whenever
10231 * Makefile.in (TAGS): Don't try to run etags on cp-parse.y.
10233 Sat Jan 15 18:34:33 1994 Mike Stump <mrs@cygnus.com>
10235 * Makefile.in, configure: Handle the C++ front-end in a
10237 * cp-*: Move C++ front-end to cp/*.
10239 Fri Jan 14 14:09:37 1994 Jason Merrill (jason@deneb.cygnus.com)
10241 * cp-typeck.c (build_function_call_real): Modify to match other
10242 instances of taking the address of the function.
10244 * cp-class.c (finish_struct): Set TYPE_HAS_REAL_CONSTRUCTOR to 1 if
10245 there are non-synthesized constructors.
10246 Only set TYPE_NEEDS_CONSTRUCTOR if TYPE_HAS_REAL_CONSTRUCTOR.
10247 Always generate copy constructor if possible.
10249 * cp-tree.h (lang_type): Add has_real_constructor bitfield.
10250 (TYPE_HAS_REAL_CONSTRUCTOR): Define.
10252 * cp-lex.c (default_copy_constructor_body): Use init syntax
10255 * cp-type2.c (store_init_value): Only give error for initializer list
10256 if TYPE_HAS_REAL_CONSTRUCTOR.
10258 Thu Jan 13 15:38:29 1994 Jason Merrill (jason@deneb.cygnus.com)
10260 * cp-tree.h (DECL_SYNTHESIZED): Add defn.
10261 (lang_decl): Add synthesized bitfield to decl_flags.
10263 * cp-lex.c (cons_up_default_function): Use DECL_SYNTHESIZED to mark
10264 artificial methods, rather than a line # of 0.
10266 Fri Jan 14 18:25:29 1994 Kung Hsu (kung@mexican.cygnus.com)
10268 * cp-decl (xref_tag): fix a bug in conflict type.
10269 * cp-parse.y : add SCOPED_NAME for uninstantiated template nested
10271 * cp-spew.c (yylex) : generated SCOPED_NAME token.
10272 * cp-lex.c (yyprint): handle SCOPED_NAME.
10274 Fri Jan 14 17:00:29 1994 Mike Stump <mrs@cygnus.com>
10276 * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is
10279 Thu Jan 13 14:00:35 1994 Kung Hsu (kung@mexican.cygnus.com)
10281 * cp-decl2.c (grok_x_components): fix a bug that enum type does not
10284 Thu Jan 13 11:39:34 1994 Mike Stump <mrs@cygnus.com>
10286 Ensure that all vtable pointers are initialized with all the right
10289 * cp-class.c (is_normal): Changed to reflect new meaning of
10290 CLASSTYPE_VFIELD_PARENT.
10291 * cp-class.c (maybe_fixup_vptrs): Use of
10292 CLASSTYPE_NEEDS_VIRTUAL_REINIT here is misguided. Use
10293 BINFO_MODIFIED instead.
10294 * cp-class.c (finish_struct): Changed to reflect new meaning of
10295 CLASSTYPE_VFIELD_PARENT.
10296 * cp-decl.c (get_binfo_from_vfield): Removed, unneeded now.
10297 * cp-decl.c (finish_function): Use init_vtbl_ptrs, instead of open
10299 * cp-init.c (init_vfields): Changed name to init_vtbl_ptrs, and
10301 * cp-init.c (emit_base_init): Use new name init_vtbl_ptrs.
10302 * cp-tree.h (vfield_parent): Changed to integer.
10303 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Changed docs to reflect new
10305 * cp-tree.h (init_vtbl_ptrs): Added init_vtbl_ptrs.
10307 Wed Jan 12 18:24:16 1994 Kung Hsu (kung@mexican.cygnus.com)
10309 * cp-decl.c (xref_tag): re-implement globalize nested type.
10310 * cp-decl2.c (grok_x_components): ditto.
10311 * cp-parse.y: ditto.
10312 * cp-tree.h (lang_type): add no_globalize bit in type_flags.
10314 Wed Jan 12 14:08:09 1994 Jason Merrill (jason@deneb.cygnus.com)
10316 * cp-decl.c (grokdeclarator): Don't set TREE_PUBLIC on friend
10317 decls with a definition attached.
10319 * cp-typeck.c (build_modify_expr): Undo previous change in the case
10322 Tue Jan 11 19:33:03 1994 Jason Merrill (jason@deneb.cygnus.com)
10324 * cp-typeck.c (build_modify_expr): Replace code for generating
10325 assignment semantics for classes with an error.
10326 (build_modify_expr_1): #if 0 out.
10328 * cp-decl.c (pushdecl): Patch bogus design of pushdecl
10329 behavior for overloaded functions (it doesn't push anything).
10331 * cp-class.c (finish_struct): When generating default op=,
10332 set TYPE_HAS_ASSIGNMENT.
10334 Mon Jan 10 18:48:06 1994 Mike Stump <mrs@cygnus.com>
10336 * cp-cvt.c (convert): Make {double, clashing enum} -> enum
10338 * cp-typeck.c (convert_for_assignment): Simplify.
10339 * cp-decl2.c (warn_enum_clash): Removed.
10340 * invoke.texi (-Wenum-clash): Removed.
10341 * toplev.c (-Wenum-clash): Removed.
10343 Mon Jan 10 17:48:37 1994 Kung Hsu (kung@mexican.cygnus.com)
10345 * cp-decl.c (finish_decl): fix incorrect popclass call.
10347 * cp-decl.c (is_anon_name): new function, check whether the name
10348 is anonymous name generated by compiler.
10349 * cp-decl.c (grokdeclarator): allow nested SCOPE_REF
10350 * cp-spew.c (hack_more_ids): handle nested type in template.
10351 * cp-parse.y : handle nested type reference in uninstantiated
10353 * cp-call.c (build_method_call): handle uninstantiated template
10355 * cp-pt.c (search_nested_type_in_tmpl): new function, search nested
10357 * cp-pt.c (lookup_nested_type_by_name): new function, lookup nested
10359 * cp-pt.c (tsubst): handle nested type search by name.
10361 Mon Jan 10 14:32:18 1994 Jason Merrill (jason@deneb.cygnus.com)
10363 * cp-init.c (build_member_call): Propagate qualifiers to new type.
10365 * cp-call.c (build_method_call): Count functions the new way.
10367 Fri Jan 7 19:03:26 1994 Jason Merrill (jason@deneb.cygnus.com)
10369 * cp-decl.c (pushtag): Set DECL_ASSEMBLER_NAME for nested classes,
10372 Tue Jan 4 16:45:51 1994 Kung Hsu (kung@cirdan.cygnus.com)
10374 * cp-parse.y: change to handle whether to globalize nested class.
10375 * cp-decl.c(xref_tag, maybe_globalize_type): Ditto.
10377 Mon Jan 3 22:22:32 1994 Gerald Baumgartner (gb@cygnus.com)
10379 * Makefile.in cp-call.c cp-class.c cp-cvt.c cp-decl.c cp-decl2.c
10380 cp-error.c cp-init.c cp-lex.c cp-lex.h cp-method.c cp-parse.y
10381 cp-spew.c cp-tree.c cp-tree.h cp-type2.c cp-typeck.c cp-xref.c
10382 gplus.gperf toplev.c: Incorporated C++ signature extension.
10383 * cp-sig.c: New file, contains most of signature processing.
10384 * cp-hash.h: Regenerated from gplus.gperf.
10386 * gcc.1 g++.1: Added explanation for the `-fhandle-signatures'
10387 and `-fno-handle-signatures' command line flags.
10389 * gcc.texi: Changed the last-modification date.
10390 * invoke.texi: Added `-fhandle-signatures' in the list of
10391 C++ language options. Added explanation for this option.
10393 Tue Dec 28 21:10:03 1993 Mike Stump <mrs@cygnus.com>
10395 * cp-init.c (expand_vec_init): Remove comptypes test, as it is too
10398 Tue Dec 28 13:42:22 1993 Mike Stump <mrs@cygnus.com>
10400 * cp-pt.c (do_pending_expansions): Decide to expand a template
10401 member function, based upon it's class type, not the class type of
10402 the first place it was declared.
10404 Tue Dec 28 05:42:31 1993 Mike Stump <mrs@cygnus.com>
10406 * cp-class.c (is_normal): New routine, use to determine when the
10407 given binfo is the normal one. (The one that should have the simple
10409 * cp-class.c (modify_other_vtable_entries): Use DECL_ASSEMBLER_NAME
10410 to check if two fndecls are `the same'. Sometimes this routine can
10411 modify the main vtable, and normal should be 1, in that case, so use
10412 is_normal() to determine if this is the main vtable for the class.
10413 Don't recurse down virtual bases, as they are shared, and we take
10414 care of them elsewhere.
10415 * cp-class.c (modify_vtable_entries): If we have already updated the
10416 vtable with the new virtual, don't do it again.
10417 * cp-class.c (finish_struct): Set CLASSTYPE_VFIELD_PARENT as
10418 appropriate. Do virtual function overriding in virtual bases, after
10419 normal overriding, so that the base function list in DECL_VINDEX is
10420 not overridden, before we have a chance to run through the list.
10421 Use DECL_ASSEMBLER_NAME to check if two fndecls are `the same'.
10422 Make sure we pass the right address into modify_vtable_entries.
10423 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): New field to indicate which
10424 binfo is the one that has the vtable that we based our vtable on.
10426 Fri Dec 24 09:40:52 1993 Michael Tiemann (tiemann@blues.cygnus.com)
10428 * cp-typeck.c (c_expand_start_case): Use default_conversion to
10429 convert expression from reference type if necessary.
10431 Wed Dec 22 17:58:43 1993 Jason Merrill (jason@deneb.cygnus.com)
10433 * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before
10434 trying to read its TREE_VALUE.
10436 * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here.
10437 (finish_struct): Instead of here.
10439 Tue Dec 21 14:34:25 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10441 * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't
10442 have TYPE_PTRMEMFUNC_P set before we try to build its
10443 CLASSTYPE_ID_AS_LIST.
10444 (get_decl_list): Likewise, when trying to read it.
10446 * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined.
10447 (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT.
10449 Mon Dec 20 13:35:03 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10451 * cp-typeck.c (rationalize_conditional_expr): New function.
10452 (unary_complex_lvalue): Use it.
10453 (build_modify_expr): Use it, since trying to do an ADDR_EXPR of it
10454 with build_unary_op won't cut it. Don't wrap the COND_EXPR with a
10457 * cp-decl2.c (explicit_warn_return_type): Deleted variable.
10458 (lang_decode_option): Set warn_return_type, not explicit_*, for
10459 -Wreturn-type and -Wall. This is what rest_of_compilation uses to
10460 decide if it should go into jump_optimize or not.
10461 * cp-tree.h (explicit_warn_return_type): Deleted.
10462 * cp-decl.c (grokdeclarator): Use warn_return_type, not explicit_*.
10463 (finish_function): Also complain about no return in a non-void fn if
10464 we're being pedantic (don't rely on use of -Wreturn-type).
10466 Fri Dec 17 15:45:46 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10468 * cp-decl.c (grokdeclarator): Forbid declaration of a function as
10469 static if it's being done inside another function.
10471 * cp-search.c (compute_visibility): Check for friendship both ways.
10473 Fri Dec 17 14:28:25 1993 Jason Merrill (jason@deneb.cygnus.com)
10475 * cp-cvt.c (build_default_binary_type_conversion): Make error
10476 messages more helpful.
10478 * cp-error.c (op_as_string): New function, returns "operator =="
10479 given EQ_EXPR or suchlike.
10481 Fri Dec 17 13:28:11 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10483 * cp-call.c (print_n_candidates): New function.
10484 (build_overload_call_real): Use it when we complain about a call
10487 Fri Dec 17 12:41:17 1993 Jason Merrill (jason@deneb.cygnus.com)
10489 * cp-call.c (build_method_call): Fix checking for static call
10492 * cp-method.c (build_opfncall): Call build_indirect_ref on argument
10495 * cp-init.c (build_new): Don't mess with rval when building
10498 Thu Dec 16 16:48:05 1993 Kung Hsu (kung@cirdan.cygnus.com)
10500 * cp-lex.c (default_assign_ref_body): add check when TYPE_NESTED_
10501 NAME(type) may not be exist. It's not a problem for old compiler.
10503 Thu Dec 16 14:46:06 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10505 * cp-tree.h (CLASSTYPE_ALTERS_VISIBILITIES_P): Delete macro, it's
10506 never used for anything.
10507 (struct lang_type, member type_flags): Delete field
10508 `alters_visibility', and up `dummy' by 1.
10509 * cp-class.c (finish_base_struct): Delete code that copies the
10510 setting of CLASSTYPE_ALTERS_VISIBILITIES_P.
10511 (finish_struct): Delete code that sets it.
10513 Thu Dec 16 14:44:39 1993 Jason Merrill (jason@deneb.cygnus.com)
10515 * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to
10516 build_method_call that I messed up before.
10518 * cp-search.c (get_base_distance): If protect > 1, allow immediate
10521 * cp-class.c (finish_base_struct): Set cant_synth_* correctly.
10522 (finish_struct): Ditto. Well, nigh-correctly; it won't deal
10523 properly with the case where a class contains an object of an
10524 ambiguous base class which has a protected op=. Should be fixed
10525 when the access control code gets overhauled.
10526 (finish_struct_methods): Set TYPE_HAS_NONPUBLIC_* correctly.
10528 Thu Dec 16 12:17:06 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10530 * cp-lex.c (real_yylex): Turn the code back on that deals with
10531 __FUNCTION__ and __PRETTY_FUNCTION__. Don't use lookup_name, to
10532 avoid the ambiguity problems that led to it being turned off in the
10535 * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P
10536 to see if something is a method.
10538 Wed Dec 15 18:35:58 1993 Mike Stump <mrs@cygnus.com>
10540 * cp-typeck.c (build_modify_expr): Avoid error messages on small
10542 * cp-typeck.c (convert_for_assignment): Add missing argument to
10543 cp_warning and cp_pedwarn calls.
10545 Wed Dec 15 18:25:32 1993 Jason Merrill (jason@deneb.cygnus.com)
10547 * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base
10548 initializers; it's just anachronistic.
10550 * cp-decl.c (finish_decl): Don't require external-linkage arrays
10551 to have a complete type at declaration time when pedantic.
10553 Tue Dec 14 11:37:23 1993 Jason Merrill (jason@deneb.cygnus.com)
10555 * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set.
10557 * cp-call.c (build_method_call): Don't dereference pointer given
10560 * cp-decl.c (finish_function): Don't pass pointer to
10562 (finish_function): Ditto.
10564 * cp-typeck.c (build_x_function_call): Ditto.
10566 * cp-method.c (build_component_type_expr): Ditto.
10568 * cp-init.c (build_member_call): Ditto.
10569 (build_new): Ditto.
10571 Mon Dec 13 18:04:33 1993 Kung Hsu (kung@cirdan.cygnus.com)
10573 * cp-decl.c (xref_tag): fix regression created by changes made
10575 * cp-decl.c (xref_defn_tag): fix parallel nested class problem.
10577 Fri Dec 10 12:40:25 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10579 * cp-call.c (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print
10580 out the final evaluation of the function, so we can see if ELLIPSIS,
10581 USER, and EVIL were set at the end.
10583 * cp-call.c (convert_harshness_ansi): When the parm isn't an lvalue,
10584 only go for setting TRIVIAL_CODE if we are dealing with types that
10587 Thu Dec 9 18:27:22 1993 Mike Stump <mrs@cygnus.com>
10589 * cp-decl.c (flag_huge_objects): New flag to allow large objects.
10590 * toplev.c (lang_options): Ditto.
10591 * cp-decl2.c (flag_huge_objects, lang_f_options): Ditto.
10592 * cp-decl.c (delta_type_node): New type for delta entries.
10593 * cp-tree.h (delta_type_node): Ditto.
10594 * cp-decl.c (init_decl_processing): Setup delta_type_node.
10595 * cp-decl.c (init_decl_processing, build_ptrmemfunc_type): Use
10596 delta_type_node instead of short_integer_type_node.
10597 * cp-class.c (build_vtable_entry): Ditto.
10599 Thu Dec 9 16:19:05 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10601 * cp-tree.h (OPERATOR_TYPENAME_P): Define outside of
10602 NO_{DOLLAR,DOT} macro checks, so it always gets defined.
10603 (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL.
10605 Wed Dec 8 17:38:06 1993 Mike Stump <mrs@cygnus.com>
10607 * cp-decl.c (finish_decl): Make sure things that can go into
10608 "common", do go into common, if -fcommon is given.
10610 Wed Dec 8 13:01:54 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10612 * cp-call.c (print_harshness) [DEBUG_MATCHING]: New function.
10613 (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print out
10614 argument matching diagnostics to make instantly clear what the
10617 * cp-call.c (convert_harshness_ansi): If the parm isn't an lvalue,
10618 then check to see if the penalty was increased due to
10619 signed/unsigned mismatch, and use a TRIVIAL_CODE if it wasn't.
10621 Tue Dec 7 18:29:14 1993 Kung Hsu (kung@cirdan.cygnus.com)
10623 * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution
10626 Tue Dec 7 16:09:34 1993 Jason Merrill (jason@deneb.cygnus.com)
10628 * cp-class.c (finish_struct): Before synthesizing methods, if no
10629 methods have yet been declared then set nonprivate_method. Don't
10630 set non_private method after synthesizing a method.
10632 * cp-lex.c (extract_interface_info): If flag_alt_external_templates
10633 is set, tie emitted code to the location of template instantiation,
10634 rather than definition.
10636 * cp-tree.h: Declare flag_alt_external_templates.
10638 * cp-decl2.c (lang_decode_option): Support -falt-external-templates.
10640 * toplev.c (lang_options): Ditto.
10642 Mon Oct 4 12:50:02 1993 Chip Salzenberg (chip@fin.uucp)
10644 [changes propagated from 930810 snapshot]
10645 * cp-decl.c (init_decl_processing): Make long long available for use
10646 as SIZE_TYPE and PTRDIFF_TYPE.
10647 (finish_decl): Allow file-scope static incomplete array.
10648 (grokdeclarator): Don't pass on const and volatile fron function
10649 value type to function type.
10650 Warn here for volatile fn returning non-void type.
10651 * cp-parse.y (attrib): Accept attributes `volatile' with alias
10652 `noreturn', and `const'.
10653 * cp-typeck.c (default_conversion): Don't lose const and volatile.
10654 (build_binary_op_nodefault): Generate pedantic warning for comparison
10655 of complete pointer type with incomplete pointer type.
10656 (build_c_cast): Be careful that null pointer constant be INTEGER_CST.
10658 Tue Dec 7 10:46:48 1993 Jason Merrill (jason@deneb.cygnus.com)
10660 * cp-init.c (expand_vec_init): When creating a temporary for copying
10661 arrays, use the type of the source, not the target.
10663 * cp-cvt.c (convert): Pass an argument for errtype to
10664 convert_to_reference.
10666 * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with
10667 methods, -> and `this'.
10669 Mon Dec 6 17:12:33 1993 Jason Merrill (jason@deneb.cygnus.com)
10671 * cp-error.c (parm_as_string): New function; returns `this' or arg
10672 number. Corresponds to %P.
10673 (dump_expr): Deal with method calls.
10675 * cp-cvt.c (convert_to_reference): Stop using warn_for_assignment.
10676 * cp-typeck.c (convert_for_assignment): Ditto.
10677 (warn_for_assignment): Lose.
10679 Mon Dec 6 11:33:35 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10681 * cp-call.c (ideal_candidate_ansi): Delete code that was never
10682 doing anything useful. Instead, sort once, and DO NOT wipe
10683 out any codes with EVIL_CODE, since that's what we use as a
10684 marker for the end of the list of candidates.
10686 * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN.
10688 Mon Dec 6 12:49:17 1993 Jason Merrill (jason@deneb.cygnus.com)
10690 * cp-init.c (get_aggr_from_typedef): New function, like
10691 is_aggr_typedef but returns the _TYPE.
10693 * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name.
10695 Sun Dec 5 18:12:48 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10697 * cp-lex.c (readescape): Pedwarn when a hex escape is out of range.
10699 Thu Nov 25 23:50:19 1993 Chip Salzenberg (chip@fin.uucp)
10701 Delay language context change until beginning of next decl.
10703 * cp-lex.h (c_header_level): Removed.
10704 (pending_lang_change): Declared.
10705 * cp-lex.c (c_header_level): Renamed from in_c_header, made static.
10706 (pending_lang_change): Defined.
10707 (check_newline): Rework code that recognizes line number and
10708 filename changes. Instead of pushing and popping lang context,
10709 increment and decrement pending_lang_change.
10710 (do_pending_lang_change): Push and pop lang context according
10711 to value of pending_lang_change.
10712 * cp-parse.y (extdefs): Use lang_extdef instead of extdef.
10713 (extdef): Same as extdef, but call do_pending_lang_change() first.
10715 Mon Nov 15 15:39:15 1993 Chip Salzenberg (chip@fin.uucp)
10717 * cp-typeck.c (build_binary_op_nodefault): Warn for ordered
10718 compare of ptr with 0 only if pedantic in both cases.
10720 Thu Nov 25 13:31:37 1993 Chip Salzenberg (chip@fin.uucp)
10722 Reinstate the below patch, which got lost in the Cygnus merge:
10723 Tue Nov 23 13:59:24 1993 Hallvard B Furuseth (hbf@durin.uio.no)
10724 * cp-parse.y (maybe_type_qual): Don't fail to set $$.
10726 Wed Nov 17 19:03:30 1993 Chip Salzenberg (chip@fin.uucp)
10728 * cp-parse.y (attrib): Allow "ident(ident)" like the C front end.
10730 Fri Oct 22 20:43:37 1993 Paul Eggert (eggert@twinsun.com)
10732 * cp-lex.c (real_yylex): Diagnose floating point constants
10733 that are too large.
10735 Wed Nov 17 19:10:37 1993 Chip Salzenberg (chip@fin.uucp)
10737 * cp-type2.c (build_functional_cast): ARM page 16: When a class
10738 and an object, function or enumerator are declared in the same
10739 scope with the same name, the class name is hidden.
10741 Wed Nov 17 19:07:18 1993 Chip Salzenberg (chip@fin.uucp)
10743 * cp-call.c (convert_harshness_ansi): Distinguish float, double,
10744 and long double from each other when overloading.
10745 (compute_conversion_costs_{ansi,old}, build_method_call,
10746 build_overlay_call_real, convert_to_aggr): Always set and
10747 always use H_LEN member of candidate structure.
10749 Mon Oct 11 23:10:53 1993 Chip Salzenberg (chip@fin.uucp)
10751 * cp-decl.c (duplicate_decls): Note redeclarations of library
10752 functions, and generate distinct warnings for them.
10754 Mon Oct 4 12:26:49 1993 Chip Salzenberg (chip@fin.uucp)
10756 Support format warnings in G++.
10758 * cp-tree.h: Protect against multiple inclusion.
10759 Declare all public functions in c-common.c (copy from c-tree.h).
10760 (STDIO_PROTO): Define.
10761 (warn_format): Declare.
10762 (record_format_info): Remove declaration.
10763 * cp-decl.c (init_decl_processing): Call init_function_format_info.
10764 * cp-decl2.c (lang_decode_option): Make "-Wall" include warn_format.
10765 * cp-typeck.c (build_function_call_real): Call check_function_format.
10766 (record_format_info): Remove -- obsolete stub.
10768 Sat Jul 24 12:04:29 1993 Chip Salzenberg (chip@fin.uucp)
10770 * cp-decl.c (duplicate_decls): Don't warn for non-extern var decl
10771 following an extern one (for -Wredundant-decls).
10772 * cp-parse.y (primary): In statement expression case, if compstmt
10773 returns something other than a BLOCK, return it unchanged.
10775 Thu Dec 2 20:44:58 1993 Chip Salzenberg (chip@fin.uucp)
10777 * cp-decl.c (warn_extern_redeclared_static): New function made
10778 from code extracted from pushdecl.
10779 (duplicate_decls, pushdecl): Call new function.
10780 (lookup_name_current_level): Allow for IDENTIFIER_GLOBAL_VALUE
10781 to be a TREE_LIST when function is declared in 'extern "C" {}'.
10783 Fri Dec 3 16:01:10 1993 Jason Merrill (jason@deneb.cygnus.com)
10785 * cp-class.c (duplicate_tag_error): Use cp_error.
10786 (finish_base_struct): Check for ambiguity with direct base, and don't
10787 generate op= or copy ctor if it exists.
10789 Fri Dec 3 15:32:34 1993 Kung Hsu (kung@cirdan.cygnus.com)
10791 * cp-init.c (expand_member_init): when initializer name is null,
10792 don't try to build it now because emit_base_init will handle it.
10794 Fri Dec 3 12:28:59 1993 Jason Merrill (jason@deneb.cygnus.com)
10796 * cp-lex.c (init_lex): Initialize input_filename to "<internal>" for
10797 code such as ExceptionHandler::operator=.
10799 Fri Dec 3 10:32:08 1993 Jason Merrill (jason@deneb.cygnus.com)
10801 * cp-decl.c (grokdeclarator): Don't try to print out dname when
10802 complaining about arrays of references if decl_context==TYPENAME,
10803 since it will be null.
10805 * cp-decl2.c: Default to flag_ansi_overloading.
10807 Thu Dec 2 18:05:56 1993 Kung Hsu (kung@cirdan.cygnus.com)
10809 * cp-call.c (build_method_call): use binfo from instance if it's
10810 different from binfo (basetype_path) passed from above.
10812 Thu Dec 2 12:48:36 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10814 Wed Nov 17 19:14:29 1993 Chip Salzenberg (chip@fin.uucp)
10816 cp-error.c (dump_expr): Use unsigned chars to output a
10817 TREE_REAL_CST in hex.
10819 Thu Dec 2 11:05:48 1993 Jason Merrill (jason@deneb.cygnus.com)
10821 * cp-class.c (finish_struct): Fix typo in setting
10822 cant_synth_asn_ref.
10824 * cp-tree.h (TYPE_NESTED_NAME): New macro, does
10825 DECL_NESTED_TYPENAME (TYPE_NAME (NODE)).
10827 * cp-lex.c (default_copy_constructor_body): Change
10828 DECL_NAME (TYPE_NAME (btype)) to TYPE_NESTED_NAME (btype).
10829 (default_assign_ref_body): Ditto.
10830 (default_copy_constructor_body): Call operator= explicitly for
10831 base classes that have no constructor.
10833 Thu Dec 2 10:47:15 1993 Michael Tiemann (tiemann@blues.cygnus.com)
10835 * cp-call.c (build_method_call): If the instance variable is
10836 converted to error_mark_node when we're trying to convert it to the
10837 base type of a method we're looking up, return error_mark_node.
10839 Thu Dec 2 10:41:16 1993 Torbjorn Granlund (tege@cygnus.com)
10841 * cp-typeck.c (build_binary_op_nodefault): In *_DIV_EXPR *_MOD_EXPR
10842 cases, tests for unsigned operands by peeking inside a NOP_EXPR.
10844 Wed Dec 1 13:33:34 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10846 * cp-call.c (compute_conversion_costs_ansi): Use the size of struct
10847 harshness_code, not the size of short, for clearing out the
10850 * cp-call.c (print_candidates): New function.
10851 (build_method_call): When we had some candidates, but didn't get a
10852 usable match, don't report that we got an error with the first
10853 candidate. Instead, say there were no matches, and list the
10854 candidates with print_candidates. In the second pass, make sure we
10855 clear out ever_seen, so we can accurately count the number of
10856 functions that qualified.
10858 Wed Dec 1 09:53:59 1993 Torbjorn Granlund (tege@cygnus.com)
10860 * cp-typeck.c (build_binary_op_nodefault): Shorten for *_MOD_EXPR
10861 only if op1 is known to be != -1.
10862 (build_binary_op_nodefault): Handle *_DIV_EXPR likewise.
10864 Tue Nov 30 14:07:26 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10866 * cp-method.c (hack_identifier): If the field itself is private, and
10867 not from a private base class, say so.
10869 Mon Nov 29 03:00:56 1993 Jason Merrill (jason@deneb.cygnus.com)
10871 * cp-decl.c (grokdeclarator): Always warn on initialization of
10874 Wed Nov 24 00:49:35 1993 Jason Merrill (jason@deneb.cygnus.com)
10876 * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly.
10877 (finish_base_struct): Set cant_synth_asn_ref properly.
10879 * cp-lex.c (cons_up_default_function): Add section for operator=.
10880 (default_assign_ref_body): New function, mostly cribbed from
10881 default_copy_constructor_body.
10883 * cp-class.c (base_info): Add members cant_synth_copy_ctor,
10884 cant_synth_asn_ref, no_const_asn_ref.
10885 (finish_base_struct): Update no_const_asn_ref, note that you should
10886 update cant_synth_*, propagate TYPE_GETS_ASSIGN_REF.
10887 (finish_struct): Add decls for cant_synth_*, no_const_asn_ref, and
10888 initialize them properly. Set no_const_asn_ref properly. Set
10889 cant_synth_* in some of the situations where they should be set.
10890 Propagate TYPE_GETS_ASSIGN_REF. Use cant_synth_copy_ctor. Add call
10891 to cons_up_default_function for operator=.
10893 Tue Nov 23 20:24:58 1993 Mike Stump <mrs@cygnus.com>
10895 * cp-cvt.c (convert_force): Add code to perform casting of pointer
10896 to member function types.
10897 * cp-typeck.c (build_ptrmemfunc): Add FORCE parameter to indicate
10898 when the conversion should be done, regardless.
10899 * cp-tree.h (build_ptrmemfunc): Ditto.
10900 * cp-type2.c (digest_init): Ditto.
10901 * cp-typeck.c (convert_for_assignment): Ditto.
10903 Tue Nov 23 18:06:58 1993 Jason Merrill (jason@deneb.cygnus.com)
10905 * cp-error.c (dump_expr): Do the right thing for variables of
10908 * cp-decl.c (grok_op_properties): Set TYPE_HAS_ASSIGN_REF
10909 and its kin properly.
10910 (xref_tag): Propagate TYPE_GETS_ASSIGN_REF.
10912 Tue Nov 23 12:26:13 1993 Mike Stump <mrs@cygnus.com>
10914 * cp-method.c (build_opfncall): Don't count pointer to member
10915 functions as aggregates here, as we don't want to look up methods in
10916 them. The compiler would core dump if we did, as they don't have
10918 * cp-typeck.c (build_indirect_ref): Improve wording on error
10921 Mon Nov 22 14:22:23 1993 Jason Merrill (jason@deneb.cygnus.com)
10923 * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn
10924 (since it's supported in other compiler bits).
10926 * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name
10929 * cp-error.c (dump_function_decl): Don't print return type for
10930 constructors and destructors.
10932 * cp-cvt.c (cp_convert_to_pointer): Import code from
10933 convert_to_pointer so we can return error_mark_node in the case of an
10934 error, and to allow more meaningful error messages.
10935 (build_type_conversion): Don't go through void* when trying
10936 to convert to a pointer type.
10938 * cp-decl.c (grokfndecl): Move call to grok_op_properties back
10939 after grokclassfn so that it's dealing with the right decl.
10940 (grok_op_properties): Don't assert !methodp for op new and op delete.
10942 * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now
10943 no uses of it in the compiler).
10945 * cp-call.c (build_scoped_method_call): Fix for destructors of simple
10947 (build_method_call): Ditto.
10949 Fri Nov 19 12:59:38 1993 Jason Merrill (jason@deneb.cygnus.com)
10951 * cp-tree.c (count_functions): Abstraction function.
10953 * cp-call.c (build_overload_call_real): Deal with new overloading
10954 properly, remove dead code.
10956 * gcc.c (default_compilers): Generate and use .ii files in the
10957 intermediate stage of compiling C++ source.
10959 Fri Nov 19 11:26:09 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
10961 * cp-expr.c (cplus_expand_expr): Make call_target a valid memory
10962 address before using it, so it can be later safely compared.
10964 Fri Nov 12 15:30:27 1993 Jason Merrill (jason@deneb.cygnus.com)
10966 * cp-pt.c (tsubst): Deal with new overloading.
10968 * cp-typeck.c (fntype_p): is the arg function type?
10969 (comp_target_parms): pedwarn on conversion from (anything) to (...).
10970 (build_x_function_call): Deal with new overloading.
10972 * cp-tree.c (decl_list_length): Deal with new overloading.
10973 (decl_value_member): Like value_member, but for DECL_CHAINs.
10975 * cp-decl.c (duplicate_decls): Deal with new overloading.
10976 (start_decl): Ditto.
10978 * cp-class.c (instantiate_type): Deal with new overloading.
10980 * cp-call.c (convert_harshness_ansi): Deal with new overloading.
10981 (convert_harshness_old): Deal with new overloading.
10982 (build_overload_call_real): Ditto.
10984 Mon Nov 8 13:50:49 1993 Jason Merrill (jason@deneb.cygnus.com)
10986 * cp-tree.c (get_unique_fn): New function; returns FUNCTION_DECL
10987 if unambiguous, NULL_TREE otherwise.
10988 (get_first_fn): Returns the first appropriate FUNCTION_DECL.
10989 (is_overloaded_fn): Returns whether or not the passed tree is
10990 a function or list of functions.
10992 * cp-init.c (init_init_processing): use `get_first_fn' to find
10993 the FUNCTION_DEFN for new and delete.
10995 * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut
10996 code size in half (I spit on special cases).
10998 Tue Sep 7 20:03:33 1993 Jason Merrill (jason@deneb.cygnus.com)
11000 * cp-decl.c: Allow references and template type parameters as well