]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
Initial revision
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
7ea63af7
MH
1Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
2
3 * g++.c (main): Check also for new define ALT_LIBM.
4
ec255269
MS
5Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
6
7 * pt.c (instantiate_class_template): If we don't have a pattern
8 yet, that's OK.
9 (coerce_template_parms): If we see a local class, bail.
10
11 * decl.c (grok_reference_init): Make sure there's a type before
12 checking its code.
13
14 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
15 (push_template_decl): Ditto.
16
17 * parse.y (named_class_head): Set
18 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
19
20 * decl.c (xref_tag): Diagnose redeclaration of template
21 type-parameter name.
22
23 * error.c (dump_type): Handle anonymous template type parms.
24
25 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
26 TYPE_STUB_DECL.
27 (coerce_template_parms): Ditto.
28
29Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
30
31 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
32 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
33
34Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
35
36 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
37 before trying to get its STUB_DECL.
38 (coerce_template_parms): Ditto.
39
40 * parse.y (template_type_parm): If they didn't use 'class',
41 pretend they did after giving an error.
42
43 * pt.c (coerce_template_parms): Diagnose use of local class.
44
45 * decl.c (grok_reference_init): Use instantiate_type.
46
47 * error.c (dump_expr): Handle TEMPLATE_DECLs.
48
49 * parse.y (named_class_head): Diagnose mismatching types and tags.
50
51 * decl.c (pushdecl): Type decls and class templates clash with
52 artificial type decls, not hide them.
53
54 * decl.c (redeclaration_error_message): Diagnose redefinition of
55 templates properly.
56 (duplicate_decls): Diagnose disallowed overloads for template
57 functions, too.
58
59 * decl.c (start_decl): Call complete_type before checking for a
60 destructor.
61
62 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
63
64 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
65
5566b478
MS
66Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
67
ec255269
MS
68 * decl.c (grok_op_properties): Don't check for operator++(int) in
69 a template.
70
71 * tree.c (perm_manip): Return a copy of variable and function
72 decls with external linkage.
73
74 * tree.def: Change some of the min tree codes to type "1".
75 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
76 * method.c (build_overload_int): Emit something arbitrary for
77 anything but an INTEGER_CST if we're in a template.
78
79 * decl.c (cp_finish_decl): Call complete_type before deciding
80 whether or not to lay out the decl.
81
5566b478
MS
82 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
83
84Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
85
86 * typeck2.c (build_x_arrow): Call complete_type.
87
88 * pt.c (add_pending_template): Broken out.
89 (lookup_template_class): If -fexternal-templates, call it for all
90 the methods of implemented types.
91 (instantiate_class_template): Instead of instantiating them here.
92 (instantiate_decl): Handle -fexternal-templates earlier.
93
94Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
95
96 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
97 memoized lookup stuff inside GATHER_STATISTICS.
98
99Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
100
101 * decl.c (start_decl): Complain about array of incomplete type
102 here.
103 (grokdeclarator): Not here.
104
105 * parse.y (template_parm): Expand full_parm inline so we can set
106 the rule's precedence.
107
108 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
109 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
110 * decl2.c (grokbitfield): Don't check for integer constant here.
111 * class.c (finish_struct_1): Check here.
112
113 * decl.c (define_label): Make the min decl go on permanent_obstack.
114
115 * pt.c (unify): Don't handle CONST_DECLs.
116 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
117 (tsubst_copy): Ditto.
118
119 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
120 CONST_DECL for a template parm.
121
122Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
123
124 * decl.c (grokdeclarator): Complain about array of incomplete type
125 here.
126 (start_decl_1): Not here.
127
128 * pt.c (tsubst): Handle pointer-to-function declarators.
129
130 * method.c (hack_identifier): If pedantic, diagnose local class
131 methods that require a static chain.
132
133 * decl.c (grok_op_properties): No longer static.
134 * cp-tree.h: Declare it.
135 * pt.c (tsubst): Call it for operators.
136 Use tsubst_copy for TREE_VECs.
137
138 * parse.y (template_arg): The expr has precedence like '>'.
139
140Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
141
142 * pt.c (coerce_template_parms): Don't coerce an expression using
143 template parms.
144 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
145 (tsubst): Don't use build_index_2_type if the max_value uses template
146 parms.
147 * method.c (build_overload_int): Emit something arbitrary for an
148 expression using template parms.
149
150 * parse.y (template_close_bracket): New non-terminal to catch use
151 of '>>' instead of '> >' in template class names.
152 (template_type): Use it.
153 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
154
155 * tree.def: Add CAST_EXPR.
156 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
157 CONVERT_EXPR for minimal_parse_mode.
158 * typeck.c (build_c_cast): Ditto.
159 * pt.c (tsubst_copy): Ditto.
160 * decl2.c (build_expr_from_tree): Ditto.
161 * error.c (dump_expr): Ditto.
162
163Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
164
165 * except.c (SetTerminate, SetUnexpected): Put back global vars.
166 (init_exception_processing): Put back decl/init of
167 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
168 fns from libstdc++.
169
170 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
171 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
172 Delete unused fns.
173 * cp-tree.h (declare_uninstantiated_type_level,
174 uninstantiated_type_level_p): Delete prototypes.
175
176Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
177
178 * pt.c (tsubst_expr): Add default return.
179
180Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
181
182 * error.c (fndecl_as_string): Delete unused arg CNAME.
183 * sig.c (build_signature_table_constructor,
184 build_signature_method_call): Fix calls.
185
186 * class.c (the_null_vtable_entry): Delete var definition.
187 (init_class_processing): Delete tree the_null_vtable_entry init.
188 * decl.c (no_print_{functions, builtins}): Declare as static.
189 (__tp_desc_type_node): #if 0 var definition.
190 (init_type_desc): #if 0 init of __tp_desc_type_node.
191 (vb_off_identifier): Move var decl into init_decl_processing.
192 (current_function_assigns_this): Declare as static.
193 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
194 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
195 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
196 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
197 * init.c (BI_header_type, BI_header_size): Declare as static.
198 * pt.c (template_classes): Delete unused var.
199 (add_pending_template): Delete decl for non-existent fn.
200 (lookup_template_class): Delete vars CODE and TAG_CODE.
201 (instantiate_template): Delete unused var TARGS.
202 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
203 Delete decls.
204 (__tp_desc_type_node): #if 0 var decl.
205 (fndecl_as_string): Fix prototype.
206
207Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
208
209 * tree.def: Add GOTO_STMT.
210 * pt.c (tsubst_expr): Support goto and labels.
211 * decl.c (define_label): Support minimal parsing.
212 * parse.y (simple_stmt): Ditto.
213
214Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
215
216 * xref.c (GNU_xref_member): Only define/set var I if
217 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
218 used.
219 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
220 (GNU_xref_end): Fix call.
221 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
222 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
223
224 * tree.c (build_exception_variant): Delete unused vars I, A, T,
225 T2, and CNAME.
226 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
227 (mapcar): Delete unused var CODE.
228 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
229 (break_out_cleanups): Fix call.
230 (bot_manip): Likewise.
231 * call.c (build_method_call): Likewise.
232 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
233 Likewise.
234 * typeck.c (unary_complex_lvalue, build_modify_expr,
235 convert_for_initialization): Likewise.
236 * typeck2.c (build_functional_cast): Likewise.
237 * cp-tree.h (build_cplus_new): Fix prototype.
238
239 * repo.c (open_repo_file): Delete unused var Q.
240 (repo_compile_flags, repo_template_declared,
241 repo_template_defined, repo_class_defined, repo_inline_used,
242 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
243 (repo_get_id, repo_vtable_used): Declare as static.
244 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
245 prototypes.
246
247Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
248
249 * parse.y (pending_inlines): Add function_try_block case.
250
251 * pt.c (unify): Fix for template const parms.
252
253Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
254
255 * lex.c (extract_interface_info): Delete forward decl.
256 (default_copy_constructor_body, default_assign_ref_body): Delete
257 decls for non-existent functions.
258 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
259 (init_lex): Delete setting them.
260 (cons_up_default_function): Delete unused vars FUNC_BUF,
261 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
262 #if 0'd synth code.
263 (toplevel, expression_obstack): Delete unused extern decls.
264 (tree_node_kind): Delete unused enum.
265 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
266 GATHER_STATISTICS.
267 (tree_node_kind_names): Delete unused extern decl.
268 (synth_obstack): Delete unused var.
269 (init_lex): Don't set it.
270 (init_parse): Add decl before use.
271 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
272 (current_unit_{name, language}): Delete unused vars.
273 (check_newline): Don't bother setting them, just accept the #pragma.
274 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
275 (current_unit_{name, language}): Delete decls.
276
277 * search.c: Wrap all of the memoized functions, macros, and
278 variables inside #ifdef GATHER_STATISTICS.
279 (lookup_field, lookup_fnfields): Likewise.
280 (init_search_processing): Likewise.
281 (reinit_search_statistics): Wrap whole function.
282 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
283
284 * decl.c (finish_function): Only call pop_memoized_context if
285 GATHER_STATISTICS is defined.
286 (start_function): Likewise for push_memoized_context.
287 * class.c (pushclass, popclass): Likewise.
288
289 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
290 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
291
292 * cvt.c (cp_convert): Delete unused local var FORM.
293 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
294 prototypes.
295
296Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
297
298 * pt.c (do_poplevel): Oops; really return what we get from
299 poplevel this time.
300
301Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
302
303 * cp-tree.h (is_aggr_type): Add prototype.
304
305 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
306 * method.c ({push,pop}_cp_function_context): Delete decls.
307 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
308 (SetUnexpected, SetTerminate): Delete unused vars.
309 (init_exception_processing): Don't set SetUnexpected or
310 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
311 (output_exception_table_entry): Delete unused array LABEL.
312 (expand_internal_throw): Delete unused var PARAMS.
313 (expand_start_catch_block): Delete unused var CLEANUP.
314 (emit_exception_table): Delete unused var EH_NODE_DECL.
315 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
316 GOTO_UNWIND_AND_THROW. Don't set them.
317 (end_eh_unwinder): Add top decl.
318 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
319 (exception_section, push_rtl_perm, do_function_call,
320 lang_interim_eh, push_eh_cleanup, eh_outer_context,
321 expand_end_eh_spec, end_eh_unwinder): Declare as static.
322 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
323 throw_used): Likewise.
324 * cp-tree.h (expand_end_eh_spec): Delete prototype.
325
326 * search.c (dfs_mark, dfs_mark_vtable_path,
327 dfs_unmark_vtable_path, dfs_mark_new_vtable,
328 dfs_unmark_new_vtable, dfs_clear_search_slot,
329 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
330 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
331 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
332 functions.
333 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
334 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
335 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
336 Only define #ifdef GATHER_STATISTICS.
337 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
338 is defined.
339 (vbase_decl): Delete var definition.
340 (init_search): Delete old decl.
341 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
342 never actually used.
343 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
344 (get_base_distance_recursive): Delete unused fourth arg
345 BASETYPE_PATH. Fix call .
346 (get_base_distance): Fix call.
347 (push_class_decls): Delete unused var ID.
348 (make_memoized_table_entry): Declare as static.
349 (breadth_first_search): Declare as static.
350 (tree_has_any_destructor_p): Declare as static.
351 (pop_class_decls): Delete unused arg pop_class_decls.
352 * class.c (popclass): Fix call to pop_class_decls.
353 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
354 tree_has_any_destructor_p): Delete prototypes.
355
356 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
357 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
358 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
359 (build_user_desc): Delete unused var T.
360 (build_class_desc): Delete unused vars T and OFF.
361 (build_t_desc): Delete unused var NAME_STRING.
362 (build_headof): Make static.
363 (get_bad_cast_node): Likewise.
364 (get_def_to_follow): Likewise.
365 * cp-tree.h (init_type_desc): Add prototype.
366 (build_headof): Remove prototype.
367
368Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
369
370 * pt.c (tsubst): Only look for matching decls at file scope for
371 non-member functions.
372
373 * call.c (build_scoped_method_call): Handle scoped destructor
374 calls in templates.
375
376 * decl.c (*_top_level): Also save previous_class_values.
377
378 * pt.c (tsubst_expr): Support do {} while loops.
379 * parse.y (simple_stmt): Ditto.
380 * tree.def: Ditto.
381
382 * method.c (build_overload_identifier): For a class nested in a
383 template class, don't mangle in the template parms from our
384 context.
385
386 * lex.c, cp-tree.h: Remove support for template instantiations in
387 the pending_inlines code.
388 * pt.c: Remove dead functions and unused arguments.
389 (uses_template_parms): TYPENAME_TYPEs always use template parms.
390 * parse.y: Stop passing anything to end_template_decl.
391 * tree.c (print_lang_statistics): Only print tinst info #ifdef
392 GATHER_STATISTICS.
393
394Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
395
396 * init.c (expand_recursive_init{,_1}): Delete decls.
397 (sort_member_init): Delete unused var INIT.
398 (emit_base_init): Delete unused var X.
399 (build_offset_ref): Delete unused var CNAME.
400 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
401 (emit_base_init): Delete unused local var BASE. Delete extern
402 decl of IN_CHARGE_IDENTIFIER.
403 (build_delete): Delete unused local var VIRTUAL_SIZE.
404
405 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
406 (build_delete): Fix call.
407 * decl2.c (delete_sanity): Likewise.
408 * cp-tree.h (build_vec_delete): Update prototype.
409
410 * typeck.c (common_base_type): Delete unused var TMP.
411 (build_binary_op): Delete local var ARGS_SAVE.
412 (build_array_ref): Delete unused var ITYPE.
413 (c_expand_return): Delete unused var USE_TEMP.
414
415 * typeck.c (compexcepttypes): Delete unused arg STRICT.
416 (comptypes): Fix calls.
417 * decl.c (duplicate_decls): Likewise.
418 * cp-tree.h (compexcepttypes): Delete extra arg.
419
420 * decl2.c (check_classfn): Delete unused second arg CNAME.
421 * decl.c (start_decl, grokfndecl): Fix calls.
422 * init.c (do_friend): Likewise.
423 * cp-tree.h (check_classfn): Update prototype.
424
425 * cp-tree.h (signature_error, import_export_vtable,
426 append_signature_fields, id_in_current_class, mark_used,
427 copy_assignment_arg_p): Add decls.
428 * decl2.c (mark_used): Delete decl.
429
430 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
431
432 * class.c (get_vtable_entry): Diable unused function.
433 (doing_hard_virtuals): Delete unused static global var.
434 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
435 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
436 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
437 (modify_one_vtable): Delete unused var OLD_RTTI.
438 (finish_struct_anon): Delete unused vars OFFSET and X.
439 (finish_struct_bits): Delete unused var METHOD_VEC.
440 (get_basefndecls): Delete unused var PURPOSE. Delete unused
441 for-scope local variable METHODS.
442
443 * call.c (user_harshness): Delete unused/unneeded arg PARM.
444 (ideal_candidate): Delete unused args BASETYPE and PARMS.
445 (build_method_call): Delete unused args passed into ideal_candidate.
446 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
447 * cp-tree.h (synthesize_method): Add decl.
448
449 * decl.c (note_level_for_for): Give void return type.
450 (pushdecl_nonclass_level): Likewise.
451 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
452 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
453 (suspend_binding_level): Delete unused var LEVEL.
454 (duplicate_decls): Delete unused var CTYPE.
455 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
456 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
457 PTR_ENDLINK.
458 (grokdeclarator): Delete unused var C.
459 (grokdeclarator): Delete unused var SIZE_VARIES.
460 (grokparms): Delete unused var SAW_VOID.
461 (start_function): Delete unused var OLDDECL.
462 (cplus_expand_expr_stmt): Delete unused var
463 REMOVE_IMPLICIT_IMMEDIATELY.
464
465 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
466
467 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
468
469Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
470
471 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
472 (build_min_nt): Ditto.
473 * pt.c (do_pushlevel): Emit line note.
474 (do_poplevel): Return what we get from poplevel.
475 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
476 * parse.y: Use do_pushlevel and do_poplevel.
477 * cp-tree.h: Declare do_poplevel.
478
479 * cp-tree.h: Declare at_eof.
480 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
481 * decl2.c (import_export_decl): Renamed from import_export_inline.
482 (finish_file): Call it to do interface handling for statics.
483 * pt.c (tsubst_copy): Call mark_used on variables and functions
484 used here.
485
486 * decl2.c (finish_file): Don't emit statics we can't generate.
487 * pt.c (instantiate_decl): Don't set interface on instantiations
488 we can't generate.
489
490 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
491 * tree.c (print_lang_statistics): Print max template depth.
492 * pt.c (push_tinst_level): Dump entire instantiation context.
493 (instantiate_class_template): Use it and pop_tinst_level.
494 (instantiate_decl): Ditto.
495
496 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
497 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
498
499Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
500
501 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
502 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
503 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
504 the new template implementation.
505
506Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
507
508 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
509
cffa8729
MS
510Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
511
512 * decl.c (cp_finish_decl): Delay emitting the debug information for
513 a typedef that has been installed as the canonical typedef, if the
514 type has not yet been defined.
515
516Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
517
518 * decl2.c (grokfield): Still call pop_nested_class for access decls.
519
520Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
521
522 * decl.c (lookup_label): Call label_rtx.
523
524 * decl.c (make_binding_level): New function.
525 (pushlevel, pushlevel_class): Call it instead of explicit
526 duplicate calls to xmalloc.
527
528 * decl.c (init_decl_processing): Delete useless build_pointer_type
529 call.
530
531 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
532 (sizet_ftype_string): Delete variable.
533 (init_decl_processing): Add built-in functions fabsf, fabsl,
534 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
535 variable strlen_ftype, used for strlen.
536
537Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
538
539 * decl.c (push_to_top_level): Start from current_binding_level
540 again for now; the stl hacks depend on g++ being broken in this
541 way, and it'll be fixed in the template rewrite.
542
543 * tree.def: Add USING_DECL.
544 * decl2.c (do_class_using_decl): Implement.
545 (grokfield): Pass access decls off to do_class_using_decl instead of
546 grokdeclarator.
547 * error.c (dump_decl): Handle USING_DECLs.
548 * decl.c (grokdeclarator): Remove code for handling access decls.
549 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
550 as access decls for now.
551 (finish_struct): Don't check USING_DECLs for other uses of the name.
552
553 * search.c (get_matching_virtual): Use cp_error_at.
554
555Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
556
557 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
558 match c-typeck.c.
559 (self_promoting_args_p): Move the check that TYPE is non-nil
560 before trying to look at its main variant.
561 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
562
563 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
564 Delete macros.
565 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
566 (do_friend): Delete call to xref_friend.
567 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
568
569 * typeck.c (convert_sequence): #if 0 unused function.
570
571 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
572 be in decl_in_memory_p.
573 (decl_in_memory_p): Delete decl.
574 * expr.c (decl_in_memory_p): Delete fn.
575 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
576
577 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
578
579Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
580
581 * class.c (finish_struct_1): Check for a pure-specifier on a
582 non-virtual function here.
583
584 * decl2.c (grok_function_init): Don't check whether the function
585 is virtual here.
586 (grokfield): Don't call check_for_override here.
587
588 * decl.c (push_to_top_level): Start from inner_binding_level,
589 check class_shadowed in class levels.
590
591Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
592
593 * decl.c (resume_level): Ignore things that don't have names, instead
594 of core dumping.
595
596Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
597
598 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
599
600Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
601
602 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
603 synthesized dtor.
604
605 * parse.y (complete_type_name): Bind global_scope earlier.
606 (complex_type_name): Ditto.
607 (qualified_type_name): Remove.
608
2ee887f2
MS
609Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
610
611 * decl.c (grokfndecl): Move code that looks for virtuals in base
612 classes...
cffa8729 613 * class.c (check_for_override): ... to a new function.
2ee887f2
MS
614 (finish_struct_1): Call it.
615
616 * cp-tree.h: Declare warn_sign_compare.
617
618 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
619 rather than extra_warnings to decide whether to warn about
620 comparison of signed and unsigned.
621
622 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
623 implies -Wsign-compare. -Wall doesn't imply -W.
624
625Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
626
627 * typeck.c (build_component_ref): Fix to handle anon unions in base
628 classes as well.
629
630Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
631
632 * class.c (resolves_to_fixed_type_p): Delete code dealing with
633 a WITH_CLEANUP_EXPR, since we don't generate them any more.
634 * cvt.c (build_up_reference): Likewise.
635 * decl.c (grok_reference_init): Likewise.
636 (cp_finish_decl): Likewise.
637 * error.c (dump_expr): Likewise.
638 * tree.c (real_lvalue_p): Likewise.
639 (lvalue_p): Likewise.
640 (build_cplus_new): Likewise.
641 (unsave_expr_now): Likewise.
642 * typeck.c (unary_complex_lvalue, build_modify_expr,
643 c_expand_return): Likewise.
644
645Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
646
647 Make the C++ front-end pay attention to attributes for structures.
648 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
649 finish_struct_1.
650 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
651 Take out old round_up_size use and setting the DECL_ALIGN possibly
652 using it. Take out setting of TYPE_ALIGN to round_up_size, which
653 can override what the attribute set.
654 * cp-tree.h (finish_struct): Update prototype.
655 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
656 attributes to finish_struct.
657 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
658 value down into finish_struct.
659 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
660
661Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
662
663 * decl.c (poplevel): Re-word dead for local handling.
664 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
665 (cp_finish_decl): If is_for_scope, check for duplicates so
666 we can disable is_for_scope. Otherwise, preserve_temp_slots.
667
668 * lex.c (do_identifier): Use global binding in preference of
669 dead for local variable.
670
671Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
672
673 * init.c (initializing_context): Handle anon union changes, the
674 context where fields of anon unions can be initialized now has to be
675 found by walking up the TYPE_CONTEXT chain.
676
677Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
678
679 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
680 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
681 (obscure_complex_init): If bss is supported, always set
682 DECL_INITIAL to error_mark_node.
683
684Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
685
686 * init.c (is_friend): Make sure there's a context before we see if
687 it's an aggr type.
688
689Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
690
691 * init.c (is_friend): Classes are not friendly with nested classes.
692
693Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
694
695 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
696 and record its result.
697
9e9ff709
MS
698Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
699
700 * class.c (finish_struct_anon): Switch around code to not move anon
701 union elements around, nor mess up their contexts, nor offsets,
702 instead we now build up the right number of COMPONENT_REFs for all
703 the anon unions that may be present at build_component_ref time.
704 * typeck.c (lookup_anon_field): New routine to handle field lookup
705 on fields without names. We find them, based upon their unique type
706 instead.
707 * typeck.c (build_component_ref): Allow FIELD_DECL components.
708 Handle finding components in anonymous unions, and ensure that a
709 COMPONENT_REF is built for each level as necessary.
710
711Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
712
713 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
714 code that ensures that copy ctors are used if appropriate.
715
716Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
717
718 * init.c (build_vec_delete): Only give an error if base isn't an
719 error_mark_node.
720
721Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
722
723 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
724 (yylex): If we see `new', keep slurping.
725
726Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
727
728 * class.c (finish_struct_1): Move code for handling anon unions...
729 (finish_struct_anon): to here. Fixup so that we do the offset
730 calculations right, and so that the fields are physically moved to
731 the containers's chain.
732
733Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
734
735 * decl.c (grokdeclarator): Avoid trying to get an operand off an
736 identifier node.
737
738Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
739
740 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
741 POINTER_SIZE to agree with expr.c.
742
743Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
744
745 * search.c (lookup_field): Don't report ambiguities if protect is 0,
746 instead return NULL_TREE.
747
748Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
749
750 * class.c (finish_struct_1): Call warn_hidden if we want warnings
751 about overloaded virtual functions.
752 (warn_hidden): New routine to warn of virtual functions that are
753 hidden by other virtual functions, that are not overridden.
754 (get_basefndecls): New routine, used by warn_hidden.
755 (mark_overriders): New routine, used by warn_hidden.
756 * search.c (get_matching_virtual): Remove old warning that just
757 isn't very useful.
758
759Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
760
761 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
762
763 * typeck.c (null_ptr_cst_p): Delete unused fn.
764 (build_function_call_maybe): Delete unused fn.
765
766 * expr.c (extract_init): #if 0 the code after unconditional return 0
767 for now.
768
769 Delete old cadillac code.
770 * edsel.c: Remove file.
771 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
772 * Makefile.in (CXX_OBJS): Delete edsel.o.
773 (edsel.o): Delete rule.
774 * cp-tree.h (flag_cadillac): Delete var decl.
775 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
776 * decl2.c (flag_cadillac): Delete var definition.
777 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
778 (grokfield): Delete code depending on flag_cadillac.
779 (finish_anon_union): Likewise.
780 * class.c (finish_struct_1): Likewise.
781 (pushclass): Likewise.
782 (popclass): Likewise.
783 (push_lang_context): Likewise.
784 (pop_lang_context): Likewise.
785 * decl.c (init_decl_processing): Likewise.
786 (start_decl): Likewise.
787 (cp_finish_decl): Likewise.
788 (xref_tag): Likewise.
789 (finish_enum): Likewise.
790 (start_function): Likewise.
791 (finish_function): Likewise.
792 (finish_stmt): Likewise.
793 * lex.c (lang_init): Likewise.
794 (check_newline): Likewise.
795
796 * lex.c (do_pending_inlines): Delete synthesized method kludge.
797
798 Delete defunct, ancient garbage collection implementation.
799 * rtti.c: New file with the RTTI stuff from gc.c.
800 * gc.c: Removed file (moved the remaining stuff into rtti.c).
801 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
802 (rtti.o): New rule, replacing gc.o.
803 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
804 * cp-tree.h: Delete gc-related fn decls.
805 (DECL_GC_OFFSET): Delete macro.
806 (flag_gc): Delete extern decl.
807 * decl.c (current_function_obstack_index): Delete var decl.
808 (current_function_obstack_usage): Delete var decl.
809 (start_function): Delete clearing of current_function_obstack_index
810 and current_function_obstack_usage.
811 (init_decl_processing): Delete code relying on -fgc.
812 Delete call to init_gc_processing.
813 (cp_finish_decl): Delete calls to build_static_gc_entry and
814 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
815 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
816 and to expand_expr of a __gc_main call.
817 (maybe_gc_cleanup): Delete var decl.
818 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
819 * decl2.c (flag_gc): Delete var decl.
820 (lang_f_options): Delete offering of -fgc.
821 (lang_decode_option): Delete -fgc and -fno-gc handling.
822 (get_temp_regvar): Delete gc code.
823 * init.c (build_new): Delete gc code.
824 * lex.c (init_lex): Delete checking of flag_gc.
825
826 * typeck.c (convert_arguments): Delete gc code.
827 (build_component_addr): Delete -fgc warning.
828 (build_modify_expr): Delete gc code.
829
830 * decl2.c (build_push_scope): Delete fn.
831 * cp-tree.h (build_push_scope): Delete decl.
832
833 * search.c (clear_search_slots): Delete fn.
834 * cp-tree.h (clear_search_slots): Delete decl.
835
836 * search.c (tree_needs_constructor_p): Delete fn.
837 * cp-tree.h (tree_needs_constructor_p): Delete decl.
838
839 * tree.c (id_cmp): Delete fn.
840
841 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
842 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
843
844 * tree.c (decl_value_member): Delete fn.
845 * cp-tree.h (decl_value_member): Delete decl.
846
847 * tree.c (list_hash_lookup_or_cons): Delete fn.
848 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
849
850 * method.c (cplus_exception_name): Delete fn.
851 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
852
853 * spew.c (shift_tokens): Delete fn.
854
855Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
856
857 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
858 to cp_finish_decl.
859 * parse.y: Ditto.
860
861Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
862
863 * tree.c (build_cplus_staticfn_type): Delete function definition;
864 never used.
865 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
866
867 * tree.c (virtual_member): Delete function definition; never used.
868 * cp-tree.h (virtual_member): Delete decl.
869
45537677
MS
870Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
871
872 * typeck.c (build_component_ref): Handle getting vbase pointers
873 out of complex multiple inheritance better.
874
875Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
876
877 * typeck.c (build_object_ref): Make sure we use the real type, not
878 any reference type.
879
880Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
881
882 * tree.c (build_exception_variant): Don't create new types if we
883 don't have to, also build new types on the right obstack.
884
885Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
886
887 * decl.c (store_bindings): Split out from push_to_top_level.
9e9ff709
MS
888 (push_to_top_level): Call it for b->type_shadowed on class binding
889 levels.
45537677
MS
890
891Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
892
893 * search.c (expand_upcast_fixups): Fix so that offsets stored in
894 vbase_offsets are always right. Fixes a problem where virtual base
895 upcasting and downcasting could be wrong during conversions on this
896 during virtual function dispatch at ctor/dtor time when dynamic
897 vtable fixups for deltas are needed. This only sounds easier than
898 it is. :-)
899 (fixup_virtual_upcast_offsets): Change to reflect new calling
900 convention for expand_upcast_fixups.
901
902Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
903
904 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
905 check that it's usable as the bitfield width.
906
907Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
908
909 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
910 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
911 only ever used for functions in it.
912
913Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
914
915 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
916 (nested_type): Ditto.
917 (nested_name_specifier): Use lastiddecl.
918
919 * decl.c (grokdeclarator): Adjust accordingly.
920 * init.c (expand_member_init): Ditto.
921 * parse.y (base_class): Ditto.
922 * typeck2.c (build_functional_cast): Ditto.
923
924 * typeck2.c (build_functional_cast): Fill in name after we've
925 checked for non-aggr type.
926
be99da77
MS
927Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
928
929 * decl2.c (warn_pointer_arith): Default to on.
930
931Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
932
933 * lex.c (is_rid): New function.
934 * decl.c (grokdeclarator): Diagnose reserved words used as
935 declarator-ids.
936
937Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
938
939 * tree.c (get_decl_list): Don't lose cv-quals.
940
941 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
942 typespecs used as declarator-ids.
943
944Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
945
946 * decl.c (poplevel): When poping a level, don't give a warning for
947 any subblocks that already exist.
948
949Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
950
951 * typeck.c (build_object_ref): Finish what I started.
952
953 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
954
955 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
956
957 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
9e9ff709 958 scope.
be99da77
MS
959
960Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
961
962 * decl.c (xref_tag): Handle passing a type in directly.
963
964 * parse.y (qualified_type_name): Pull out the type.
965 (nested_type): Ditto.
966 Take types directly instead of as identifiers.
967 * call.c (build_scoped_method_call): Take types directly instead of
9e9ff709
MS
968 as identifiers.
969 * decl.c (xref_basetypes): Ditto.
be99da77
MS
970 * init.c (expand_member_init): Ditto.
971 (build_member_call): Ditto.
972 (build_offset_ref): Ditto.
973 * typeck2.c (build_scoped_ref): Ditto, remove bogus code.
974 * method.c (do_build_assign_ref): Ditto.
975 * decl.c (grokdeclarator): Handle a type appearing as the
976 declarator-id for constructors.
977 * method.c (do_build_copy_constructor): current_base_init_list now
978 uses the types directly, not their names.
979 * init.c (sort_base_init): Ditto.
980 (expand_member_init): Ditto.
981 * init.c (is_aggr_type): New function, like is_aggr_typedef.
be99da77
MS
982
983Mon Jan 15 08:45:01 1996 Jeffrey A Law (law@cygnus.com)
984
985 * tree.c (layout_basetypes): Call build_lang_field_decl instead
986 of build_lang_decl if first arg is a FIELD_DECL.
987 (tree_copy_lang_decl_for_deferred_output): Reverse test for when
988 to copy DECL_MAIN_VARIANT and DECL_CHAIN.
989
990Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
991
992 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
993 non-empty.
994 * except.c (expand_start_catch_block): Set TREE_USED to avoid
995 warnings about the catch handler.
996
997Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
998
999 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
9e9ff709 1000 expand_target_expr.
be99da77
MS
1001
1002Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1003
1004 Fix access control to use trees rather than integers.
1005 * class.c (access_{default, public, protected, private,
1006 default_virtual, public_virtual, private_virtual}_node): Add
1007 definitions.
1008 (init_class_processing): Do creation of those nodes.
1009 * cp-tree.h (access_type): Delete enum decl.
1010 (access_{default, public, protected, private, default_virtual,
1011 public_virtual, private_virtual}_node): Add decls.
1012 (compute_access): Change return type.
1013 * search.c (compute_access): Have tree return type, instead of enum.
1014 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
1015 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
1016 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
1017 * parse.y (VISSPEC): Make ttype rather than itype.
1018 (base_class_access_list): Likewise.
1019 * *.[cy]: Change all refs of `access_public' to `access_public_node',
1020 etc.
1021 * call.c (build_method_call): Make ACCESS be a tree.
1022 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
1023 * cvt.c (convert_to_aggr): Likewise.
1024 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
1025 Likewise.
1026 * method.c (hack_identifier): Likewise.
1027 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
1028
1029Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
1030
1031 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
1032 frontend, and make it more consistent with respect to
1033 warn_pointer_arith.
1034
1035Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
1036
1037 * decl.c (pushdecl): Check for duplicate parameter names.
1038
1039Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
1040
1041 * decl.c (expand_static_init): Call assemble_external for atexit.
1042
1043Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
1044
1045 * except.c (do_unwind): Remove some generated dead code.
1046 (eh_outer_context): New routine, factor out some common code from
1047 expand_builtin_throw and end_eh_unwinder. Add code to do return
1048 address masking for the PA.
1049 (expand_builtin_throw): Use eh_outer_context instead of open coding
1050 it here.
1051 (end_eh_unwinder): Ditto.
1052
1053Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
1054
1055 * except.c (expand_throw): Call assemble_external for __empty, if we
1056 use it.
1057
21451173
MS
1058Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
1059
1060 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
1061 NORMAL_RETURN_ADDR_OFFSET.
1062 (end_eh_unwinder): Ditto.
1063
1064Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
1065
1066 * gc.c (build_dynamic_cast): Make sure we don't cast away const
1067 when dealing with references, and make sure we handle dynamic
1068 casting to a cv qualified reference.
1069
1070Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
1071
1072 * except.c (struct eh_context): New structure top hold eh context
1073 information.
1074 (push_eh_context): New routine.
1075 (pop_eh_context): Ditto.
1076 * decl.c (push_cp_function_context): Use them.
1077 (pop_cp_function_context): Ditto.
1078
1079Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
1080
1081 * decl2.c (finish_file): Also prune uninteresting functions in the
1082 inline emission loop.
1083
1084Wed Dec 20 02:32:07 1995 Jeffrey A Law (law@cygnus.com)
1085
1086 * sig.c (build_signature_table_constructor): Mark functions
1087 in the signature as referenced.
1088
1089Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
1090
1091 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
1092 the inline emission stuff.
1093
72b7eeff
MS
1094Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
1095
1096 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
9e9ff709 1097 weak symbols.
72b7eeff
MS
1098 * lang-options.h: Add -f{no-,}weak.
1099 * decl.c (init_decl_processing): If the target does not support weak
1100 symbols, don't use them.
1101 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
1102
1103Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
1104
1105 * init.c (expand_member_init): warning for base init after members.
1106
1107Sun Dec 17 22:06:56 1995 Jeffrey A Law (law@cygnus.com)
1108
1109 * tree.c (tree_copy_lang_decl_for_deferred_output): Handle
1110 CONST_DECLs correctly.
1111
1112Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
1113
1114 * cvt.c (build_expr_type_conversion): Don't convert to a reference
1115 type.
1116
1117Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
1118
1119 * method.c (report_type_mismatch): Improve wording for volatile
1120 mismatches.
1121
1122Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
1123
1124 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
9e9ff709 1125 expand_assignment, as the later doesn't handle things that have
72b7eeff
MS
1126 copy constructors well. The compiler would do bitwise copying,
1127 instead of ctor calling in some cases.
1128
1129Wed Dec 13 17:05:54 PST 1995 Paul Eggert <eggert@twinsun.com>
1130
1131 * g++.c (my_strerror): Return "cannot access" if errno is 0.
1132 (pfatal_with_name, perror_exec): Don't assume that
1133 the returned value from my_strerror contains no '%'s.
1134 (concat): Remove.
1135 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
1136
1137Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
1138
1139 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
1140 TYPE_METHODS/TREE_CHAIN mean what they used to.
1141 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
1142 instead of TYPE_METHODS.
1143 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
1144 * tree.c (tree_copy_lang_decl_for_deferred_output): Ditto.
1145 * cp-tree.h (CLASSTYPE_METHODS): Lose.
1146 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
1147 TYPE_METHODS.
1148 (struct lang_decl): Lose next_method field.
1149 (DECL_NEXT_METHOD): Lose.
1150 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
1151 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
1152 anymore.
1153 (finish_struct_methods): Don't mess with the TREE_CHAINs in
1154 fn_fields.
1155
1156 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
1157 vector.
1158
1159 * call.c (build_method_call): Synthesize here even when not inlining.
1160 * typeck.c (build_function_call_real): Ditto.
1161
1162Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
1163
1164 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
1165 == DBX_DEBUG, call dbxout_start_new_source_file and
1166 dbxout_resume_previous_source_file when appropriate.
1167
1168Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
1169
1170 * except.c (start_anon_func): Push to the top level.
1171 (end_anon_func): Pop from the top level.
1172
1173Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
1174
1175 * cp-tree.h (build_cleanup): New routine to build cleanups.
1176 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
1177 call at ctor time and use atexit to run it later.
1178 * decl2.c (build_cleanup): New routine, taken from finish_file.
1179 (finish_file): Use build_cleanup instead, and don't put function
1180 local statics in global dtor list.
1181
1182Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
1183
1184 * except.c (expand_throw): Ensure that we have cleanups, if we try
1185 and expand cleanups.
1186
1187Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
1188
1189 * except.c (expand_throw): Add logic to manage dynamic cleanups for
1190 the EH object.
1191 (expand_end_catch_block): Use the magic of expand_goto, instead of
1192 emit_jump so that we get the cleanup for any catch clause parameter
1193 and the cleanup for the exception object. Update to reflect label
1194 changes.
1195 (push_eh_cleanup): New routine to register a cleanup for an
1196 exception object.
9e9ff709 1197 (empty_fndecl): Used to default cleanup actions to
72b7eeff
MS
1198 nothing.
1199 (init_exception_processing): Setup empty_fndecl. Setup
1200 saved_cleanup.
1201 (expand_start_catch_block): Update to reflect label changes. Call
1202 push_eh_object to register the cleanup for the EH object.
1203 (start_anon_func): New routine to start building lambda expressions
1204 from trees.
1205 (end_anon_func): New routine to end them.
1206 (struct labelNode): Change so that we can use tree labels, or rtx
1207 labels.
1208 (saved_cleanup): Object to check for dynamic cleanups for the
1209 exception handling object.
1210 (push_label_entry): Change so that we can use tree labels, or rtx
1211 labels.
1212 (pop_label_entry): Ditto.
1213 (top_label_entry): Ditto.
1214 (expand_start_all_catch): Use tree label instead of rtx label, so
1215 that we can get the magic of expand_goto.
1216 (expand_end_all_catch): Update to reflect label changes.
1217
1218 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
1219 use UNSAVE_EXPRs.
1220 typeck.c (get_member_function_from_ptrfunc): Remove remnants of
1221 building_cleanup logic, as we now use UNSAVE_EXPRs.
1222 * cp-tree.h (unsave_expr): Declare it.
1223 * decl.c (building_cleanup): Remove.
1224 (maybe_build_cleanup): Remove building_cleanup logic, and use
1225 UNSAVE_EXPR instead.
1226
1227Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
1228
1229 * gc.c (build_t_desc): Update error message to say <typeinfo>.
1230
1231Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1232
1233 * decl.c (pushdecl): Only warn about shadowing a local variable if
1234 warn_shadow is true.
1235
1236Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
1237
1238 * typeck.c (build_binary_op_nodefault): Added warning about
1239 comparisons between different enum types with -Wall, unless
1240 -fenum-int-equiv set.
1241
1242Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
1243
1244 * class.c (finish_struct_1): Skip down to the inner type in
1245 multidimensional arrays. Ensures ctors will be made for types that
1246 need constructing.
1247
1248Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
1249
1250 * decl.c (last_dtor_insn): New to track the last compiler generated
1251 insn in a dtor.
1252 (store_parm_decls): Set it.
1253 (finish_function): Use it to see if the dtor is empty. Avoid doing
1254 vtable setup all the time, if we can.
1255 (struct cp_function): Add last_dtor_insn.
1256 (push_cp_function_context): Save it.
1257 (pop_cp_function_context): Restore it.
1258
1259Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
1260
1261 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
9e9ff709 1262 warnings.
72b7eeff
MS
1263
1264Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
1265
1266 * typeck.c (expand_target_expr): Make sure targets get put into the
1267 current temp_slot_level, so that the free_temp_slots call will reuse
1268 them.
1269
1270Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
1271
1272 * class.c (finish_struct_1): Delay delta fixups for virtual bases
1273 until after we have done the hard virtuals, to avoid a bogus `every
1274 virtual function must have a unique final overrider' for virtual
1275 functions that are only overridden by hard virtuals.
1276
1277Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
1278
1279 * pt.c (do_function_instantiation): Don't try to find a file-scope
9e9ff709 1280 template for a member function.
72b7eeff
MS
1281
1282Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
1283
1284 * g++.c (main): Add handling of -nodefaultlibs.
1285
1286Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
1287
1288 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
1289 distinguish between direct bindings of reference variables, and
1290 indirect bindings of reference variables.
1291 * cvt.c (build_up_reference): Use it.
1292 * typeck.c (convert_arguments): Use it to indicate this is an
1293 indirect binding.
1294 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
1295 as they are unused.
1296 (expand_static_init): Diotto.
1297 (cplus_expand_expr_stmt): Ditto.
1298 * decl2.c (finish_file): Ditto.
1299 * init.c (perform_member_init): Ditto.
1300 (emit_base_init): Ditto.
1301 (expand_aggr_vbase_init_1): Ditto.
1302
1303Fri Nov 10 09:19:31 1995 Jeffrey A Law (law@cygnus.com)
1304
1305 * tree.c (tree_copy_lang_decl_for_deferred_output): Handle
1306 copying of DECL_ARGUMENTS field.
1307 (tree_copy_lang_type_for_deferred_output): Handle disgusting
1308 re-use of TYPE_LANG_SPECIFIC for pointer to member function
1309 type nodes.
1310
1311Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1312
1313 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
1314 get a DECL_LANG_SPECIFIC node.
1315 * cp-tree.h (lang_decl_flags): Add new member `level'.
1316 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
1317 decl_flags level member.
1318
1319Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1320
1321 * call.c (build_method_call): Make sure instance has a
1322 TYPE_LANG_SPECIFIC node before we dive into it.
1323
1324Sat Nov 4 20:01:52 1995 Jason Molenda (crash@phydeaux.cygnus.com)
1325
1326 * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
1327
1328Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
1329
1330 * decl.c (duplicate_decls): When smashing decls, smash staticness in
1331 the usual way.
1332
1333Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
1334
1335 * decl.c (poplevel): Handle the merging of subblocks of cleanups
1336 when finishing blocks that have already been created (usually due to
1337 the fixup goto code). Fixes bad debugging information.
1338
1339Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
1340
1341 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
1342 that's not a list of overloaded functions.
1343
1344Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1345
1346 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
1347 before trying to use DECL_ABSTRACT_VIRTUAL_P.
1348
1349Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
1350
1351 * decl2.c (mark_used): New function for hooking into setting of
1352 TREE_USED on decls.
1353 * call.c (build_method_call): Use it.
1354 * class.c (instantiate_type): Ditto.
1355 * init.c (build_offset_ref): Ditto. Don't call assemble_external
1356 for all like-named functions.
1357 * method.c (hack_identifier): Ditto.
1358 (emit_thunk): Don't call assemble_external.
1359 (make_thunk): Create thunk as a FUNCTION_DECL so that it
1360 gets the right mode and ENCODE_SECTION_INFO works.
1361
1362 * parse.y: Use mark_used. Pass operator names to do_identifier.
1363 * lex.c (do_identifier): Handle operator names.
1364
1365 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
1366
1367Thu Oct 26 20:58:59 1995 Jeffrey A Law (law@cygnus.com)
1368
1369 * cp/tree.c (tree_copy_lang_decl_for_deferred_output): Handle
1370 FIELD_DECLs and VAR_DECLs correctly.
1371
1372Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1373
1374 * errfn.c: Include stdio.h.
1375 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
1376
1377Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
1378
1379 * typeck2.c (digest_init): Always convert initializers to the
1380 right type.
1381
1382Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
1383
1384 * init.c (member_init_ok_or_else): Don't allow member initializers
1385 for indirect members, as it is invalid.
1386
1387Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1388
1389 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
1390
1391Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
1392
1393 * parse.y (for.init.statement): Catch compound statements inside for
1394 initializations, if we're being pedantic.
1395
1396Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
1397
1398 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
1399 looking for.
1400
1401Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
1402
1403 * error.c (dump_expr): Don't core dump when a boolean expression is
1404 used as a default argument.
1405
1406Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
1407
1408 * class.c (finish_struct_bits): Check aggregate_value_p instead of
9e9ff709 1409 RETURN_IN_MEMORY.
72b7eeff
MS
1410
1411Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
1412
1413 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
1414 BLKmode type that would otherwise be returned in registers.
1415
1416Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1417
1418 * g++.c (WITHLIBC): New macro.
1419 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
1420 saw_libc and pass it at the end if it was set.
1421
1422Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1423
1424 * parse.y (fn.def1): Call split_specs_attrs in
1425 declmods notype_declarator case.
1426
21451173 1427Sun Nov 26 14:47:42 1995 Richard Kenner <kenner@mole.gnu.ai.mit.edu>
1b898c06
MS
1428
1429 * Version 2.7.2 released.
1430
1431Mon Nov 20 14:05:00 1995 Mike Stump <mrs@cygnus.com>
1432
1433 * g++.c (pfatal_with_name): Add missing third argument to concat.
1434
e7843f33
MS
1435Thu Oct 26 13:59:54 1995 Mike Stump <mrs@cygnus.com>
1436
1437 * init.c (expand_aggr_init): Handle cv qualifiers on the object's
1438 type.
1439
21451173 1440Sat Nov 11 08:25:55 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
07674418
MS
1441
1442 * Version 2.7.1 released.
1443
1444Thu Nov 2 17:02:47 1995 Jason Merrill <jason@yorick.cygnus.com>
1445
1446 * call.c (convert_harshness): Handle references to arrays.
1447
1448Fri Oct 27 14:20:21 1995 Jason Merrill <jason@yorick.cygnus.com>
1449
1450 * typeck.c (comp_target_types): Check multi-level pointer
1451 conversions in both directions.
1452
1453Tue Oct 17 21:39:05 1995 Jason Merrill <jason@yorick.cygnus.com>
1454
1455 * parse.y (explicit_instantiation): Fix 'extern template' with no
1456 return type.
1457
1458Mon Oct 16 14:35:20 1995 Jason Merrill <jason@yorick.cygnus.com>
1459
1460 * parse.y (explicit_instantiation): Support automatic instantiation
1461 of constructors.
1462 (named_class_head_*): Support out-of-class definition of nested
1463 types.
1464
f30432d7
MS
1465Wed Oct 11 12:20:56 1995 Mike Stump <mrs@cygnus.com>
1466
1467 * search.c (envelope_add_decl): New routine. Fix so that
1468 methods are hidden in the same way that other members are.
1469 (dfs_pushdecls): Cleanup and move functionality out of line,
1470 into envelope_add_decl.
1471
1472Tue Oct 10 15:46:01 1995 Mike Stump <mrs@cygnus.com>
1473
1474 * typeck.c (mark_addressable): Only call assemble_external if we
1475 have started the output file.
1476
1477Tue Oct 10 11:27:18 1995 Jason Merrill <jason@yorick.cygnus.com>
1478
1479 * decl.c (start_function): Fix earlier cv-quals change.
1480
1481Mon Oct 9 23:53:05 1995 Mike Stump <mrs@cygnus.com>
1482
1483 * parse.y (complex_direct_notype_declarator): Only push the class if
1484 we are not already in the class.
1485
1486Mon Oct 9 11:22:03 1995 Doug Evans <dje@canuck.cygnus.com>
1487
1488 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
1489 Update olddecl's attributes too.
1490 (grokdeclarator): #if 0 out call to build_decl_attribute_variant.
1491 * typeck.c (common_type): Call merge_machine_type_attributes.
1492
1493Fri Oct 6 14:44:27 1995 Mike Stump <mrs@cygnus.com>
1494
1495 * typeck.c (mark_addressable): Add missing call to
1496 assemble_external.
1497
1498Wed Oct 4 22:05:23 1995 Jeff Law (law@hurl.cygnus.com
1499
1500 * cp/decl.c (deplicate_decls): Merge in deferred output
1501 status for variables.
1502 * cp/tree.c (tree_copy_lang_decl_for_deferred_output): New
1503 function to copy the g++ specific parts of a DECL node.
1504 (tree_copy_lang_type_for_deferred_output): Similarly for
1505 TYPE nodes.
1506
1507Wed Oct 4 15:06:39 1995 Mike Stump <mrs@cygnus.com>
1508
1509 * decl.c (store_parm_decls): Make sure the unwinder start comes
1510 before the exception specification start.
1511 * except.c (expand_exception_blocks): Make sure the unwinder end
1512 comes after the terminate protected catch clause region and after
1513 the end of the exception specification region.
1514
1515Wed Oct 4 12:47:02 1995 Jason Merrill <jason@yorick.cygnus.com>
1516
1517 * lex.c (real_yylex): Fix identifier case for linemode.
1518 (handle_sysv_pragma): Don't abort when we see a pragma we don't
1519 recognize.
1520
1521Tue Oct 3 14:09:46 1995 Mike Stump <mrs@cygnus.com>
1522
1523 * decl.c (store_parm_decls): Add a call to start_eh_unwinder.
1524 * except.c (init_exception_processing): __throw doesn't take any
1525 arguments.
1526 (expand_builtin_throw): Ditto. Always use Pmode, instead of SImode
1527 for all pointers. Use expand_builtin_return_addr to unwind the
1528 first level off the stack.
1529 (do_unwind): Always use Pmode, instead of SImode for all pointers.
1530 (expand_exception_blocks): Add a call to end_eh_unwinder.
1531 (start_eh_unwinder, end_eh_unwinder): New routines to build machine
1532 independent stack unwinders for function/method calls.
1533
1534Mon Oct 2 17:20:42 1995 Mike Stump <mrs@cygnus.com>
1535
1536 * tree.c (unsave_expr_now): Make sure we process the argument list
1537 of any called functions. Fixes incorrect code generation for
1538 cleanups.
1539
1540Mon Oct 2 13:04:16 1995 Mike Stump <mrs@cygnus.com>
1541
1542 * typeck.c (get_member_function_from_ptrfunc): Save function if it
1543 needs it. Cures core dump on things like (this->*(f()))().
1544
1545Sat Sep 23 22:51:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1546
1547 * decl.c (start_function): Conform to gcc cv-quals convention (no
1548 expression has a cv-qualified type) in RESULT_DECLs.
1549 * method.c (make_thunk): Ditto.
1550
1551Fri Sep 22 10:21:13 1995 Mike Stump <mrs@cygnus.com>
1552
1553 * decl.c (pushtag): Add in the namespace name for the tag.
1554
1555Thu Sep 21 13:11:13 1995 Mike Stump <mrs@cygnus.com>
1556
1557 * parse.y (maybe_base_class_list, base_class_list, base_class,
1558 base_class_access_list): Make sure we see the typenames for base
1559 classes.
1560 * lex.c (see_typename): Instead of failing to see a typename when
1561 there is no next token, perfer a typename, and get the next token.
1562
1563Wed Sep 20 12:35:27 1995 Michael Meissner <meissner@cygnus.com>
1564
1565 * decl.c (init_decl_processing): Add __builtin_expect.
1566
1567Tue Sep 19 16:48:11 1995 Mike Stump <mrs@cygnus.com>
1568
1569 * cvt.c (cp_convert_to_pointer): Don't allow leftover conversions to
1570 or from pointer to member functions, they must all be handled before
1571 this point.
1572
1573Fri Sep 15 17:14:47 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1574
1575 * init.c (resolve_offset_ref): Fix wording of non-static member
1576 being referenced as a static.
1577
1578Fri Sep 15 12:39:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1579
1580 * typeck.c (build_indirect_ref): Only bash pointer if we actually
1581 call build_expr_type_conversion.
1582
1583Thu Sep 14 18:24:56 1995 Jason Merrill <jason@deneb.cygnus.com>
1584
1585 * cvt.c (build_expr_type_conversion): Handle conversion from
1586 reference.
1587 * typeck.c (build_indirect_ref): Avoid infinite recursion.
1588
1589Thu Sep 14 17:23:28 1995 Mike Stump <mrs@cygnus.com>
1590
1591 * decl.c (expand_start_early_try_stmts): New routine to start a try
1592 block at the start of the function, for function-try-blocks.
1593 * cp-tree.h (expand_start_early_try_stmts): Declare it.
1594 * parse.y (function_try_block): Use it, instead of doing it here, as
1595 we don't want to include rtl.h here, as that conflicts with RETURN
1596 in the parser.
1597
1598Wed Sep 13 18:32:24 1995 Mike Stump <mrs@cygnus.com>
1599
1600 * lex.c (reinit_parse_for_block): Support saving inline
1601 function-try-blocks, uses peekyylex.
1602 * parse.y (eat_saved_input): New rule, permit the parser to see that
1603 END_OF_SAVED_INPUT is ok, as it can see this when parsing the
1604 handlers of a function-try-block.
1605 (fndef): Use it.
1606 (component_decl): Make sure TRY and RETURN can come after fn.def2.
1607 * spew.c (peekyylex): New routine to peek at what will come next.
1608
cf54380f
JM
1609Wed Sep 13 16:52:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1610
f30432d7 1611 * typeck.c (comptypes): Tighten up comparisons of template type
9e9ff709 1612 parms.
f30432d7 1613
cf54380f
JM
1614 * decl.c (duplicate_decls): Turn off whining about virtual functions
1615 redeclared inline for now.
1616
f30432d7
MS
1617Wed Sep 13 11:13:40 1995 Mike Stump <mrs@cygnus.com>
1618
1619 * decl.c (store_in_parms): New routine to put things before we
1620 put base inits.
1621 * cp-tree.h (store_in_parms): Declare it.
1622 * decl.c (store_parm_decls): Use it to makr sure the starting of the
1623 eh spec comes before base inits.
1624 (finish_function): Use sequences instead of the obsolete
1625 reorder_insns.
1626 * parse.y (fndef): Enhance readability and maintainability. Update
1627 to include function_try_block syntax.
1628 (function_try_block): Add.
1629
1630Tue Sep 12 17:43:07 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1631
1632 * call.c (convert_harshness): Use comptypes, not ==, to check if
1633 TYPE and PARMTYPE are equivalent on a function type.
1634
2453e8d1
DR
1635Tue Sep 12 17:31:33 1995 Douglas Rupp (drupp@cs.washington.edu)
1636
1637 * Make-lang.in (cc1plus) : Removed unnecessary $(exeext).
1638
f30432d7
MS
1639Mon Sep 11 23:24:07 1995 Mike Stump <mrs@cygnus.com>
1640
1641 * except.c (expand_throw): Never allocate storage for thrown pointer
1642 to objects.
1643
1644Mon Sep 11 19:36:45 1995 Mike Stump <mrs@cygnus.com>
1645
1646 * except.c (expand_start_catch_block): Pointers to objects come
1647 back from catch matching already dereferenced, don't dereference
1648 again.
1649
1650Mon Sep 11 15:46:28 1995 Mike Stump <mrs@cygnus.com>
1651
1652 * except.c (expand_throw): Only decay the throw expression, don't do
1653 any default conversions. This is so that one can throw and catch
1654 characters, and not have them match integers.
1655
1656Mon Sep 11 13:46:45 1995 Mike Stump <mrs@cygnus.com>
1657
1658 * error.c (dump_aggr_type): Deal with anonymous unions that don't
1659 have a TYPE_NAME.
1660
38267a70
BK
1661Fri Sep 8 20:40:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1662
1663 * lex.c (handle_sysv_pragma): Deal with getting a comma from yylex.
1664
f30432d7
MS
1665Fri Sep 8 15:51:41 1995 Mike Stump <mrs@cygnus.com>
1666
1667 * except.c (expand_end_eh_spec): Handle empty EH specifications.
1668
1669Fri Sep 8 15:27:22 1995 Mike Stump <mrs@cygnus.com>
1670
1671 * cp-tree.h (expand_start_eh_spec): Declare new routine.
1672 (expand_end_eh_spec): Ditto.
1673 * decl.c (store_parm_decls): Call expand_start_eh_spec to process
1674 exception specifications.
1675 * except.c (expand_leftover_cleanups): Remove unused parameter.
1676 (expand_end_catch_block): Ditto.
1677 (expand_exception_blocks): Ditto.
1678 (expand_start_eh_spec): New routine to mark the start of an
1679 exception specification region.
1680 (expand_end_eh_spec): New routine to mark the end of an exception
1681 specification region.
1682 (expand_exception_blocks): Call expand_end_eh_spec to process
1683 exception specifications.
1684
b37d04bc
PB
1685Fri Sep 8 14:40:48 1995 Per Bothner <bothner@kalessin.cygnus.com>
1686
1687 * lex.c (do_identifier): Use global binding in preference of
1688 dead for local variable.
1689
f30432d7
MS
1690Wed Sep 6 19:32:59 1995 Mike Stump <mrs@cygnus.com>
1691
1692 * cp-tree.h (build_exception_variant): Remove used first argument.
1693 * decl.c (duplicate_decls): Ditto.
1694 (grokfndecl): Ditto.
1695 (revert_static_member_fn): Ditto.
1696 * decl2.c (grok_method_quals): Ditto.
1697 * tree.c (build_exception_variant): Ditto.
1698 * typeck.c (common_type): Ditto.
1699 * decl2.c (grokclassfn): After changing the type, call
1700 build_exception_variant, if necessary.
1701
1702Tue Sep 5 15:56:27 1995 Mike Stump <mrs@cygnus.com>
1703
1704 * except.c (expand_throw): Run cleanups for the throw expression.
1705
1706Wed Aug 30 15:24:38 1995 Stephen L. Favor (sfavor@tigger.intecom.com)
1707
1708 * except.c (expand_builtin_throw): Moved gen_label_rtx calls beyond
1709 the store_parm_decls call which does initialization in the emit_*
1710 code concerning label numbering.
1711
1712Thu Aug 31 09:01:07 1995 Mike Stump <mrs@cygnus.com>
1713
1714 * except.c (expand_internal_throw): Let the frontend be responsible
1715 for managing all frontend EH parameters, the backend routine only
1716 needs to deal with backend values. type and value are no longer
1717 passed to __throw.
1718 (init_exception_processing): Ditto.
1719 (expand_start_all_catch): Ditto.
1720 (expand_end_all_catch): Ditto.
1721 (expand_leftover_cleanups): Ditto.
1722 (expand_end_catch_block): Ditto.
1723 (expand_builtin_throw): Ditto.
1724 (expand_throw): Ditto.
1725
1726Tue Aug 29 15:04:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1727
1728 * cp-tree.h (DECL_REAL_CONTEXT): Give the real declaration context
1729 for a decl.
1730 * decl.c (cp_finish_decl): Use it.
1731
1732Tue Aug 29 10:30:27 1995 Mike Stump <mrs@cygnus.com>
1733
1734 * except.c (expand_internal_throw): Oops, almost forgot type and
1735 value are now trees.
1736
1737Mon Aug 28 17:57:45 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1738
1739 Fix the attribute handling to make sure they get noted before we
1740 create the function's RTL, in case they can affect that.
1741 * decl.c (grokfndecl): New arg ATTRLIST. Run
1742 cplus_decl_attributes before creating the decl's rtl.
1743 (grokdeclarator): New arg ATTRLIST, passed down into grokfndecl.
1744 (shadow_tag, groktypename, start_decl, start_method): Pass a
1745 NULL_TREE to grokdeclarator's new last arg.
1746 * decl2.c (grokfield): New arg ATTRLIST, passed into grokdeclarator.
1747 (grokbitfield, grokoptypename): Pass a NULL_TREE to
1748 grokdeclarator's new last arg.
1749 * except.c (expand_start_catch_block): Likewise.
1750 * pt.c (process_template_parm, end_template_decl,
1751 do_function_instantiation): Likewise.
1752 * cp-tree.h (grokfield): Add arg.
1753 (grokdeclarator): Move the prototype from here...
1754 * decl.h: ...to here.
1755 * lex.c (cons_up_default_function): Pass NULL_TREE to grokfield
1756 ATTRLIST argument.
1757 * parse.y: Create a list for the grokfield arg where appropriate,
1758 and pass it down instead of calling cplus_decl_attributes.
1759
1760Mon Aug 28 15:07:24 1995 Mike Stump <mrs@cygnus.com>
1761
1762 * except.c: Always allow turning on exception handling. Allow cross
1763 compilations to use EH.
1764
1765Thu Aug 24 17:39:24 1995 Mike Stump <mrs@cygnus.com>
1766
1767 * except.c (saved_pc, saved_throw_type, saved_throw_value): Use
1768 trees, instead of rtxs, and don't depend on using special machine
1769 dependent registers.
1770 (expand_internal_throw): Ditto.
1771 (init_exception_processing): Ditto.
1772 (expand_start_all_catch): Ditto.
1773 (expand_end_all_catch): Ditto.
1774 (expand_start_catch_block): Ditto.
1775 (expand_leftover_cleanups): Ditto.
1776 (expand_end_catch_block): Ditto.
1777 (expand_builtin_throw): Ditto.
1778 (expand_throw): Ditto.
1779
1780Wed Aug 23 17:25:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1781
1782 * cvt.c (build_expr_type_conversion): Handle conversions to
1783 reference types.
1784
1785Wed Aug 23 15:33:59 1995 Mike Stump <mrs@cygnus.com>
1786
1787 * except.c (do_unwind): Work around backend bug with -fpic.
1788
fb409a19
PB
1789Tue Aug 22 17:20:07 1995 Per Bothner <bothner@kalessin.cygnus.com>
1790
1791 * decl2.c (flag_new_for_scope): Add a new mode that follows ANSI
1792 for-scoping, but supports (and warns about) old programs.
1793 Make the new mode (with value 1) the default.
1794 (lang_f_options): The on-value for flag_new_for_scope is now 2.
1795 * cp-tree.h (DECL_DEAD_FOR_LOCAL, DECL_ERROR_REPORTED): New macros
1796 (DECL_SHADOWED_FOR_VAR): Likewise.
1797 * decl.c (struct binding_level): New fields dead_vars_from_for
1798 and is_for_scope.
1799 (note_level_for_for): New function.
1800 (poplevel): Special processing if is_for_scope.
1801 (pushdecl): Warn if for-scope variable shadows local.
1802 * lex.c (do_identifier): Handle old (non-ANSI) for scoping,
1803 and warn if conflicts.
1804 * parse.y (FOR): Call note_level_for_for.
1805
f30432d7
MS
1806Mon Aug 21 10:28:31 1995 Jason Merrill <jason@deneb.cygnus.com>
1807
1808 * decl2.c (import_export_inline): Class interface hackery does not
1809 apply to synthesized methods.
1810
1811Sun Aug 20 16:29:00 1995 Mike Stump <mrs@cygnus.com>
1812
1813 * search.c (virtual_context): Find the right context more often.
1814 Solves a `recoverable compiler error, fixups for virtual function'
1815 problem.
1816
1817Sun Aug 20 13:53:24 1995 Mike Stump <mrs@cygnus.com>
1818
1819 * except.c (expand_start_all_catch): Ensure that we always transfer
1820 control to the right EH handler, by rethrowing the end label on the
1821 region, instead of hoping we are nested and falling through.
1822 (expand_leftover_cleanups): Ditto.
1823 (end_protect): Since we now rethrow the end label, put a
1824 nop after it, so that outer regions are recognized.
1825 * init.c (build_vec_delete_1): New routine to handle most of vector
1826 deleting, all code moved here from build_vec_delete.
1827 (build_array_eh_cleanup): Use build_vec_delete_1 to do all the real
1828 work.
1829 (expand_vec_init): If the array needs partial destructing, setup an
1830 EH region to handle it.
1831 (build_vec_delete): Move lots of code to build_vec_delete_1, use
1832 build_vec_delete_1 to do the grunt work.
1833
1834Sat Aug 19 14:25:33 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1835
1836 Handle decl attributes properly for function definitions without
1837 previous attribute-loaded declarations.
1838 * decl.c (start_function): New arg ATTRS. Add a call to
1839 cplus_decl_attributes with it before we create the RTL.
1840 * cp-tree.h (start_function): Update prototype.
1841 * parse.y (fn.def1): Pass ATTRS into start_function instead of
1842 trying to call cplus_decl_attributes too late. Pass a NULL_TREE
1843 for other use.
1844 * decl2.c (finish_file): Pass NULL_TREE as fourth arg to
1845 start_function.
1846 * method.c (synthesize_method): Likewise.
1847 * except.c (expand_builtin_throw): Likewise for start on __throw.
1848
1849Sat Aug 19 13:36:08 1995 Mike Stump <mrs@cygnus.com>
1850
1851 * class.c (set_rtti_entry): Turn on -fvtable-thunk -frtti support.
1852 This changes -fvtable-thunks vtable layout, so a recompile will be
1853 necessary, if you use -fvtable-thunks.
1854 (get_vtable_entry): Use n, instead of i to be consistent with the
1855 rest of the compiler.
1856 (get_vtable_entry_n): Ditto.
1857 (add_virtual_function): Add a slot for the tdesc, if -fvtable-thunks
1858 are being used.
1859 (finish_struct_1): Ditto.
1860 (skip_rtti_stuff): New routine to collapse similar code from many
1861 different parts of the compiler. I think I got them all.
1862 (modify_one_vtable): Use it.
1863 (fixup_vtable_deltas1): Ditto.
1864 (override_one_vtable): Ditto.
1865 * decl2.c (mark_vtable_entries): Ditto.
1866 * tree.c (debug_binfo): Ditto.
1867 * search.c (expand_upcast_fixups): Ditto.
1868 (get_abstract_virtuals_1): Ditto. Use virtuals, instead of tmp to
1869 consistent with the rest of the compiler.
1870 (get_abstract_virtuals): Ditto.
1871 * cp-tree.h (skip_rtti_stuff): New routine, declare it.
1872 * gc.c (build_headof): Support -fvtable-thunk and -frtti together.
1873 (build_typeid): Ditto.
1874 (build_classof): Remove old style way of doing rtti. Remove support
1875 for `classof' and `headof'.
1876 * gxx.gperf: Ditto.
1877 * hash.h: Ditto.
1878 * parse.y: Ditto.
1879
1880Fri Aug 18 17:31:58 1995 Jason Merrill <jason@deneb.cygnus.com>
1881
1882 * decl.c (start_function): Clear ctor_label and dtor_label.
1883
1884 * class.c (finish_struct_1): Fix handling of access decls.
1885
1886Tue Aug 15 19:21:54 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1887
1888 * class.c (finish_struct): Only do minimal processing here, so it
1889 can be used for class template definitions, as well.
1890 (finish_struct_1): New function with the rest of the code.
1891
1892Tue Aug 15 09:46:16 1995 Mike Stump <mrs@cygnus.com>
1893
1894 * class.c (prepare_fresh_vtable): On second though, always build the
1895 offset (see Aug 10 change), unless -fvtable-thunks is given. It
1896 does this by calling the new routine set_rtti_entry.
1897 (finish_struct): Ditto.
1898 (set_rtti_entry): New routine to update the rtti information at the
1899 start of the vtable.
1900
1901Mon Aug 14 12:21:22 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
1902
1903 * error.c (dump_decl, case IDENTIFIER_NODE): Only work on a dtor
1904 if it's declared in the C++ language spec.
1905 (dump_function_decl): Likewise.
1906 (dump_function_name): Likewise.
1907 (ident_fndecl): Make sure we got something back from lookup_name.
1908 * decl.c (start_function): Likewise.
1909
1910Fri Aug 11 16:52:15 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1911
1912 * call.c (build_method_call): Don't call build_new when calling a
1913 constructor without an instance.
1914
1915Thu Aug 10 20:00:17 1995 Mike Stump <mrs@cygnus.com>
1916
1917 * class.c (prepare_fresh_vtable): Always build the offset to the
1918 complete object, as it doesn't cost much. This allows dynamic_cast
1919 to void * to work when -frtti isn't given.
1920 (finish_struct): Ditto.
1921
1922Thu Aug 10 16:31:28 1995 Mike Stump <mrs@cygnus.com>
1923
1924 * except.c (build_eh_type): Split out some functionality to new
1925 routine named build_eh_type_type.
1926 (build_eh_type_type): New routine.
1927 (expand_start_catch_block): Use build_eh_type_type, as we never want
1928 the dynamic type of the catch parameter, just the static type.
1929 Fixes core dumps when -frtti is used and one catchs pointers to
1930 classes.
1931
1932Thu Aug 10 14:55:29 1995 Mike Stump <mrs@cygnus.com>
1933
1934 * except.c (expand_builtin_throw): Since we now use normal calling
1935 conventions for __throw, we have to remove the first layer off the
1936 stack, so that the next context we search for handlers is the outer
1937 context instead of the context that had the call to __throw, if we
1938 don't immediately find the desired context.
1939
1940Tue Aug 8 17:44:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1941
1942 * tree.c (cp_expand_decl_cleanup): Returns int, not tree.
1943 * cp-tree.h: Update.
1944
1945 * parse.y (template_type_parm): Add support for `typename'.
1946
1947Tue Aug 8 12:06:31 1995 Mike Stump <mrs@cygnus.com>
1948
1949 * except.c (expand_internal_throw): New internal routine to throw a
1950 value.
1951 (expand_end_all_catch, expand_leftover_cleanups): All throwers
1952 changed to use `expand_internal_throw' instead of jumping to throw
1953 label.
1954 (expand_end_catch_block, expand_throw): Ditto.
1955 (throw_label): Removed.
1956 (expand_builtin_throw): Changed so that EH parameters are passed by
1957 normal function call conventions. Completes Aug 4th work.
1958
1959Fri Aug 4 17:17:08 1995 Mike Stump <mrs@cygnus.com>
1960
1961 * cp-tree.h (expand_builtin_throw): Declare it.
1962 * decl2.c (finish_file): Call expand_builtin_throw.
1963 * except.c (make_first_label): Remove.
1964 (init_exception_processing): Don't use a LABEL_REF for throw_label,
1965 instead use a SYMBOL_REF, this is so that we don't use LABEL_REFs in
1966 other functions that don't really appear in those functions. This
1967 solves a problem where cc1plus consumed exponential amounts of
1968 memory when -Wall was used.
1969 (expand_end_all_catch, expand_leftover_cleanups,
1970 expand_end_catch_block, expand_throw): Change all uses of
1971 throw_label to match new style.
1972 (do_unwind): Rename parameter to inner_throw_label, as it is now
1973 different from throw_label. Also, assume that our caller will wrap
1974 the passed label with a LABEL_REF, if needed.
1975 (expand_builtin_throw): Make external, change so that the generated
1976 throw is now a real function.
1977 (expand_exception_blocks): Never generate throw code inside another
1978 function.
1979
1980Fri Aug 4 12:20:02 1995 Mike Stump <mrs@cygnus.com>
1981
1982 * decl.c (grokdeclarator): Move checking of mutable const objects
1983 and mutable static objects down, as we might decide during parsing
1984 to unset staticp or constp (for example, when const is part of the
1985 object being pointed to).
1986
1987Thu Aug 3 17:13:43 1995 Mike Stump <mrs@cygnus.com>
1988
1989 * except.c (output_exception_table_entry): Enhance portability to
1990 weird machines.
1991 (emit_exception_table): Ditto.
1992
1993Thu Aug 3 16:41:38 1995 Mike Stump <mrs@cygnus.com>
1994
1995 * typeck.c (build_ptrmemfunc): Handle casting of pointer to
1996 non-virtual member functions.
1997
1998Wed Aug 2 11:58:25 1995 Mike Stump <mrs@cygnus.com>
1999
2000 * gc.c (build_typeid): Strip cv qualifiers so that const T&, T&, T
2001 and const T all match.
2002
2003Wed Aug 2 11:25:33 1995 Mike Stump <mrs@cygnus.com>
2004
2005 * except.c (build_eh_type): Strip cv qualifiers so that const T&,
2006 T&, T and const T all match.
2007
2008Tue Aug 1 14:20:16 1995 Mike Stump <mrs@cygnus.com>
2009
2010 * except.c: Fix up comments, cleanup code and eliminate exceptNode,
2011 exceptStack, exceptstack, push_except_stmts, pop_except_stmts,
2012 new_except_stack, push_last_insn, pop_last_insn, insn_save_node and
2013 InsnSave. Also, numerous speed improvements, and correctness
2014 improvements. Double faulting in all situations should now be
2015 handled correctly.
2016 (expand_start_all_catch): Instead of having many terminate protected
2017 regions, just have one.
2018 (expand_start_catch_block): No longer have to protect
2019 false_label_rtx, as it isn't used for EH region marking.
2020 (expand_end_catch_block): Expand out EH cleanups here by using
2021 expand_leftover_cleanups.
2022 (expand_end_all_catch): Use sequences instead of playing with insn
2023 links directly.
2024 (expand_exception_blocks): Ditto. Also protect all catch clauses
2025 with one terminate region.
2026
2027Mon Jul 31 13:24:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2028
2029 * method.c (report_type_mismatch): Don't talk about an object
2030 parameter for non-methods.
2031
2032Sun Jul 30 13:13:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2033
2034 * class.c (finish_struct): Catch private and protected members of
2035 anonymous unions here.
2036 * decl2.c (finish_anon_union): And here.
2037 * parse.y: Instead of here.
2038
2039 * errfn.c (ARGSLIST): Support passing four args.
2040 * error.c (cv_as_string): New function.
2041 (cp_printers): Add it.
2042 * call.c (build_method_call): Report 'const' at end of pseudo-decl.
2043
2044 * method.c (report_type_mismatch): Deal with a bad_arg of 0.
2045
2046 * init.c (expand_aggr_init): Handle volatile objects, too.
2047
2048Sat Jul 29 13:42:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2049
2050 * decl.c (struct binding_level): Keep list of incomplete decls.
2051 (print_binding_level): Use list_length to count them.
2052 (pushdecl): Build up the list.
2053 (hack_incomplete_structures): Walk it and prune completed decls.
2054
2055Fri Jul 28 15:26:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2056
2057 * typeck.c (comp_target_types): Don't check const and volatile for
2058 function types.
2059 (comp_ptr_ttypes_real): Ditto.
2060
2061Thu Jul 27 15:40:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2062
2063 * typeck.c (comp_target_types): Fix.
2064
2065Thu Jul 27 15:10:48 1995 Mike Stump <mrs@cygnus.com>
2066
2067 * cp-tree.h (unsave_expr_now, build_unsave_expr,
2068 cp_expand_decl_cleanup): Declare new routines.
2069 * decl.c (cp_finish_decl, store_parm_decls,
2070 hack_incomplete_structures): Change all cals from
2071 expand_decl_cleanup to cp_expand_decl_cleanup.
2072 * gc.c (protect_value_from_gc): Ditto.
2073 * expr.c (cplus_expand_expr): Handle UNSAVE_EXPRs.
2074 * tree.c (unsave_expr): New routine to build an UNSAVE_EXPR.
2075 (unsave_expr_now): Backend routine used by tree expander.
2076 (cp_expand_decl_cleanup): Wrap second argument in an UNSAVE_EXPR to
2077 work around a limitation in the backend. The backend uses the
2078 cleanups multiple times, on disjoint control flows, so we cannot
2079 pass unsaved SAVE_EXPRs to the backend.
2080 * tree.def (UNSAVE_EXPR): New tree code.
2081 * typeck.c (c_expand_return): Move goto/return code up inside
2082 conditional, as we don't always want to do this, we only want to do
2083 this when we don't otherwise finish with this control flow.
2084
2085Thu Jul 27 10:38:43 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2086
2087 * parse.y (typespec): Only complain about typeof if we're not
2088 getting it from a system header.
2089
2090Thu Jul 27 10:26:23 1995 Doug Evans <dje@canuck.cygnus.com>
2091
2092 Clean up prefix attribute handling.
2093 * parse.y (reserved_declspecs): Link prefix attributes with declspecs.
2094 (declmods): Likewise.
2095 (all rules that reference typed_declspecs and declmods): Call
2096 split_specs_attrs or strip_attrs to separate declspecs and attrs.
2097 (lang_extdef): Delete resetting of prefix_attributes.
2098 (template_def, notype_declarator rule): Use NULL_TREE for
2099 prefix_attributes.
2100 (condition): Use NULL_TREE for prefix_attributes.
2101 (setattrs): Deleted.
2102 (nomods_initdcl0): Set prefix_attributes to NULL_TREE.
2103 (component_decl): Delete resetting of prefix_attributes.
2104 (component_decl_1, notype_components rule): Use NULL_TREE for
2105 prefix_attributes.
2106 (simple_stmt): Delete resetting of prefix_attributes.
2107
2108Mon Jul 24 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2109
2110 * call.c (convert_harshness): Deal with reference conversions before
2111 others. Actually do array->pointer decay. Call comp_target_types
2112 with pointer types rather than their targets.
2113
2114 * typeck.c (comp_target_types): Avoid assigning D const * to B *.
2115
2116Mon Jul 24 08:54:46 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2117
2118 * pt.c (to_be_restored): Move decl to global scope.
2119
2120Sat Jul 22 12:22:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2121
2122 * decl.c (start_decl): Put back clearing of DECL_IN_AGGR_P.
2123
2124Fri Jul 21 17:09:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2125
2126 * decl.c (grokdeclarator): Downgrade error about 'extern int A::i'
2127 to pedwarn.
2128
2129 * pt.c (instantiate_template): Also avoid instantiation if the
2130 function has already been declared to be a specialization.
2131
2132 * decl2.c (check_classfn): Ignore cname argument, and return the
2133 matching function.
2134
2135 * decl.c (start_decl): Handle declarations of member functions
2136 outside of the class (i.e. specialization declarations).
2137
2138Thu Jul 20 10:34:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2139
2140 * class.c (finish_struct): Don't mess with the type of bitfields.
2141
2142 * various.c: s/TYPE_POINTER_TO/build_pointer_type/.
2143
2144Thu Jul 20 01:43:10 1995 Mike Stump <mrs@cygnus.com>
2145
2146 * init.c (expand_aggr_init): Assume LOOKUP_ONLYCONVERTING if init
2147 is not a parameter list (TREE_LIST).
2148 (expand_default_init): If LOOKUP_ONLYCONVERTING is set, then set
2149 LOOKUP_NO_CONVERSION so that we don't allow two-level conversions,
2150 but don't set it otherwise.
2151
2152Wed Jul 19 20:32:01 1995 Mike Stump <mrs@cygnus.com>
2153
2154 * init.c (expand_default_init): Don't allow two-level conversions
2155 during construction.
2156
2157Wed Jul 19 18:06:37 1995 Mike Stump <mrs@cygnus.com>
2158
2159 * gc.c (build_headof): The type of dyncasting to a pointer to cv
2160 void, should be pointer to cv void.
2161
2162Wed Jul 19 17:25:43 1995 Mike Stump <mrs@cygnus.com>
2163
2164 * gc.c (build_dynamic_cast): Allow casting in const.
2165
2166Wed Jul 19 16:34:27 1995 Mike Stump <mrs@cygnus.com>
2167
2168 * typeck.c (build_const_cast): If we are passed error_mark_node,
2169 return it.
2170
2171Wed Jul 19 15:24:48 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2172
2173 * class.c (push_nested_class): Make sure TYPE is non-nil.
2174
2175 * cvt.c (type_promotes_to): Watch for error_mark_node on the
2176 incoming TYPE.
2177
2178Wed Jul 19 13:23:12 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
f65f5f62
GB
2179
2180 * cp-tree.h (SIGTABLE_VT_OFF_NAME): Renamed from SIGTABLE_OFFSET_NAME.
2181 (SIGTABLE_VB_OFF_NAME): New macro.
2182 (vt_off_identifier): Renamed from offset_identifier.
2183 (vb_off_identifier): Added extern declaration.
2184
2185 * decl.c (vt_off_identifier): Renamed from offset identifier.
2186 (vb_off_identifier): New variable to hold the identifier for the
2187 sigtable field vb_off.
2188 (init_decl_processing): Initialize vb_off_identifier.
2189 Renamed vt_off_identifier from offset_identifier.
2190 * sig.c (build_signature_method_call): Renamed offset_identifier and
2191 local variable offset to vt_off_identifer and vt_off, respecitively.
2192 * sig.c (build_signature_table_constructor): Renamed offset to vt_off.
2193
2194 * decl.c (init_decl_processing): Add vb_off field to
2195 sigtable_entry_type. Reorder fields so that pfn gets properly
2196 aligned at a 64 bit boundary on the Alpha.
2197 * sig.c (build_signature_table_constructor): Build the constructor
2198 according to the new layout. Set the vb_off field to -1 for now.
2199
2200 * decl.c (init_decl_processing): Align sigtable_entry_type on word
2201 boundaries instead of double word boundaries to save space.
2202
f30432d7
MS
2203Tue Jul 18 16:58:37 1995 Mike Stump <mrs@cygnus.com>
2204
2205 * cvt.c (cp_convert): Always call build_cplus_new for a ctor.
2206
2207Tue Jul 18 14:24:53 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2208
2209 * parse.y (opt.component_decl_list): Only forbid private/protected
2210 in anonymous unions. We need to make this know when the type is
2211 defined for an object, to not give the error.
2212
2213Mon Jul 17 14:22:44 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2214
2215 * parse.y (opt.component_decl_list): Don't allow access control
2216 as private or protected for union members.
2217
2218Sun Jul 16 14:01:00 1995 Jim Wilson <wilson@chestnut.cygnus.com>
2219
2220 * lex.c (check_newline): For 'p' case, move goto skipline line to
2221 before end brace for 'pragma'.
2222
2223Fri Jul 7 13:55:58 1995 Mike Stump <mrs@cygnus.com>
2224
2225 * g++.1: Tiny updates.
2226
2227Fri Jul 7 13:05:20 1995 Mike Stump <mrs@cygnus.com>
2228
2229 * decl.c (cp_finish_decl): Only destruct local static variables if
2230 they are constructed, and only construct the first time control
2231 passes completely through its declaration (if not initialized with a
2232 constant-expression).
2233 (expand_static_init): Ditto.
2234
2235Wed Jul 5 14:05:04 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2236
2237 * typeck.c (comptypes, case OFFSET_REF): If either offset basetype
2238 is a TEMPLATE_TYPE_PARM, give a match.
2239
f30432d7
MS
2240Fri Jun 30 15:42:57 1995 Mike Stump <mrs@cygnus.com>
2241
2242 * method.c (build_overload_value): Handle encoding of null pointer
2243 constants (or any pointer with a constant numeric value) for
2244 templates.
2245
42783eab
BK
2246Fri Jun 30 13:45:51 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2247
2248 * call.c (convert_harshness): Add QUAL_CODE when we're faced with
2249 const vs non-const for void conversions.
2250
f30432d7
MS
2251Fri Jun 30 10:19:52 1995 Mike Stump <mrs@cygnus.com>
2252
2253 * except.c (expand_start_all_catch): Fix problem with finding an
2254 outer nested try block when there is no code to separate it from an
2255 inner try block.
2256
2257Fri Jun 30 02:22:26 1995 Mike Stump <mrs@cygnus.com>
2258
2259 * search.c (dfs_pushdecls): Consume 2 or 3 orders of magnitude less
2260 memory please when virtual bases are used.
2261
2262Thu Jun 29 19:03:47 1995 Mike Stump <mrs@cygnus.com>
2263
2264 * class.c (build_vbase_path): Avoid testing things that cannot be
2265 null to see if they are null.
2266 * cvt.c (convert_pointer_to_vbase): Remove code that doesn't work.
2267 * decl.c (finish_function): Pass a type into the new
2268 convert_pointer_to_vbase instead of a binfo.
2269 * search.c (convert_pointer_to_vbase): Rewritten to use get_vbase
2270 and convert_pointer_to_real.
2271 (expand_indirect_vtbls_init): Use convert_pointer_to_vbase instead
2272 of the more cryptic call to get_vbase.
2273
e18923b4 2274Thu Jun 29 09:35:05 1995 Mike Stump <mrs@cygnus.com>
535c9c21
MS
2275
2276 * decl.c (BOOL_TYPE_SIZE): Fix broken SLOW_BYTE_ACCESS check.
2277
f30432d7
MS
2278Thu Jun 29 03:43:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2279
2280 * pt.c (instantiate_template): Don't strip 'this' twice.
2281
2282 * pt.c (coerce_template_parms): Allow null pointer constants.
2283
2284 * decl.c (revert_static_member_fn): But only if DECL_ARGUMENTS is
2285 set.
2286
f30432d7
MS
2287Wed Jun 28 18:39:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2288
2289 * decl.c (revert_static_member_fn): Also remove 'this' from
2290 DECL_ARGUMENTS.
2291 * decl2.c (check_classfn): Don't revert this function until we get a
2292 match.
2293
2294Wed Jun 28 14:07:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2295
2296 * parse.y (component_decl): Clear PREFIX_ATTRIBUTES here.
2297
2298Wed Jun 28 11:05:13 1995 Mike Stump <mrs@cygnus.com>
2299
2300 * decl2.c (finish_file): Handle global vector news.
2301 * init.c (build_new): Encode vector news so that later we will know
2302 how many elements there are.
2303
e18923b4 2304Mon Jun 26 13:38:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
415bfbd0
JM
2305
2306 * expr.c (cplus_expand_expr): Don't mess with temp slots.
2307
f30432d7
MS
2308 * decl2.c (warn_if_unknown_interface): Don't crash if tinst_for_decl
2309 returns null.
2310
2311 * decl2.c (check_classfn): Use revert_static_member_fn.
2312 * decl.c (revert_static_member_fn): Diagnose static member functions
2313 declared const or volatile.
2314
2315 * decl2.c (grokfield): Check for missing default args here, too.
2316 (check_default_args): Function to do the checking.
2317 * decl.c (pushdecl): Use it.
2318
2319 * decl.c (pushdecl): Don't warn about shadowing a member of `this'
2320 if there is no `this'.
2321
2322Sun Jun 25 11:34:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2323
2324 * call.c (build_method_call): Downgrade 'called before definition'
2325 to a warning, as it ought to go away after Monterey.
2326
2327Sat Jun 24 14:18:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2328
2329 * pt.c (coerce_template_parms): Don't do extra checking on pointer
2330 to member arguments.
2331
2332 * class.c (finish_struct): const and reference members don't prevent
2333 a class from being an aggregate.
2334
2335 * class.c (finish_struct): Signatures are always aggregates.
2336
f7d9d4a8
JM
2337Fri Jun 23 17:20:29 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2338
f30432d7
MS
2339 * decl2.c (check_classfn): Improve error message.
2340
2341 * pt.c (tsubst): Handle PROMOTE_PROTOTYPES.
f7d9d4a8 2342
f7522313
JM
2343Thu Jun 22 01:50:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2344
f30432d7 2345 * typeck.c (comptypes): Don't ignore method quals.
f7522313 2346
f30432d7
MS
2347 * class.c (finish_struct): Non-abstract virtuals are always USED.
2348
2349 * decl.c (build_ptrmemfunc_type): The underlying union type isn't
2350 IS_AGGR_TYPE, either.
2351 * class.c (finish_struct): Use CLASSTYPE_NON_AGGREGATE instead.
2352 * cp-tree.h: Ditto.
2353
2354 * cp-tree.h (lang_type): Add aggregate.
2355 (CLASSTYPE_AGGREGATE): New macro.
2356 (TYPE_NON_AGGREGATE_CLASS): Ditto.
2357 * class.c (finish_struct): Determine whether a class is an
2358 aggregate.
2359 * decl.c (cp_finish_decl): Check TYPE_NON_AGGREGATE_CLASS instead of
2360 TYPE_NEEDS_CONSTRUCTING.
2361 * typeck2.c (digest_init): Check TYPE_NON_AGGREGATE_CLASS for
2362 subobjects, too.
2363
2364 * pt.c (tsubst, PARM_TYPE): Propagate DECL_ARTIFICIAL.
d8f1d487
RK
2365
2366 * decl.c (start_function): For pre-parsed functions, layout all of
2367 the parm decls again.
2368 (grokvardecl): TREE_PUBLIC depends on DECL_THIS_EXTERN, not
2369 DECL_EXTERNAL.
2370
f30432d7
MS
2371 * pt.c (coerce_template_parms): Improve checking for invalid
2372 template parms.
2373
2374Wed Jun 21 12:01:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2375
2376 * decl.c (grokdeclarator): Forbid declaration of a static member
2377 with the same name as its enclosing class.
2378
d8f1d487
RK
2379Mon Jun 19 10:28:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2380
2381 * decl.c (finish_function): Clear current_class_decl.
2382
2383 * typeck.c (build_conditional_expr): Use convert (boolean_type_node
2384 instead of truthvalue_conversion.
2385
2386 * class.c (finish_struct): A data member with the same name as the
2387 class doesn't suppress constructors.
2388
2389Fri Jun 16 18:11:39 1995 Gerald Baumgartner (gb@alexander.cs.purdue.edu)
2390
2391 * decl.c (start_function): If current_class_decl is a signature
2392 pointer, don't dereference it but set C_C_D to current_class_decl.
2393
2394Fri Jun 16 17:06:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2395
2396 * decl.c (duplicate_decls): Complain about virtual functions
2397 redeclared to be inline.
2398
2399Fri Jun 16 13:20:38 1995 Mike Stump <mrs@cygnus.com>
2400
2401 * decl.c (get_unique_name): New routine to name unnamed namespaces.
2402 (push_namespace): Use get_unique_name for naming unnamed namespaces.
2403
d3c89e1f
JM
2404Thu Jun 15 15:00:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2405
d8f1d487 2406 * parse.y: Call cplus_decl_attributes with prefix_attributes where
f30432d7 2407 appropriate.
d8f1d487
RK
2408
2409Wed Jun 14 19:24:49 1995 Mike Stump <mrs@cygnus.com>
2410
2411 * search.c (get_vbase): New routine to switch hierarchies from the
2412 CLASSTYPE_VBASECLASSES to the normal one.
2413 (expand_indirect_vtbls_init): Use get_vbase to figure out how we
2414 want to convert to a vbase pointer.
2415
2416Mon Jun 12 17:50:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2417
2418 * pt.c (instantiate_class_template): Add the new instantiation to
f30432d7 2419 template_classes.
d8f1d487
RK
2420 (do_pending_expansions): Call instantiate_member_templates on all of
2421 the classes in template_classes.
2422
2423Mon Jun 12 12:36:59 1995 Mike Stump <mrs@cygnus.com>
2424
2425 * decl.c (complete_array_type): Fill in the TYPE_DOMAIN of our
2426 TYPE_MAIN_VARIANT if it is not filled in.
2427 * init.c (build_delete): If the TYPE_DOMAIN is not set, give an
2428 error instead of core dumping.
2429
2430Mon Jun 12 10:41:40 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2431
2432 * call.c (can_convert): Also check for distance > 0.
2433 (can_convert_arg): Ditto.
2434 (user_harshness): Ditto.
2435
2436Fri Jun 9 19:17:21 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2437
2438 * g++.c (MATH_LIBRARY): Provide default.
2439 (main): Always link with the math library if we link with libstdc++.
2440
2441 * decl.c (start_function): Complain about redefinition of a function
2442 even when the pending_inline version is compiled after the other
2443 version.
2444
2445Thu Jun 8 15:44:38 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2446
2447 * gc.c (build_dynamic_cast): Build up a reference to a parameter of
2448 aggregate type.
2449
d8f1d487
RK
2450Wed Jun 7 15:31:57 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
2451
2452 * init.c (build_vec_delete): Resolve an offset ref before we try to
2453 use it.
2454
2455Wed Jun 7 14:19:32 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2456
2457 * typeck.c (build_modify_expr): If the class lacks a constructor or
2458 assignment operator, return error_mark_node.
2459 (common_type): Use build_cplus_array_type.
2460
2461Tue Jun 6 09:41:27 1995 Mike Stump <mrs@cygnus.com>
2462
2463 * class.c (dont_allow_type_definitions): New variable set when types
2464 cannot be defined.
2465 (finish_struct): Use it.
2466 * cp-tree.h (dont_allow_type_definitions): Define it.
2467 * parse.y (primary, handler_seq): Set it.
2468
2469Mon Jun 5 18:49:38 1995 Mike Stump <mrs@cygnus.com>
2470
2471 * method.c (build_opfncall): Use DECL_CHAIN, not TREE_CHAIN for
2472 results from lookup_fnfields. Always give warning/error on bad
2473 code.
2474
2475Mon Jun 5 11:39:37 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
2476
2477 * init.c (member_init_ok_or_else): Don't allow initialization of
2478 an ancestor's member from within a constructor.
2479
2480Mon Jun 5 11:20:34 1995 Gerald Baumgartner (gb@alexander.cs.purdue.edu)
2481
2482 * sig.c (build_signature_table_constructor): Use DECL_CONTEXT
2483 instead of DECL_CLASS_CONTEXT for calculating the vfield offset so
2484 abstract virtual functions are handled correctly.
2485
2486 * sig.c (build_signature_table_constructor): Store the correct
2487 delta in signature table entries. It does not yet work for
2488 classes with virtual base classes as implementations of signatures.
2489 (build_signature_method_call): Add the delta to the object_ptr
2490 before generating the function call.
2491
2492 * call.c (build_method_call): Make instance_ptr the signature
2493 pointer itself instead of dereferencing the optr.
2494 * sig.c (build_signature_method_call): Dereference the optr for the
2495 direct and virtual calls.
2496
2497 * sig.c (build_signature_table_constructor): Make the tag for
2498 default implementations -1 instead of 2.
2499 (build_signature_method_call): Change the generated conditional
2500 expression correspondingly.
2501
2502 * sig.c (build_signature_pointer_constructor): Deleted the sorry
2503 message that said we can't handle multiple inheritance for
2504 implementations of signatures
2505 (build_signature_method_call): Use the offset from the sigtable
2506 entry instead of the vptr field from the signature pointer for
2507 building a virtual function call.
2508
2509 * class.c (build_vfn_ref): Deleted signature specific code, we don't
2510 call this function anymore from build_signature_method_call.
2511
2512 * cp-tree.h (SIGNATURE_VPTR_NAME): Deleted. We use the right vptr
2513 field in the object now instead of in the signature pointer/ref.
2514 (build_vptr_ref): Deleted extern declaration.
2515 * sig.c (build_vptr_ref): Deleted.
2516 (build_signature_pointer_or_reference_type): Deleted construction of
2517 the vptr field.
2518 (build_signature_pointer_constructor): Deleted initialization of/
2519 assignment to the vptr field.
2520
2521 * sig.c (build_signature_table_constructor): Convert the signature
2522 table entry fields to their correct types.
2523
2524 * sig.c (build_signature_table_constructor): Don't call digest_init
2525 for the fields of a sigtable entry, it's wasted time.
2526
2527 * sig.c (build_signature_table_constructor): Correctly set the
2528 offset and index fields of a sigtable entry. Build the constructor
2529 the way digest_init does, digest_init can't handle initializing an
2530 anonymous union inside a struct.
2531 (build_signature_method_call): Use the index field instead of the
2532 delta field to get the vtable index.
2533
2534 * decl.c (init_decl_processing): Fix number of fields for building
2535 sigtable_entry_type.
2536
2537 * cp-tree.h (tag_identifier, offset_identifier): Added extern decls.
2538 (SIGTABLE_CODE_NAME): Renamed to SIGTABLE_TAG_NAME.
2539 (SIGTABLE_PFN_NAME): Deleted, we'll use VTABLE_PFN_NAME instead.
2540 * decl.c (tag_identifier, offset_identifier): New variables to
2541 hold the identifiers for the sigtable fields tag and offset.
2542 (init_decl_processing): Initialize these variables.
2543 (init_decl_processing): Use these variables to build the
2544 sigtable_entry_type structure. Rename the code and offset fields
2545 to tag and delta, respectively; add offset and index fields. Changed
2546 types of fields from short_integer_type_node to delta_type_node.
2547 * sig.c (build_signature_table_constructor): Rename code and offset
2548 to tag and delta, respectively.
2549 (build_signature_method_call): Ditto. Use above variables.
2550
d8f1d487
RK
2551Thu Jun 1 17:03:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2552
2553 * decl.c (lookup_name_real): Don't try to look anything up in an
2554 erroneous object.
2555
2556Fri Jun 2 10:30:14 1995 Mike Stump <mrs@cygnus.com>
2557
2558 * method.c (build_overload_int): New routine. Break out
2559 functionality from build_overload_value so we can reuse it.
2560 (build_overload_value): Handle pointer to member functions as value
2561 parameters for templates.
2562 (build_overload_identifier): Since template parameters are shared
2563 among all instantiations, we have to substitute in the real types
2564 in TREE_TYPE (parm).
2565 pt.c (coerce_template_parms): Ditto.
2566 (push_template_decls): Ditto.
2567 (grok_template_type): Deleted as template parameters are shared
2568 among all instantiations.
2569
2570Wed May 31 19:10:32 1995 Mike Stump <mrs@cygnus.com>
2571
2572 * decl.c (grokdeclarator): Always give errors on constant overflow
2573 for array indices.
2574
2575Wed May 31 11:39:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2576
2577 * typeck.c (commonparms): Don't abort if simple_cst_equal returns < 0.
2578 (build_c_cast): Don't tack on a NON_LVALUE_EXPR when casting to
2579 reference type.
2580 (build_indirect_ref): Fix check for *&.
2581
72b7eeff
MS
2582Fri Jun 16 06:54:03 1995 Mike Stump <mrs@cygnus.com>
2583
2584 * Version 2.7.0 released.
2585
2586Fri Jun 16 15:07:29 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
2587
2588 * Make-lang.in (DEMANGLER_PROG): Add LIBS.
2589
2590Thu Jun 15 15:00:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2591
2592 * decl.c (define_function): Don't set DECL_INTERFACE_KNOWN.
2593
2594Wed Jun 7 20:00:31 1995 Mike Stump <mrs@cygnus.com>
2595
2596 * *.[chy]: Change all callers of finish_decl to cp_finish_decl.
2597 * decl.c (finish_decl): New routine to handle call backs from the
2598 mid end (declare_hidden_char_array).
2599
2600Wed Jun 7 19:02:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2601
2602 * decl.c (start_function): Handle setting C_C_D here.
2603 (set_C_C_D): Removed.
2604 (struct saved_scope): Remove class_decl.
2605 (push_to_top_level): Don't save current_class_decl.
2606 (pop_from_top_level): Don't restore current_class_decl or C_C_D.
2607 (struct cp_function): Add C_C_D.
2608 (push_cp_function_context): Save C_C_D.
2609 (pop_cp_function_context): Restore C_C_D.
2610
2611Fri Jun 2 11:05:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2612
2613 * decl.c (set_C_C_D): New function. suspend_momentary before
2614 building C_C_D.
2615 (pop_from_top_level): Call it.
2616 (start_function): Ditto.
2617 (pop_cp_function_context): Ditto.
2618
2619 * class.c, cp-tree.h, decl.c, decl2.c, parse.y: Lose all references
2620 to current_vtable_decl, CLASSTYPE_INST_VAR and CLASSTYPE_VTBL_PTR.
2621
2622 * decl.c (push_cp_function_context): Save current_class_decl.
2623 (pop_cp_function_context): Restore current_class_decl and set C_C_D.
2624 (pop_from_top_level): Don't use CLASSTYPE_INST_VAR to set C_C_D.
2625 (start_function): Ditto.
2626
2627 * class.c (popclass): Don't mess with current_class_decl,
2628 current_vtable_decl, or C_C_D.
2629
2630Mon May 29 12:45:10 1995 Paul Eggert <eggert@twinsun.com>
2631
2632 * Make-lang.in (c++.mostlyclean): Remove $(DEMANGLER_PROG).
2633
b796119f
RK
2634Wed May 24 15:55:18 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
2635
2636 * decl.c (duplicate_decls): Check simple_cst_equal result against 0.
2637 * decl2.c (finish_anon_union): Likewise.
2638 * method.c (largest_union_member): Likewise.
2639
103894f1
L
2640Wed May 24 14:41:11 1995 H.J. Lu (hjl@nynexst.com)
2641
2642 * Make-lang.in (cxxmain.o): Replace single quotes with backslashes.
2643
fbb47000
RK
2644Mon May 22 17:38:48 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
2645
2646 * Make-lang.in (g++, g++-cross, cc1plus, DEMANGLER_PROG):
2647 Use $@ instead of output name so works even if have .exe.
2648 (cxxmain.o): Use cp if ln -s fails.
2649 (c++.install-man): Use $(exeext) in executable names.
2650 (c++.mostlyclean, stage[1-4]): Use $(objext) in object file names.
2651 * Makefile.in (../cc1plus): Use $(exeext) in name of executable.
2652
878cd289
MS
2653Wed May 24 01:39:03 1995 Jason Merrill <jason@deneb.cygnus.com>
2654
2655 * call.c (build_method_call): parms can be null, duh.
2656
2657Tue May 23 01:32:09 1995 Jason Merrill <jason@deneb.cygnus.com>
2658
2659 * call.c (build_method_call): If convert_arguments failed, just bail.
2660
2661Fri May 19 10:31:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2662
2663 * cvt.c (convert_force): Pass LOOKUP_NORMAL to cp_convert.
2664
2665 * tree.c (copy_to_permanent): Oops.
2666
2667Fri May 19 10:01:07 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
2668
2669 * cp-tree.h (break_out_target_exprs): Add decl.
2670
2671Thu May 18 13:02:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2672
2673 * decl.c (start_function): Move *all* interface handling stuff after
2674 the pushdecl.
2675
2676 * tree.c (mapcar): Renamed from make_deep_copy and generalized.
2677 (perm_manip): Return t if permanent, otherwise 0.
2678 (copy_to_permanent): Use them.
2679 (bot_manip): Helper for break_out_target_exprs.
2680 (break_out_target_exprs): New function. Uses mapcar.
2681
2682 * typeck.c (convert_arguments): Use it.
2683
2684 * method.c (hack_identifier): Use convert_from_reference to
2685 dereference a reference.
2686
2687Wed May 17 17:54:54 1995 Mike Stump <mrs@cygnus.com>
2688
2689 * call.c (convert_harshness): Move reference bashing before pointer
2690 to member bashing.
2691
2692Wed May 17 16:57:53 1995 Mike Stump <mrs@cygnus.com>
2693
2694 * cvt.c (convert_to_reference): Only complain, if complaints are
2695 wanted.
d8f1d487 2696 * typeck.c (build_function_call_real): Ditto. If LOOKUP_SPECULATIVELY
878cd289 2697 is set and something won't work, return NULL_TREE.
d8f1d487 2698 * cvt.c (cp_convert): Ditto. Pass flags down to build_method_call.
878cd289 2699 (convert): Pass LOOKUP_NORMAL to cp_convert.
d8f1d487 2700 * typeck.c (convert_for_assignment): Ditto.
878cd289 2701 (convert_force): Pass LOOKUP_COMPLAIN to cp_convert.
d8f1d487 2702 (convert_arguments): Get out early if we get an error_mark_node.
878cd289
MS
2703 (convert_for_initialization): Use cp_convert instead of convert so
2704 that we can pass flags down.
2705 * cp-tree.h (LOOKUP_SPECULATIVELY): Added documentation.
2706
c19a8067
JM
2707Wed May 17 01:43:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2708
878cd289
MS
2709 * typeck2.c (store_init_value): Don't take the MAIN_VARIANT of the
2710 decl type.
2711
c19a8067
JM
2712 * class.c (finish_struct): Don't complain about a class with no
2713 user-defined constructors but with a member that has no default
2714 constructor, as this is OK for aggregates.
2715
2716 * expr.c (cplus_expand_expr, NEW_EXPR): If this is an explicit
2717 constructor call, mark slot addressable.
2718
eacd15bc
DR
2719Tue May 16 18:37:51 1995 Douglas Rupp (drupp@cs.washington.edu)
2720
2721 * g++.c: Changed WINNT to _WIN32.
2722
a9aedbc2
MS
2723Tue May 16 12:40:16 1995 Jason Merrill <jason@lisa.cygnus.com>
2724
2725 * lex.c (handle_sysv_pragma): Don't use token_buffer.
2726
2727Tue May 16 12:05:26 1995 Mike Stump <mrs@cygnus.com>
2728
2729 * call.c (resolve_scope_to_name): Add initial semantic support for
2730 namespaces.
2731 * class.c (finish_struct): Ditto.
2732 * cp-tree.h (NAMESPACE_LEVEL): Ditto.
2733 * cvt.c (build_up_reference, convert_to_reference): Ditto.
2734 * decl.c (binding_level::namespace_p, suspend_binding_level): Ditto.
2735 (resume_binding_level, toplevel_bindings_p): Ditto
2736 (namespace_bindings_p, declare_namespace_level): Ditto.
2737 (resume_level, push_namespace, pop_namespace): Ditto.
2738 (pop_everything, pushtag, duplicate_decls, pushdecl): Ditto.
2739 (implicitly_declare, lookup_namespace_name, lookup_name_real): Ditto.
2740 (start_decl, make_temporary_for_reference), Ditto.
2741 (obscure_complex_init, finish_decl, expand_static_init): Ditto.
2742 (grokvardecl, grokdeclarator, parmlist_is_exprlist): Ditto.
2743 (store_parm_decls, hack_incomplete_structures): Ditto.
2744 * decl2.c (get_temp_name, finish_anon_union, current_namespace): Ditto.
2745 (push_namespace, pop_namespace, do_namespace_alias): Ditto.
2746 (do_toplevel_using_decl, do_class_using_decl): Ditto.
2747 * error.c (dump_decl): Ditto.
2748 * init.c (build_member_call, build_offset_ref): Ditto.
2749 * lex.c (identifier_type): Ditto.
2750 * parse.y (lang_extdef, using_decl, extdef, component_decl_1): Ditto.
2751 (nested_name_specifier_1): Ditto.
2752 * spew.c (yylex): Ditto.
2753 * tree.def (NAMESPACE_DECL): Ditto.
2754
2755Tue May 16 11:55:35 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2756
2757 * decl.c (push_overloaded_decl): Return the new decl even if it
2758 can't be pushed.
2759
2760Tue May 16 11:00:37 1995 Jason Merrill <jason@lisa.cygnus.com>
2761
2762 * typeck.c (decay_conversion): Split out from default_conversion.
2763 (default_conversion): Call it.
2764 (build_binary_op): Ditto.
2765 (build_binary_op_nodefault): Use decay_conversion for truth ops.
2766
2767Mon May 15 12:47:56 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2768
2769 * decl.c (warn_extern_redeclared_static): This is a pedwarn.
2770 (duplicate_decls): Always use the old decl's linkage info. Don't
2771 play with linkage of consts.
2772 (pushdecl): Don't play with linkage of consts.
2773 (redeclaration_error_message): Don't complain about an old public
2774 decl and a new non-public decl here.
2775 (grokvardecl): Handle linkage of consts here.
2776 (grokdeclarator): An 'extern inline' is public. Pass constp to
2777 grokvardecl.
2778 (start_function): Wait until after the pushdecl to do some linkage
2779 stuff.
2780
2781 * decl2.c (import_export_vtable): Make duplicates weak rather than
2782 static if supported.
2783 (import_export_inline): Ditto.
2784 * pt.c (do_pending_expansions): Ditto.
2785
2786 * class.c (build_vbase_path): flag_assume_nonnull_objects only
2787 affects reference conversion.
2788
2789 * init.c (emit_base_init): Build up an RTL_EXPR and add it to
f30432d7 2790 rtl_expr_chain.
a9aedbc2
MS
2791 * decl.c, decl2.c: s/base_init_insns/base_init_expr/.
2792
7154457b
PE
2793Tue May 16 07:06:28 1995 Paul Eggert <eggert@twinsun.com>
2794
2795 * method.c (numeric_output_need_bar): Renamed from misspelling.
2796
45ca9d09
RK
2797 * typeck.c (build_ptrmemfunc): Fix misspellings in messages.
2798
7ab7b006
RK
2799Sun May 14 10:26:22 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2800
2801 * lang-options.h, lang-specs.h: New files.
2802
fd378c9d
JM
2803Thu May 11 00:31:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2804
2805 * typeck.c (default_conversion): Don't check for BLKmode before
2806 pulling out the decl_constant_value.
2807
2808 * decl.c (start_function): Clear named_labels and shadowed_labels.
2809
2810 * typeck.c (build_function_call_real): Also synthesize methods here.
2811
2812Wed May 10 00:55:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2813
2814 * decl2.c (finish_file): Synthesize exported methods before the
2815 reconsider loop.
2816
2817 * parse.y: Move declaration of flag_new_for_scope to file scope.
2818
863adfc0
MS
2819Tue May 9 19:10:33 1995 Mike Stump <mrs@cygnus.com>
2820
2821 * decl2.c: Add flag_new_for_scope for new -ffor-scope flag.
2822 * parse.y (FOR): Conditionalize the pushing and poping of scope for
2823 the for-init-statement upon the new flag_new_for_scope.
2824 * parse.y (try_block): Simplify and use compstmt.
2825
2826Mon May 8 12:41:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2827
2828 * decl.c (define_function): Mark function decl artificial.
2829
2830Sun May 7 00:51:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2831
2832 * parse.y (simple_stmt, FOR): Put back push/pop for condition scope.
2833
2834 * decl2.c (grokclassfn): DECLs don't have cv-qualified types.
2835 * tree.c (build_cplus_method_type): Ditto.
2836
2837 * cp-tree.h (SET_DECL_ARTIFICIAL): Just set DECL_ARTIFICIAL to 1.
2838
2839 * typeck.c (build_function_call_real): If convert_arguments failed,
2840 just bail.
2841 (convert_arguments): If one of the arguments is error_mark_node,
2842 just bail.
2843
2844Sat May 6 02:39:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2845
2846 * decl.c (duplicate_decls): Don't check DECL_NOT_REALLY_EXTERN for
2847 decls that don't include it.
2848
2849Fri May 5 14:23:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2850
2851 * decl.c (duplicate_decls): Decls that have DECL_INTERFACE_KNOWN or
2852 DECL_NOT_REALLY_EXTERN set aren't extern decls.
2853
2854 * typeck.c (build_indirect_ref): Don't call default_conversion for a
2855 parameter of reference_type.
2856 * cvt.c (convert_from_reference): Just use build_indirect_ref.
2857
2858 * pt.c (do_type_instantiation): Only instantiate member functions
2859 that actually come from templates.
2860
2861Fri May 5 09:46:05 1995 Mike Stump <mrs@cygnus.com>
2862
2863 * parse.y: Generalized cleanup of poplevels, and compound statements
2864 and compound statements in try blocks. Rewritten `for' rule so that
2865 the scope of variables declared in the for clause is shortened to
2866 span just to the end of the statement, instead of the whole
2867 containing block.
2868
2869Fri May 5 00:37:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2870
2871 * call.c (convert_harshness): Handle pointers to members better.
2872
2873Thu May 4 16:00:26 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2874
2875 * decl2.c (delete_sanity): Do access control here.
2876 * init.c (build_delete): Instead of here.
2877
2878 * Make-lang.in: Build c++filt.
2879
2880Wed May 3 02:59:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2881
2882 * decl2.c (cplus_decl_attributes): If we just modified a TYPE_DECL,
2883 update our IDENTIFIER_TYPE_VALUE.
2884
a5894242
MS
2885Fri Apr 28 07:58:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2886
2887 * lex.c (cons_up_default_function): Fix linkage of #pragma
2888 implemented functions.
2889
2890Thu Apr 27 16:56:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2891
2892 * method.c (build_overload_name): Simplify and fix repeated type
2893 folding.
2894
2895 * decl.c (grokdeclarator): Prohibit pointers to void or reference
f30432d7 2896 members.
a5894242
MS
2897
2898Thu Apr 27 09:49:07 1995 Mike Stump <mrs@cygnus.com>
2899
2900 * typeck2.c (process_init_constructor): Make sure initializers are
2901 fully digested.
2902
2903Thu Apr 27 01:11:55 1995 Jason Merrill <jason@python.cygnus.com>
2904
2905 * lex.c (cons_up_default_function): Always defer synthesis.
2906
2907Thu Apr 27 00:20:37 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2908
2909 * decl2.c (mark_inline_for_output): Don't play with pending_inline
2910 stuff.
2911
2912Wed Apr 26 17:48:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2913
2914 * call.c (user_harshness): New function; like build_type_conversion,
2915 but doesn't actually build anything.
2916 (compute_conversion_costs): Use it instead of build_type_conversion.
2917
2918Wed Apr 26 17:11:25 1995 Jason Merrill <jason@deneb.cygnus.com>
2919
2920 * typeck.c (build_function_call_real): Improve error message for
2921 calling a non-function.
2922
2923 * method.c (hack_identifier): Lose check for calling a data member.
2924
2925Wed Apr 26 16:59:13 1995 Mike Stump <mrs@cygnus.com>
2926
2927 * typeck2.c (build_functional_cast): Remove very old cruft.
2928 Seems like good code is generated without it.
2929
2930Wed Apr 26 00:47:16 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2931
2932 * method.c (do_build_assign_ref): Fix handling of anonymous unions.
2933 (do_build_copy_constructor): Ditto.
2934
2935 * parse.y (simple_stmt, SWITCH): Call {push,pop}_switch.
2936
2937 * decl.c (push_switch): New function.
2938 (pop_switch): Ditto.
2939 (define_case_label): Check for jumping over initialization.
2940
2941 * call.c (build_method_call): Check for an inline function being
2942 called before its definition has been seen.
2943 * typeck.c (build_function_call_real): Ditto.
2944
2945 * decl.c (duplicate_decls): Check for a function being redeclared
2946 inline after its address has been taken.
2947
2948 * typeck.c (build_conditional_expr): Handle related class lvalues.
2949
2950Tue Apr 25 13:20:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2951
2952 * pt.c (do_pending_expansions): Don't expand unused templates.
2953
2954 * parse.y (component_decl): Accept a lone semicolon.
2955
2956Tue Apr 25 00:25:56 1995 Jason Merrill <jason@rtl.cygnus.com>
2957
2958 * call.c (build_method_call): Don't allow an RTL_EXPR to serve as the
2959 object parameter anymore.
2960
2961 * expr.c (cplus_expand_expr): Don't create RTL_EXPRs with no insns.
2962
2963Mon Apr 24 12:35:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2964
2965 * parse.y (simple_stmt, decl case): Clear prefix_attributes.
2966 (lang_extdef): Ditto.
2967
2968 * parse.y (maybe_parmlist): New rule for use in declarators where
2969 this could either be a list of expressions or parameters. Calls
2970 suspend_momentary before deciding which.
2971 (direct_after_type_declarator): Use it.
2972 (complex_direct_notype_declarator): Use it.
2973
2974 * pt.c (tsubst): Propagate attributes const and noreturn.
2975
2976 * typeck.c (build_modify_expr): If warn_synth, call build_opfncall
2977 before doing the default thing.
2978
2db70b29
DE
2979Thu Apr 27 21:49:36 1995 Doug Evans <dje@cygnus.com>
2980
2981 * typeck.c (common_type): Call lookup_attribute instead of
2982 value_member.
2983
91887f0b
RK
2984Tue Apr 25 18:07:43 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
2985
2986 * Make-lang.in: Change "realclean" to "maintainer-clean".
2987
e8abc66f
MS
2988Sun Apr 23 12:32:38 1995 Mike Stump <mrs@cygnus.com>
2989
2990 * decl2.c (finish_file): Fix broken linked list handling.
2991
2992Fri Apr 21 18:08:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2993
2994 * class.c (finish_base_struct): Don't set TYPE_HAS_COMPLEX_*_REF
2995 as often.
2996 (finish_struct): Ditto.
2997
2998 * various: Use TYPE_HAS_TRIVIAL_* instead of TYPE_HAS_COMPLEX_*.
2999
3000 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): New macro.
3001 (TYPE_HAS_TRIVIAL_ASSIGN_REF): New macro.
3002
3003Fri Apr 21 15:52:22 1995 Jason Merrill <jason@python.cygnus.com>
3004
3005 * typeck.c (c_expand_return): Only expand a returned TARGET_EXPR if
3006 it is of the same type as the return value.
3007
3008Fri Apr 21 03:01:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3009
3010 * decl2.c (finish_file): Reconsider if synthesizing a method wrote
3011 out its assembly.
3012
3013 * typeck.c (convert_for_initialization): Don't call a trivial copy
3014 constructor.
3015
3016 * typeck2.c (store_init_value): Only abort if the type has a
3017 non-trivial copy constructor.
3018
3019 * typeck.c (c_expand_return): If we're returning in a register and
3020 the return value is a TARGET_EXPR, expand it. Only do
3021 expand_aggr_init if we're returning in memory.
3022 (expand_target_expr): Function to expand a TARGET_EXPR.
3023 (build_modify_expr): Use it.
3024
3025 * tree.c (build_cplus_new): Layout the slot.
3026
3027 * expr.c (cplus_expand_expr): Use expand_call to expand the call
3028 under a NEW_EXPR, so the target is not discarded.
3029
3030Thu Apr 20 14:59:31 1995 Mike Stump <mrs@cygnus.com>
3031
3032 * gc.c (build_dynamic_cast): Tighten error checking.
3033
3034Thu Apr 20 11:23:54 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3035
3036 * expr.c (cplus_expand_expr): Only abort if the returned target is
3037 different from what we expected if the type has a non-trivial copy
3038 constructor.
3039
3040 * decl2.c (cplus_decl_attributes): Attributes applied to a template
3041 really apply to the template's result.
3042
3043 * tree.c (lvalue_p): Check IS_AGGR_TYPE instead of TREE_ADDRESSABLE
3044 to decide whether to consider a CALL_EXPR an lvalue.
3045
3046 * class.c (finish_struct_bits): Only set TREE_ADDRESSABLE if the
3047 type has a non-trivial copy constructor.
3048
3049 * decl.c (start_function): If interface_known, unset
3050 DECL_NOT_REALLY_EXTERN on the function.
3051
3052Wed Apr 19 16:53:13 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3053
3054 * pt.c (do_function_instantiation): Handle explicit instantiation of
3055 member functions.
3056 (do_type_instantiation): Handle 'inline template class foo<int>',
3057 meaning just spit out the vtable.
3058
3059 * lex.c (cons_up_default_function): Set DECL_NOT_REALLY_EXTERN on
3060 the consed functions.
3061
3062 * decl2.c (import_export_inline): Set DECL_INTERFACE_KNOWN.
3063
3064Wed Apr 19 16:28:17 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3065
3066 * call.c, class.c, decl2.c, gc.c, init.c, parse.y, pt.c, search.c,
3067 typeck.c: Include output.h.
3068
3069Wed Apr 19 14:57:21 1995 Gerald Baumgartner (gb@alexander.cs.purdue.edu)
3070
3071 * call.c (build_method_call): Allow a signature member functions to
3072 be called from a default implementation.
3073
3074Wed Apr 19 10:21:17 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3075
3076 * repo.c (finish_repo): Remember what directory we are in.
3077
3078 * search.c (expand_upcast_fixups): Don't mess with abort_fndecl.
3079
3080 * repo.c: Use obstacks instead of fixed-size buffers. Don't spit
3081 out the second copy of the symbol name. Don't remember COLLECT_GCC.
3082
43f2999d
MS
3083Wed Apr 19 02:32:40 1995 Mike Stump <mrs@cygnus.com>
3084
3085 * search.c (virtual_context): New function to get the virtual
3086 context of a function.
3087 (expand_upcast_fixups): New function to generate runtime vtables.
3088 (fixup_virtual_upcast_offsets): Ditto.
3089 (expand_indirect_vtbls_init): Use fixup_virtual_upcast_offsets to
3090 ensure that the this offsets for upcasts from virtual bases into
3091 other virtual bases or non-virtual bases are correct at construction
3092 time and destruction time.
3093 * class.c (fixup_vtable_deltas): Modify to fixup all offsets in all
3094 vtables in all virtual bases, instead of just one vtable in each
3095 virtual base.
3096 (fixup_vtable_deltas1): Ditto.
3097
44a8d0b3
MS
3098Tue Apr 18 03:57:35 1995 Michael Meissner (meissner@cygnus.com)
3099
3100 * Makefile.in (lex.o): Add dependency on c-pragma.h.
3101
3102 * lex.c (handle_sysv_pragma): Use NULL_PTR and NULL_TREE as
3103 appropriate, instead of 0.
3104
3105Mon Apr 17 12:28:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3106
3107 * decl.c (pushdecl): Use decls_match, not duplicate_decls, for
3108 comparing local and global decls.
3109
3110Fri Apr 14 01:46:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3111
3112 * typeck.c (convert_arguments): Only prohibit passing to ... of
3113 types with non-trivial copy constructors.
3114
3115 * repo.c (repo_template_used): Don't try to mess with no id.
3116
3117Fri Apr 14 23:32:50 1995 Per Bothner <bothner@rtl.cygnus.com>
3118
3119 * decl.c (duplicate_decls): Use cp_warning_at for redundant-decls.
3120
3121Thu Apr 13 15:37:42 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3122
3123 * cp-tree.h (current_tinst_level): Delete declaration, since it's
3124 static inside pt.c.
3125
3126 * typeck.c (build_modify_expr): Catch incompatible array assignment.
3127
3128 * parse.y (attribute_list, attrib): Rewrite actions to feed the
3129 right stuff to decl_attributes.
3130
3131Thu Apr 13 11:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3132
3133 * search.c (dfs_debug_mark): Check for magic virtual like
3134 import_export_vtable.
3135
3136 * typeck.c (build_binary_op_nodefault): Don't call cp_pedwarn with
3137 four args.
3138
3139Wed Apr 12 12:02:57 1995 Jason Merrill <jason@deneb.cygnus.com>
3140
3141 * decl2.c (finish_file): Move prevtable pass before needs_messing_up
3142 decision.
3143
3144Tue Apr 11 11:20:27 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3145
3146 * decl.c (finish_decl): If we're writing out a static data member of
3147 a class, we want the debug info for that class.
3148
3149 * gc.c (build_t_desc): Check linkage of a class properly.
3150
3151 * class.c (finish_struct): Set the 'headof' offset for the main
3152 vtable properly.
3153 (prepare_fresh_vtable): Fix typeinfo pointer here.
3154 (modify_one_vtable): Instead of here.
3155
3156Mon Apr 10 12:15:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3157
3158 * repo.c (repo_get_id): New function to return the interesting
3159 identifier for a repo entity.
3160 (repo_template_used): Use it.
3161 (repo_template_instantiated): Mark the id as chosen.
3162 (init_repo): Record whether or not the id was chosen.
3163 (finish_repo): Note if an id was newly chosen.
3164
3165 * pt.c (do_function_instantiation): Call repo_template_instantiated.
3166 (do_type_instantiation): Ditto. Don't diagnose multiple
3167 instantiation.
3168
3169 * decl2.c (finish_file): Use DECL_NOT_REALLY_EXTERN when deciding
3170 whether or not to synthesize a method.
3171
3172 Undo these changes:
3173 * class.c (finish_vtbls): build more vtables if flag_rtti is on.
3174 * class.c (modify_all_direct_vtables): ditto.
3175 * init.c (expand_direct_vtbls_init): expand more vtables if
3176 flag_rtti is on.
3177
79ff2c6c
MS
3178Sat Apr 8 17:45:41 1995 Mike Stump <mrs@cygnus.com>
3179
3180 * gc.c (build_headof): Use ptrdiff_type_node instead of
3181 integer_type_node on pointer arithmetic.
3182
3183Sat Apr 8 11:57:04 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3184
3185 * typeck.c (build_modify_expr): Undo previous change.
3186
3187Thu Apr 6 01:23:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3188
3189 * Makefile.in (compiler): Remove ../cc1plus before rebuilding it.
3190
3191 * repo.c (get_base_filename): Put the .rpo file in the directory
3192 with the object file, not the source.
3193
3194 * typeck.c (build_conditional_expr): Handle pmf's better.
3195
3196 * repo.c (finish_repo): Also use ASM_OUTPUT_LABELREF to print out
3197 the name of the symbol.
3198
3199Wed Apr 5 15:24:12 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3200
3201 * repo.c (open_repo_file): Make repo filename DOS-compliant.
3202 (*): Also write a new repo file if some previously-used
3203 templates are no longer used. Only remember the identifier.
3204
3205 * lex.c (cons_up_default_function): If this function belongs to a
3206 template class, call repo_template_used for it.
3207
3208 * repo.c (repo_template_used): Using a class means using its vtable,
3209 if any.
3210 (finish_repo): Ditto.
3211
3212 * typeck.c (build_modify_expr): Only wrap TARGET_EXPRs in RTL_EXPRs
3213 if the type has a complex copy constructor.
3214
3215 * decl2.c (lang_decode_option): -frepo implies
3216 -fno-implicit-templates.
3217
3218 * decl.c (start_function): Clear current_{base,member}_init_list.
3219
3220 * lex.c (init_lex): Also unset *_eq if ! flag_operator_names.
3221
3222Tue Apr 4 16:11:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3223
3224 * decl.c (struct cp_function): Add {base,member}_init_list.
3225 (push_cp_function_context): Save current_{base,member}_init_list.
3226 (pop_cp_function_context): Restore them.
3227
b19b4a78
MS
3228Mon Apr 3 16:55:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3229
3230 * repo.c (get_base_filename): Take filename parm, fix logic bug.
3231
3232 * typeck.c (build_compound_expr): Do not warn about a compound expr
3233 in which the first expression has no side effects.
3234 (build_x_compound_expr): Warn here instead.
3235 (build_conditional_expr): Don't warn about a conditional expression
3236 between an enum and the type it promotes to.
3237
3238 * init.c (build_new): Handle initialization of arrays of builtins
3239 properly.
3240
3241Mon Apr 3 15:08:04 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3242
3243 * repo.c: Include config.h to get definitions of bcopy and rindex
3244 on systems that don't have them (e.g., SVR4).
3245
3246Mon Apr 3 14:41:55 1995 Mike Stump <mrs@cygnus.com>
3247
3248 * decl2.c (finish_table): Pass NULL_TREE instead of init to
3249 finish_decl so that it won't try and do error checking on the
3250 initializer.
3251
3252Mon Apr 3 10:45:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3253
3254 * repo.c (get_base_filename): Analyze COLLECT_GCC_OPTIONS to
3255 determine whether this compile used -c -o.
3256 (open_repo_file): Use get_base_filename. Remove the extension.
3257 (finish_repo): Spit out the values of main_input_filename,
3258 COLLECT_GCC and COLLECT_GCC_OPTIONS.
3259
3260 * parse.y (structsp): Add TYPENAME_KEYWORD complex_type_name.
3261
faae18ab
MS
3262Sun Apr 2 23:43:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3263
3264 * search.c (compute_access): Don't try to do access control on
3265 nested types.
3266
3267Fri Mar 31 10:14:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3268
3269 * repo.c: New file to handle things repo.
3270
3271 * pt.c (instantiate_template): Call repo_template_used if the
3272 definition is accessible.
3273 (mark_function_instantiated): Split out from
3274 do_function_instantiation.
3275 (mark_class_instantiated): Split out from do_type_instantiation.
3276
3277 * parse.y (template_instantiate_once): Call repo_template_used.
3278
3279 * lex.c (lang_init): Call init_repo.
3280
3281 * decl2.c: Handle flag_use_repository.
3282 (finish_file): Call finish_repo.
3283
3284 * decl.c (start_method): Call repo_template_used if this is a
3285 template method.
3286
3287 * Makefile.in (CXX_OBJS): Add repo.o.
3288 (repo.o): Add dependencies.
3289
3290 * Make-lang.in (CXX_SRCS): Add repo.c.
3291
3292 * decl.c (start_function): If DECL_INTERFACE_KNOWN and
3293 DECL_NOT_REALLY_EXTERN are both set, unset DECL_EXTERNAL.
3294
3295 * typeck.c (build_binary_op_nodefault): Identify the invalid operand
3296 types used.
3297
3298 * decl.c (duplicate_decls): Propagate DECL_NOT_REALLY_EXTERN.
3299
3300Thu Mar 30 17:54:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3301
3302 * typeck.c (build_binary_op_nodefault): Tidy up use of build_type
3303 and result_type. When checking for comparison between signed
3304 and unsigned, use result_type rather than the (possibly shortened)
3305 type of op0. Also, don't warn about equality comparison of a
3306 signed operand to an unsigned constant that fits in the signed
3307 type.
3308
3309 * method.c (do_build_copy_constructor): Reverse
3310 current_base_init_list after we've built it up.
3311
3312Thu Mar 30 14:35:18 1995 Mike Stump <mrs@cygnus.com>
3313
3314 * except.c (build_throw): Never warn about the value of throw not
3315 being used.
3316
3317Thu Mar 30 13:16:54 1995 Mike Stump <mrs@cygnus.com>
3318
3319 * except.c (expand_start_catch_block): Check for bad catch parameter
3320 declarations.
3321
3322Thu Mar 30 13:06:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3323
3324 * decl.c (finish_function): Only set DECL_NOT_REALLY_EXTERN if
3325 DECL_EXTERNAL is not already set.
3326
3327Thu Mar 30 11:26:24 1995 Mike Stump <mrs@cygnus.com>
3328
3329 * method.c (emit_thunk): Let poplevel know that the last level is
3330 for a function so it can create a BLOCK_NODE and set DECL_INITIAL.
3331
3332Thu Mar 30 11:15:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3333
3334 * decl2.c (import_export_inline): Don't set DECL_NOT_REALLY_EXTERN
3335 here.
3336
3337 * decl.c (grokdeclarator): OK, don't abort if we see a decl with
3338 METHOD_TYPE.
3339 (finish_function): Set DECL_EXTERNAL and DECL_NOT_REALLY_EXTERN on
3340 all deferred inlines.
3341
3342Wed Mar 29 19:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3343
3344 * cp-tree.h (DECL_THIS_INLINE): New macro.
3345 (DECL_NOT_REALLY_EXTERN): New macro.
3346 (DECL_THIS_STATIC): New macro.
3347
3348 * decl.c: Lose all references to current_extern_inline. Break
3349 inline semantics into DECL_INLINE for actual inlining and
3350 DECL_THIS_INLINE for the linkage wierdness. Use DECL_THIS_STATIC.
3351 * decl2.c: Use DECL_NOT_REALLY_EXTERN to indicate that we want to
3352 emit an inline here. Associated changes.
3353 * lex.c: Ditto.
3354 * pt.c: Ditto.
3355 * typeck.c: Ditto.
3356
3357 * call.c (build_method_call): Don't bother trying to handle inlines
3358 specially.
3359 * cvt.c (convert_to_aggr): Ditto.
3360
3361 * pt.c (do_function_instantiation): Handle instantiation of
3362 public inlines, too.
3363
3364Wed Mar 29 16:04:25 1995 Mike Stump <mrs@cygnus.com>
3365
3366 * except.c (init_exception_processing): Change the interface for
3367 __throw_type_match and add decl for new rtti matching routine
3368 __throw_type_match_rtti.
3369 (build_eh_type): New routine to build a run time descriptor for the
3370 expression given.
3371 (expand_start_catch_block): Update to use new calling convention for
3372 the matcher.
3373 (expand_throw): Update to use build_eh_type.
3374
08fb8ad0
WL
3375Mon Mar 27 07:14:33 1995 Warner Losh <imp@village.org>
3376
3377 * g++.c: Removed __NetBSD__ from conditional.
3378 Declare strerror if HAVE_STRERROR is defined; otherwise
3379 declare sys_errlist and sys_nerr.
3380 (my_strerror): New function.
3381
71851aaa
MS
3382Tue Mar 28 14:16:35 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3383
3384 * search.c (get_binfo): Don't try to be so clever.
3385
3386 * tree.c (copy_to_permanent): Also suspend_momentary().
3387
3388 * cvt.c (cp_convert_to_pointer): Hand off to convert_fn_pointer even
3389 if the types are the same.
3390
3391 * decl.c (start_function): Handle extern inlines more like C++ says
f30432d7 3392 we should.
71851aaa
MS
3393
3394 * init.c (build_member_call): Hand constructor calls off to
3395 build_functional_cast.
3396
3397 * typeck2.c (build_functional_cast): Use DECL_NESTED_TYPENAME to get
3398 the name of the type.
3399
3400Tue Mar 28 13:13:56 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3401
3402 * decl.c (grokdeclarator): Check for the decl returned by
3403 grokfndecl to be null before using build_decl_attribute_variant.
3404
3405Mon Mar 27 18:04:41 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3406
3407 * init.c (build_new): Use build_pointer_type instead of
3408 TYPE_POINTER_TO.
3409
7215f9a0
MS
3410Fri Mar 24 12:11:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3411
71851aaa
MS
3412 * typeck.c (build_conditional_expr): Handle pmfs.
3413 (convert_for_assignment): Fix pmf support.
3414
3415 * cvt.c (convert_fn_ptr): Support !flag_vtable_thunks.
3416 (cp_convert_to_pointer): Handle pmfs.
3417 (cp_convert): Pass pmfs to cp_convert_to_pointer.
3418
3419 * typeck.c (common_type): Handle inheritance for pmfs.
3420
3421 * typeck2.c (build_m_component_ref): Do access control.
3422
3423 * typeck.c (comp_target_types): Check for conversion to void *
3424 before checking trickier conversions.
3425
7215f9a0
MS
3426 * decl.c (duplicate_decls): Propagate DECL_ABSTRACT_VIRTUAL_P.
3427
3428 * pt.c (push_tinst_level): Complain if template instantiation depth
3429 is greater than max_tinst_depth.
3430
3431 * typeck.c (common_type): Assume that we can call common_type to
3432 unify the target type of a pointer.
3433
3434Thu Mar 23 00:48:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3435
3436 * decl2.c (finish_file): Don't synthesize methods at
3437 finish_vtable_prevardecl time. Do synthesize methods that are not
3438 used, but are public and not external.
3439
3440 * cvt.c (build_type_conversion): Only give an error if for_sure.
3441
3442 * typeck.c (comp_target_types): Only support pointer conversions if
3443 nptrs > 0.
3444
3445Wed Mar 22 19:30:15 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3446
3447 * init.c (build_new): Catch use of an initializer list where it
3448 shouldn't be.
3449
3450Wed Mar 22 16:21:07 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3451
3452 * init.c (build_new): Wrap alloc_expr in an RTL_EXPR if nelts is
3453 non-constant.
3454
3455 * decl2.c: temp_name_counter is now public.
3456
3457 * decl.c (struct cp_function): Add temp_name_counter field.
3458 (push_cp_function_context): Save it.
3459 (pop_cp_function_context): Restore it.
3460
3461 * typeck.c (common_type): Handle unifying function types, and unify
3462 unmatched things to void* with a compiler_error, rather than
3463 silently like before.
3464
28cbf42c
MS
3465Wed Mar 22 15:10:34 1995 Mike Stump <mrs@cygnus.com>
3466
3467 * decl2.c (finish_prevtable_vardecl, finish_vtable_vardecl): Revert
3468 Brendan's last change and fix latent problem that causes TD entries
3469 to not come out when the things that need them has yet to be
3470 expanded.
3471
3472Wed Mar 22 15:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3473
3474 * typeck.c (build_binary_op_nodefault, comparison ops): Update type0
3475 and type1, since we might have changed op0 or op1.
3476
3477Wed Mar 22 13:33:45 1995 Jason Merrill <jason@python.cygnus.com>
3478
3479 * typeck.c (common_type): Don't mess up templates.
3480
3481Wed Mar 22 04:56:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3482
3483 * typeck.c (common_type): Handle ptms properly. Also handle
3484 T* -> void*.
3485 (build_binary_op_nodefault): New variable build_type controls what
3486 type is given to the expression when it is created. Set this to
3487 boolean_type_node for comparison ops instead of using result_type.
3488 (comp_target_types): Allow T * -> void *.
3489
3490 * cvt.c (cp_convert_to_pointer): Do access control when converting
3491 ptms, too.
3492
3493Tue Mar 21 17:25:06 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3494
3495 * parse.y (extern_lang_string): Catch use of linkage specs that
3496 aren't all naming the same language.
3497
3498 * class.c (finish_struct): Delete accidental duplicate code.
3499
3500Tue Mar 21 14:00:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3501
3502 * typeck.c (build_binary_op_nodefault): Disable pedwarns about
3503 comparing functions and incomplete types.
3504
3505 * decl.c (finish_function): Only unset current_function_decl if
3506 !nested.
3507 (duplicate_decls): Last change went too far; we only want to stop
3508 checking for value/reference ambiguity.
3509
3510Tue Mar 21 01:26:39 1995 Mike Stump <mrs@cygnus.com>
3511
3512 * gc.c (build_generic_desc): Zap the DECL_SIZE so that we can lay it
3513 out fresh, as the new type may be larger.
3514
3515Mon Mar 20 19:01:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3516
3517 * expr.c (extract_init): Try to expand the RTL for the
3518 initialization and figure out what it will look like so we can avoid
3519 run-time initialization. Disabled for now.
3520 (extract_scalar_init): Helper for scalar initialization.
3521 (extract_aggr_init): Helper for aggregate initialization.
3522
3523 * decl.c (duplicate_decls): Don't complain about ambiguous
3524 declarations.
3525 (obscure_complex_init): Now returns a tree. Call extract_init if
3526 we're optimizing and this is a toplevel decl.
3527 (finish_decl): Update accordingly.
3528
3529 * lex.c (check_newline): If we're just changing files (not pushing
3530 or popping), update input_file_stack->name.
3531
3532Mon Mar 20 17:55:04 1995 Mike Stump <mrs@cygnus.com>
3533
3534 * pt.c (type_unification): Only TEMPLATE_DECLs are handled right now
3535 in the transitive unification code.
3536
3537Mon Mar 20 16:07:50 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3538
3539 * decl.c (shadow_tag): Don't allow inline, virtual, or explicit on
3540 non-functions.
3541 (grokdeclarator): Don't allow friends to be defined in local classes.
3542
3543Sat Mar 18 04:03:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3544
3545 * decl2.c (finish_prevtable_vardecl): Use DECL_DECLARED_STATIC
3546 rather than DECL_SAVED_INSNS to decide whether or not this method
3547 was declared inline.
3548
3549 * method.c (synthesize_method): Turn off DECL_INLINE if
3550 function_cannot_inline_p thinks we're too large.
3551
3552 * typeck.c (build_indirect_ref): Use build_expr_type_conversion.
3553
3554Fri Mar 17 17:47:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3555
3556 * class.c (instantiate_type): Handle pmfs.
3557
3558 * typeck.c (convert_for_assignment): Check types when assigning one
3559 pmf to another.
3560
3561 * decl.c (define_label): Fix logic for printing out the name of the
3562 label in an error message.
3563
3564 * error.c (dump_expr): Support ARRAY_REF.
3565
3566Fri Mar 17 17:43:02 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3567
3568 * decl2.c (finish_vtable_vardecl): Call build_t_desc here.
3569 (finish_prevtable_vardecl): Instead of here.
3570
3571Fri Mar 17 14:40:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3572
3573 * decl.c (expand_static_init): Also use expand_aggr_init if the
3574 initializer is a TREE_LIST.
3575 (grokdeclarator): Only pedwarn about extra qualification if -pedantic.
3576
3577 * pt.c (unify): Fix unification of return type.
3578
3579 * expr.c (fixup_result_decl): Use store_expr, rather than
3580 emit_move_insn, to move the return value into the place where
3581 callers will expect it.
3582
3583Thu Mar 16 22:05:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3584
3585 * init.c (build_offset_ref): Call assmble_external on functions.
3586 * typeck.c (build_component_ref): Ditto.
3587
3588Thu Mar 16 20:28:16 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3589
3590 * decl.c (struct saved_scope): Add members base_init_list and
3591 member_init_list.
3592 (push_to_top_level): Save current_base_init_list and
3593 current_member_init_list to them.
3594 (pop_from_top_level): Put it back.
3595
3596Thu Mar 16 19:21:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3597
3598 * pt.c (instantiate_template): Call assemble_external.
3599
3600Thu Mar 16 18:07:54 1995 Brendan Kehoe (brendan@phydeaux.cygnus.com)
3601
3602 * class.c: Include rtl.h, to get NULL_RTX.
3603 (finish_struct): Also zero out DECL_SAVED_INSNS, to avoid problems
3604 on hosts with different sizes for each part of the union.
3605 * tree.c: Also include rtl.h.
3606 (layout_basetypes): Same change for DECL_SAVED_INSNS.
3607
3608Thu Mar 16 13:57:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3609
3610 * pt.c (unify): Fix array domain unification for 64-bit targets.
3611
3612 * decl2.c (finish_file): Push bizarre type decl before walking the
3613 vtables the first time.
3614 (walk_vtables): OK, don't set prev to vars if the vardecl_fn messed
3615 with TREE_CHAIN (prev).
3616
3617 * init.c (emit_base_init): Use convert_pointer_to_real instead of
3618 convert_pointer_to when converting to a direct base.
3619
3620Wed Mar 15 20:26:29 1995 Mike Stump <mrs@cygnus.com>
3621
3622 * pt.c (type_unification): Handle transitive unification better.
3623
3624Wed Mar 15 13:56:16 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3625
3626 * decl2.c (walk_vtables): Always set prev to vars.
3627 (mark_vtable_entries): Call assemble_external on the vtable entries.
3628
3629 * class.c (finish_struct): Set the vtable's size to NULL_TREE before
f30432d7 3630 calling layout_decl, so that it gets updated properly.
28cbf42c
MS
3631
3632 Finally re-enable dynamic synthesis. This time it works.
3633 * method.c (synthesize_method): Pass decl_function_context (fndecl)
3634 to {push,pop}_cp_function_context.
3635 * decl.c (push_cp_function_context): Now takes a tree argument.
3636 (pop_cp_function_context): Ditto.
3637 * call.c (build_method_call): Enable synthesis.
3638 * lex.c (cons_up_default_function): Ditto.
3639
3640Tue Mar 14 19:14:19 1995 Doug Evans <dje@chestnut.cygnus.com>
3641
3642 * parse.y (setattrs): Chain onto prefix_attributes rather than
3643 setting it.
3644
3645Wed Mar 15 13:00:00 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3646
3647 * decl.c (pushdecl): Check if the type of the VAR_DECL is an
3648 error_mark_node before trying to read TYPE_LANG_SPECIFIC.
3649
b7484fbe
MS
3650Mon Mar 13 21:00:28 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3651
3652 * decl.c (grokdeclarator, case ARRAY_REF): Wrap the exp with fold,
3653 and convert the size and integer_one_node to the index type.
3654
3655Mon Mar 13 08:01:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3656
3657 * typeck.c (get_member_function_from_ptrfunc): Save the instance
3658 argument, and tack it onto the front of the COND_EXPR to make the
3659 semantics come out right. Grab the instance argument from
3660 '*instance_ptrptr', rather than having it passed in separately.
3661
3662 * various: Change various consed-up comparison operations to have
3663 boolean type. Remove the instance argument in calls to
3664 get_member_function_from_ptrfunc.
3665
3666 * error.c (dump_expr): Dump true and false as "true" and "false".
3667
3668 * decl2.c (finish_file): Also set DECL_STATIC_FUNCTION_P on the
3669 global init function.
3670
3671 * decl.c (finish_function): Only set DECL_EXTERNAL here if the
3672 inline function is public.
3673
3674Sat Mar 11 00:58:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3675
3676 * init.c (is_friend): Be more careful about checking
3677 DECL_CLASS_CONTEXT on non-member functions.
3678
3679 * decl2.c (finish_vtable_vardecl): Don't bother calling
3680 assemble_external here.
3681 (prune_vtable_vardecl): New function that just splices out the
3682 vtable decl from the top-level decls.
3683 (import_export_inline): Unset DECL_EXTERNAL at first.
3684 (finish_file): Don't bother calling assemble_external here. Do
3685 splice out all of the vtables.
3686
3687Fri Mar 10 14:42:29 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3688
3689 * decl.c (finish_function): If we're not emitting the function yet,
3690 call assemble_external for it.
3691
3692 * decl2.c (finish_prevtable_vardecl): Don't call mark_vtable_entries
3693 here.
3694 (finish_vtable_vardecl): Don't do the linkage deduction thing here.
3695 Also don't splice out the current vtable if it is unused.
3696 (finish_file): Move the second walk_vtables and the synthesis check
3697 inside the 'reconsider' loop. Move thunk emission after the
3698 'reconsider' loop.
3699
3700Thu Mar 9 16:28:16 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3701
3702 * pt.c (tsubst): Don't bother calling cp_build_type_variant, since it
3703 was passing bogus values for readonly and volatile from the original
3704 template decl, not the resultant type of the tsubst call.
3705
3706 * class.c (duplicate_tag_error): Use cp_error_at to point out the
3707 previous definition of the tag.
3708
3709Thu Mar 9 10:46:17 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3710
3711 * decl.c (start_function): Clear base_init_insns and protect_list.
3712 (struct cp_function): Add base_init_insns field.
3713 (push_cp_function_context): Also save base_init_insns.
3714 (pop_cp_function_context): Also restore base_init_insns.
3715
3716Wed Mar 8 13:31:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3717
3718 * init.c (member_init_ok_or_else): Check for initializing a static
3719 member here.
3720 (emit_base_init): Instead of here.
3721
3722Tue Mar 7 16:03:26 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3723
3724 * call.c (build_method_call): Disable synthesis as needed.
3725 * lex.c (cons_up_default_function): Ditto.
3726
f6abb50a
BK
3727Tue Mar 7 10:14:29 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3728
3729 * parse.y: New rules to allow attributes in a prefix position.
3730 (prefix_attributes): New variable. Pass it into cplus_decl_attributes.
3731 (setattr): New rule.
3732 (reserved_declspecs, declmods): Catch attributes here.
3733 * decl2.c (cplus_decl_attributes): Add PREFIX_ATTRIBUTES argument.
3734 * decl.c (duplicate_decls): Pass DECL_MACHINE_ATTRIBUTES to
3735 descendent typedef.
3736 (grokdeclarator): Added code to support machine attributes.
3737 * Makefile.in (stamp-parse): Expect 5 shift/reduce failures.
3738
b7484fbe
MS
3739Mon Mar 6 15:07:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3740
3741 * call.c (build_method_call): Don't synthesize methods outside of a
3742 function.
3743
3744 Make base initialization more re-entrant so that synthesis on the
3745 fly will work (and, eventually, template instantation on the fly).
3746 * init.c (sort_member_init): Don't bother with members that can't be
3747 initialized. Reorganize a bit. Don't initialize base members here.
3748 (sort_base_init): New function, like sort_member_init, but for base
3749 classes. Steals some code from emit_base_init.
3750 (emit_base_init): Simplify. Call sort_{member,base}_init before
3751 doing any initialization, so we don't have to save
3752 current_{member,base}_init_list in push_cp_function_context.
3753 (expand_aggr_vbase_init_1): Adjust for sort_base_init.
3754 (expand_aggr_vbase_init): Simplify.
3755 * decl.c (struct cp_function): Add protect_list field.
3756 (push_cp_function_context): Also save protect_list.
3757 (pop_cp_function_context): Also restore protect_list.
3758 * call.c (build_method_call): Enable synthesis at point of call.
3759 * lex.c (cons_up_default_function): Ditto.
3760
3761 * parse.y: Turn -ansi checks back into -pedantic checks.
3762
3763 * init.c (build_new): Fix -fcheck-new for array new.
3764
3765Sat Mar 4 15:55:42 1995 Fergus Henderson <fjh@cs.mu.oz.au>
3766
3767 * typeck.c (build_compound_expr): warn if left-hand operand of
3768 comma expression has no side-effects.
3769
3770Fri Mar 3 15:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3771
3772 * parse.y (primary): Change 'object qualified_id *' rules to 'object
3773 overqualified_id *'.
3774
3775Fri Mar 3 12:48:17 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3776
3777 * parse.y (unary_expr): Catch doing sizeof an overloaded function.
3778 Make the error look the same as the one we issue in c_sizeof.
3779
3780 * typeck.c (build_binary_op_nodefault): Give an error for trying
3781 to compare a pointer-to-member to `void *'.
3782
3783Fri Mar 3 11:28:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3784
3785 * typeck.c (build_unary_op): Handle bool increment with smoke and
3786 mirrors here, rather than in expand_increment where it belongs,
3787 because Kenner doesn't agree with me.
3788
3789Fri Mar 3 00:08:10 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3790
3791 * decl.c (grokparms): Catch a PARM_DECL being used for a default
3792 argument as well.
3793
3794Thu Mar 2 20:05:54 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3795
3796 * init.c (build_new): Don't allow new on a function type.
3797
3798 * parse.y (primary): Avoid a crash when seeing if the arg is of
3799 the same type as that given for the typespec in an explicit dtor call.
3800
3801Thu Mar 2 00:49:38 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3802
3803 * decl.c (finish_function): Change test for calling
3804 mark_inline_for_output.
3805
3806Wed Mar 1 11:23:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3807
3808 * typeck.c (build_modify_expr): Complain if
3809 build_default_binary_type_conversion fails.
3810
3811 * init.c (expand_default_init): Handle arguments of unknown type
3812 properly.
3813
3814 * cvt.c (build_expr_type_conversion): Only complain about ambiguity
3815 if 'complain'.
3816 * various: Pass 'complain'.
3817
3818 * typeck.c (comptypes): Be more picky about comparing UPTs.
3819
3820Wed Mar 1 11:03:41 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3821
3822 * decl.c (grokdeclarator): If declarator is null, say that the
3823 type used has an incomplete type.
3824
3825Wed Mar 1 10:06:20 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3826
3827 * pt.c (instantiate_template): Copy the template arguments to the
3828 permanent_obstack. Also use simple_cst_equal to compare them when
3829 looking for a previous instantiation.
3830
3831 * tree.c (make_deep_copy): Support copying INTEGER_TYPEs (assuming
3832 they are array domain types).
3833
3834Tue Feb 28 23:24:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3835
3836 * cp-tree.h: Define WANT_* constants for passing to
3837 build_expr_type_conversion.
3838 * cvt.c (build_expr_type_conversion): New function to build
3839 conversion to one of a group of suitable types.
3840 (build_default_binary_type_conversion): Use it.
3841 * decl2.c (grok_array_decl): Ditto.
3842 * typeck.c (build_unary_op): Ditto.
3843 (build_array_ref): Tidy up a bit.
3844 (build_binary_op): Ditto.
3845
3846Tue Feb 28 19:57:31 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3847
3848 * decl.c (grokdeclarator): Don't allow decl of an argument as `void'.
3849
3850Tue Feb 28 17:23:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3851
3852 * parse.y (typed_declspecs1): Add 'typespec reserved_typespecquals
3853 reserved_declspecs' rule.
3854
3855 * parse.y (expr_or_declarator): Remove notype_qualified_id rule.
3856 (direct_notype_declarator): Ditto.
3857 (complex_direct_notype_declarator): Add notype_qualified_id rule.
3858
3859 * lex.c (real_yylex): Handle :> digraph properly.
3860
3861Tue Feb 28 12:26:29 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3862
3863 * decl.c (grokdeclarator): Check if it's a friend, not if it's
3864 non-virtual, that's being initialized. Move the check up to
3865 before FRIENDP would get cleared. Catch an unnamed var/field
3866 being declared void. Say just `field' instead of `structure field'
3867 in the error message. Only go for the operator name if DECLARATOR
3868 is non-null.
3869
3870Tue Feb 28 00:08:01 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3871
3872 * decl.c (start_function): Complain about abstract return type.
3873 (grokdeclarator): Complain about declaring constructors and
3874 destructors to be const or volatile. Complain about declaring
3875 destructors to be static.
3876
3877 * pt.c (uses_template_parms): Handle pmfs.
3878
3879 * decl.c (grokdeclarator): Don't call variable_size for array bounds
3880 that only depend on template constant parameters.
3881
3882Mon Feb 27 15:38:16 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3883
3884 * error.c (dump_decl): Only look to see if it's a vtable if we
3885 actually have a name to check out.
3886
3887Mon Feb 27 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3888
3889 * cvt.c (convert_to_aggr): Lose misleading shortcut.
3890
3891Sun Feb 26 17:27:32 1995 Doug Evans <dje@canuck.cygnus.com>
3892
3893 * decl.c (set_nested_typename): Always set DECL_IGNORED_P,
3894 not just for dwarf.
3895
3896Sun Feb 26 00:10:18 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3897
3898 * decl.c (grokdeclarator): Don't allow a static member to be
3899 declared `register'.
3900
3901 * init.c (make_friend_class): Move up to a pedwarn for the warning
3902 about a class declaring friends with itself.
3903
3904 * decl.c (grokdeclarator): You can't do `volatile friend class foo'
3905 or `inline friend class foo'. Only try to make a friend out of
3906 TYPE if we didn't already reset it to integer_type_node.
3907
3908Sat Feb 25 22:32:03 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3909
3910 * decl.c (grokdeclarator): Don't allow initialization of a
3911 non-virtual function.
3912
3913 * decl.c (start_function): Do a pedwarn if we're changing `main'
3914 to have an int return type.
3915
3916Sat Feb 25 00:02:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3917
3918 * typeck.c (build_modify_expr): Handle simple assignment from
3919 TARGET_EXPRs by building up an RTL_EXPR to force expansion. Whew.
3920
3921Fri Feb 24 18:27:14 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3922
3923 * decl.c (grokdeclarator): Also don't allow virtual outside of a
3924 class decl for a scope method definition performed at global binding.
3925
3926 * init.c (build_offset_ref): Don't allow creation of an OFFSET_REF
3927 of a bitfield.
3928
3929 * decl.c (grokdeclarator): Don't allow a const to be declared mutable.
3930
3931 * typeck.c (build_binary_op): Return an error_mark_node if either
3932 one of the args turned into an error_mark_node when we tried to
3933 use default_conversion.
3934
3935 * typeck.c (build_unary_op): Forbid using postfix -- on a bool.
3936
3937 * decl.c (grokdeclarator): Allow `signed' and `unsigned' to be
3938 used on `__wchar_t'.
3939
3940Fri Feb 24 13:59:53 1995 Mike Stump <mrs@cygnus.com>
3941
3942 * except.c (end_protect_partials): Do it the right way.
3943
3944Wed Feb 22 15:42:56 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3945
3946 * typeck.c (build_binary_op_nodefault): Upgrade warning about
3947 comparing distinct pointer types to pedwarn.
3948
3949 * typeck2.c (digest_init): Cope with extra braces.
3950
3951 * typeck.c (build_binary_op_nodefault): Use tree_int_cst_sgn instead
3952 of INT_CST_LT (..., interger_zero_node).
3953
3954Wed Feb 22 14:45:52 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3955
3956 * except.c [!TRY_NEW_EH] (end_protect_partials): Define dummy
3957 function for systems that don't have EH.
3958
3959Tue Feb 21 19:18:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3960
3961 * call.c (can_convert_arg): Like can_convert, but takes an arg as
3962 well.
3963
3964 * pt.c (type_unification): Allow implicit conversions for parameters
3965 that do not depend on template parameters.
3966
1b65f56d
DR
3967Tue Feb 21 18:43:48 1995 Douglas Rupp (drupp@cs.washington.edu)
3968
3969 * Make-lang.in, config-lang.in: ($exeext): New macro.
3970 * Make-lang.in: Try a "cp" if "ln" fails.
3971 * cp-tree.h (decl_attributes): Added argument.
3972 * decl2.c (cplus_decl_attribute): Add arg to decl_attributes.
3973 * cp/g++.c: Added #ifdefs for sys/file.h and process.h for NT.
3974 Modified spawnvp to have to correct number of arguments for OS/2, NT.
3975
b7484fbe
MS
3976Tue Feb 21 18:36:55 1995 Mike Stump <mrs@cygnus.com>
3977
3978 * decl.c (finish_function): Add calls to end_protect_partials to end
3979 the exception region that protects constructors so that partially
3980 constructed objects can be partially destructed when the constructor
3981 throws an exception.
3982 * init.c (perform_member_init, sort_member_init, emit_base_init):
3983 Added support for partially constructed objects.
3984 * init.c (build_partial_cleanup_for): New routine to do partial
3985 cleanups of a base class.
3986 * decl2.c (finish_file): Move the emitting of the exception table
3987 down, after we emit all code that might have exception regions in
3988 them.
3989 * except.c (end_protect_partials, might_have_exceptions_p): New
3990 routines.
3991 (emit_exception_table): Always output table if called.
3992 * cp-tree.h (protect_list, end_protect_partials,
3993 might_have_exceptions_p, emit_exception_table): Added.
3994
3995Tue Feb 21 16:05:59 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3996
3997 * gc.c (build_typeid): Pass a NULL_TREE, not the bogus, unused
3998 address of a local variable.
3999 * class.c (build_vfn_ref): Only try to build the PLUS_EXPR if we
4000 were given a non-null PTR_TO_INSTPTR.
4001
4002Tue Feb 21 01:53:18 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4003
4004 * decl.c (duplicate_decls): Always lay out the merged decl.
4005
4006 * decl2.c (finish_vtable_vardecl): Don't do vtable hack on templates.
4007 (finish_prevtable_vardecl): Ditto.
59be85d7 4008
b7484fbe
MS
4009 * method.c (synthesize_method): Set interface_{unknown,only}
4010 according to the settings for our class, not the file where it comes
4011 from.
59be85d7 4012
b7484fbe 4013Sat Feb 18 12:26:48 1995 Mike Stump <mrs@cygnus.com>
3a887df4 4014
b7484fbe 4015 * except.c: Handle systems that define __i386__ but not __i386.
3a887df4 4016
e3417fcd
MS
4017Fri Feb 17 15:31:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4018
4019 * decl2.c (reparse_decl_as_expr): Support being called without a
4020 type argument.
4021
4022 * parse.y (primary): Add '(' expr_or_declarator ')'. Adds 4 r/r
4023 conflicts. Sigh.
4024
4025Fri Feb 17 12:02:06 1995 Mike Stump <mrs@cygnus.com>
4026
4027 * parse.y (template_def, fndef, fn.def1, return_init, condition,
4028 initdcl0, initdcl, notype_initdcl0, nomods_initdcl0,
4029 component_decl_1, after_type_component_declarator0,
4030 notype_component_declarator0, after_type_component_declarator,
4031 notype_component_declarator, after_type_component_declarator,
4032 full_parm, maybe_raises, exception_specification_opt): Fix up,
4033 include exception_specification_opt maybeasm maybe_attribute and
4034 maybe_init if missing. Rename maybe_raises to
4035 exception_specification_opt to match draft wording. Use maybe_init
4036 to simplify rules.
4037
4038Fri Feb 17 01:54:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4039
4040 * init.c (build_new): Set TREE_NO_UNUSED_WARNING on COMPOUND_EXPRs
4041 built for news of scalar types.
4042
4043Thu Feb 16 17:48:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4044
4045 * typeck.c (build_binary_op_nodefault): Update code for warning
4046 about signed/unsigned comparisons from C frontend. Realize that the
4047 code in the C frontend is, if anything, even more bogus. Fix it.
4048 (build_binary_op): Undo default_conversion if it wasn't useful.
4049
4050 * typeck.c (build_unary_op, ADDR_EXPR): Lose bogus special case for
4051 PRE*CREMENT_EXPR.
4052
4053 * decl2.c (import_export_vtable): Don't try the vtable hack
4054 if the class doesn't have any real non-inline virtual functions.
4055 (finish_vtable_vardecl): Don't bother trying to find a non-inline
4056 virtual function in a non-polymorphic class.
4057 (finish_prevtable_vardecl): Ditto.
4058
4059 * decl2.c (import_export_vtable): Use and set DECL_INTERFACE_KNOWN.
4060
4061 * cp-tree.h (DECL_INTERFACE_KNOWN): Use DECL_LANG_FLAG_5.
4062
4063 * init.c (expand_virtual_init): Always call assemble_external.
4064
4065 * class.c (build_vfn_ref): Always call assemble_external.
4066 (build_vtable): Always call import_export_vtable.
4067 (prepare_fresh_vtable): Ditto.
4068 (add_virtual_function): Don't bother setting TREE_ADDRESSABLE.
4069
8ccc31eb
MS
4070Thu Feb 16 03:28:49 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4071
4072 * class.c (finish_struct): Use TYPE_{MIN,MAX}_VALUE to determine
4073 whether an enumerated type fits in a bitfield.
4074
4075Wed Feb 15 15:38:12 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4076
4077 * class.c (grow_method): Update method_vec after growing the class
f30432d7 4078 obstack.
8ccc31eb
MS
4079
4080Wed Feb 15 13:42:59 1995 Mike Stump <mrs@cygnus.com>
4081
4082 * parse.y (handler_seq): Push a level for the catch parameters.
4083
4084Wed Feb 15 12:42:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4085
4086 * init.c (emit_base_init): Update BINFO_INHERITANCE_CHAIN on my
4087 bases, in case they've been clobbered.
4088
4089Wed Feb 15 12:07:29 1995 Mike Stump <mrs@cygnus.com>
4090
4091 * class.c (finish_base_struct): Set up BINFO_INHERITANCE_CHAIN here,
4092 so that one day it will always be valid.
4093 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Ditto.
4094
4095 * cp-tree.h (copy_binfo): Removed, unused.
4096 * tree.c (copy_binfo): Ditto.
4097
4098Wed Feb 15 00:05:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4099
4100 * init.c (build_new): Save the allocation before calling
4101 expand_vec_init on it.
4102
4103 * decl.c (finish_enum): The TYPE_PRECISION of the enum type mush
4104 match the TYPE_PRECISION of the underlying type for constant folding
4105 to work.
4106
4107Tue Feb 14 15:31:25 1995 Mike Stump <mrs@cygnus.com>
4108
4109 * except.c (push_eh_entry, expand_start_all_catch,
4110 expand_leftover_cleanups, expand_end_catch_block): Keep track of
4111 the context in which the exception region occurs.
4112 (build_exception_table): If the region was not output, don't output
4113 the entry in the eh table for it.
4114
4115Tue Feb 14 02:15:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4116
4117 * init.c (expand_default_init): Only use a previous constructor call
4118 if it's a call to our constructor. Does the word "Duh" mean
4119 anything to you?
4120
4121 * decl.c (grokparms): Fine, just don't call
4122 convert_for_initialization at all. OK? Happy now?
4123
4124Mon Feb 13 02:23:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4125
4126 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Make sure that the class
4127 method vector has a second element before returning it.
4128
4129 * decl.c (grokparms): Don't strip REFERENCE_TYPE before calling
4130 convert_for_initialization.
4131
4132Sun Feb 12 03:57:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4133
4134 * typeck.c (build_modify_expr): Compare function name to
4135 constructor_name (current_class_type) instead of current_class_name.
4136
4137 * decl.c (grokparms): Don't do anything with the return value of
4138 convert_for_initialization.
4139
4140 * error.c (dump_decl): Also dump_readonly_or_volatile on the decl.
4141
4142 * decl.c (duplicate_decls): Tweak error message.
4143
4144 * typeck.c (build_const_cast): Implement checking.
4145 (build_reinterpret_cast): Implement some checking.
4146
4147 * cp-tree.h (CONV_FORCE_TEMP): Require a new temporary when
4148 converting to the same aggregate type.
4149 (CONV_STATIC_CAST): Include it.
4150 (CONV_C_CAST): Ditto.
4151 * cvt.c (convert_force): Use CONV_C_CAST instead of CONV_OLD_CONVERT.
4152 (cp_convert): Only force a new temporary if CONV_FORCE_TEMP.
4153
4154Fri Feb 10 16:18:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4155
4156 * typeck.c (build_c_cast): Use non_lvalue to tack something on
f30432d7 4157 where necessary.
8ccc31eb
MS
4158
4159 * decl.c (auto_function): Now a function.
4160 * except.c (init_exception_processing): terminate, unexpected,
4161 set_terminate, and set_unexpected have C++ linkage.
4162
4163 * typeck.c (build_unary_op, TRUTH_NOT_EXPR): Use convert instead of
4164 truthvalue_conversion for converting to bool, as it handles
4165 user-defined conversions properly.
4166 (condition_conversion): Ditto.
4167
4168 * except.c (expand_throw): Don't call convert_to_reference.
4169 Pass the correct parameters to build_new.
4170
4171 * method.c (do_build_assign_ref): Don't use access control when
4172 converting to a base reference here.
4173 (do_build_copy_constructor): Or here.
4174
4175 * init.c (build_new): Unset TREE_READONLY on the dereferenced
4176 pointer before assigning to it.
4177
4178 * decl.c (maybe_build_cleanup): Don't bother stripping const here.
4179
4180 * decl2.c (delete_sanity): You can now delete pointer to const.
4181
4182Fri Feb 10 13:28:38 1995 Jason Merrill <jason@python.cygnus.com>
4183
4184 * decl.c (finish_function): Don't rely on actual parameters being
4185 evaluated left-to-right.
4186 * except.c (expand_end_catch_block): Ditto.
4187
4188Fri Feb 10 00:52:04 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4189
4190 * tree.c (real_lvalue_p): Like lvalue_p, but class temps aren't
4191 considered lvalues.
4192 * cvt.c (convert_to_reference): Use real_lvalue_p instead of
f30432d7 4193 lvalue_p.
8ccc31eb
MS
4194
4195 * cvt.c (build_type_conversion_1): Don't call convert on aggregate
4196 types.
4197 (convert_to_reference): Fix erroneous text substitution.
4198
4199 * typeck2.c (initializer_constant_valid_p): Update from C frontend.
4200 Add new argument to all callers.
4201
4202 * typeck.c (convert_arguments): Check for error_mark_node before
4203 trying to do anything with the actual parameter.
4204
4205 * typeck.c (condition_conversion): Build up a CLEANUP_POINT_EXPR and
4206 fold it.
4207 (bool_truthvalue_conversion): Remove. Fix all callers to call
4208 truthvalue_conversion instead.
4209 (various): Fold CLEANUP_POINT_EXPRs.
4210
4211 * parse.y (conditions): Call condition_conversion rather than
4212 building up a CLEANUP_POINT_EXPR.
4213
4214 * pt.c (end_template_decl): Don't warn_if_unknown_interface here
4215 under -falt-external-templates.
4216
4217Thu Feb 9 05:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4218
4219 * init.c (build_new): Complain about new of const type without
4220 initializer. Other cleanup.
4221
4222 * call.c (compute_conversion_costs): Don't call
4223 build_type_conversion with a reference type; convert to the target
4224 type and check its lvaluetude.
4225 * cvt.c (convert_to_reference): Ditto.
4226
4227 * cvt.c (build_type_conversion_1): There will never be any need to
4228 dereference references here now.
4229
4230Thu Feb 9 00:37:47 1995 Mike Stump <mrs@cygnus.com>
4231
4232 * except.c (expand_builtin_throw): Make sure we only `use' the
4233 value of return_val_rtx.
4234
4235Wed Feb 8 15:45:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4236
4237 * parse.y (structsp): Don't complain about declaring a type being
4238 defined to be a friend.
4239
4240 * decl2.c (warn_if_unknown_interface): Note the template in question
4241 and the point of instantiation, for -falt-external-templates.
4242 * lex.c (reinit_parse_for_method): Pass the decl to
4243 warn_if_unknown_interface.
4244 * pt.c (instantiate_template): Ditto.
4245 (end_template_decl): Ditto.
4246
4247 * decl.c (set_nested_typename): Set IDENTIFIER_TYPE_VALUE on the
4248 nested name again, to make local classes work a bit better.
4249
4250 * typeck.c (build_function_call_real): Dereference reference after
4251 checking for incomplete type.
4252
4253 * init.c (build_new): Accept new of const and volatile types.
4254
4255Wed Feb 8 14:04:16 1995 Jason Merrill <jason@deneb.cygnus.com>
4256
4257 * decl.c (grokdeclarator): Fix error message.
4258
4259Wed Feb 8 03:16:15 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4260
4261 * typeck.c (convert_for_initialization): Do bash arrays when
4262 converting to a reference to non-array.
4263
4264Tue Feb 7 15:50:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4265
4266 * cvt.c (cp_convert): Don't call convert_to_reference, or
4267 automatically dereference references. Do pass reference conversions
4268 to cp_convert_to_pointer.
4269 (cp_convert_to_pointer): Support references.
4270
4271 * call.c (build_method_call): Don't build up a reference to the
4272 parameter here; let build_overload_call handle that.
4273
4274 * typeck.c (build_c_cast): Call convert_to_reference directly if
4275 converting to a reference type.
4276 * method.c (do_build_copy_constructor): Ditto.
4277 * method.c (do_build_copy_constructor): Ditto.
4278 (do_build_assign_ref): Ditto.
4279
4280 * call.c (build_method_call): Dereference a returned reference.
4281 * typeck.c (build_function_call_real): Ditto.
4282
4283 * decl.c (xref_basetypes): Check for unions with basetypes here.
4284 (xref_tag): Instead of here.
4285
4286 * pt.c (process_template_parm): Template type parm decls are
4287 artificial.
4288
4289Mon Feb 6 04:32:09 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4290
4291 * parse.y (typed_declspecs): Add missing semicolon.
4292 (do_xref_defn): Resurrect.
4293 (named_class_head_sans_basetype): Move template specialization
4294 definition cases to named_class_head_sans_basetype_defn.
4295
4296 * decl2.c (grokfield): Call pushdecl_class_level after setting the
4297 TYPE_NAME, not before.
4298
4299Sun Feb 5 02:50:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4300
4301 * call.c (convert_harshness): Don't call sorry here. Don't allow
4302 conversions between function pointer types if pedantic.
4303
4304 * pt.c (overload_template_name): Pass globalize=1 to xref_tag.
4305
4306 * lex.c (cons_up_default_function): Use the full name for the return
4307 type of op=.
4308
4309 * decl.c (set_nested_typename): Don't worry about anonymous types,
4310 as they already have a unique name.
4311 (pushdecl): Remove redundant set_nested_typename
4312 (xref_tag): Split out base handling into xref_basetypes.
4313
4314 * cp-tree.h (TYPE_INCOMPLETE): New macro; TEMPLATE_TYPE_PARMs are
4315 not considered incomplete even though their definition is unknown.
4316
4317 * decl.c (xref_defn_tag): Lose.
4318 (xref_tag): xref_next_defn = ! globalize.
4319 (pushdecl): Don't set DECL_NESTED_TYPENAME on artificial decls. The
4320 ones that should have it set will have it set by pushtag.
4321 (pushdecl_class_level): Ditto.
4322 (pushtag): Tidy up a bit.
4323 (set_nested_typename): Push a decl for the nested typename from
4324 here, rather than from xref_defn_tag.
4325
4326 * parse.y (do_xref): Lose.
4327 (named_class_head): If we see 'class foo:' we know it's a
4328 definition, so don't worry about base lists for non-definitions.
4329
4330 * pt.c (push_template_decls): Template parm decls are artificial.
4331
4332 * decl.c (duplicate_decls): Restore check for qualifier
4333 disagreement for non-functions.
4334 (decls_match): Remove check for qualifier disagreement.
4335
4336Fri Feb 3 14:58:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4337
4338 * decl.c (grok_reference_init): Convert initializer from
f30432d7 4339 reference.
8ccc31eb
MS
4340 * typeck.c (convert_for_initialization): Ditto.
4341
4342 * decl.c (duplicate_decls): Propagate DECL_NESTED_TYPENAME.
4343
4344 * cvt.c (cp_convert): Don't convert to the same class type by just
4345 tacking on a NOP_EXPR.
4346 (convert_to_reference): Use comp_target_types instead of comptypes
4347 so that we don't allow conversions two levels down.
4348
4349Thu Feb 2 15:07:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4350
4351 * class.c (build_vbase_path): Bash types to make the backend happy.
4352 * cvt.c (build_up_reference): Bash the types bashed by
4353 build_vbase_path to be reference types instead of pointer types.
4354 (convert_to_reference): Ditto.
4355
4356 * typeck.c (build_c_cast): Don't strip NOPs if we're converting to a
4357 reference type.
4358
4359 * parse.y (structsp): Put back error for 'struct B: public A;'.
4360
4361Wed Feb 1 23:02:06 1995 Mike Stump <mrs@cygnus.com>
4362
4363 * except.c: Add support for mips systems that don't define __mips
4364 but do define mips, like Ultrix.
4365
4366Wed Feb 1 22:39:07 1995 Mike Stump <mrs@cygnus.com>
4367
4368 * except.c: Add support for exception handling on the Alpha.
4369
1038f4f9
MS
4370Wed Feb 1 10:12:14 1995 Mike Stump <mrs@cygnus.com>
4371
4372 * decl2.c (finish_file): Fix bug in Jan 31st change.
4373
4374Tue Jan 31 16:59:15 1995 Gerald Baumgartner (gb@lorenzo.cs.purdue.edu)
4375
4376 * sig.c (build_signature_pointer_or_reference_type): Don't set
4377 IS_AGGR_TYPE for signature pointers/reference so expand_default_init
4378 doesn't expect to find a copy constructor.
4379 * call.c (build_method_call): Treat signature pointers/reference
4380 as if IS_AGGR_TYPE were set.
4381
d18c083e
MS
4382Tue Jan 31 13:28:56 1995 Mike Stump <mrs@cygnus.com>
4383
4384 * gc.c (get_typeid): Pawn off error messages to build_t_desc.
4385 (build_t_desc): Inform the user here if they try and build
4386 with -frtti and don't include <typeinfo.h>.
4387
4388 * decl2.c (finish_prevtable_vardecl): Support rescanning.
4389 (finish_file): Move finish_prevtable_vardecl up to before the global
4390 initializers are done as tdecls are initialized in the global
4391 initializer. Also Pick up any new tdecls or vtables needed by
4392 synthesized methods.
4393
4394 * class.c (finish_struct): Simplify. We have to do rtti scanning at
4395 end, so we might as well do all of it there.
4396
4397Tue Jan 31 05:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4398
4399 * call.c (build_method_call): Fix -fthis-is-variable for 32-bit
4400 targets, too.
4401
4402Tue Jan 31 00:11:04 1995 Mike Stump <mrs@cygnus.com>
4403
4404 * decl2.c (finish_prevtable_vardecl): New routine, mostly split from
4405 finish_vtable_vardecl. It has the first half functionality from
4406 that routine.
4407 * decl2.c (finish_vtable_vardecl): Update to not include stuff not
4408 in finish_prevtable_vardecl.
4409 * decl2.c (finish_file): Call finish_prevtable_vardecl.
4410 * gc.c (build_generic_desc): Allow it to be called when not at the
4411 global binding layer, but behave as if we were.
4412 (build_t_desc): Rearrange a bit so that it really works and is
4413 easier to follow.
4414 * class.c (finish_struct): Don't decide on tdecls here, as we have
4415 to wait until the end of the file in general to decide whether or
4416 not they come out.
4417
4418Mon Jan 30 01:00:40 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4419
4420 * init.c (build_delete): Check access to operator delete before
4421 calling the destructor.
4422 * method.c (build_opfncall, DELETE_EXPR): build_method is allowed to
4423 return error_mark_node.
4424 * call.c (build_method_call): Use the one-argument op delete even if
4425 it's an error.
4426
4427 * init.c (build_new): Fix -fthis-is-variable support.
4428 * call.c (build_method_call): Ditto.
4429
4430 * call.c (convert_harshness): Make conversion from a pointer to bool
4431 worse than conversion to another pointer.
4432
4433Sat Jan 28 16:46:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4434
4435 * init.c (build_new): Check new return value if -fcheck-new.
4436
4437 * lex.c (check_newline): Clear end_of_file when we're done, too.
4438
4439Sat Jan 28 10:38:39 1995 Mike Stump <mrs@cygnus.com>
4440
4441 * decl2.c (finish_vtable_vardecl): Make rtti TD tables follow
4442 vtables whereever they go.
4443
4444 * gc.c (build_t_desc): Remove old way of setting it up, as it wasn't
4445 right.
4446
4447Sat Jan 28 09:10:44 1995 Mike Stump <mrs@cygnus.com>
4448
4449 * decl2.c (finish_vtable_vardecl): Now set the
4450 interface/implementation of vtables on the first virtual function,
4451 if one exists, otherwise we use the old method. This is a major win
4452 in terms of cutting down the size of objects and executables in
4453 terms of text space and data space. Now most of the savings that
4454 #pragma interface/implementation gives is automatic in a fair number
4455 of cases.
4456
4457Sat Jan 28 04:57:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4458
4459 * decl.c (grokdeclarator): Discard the template parameters in a
4460 template constructor declaration so that the function is always
4461 named constructor_name (ctype).
4462
4463 * lex.c (check_newline): Use ungetc to put back the character before
4464 calling HANDLE_PRAGMA.
4465
4466Fri Jan 27 17:23:47 1995 Mike Stump <mrs@cygnus.com>
4467
4468 * decl2.c (check_classfn): If the cname is T<int> and fn_name is T,
4469 make sure we still match them.
4470
4471Fri Jan 27 16:32:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4472
4473 * parse.y: Add END_OF_LINE token.
4474
4475 * lex.c (check_newline): Set linemode when we see a # directive, and
4476 unset it when we're done. Turn all 'return's into 'goto skipline'.
4477 Fix all uses of '\n', since we won't see it anymore. Put back the
4478 character we read before checking for a sysv or target pragma.
4479 (real_yylex): If we see an EOF in linemode, return END_OF_LINE.
4480 (handle_sysv_pragma): Don't look at the input stream; quit when we
4481 see an END_OF_LINE token.
4482
4483 * input.c (getch): Return EOF if we're in line mode and at the end
4484 of a line.
4485 (put_back): Don't put back an EOF.
4486
4487Thu Jan 26 19:26:34 1995 Mike Stump <mrs@cygnus.com>
4488
4489 * except.c (expand_throw): Do the newing of the exception object
4490 before we load the type descriptor or the address so that we don't
4491 wipe any of the values out.
4492
4493Thu Jan 26 19:20:00 1995 Mike Stump <mrs@cygnus.com>
4494
4495 * except.c (init_exception_processing): Don't use r12 on the rs6000.
4496
4497Tue Jan 24 16:36:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4498
4499 * decl.c (grokparms): Don't try to build up a reference at this point.
4500
4501 * typeck2.c (build_functional_cast): Don't assume that a NOP_EXPR
4502 will suffice to convert from integer_zero_node.
4503
b7484fbe
MS
4504Wed Jan 25 15:02:09 1995 David S. Miller (davem@nadzieja.rutgers.edu)
4505
4506 * class.c (instantiate_type): Change error message text.
4507 * typeck2.c (store_init_value): Likewise.
4508
e1cd6e56
MS
4509Mon Jan 23 21:57:14 1995 Mike Stump <mrs@cygnus.com>
4510
4511 * pt.c (tsubst): When we copy a node, don't forget to copy
4512 TREE_CHAIN, we use it later.
4513
4514Mon Jan 23 03:33:47 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4515
4516 * typeck.c (convert_for_assignment): Initialize variable before use.
4517
4518Fri Jan 20 01:17:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4519
4520 * g++.c (main): Link with both libstdc++ and libg++ if called as
4521 something ending with "g++", otherwise only libstdc++. Move -lm to
4522 the end of the line.
4523
4524Thu Jan 19 15:43:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4525
4526 * call.c (build_method_call): Don't mess with 'this' before calling
f30432d7 4527 compute_conversion_costs.
e1cd6e56
MS
4528
4529Wed Jan 18 15:40:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4530
4531 * search.c (get_matching_virtual): Give line number for previous
f30432d7 4532 declaration.
e1cd6e56
MS
4533
4534 * call.c (convert_harshness): Handle conversions to references
4535 better.
4536
4537 * cvt.c (build_up_reference): OK, handle {MIN,MAX}_EXPR *properly*.
4538
4539Wed Jan 18 15:21:38 1995 Mike Stump <mrs@cygnus.com>
4540
4541 * class.c (instantiate_type): Use DECL_CHAIN to walk lists instead,
4542 as the TREE_CHAIN for methods will take us to the next differently
4543 named function, DECL_CHAIN won't.
4544
4545Wed Jan 18 14:26:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4546
4547 * tree.c (lvalue_p): Handle {MIN,MAX}_EXPR.
4548
4549 * decl2.c (lang_decode_option): -Wall implies -Wparentheses.
4550 warn_parentheses defaults to 0.
4551
4552 * decl.c (grokparms): Put back call to require_instantiated_type.
4553
4554Tue Jan 17 19:56:15 1995 Mike Stump <mrs@cygnus.com>
4555
4556 * except.c (exception_section): Use the data section on the rs6000.
4557 Change calling convention for named_section.
4558
4559Wed Jan 17 18:20:57 1994 Fergus Henderson <fjh@munta.cs.mu.oz.au>
4560
f30432d7
MS
4561 * cp-tree.h : Make if (x=0) warn with wall
4562 * parse.y : Make if (x=0) warn with wall
e1cd6e56 4563
255512c1
JM
4564Tue Jan 17 14:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4565
e1cd6e56
MS
4566 * decl.c (BOOL_TYPE_SIZE): BITS_PER_WORD if SLOW_BYTE_ACCESS,
4567 BITS_PER_UNIT otherwise.
4568
4569 * search.c (get_matching_virtual): Don't check the binfo if the
4570 types are the same.
4571
4572 * cvt.c (cp_convert): Just call truthvalue_conversion to convert to
f30432d7 4573 bool.
255512c1
JM
4574
4575Mon Jan 16 13:28:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4576
e1cd6e56
MS
4577 * various: Use boolean_type_node, boolean_true_node,
4578 boolean_false_node.
4579
4580 * search.c (get_matching_virtual): Allow covariant returns that
4581 don't require pointer adjustment.
4582
4583 * typeck.c (build_conditional_expr): Don't call default_conversion
4584 on ifexp.
4585
4586 * cvt.c (build_up_reference): Handle MIN_EXPR and MAX_EXPR.
4587
4588 * decl.c (grokdeclarator): Upgrade warning about &const to pedwarn.
4589
4590Sun Jan 15 22:17:32 1995 dcb@lovat.fmrco.COM (David Binderman)
4591
4592 * pt.c (do_function_instantiation): Free targs once we're done.
255512c1
JM
4593
4594Sun Jan 15 22:17:32 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4595
e1cd6e56
MS
4596 * decl.c (BOOL_TYPE_SIZE): Defaults to BITS_PER_WORD.
4597 (init_decl_processing): Use BOOL_TYPE_SIZE instead of CHAR_TYPE_SIZE
4598 for bool.
4599
4600Sat Jan 14 05:33:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4601
4602 * decl2.c (finish_file): We need to mess up if there are any
4603 variables in the list, not just if there is one with a constructor.
4604
4605Fri Jan 13 14:42:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4606
4607 * decl.c (duplicate_decls): Propagate DECL_STATIC_{CON,DE}STRUCTOR.
4608 (finish_function): Handle DECL_STATIC_{CON,DE}STRUCTOR.
4609 (finish_function): Trust rest_of_compilation.
4610
4611 * decl2.c (finish_file): Also call functions designated as static
4612 constructors/destructors.
4613
4614 * decl.c (grokdeclarator): Allow access decls of operator functions.
4615 (grokparms): Only do convert_for_initialization if the initializer
4616 has a type.
4617 (duplicate_decls): Put back push_obstacks_nochange call.
4618
4619 * lex.c (real_yylex): Downgrade complaint about the escape sequence
4620 being too large from pedwarn to warning.
4621
4622 * decl.c (grokdeclarator): Don't complain about long long in system
4623 headers.
4624
4625 * lex.c (real_yylex): Handle digraphs.
4626
4627Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4628
4629 * decl.c (init_decl_processing): -f{no-,}strict-prototype only
4630 affects C linkage declarations now.
4631
4632 * typeck.c (comp_target_types): Grok simple contravariant conversions.
4633 (common_type): t1 and t2 are interchangeable.
4634
4635 * various: Test return value of comp_target_types differently in
4636 different places; it now returns -1 for a contravariant conversion
4637 (which is fine in symmetric cases).
4638
4639 (common_type): Prefer long double to double even when
4640 they have the same precision.
4641
4642 * decl.c (grokparms): Call convert_for_initialization to check
4643 default arguments.
4644
4645 * init.c (build_new): void_type_node has a size (of 0).
4646
4647 * decl.c (decls_match): Also check for agreement of TREE_READONLY
4648 and TREE_THIS_VOLATILE.
4649 (push_class_level_binding): Properly handle shadowing of
4650 nested tags by fields.
4651
4652 * search.c (dfs_pushdecls): Ditto.
4653
4654 * decl2.c (finish_file): Don't second-guess self-initialization.
4655
4656 * cvt.c (convert_to_reference): Work with expr directly, rather than
4657 a copy.
4658
4659 * decl.c (push_overloaded_decl): Only shadow artificial TYPE_DECLs.
4660
4661 * init.c (add_friend): Downgrade duplicate friend message from
4662 pedwarn to warning.
4663
4664 * decl.c (duplicate_decls): Push obstacks before calling common_type.
4665
4666Thu Jan 12 17:15:21 1995 Michael Ben-Gershon <mybg@cs.huji.ac.il>
4667
4668 * except.c (push_eh_entry): set LABEL_PRESERVE_P flag for
4669 exception table labels.
4670 (expand_start_all_catch): Ditto.
4671 (expand_leftover_cleanups): Ditto.
4672 (expand_end_catch_block): Ditto.
4673 * except.c (make_first_label): new function.
4674 (expand_start_all_catch): add a call to make_first_label() before
4675 using a label as a jump destination.
4676 (expand_end_all_catch): Ditto.
4677 (expand_leftover_cleanups): Ditto.
4678 (expand_end_catch_block): Ditto.
4679 (expand_builtin_throw): Ditto.
4680 (expand_throw): Ditto.
4681 * except.c: Add ARM processor support for exception handling.
4682
4683Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4684
4685 (complete_array_type): Copy code from C frontend.
4686
4687 * lex.c (real_yylex): Don't multiply the length of a wide string
4688 literal by WCHAR_BYTES.
4689
4690 * decl.c (pushdecl): Check for redeclaration of wchar_t here.
4691 (duplicate_decls): Instead of here.
4692 (define_label): Complain about a label named wchar_t.
4693 (grokdeclarator): Complain about declarations of
4694 operator-function-ids as non-functions.
4695
4696 * typeck.c (unary_complex_lvalue): Also wrap prefix -- and ++ in
4697 COMPOUND_EXPRs.
4698 (build_unary_op): Wrap unary plus in a NON_LVALUE_EXPR.
4699
4700 * lex.c (real_yylex): Don't skip whitespace when reading the next
4701 character after ->.
4702
4703Wed Jan 11 16:32:49 1995 Mike Stump <mrs@cygnus.com>
4704
4705 * except.c: Allow cc1plus to be built with native compiler on rs6000.
4706 (expand_start_all_catch): Add assemble_external calls for various
4707 routines we call.
4708 (expand_leftover_cleanups): Ditto.
4709 (expand_start_catch_block): Ditto.
4710 (do_unwind): Ditto.
4711 (expand_builtin_throw): Ditto.
4712
4713Wed Jan 11 01:05:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4714
4715 * decl.c (pushtag): Only look for a previous decl in the current
4716 binding level. Use explicit global scope in DECL_NESTED_TYPENAME.
4717
4718 * gxx.gperf: Add __signature__ and __sigof__ keywords.
4719
4720 * decl2.c (lang_decode_option): -ansi does not set flag_no_asm. It
4721 does set flag_no_gnu_keywords and flag_operator_names.
4722
4723 * lex.c (init_lex): 'overload' is not a keyword unless -traditional.
4724 Unset extension keywords if -fno-gnu-keywords.
4725 Allow operator names ('bitand') if -foperator-names.
4726 Never unset 'asm'; -fno-asm only affects 'typeof'.
4727
4728 * decl.c (lookup_name_real): The got_object special lookup only
4729 applies to types.
4730
4731Tue Jan 10 18:07:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4732
4733 * spew.c (yylex): Also use DECL_NESTED_TYPENAME if got_object is set.
4734
4735 * parse.y (primary): Unset got_object after all rules that use the
f30432d7 4736 'object' nonterminal.
e1cd6e56
MS
4737 (object): Set got_object.
4738
4739 * lex.h: Declare got_object.
4740
4741 * decl.c (lookup_name_real): Also lookup names in the context of an
4742 object specified.
4743
4744Tue Jan 10 14:30:30 1995 Mike Stump <mrs@cygnus.com>
4745
4746 * typeck.c (get_member_function_from_ptrfunc): Use ptrdiff_type_node
4747 for things that have to be added to pointers, not size_type. Cures
4748 problems with pointer to members on Alphas.
4749 (build_binary_op_nodefault): Ditto.
4750 (get_delta_difference_: Ditto.
4751 (build_ptrmemfunc): Ditto.
4752
4753Tue Jan 10 01:49:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4754
4755 * decl.c (pushtag): Stick the new decl in TYPE_NAME before pushing
4756 it.
4757
4758 * typeck.c (build_component_ref): Don't build up a COMPONENT_REF
4759 when dealing with overloaded member functions; just act like
4760 build_offset_ref.
4761 (commonparms): Remove misleading comment.
4762
4763 * decl.c (duplicate_decls): Complain about repeated default
4764 arguments here.
4765 (redeclaration_error_message): Instead of here.
4766 (pushdecl): Complain about missing default arguments here.
4767 (grokparms): Instead of here.
4768 (lookup_name_current_level): Also match on DECL_ASSEMBLER_NAME.
4769 (grok_reference_init): Do not complain about missing initializer if
4770 declared 'extern'.
4771
4772 * search.c (lookup_field): Don't return a TYPE_DECL if there is a
4773 function alternative and want_type is not set.
4774
4775Mon Jan 9 18:16:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4776
4777 * decl.c (pushtag): Don't set TYPE_NAME to an identifier. Do push
4778 the decl when the type has no TYPE_NAME.
4779 (lookup_nested_type): Don't assume that type has TYPE_NAME set.
4780 (lookup_name_real): Call lookup_field with want_type =
4781 prefer_type.
4782
4783 * search.c (lookup_field): Handle want_type properly in the presence
4784 of fields with the same name.
4785
4786 * decl.c (set_nested_typename): Set nested name for file-scope types
4787 to include leading ::.
4788 (pushdecl): Set the nested typename if the decl doesn't have one,
4789 rather than if the type's canonical decl doesn't have one.
4790
e1cd6e56
MS
4791Mon Jan 9 03:44:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4792
4793 * typeck.c (convert_for_assignment): Complain about contravariance
4794 violation here.
4795 (comp_target_types): Instead of here.
4796 (build_unary_op): resolve_offset_ref before checking for a valid
4797 type.
4798
4799 * spew.c (yylex): Decrement looking_for_typename after we see a
4800 _DEFN.
4801
4802 * decl.c (pushdecl): Don't install an artificial TYPE_DECL in
f30432d7 4803 IDENTIFIER_LOCAL_VALUE if we already have a decl with that name.
e1cd6e56
MS
4804
4805 * typeck.c (convert_for_assignment): Converting pointers to bool
4806 does not need a cast.
4807
4808Sun Jan 8 18:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4809
4810 * class.c (instantiate_type): Initialize nsubsts parm.
4811
4812 * pt.c (do_function_instantiation): Ditto.
4813
4814Sat Jan 7 14:37:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4815
4816 * pt.c (tsubst): Use TREE_STATIC instead of DECL_INLINE &&
4817 DECL_SAVED_INSNS to determine whether or not we've seen a definition
4818 of this function.
4819 (instantiate_template): Ditto.
4820
4821 * call.c (convert_harshness): Allow const reference binding when
4822 called from the overloading code, but not when called from
4823 can_convert (since it isn't a conversion).
4824 (convert_harshness): Put back some disabled code.
4825
4826Fri Jan 6 14:10:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4827
4828 * call.c (convert_harshness): There is no implicit conversion from
4829 void* to other pointer types (unless the parameter is (void*)0).
4830 (convert_harshness): Non-lvalues do not convert to reference types.
4831
4832 * class.c (finish_struct_methods): Still set
f30432d7 4833 TYPE_HAS_{INT,REAL}_CONVERSION.
e1cd6e56
MS
4834
4835 * call.c (can_convert): Don't use aggregate initialization.
4836
4837 * cp-tree.h: Declare lookup_conversions.
4838
4839Thu Jan 5 21:08:00 1995 Mike Stump <mrs@cygnus.com>
4840
4841 * parse.y (simple_stmt): Fix duplicate case value error messages to
4842 be more readable.
4843
4844Wed Jan 4 16:44:19 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4845
4846 * cvt.c (build_type_conversion): Total rewrite to use
4847 convert_harshness instead of reproducing conversion logic here. Now
4848 much shorter.
4849
4850 * call.c (convert_harshness): Support conversions to bool.
4851 (can_convert): Checks whether a conversion is less harsh
4852 than USER_CODE, for build_type_conversion.
4853
4854 * search.c (add_conversions): Function for passing to dfs_walk which
4855 adds all the type conversion operators in the current type to a list.
4856 (lookup_conversions): Calls dfs_walk with add_conversions and return
4857 the list.
4858 (dfs_walk): Don't require a qfn.
4859
4860 * cp-tree.h: Lose CLASSTYPE_CONVERSIONS hackery.
4861 (CLASSTYPE_FIRST_CONVERSION): Points to elt 1 of CLASSTYPE_METHOD_VEC.
4862
4863 * class.c (finish_struct_bits): Lose CLASSTYPE_CONVERSIONS hackery.
4864 (grow_method): A separate function for building onto the growing
4865 method vector.
4866 (finish_struct_methods): Use it. Put all type conversion operators
4867 right after the constructors. Perhaps we should sort the methods
f30432d7 4868 alphabetically?
e1cd6e56
MS
4869
4870Mon Jan 2 14:42:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4871
4872 * call.c (build_method_call): Lose another misleading shortcut.
4873
4874Fri Dec 30 17:57:30 1994 Mike Stump <mrs@cygnus.com>
4875
4876 * gc.c (build_bltn_desc): Handle bool as a built-in type.
4877
4878Fri Dec 30 14:20:21 1994 Mike Stump <mrs@cygnus.com>
4879
4880 * tree.c (layout_vbasetypes): Ensure that we don't loose alignment
4881 on the complete type because of small virtual bases.
255512c1 4882
8145f082
MS
4883Fri Dec 30 12:22:29 1994 Mike Stump <mrs@cygnus.com>
4884
4885 * decl.c (n_incomplete): Bump n_incomplete up to int to match C
4886 front end.
4887 (pushdecl): Also count decls pushed that are of a type being defined
4888 as incomplete things.
4889 * class.c (finish_struct): Move hack_incomplete_structures up to
4890 just after we set it as not being defined, so that the decls we
4891 build for RTTI don't count as incomplete.
4892
4893Thu Dec 29 18:20:57 1994 Mike Stump <mrs@cygnus.com>
4894
4895 * pt.c (tsubst): Fix problem with defining constructors in templated
4896 classes with virtual bases.
4897
4898Wed Dec 28 08:31:00 1994 Mike Stump <mrs@cygnus.com>
4899
4900 * parse.y (TYPEID): Strip top-level cv-qualifiers on typeid
4901 expressions.
4902 * gc.c (build_typeid): Ditto.
4903
4904Thu Dec 22 17:26:33 1994 Mike Stump <mrs@cygnus.com>
4905
4906 * cvt.c (build_up_reference): Fix breakage introduced on Nov 29,
4907 don't assert on complex AGGR inits.
4908
4909Thu Dec 22 14:32:31 1994 Mike Stump <mrs@cygnus.com>
4910
4911 * method.c (build_overload_value): Handle pointer to members as
4912 template arguments.
4913
4914Thu Dec 22 13:09:07 1994 Mike Stump <mrs@cygnus.com>
4915
4916 * typeck.c (unary_complex_lvalue): Don't call sorry if we know how
4917 to do take the address of a data member for a pointer to data
4918 member.
4919
4920Thu Dec 22 10:04:19 1994 Mike Stump <mrs@cygnus.com>
4921
4922 * decl.c (grokdeclarator): Use the typedef name for linkage if the
4923 type doesn't otherwise have a name.
4924
4925 * decl2.c (grokfield): Ditto.
4926
4927 * class.c (finish_struct): Since we reuse the TYPE_DECL for the
4928 DECL_NAME of enums, structs and classes, we have to avoid trying to
4929 put it in the TYPE_FIELDS again.
4930
4931Wed Dec 21 11:07:05 1994 Mike Stump <mrs@cygnus.com>
4932
4933 * decl2.c (check_classfn): Ignore this parameter on static functions
4934 when checking to see if we match.
4935
4936Tue Dec 20 17:47:02 1994 Mike Stump <mrs@cygnus.com>
4937
4938 * typeck.c (unary_complex_lvalue): Handle address of non-left most
4939 pointers to members by calling get_delta_difference.
4940
5edb8b93
MS
4941Mon Dec 19 22:40:53 1994 Mike Stump <mrs@cygnus.com>
4942
4943 * decl2.c (check_classfn): Don't use decls_match yet, as it modifies
4944 static functions to early.
4945
4946Thu Dec 19 22:37:48 1994 Mike Stump <mrs@cygnus.com>
4947
4948 * method.c (make_thunk): Handle encoding of positive thunk offsets.
4949
4950Sat Dec 17 13:29:50 1994 Doug Evans <dje@canuck.cygnus.com>
4951
4952 * Make-lang.in (.PHONY): Tell GNU make C++ and c++ are phony targets.
4953
6060a796
MS
4954Thu Dec 15 16:32:12 1994 Mike Stump <mrs@cygnus.com>
4955
4956 * decl2.c (check_classfn): Use decls_match to check if this has
4957 already been declared, as the DECL_ASSEMBLER_NAME may have been
4958 changed via asm("new_name").
4959 * decl.c (decls_match): Make public.
4960
4961Thu Dec 15 15:17:55 1994 Mike Stump <mrs@cygnus.com>
4962
4963 * *.[chy] (expand_aggr_init) Add fourth argument to handle
4964 distinction between = init and (init) style of initializations.
4965 * *.[chy] (finish_decl): Add fifth argument to to handle
4966 distinction between = init and (init) style of initializations.
4967
4968Tue Dec 13 19:16:05 1994 Mike Stump <mrs@cygnus.com>
4969
4970 Fix some random `explicit' bugs.
4971
4972 * cvt.c (convert_to_reference): Add third parameter to
4973 convert_force.
4974 (convert_force): Ditto.
4975 * call.c (build_method_call): Ditto.
4976 * decl2.c (setup_vtbl_ptr): Ditto.
4977 * init.c (expand_virtual_init): Ditto.
4978 (build_member_call): Ditto.
4979 (build_delete): Ditto.
4980 (build_vbase_delete): Ditto.
4981 * typeck.c (build_component_addr): Ditto.
4982 (build_c_cast): Ditto.
4983 (build_modify_expr): Ditto.
4984 * cp-tree.h (CONV_NONCONVERTING): Ditto. Add so that we can
4985 distinguish the context in which the conversion appears. Add thrid
4986 argument to build_c_cast.
4987 * cvt.c (cp_convert): Pass whether or not we want to consider
4988 non-converting constructors down to build_method_call.
4989 * decl2.c (reparse_absdcl_as_casts): Add third argument to
4990 build_c_cast.
4991 * gc.c (build_m_desc): Ditto.
4992 * init.c (build_new): Ditto.
4993 * parse.y (expr_no_commas): Ditto.
4994 (primary): Ditto.
4995 * typeck.c (build_x_function_call): Ditto.
4996 (build_static_cast): Ditto.
4997 (build_reinterpret_cast): Ditto.
4998 (build_const_cast): Ditto.
4999 (build_c_cast): Ditto.
5000 (build_ptrmemfunc): Ditto.
5001 * typeck2.c (build_functional_cast): Ditto.
5002 * init.c (expand_aggr_init): Added LOOKUP_ONLYCONVERTING to
5003 expand_aggr_init_1 as inits are converted to the destination type.
5004
5005Tue Dec 13 16:18:57 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5006
5007 * Make-lang.in (cc1plus): Depends on c-pragma.o.
5008
5009 * Makefile.in (OBJ{DEP,}S): Add ../c-pragma.o.
5010
5011 * lex.c (check_newline): If the #pragma is not recognized by g++,
5012 try machine-specific ones too.
5013 (handle_sysv_pragma): Copied from c-lex.c.
5014
5015Mon Dec 12 23:53:06 1994 Mike Stump <mrs@cygnus.com>
5016
5017 * except.c (expand_throw): Fix Dec 6th change, build_new likes a
5018 reference better.
5019
5020Mon Dec 12 18:01:00 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5021
5022 * typeck.c (build_binary_op): Lose checks on TYPE_PTRMEMFUNC_P with
5023 IS_AGGR_TYPE, since now they will not both be set on the same type.
5024
5025 * pt.c (do_pending_expansions): Don't clear TREE_PUBLIC on
5026 instantiations controlled by -fexternal-templates.
5027
5028 * decl.c (duplicate_decls): Don't complain about different values of
5029 __attribute__ ((const)) and ((noreturn)).
5030
81cdf787
DE
5031Fri Dec 9 18:17:37 1994 Doug Evans <dje@cygnus.com>
5032
5033 * Makefile.in (BISONFLAGS): Delete --yacc.
5034 (PARSE_H): Depend on $(PARSE_C), for parallel makes.
5035 (PARSE_C): Undo last patch.
5036
be99da77 5037Fri Dec 2 10:44:36 1994 Mike Stump <mrs@cygnus.com>
30ffea6b 5038
3526f730 5039 * Makefile.in (BISONFLAGS): Add --yacc so that output winds up in
30ffea6b
MS
5040 y.tab.c.
5041
6060a796
MS
5042Thu Dec 8 17:39:46 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5043
5044 * decl.c (finish_decl): Don't call obscure_complex_init for decls
5045 of indeterminate size.
5046
5047Wed Dec 7 16:49:22 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5048
5049 * decl.c (obscure_complex_init): Function to tweak the decl to
5050 prevent expand_decl from tring to initialize it.
5051 (finish_decl): Use it rather than writing the same code in three
5052 different places.
5053
5054 * parse.y (bad_parm): Stop trying to support parms without types.
5055
5056Wed Dec 7 12:06:56 1994 Mike Stump <mrs@cygnus.com>
5057
5058 * decl2.c (grokfield): Make asm specs on static member functions
5059 work.
5060
5061Tue Dec 6 15:43:20 1994 Mike Stump <mrs@cygnus.com>
5062
5063 * except.c (expand_throw): Make a copy of the thrown object.
5064
5065Tue Dec 6 14:16:34 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5066
5067 * parse.y: : has lower precedence than =.
5068
5069Tue Dec 6 12:46:17 1994 Mike Stump <mrs@cygnus.com>
5070
5071 * decl.c (pushdecl): Use DECL_NAME of VAR_DECLs to avoid namespace
5072 manglings.
5073 (grokvardecl): Add namespace into variable name.
5074
5075Tue Dec 6 11:26:55 1994 Mike Stump <mrs@cygnus.com>
5076
5077 * decl2.c (current_namespace_id): New routine to transform a simple
5078 name into a name in a namespace.
5079 * decl.c (grokdeclarator): Use it.
5080 * decl2.c (get_namespace_id): Find the name of the current
5081 namespace.
5082 (push_namespace, pop_namespace): Complete out missing
5083 functionality.
5084
5085Mon Dec 5 17:11:51 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5086
5087 * class.c (finish_struct): Don't use LONG_LONG_TYPE_SIZE, as it may
5088 not be defined. Fix warning message for enums and restore warning
5089 for non-enums.
5090
5091 * decl2.c (push_namespace): Dummy function.
5092 (pop_namespace): Ditto.
5093 (do_namespace_alias): Ditto.
5094 (do_using_decl): Ditto.
5095 (do_using_directive): Ditto.
5096
5097 * parse.y: New token NSNAME for namespace names.
5098 (extdef): Add namespace, using definitions.
5099 (using_decl): New rule for using declarations.
5100 (any_id): New rule for identifiers with any degree of scoping.
5101 (identifier): Add NSNAME.
5102 (notype_identifier): Ditto.
5103 (component_decl): Add using_decl.
5104 (nested_name_specifier): Add NSNAME SCOPE.
5105
5106 * typeck.c (convert_for_assignment): Handle conversions between
5107 enums and bool.
5108
5109 * decl.c (duplicate_decls): Only propagate DECL_MAIN_VARIANT on
5110 FUNCTION_DECLs.
5111
5112Mon Dec 5 13:03:16 1994 Mike Stump <mrs@cygnus.com>
5113
5114 * class.c (finish_struct): Give an error if one tries to declare a
5115 bit-field's size greater than a long long, as the backend will dump.
5116 It is not an error to declare an enum bit-field greater than its
5117 precision. Warn if an enum bit-field is too small to hold all
5118 its values.
5119
5120Mon Dec 5 11:41:50 1994 Mike Stump <mrs@cygnus.com>
5121
5122 * typeck.c (convert_for_assignment): Use cp_convert instead of
5123 convert so that we don't get static casts.
5124
5125Sun Dec 4 11:59:01 1994 Mike Stump <mrs@cygnus.com>
5126
5127 * cvt.c (cp_convert): Don't complain about int->enum conversion if
5128 we are doing static casts.
5129
5130Fri Dec 2 18:32:41 1994 Mike Stump <mrs@cygnus.com>
5131
5132 * error.c (dump_expr): Do something more intelligent with SAVE_EXPRs
5133 when dumping expressions in error messages.
5134
5135Fri Dec 2 17:04:27 1994 Mike Stump <mrs@cygnus.com>
5136
5137 * gc.c (build_dynamic_cast): Change interface to libg++, ensure that
f30432d7 5138 the return type is the right type, and make references work.
6060a796
MS
5139
5140Fri Dec 2 16:36:43 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5141
5142 * decl.c (poplevel): Don't be confused by function-scope
5143 declarations of non-nested functions.
5144 (duplicate_decls): Propagate DECL_MAIN_VARIANT.
5145 (pushdecl): Use duplicate_decls to copy info from old decl into new
5146 function-scope one rather than doing it here.
5147
5148 * decl2.c (mark_inline_for_output): Deal with the DECL_MAIN_VARIANT
5149 of this decl, in case this is a function-scope declaration.
5150
5151 * decl.c (finish_enum): Make sure that the type has the right
5152 precision when we call fixup_*_type.
5153
5154Tue Nov 29 19:12:07 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5155
5156 * cvt.c (build_up_reference): Strip superfluous NOP_EXPRs; we do
5157 want to build up references to rvalues if possible.
5158 (cp_convert): Stick on a NOP_EXPR when converting to the same type.
5159
5160Tue Nov 29 11:28:59 1994 Mike Stump <mrs@cygnus.com>
5161
5162 * parse.y (maybe_raises): Handle throw ().
5163 * parse.y (ansi_raise_identifier): grok type-ids in exception
5164 specifications.
5165 * tree.c (build_exception_variant): Use list compare to check if
5166 two exception specifications match.
5167 * decl.c (duplicate_decls, bad_specifiers): Enhance wording on error
5168 messages.
5169 * call.c (build_method_call): Remove TREE_RAISES.
5170 * cvt.c (convert_to_aggr): Ditto.
5171 * typeck.c (build_function_call_real, convert_arguments): Ditto.
5172 * init.c (expand_aggr_init_1): Ditto.
5173
5174Tue Nov 29 09:50:39 1994 Mike Stump <mrs@cygnus.com>
5175
5176 * except.c: Add support for m68k and mips exception handling
5177 support.
5178
5179Tue Nov 29 08:48:33 1994 Mike Stump <mrs@cygnus.com>
5180
5181 * except.c (expand_end_all_catch): Throw into outer context, if we
5182 fall off end of catch handlers.
5183
db5ae43f
MS
5184Mon Nov 28 16:44:41 1994 Mike Stump <mrs@cygnus.com>
5185
5186 * Makefile.in: Make is easier to decide where parse.[ch] will be
5187 built.
5188
af824546
DE
5189Thu Nov 17 20:11:24 1994 Doug Evans <dje@cygnus.com>
5190
5191 * cp/Make-lang.in (CXX_INSTALL_NAME) Use program_transform_name.
5192 (GXX_INSTALL_NAME) Likewise.
5193 (CXX_CROSS_NAME) Use program_transform_cross_name.
5194 (GXX_CROSS_NAME) Likewise.
5195 (c++.install-man): Use program_transform_name on g++.1.
5196 (c++.uninstall): Likewise.
5197
db5ae43f
MS
5198Mon Nov 28 13:53:03 1994 Mike Stump <mrs@cygnus.com>
5199
5200 * parse.y (THROW): Fix precedence of throw expressions.
5201
5202Mon Nov 28 13:15:16 1994 Mike Stump <mrs@cygnus.com>
5203
5204 * typeck.c (build_unary_op): Allow promotions from bool to int on
5205 unary ~.
5206
5207Sun Nov 27 00:16:21 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5208
5209 * method.c (build_overload_name): Use DECL_ASSEMBLER_NAME for
5210 classes when appropriate.
5211 (build_overload_nested_name): When dealing with a function context,
5212 use ASM_FORMAT_PRIVATE_NAME to tweak the name of the function to
5213 avoid conflicts between local classes of the same name.
5214
5215Wed Nov 23 17:59:42 1994 Mike Stump <mrs@cygnus.com>
5216
5217 * gxx.gperf, parse.y, lex.h, hash.h, lex.c (init_lex), delc.c
5218 (duplicate_decls, grokdeclarator), cp-tree.h: Add support for
5219 `explicit'.
5220 * cvt.c (convert_to_reference, cp_convert, build_type_conversion_1,
5221 build_type_conversion): Use LOOKUP_ONLYCONVERTING in
5222 build_method_calls so that non-converting constructors are not used.
5223 * call.c (build_method_call): If we shouldn't use a non-converting
5224 constructor, then don't.
5225
5226Wed Nov 23 14:46:56 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5227
5228 * call.c (build_method_call): Don't try to synthesize methods yet.
5229
5230Tue Nov 22 12:45:21 1994 Jason Merrill <jason@phydeaux.cygnus.com>
ea943e1d 5231
db5ae43f
MS
5232 * pt.c (push_template_decls): Create CONST_DECLs for template
5233 constant parameters, not VAR_DECLs.
5234
5235Sat Nov 19 15:28:31 1994 Jim Wilson (wilson@chestnut.cygnus.com)
5236
5237 * typeck.c (build_binary_op_nodefault): Can shorten shift only if
5238 shift count is less than size in bits of arg0.
5239
5240Thu Nov 17 15:30:50 1994 Mike Stump <mrs@cygnus.com>
5241
5242 * gxx.gperf, hash.h, lex.c (init_lex, real_yylex), parse.y: Add new
5243 ANSI keywords and, and_eq, bitand, bitor, explicit, namespace, not,
5244 not_eq, or, or_eq, typename, using, xor, xor_eq to g++. Still need
5245 to add support for explicit, namespace, typename, and using, support
5246 for the rest is already in.
5247
db5ae43f
MS
5248Fri Nov 4 19:04:18 1994 Mike Stump <mrs@cygnus.com>
5249
5250 * gc.c (get_bad_cast_node): New routine to support compile time
5251 throws of bad_cast.
5252 * gc.c (build_dynamic_cast): Support throwing of bad_cast at compile
5253 time.
5254
5255Fri Nov 4 11:12:00 1994 Mike Stump <mrs@cygnus.com>
5256
5257 * except.c: Add hppa support.
5258
5259Fri Nov 4 10:50:50 1994 Mike Stump <mrs@cygnus.com>
5260
5261 * except.c: Add rs6000 support.
5262
5263Thu Nov 3 14:24:23 1994 Mike Stump <mrs@cygnus.com>
5264
5265 * except.c (do_unwind): Add i[34]86 support.
5266
5267Thu Nov 3 00:10:46 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5268
5269 * pt.c (do_pending_expansions): Unset TREE_PUBLIC on implicit
5270 instantiations.
5271
5272Wed Nov 2 15:08:24 1994 Kung Hsu (kung@mexican.cygnus.com)
5273
5274 * decl.c (finish_function): emit types used in method parameters
5275 into symbol table.
5276
5277Wed Nov 2 15:05:47 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5278
5279 * pt.c (process_template_parm): Allow pointer to member function
5280 template parameter types.
5281 (uses_template_parms): Handle pointer to member function
5282 CONSTRUCTORs.
5283
5284 * g++.c (main): Cast first argument of bzero to (char *).
5285 Pass -lstdc++ instead of -lg++ unless we are invoked as 'g++'.
5286
5287Mon Oct 31 14:50:48 1994 Kung Hsu (kung@mexican.cygnus.com)
5288
5289 * gc.c (build_dynamic_cast): rewrite to make it work.
5290 * class.c (finish_vtbls): build more vtables if flag_rtti is on.
5291 * class.c (modify_all_direct_vtables): ditto.
5292 * init.c (expand_direct_vtbls_init): expand more vtables if
5293 flag_rtti is on.
5294 * decl.c (init_type_desc): add default return.
5295
5296Tue Oct 25 17:13:09 1994 Kung Hsu (kung@mexican.cygnus.com)
5297
5298 * tree.c (debug_binfo): get rid of the initial size entry of
5299 vtable.
5300 * cp-tree.h: change flag_dossier to flag rtti, define type
5301 descriptor type nodes.
5302 * decl.c (init_type_desc): new function to initialize type
5303 descriptor type nodes.
5304 * decl.c (record_builtin_type): change flag_dossier to flag_rtti.
5305 * lex.c (init_lex): ditto.
5306 * decl.c : change variable flag_dossier to flag_rtti.
5307 * decl.c (duplicate_decls): get rid initial size entry of vtable.
5308 * decl.c (hack_incomplete_structures): take out assert 164.
5309 * search.c (get_abstract_virtuals_1): ditto.
5310 * search.c (dfs_init_vbase_pointers): change CLASSTYPE_DOSSIER to
5311 CLASSTYPE_RTTI.
5312 * parse.y: ditto.
5313 * class.c (prepare_fresh_vtable): for virtual bases, get right
5314 offset.
5315 * class.c (add_virtual_function): change flag_dossier to
5316 flag_rtti.
5317 * class.c (modify_one_vtable): modify the right rtti entry.
5318 * class.c (override_one_vtable): get rid of size entry.
5319 * class.c (finish_struct): change flag_dossier to flag_rtti, and
5320 build extra vtables, build type descriptors for polymorphic
5321 classes.
5322 * gc.c (build_headof): make headof() works correctly with new
5323 rtti.
5324 * gc.c (build_typeid): make this function work with new rtti.
5325 * gc.c (get_typeid): make this function work with new rtti.
5326 * gc.c (build_bltn_desc): new function for new rtti.
5327 * gc.c (build_user_desc): ditto.
5328 * gc.c (build_class_desc): ditto.
5329 * gc.c (build_ptr_desc): ditto.
5330 * gc.c (build_attr_desc): ditto.
5331 * gc.c (build_func_desc): ditto.
5332 * gc.c (build_ptmf_desc): ditto.
5333 * gc.c (build_ptmd_desc): ditto.
5334 * gc.c (build_t_desc): ditto.
5335 * gc.c : comment out old build_t_desc, build_i_desc, build_m_desc.
5336
5337Tue Oct 25 13:37:41 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5338
5339 * call.c (convert_harshness): Check for TREE_UNSIGNED differences
5340 after checking for integral conversions.
ea943e1d 5341
72b7eeff
MS
5342Wed Nov 30 19:13:50 1994 Mike Stump <mrs@cygnus.com>
5343
5344 * Version 2.6.3 released.
5345
5346Thu Nov 17 10:56:50 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5347
5348 * typeck2.c (build_m_component_ref): Check the basetype of the
5349 member pointer against the main variant of the object type.
5350
5351Mon Nov 14 14:21:52 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5352
5353 * cvt.c (convert_to_reference): Make sure that the original expr
5354 gets its type back when converting a reference.
5355
5356 * method.c (build_overload_name): Clear numeric_outputed_need_bar here.
5357 (build_decl_overload): Instead of here.
5358
5359Tue Nov 8 17:11:24 1994 Jason Merrill <jason@phydeaux.cygnus.com>
5360
5361 * cvt.c (cp_convert): Don't build a TARGET_EXPR if we're not in a
5362 function.
5363
5364 * typeck.c (convert_for_initialization): Handle initialization from
5365 a TARGET_EXPR.
5366
5367Sun Nov 6 01:34:24 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5368
5369 * pt.c (lookup_nested_type_by_name): Fix list-walking logic.
5370 (tsubst): When replacing a TEMPLATE_TYPE_PARM, propagate
5371 TYPE_READONLY and TYPE_VOLATILE from the argument.
5372 (unify): When unifying with a TEMPLATE_TYPE_PARM, remove cv-quals
5373 present in parm from arg.
5374 (type_unification): Strip REFERENCE_TYPE from the argument type.
5375 (unify): Don't strip REFERENCE_TYPE from the argument type.
5376
5377Sat Nov 5 22:42:15 1994 Greg McGary (gkm@magilla.cichlid.com)
5378
5379 * pt.c (do_type_instantiation): Check to see if there's a
5380 IDENTIFIER_TEMPLATE on a class before calling
5381 instantiate_member_templates().
5382
5383Sat Nov 12 06:35:42 1994 Mike Stump <mrs@cygnus.com>
5384
5385 * Version 2.6.2 released.
5386
5387Thu Nov 3 18:48:19 1994 Paul Eggert <eggert@twinsun.com>
5388
5389 * Makefile.in (spew.o, lex.o, pt.o):
5390 Depend on $(srcdir)/parse.h, not parse.h.
5391
5392Tue Nov 1 19:19:41 1994 Mike Stump <mrs@cygnus.com>
5393
5394 * Version 2.6.1 released.
5395
eae89e04
JM
5396Sun Oct 23 13:19:55 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5397
db5ae43f
MS
5398 * decl2.c: Declare flag_access_control.
5399 (struct lang_f_options): Add access-control.
5400 * expr.c (cplus_expand_expr, NEW_EXPR): Unset flag_access_control
5401 for the call to expand_aggr_init to copy the object out of the
5402 pcc_struct_return slot.
5403 * search.c (compute_access): if (!flag_access_control) return
5404 access_public.
eae89e04
JM
5405
5406Fri Oct 21 00:32:54 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5407
db5ae43f
MS
5408 * lex.c (cons_up_default_function): Don't try to defer method
5409 synthesis now.
5410
5411 * decl.c (init_decl_processing): Use __pure_virtual for abort_fndecl
5412 instead of abort, since the OSF/1 dynamic linker doesn't like to see
5413 relocation entries for abort.
eae89e04 5414
db5ae43f
MS
5415 * tree.c (array_type_nelts_total): Use sizetype, not
5416 integer_type_node.
5417 (array_type_nelts_top): Ditto.
5418
5419Thu Oct 20 15:48:27 1994 Mike Stump <mrs@cygnus.com>
5420
5421 * decl.c (grokdeclarator): Added handling for catch parameters
5422 (CATCHPARM).
5423 * except.c (expand_start_catch_block): Use the new CATCHPARM context
5424 instead of NORMAL.
5425 * except.c (expand_throw): Don't let convert_to_reference complain
5426 about what we are doing.
5427
5428Thu Oct 20 12:55:24 1994 Jim Wilson (wilson@cygnus.com)
5429
5430 * method.c (emit_thunk): Call instantiate_virtual_regs.
5431
5432Wed Oct 19 14:15:33 1994 Mike Stump <mrs@cygnus.com>
5433
5434 * except.c (expand_exception_blocks): Make sure throw code doesn't
5435 get put in function that won't be output.
eae89e04
JM
5436
5437Mon Oct 17 18:03:15 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5438
db5ae43f
MS
5439 * decl.c (init_decl_processing): Make alloca a builtin.
5440
5441Thu Oct 27 21:10:25 1994 Craig Burley (craig@burley)
5442
5443 * g++.c (main): Only decrement "added" and set "library" to
5444 NULL when "library" != NULL (just like 940829 fix).
eae89e04 5445
c199879d
MS
5446Mon Oct 17 15:56:11 1994 Mike Stump <mrs@cygnus.com>
5447
5448 * except.c (expand_start_catch_block): Make sure the false label
5449 gets onto the permanent obstack, as it is used for the exception
5450 table.
5451
13306d4f
MS
5452Fri Oct 14 18:54:48 1994 Mike Stump <mrs@cygnus.com>
5453
5454 * class.c (modify_one_vtable): Since the DECL_CONTEXT of fndecl can
5455 be set just below, use current_fndecl instead.
5456
db5ae43f
MS
5457Fri Oct 14 15:12:22 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5458
5459 * init.c (expand_aggr_vbase_init_1): Don't call expand_aggr_init_1
5460 with LOOKUP_SPECULATIVELY.
5461 (expand_default_init): Abort if build_method_call returns NULL_TREE.
5462
5463 * typeck.c (build_modify_expr): Don't just build a MODIFY_EXPR if
5464 the rhs is a TARGET_EXPR.
5465
5466 * parse.y (left_curly): Anonymous types are not affected by #pragma
5467 interface/implementation.
5468
5469 * method.c (synthesize_method): Don't call setup_vtbl_ptr for the
5470 default constructor if it isn't needed.
5471
5472 * lex.c (cons_up_default_function): Do synthesize methods for
5473 anonymous types if necessary.
5474
2f4f907d
JM
5475Thu Oct 13 17:44:55 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5476
db5ae43f 5477 * method.c (build_decl_overload): Set numeric_outputed_need_bar to 0.
2f4f907d
JM
5478
5479Wed Oct 12 13:27:57 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5480
db5ae43f
MS
5481 * typeck.c (build_modify_expr): Understand how to copy an aggregate.
5482
5483 * init.c (expand_default_init): Ditto. Also remove some of the
5484 crufty code that assumes methods will not be synthesized properly.
5485
5486 * lex.c (cons_up_default_function): If the containing type has no
5487 name, these functions should never need to be called, so just
5488 declare them.
2f4f907d 5489
db5ae43f
MS
5490 * lex.c (real_yylex): Use HOST_BITS_PER_WIDE_INT to determine the
5491 bitmask for lexing character constants.
5492
5493 * call.c (build_method_call): Disable code that tries to do tricky
5494 stuff with a default parameter that is a constructor call, but
5495 actually does other tricky stuff that breaks things.
2f4f907d
JM
5496
5497Wed Oct 12 16:14:01 1994 Benoit Belley <belley@cae.ca>
5498
db5ae43f
MS
5499 * decl.c (finish_enum): Disable code which forces enums to be signed,
5500 since this conflicts with their use as bitfields. type_promotes_to
5501 handles promotion of enums of underlying unsigned types to signed
5502 integer types.
2f4f907d
JM
5503
5504Wed Oct 12 13:24:03 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5505
db5ae43f
MS
5506 * cvt.c (type_promotes_to): Also promote enums to long if
5507 appropriate.
2f4f907d 5508
db5ae43f
MS
5509 * typeck.c (default_conversion): Don't expect type_promotes_to to
5510 return a main variant.
2f4f907d
JM
5511
5512Wed Oct 12 12:19:45 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5513
db5ae43f
MS
5514 * call.c (build_scoped_method_call): Don't lose side effects in the
5515 object expression when calling a non-existent destructor.
2f4f907d
JM
5516
5517Fri Sep 2 19:05:21 1994 Rohan Lenard (rjl@iassf.easams.com.au)
5518
db5ae43f
MS
5519 * call.c (build_scoped_method_call): Remove erroneous error message
5520 when destructor call is written as a scoped call.
2f4f907d 5521
252b87c7 5522Tue Oct 11 23:48:31 1994 Jason Merrill (jason@phydeaux.cygnus.com)
db5ae43f
MS
5523
5524 * various: Cast pointer arguments to bzero and bcopy to char *.
252b87c7 5525
13306d4f
MS
5526Tue Oct 11 19:34:32 1994 Mike Stump <mrs@cygnus.com>
5527
5528 * class.c (get_derived_offset): Added a type parameter to limit how
5529 far up the CLASSTYPE_VFIELD_PARENT chain we search.
5530 * class.c (modify_one_vtable, fixup_vtable_deltas): When forming the
5531 offset to put into the vtable for the this parameter, make sure we
5532 don't offset from a parent of the DECL_CONTEXT of the function.
5533
db5ae43f
MS
5534Tue Oct 11 16:10:52 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5535
5536 * pt.c (do_function_instantiation): Set DECL_EXTERNAL and
5537 TREE_STATIC when setting DECL_INTERFACE_KNOWN.
5538 (do_type_instantiation): Ditto.
5539
5540 * lex.c (cons_up_default_function): Set DECL_INTERFACE_KNOWN,
5541 DECL_EXTERNAL and TREE_STATIC as appropriate.
5542
5543 * decl2.c (finish_file): Also synthesize methods that don't have
5544 DECL_EXTERNAL set. Set interface_unknown before doing so.
5545
5546 * decl.c (start_function): If DECL_INTERFACE_KNOWN is set on the
5547 function decl, don't muck with TREE_PUBLIC and DECL_EXTERNAL.
5548
cba8ba35
JM
5549Mon Oct 10 00:56:53 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5550
db5ae43f
MS
5551 * lex.c (cons_up_default_function): Mark methods in a template class
5552 as template instances. Store the values of interface_unknown and
5553 interface_only for do_pending_inlines.
5554 (do_pending_inlines): Use them.
5555
5556 * decl2.c (finish_file): If we haven't seen a definition of a
5557 function declared static, make the decl non-PUBLIC so compile_file
5558 can give an error.
cba8ba35
JM
5559
5560Sun Oct 9 02:42:29 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5561
db5ae43f
MS
5562 * method.c (do_build_copy_constructor): Handle anonymous unions.
5563 (do_build_assign_ref): Ditto.
5564 (largest_union_member): Move from lex.c.
5565
5566Sat Oct 8 14:59:43 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5567
5568 Re-implement g++'s vague linkage independent of TREE_PUBLIC.
5569 * pt.c (instantiate_member_templates): Lose redundant
5570 -fexternal-templates handling.
5571 (tsubst): Set TREE_PUBLIC and DECL_EXTERNAL on new decls. Don't set
5572 TREE_STATIC or DECL_INTERFACE_KNOWN.
5573 (do_pending_expansions): Predicate on DECL_INTERFACE_KNOWN instead
5574 of DECL_EXTERNAL for explicit instantiations.
5575 (do_function_instantiation): Do the new thing.
5576 (do_type_instantiation): Ditto.
5577 (instantiate_template): Deal with member templates defined in a .cc
5578 file with -fexternal-templates.
5579 * except.c (expand_exception_blocks): Use DECL_LINKAGE_KNOWN to
5580 decide whether to stick builtin_throw here.
5581 * decl2.c (import_export_inline): Predicate on DECL_INTERFACE_KNOWN
5582 rather than TREE_PUBLIC. Generally fix rules.
5583 (finish_file): Use DECL_INITIAL to determine whether or not a method
5584 has been synthesized, rather than TREE_ASM_WRITTEN.
5585 * decl.c (warn_extern_redeclared_static): Use DECL_PUBLIC instead of
5586 TREE_PUBLIC.
5587 (pushdecl): Ditto.
5588 (duplicate_decls): Ditto. Deal with DECL_DECLARED_STATIC and
5589 DECL_INTERFACE_KNOWN.
5590 (redeclaration_error_message): Fix checking for conflicting linkage.
5591 (define_function): Set DECL_INTERFACE_KNOWN.
5592 (grokfndecl): Function decls are PUBLIC until we are sure about
5593 their linkage. Set DECL_DECLARED_STATIC as needed.
5594 (start_function): Deal with linkage. Move pushdecl after linkage
5595 magic.
5596 (finish_function): Don't set TREE_ASM_WRITTEN on discarded inlines.
5597 * cp-tree.h (lang_decl_flags): Add interface_known and
5598 declared_static.
5599 (DECL_INTERFACE_KNOWN): New macro.
5600 (DECL_DECLARED_STATIC): New macro.
5601 (DECL_PUBLIC): New macro.
5602
5603 Clean up bogus use of TREE_PUBLIC.
5604 * class.c (alter_access): Fix mistaken use of TREE_PUBLIC (it
5605 doesn't correspond to TREE_PROTECTED and TREE_PRIVATE).
5606 * init.c (do_friend): Don't arbitrarily set TREE_PUBLIC.
cba8ba35
JM
5607
5608Wed Oct 5 13:44:41 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5609
db5ae43f
MS
5610 * call.c (build_overload_call_real): Don't immediately do
5611 array->pointer conversion.
cba8ba35 5612
db5ae43f
MS
5613 * pt.c (type_unification): If not passing to a reference, strip
5614 cv-quals. Also handle array->pointer conversion.
cba8ba35
JM
5615
5616Tue Oct 4 17:45:37 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5617
db5ae43f
MS
5618 * decl.c (grokdeclarator): Don't warn about applying const to a
5619 const typedef or template type parameter.
5620
5621 * decl2.c (finish_file): Also synthesize methods after walking the
5622 vtables. Ugly ugly ugly.
cba8ba35
JM
5623
5624Mon Oct 3 15:02:41 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5625
db5ae43f
MS
5626 * various: Remove lingering remnants of old exception handling code.
5627
5628 * decl2.c (finish_file): Synthesize methods before walking the
5629 vtables, so that the vtables get emitted as needed.
5630
5631 * decl.c (shadow_tag): Remove obsolete code for pushing tags and
5632 dealing with exceptions.
5633
5634Mon Oct 3 13:05:27 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
5635
5636 * Make-lang.in (g++-cross): Depend upon version.o and $(LIBDEPS).
5637
5638Mon Oct 3 02:59:28 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5639
5640 * decl2.c (finish_file): Fix inline handling.
cba8ba35
JM
5641
5642Sun Oct 2 00:21:56 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5643
db5ae43f
MS
5644 * decl.c (grokdeclarator): Handle redundant scope even better.
5645 ({push,pop}_cp_function_context): Take toplev parameter.
cba8ba35 5646
db5ae43f
MS
5647 * method.c (synthesize_method): Pass toplev parameter to
5648 {push,pop}_cp_function_context depending on decl_function_context
5649 (fndecl).
cba8ba35 5650
db5ae43f
MS
5651 * typeck.c (build_x_unary_op): Unary & on OFFSET_REFs is always the
5652 built-in version.
cba8ba35 5653
db5ae43f
MS
5654 * method.c (synthesize_method): Don't be confused by __in_chrg
5655 parameter.
b3738072 5656
db5ae43f 5657 * class.c (popclass): Set C_C_D like start_function does.
b3738072 5658
db5ae43f 5659 * decl.c (grokdeclarator): Handle redundant scope better.
81613e43 5660
db5ae43f
MS
5661 * parse.y (expr_or_declarator): Add '(' expr_or_declarator ')' rule.
5662 (direct_notype_declarator): Ditto.
5663 (complex_direct_notype_declarator): Remove it here.
81613e43 5664
db5ae43f 5665Sat Oct 1 21:42:18 1994 Jason Merrill (jason@deneb.cygnus.com)
44c5421f 5666
db5ae43f
MS
5667 * init.c (resolve_offset_ref): Fix types used in resolving .*
5668 expressions.
5669
5670Sat Oct 1 15:18:49 1994 Jason Merrill (jason@phydeaux.cygnus.com)
5671
5672 Beginnings of work to synthesize methods only when needed.
5673 * call.c (build_method_call): Synthesize methods as necessary
5674 (currently never necessary).
5675 * class.c (popclass): Don't try to set C_C_D here, as it'll end up
5676 on the wrong obstack.
5677 * decl.c (push_cp_function_context): Mostly copied from
5678 push_c_function_context.
5679 (pop_cp_function_context): Similarly.
5680 (finish_function): Reverse order of poplevel and pop_nested_class so
5681 that current_class_decl is restored properly.
5682 (start_function): Ditto.
5683 (finish_function): Add parameter 'nested'. Don't call
5684 permanent_allocation if (nested).
5685 * various: Pass extra parameter to finish_function.
5686 * decl2.c (finish_file): Reorganize end-of-file inline handling,
5687 synthesizing methods as necessary.
5688 * lex.c (cons_up_default_function): Call mark_inline_for_output.
5689 Only synthesize methods immediately if #pragma implementation
5690 (currently disabled).
5691 (do_pending_inlines): Call synthesize_method.
5692 * method.c (synthesize_method): New function; all method synthesis
5693 goes through here. Calls do_build_assign_ref and
5694 do_build_copy_constructor.
5695 (build_default_constructor): Remove.
5696 (build_dtor): Ditto.
5697 (build_assign_ref): Rename to do_build_assign_ref and remove stuff
5698 done by synthesize_method.
5699 (build_copy_constructor): Similarly.
44c5421f 5700
eac293a1
MS
5701Thu Sep 29 16:58:52 1994 Mike Stump <mrs@cygnus.com>
5702
5703 * typeck.c (c_expand_return): Use magic so the backend can fixup the
5704 assignment into the return register, so cleanups won't clobber it.
5705
5706Thu Sep 29 13:08:50 1994 Jason Merrill (jason@deneb.cygnus.com)
5707
5708 * method.c (hack_identifier): Don't call assemble_external for
5709 template decls.
5710
5711 * decl.c (finish_decl): Also end temporary allocation if the decl in
5712 question has a type of error_mark_node.
5713
6060a796 5714Wed Sep 28 21:45:00 1994 Mike Stump <mrs@cygnus.com>
eac293a1
MS
5715
5716 * typeck.c (build_modify_expr): When optimizing ?: on lhs, make sure
5717 that if the ?: was a reference type, that the subparts will be also.
5718
5719Wed Sep 28 16:14:04 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
5720
5721 * except.c (register_exception_table): Use Pmode, not PTRmode.
5722
5723Fri Sep 23 13:54:27 1994 Jason Merrill (jason@deneb.cygnus.com)
5724
5725 * lex.c (do_pending_inlines): Do method synthesis after the
5726 pending_inlines have been reversed.
5727
f376e137
MS
5728Thu Sep 22 12:53:03 1994 Per Bothner (bothner@kalessin.cygnus.com)
5729
5730 * decl2.c (finish_file): Fix Brendan's fix: Only call
5731 register_exception_table if there is a non-empty exception table.
5732
5733Thu Sep 22 12:03:46 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
5734
5735 * decl2.c (finish_file): Only do register_exception_table if
5736 -fhandle-exceptions is being used.
5737
5738Wed Sep 21 19:01:51 1994 Per Bothner (bothner@kalessin.cygnus.com)
5739
5740 * except.c (output_exception_table_entry): Simplify
5741 by using assemble_integer.
5742 (build_exception_table): Change to return a count.
5743 Cleanup to use standard macros, instead of hard-wired
5744 sparc asm format. Don't make __EXCEPTION_TABLE__ global.
5745 (register_exception_table): New function. Generate call to builtin.
5746 * decl2.c (finish_file): Call register_exception_table.
5747 * cp-tree.h (build_exception_table): Fix prototype.
5748
5749Wed Sep 21 13:20:42 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
5750
5751 * tree.c (break_out_calls): Don't try to duplicate the DECL_INITIAL.
5752
5753 * decl2.c (delete_sanity): Give an error at trying to delete a
5754 function.
5755
5756Wed Sep 21 11:47:10 1994 Jason Merrill (jason@deneb.cygnus.com)
5757
5758 * lex.c (cons_up_default_function): Mark synthesized destructors
5759 inline.
5760
5761 * decl.c (duplicate_decls): Ignore redeclarations of wchar_t as
5762 something other than __wchar_t, complaining if -pedantic and not in
5763 a system header.
5764
5765Tue Sep 20 09:43:28 1994 Jason Merrill (jason@deneb.cygnus.com)
5766
5767 * decl.c (xref_tag): Set up BINFO_INHERITANCE_CHAIN on base binfos
5768 here.
5769
5770 * typeck.c (build_modify_expr): Require complete type after checking
5771 for error_mark_node.
5772
5773 * call.c (build_method_call): Print parmtypes when complaining of
5774 ambiguous call.
5775
5776 * typeck.c (build_modify_expr): Handle assignment to array from
5777 non-array.
5778
5779 * decl.c (lookup_name_real): Deal with got_scope == error_mark_node.
5780
5781 * call.c (build_method_call): Don't bother with the exact match.
5782
5783Mon Sep 19 00:51:39 1994 Jason Merrill (jason@deneb.cygnus.com)
5784
5785 * init.c (expand_aggr_init): If we munge the type of the variable,
5786 also munge the type of the initializer.
5787
5788 * decl.c (grokdeclarator): Use <= when comparing to RID_LAST_MODIFIER.
5789 (init_decl_processing): Push artificial declaration of wchar_t so
5790 people don't have to declare it before they can use it.
5791
5792 * error.c (cp_line_of): return lineno in lieu of 0.
5793
5794 * typeck.c (convert_for_assignment): Handle conversion of pmfs to
5795 int and bool.
5796 (build_component_ref): Fold the COMPONENT_REF in case it can be
5797 reduced.
5798
5799 * typeck2.c (store_init_value): Don't pedwarn about non-constant
5800 bracketed initializers for automatic variables.
5801
5802Sun Sep 18 10:12:12 1994 Jason Merrill (jason@deneb.cygnus.com)
5803
5804 * error.c (dump_decl): Don't say `typedef enum foo foo'.
5805
5806 * decl.c (start_decl): Don't set TREE_PUBLIC on template decls just
5807 because they're affected by #pragma i/i. We'll deal with that when
5808 they get instantiated.
5809
5810 * typeck.c (build_unary_op): Clean up cruft in ADDR_EXPR case.
5811
5812 * class.c (instantiate_type): Set TREE_CONSTANT on instantiated
5813 ADDR_EXPRs if appropriate.
5814
5815 * decl.c (build_ptrmemfunc_type): Unset IS_AGGR_TYPE on pmf types.
5816
5817 * typeck.c (build_ptrmemfunc): Handle &overloaded_method as an
5818 initializer properly.
5819 * typeck2.c (digest_init): Ditto.
5820
5821 * tree.c (cp_build_type_variant): Like c_build_type_variant, except
5822 it uses build_cplus_array_type.
5823 * *.c: Use cp_build_type_variant instead of c_build_type_variant.
5824
5825 * pt.c (do_type_instantiation): Don't try to instantiate nested
db5ae43f 5826 enums.
f376e137
MS
5827
5828Tue Sep 13 10:56:58 1994 Jason Merrill (jason@deneb.cygnus.com)
5829
5830 * cvt.c (build_up_reference): Handle preincrement and predecrement
db5ae43f 5831 properly.
f376e137
MS
5832
5833Tue Sep 13 09:51:59 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
5834
5835 * decl.c (finish_decl): Only lay out the rtl for DECL if it is, in
5836 fact, static.
5837
5838Mon Sep 12 14:40:30 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
5839
5840 * decl.c (finish_decl): Lay out the rtl for DECL before doing
5841 grok_reference_init, in case it's static.
5842
5843Mon Sep 12 12:45:38 1994 Jason Merrill (jason@deneb.cygnus.com)
5844
5845 * class.c (finish_struct): Don't synthesize constructors if the
5846 class has a field with the same name as the class. Don't die on
5847 classes with no constructors or destructors. Don't die if the head
5848 and tail of the class are in different files.
5849
5850 * decl.c (grokdeclarator): Don't treat a function pointer field
5851 with the same name as the class as a constructor.
5852
5853Fri Sep 9 13:17:00 1994 Jason Merrill (jason@deneb.cygnus.com)
5854
5855 * typeck.c (build_c_cast): Pull constant values out of their
5856 variables here.
5857
5858 * decl.c (duplicate_decls): Only propagate DECL_CHAIN in
5859 FUNCTION_DECLs and TEMPLATE_DECLs.
5860
5861Thu Sep 8 10:07:48 1994 Jason Merrill (jason@deneb.cygnus.com)
5862
5863 * decl.c (duplicate_decls): Propagate DECL_CHAIN in all DECLs that
5864 have it.
5865
5866 * pt.c (unify): REALs and INTEGERs only unify with their own genus.
5867 (instantiate_member_templates): Don't muck with DECL_EXTERNAL and
5868 TREE_PUBLIC unless -fexternal-templates.
5869
5870Wed Sep 7 13:17:10 1994 Jason Merrill (jason@deneb.cygnus.com)
5871
5872 * pt.c (do_type_instantiation): Call instantiate_member_templates.
5873 Deal with specializations.
5874 (tsubst): Don't stick the mangled name in DECL_NAME for function
5875 instantiations. Don't push them, either.
5876
5877 * decl2.c (grokfield): Move code for generating the
5878 DECL_ASSEMBLER_NAME for static members from here.
5879 * method.c (build_static_name): To here.
5880 * decl.c (grokvardecl): Call build_static_name.
5881 (duplicate_decls): Keep old DECL_ASSEMBLER_NAME.
5882
5883Mon Sep 5 12:49:18 1994 Jason Merrill (jason@deneb.cygnus.com)
5884
5885 * call.c (build_method_call): if -Wsynth, warn when selecting
5886 synthesized op= over user-supplied one cfront would select.
5887 * decl2.c (lang_decode_option): Handle -Wsynth.
5888
5889Fri Sep 2 15:11:59 1994 Jason Merrill (jason@deneb.cygnus.com)
5890
5891 * decl.c (finish_enum): Overhaul to fix several bugs.
5892 (start_enum): Disable useless code.
5893
5894Thu Sep 1 16:04:54 1994 Jason Merrill (jason@deneb.cygnus.com)
5895
5896 * typeck.c (c_expand_return): Warn about returning a reference to a
5897 temporary.
5898 (convert_arguments): Increment argument counter when using default
5899 arguments, too.
5900
5901Wed Aug 31 14:29:22 1994 Jason Merrill (jason@deneb.cygnus.com)
5902
5903 * decl.c (finish_decl): If the type of decl is error_mark_node,
5904 don't bother trying to do anything.
5905
5906 * typeck.c (convert_for_initialization): If the rhs contains a
5907 constructor call, pretend the lhs type needs to be constructed.
5908
5909 * init.c (expand_default_init): If we stick the object inside the
5910 initializer, mark the initializer used.
5911
5912Tue Aug 30 13:50:18 1994 Jason Merrill (jason@deneb.cygnus.com)
5913
5914 * method.c (build_assign_ref): return *this;
5915 (build_assign_ref): Fix base assignment order.
5916 (build_copy_constructor): Fix member init order.
5917
5918Mon Aug 29 13:54:39 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
5919
5920 * g++.c (main): Remember to clear out SAW_SPECLANG after we see
5921 its argument.
5922
5923Sat Aug 27 09:36:03 1994 Jason Merrill (jason@deneb.cygnus.com)
5924
5925 * method.c (build_copy_constructor): Also copy virtual bases.
5926
5927Fri Aug 26 17:05:15 1994 Jason Merrill (jason@deneb.cygnus.com)
5928
5929 * lex.c (do_pending_inlines): Clear out pending_inlines before doing
5930 any synthesis. Also first set deja_vu on all pending_inlines.
5931
5932 * method.c (build_assign_ref): Use build_member_call to invoke base
5933 operator=, rather than build_modify_expr. And use
5934 build_reference_type instead of TYPE_REFERENCE_TO.
5935 (build_copy_constructor): Use TYPE_NESTED_NAME to identify the
5936 basetype.
5937
5938 * decl2.c (grokfield): Don't complain about undefined local class
5939 methods.
5940
5941 * class.c (finish_struct): Don't try to synthesize methods here.
5942 * lex.c (do_pending_inlines): Instead, synthesize them here.
5943 (init_lex): Initialize synth_obstack.
5944 (cons_up_default_function): Stick synthesis request on
5945 pending_inlines.
5946
5947Fri Aug 26 12:24:14 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
5948
5949 * call.c (build_method_call) [PCC_STATIC_STRUCT_RETURN]: Also
5950 accept an RTL_EXPR in what we're about to use for the instance,
5951 since anything which would end up with pcc_struct_return set
5952 inside cplus_expand_expr.
5953
5954 * cp-tree.h (cons_up_default_function): Note change of prototype.
5955
5956Thu Aug 25 23:05:30 1994 Gerald Baumgartner (gb@cs.purdue.edu)
5957
5958 * class.c (finish_struct): Undid change from Aug 21 testing
5959 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
5960 * parse.y (left_curly): Ditto, undid change from Aug 21.
5961 * decl.c (xref_tag): Undid change from Aug 21, set
5962 CLASSTYPE_INTERFACE correctly, and added comments.
5963
5964Thu Aug 25 00:36:31 1994 Jason Merrill (jason@deneb.cygnus.com)
5965
5966 Rework approach to synthesized methods; don't go through the parser
5967 anymore.
5968 * class.c (finish_struct): Use new synthesis approach.
5969 * lex.c (cons_up_default_function): Now just creates declaration,
5970 not code.
5971 (largest_union_member): #if 0 out.
5972 (default_assign_ref_body): Ditto.
5973 (default_copy_constructor_body): Ditto.
5974 * method.c (build_default_constructor): New function to synthesize X().
5975 (build_copy_constructor): Synthesize X(X&).
5976 (build_assign_ref): Synthesize X::operator=(X&).
5977 (build_dtor): Synthesize ~X().
5978
5979 * error.c (cp_line_of): If we're dealing with an artificial
5980 TYPE_DECL, look at the type instead.
5981
5982Wed Aug 24 11:11:50 1994 Jason Merrill (jason@deneb.cygnus.com)
5983
5984 * init.c (sort_member_init): Check warn_reorder.
5985 * decl2.c (lang_decode_option): Handle -W{no-,}reorder.
5986
5987 * cp-tree.h (CLASSTYPE_SOURCE_LINE): New macro.
5988 * error.c (cp_line_of): Use CLASSTYPE_SOURCE_LINE for aggregates.
5989 * class.c (finish_struct): Set CLASSTYPE_SOURCE_LINE.
5990
6060a796 5991Tue Aug 23 09:28:35 1994 Mike Stump <mrs@cygnus.com>
f376e137
MS
5992
5993 * error.c (dump_decl): Improve wording, so that error messages
5994 dont't read template<, class foo>...
5995
5996Mon Aug 22 15:30:51 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
5997
5998 * parse.y (label_colon): Also match a TYPENAME as a label name,
5999 since they may have declared a class by that name but have also
6000 tried to have a local label under the same name.
6001
6002 * pt.c (coerce_template_parms): Call cp_error, not cp_error_at,
6003 for the message so they know at what point it was instantiated.
6004
6005Sun Aug 21 23:07:35 1994 Gerald Baumgartner (gb@cs.purdue.edu)
6006
6007 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
6008 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures up to left_curly time.
6009 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
db5ae43f 6010 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures down to left_curly time.
f376e137
MS
6011 * parse.y (left_curly): New final resting place for setting
6012 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING for signatures.
6013
6014 * class.c (finish_struct): Don't test for function/field name
6015 conflicts in signatures, since all the fields are compiler-constructed.
6016
6017Fri Aug 19 14:04:47 1994 Kung Hsu (kung@mexican.cygnus.com)
6018
6019 * method.c (build_overload_nested_name): in qualified name
6020 mangling, the template with value instantiation will have numeric
6021 at end and may mixed with the name length of next nested level.
6022 Add a '_' in between.
6023 * method.c (build_overload_name): ditto.
6024 * method.c (build_overload_identifier): ditto.
6025
6060a796 6026Thu Aug 18 16:24:43 1994 Mike Stump <mrs@cygnus.com>
f376e137
MS
6027
6028 * error.c (dump_decl): Handle NULL args.
6029
db5ae43f
MS
6030Thu Sep 29 16:15:36 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
6031
6032 * g++.c: Rework last change so it's done like collect.c (and
6033 gcc.c).
6034
6035Wed Sep 14 10:17:27 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
6036
6037 * g++.c: Include <sys/errno.h> in case `errno' is a macro
6038 as permitted by ANSI C.
6039
6060a796 6040Thu Aug 18 12:48:09 1994 Mike Stump <mrs@cygnus.com>
00595019
MS
6041
6042 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
6043 CLASSTYPE_VTABLE_NEEDS_WRITING up to left_curly time.
6044 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
db5ae43f 6045 CLASSTYPE_VTABLE_NEEDS_WRITING down to left_curly time.
00595019
MS
6046 * parse.y (left_curly): New final resting place for setting
6047 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
6048
6049Thu Aug 11 11:32:42 1994 H.J. Lu (hjl@nynexst.com)
6050
6051 * g++.c (main): Only decrement "added" and set "library" to
6052 NULL when "library" != NULL.
6053
6054Sat Aug 13 00:14:52 1994 Jason Merrill (jason@deneb.cygnus.com)
6055
6056 * decl.c (grokdeclarator): Don't set TREE_PUBLIC on a function decl
6057 just because its class has a known interface.
6058 (decls_match): Deal with new format of template parms.
6059
6060 * lex.c (cons_up_default_function): Don't play with TREE_PUBLIC and
6061 DECL_EXTERNAL here.
6062
6063Fri Aug 12 01:55:15 1994 Jason Merrill (jason@deneb.cygnus.com)
6064
6065 * decl.c (pushtag): SET_DECL_ARTIFICIAL on gratuitous typedefs.
6066 (xref_defn_tag): Ditto.
6067 (pushdecl): Only allow artificial typedefs to be shadowed.
6068
6069 * init.c (emit_base_init): Pass the right binfos to
6070 expand_aggr_init_1.
6071
6072 * class.c (delete_duplicate_fields_1): Make it work right.
6073 (finish_struct): Catch function/field name conflict.
6074
6075 * decl2.c (check_classfn): Pass the function to cp_error, not just
6076 the name.
6077
6078 * init.c (sort_member_init): Warn when order of member initializers
6079 does not match order of member declarations.
6080 (emit_base_init): Call expand_aggr_init_1 with LOOKUP_PROTECT.
6081
6082 * error.c (dump_expr): Handle lists of functions.
6083
6084 * decl.c (start_function): #pragma interface only affects functions
6085 that would otherwise be static.
6086 (finish_decl): Don't warn about an unused variable if it has both
6087 constructor and destructor, since the 'resource allocation is
6088 initialization' idiom is relatively common.
6089
6090 * typeck.c (comp_target_types): Don't handle TEMPLATE_TYPE_PARMs.
6091 (comp_target_parms): Ditto.
6092 (compparms): Never consider default parms.
6093 (common_base_type): Don't choose a virtual baseclass if there is a
6094 more derived class in common.
6095 (build_conditional_expr): If pedantic, pedwarn about conversion to
6096 common base in conditional expr.
6097
6098 * class.c (instantiate_type): Handle template instantiation better.
6099
6100 * typeck.c (convert_arguments): Don't try to get tricky and convert
6101 to int directly when PROMOTE_PROTOTYPES is set, as it breaks
6102 user-defined conversions.
6103
6104 * lex.c (check_for_missing_semicolon): Also give error at end of
6105 file.
6106
6107 * call.c (build_method_call): Don't promote arrays to pointers here.
6108
6109 * typeck.c (convert_arguments): Don't require the actual parameter
6110 to be of a complete type if the formal parameter is a reference.
6111
6112Thu Aug 11 15:21:40 1994 Jason Merrill (jason@deneb.cygnus.com)
6113
6114 * decl.c (grokdeclarator): Soften 'static' on member function error
6115 to pedwarn.
6116
6117 * init.c (build_new): Don't automatically save rval.
6118 (build_offset_ref): Do field lookup with proper basetype_path.
6119
6120Thu Aug 11 12:46:54 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
6121
6122 * errfn.c (cp_silent): Declare to mark when we should avoid
6123 emitting warnings and errors.
6124 (cp_error): Check it.
6125 (cp_warning): Likewise.
6126 (cp_pedwarn): Likewise.
6127 (cp_compiler_error): Likewise.
6128 (cp_error_at): Likewise.
6129 (cp_warning_at): Likewise.
6130 (cp_pedwarn_at): Likewise.
6131 * call.c (compute_conversion_costs): Set CP_SILENT when we start
6132 out, and make sure we turn it off before we leave.
6133
6134Thu Aug 11 00:02:54 1994 Jason Merrill (jason@deneb.cygnus.com)
6135
6136 * decl2.c (grok_array_decl): Try computing *(A+B) if neither
6137 argument is obviously an array.
6138
6139Wed Aug 10 15:32:04 1994 Jason Merrill (jason@deneb.cygnus.com)
6140
6141 * typeck.c (c_expand_start_case): Do cleanups here.
6142
6143 * parse.y (xcond): Do bool conversion here, too.
6144 (simple_stmt, SWITCH case): Don't do cleanups here.
6145
6146 * decl.c (duplicate_decls): Don't treat builtins that have been
6147 explicitly declared specially.
6148
6149Tue Aug 9 01:16:09 1994 Jason Merrill (jason@deneb.cygnus.com)
6150
6151 * tree.c (make_deep_copy): Support copying pointer, reference,
6152 function, array, offset and method types.
6153
6154 * decl.c (init_decl_processing): Mark exit and abort as
6155 BUILT_IN_NONANSI so that duplicate_decls is kinder about
6156 redeclaration.
6157 (duplicate_decls): Don't give two errors for redeclaring a C
6158 function with the same parms but a different return type.
6159
6160 * parse.y (paren_cond_or_null): Do cleanup and bool conversion here.
6161 (condition): Instead of here.
6162 (simple_stmt, SWITCH case): Also do cleanup here.
6163
6164 * decl2.c (finish_anon_union): Only break out FIELD_DECLs.
6165
6166 * call.c (build_method_call): Don't throw away the side effects of
6167 the object in a call to a non-existent constructor.
6168 * parse.y (primary): Ditto.
6169
6170 * method.c (build_decl_overload): Oop.
6171
6172 * decl2.c (lang_decode_option): Deal with flag_no_nonansi_builtin,
6173 warn about uselessness of specifying -fansi-overloading.
6174
6175 * method.c (build_decl_overload): Treat any non-member new with one
6176 parameter as __builtin_new.
6177
6178 * decl.c (init_decl_processing): Setup built-in meanings of exit,
6179 _exit and abort.
6180
6181Mon Aug 8 15:03:30 1994 Jason Merrill (jason@deneb.cygnus.com)
6182
6183 * error.c (dump_readonly_or_volatile): Put a space between const and
6184 volatile if both apply.
6185
6186 * init.c (perform_member_init): Clean up after this initialization.
6187 (emit_base_init): Clean up after each base init, not after all have
6188 been done.
6189 (expand_aggr_vbase_init_1): Clean up after this init.
6190
6191Sun Aug 7 14:55:05 1994 Jason Merrill (jason@deneb.cygnus.com)
6192
6193 * call.c (build_method_call): Deal with destroying references.
6194
6195 * parse.y (condition): Do bool_truthvalue_conversion here.
6196 (paren_expr_or_null): And here.
6197 (simple_if): Not here.
6198 (simple_stmt): Or here.
6199
6200Sat Aug 6 22:29:45 1994 Jason Merrill (jason@deneb.cygnus.com)
6201
6202 * parse.y (paren_expr_or_null): Wrap the expression in a
6203 CLEANUP_POINT_EXPR.
6204 (condition): Ditto.
6205
6206Sat Aug 6 19:46:37 1994 Rohan Lenard (rjl@easams.com.au)
6207
6208 * call.c (build_scoped_method_call): Fix error message when
6209 destructor call refers to a nonexistent type.
6210
6211Sat Apr 16 22:43:30 1993 Gerald Baumgartner (gb@cs.purdue.edu)
6212
6213 * lex.h (rid): Deleted RID_RAISES, it's never used.
6214 Moved RID_PUBLIC, RID_PRIVATE, RID_PROTECTED, RID_EXCEPTION,
6215 RID_TEMPLATE and RID_SIGNATURE to the end of the enumeration,
6216 they don't need to be touched in `grokdeclarator.'
6217 (RID_LAST_MODIFIER): Defined macro to be RID_MUTABLE.
6218
6219 * decl.c (grokdeclarator): Use RID_LAST_MODIFIER instead of
6220 RID_MAX as loop limit for finding declaration specifiers.
6221
6222Sat Apr 3 21:59:07 1993 Gerald Baumgartner (gb@cs.purdue.edu)
6223
6224 * lex.c (debug_yytranslate): Moved to parse.y since it needs to
6225 access `yytname,' which is static in parse.c.
6226
6227Fri Apr 2 23:36:57 1993 Gerald Baumgarnter (gb@cs.purdue.edu)
6228
6229 * cp-tree.h (GNU_xref_ref): Fixed typo in extern declaration, it
6230 was `GNU_xref_def' instead of `GNU_xref_ref.'
6231
6232Fri Aug 5 14:20:16 1994 Jason Merrill (jason@deneb.cygnus.com)
6233
6234 * pt.c (do_function_instantiation): Don't set TREE_PUBLIC and
6235 DECL_EXTERNAL on 'extern' instantiations; wait until EOF to do that.
6236 (do_type_instantiation): Ditto.
6237
6238 * decl2.c (import_export_inline): Decides at EOF what an inline's
6239 linkage should be.
6240 (finish_file): Call it.
6241
6242 * decl.c (start_function): Don't rely on the settings of TREE_PUBLIC
6243 and DECL_EXTERNAL from do_*_instantiation. Only set
6244 DECL_DEFER_OUTPUT on inlines whose linkage might actually change.
6245 (finish_function): Use DECL_DEFER_OUTPUT to decide which inlines to
6246 mark for later consideration, rather than DECL_FUNCTION_MEMBER_P.
6247
6060a796 6248Fri Aug 5 01:12:20 1994 Mike Stump <mrs@cygnus.com>
a292b002
MS
6249
6250 * class.c (get_class_offset_1, get_class_offset): New routine to
6251 find the offset of the class where a virtual function is defined,
6252 from the complete type.
6253 * class.c (modify_one_vtable, fixup_vtable_deltas): Use
6254 get_class_offset instead of virtual_offset as get_class_offset will
6255 always provide the right answer.
6256 * tree.c (virtual_offset): Remove. It only ever worked some of the
6257 time.
6258
6259Tue Aug 2 12:44:21 1994 Jason Merrill (jason@deneb.cygnus.com)
6260
6261 * call.c (build_method_call): Put back unary_complex_lvalue call
6262 that I thought was redundant.
6263
6264 * typeck.c (c_expand_return): Fix a case I missed before.
6265
6266Sun Jul 31 17:54:02 1994 Jason Merrill (jason@deneb.cygnus.com)
6267
6268 * pt.c (unify): Strip cv-quals from template type arguments (when
6269 'const T*' is matched to 'const char*', that does not mean that T is
6270 'const char').
6271
6272Fri Jul 29 01:03:06 1994 Jason Merrill (jason@deneb.cygnus.com)
6273
6274 * pt.c (do_type_instantiation): Instantiate nested TAGS, not
6275 typedefs. Third time's the charm?
6276
6277 * parse.y (template_parm): Support default template parms.
6278 * pt.c (process_template_parm): Ditto.
6279 (end_template_parm_list): Ditto.
6280 (coerce_template_parms): Ditto.
6281 (mangle_class_name_for_template): Ditto.
6282 (push_template_decls): Ditto.
6283 (unify): Ditto.
6284 * method.c (build_overload_identifier): Ditto.
6285 * error.c (dump_decl): Ditto.
6286
6287Wed Jul 27 17:47:00 1994 Jason Merrill (jason@deneb.cygnus.com)
6288
6289 * pt.c (do_type_instantiation): Only instantiate nested *classes*.
6290
6291Tue Jul 26 13:22:40 1994 Jason Merrill (jason@deneb.cygnus.com)
6292
6293 * search.c (note_debug_info_needed): Also emit debugging information
6294 for the types of fields.
6295
6296Mon Jul 25 00:34:44 1994 Jason Merrill (jason@deneb.cygnus.com)
6297
6298 * pt.c (lookup_template_class): Pass 'template' to
6299 coerce_template_parms instead of 'in_decl', since it's a more
6300 meaningful context.
6301
6302 * typeck.c (c_expand_return): Make sure any cleanups for the return
6303 expression get run.
6304 (build_c_cast): Use CONVERT_EXPR for conversion to void.
6305
6306 * pt.c (do_type_instantiation): Also instantiate nested types.
6307
6308 * typeck.c (convert_for_assignment): Don't die when comparing
6309 pointers with different levels of indirection.
6310
6311 * decl.c (grokdeclarator): The sub-call to grokdeclarator for
6312 class-local typedefs sets DECL_ARGUMENTS, so we need to clear it
6313 out.
6314
6315 * decl2.c (finish_anon_union): Don't die if the union has no
6316 members.
6317
6318 * decl.c (grokdeclarator): Undo changes to declspecs when we're done
6319 so that 'typedef int foo, bar;' will work.
6320
6321 * decl2.c (finish_file): Don't call expand_aggr_init for
6322 non-aggregates.
6323
6324Mon Jul 25 00:03:10 1994 Teemu Torma (tot@trema.fi)
6325
6326 * decl.c (finish_function): We can't inline constructors and
6327 destructors under some conditions with -fpic, but don't unset
6328 DECL_INLINE.
6329
6330Mon Jul 25 00:03:10 1994 Jason Merrill (jason@deneb.cygnus.com)
6331
6332 * typeck.c (build_object_ref): Make sure 'datum' is a valid object.
6333
6334Sun Jul 24 14:19:31 1994 Jason Merrill (jason@deneb.cygnus.com)
6335
6336 * class.c (finish_struct): Don't set DECL_FIELD_BITPOS on
6337 non-fields.
6338 (finish_struct_methods): Use copy_assignment_arg_p.
6339
6340 * cvt.c (cp_convert): If expr is an OFFSET_REF, resolve it instead
6341 of giving an error.
6342
6343 * typeck.c (build_binary_op_nodefault): Don't set result_type if we
6344 don't know how to compare the operands.
6345
6346 * decl.c (grokdeclarator): Avoid seg fault when someone uses '__op'
6347 as a declarator-id in their program. Like the Linux headers do.
6348 Arrgh.
6349
6350 * tree.c (lvalue_p): Treat calls to functions returning objects by
6351 value as lvalues again.
6352
6353 * typeck.c (build_component_addr): Use convert_force to convert the
6354 pointer in case the component type is also a private base class.
6355
6356 * search.c (get_matching_virtual): Fix bogus warning of overloaded
6357 virtual.
6358
6359 * pt.c (overload_template_name): Set DECL_ARTIFICIAL on the created
6360 TYPE_DECL to fix bogus shadowing warnings.
6361
6362Fri Jul 22 01:15:32 1994 Jason Merrill (jason@deneb.cygnus.com)
6363
6364 * init.c (expand_aggr_init_1): const and volatile mismatches do not
6365 prevent a TARGET_EXPR from initializing an object directly.
6366
6367Tue Jul 19 17:55:37 1994 Jason Merrill (jason@deneb.cygnus.com)
6368
6369 * cvt.c (build_up_reference): Allow building up references to
6370 `this', don't warn about making references to artificial variables
6371 (like `this').
6372
6373 * tree.c (lvalue_p): `this' is not an lvalue.
6374
6375 * call.c (build_method_call): Accept using a typedef name (or
6376 template type parameter) for explicit destructor calls.
6377
72b7eeff
MS
6378Thu Jul 14 09:42:23 1994 Mike Stump <mrs@cygnus.com>
6379
6380 * Version 2.6.0 released.
6381
cf17cae3
JM
6382Wed Jul 13 03:57:54 1994 Jason Merrill (jason@deneb.cygnus.com)
6383
a292b002
MS
6384 * method.c (hack_identifier): Put back old code so lists of
6385 non-functions will be handled properly.
a5ef9010 6386
a292b002
MS
6387 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): #if 0 out; this macro is now
6388 defined in the language-independent tree.h.
cf17cae3 6389
a292b002
MS
6390 * tree.c (count_functions): Avoid bogus warning when compiling this
6391 function.
cf17cae3
JM
6392
6393Mon Jul 11 18:37:20 1994 Jason Merrill (jason@deneb.cygnus.com)
6394
a292b002
MS
6395 * decl.c (grok_reference_init): Always save the initializer of a
6396 reference.
cf17cae3 6397
6060a796 6398Fri Jul 8 17:41:46 1994 Mike Stump <mrs@cygnus.com>
5b605f68
MS
6399
6400 * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside
6401 CLEANUP_POINT_EXPRs so that the stack slots can be reused.
63c68bb7 6402 (disabled for now)
5b605f68
MS
6403
6404Fri Jul 8 12:59:38 1994 Jason Merrill (jason@deneb.cygnus.com)
6405
6406 * method.c (hack_identifier): Fix for new overloading.
6407
6408 * typeck.c (build_binary_op_nodefault): Don't mess with division by
db5ae43f 6409 zero.
5b605f68
MS
6410
6411Fri Jul 8 13:20:28 1994 Gerald Baumgartner (gb@cs.purdue.edu)
6412
6413 * decl2.c (finish_file): Only call walk_sigtables, if
6414 flag_handle_signatures is turned on, don't waste time otherwise.
6415
6416Fri Jul 8 02:27:41 1994 Jason Merrill (jason@deneb.cygnus.com)
6417
6418 * decl.c (push_overloaded_decl): Don't create overloads of one when
6419 shadowing a class type.
a292b002 6420 * typeck.c (build_x_function_call): Complain about overloads of one.
5b605f68
MS
6421
6422 * decl.c (grokdeclarator): Don't try to treat a char* as a tree.
6423 (grokdeclarator): Fix setting of TREE_STATIC.
6424 (start_decl): Clear DECL_IN_AGGR_P after calling duplicate_decls.
6425
311862c8
GB
6426Thu Jul 7 22:20:46 1994 Gerald Baumgartner (gb@andros.cygnus.com)
6427
6428 * cp-tree.h (walk_sigtables): Created extern declaration.
6429 * decl2.c (walk_sigtables): Created function, patterned after
6430 walk_vtables, even though we only need it to write out sigtables.
6431 (finish_sigtable_vardecl): Created function.
6432 (finish_vtable_vardecl): Changed 0 to NULL_PTR.
6433 (finish_file): Call walk_sigtables.
6434
6435 * sig.c (build_signature_table_constructor): Mark class member
6436 function pointed to from signature table entry as addressable.
6437
5b605f68
MS
6438Thu Jul 7 13:39:37 1994 Jason Merrill (jason@deneb.cygnus.com)
6439
6440 * decl.c (start_decl): Check new decl of static member variable
6441 against the declaration in the class here.
6442 (grokvardecl): Instead of here.
6443
6444 * class.c (prepare_fresh_vtable): Call import_export_vtable if not
6445 -fvtable-thunks.
6446 (build_vtable): Ditto.
6447
6448 * decl2.c (import_export_vtable): Move logic for deciding the
6449 interface of a template class from here.
6450 (import_export_template): To here.
6451 (finish_vtable_vardecl): Call import_export_template before
6452 import_export_vtable.
6453
6060a796 6454Wed Jul 6 20:25:48 1994 Mike Stump <mrs@cygnus.com>
a3b49ccd
MS
6455
6456 * except.c (init_exception_processing): Setup interim_eh_hook to
6457 call lang_interim_eh.
6458 * except.c (do_unwind): Propagate throw object value across
6459 stack unwinding.
6460 * except.c (saved_throw_value): Used to hold the value of the object
6461 being thrown. It is always a reference to the real value.
6462 * except.c (expand_start_catch_block): Add handling for the
6463 value of the exception object.
6464 * except.c (expand_start_catch_block): Add handler for the handler,
6465 so that throws inside the handler go to the outer block.
6466 * except.c (expand_end_catch_block): Ditto.
6467 * parse.y (handler_args): Use parm instead, as the other doesn't yet
6468 handle references correctly.
6469
6470Wed Jul 6 17:55:32 1994 Per Bothner (bothner@kalessin.cygnus.com)
6471
6472 * decl2.c (mark_vtable_entries): If -ftable-thunks, set the
6473 vtable entry properly to abort.
6474
5b605f68
MS
6475Tue Jul 5 14:07:54 1994 Jason Merrill (jason@deneb.cygnus.com)
6476
6477 * typeck.c (build_binary_op_nodefault): Downgrade division by zero
6478 errors to warnings.
6479
6480 * call.c (build_overload_call_real): Handle fnname being a list of
6481 functions.
6482 * typeck.c (build_x_function_call): Pass list of functions to
6483 build_overload_call, not just the name.
6484 * tree.c (count_functions): Complain when called for invalid
6485 argument.
6486
6487 * decl.c (grokdeclarator): Fix settings of TREE_STATIC, TREE_PUBLIC
6488 and DECL_EXTERNAL on static members and initialized const members.
6489 * decl2.c (grokfield): Reflect this change.
6490
9a0e77ba
JM
6491Fri Jul 1 09:35:51 1994 Jason Merrill (jason@deneb.cygnus.com)
6492
6493 * parse.y (init): ANSI C++ does not forbid { }.
6494
6495Thu Jun 30 00:35:22 1994 Jason Merrill (jason@deneb.cygnus.com)
6496
6497 * decl2.c (lang_decode_option): Set warn_nonvdtor along with -Wall.
6498 warn_nonvdtor defaults to off.
6499
6500 * class.c (instantiate_type): Use comptypes rather than relying on
6501 types to satisfy ==.
6502
6503 * decl.c (start_function): Set DECL_DEFER_OUTPUT on all inlines that
6504 might be static.
6505
6506 * tree.c (build_cplus_new): Never build WITH_CLEANUP_EXPRs.
6507
6508 * decl.c (grok_reference_init): Deal with ADDR_EXPRs of TARGET_EXPRs.
6509
6510 * cvt.c (cp_convert): Pass 0 to with_cleanup_p arg of
6511 build_cplus_new.
6512
6513Wed Jun 29 22:31:09 1994 Jason Merrill (jason@deneb.cygnus.com)
6514
6515 * decl2.c (finish_file): Maybe consider static inlines multiple
6516 times, in case they reference each other.
6517
63718c49
GB
6518Tue Jun 28 11:58:38 1994 Gerald Baumgartner (gb@cs.purdue.edu)
6519
6520 * class.c (finish_struct): Don't `cons_up_default_function's
6521 for signatures.
6522 (finish_struct): Handle an empty method_vec correctly.
6523
6524 * decl.c (grokdeclarator): Don't warn about a signature being
6525 empty in a signature pointer declaration if we only saw a
6526 forward declaration of the signature. Changed `warning's into
6527 `cp_warning's.
6528
6529 * sig.c (build_sigtable): Don't die if a null signature table
6530 constructor is returned.
6531 (build_signature_pointer_constructor): If the signature table
6532 constructor is null, the _sptr field is set to a null pointer
6533 and cast to the appropriate type. Make copies of all null
6534 pointers so that the type null_pointer_node doesn't get changed.
6535 (build_signature_table_constructor): Added comments.
6536
6537 * sig.c (build_signature_pointer_constructor): Complain if we
6538 try to assign to/initialize a signature pointer/reference of
6539 an undefined signature.
6540
6541Mon Jun 27 14:05:16 1994 Gerald Baumgartner (gb@cs.purdue.edu)
6542
6543 * typeck2.c (store_init_value): Don't be pedantic about
6544 non-constant initializers of signature tables/pointers/references.
6545
6546Fri Jun 24 16:49:41 1994 Gerald Baumgartner (gb@cs.purdue.edu)
6547
6548 * decl.c (grokdeclarator): If we are grokking an opaque typedef
6549 in a signature, don't complain about it begin static.
6550
6060a796 6551Wed Jun 29 16:44:45 1994 Mike Stump <mrs@cygnus.com>
21474714
MS
6552
6553 Fixes a problem of the this pointer being wrong in virtual calls to
6554 methods that are not overridden in more derived classes.
6555
6556 * class.c (fixup_vtable_delta): New routine. It will fixup the
6557 delta entries in vtables, wheever they need updating.
6558 * class.c (finish_struct): Call the new routine for all virtual
6559 bases, as they can have different offsets, than those used in base
6560 classes that we derive our vtable from.
6561
6562Tue Jun 28 23:49:28 1994 Jason Merrill (jason@deneb.cygnus.com)
6563
6564 * typeck.c (build_binary_op): Use the types before default
6565 conversions in the error message.
6566
6567 * *.c: Use c_build_type_variant instead of build_type_variant where
6568 the type might be an array.
6569
6570 * call.c (build_method_call): Call build_type_variant and
6571 build_reference_type in the right order.
6572 * decl.c (record_builtin_type): Ditto.
6573
6574Wed Jun 29 16:58:53 1994 Jason Merrill (jason@deneb.cygnus.com)
6575
6576 * call.c (build_method_call): Call build_type_variant and
6577 build_reference_type in the right order.
6578 * decl.c (record_builtin_type): Ditto.
6579
6580Tue Jun 28 23:49:28 1994 Jason Merrill (jason@deneb.cygnus.com)
6581
6582 * typeck.c (build_binary_op): Use the types before default
6583 conversions in the error message.
6584
6585 * *.c: Use c_build_type_variant instead of build_type_variant where
6586 the type might be an array.
6587
6588Sat Jun 25 11:50:54 1994 Jason Merrill (jason@deneb.cygnus.com)
6589
6590 * cvt.c (convert_to_reference): Try UDC's before doing the
6591 reinterpret_cast thang, though.
6592
6593Fri Jun 24 01:24:01 1994 Jason Merrill (jason@deneb.cygnus.com)
6594
6595 * typeck.c (c_expand_return): Don't USE the return value location
6596 after we've expanded the jump.
6597
6598 * decl2.c (finish_file): Make sure DECL_SAVED_INSNS is not 0 before
6599 trying to write out an inline.
6600
6601 * cvt.c (build_up_reference): Also do address adjustment when the
6602 target type uses MI.
6603 (convert_to_reference): Try UDCs only after built-in conversions.
6604 (build_type_conversion_1): Don't play games with the argument to the
6605 method.
6606 (build_type_conversion): #if 0 out code for binding to reference.
6607
a3203465
MS
6608Thu Jun 23 00:22:28 1994 Jason Merrill (jason@deneb.cygnus.com)
6609
21474714
MS
6610 * decl2.c (finish_file): Use TREE_SYMBOL_REFERENCED to decide
6611 whether to emit inlines.
6612
a3203465
MS
6613 * decl.c (grokdeclarator): Set explicit_int for decls that just
6614 specify, say, 'long'.
6615
6616 * init.c (do_friend): Do overload C functions (or call pushdecl,
63718c49 6617 anyaway).
a3203465
MS
6618
6619Wed Jun 22 13:40:49 1994 Jason Merrill (jason@deneb.cygnus.com)
6620
6621 * cvt.c (build_up_reference): Don't call readonly_error.
6622 (convert_to_reference): Propagate const and volatile from expr to
6623 its type.
6624
6625 * tree.c (lvalue_p): Random CALL_EXPRs are not lvalues.
6626
6627 * cvt.c (build_up_reference): Break out WITH_CLEANUP_EXPR when
6628 creating a temporary.
6629 (convert_to_reference): Lose excessive and incorrect trickiness.
6630 (cp_convert): Call build_cplus_new with with_cleanup_p set.
6631
6632 * typeck2.c (build_functional_cast): Ditto.
6633
6634Tue Jun 21 17:38:38 1994 Jason Merrill (jason@deneb.cygnus.com)
6635
6636 * decl.c (grokdeclarator): signed, unsigned, long and short all
6637 imply 'int'.
6638
6639 * decl.c (grokdeclarator): Allow "this is a type" syntax.
6640 (grok_reference_init): Simplify and fix.
6641
6642Sun Jun 19 17:08:48 1994 Jason Merrill (jason@deneb.cygnus.com)
6643
6644 * decl.c (grokdeclarator): pedwarn about a typedef that specifies no
6645 type.
6646
6647Sat Jun 18 04:16:50 1994 Jason Merrill (jason@deneb.cygnus.com)
6648
6649 * decl.c (start_function): Move TREE_PUBLIC and DECL_EXTERNAL
6650 tinkering to after call to pushdecl.
6651
6652Fri Jun 17 14:48:28 1994 Jason Merrill (jason@deneb.cygnus.com)
6653
6654 * call.c (build_method_call): Handle destructors for non-aggregate
6655 types properly.
6656
6657Thu Jun 16 16:48:05 1994 Jason Merrill (jason@deneb.cygnus.com)
6658
6659 * call.c (build_method_call): Make sure that the name given for the
6660 destructor matches the constructor_name of the instance.
6661
6662 * pt.c (do_function_instantiation): A non-extern instantiation
6663 overrides a later extern one.
6664 (do_type_instantiation): Ditto.
6665
6666Wed Jun 15 19:34:54 1994 Jason Merrill (jason@deneb.cygnus.com)
6667
6668 * init.c (expand_aggr_init): Use TYPE_MAIN_VARIANT to get the
6669 unqualified array type.
6670
6671 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Tests whether NODE is a
6672 CONSTRUCTOR with no elements.
6673
6674 * decl.c (various): Lose empty_init_node.
6675 (finish_decl): Use EMPTY_CONSTRUCTOR_P, do the empty CONSTRUCTOR
6676 thing depending on the value of DECL_COMMON instead of
6677 flag_conserve_space, do the empty CONSTRUCTOR thing for types that
6678 don't have constructors, don't treat a real empty CONSTRUCTOR
6679 specially.
6680
6681 * typeck2.c (process_init_constructor): Don't treat empty_init_node
6682 specially.
6683
6060a796 6684Wed Jun 15 19:05:25 1994 Mike Stump <mrs@cygnus.com>
a3203465
MS
6685
6686 * class.c (override_one_vtable): Don't forget to merge in an old
6687 overrider when we wanted to reuse a vtable, but couldn't.
6688
6689Wed Jun 15 15:03:16 1994 Jason Merrill (jason@deneb.cygnus.com)
6690
6691 * decl.c (start_decl): Put statics in common again.
6692
6693 * decl.c (grokdeclarator): Return NULL_TREE for an error rather than
6694 setting the type to error_mark_node.
6695
6696 * typeck.c (build_modify_expr): Build up a COMPOUND_EXPR for enum
6697 bitfield assignments.
6698
f0e01782
MS
6699Tue Jun 14 12:23:38 1994 Jason Merrill (jason@deneb.cygnus.com)
6700
6701 * decl.c (grok_op_properties): Const objects can be passed by value.
6702
6703Mon Jun 13 03:10:59 1994 Jason Merrill (jason@deneb.cygnus.com)
6704
6705 * decl2.c (import_export_vtable): Force implicit instantiations to
6706 be interface_only when -fno-implicit-templates.
6707
6708 * decl.c (duplicate_decls): Redeclaring a class template name is an
6709 error.
6710
6711 * pt.c (end_template_decl): Call GNU_xref_decl for class templates.
6712 * xref.c (GNU_xref_decl): Support templates.
6713
6714Sat Jun 11 17:09:05 1994 Jason Merrill (jason@deneb.cygnus.com)
6715
6716 * decl.c (grok_op_properties): Split out checking for whether this
6717 function should suppress the default assignment operator.
6718 * decl2.c (grok_function_init): Ditto.
6719 (copy_assignment_arg_p): New function do do just that.
6720 Now considers virtual assignment operators that take a base as an
6721 argument to count as copy assignment operators.
6722
6723 * search.c (dfs_debug_mark): Lose checks for DWARF_DEBUG and
6724 TREE_ASM_WRITTEN, as they are redundant.
6725
6726 * pt.c (end_template_decl): Don't try to set DECL_CLASS_CONTEXT on a
6727 decl that has no LANG_SPECIFIC part.
6728 (do_type_instantiation): Force the debugging information for this
6729 type to be emitted.
6730
6731 * decl.c (start_decl): Clear up uses of various types of templates
6732 (say sorry for static data members, rather than "invalid template").
6733 (expand_static_init): Fix initialization of static data members of
6734 template classes.
6735
6736Fri Jun 10 00:41:19 1994 Jason Merrill (jason@deneb.cygnus.com)
6737
6738 * decl.c (grokdeclarator): Set DECL_CONTEXT on static data members.
6739
6740 * g++.c (main): Use -xc++-cpp-output for .i files.
6741
6742 * pt.c (tsubst): Give meaningful error about declaring template for
6743 a copy constructor which was not declared in the class template.
6744 (do_type_instantiation): Explicit instantiation before the class
6745 template is an error.
6746 (instantiate_template): Don't die if tsubst returns error_mark_node.
6747
6748Thu Jun 9 19:04:59 1994 Jason Merrill (jason@deneb.cygnus.com)
6749
6750 Don't synthesize the copy assignment operator if the one in a base
6751 class is pure virtual.
6752 * cp-tree.h (TYPE_HAS_ABSTRACT_ASSIGN_REF): New macro to indicate
6753 whether the type has a pure virtual copy assignment operator.
6754 * class.c (finish_base_struct): Don't generate the copy assignment
6755 operator if a base class has a pure virtual one.
6756 * decl.c (grok_op_properties): Add disabled code to set
6757 TYPE_HAS_ABSTRACT_ASSIGN_REF with comment pointing to where it is
6758 actually set.
6759 * decl2.c (grok_function_init): Set TYPE_HAS_ABSTRACT_ASSIGN_REF.
6760
6761 * decl2.c (import_export_vtable): Always treat template
6762 instantiations as if write_virtuals >= 2, and treat implicit
6763 instantiations as external if -fno-implicit-templates.
6764 (finish_file): Output all pending inlines if
6765 flag_keep_inline_functions.
6766
6060a796 6767Wed Jun 8 20:48:02 1994 Mike Stump <mrs@cygnus.com>
f0e01782
MS
6768
6769 * tree.c (layout_vbasetypes): Align virtual base classes inside
6770 complete objects, so that we don't core dump on machines such as
6771 SPARCs when we access members that require larger than normal
6772 alignments, such as a double. Also, we bump up the total alignment
6773 on the complete type, as necessary.
6774
6775Wed Jun 8 16:18:14 1994 Jason Merrill (jason@deneb.cygnus.com)
6776
6777 * gxxint.texi (Free Store): New section with code for examining
6778 cookie.
6779 (Limitations of g++): Remove operator delete entry, since it is no
6780 longer accurate. Fix access control entry.
6781
6782 * typeck.c (build_unary_op): Pedwarn about taking the address of or
6783 incrementing a cast to non-reference type.
6784 (build_modify_expr): Use convert instead of convert_force again.
6785
6786 * search.c (get_base_distance): Use IS_AGGR_TYPE_CODE to check for
6787 class type, not == RECORD_TYPE.
6788
6789 * decl.c (grokdeclarator): Cope with grokfndecl returning NULL_TREE.
6790
6791 * typeck2.c (report_case_error): #if 0 out.
6792 * lex.c (real_yylex): Lose RANGE.
6793 * parse.y: Ditto.
6794
6795Tue Jun 7 18:17:35 1994 Jason Merrill (jason@deneb.cygnus.com)
6796
6797 * parse.y (simple_stmt, case ranges): Use ELLIPSIS instead of RANGE.
6798
6799Mon Jun 6 19:39:57 1994 Jason Merrill (jason@deneb.cygnus.com)
6800
6801 * typeck.c (build_c_cast): Don't shortcut conversions to the same
6802 type. Don't replace consts with their values here, since that's now
6803 done in cp_convert.
6804
6805 * cvt.c (cp_convert): When converting to bool, take
6806 integer_zero_node to false_node and all other INTEGER_CSTs to
6807 true_node.
6808 (build_type_conversion): Don't complain about multiple conversions
6809 to float if we're not really converting.
6810
a0a33927
MS
6811Fri Jun 3 02:10:56 1994 Jason Merrill (jason@deneb.cygnus.com)
6812
f0e01782
MS
6813 Implement 'extern template class A<int>;' syntax for suppressing
6814 specific implicit instantiations.
6815 * cp-tree.h: Update prototypes for do_*_instantiation.
6816 * pt.c (do_pending_expansions): Don't compile 'extern' explicit
6817 instantiations.
6818 (do_function_instantiation): Set DECL_EXTERNAL on 'extern' explicit
6819 instantiations.
6820 (do_type_instantiation): Ditto.
6821 * parse.y (explicit_instantiation): Support 'extern template class
6822 A<int>;' syntax.
6823 * decl.c (start_function): Don't modify the settings of TREE_PUBLIC
6824 and DECL_EXTERNAL on explicit instantiations.
6825
a0a33927
MS
6826 * cvt.c (cp_convert): Replace constants with their values before
6827 converting.
f0e01782 6828 (cp_convert): Consistently use 'e' instead of 'expr'.
a0a33927
MS
6829
6830Thu Jun 2 03:53:30 1994 Jason Merrill (jason@deneb.cygnus.com)
6831
6832 * typeck2.c (build_x_arrow): Resolve OFFSET_REFs first.
6833
6834Wed Jun 1 18:57:35 1994 Jason Merrill (jason@deneb.cygnus.com)
6835
6836 * typeck2.c (digest_init): Handle initializing a pmf with an
6837 overloaded method.
6838 * typeck.c (build_ptrmemfunc): Handle overloaded methods.
6839
6840 * decl.c (pushtag): Use build_decl to make TYPE_DECLs.
6841 (xref_defn_tag): Ditto.
6842 * pt.c (process_template_parm): Ditto.
6843 (lookup_template_class): Ditto.
6844 (push_template_decls): Ditto.
6845 (instantiate_class_template): Ditto.
6846 (create_nested_upt): Ditto.
6847 * class.c (finish_struct): Don't try to set DECL_CLASS_CONTEXT on
6848 TYPE_DECLs.
6849
6850 * typeck.c (convert_arguments): Make sure type is not NULL before
6851 checking its TREE_CODE.
6852
6060a796 6853Wed Jun 1 17:40:39 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
6854
6855 * class.c (get_derived_offset): New routine.
6856 * class.c (finish_base_struct): Make sure we set BINFO_VTABLE and
6857 BINFO_VIRTUALS when we choose a new base class to inherit from.
6858 * class.c (modify_one_vtable): Use get_derived_offset to get the
6859 offset to the most base class subobject that we derived this binfo
6860 from.
6861 * class.c (finish_struct): Move code to calculate the
6862 DECL_FIELD_BITPOS of the vfield up, as we need might need it for
6863 new calls to get_derived_offset in modify_one_vtable.
6864
6865Wed Jun 1 16:50:59 1994 Jason Merrill (jason@deneb.cygnus.com)
6866
6867 * init.c (build_member_call): Use build_pointer_type instead of
6868 TYPE_POINTER_TO.
6869
6870Wed Jun 1 11:11:15 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
6871
6872 * decl.c (grokdeclarator): Make sure we have a DNAME set before we
6873 try to use it in an error.
6874
6060a796 6875Wed Jun 1 09:48:49 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
6876
6877 * typeck.c (convert_arguments, convert_for_initialization): Don't
6878 strip NOP_EXPRs, when we are converting to a reference.
6879
6880Wed Jun 1 01:11:38 1994 Jason Merrill (jason@deneb.cygnus.com)
6881
6882 * typeck.c (build_modify_expr): Don't dereference references when
6883 initializing them.
6884
6885 * decl2.c (grokfield): Don't check for grokdeclarator returning
6886 error_mark_node any more.
6887
6888 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
6889 (start_method): Return void_type_node instead of error_mark_node.
6890
6891 * typeck.c (build_modify_expr): Resolve offset refs earlier.
6892
6893Tue May 31 16:06:58 1994 Jason Merrill (jason@deneb.cygnus.com)
6894
6895 * call.c (build_method_call): Resolve OFFSET_REFs in the object.
6896
6897 * typeck.c (build_modify_expr): Dereference references before trying
6898 to assign to them.
6899
6900 * call.c (build_method_call): Don't confuse type conversion
6901 operators with constructors.
6902 * typeck2.c (build_functional_cast): Just call build_c_cast if there
6903 was only one parameter.
6904 * method.c (build_typename_overload): Don't set
6905 IDENTIFIER_GLOBAL_VALUE on these identifiers.
6906 * decl.c (grok_op_properties): Warn about defining a type conversion
6907 operator that converts to a base class (or reference to it).
6908 * cvt.c (cp_convert): Don't try to use a type conversion operator
6909 when converting to a base class.
6910 (build_type_conversion_1): Don't call constructor_name_full on an
6911 identifier.
6912 * cp-tree.h (DERIVED_FROM_P): Should be self-explanatory.
6913
6914 * decl.c (start_decl): Don't complain that error_mark_node is an
6915 incomplete type.
6916 (finish_decl): Check for type == error_mark_node.
6917
6918Mon May 30 23:38:55 1994 Jason Merrill (jason@deneb.cygnus.com)
6919
6920 * decl.c (start_function): Set DECL_DEFER_OUTPUT on implicit
6921 instantiations and inline members.
6922
6923 * spew.c (yylex): Set looking_for_template if the next token is a '<'.
6924
6925 * lex.h: Declare looking_for_template.
6926
6927 * decl.c (lookup_name_real): Use looking_for_template to arbitrate
6928 between type and template interpretations of an identifier.
6929
6930Sat May 28 04:07:40 1994 Jason Merrill (jason@deneb.cygnus.com)
6931
6932 * pt.c (instantiate_template): Zero out p if we found a
6933 specialization.
6934
6935 * decl.c (grokdeclarator): Elucidate warning.
6936 (grokdeclarator): If pedantic AND -ansi, complain about long long.
6937
6938 Make explicit instantiation work reasonably. It is now appropriate
6939 to deprecate the use of -fexternal-templates.
6940 * pt.c (instantiate_template): Set DECL_TEMPLATE_SPECIALIZATION or
6941 DECL_IMPLICIT_INSTANTIATION on fndecl as appropriate.
6942 (end_template_instantiation): Reflect changes in USE_TEMPLATE
6943 semantics.
6944 (do_pending_expansions): if (!flag_implicit_templates) DECIDE(0);
6945 (do_function_instantiation): Don't set EXPLICIT_INST if
6946 flag_external_templates is set. Do set TREE_PUBLIC and DECL_EXTERN
6947 appropriately otherwise.
6948 (do_type_instantiation): Set interface info for class. Set
6949 TREE_PUBLIC and DECL_EXTERN for methods. Do none of this if
6950 flag_external_templates is set.
6951 * parse.y: Reflect changes in USE_TEMPLATE semantics.
6952 * decl2.c: New flag flag_implicit_templates determines whether or
6953 not implicit instantiations get emitted. This flag currently
6954 defaults to true, and must be true for -fexternal-templates to work.
6955 (finish_file): Consider flag_implement_inlines when
6956 setting DECL_EXTERNAL. Consider flag_implicit_templates when
6957 deciding whether or not to emit a static copy.
6958 * decl.c (start_function): Set TREE_PUBLIC and DECL_EXTERNAL
6959 properly for template instantiations.
6960 (start_method): Set DECL_IMPLICIT_INSTANTIATION on methods of a
6961 template class.
6962 * cp-tree.h (CLASSTYPE_USE_TEMPLATE): Change semantics.
6963 (DECL_USE_TEMPLATE): Parallel macro for FUNCTION and VAR_DECLs.
6964 (various others): Accessor macros for the above.
6965
6966Fri May 27 13:57:40 1994 Jason Merrill (jason@deneb.cygnus.com)
6967
6968 * typeck.c (build_binary_op_nodefault): Division by constant zero is
6969 an error.
6970
6060a796 6971Fri May 27 13:50:15 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
6972
6973 * class.c (override_one_vtable): Don't modify things we don't own.
6974
6975Fri May 27 01:42:58 1994 Jason Merrill (jason@deneb.cygnus.com)
6976
6977 * decl.c (finish_decl): Don't postpone processing the initializer of
6978 a decl with DECL_EXTERNAL set, and do call rest_of_compilation for a
6979 PUBLIC const at toplevel.
6980 (grokdeclarator): pedwarn about initializing non-const or
6981 non-integral statics in the class body.
6982
6983 * decl.c (pushtag): Don't try to set DECL_CLASS_CONTEXT on a
6984 TYPE_DECL.
6985
6986 * call.c (convert_harshness): Dereference reference on rhs before
6987 proceeding, properly grok passing const things to non-const
6988 references.
6989
6990 * typeck.c (build_unary_op): Soften error about taking the address
6991 of main() to a pedwarn.
6992
6993 * lex.c (default_copy_constructor_body): Unambiguously specify base
6994 classes (i.e. A((const class ::A&)_ctor_arg) ).
6995 (default_assign_ref_body): Ditto.
6996
6997Thu May 26 13:13:55 1994 Gerald Baumgartner (gb@mexican.cygnus.com)
6998
6999 * decl2.c (grokfield): Don't complain about local signature
7000 method declaration without definition.
7001
7002 * call.c (convert_harshness): If `type' is a signature pointer
7003 and `parmtype' is a pointer to a signature, just return 0. We
7004 don't really convert in this case; it's a result of making the
7005 `this' parameter of a signature method a signature pointer.
7006
7007 * call.c (build_method_call): Distinguish calling the default copy
7008 constructor of a signature pointer/reference from a signature
7009 member function call.
7010
7011Thu May 26 12:56:25 1994 Jason Merrill (jason@deneb.cygnus.com)
7012
7013 * decl2.c (grokfield): Don't set TREE_PUBLIC on member function
7014 declarations.
7015
7016 * decl.c (duplicate_decls): A previous function declaration as
7017 static overrides a subsequent non-static definition.
7018 (grokdeclarator): Don't set TREE_PUBLIC on inline method
7019 declarations.
7020
7021Wed May 25 14:36:38 1994 Jason Merrill (jason@deneb.cygnus.com)
7022
7023 * decl.c (grokdeclarator): Handle initialization of static const
7024 members.
7025 (finish_decl): Ditto.
7026
7027 * decl2.c (grokfield): Allow initialization of static const members
7028 even when pedantic.
7029
7030 * decl2.c (grokfield): Deal with grokdeclarator returning
7031 error_mark_node.
7032
7033 * decl.c (grok_ctor_properties): Return 0 for A(A) constructor.
7034 (grokfndecl): Check the return value of grok_ctor_properties.
7035 (start_method): Ditto.
7036
7037 * parse.y (absdcl): Expand type_quals inline.
7038
7039Tue May 24 19:10:32 1994 Jason Merrill (jason@deneb.cygnus.com)
7040
7041 * decl.c (pushtag): Use IS_AGGR_TYPE rather than checking for a
7042 RECORD_TYPE.
7043
7044Tue May 24 18:09:16 1994 Per Bothner (bothner@kalessin.cygnus.com)
7045
7046 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
7047 always use "__vt_%s".
7048 * decl2.c (finish_vtable_vardecl): Don't consider abstract virtuals
7049 when looking for a "sentinal" method (to decide on emitting vtables).
7050 * decl2.c (finish_file): Scan all decls for thunks that need
7051 to be emitted.
7052 * decl2.c (finish_vtable_vardecl): Don't bother calling emit_thunk.
7053 * method.c (make_thunk): Use a more meaningful label. If there
7054 exists a matching top-level THUNK_DECL re-use it; otherwise
7055 create a new THUNK_DECL (and declare it).
7056 * method.c (emit_thunk): Make thunk external/public depending
7057 on the underlying method.
7058
7059Tue May 24 00:22:04 1994 Jason Merrill (jason@deneb.cygnus.com)
7060
7061 * pt.c (tsubst): Use lookup_name_nonclass to find guiding decls, not
7062 lookup_name.
7063
7064 * call.c (build_overload_call_real): Don't immediately pick a
7065 function which matches perfectly.
7066
7067 * decl.c (grokdeclarator): Use c_build_type_variant for arrays.
7068 (grokdeclarator): Warn about, and throw away, cv-quals attached to a
7069 reference (like 'int &const j').
7070
7071 * typeck.c (convert_arguments): Don't mess with i for methods.
7072 * call.c (build_method_call): Pass the function decl to
7073 convert_arguments.
7074
7075 * typeck.c (comp_ptr_ttypes_real): New function. Implements the
7076 checking for which multi-level pointer conversions are allowed.
7077 (comp_target_types): Call it.
7078 (convert_for_assignment): Check const parity on the ultimate target
7079 type, too. And make those warnings pedwarns.
7080
7081Mon May 23 14:11:24 1994 Jason Merrill (jason@deneb.cygnus.com)
7082
7083 * error.c (dump_char): Use TARGET_* for character constants.
7084
7085Mon May 23 13:03:03 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
7086
7087 * tree.c (debug_no_list_hash): Make static.
7088
7089 * decl.c (decls_match): Say the types don't match if newdecl ends up
7090 with a null type, after we've checked if olddecl does.
7091 (pushdecl): Check if the decls themselves match before looking for
7092 an extern redeclared as static, to avoid inappropriate and incorrect
7093 warnings.
7094
7095Fri May 20 14:04:34 1994 Jason Merrill (jason@deneb.cygnus.com)
7096
7097 * decl.c (grokdeclarator): Make warning about duplicate short, etc.
7098 a pedwarn.
7099
7100 * typeck.c (build_c_cast): Casting to function or method type is an
7101 error.
7102
7103 * class.c (finish_struct): Make warning for anonymous class with no
7104 instances a pedwarn.
7105
7106 * Makefile.in (stamp-parse): Expect a s/r conflict.
7107
7108 * typeck.c (build_modify_expr): pedwarn about using a non-lvalue
7109 cast as an lvalue.
7110
2986ae00
MS
7111Thu May 19 12:08:48 1994 Jason Merrill (jason@deneb.cygnus.com)
7112
7113 * cvt.c (type_promotes_to): Make sure bool promotes to int rather
7114 than unsigned on platforms where sizeof(char)==sizeof(int).
7115
7116Wed May 18 14:27:06 1994 Jason Merrill (jason@deneb.cygnus.com)
7117
7118 * typeck.c (build_c_cast): Tack on a NOP_EXPR when casting to
7119 another variant.
7120 (build_modify_expr): Don't strip NOP_EXPRs, and don't get tricky
7121 and treat them as lvalues.
7122
7123 * decl.c (shadow_tag): Do complain about forward declarations of
7124 enums and empty declarations.
7125 * parse.y: Don't complain about forward declarations of enums and
7126 empty declarations.
7127
7128 * typeck.c (convert_for_assignment): Complain about changing
7129 the signedness of a pointer's target type.
7130
7131 * parse.y (stmt): Move duplicated code for checking case values from
7132 here.
7133 * decl2.c (check_cp_case_value): To here. And add a call to
7134 constant_expression_warning.
7135
7136 * typeck.c (convert_for_assignment): Don't complain about assigning
7137 a negative value to bool.
7138
7139 * decl.c (init_decl_processing): Make bool unsigned.
7140
7141 * class.c (finish_struct): Allow bool bitfields.
7142
2986ae00
MS
7143Wed May 18 12:35:27 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7144
7145 * Make-lang.in (c++.install-man): Get g++.1 from $(srcdir)/cp.
7146
7147Wed May 18 03:28:35 1994 Jason Merrill (jason@deneb.cygnus.com)
7148
7149 * cvt.c (build_type_conversion): Lose special handling of
7150 truthvalues.
7151
7152 * search.c (dfs_pushdecls): Improve shadowing warning.
7153
7154Tue May 17 13:34:46 1994 Jason Merrill (jason@deneb.cygnus.com)
7155
7156 * init.c (build_delete): Throw away const and volatile on `this'.
7157
7158 * decl.c (finish_enum): Put the constants in TYPE_VALUES again,
7159 rather than the enumerators.
7160 (pushtag): s/cdecl/c_decl/g
7161
7162Mon May 16 23:04:01 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
7163
63718c49
GB
7164 * cp/typeck.c (common_type): Attribute merging.
7165 (comp_types): Utilise COMP_TYPE_ATTRIBUTES macro.
2986ae00 7166
63718c49 7167 * cp/parse.y: Revamp attribute parsing.
2986ae00
MS
7168
7169Mon May 16 01:40:34 1994 Jason Merrill (jason@deneb.cygnus.com)
7170
7171 * decl.c (shadow_tag): Also check for inappropriate use of auto and
7172 register.
7173
7174 * method.c (build_overload_name): Clarify that the illegal case is a
7175 pointer or reference to array of unknown bound.
7176
7177 * error.c (dump_type_prefix): Print references to arrays properly.
7178
7179 * typeck.c (various): Be more helpful in pointer
7180 comparison diagnostics.
7181
7182 * tree.c (lvalue_p): MODIFY_EXPRs are lvalues again. Isn't this
7183 fun?
7184
7185 * parse.y: Also catch an error after valid stmts.
7186
7187 * search.c (dfs_init_vbase_pointers): Don't abort because `this' is
7188 const.
7189
7190 * typeck.c (convert_for_initialization): If call to
7191 convert_to_reference generated a diagnostic, print out the parm
7192 number and function decl if any.
7193
7194 * errfn.c (cp_thing): Check atarg1 to determine whether or not we're
7195 specifying a line, not atarg.
7196
7197 * tree.c (build_cplus_method_type): Always make `this' const.
7198
7199 * decl2.c (grokclassfn): If -fthis-is-variable and this function is
7200 a constructor or destructor, make `this' non-const.
7201
7202 * typeck.c (build_modify_expr): Don't warn specially about
7203 assignment to `this' here anymore, since it will be caught by the
7204 usual machinery.
7205
7206 * various: Disallow specific GNU extensions (variable-size arrays,
7207 etc.) when flag_ansi is set, not necessarily when pedantic is set,
7208 so that people can compile with -pedantic-errors for tighter const
7209 checking and such without losing desirable extensions.
7210
7211 * typeck2.c (build_functional_cast): Call build_method_call with
7212 LOOKUP_PROTECT.
7213 (process_init_constructor): Only process FIELD_DECLs.
7214
7215 * decl.c (finish_decl): Also force static consts with no explicit
7216 initializer that need constructing into the data segment.
7217
7218 * init.c (build_delete): Undo last patch, as it interferes with
7219 automatic cleanups.
7220
7221Sat May 14 01:59:31 1994 Jason Merrill (jason@deneb.cygnus.com)
7222
7223 * call.c, class.h, cp-tree.h, cvt.c, decl2.c: Lose old overloading
7224 code.
7225
7226 * init.c (build_delete): pedwarn about using plain delete to delete
7227 an array.
7228
7229Fri May 13 16:45:07 1994 Jason Merrill (jason@deneb.cygnus.com)
7230
7231 * typeck.c (comp_target_types): Be more helpful in contravariance
7232 warnings, and make them pedwarns.
7233
7234 * decl.c (grokdeclarator): Use decl_context to decide whether or not
7235 this is an access declaration.
7236
7237 * class.c (finish_struct_bits): Set TYPE_HAS_INT_CONVERSION if it
7238 has a conversion to enum or bool, too.
7239
6060a796 7240Fri May 13 16:31:27 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
7241
7242 * method.c (emit_thunk): Make declaration for
7243 current_call_is_indirect local (needed for hppa).
7244
7245Fri May 13 16:16:37 1994 Jason Merrill (jason@deneb.cygnus.com)
7246
7247 * pt.c (uses_template_parms): Grok BOOLEAN_TYPE.
7248 (tsubst): Ditto.
7249
6060a796 7250Fri May 13 16:23:32 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
7251
7252 * pt.c (tsubst): If there is already a function for this expansion,
7253 use it.
7254 * pt.c (instantiate_template): Ditto.
7255
7256Fri May 13 10:30:42 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
7257
7258 * parse.y (implicitly_scoped_stmt, simple_stmt case): Use
7259 kept_level_p for MARK_ENDS argument to expand_end_bindings, to avoid
7260 generating debug info for unemitted symbols on some systems.
7261
7262 * cp-tree.h (build_static_cast, build_reinterpret_cast,
7263 build_const_cast): Add declarations.
7264
6060a796 7265Fri May 13 09:50:31 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
7266
7267 * search.c (expand_indirect_vtbls_init): Fix breakage from Apr 27
7268 fix. We now try get_binfo, and if that doesn't find what we want,
7269 we go back to the old method, which still sometimes fails.
7270
7271Fri May 13 01:43:18 1994 Jason Merrill (jason@deneb.cygnus.com)
7272
7273 * parse.y (initdcl): Call cplus_decl_attributes on the right
7274 variable.
7275 * decl2.c (cplus_decl_attributes): Don't call decl_attributes for
7276 void_type_node.
7277
7278 * typeck.c (build_binary_op_nodefault): Change result_type for
7279 comparison ops to bool.
7280 (build_binary_op): Convert args of && and || to bool.
7281 * cvt.c (build_default_binary_type_conversion): Convert args of &&
7282 and || to bool.
7283 (build_default_unary_type_conversion): Convert arg of ! to bool.
7284 (type_promotes_to): bool promotes to int.
7285
6060a796 7286Fri May 13 01:43:18 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
7287
7288 Implement the new builtin `bool' type.
7289 * typeck.c (build_binary_op_nodefault): Convert args of && and || to
7290 bool.
7291 (build_unary_op): Convert arg of ! to bool.
7292 * parse.y: Know true and false. Use bool_truthvalue_conversion.
7293 * method.c (build_overload_value): Know bool.
7294 (build_overload_name): Ditto.
7295 * lex.c (init_lex): Set up RID_BOOL.
7296 * gxx.gperf: Add bool, true, false.
7297 * error.c (*): Know bool.
7298 * decl.c (init_decl_processing): Set up bool, true, false.
7299 * cvt.c (cp_convert): Handle conversion to bool.
7300 (build_type_conversion): Ditto.
7301 * *.c: Accept bool where integers and enums are accepted (use
7302 INTEGRAL_CODE_P macro).
7303
8de7634e
RE
7304Thu May 12 19:13:54 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk)
7305
7306 * g++.c: Use #ifdef for __MSDOS__, not #if.
7307
6060a796 7308Thu May 12 18:05:18 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
7309
7310 * decl2.c (lang_f_options): Handle -fshort-temps. -fshort-temps
7311 gives old behavior , and destroys temporaries earlier. Default
7312 behavior now conforms to the ANSI working paper.
7313
7314Thu May 12 14:45:35 1994 Jason Merrill (jason@deneb.cygnus.com)
7315
7316 * typeck.c (build_modify_expr): Understand MODIFY_EXPR as an lvalue.
7317 Use convert_force to convert the result of a recursive call when we
7318 are dealing with a NOP_EXPR. Don't automatically wrap MODIFY_EXPRs
7319 in COMPOUND_EXPRs any more.
7320 (various): Lose pedantic_lvalue_warning.
7321 (unary_complex_lvalue): Understand MODIFY_EXPR.
7322
7323 * cvt.c (convert_to_reference): Allow DECL to be error_mark_node if
7324 we don't know what we're initializing.
7325
7326Wed May 11 01:59:36 1994 Jason Merrill (jason@deneb.cygnus.com)
7327
7328 * cvt.c (convert_to_reference): Modify to use convtype parameter.
7329 Only create temporaries when initializing a reference, not when
7330 casting.
7331 (cp_convert): New main function.
7332 (convert): Call cp_convert.
7333 * cvt.c, decl.c, typeck.c: Fix calls to convert_to_reference.
7334 * cp-tree.h (CONV_*): New constants used by conversion code for
7335 selecting conversions to perform.
7336
7337 * tree.c (lvalue_p): MODIFY_EXPRs are no longer lvalues.
7338
7339 * typeck.c (build_{static,reinterpret,const_cast): Stubs that just
7340 call build_c_cast.
7341 * parse.y: Add {static,reinterpret,const}_cast.
7342 * gxx.gperf: Ditto.
7343
7344 * typeck.c (common_type): Allow methods with basetypes of different
7345 UPTs.
7346 (comptypes): Deal with UPTs.
7347 (build_modify_expr): Wrap all MODIFY_EXPRs in a COMPOUND_EXPR.
7348
7349 * pt.c (end_template_decl): Check for multiple definitions of member
7350 templates.
7351
7352 * call.c (build_method_call): Complain about calling an abstract
7353 virtual from a constructor.
7354
7355 * typeck.c (pointer_int_sum): Check for the integer operand being 0
7356 after checking the validity of the pointer operand.
7357
7358 * typeck2.c (digest_init): Pedwarn about string initializer being
7359 too long.
7360
7361Tue May 10 12:10:28 1994 Jason Merrill (jason@deneb.cygnus.com)
7362
7363 * decl.c (push_overloaded_decl): Only throw away a builtin if the
7364 decl in question is the artificial one.
7365
7366 * parse.y (simple_stmt, switch): Use implicitly_scoped_stmt because
7367 expand_{start,end}_case cannot happen in the middle of a block.
7368
7369 * cvt.c (build_type_conversion_1): Use convert again.
7370
7371Tue May 10 11:52:04 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
7372
7373 * typeck2.c (digest_init): Make sure we check for signed and
7374 unsigned chars as well when warning about string initializers.
7375
7376 * init.c (emit_base_init): Check if there's a DECL_NAME on the
7377 member before trying to do an initialization for it.
7378
6060a796 7379Tue May 10 11:34:37 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
7380
7381 * except.c: Don't do anything useful when cross compiling.
7382
7383Tue May 10 03:04:13 1994 Jason Merrill (jason@deneb.cygnus.com)
7384
7385 * decl.c (duplicate_decls): Fix up handling of builtins yet again.
7386 (push_overloaded_decl): Ditto.
7387
7388 * cvt.c (convert): Don't look for void type conversion.
7389
7390Mon May 9 18:05:41 1994 Jason Merrill (jason@deneb.cygnus.com)
7391
7392 * init.c (do_friend): Only do a pushdecl for friends, not
7393 pushdecl_top_level.
7394
7395Mon May 9 13:36:34 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
7396
7397 * decl.c (lookup_name_current_level): Put empty statement after
7398 the label OUT to make the code valid C.
7399
7400Mon May 9 12:20:57 1994 Jason Merrill (jason@deneb.cygnus.com)
7401
7402 * typeck.c (build_binary_op_nodefault): Only complain about
7403 comparing void * and a function pointer if void * is smaller.
7404
7405Sun May 8 01:29:13 1994 Jason Merrill (jason@deneb.cygnus.com)
7406
7407 * decl.c (lookup_name_current_level): Move through temporary binding
7408 levels.
7409
7410 * parse.y (already_scoped_stmt): Revive.
7411 (simple_stmt): Use it again.
7412
7413 * decl.c (poplevel): Always call poplevel recursively if we're
7414 dealing with a temporary binding level.
7415
6060a796 7416Sat May 7 10:52:28 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
7417
7418 * decl.c (finish_decl): Make sure we run cleanups for initial values
7419 of decls. Cures memory leak.
7420 * decl.c (expand_static_init): Ditto for static variables.
7421 * decl2.c (finish_file): Ditto for globals.
7422
7423Sat May 7 03:57:44 1994 Jason Merrill (jason@deneb.cygnus.com)
7424
7425 * typeck.c (commonparms): Don't complain about redefining default
7426 args.
7427
7428 * decl.c (duplicate_decls): Don't complain twice about conflicting
7429 function decls.
7430 (decls_match): Don't look at default args.
7431 (redeclaration_error_message): Complain about redefining default
7432 args.
7433
7434 * call.c (build_overload_call_real): Also deal with guiding
7435 declarations coming BEFORE the template decl.
7436
7437 * pt.c (unify): Allow different parms to have different
7438 cv-qualifiers.
7439 (unify): Allow trivial conversions on non-template parms.
7440
7441Fri May 6 03:53:23 1994 Jason Merrill (jason@deneb.cygnus.com)
7442
7443 * pt.c (tsubst): Support OFFSET_TYPEs.
7444 (unify): Ditto.
7445
7446 * decl2.c (finish_decl_parsing): Call push_nested_class with a type.
7447
7448 * init.c (build_offset_ref): Fix error message.
7449 * search.c (lookup_field): Ditto.
7450
7451 * call.c (build_scoped_method_call): Pass binfo to
7452 build_method_call.
7453 * typeck.c (build_object_ref): Ditto.
7454
7455 * typeck2.c (binfo_or_else): Don't return a _TYPE.
7456
7457 * class.c (finish_struct): Don't complain about re-use of inherited
7458 names or shadowing of type decls.
7459 * decl.c (pushdecl_class_level): Ditto.
7460
7461 * decl.c (finish_enum): Set the type of all the enums.
7462
7463 * class.c (finish_struct): Don't get confused by access decls.
7464
7465 * cp-tree.h (TYPE_MAIN_DECL): New macro to get the _DECL for a
7466 _TYPE. You can stop using TYPE_NAME for that now.
7467
7468 * parse.y: Lose doing_explicit (check $0 instead).
7469 * gxx.gperf: 'template' now has a RID.
7470 * lex.h (rid): Ditto.
7471 * lex.c (init_lex): Set up the RID for 'template'.
7472
7473 * parse.y (type_specifier_seq): typed_typespecs or
7474 nonempty_type_quals. Use it.
7475 (handler_args): Fix bogus syntax.
7476 (raise_identifier{,s}, optional_identifier): Lose.
7477 * except.c (expand_start_catch_block): Use grokdeclarator to parse
7478 the catch variable.
7479 (init_exception_processing): The second argument to
7480 __throw_type_match is ptr_type_node.
7481
7482 Fri May 6 07:18:54 1994 Chip Salzenberg (chip@fin)
7483
7484 [ change propagated from c-decl.c of snapshot 940429 ]
7485 * cp/decl.c (finish_decl): Setting asmspec_tree should not
7486 zero out the old RTL.
7487
6060a796 7488Fri May 6 01:25:38 1994 Mike Stump <mrs@cygnus.com>
8d2733ca
MS
7489
7490 Add alpha exception handling support to the compiler.
7491 Quick and dirty backend in except.c.
7492
7493 * cp/*: Remove most remnants of old exception handling support.
7494 * decl.c (finish_function): Call expand_exception_blocks to put
7495 the exception hanlding blocks at the end of the function.
7496 * dec.c (hack_incomplete_structures): Make sure expand_decl_cleanup
7497 comes after expand_decl_init.
7498 * except.c: Reimplementation.
7499 * expr.c (cplus_expand_expr): Handle THROW_EXPRs.
7500 * lex.c (init_lex): Always have catch, try and throw be reserved
7501 words, so that we may always parse exception handling.
7502 * parse.y: Cleanup to support new interface into exception handling.
7503 * tree.def (THROW_EXPR): Add.
7504
7505Thu May 5 17:35:37 1994 Jason Merrill (jason@deneb.cygnus.com)
7506
7507 * parse.y (simple_stmt, for loops): Use implicitly_scoped_stmt.
7508 (various): Lose .kindof_pushlevel and partially_scoped_stmt.
7509
7510Thu May 5 16:17:27 1994 Kung Hsu (kung@mexican.cygnus.com)
7511
7512 * parse.y (already_scoped_stmt): move expand_end_binding() to
7513 fix the unmatched LBB/LBE in stabs.
7514
7515Thu May 5 14:36:17 1994 Jason Merrill (jason@deneb.cygnus.com)
7516
7517 * decl.c (set_nested_typename): Set TREE_MANGLED on the new
7518 identifiers.
7519 (pushdecl): Check TREE_MANGLED.
7520 (xref_tag): Ditto.
7521 * cp-tree.h (TREE_MANGLED): This identifier is a
7522 DECL_NESTED_TYPENAME (named to allow for future use to denote
7523 mangled function names as well).
7524
7525 Implement inconsistency checking specified in [class.scope0].
7526 * decl.c (lookup_name_real): Don't set ICV here after all.
7527 (finish_enum): Also set the type of the enumerators themselves.
7528 (build_enumerator): Put the CONST_DECL in the list instead of its
7529 initial value.
7530 (pushdecl_class_level): Check inconsistent use of a name in the
7531 class body.
7532 * class.c (finish_struct): Check inconsistent use of a name in the
7533 class body. Don't set DECL_CONTEXT on types here anymore.
7534 * parse.y (qualified_type_name): Note that the identifier has now
7535 been used (as a type) in the class body.
7536 * lex.c (do_identifier): Note that the identifier has now been used
7537 (as a constant) in the class body.
7538 * error.c (dump_decl): Print type and enum decls better.
7539
700f8a87
MS
7540Thu May 5 09:35:35 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
7541
7542 * typeck.c (build_modify_expr): Warn about assignment to `this'.
7543
7544Wed May 4 15:55:49 1994 Jason Merrill (jason@deneb.cygnus.com)
7545
7546 * init.c (build_delete): Use the global operator delete when
7547 requested.
7548
7549 * decl.c (lookup_name_real): If we find the type we're looking in a
7550 base class while defining a class, set IDENTIFIER_CLASS_VALUE for
7551 the type.
7552
7553 * class.c (finish_struct): Remove a couple of dependencies on
7554 language linkage.
7555
7556 * decl.c (pushtag): Classes do nest in extern "C" blocks.
7557 (pushdecl): Only set DECL_NESTED_TYPENAME on the canonical one for
7558 the type.
7559 (pushtag): Remove another dependency on the language linkage.
7560
7561 * lex.c (cons_up_default_function): Don't set DECL_CLASS_CONTEXT to
7562 a const-qualified type.
7563
7564 * decl.c (push_overloaded_decl): Throw away built-in decls here.
7565 (duplicate_decls): Instead of here.
7566
7567Wed May 4 15:27:40 1994 Per Bothner (bothner@kalessin.cygnus.com)
7568
7569 * typeck.c (get_member_function_from_ptrfunc): Do The Right
7570 Thing (I hope) if we're using thunks.
7571
7572Wed May 4 13:52:38 1994 Jason Merrill (jason@deneb.cygnus.com)
7573
7574 * parse.y (specialization): aggr template_type_name ';'.
7575 (named_class_head_sans_basetype): Use it.
7576 (explicit_instantiation): Ditto.
7577 (tmpl.2): Revert.
7578
7579 * cvt.c (build_type_conversion_1): Use convert_for_initialization,
7580 rather than convert, to do conversions after the UDC.
7581
7582 * cp-tree.h (SHARED_MEMBER_P): This member is shared between all
7583 instances of the class.
7584
7585 * search.c (lookup_field): If the entity found by two routes is the
7586 same, it's not ambiguous.
7587
7588Wed May 4 12:10:00 1994 Per Bothner (bothner@kalessin.cygnus.com)
7589
7590 * decl.c (lookup_name_real): Check for a NULL TREE_VALUE,
7591 to prevent the compiler from crashing ...
7592
7593Wed May 4 11:19:45 1994 Jason Merrill (jason@deneb.cygnus.com)
7594
7595 * call.c (build_method_call): If we don't have an object, check
7596 basetype_path to figure out where to look up the function.
7597
7598 * typeck.c (convert_for_initialization): Pass TYPE_BINFO (type) to
7599 build_method_call in case exp is NULL_TREE.
7600
7601Tue May 3 16:02:53 1994 Per Bothner (bothner@kalessin.cygnus.com)
7602
7603 Give a vtable entries a unique named type, for the sake of gdb.
7604 * class.c (build_vtable_entry): The addres of a thunk now has
7605 type vtable_entry_type, not ptr_type_node.
7606 * method.c (make_thunk): Fix type of THUNK_DECL.
7607 * class.c (add_virtual_function, override_one_vtable): Use
7608 vfunc_ptr_type_node, instead of ptr_type_node.
7609 * cp-tree.h (vfunc_ptr_type_node): New macro.
7610 * decl.c (init_decl_processing): Make vtable_entry_type
7611 be a unique type of pointer to a unique function type.
7612
7613Tue May 3 09:20:44 1994 Jason Merrill (jason@deneb.cygnus.com)
7614
7615 * parse.y (do_explicit): Sets doing_explicit to 1.
7616 (explicit_instantiation): Use do_explicit rather than TEMPLATE
7617 directly, add "do_explicit error" rule.
7618 (datadef): Set doing_explicit to 0 after an explicit instantiation.
7619 (tmpl.2): Don't instantiate if we see a ';' unless we're doing an
7620 explicit instantiation.
7621 (named_class_head_sans_basetype): Remove aggr template_type_name
7622 ';' again.
7623
7624Mon May 2 23:17:21 1994 Jason Merrill (jason@deneb.cygnus.com)
7625
7626 * search.c (lookup_nested_tag): Lose.
7627
7628 * decl2.c (grokfield): Set DECL_CONTEXT on TYPE_DECLs.
7629 (lookup_name_nonclass): Lose.
7630
7631 * decl.c (poplevel_class): Add force parameter.
7632 (lookup_name_real): Fix handling of explicit scoping which specifies
7633 a class currently being defined. Add 'nonclass' argument.
7634 (lookup_name, lookup_name_nonclass): Shells for lookup_name_real.
7635
7636 * class.c (finish_struct): Don't unset IDENTIFIER_CLASS_VALUEs here.
7637 (popclass): Force clearing of IDENTIFIER_CLASS_VALUEs if we're being
7638 called from finish_struct.
7639
7640Mon May 2 19:06:21 1994 Per Bothner (bothner@kalessin.cygnus.com)
7641
7642 * decl.c (init_decl_processing), cp-tree.h: Removed memptr_type.
7643 (It seeems redundant, given build_ptrmemfunc_type.)
7644 * typeck.c (get_member_function_from_ptrfunc), gc.c (build_headof,
7645 build_classof): Use vtable_entry_type instead of memptr_type.
7646 * method.c (emit_thunk): Call poplevel with functionbody==0
7647 to prevent DECL_INITIAL being set to a BLOCK.
7648
7649Mon May 2 15:02:11 1994 Jason Merrill (jason@deneb.cygnus.com)
7650
7651 * parse.y (named_class_head_sans_basetype): Add "aggr
7652 template_type_name ';'" rule for forward declaration of
7653 specializations.
7654
7655Mon May 2 15:02:11 1994 Jason Merrill (jason@deneb.cygnus.com)
7656
7657 * class.c (instantiate_type): Deal with pmf's.
bfef964b
JM
7658
7659 * Make-lang.in (cc1plus): Don't depend on OBJS or BC_OBJS, since
7660 stamp-objlist does.
700f8a87 7661
bfef964b
JM
7662 * Makefile.in (../cc1plus): Depend on OBJDEPS.
7663 (OBJDEPS): Dependency version of OBJS.
7664
700f8a87
MS
7665Mon May 2 12:51:31 1994 Kung Hsu (kung@mexican.cygnus.com)
7666
7667 * search.c (dfs_debug_mark): unmark TYPE_DECL_SUPPRESS_DEBUG, not
7668 DECL_IGNORED_P.
7669
7670Fri Apr 29 12:29:56 1994 Jason Merrill (jason@deneb.cygnus.com)
7671
7672 * class.c (finish_struct): Clear out memory of local tags. And
7673 typedefs.
7674
7675 * decl2.c (grokclassfn): Don't set DECL_CONTEXT to a cv-qualified
7676 type.
7677 * search.c (get_matching_virtual): Be more helpful in error message.
7678
7679 * *: Use DECL_ARTIFICIAL (renamed from DECL_SYNTHESIZED).
7680
7681 * lex.c (default_assign_ref_body): Expect TYPE_NESTED_NAME to work.
7682 (default_copy_constructor_body): Ditto.
7683
7684 * class.c (finish_struct): Don't gratuitously create multiple decls
7685 for nested classes.
7686
7687Thu Apr 28 23:39:38 1994 Jason Merrill (jason@deneb.cygnus.com)
7688
7689 Avoid clobbering the arg types of other functions when reverting
7690 static member functions.
7691 * decl.c (revert_static_member_fn): Rearrange arguments, don't
7692 require values for 'fn' and 'argtypes', add warning to comment
7693 above.
7694 (decls_match): Rearrange arguments in call to rsmf.
7695 (grok_op_properties): Don't pass values for fn and argtypes.
7696 * pt.c (instantiate_template): Don't pass values for fn and argtypes.
7697
15fa00e9
DE
7698Thu Apr 28 16:29:11 1994 Doug Evans (dje@canuck.cygnus.com)
7699
7700 * Make-lang.in (cc1plus): Depend on stamp-objlist.
7701 * Makefile.in (BC_OBJS): Delete.
700f8a87
MS
7702 (OBJS): Cat ../stamp-objlist to get language independent files.
7703 Include ../c-common.o.
15fa00e9
DE
7704 (../cc1plus): Delete reference to BC_OBJS.
7705
700f8a87
MS
7706Thu Apr 28 02:12:08 1994 Jason Merrill (jason@deneb.cygnus.com)
7707
7708 * search.c (compute_access): No really, deal with static members
7709 properly. Would I lie to you?
7710
7711 Implement lexical hiding of function declarations.
7712 * pt.c (tsubst): Use lookup_name to look for function decls to guide
7713 instantiation.
7714 * method.c (build_opfncall): Use lookup_name_nonclass to look for
7715 non-member functions.
7716 * init.c (do_friend): Use lookup_name_nonclass to look for
7717 functions.
7718 * error.c (ident_fndecl): Use lookup_name to look for functions.
7719 * decl2.c (lookup_name_nonclass): New function, skips over
7720 CLASS_VALUE.
7721 * decl.c (struct binding_level): Lose overloads_shadowed field.
7722 (poplevel): Don't deal with overloads_shadowed.
7723 (push_overloaded_decl): Do lexical hiding for functions.
7724 * class.c (instantiate_type): Don't check non-members if we have
7725 members with the same name.
7726 * call.c (build_method_call): Use lookup_name_nonclass instead of
7727 IDENTIFIER_GLOBAL_VALUE to check for non-member functions.
7728 (build_overload_call_real): Ditto.
7729
7730 * decl.c (duplicate_decls): Check for ambiguous overloads here.
7731 (push_overloaded_decl): Instead of here.
7732
7733 * decl.c (pushdecl): Back out Chip's last change.
7734
7735 * decl.c (grok_op_properties): operators cannot be static members.
7736
7737 * cp-tree.h (DECL_SYNTHESIZED): DECL_SOURCE_LINE == 0
7738 (SET_DECL_SYNTHESIZED): DECL_SOURCE_LINE = 0
7739 * lex.c (cons_up_default_function): Use SET_DECL_SYNTHESIZED.
7740
7741 * method.c (do_inline_function_hair): Don't put friends of local
7742 classes into global scope, either.
7743
7744 * typeck2.c (build_functional_cast): Don't look for a function call
7745 interpretation.
7746
6060a796 7747Thu Apr 28 15:19:46 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
7748
7749 * cp-tree.h: disable use of backend EH.
7750
15fa00e9
DE
7751Wed Apr 27 21:01:24 1994 Doug Evans (dje@canuck.cygnus.com)
7752
7753 * Make-lang.in (c++.distdir): mkdir tmp/cp first.
7754 * Makefile.in (INCLUDES): Move definition to same place as
7755 parent makefile.
7756 (ALLOCA): Define.
7757 (OLDAR_FLAGS): Delete.
7758 (OLDCC): Define.
7759 (DIR): Delete.
7760 (CLIB): Define.
7761 (####site): Delete.
7762 (SUBDIR_USE_ALLOCA): Don't use ALLOCA if compiling with gcc.
7763
39211cd5
MS
7764Wed Apr 27 19:10:04 1994 Kung Hsu (kung@mexican.cygnus.com)
7765
7766 * decl.c (xref_tag): not to use strstr(), it's not available on
7767 all platforms.
7768
7769Wed Apr 27 18:10:12 1994 Jason Merrill (jason@deneb.cygnus.com)
7770
7771 * class.c (finish_struct): Resolve yet another class/pmf confusion.
7772
7773 * call.c (build_overload_call_real): Don't take the single-function
7774 shortcut if we're dealing with an overloaded operator.
7775
6060a796 7776Wed Apr 27 17:35:37 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
7777
7778 * search.c (get_base_distance): Search the virtual base class
7779 binfos, incase someone wants to convert to a real virtual base
7780 class.
7781 * search.c (expand_indirect_vtbls_init): Use convert_pointer_to_real
7782 instead of convert_pointer_to, as it now will work.
7783
7784Wed Apr 27 15:36:49 1994 Jason Merrill (jason@deneb.cygnus.com)
7785
7786 * cvt.c (convert_to_reference): Don't complain about casting away
7787 const and volatile.
7788
7789 * typeck.c (build_unary_op): References are too lvalues.
7790
6060a796 7791Wed Apr 27 13:58:05 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
7792
7793 * class.c (override_one_vtable): We have to prepare_fresh_vtable
7794 before we modify it, not after, also, we cannot reuse an old vtable,
7795 once we commit to a new vtable. Implement ambiguous overrides in
7796 virtual bases as abstract. Hack until we make the class
7797 ill-formed.
7798
7799Wed Apr 27 01:17:08 1994 Jason Merrill (jason@deneb.cygnus.com)
7800
7801 * parse.y (unary_expr): Expand new_placement[opt] and
7802 new_initializer[opt] inline.
7803
7804 * search.c (lookup_fnfields): Don't throw away the inheritance
7805 information here, either.
7806 (compute_access): Handle static members properly.
7807
7808 * init.c (build_member_call): Always set basetype_path, and pass it
7809 to lookup_fnfields.
7810
7811 * search.c (lookup_field): Deal properly with the case where
7812 xbasetype is a chain of binfos; don't throw away the inheritance
7813 information.
7814 (compute_access): protected_ok always starts out at 0.
7815
7816 * init.c (resolve_offset_ref): Don't cast `this' to the base type
7817 until we've got our basetype_path.
7818
7819 * cp-tree.h (IS_OVERLOAD_TYPE): aggregate or enum.
7820
7821 * cvt.c (build_up_reference): Use build_pointer_type rather than
7822 TYPE_POINTER_TO.
7823
7824 * call.c (convert_harshness_ansi): Call type_promotes_to for reals
7825 as well.
7826
7827 * cvt.c (type_promotes_to): Retain const and volatile, add
7828 float->double promotion.
7829
7830 * decl.c (grokdeclarator): Don't bash references to arrays into
7831 references to pointers in function parms. Use type_promotes_to.
7832
6060a796 7833Tue Apr 26 23:44:36 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
7834
7835 Finish off Apr 19th work.
7836
7837 * class.c (finish_struct_bits): Rename has_abstract_virtuals to
7838 might_have_abstract_virtuals.
7839 * class.c (strictly_overrides, override_one_vtable,
7840 merge_overrides): New routines to handle virtual base overrides.
7841 * class.c (finish_struct): Call merge_overrides to handle overrides
7842 in virtual bases.
7843
7844Tue Apr 26 12:45:53 1994 Jason Merrill (jason@deneb.cygnus.com)
7845
7846 * typeck.c (build_function_call): Call build_function_call_real with
7847 LOOKUP_NORMAL.
7848
7849 * *: Don't deal with TYPE_EXPRs.
7850
7851 * tree.c (lvalue_p): If the type of the expression is a reference,
7852 it's an lvalue.
7853
7854 * cvt.c (convert_to_reference): Complain about passing const
7855 lvalues to non-const references.
7856 (convert_from_reference): Don't arbitrarily throw away const and
7857 volatile on the target type.
7858
7859 * parse.y: Simplify and fix rules for `new'.
7860
7861 * decl.c (grok_op_properties): operator void is illegal.
7862
7863Mon Apr 25 02:36:28 1994 Jason Merrill (jason@deneb.cygnus.com)
7864
7865 * parse.y (components): Anonymous bitfields can still have declspecs.
7866
7867 * decl.c (pushdecl): Postpone handling of function templates like we
7868 do C functions.
7869
7870 * search.c (expand_indirect_vtbls_init): Fix infinite loop when
7871 convert_pointer_to fails.
7872
7873 * call.c (compute_conversion_costs_ansi): A user-defined conversion
7874 by itself is better than that UDC followed by standard conversions.
7875 Don't treat integers and reals specially.
7876
7877 * cp-tree.h: Declare flag_ansi.
7878
7879 * typeck.c (c_expand_return): pedwarn on return in void function
7880 even if the expression is of type void.
7881 (build_c_cast): Don't do as much checking for casts to void.
7882 (build_modify_expr): pedwarn about array assignment if this code
7883 wasn't generated by the compiler.
7884
7885 * tree.c (lvalue_p): A comma expression is an lvalue if its second
7886 operand is.
7887
7888 * typeck.c (default_conversion): Move code for promoting enums and
7889 ints from here.
7890 * cvt.c (type_promotes_to): To here.
7891 * call.c (convert_harshness_ansi): Use type_promotes_to. Also fix
7892 promotion semantics for reals.
7893
15fa00e9
DE
7894Sun Apr 24 16:52:51 1994 Doug Evans (dje@canuck.cygnus.com)
7895
7896 * Make-lang.in (c++.install-common): Check for g++-cross.
7897 * Makefile.in: Remove Cygnus cruft.
7898 (config.status): Delete.
7899 (RTL_H): Define.
7900 (TREE_H): Use complete pathname, some native makes have minimal
7901 VPATH support.
7902 (*.o): Use complete pathname to headers in parent dir.
7903 (doc, info, dvi): Delete.
7904
700f8a87
MS
7905Sun Apr 24 16:52:51 1994 Doug Evans (dje@canuck.cygnus.com)
7906
7907 * Make-lang.in (c++.install-common): Check for g++-cross.
7908 * Makefile.in: Remove Cygnus cruft.
7909 (config.status): Delete.
7910 (RTL_H): Define.
7911 (TREE_H): Use complete pathname, some native makes have minimal
7912 VPATH support.
7913 (*.o): Use complete pathname to headers in parent dir.
7914 (doc, info, dvi): Delete.
7915
39211cd5
MS
7916Sun Apr 24 00:47:49 1994 Jason Merrill (jason@deneb.cygnus.com)
7917
7918 * decl.c (pushdecl): Avoid redundant warning on redeclaring function
7919 with different return type.
7920 (decls_match): Compare return types strictly.
7921
7922Fri Apr 22 12:55:42 1994 Jason Merrill (jason@deneb.cygnus.com)
7923
7924 * cvt.c (build_type_conversion): Do try to convert through other
7925 pointers. This will fail if the class defines multiple pointer
7926 conversions.
7927
7928 * error.c (dump_type_prefix): Print out pointers to arrays properly.
7929 (dump_type_suffix): Ditto. (was 'int *[]', now 'int (*)[]')
7930
7931 * typeck.c (build_unary_op): Disallow ++/-- on pointers to
7932 incomplete type.
7933
7934 * decl.c (duplicate_decls): Check mismatched TREE_CODES after
7935 checking for shadowing a builtin. If we're redeclaring a builtin
7936 function, bash the old decl to avoid an ambiguous overload.
7937
7938 * cvt.c (convert_to_reference): Don't force arrays to decay here.
7939
7940 * tree.c (lvalue_p): A MODIFY_EXPR is an lvalue.
7941
7942 * decl.c (duplicate_decls): Don't assume that the decls will have
7943 types.
7944
7945 Mon Apr 18 11:35:32 1994 Chip Salzenberg (chip@fin.uucp)
7946
7947 [ cp/* changes propagated from c-* changes in 940318 snapshot ]
7948 * c-decl.c (pushdecl): Warn if type mismatch with another external decl
7949 in a global scope.
7950
7951 Fri Apr 22 06:38:56 1994 Chip Salzenberg (chip@fin.uucp)
7952
7953 * cp/typeck2.c (signature_error): Use cp_error for "%T".
7954
7955 Mon Apr 18 11:59:59 1994 Chip Salzenberg (chip@fin.uucp)
7956
7957 [ cp/* changes propagated from c-* changes in 940415 snapshot ]
7958 * cp/decl.c (duplicate_decls, pushdecl, builtin_function):
7959 Use DECL_FUNCTION_CODE instead of DECL_SET_FUNCTION_CODE.
7960
7961 Mon Apr 18 11:55:18 1994 Chip Salzenberg (chip@fin.uucp)
7962
7963 [ cp/* changes propagated from c-* changes in 940409 snapshot ]
7964 * cp/decl.c (duplicate_decls): Put new type in same obstack as
7965 old ones, or permanent if old ones in different obstacks.
7966
7967 Mon Apr 18 11:48:49 1994 Chip Salzenberg (chip@fin.uucp)
7968
7969 [ cp/* changes propagated from c-* changes in 940401 snapshot ]
7970 * cp/parse.y (attrib): Handle string args as expressions,
7971 merging the two rules. `mode' attribute now takes a string arg.
7972 Delete the rule for an identifier as arg.
7973
7974 Mon Apr 18 11:24:00 1994 Chip Salzenberg (chip@fin.uucp)
7975
7976 [ cp/* changes propagated from c-* changes in 940312 snapshot ]
7977 * cp/typeck.c (pointer_int_sum): Multiplication should be done signed.
7978 (pointer_diff): Likewise the division.
7979
7980 Sun Mar 6 19:43:39 1994 Chip Salzenberg (chip@fin.uucp)
7981
7982 [ cp/* changes propagated from c-* changes in 940304 snapshot ]
7983 * cp/decl.c (finish_decl): Issue warning for large objects,
7984 if requested.
7985
7986 Sat Feb 19 22:20:32 1994 Chip Salzenberg (chip@fin.uucp)
7987
7988 [ cp/* changes propagated from c-* changes in 940218 snapshot ]
7989 * cp/parse.y (attrib): Handle attribute ((section ("string"))).
7990 * cp/decl.c (duplicate_decls): Merge section name into new decl.
7991
7992 Tue Feb 8 09:49:17 1994 Chip Salzenberg (chip@fin.uucp)
7993
7994 [ cp/* changes propagated from c-* changes in 940206 snapshot ]
7995 * cp/typeck.c (signed_or_unsigned_type): Check for any
63718c49 7996 INTEGRAL_TYPE_P not just INTEGER_TYPE.
39211cd5
MS
7997
7998 Mon Dec 6 13:35:31 1993 Norbert Kiesel (norbert@i3.INformatik.rwth-aachen.DE)
7999
8000 * cp/decl.c (finish_enum): Start from 0 when determining precision
8001 for short enums.
8002
8003 Fri Dec 3 17:07:58 1993 Ralph Campbell (ralphc@pyramid.COM)
8004
8005 * cp/parse.y (unary_expr): Look at $1 for tree_code rather than
8006 casting $$.
8007
8008 Wed Nov 17 19:22:09 1993 Chip Salzenberg (chip@fin.uucp)
8009
8010 * cp/typeck.c (build_binary_op_nodefault): Propagate code
8011 from C front-end to optimize unsigned short division.
8012 (build_conditional_expr): Fix bug in "1 ? 42 : (void *) 8".
8013
8014 Wed Nov 17 19:17:18 1993 Chip Salzenberg (chip@fin.uucp)
8015
8016 * cp/call.c (convert_harshness_ansi): Given an (e.g.) char
8017 constant, prefer 'const char &' to 'int'.
8018
8019 Wed Feb 3 13:11:48 1993 Chip Salzenberg (chip@fin.uucp)
8020
8021 * cp/class.c (finish_struct_methods): Handle multiple
8022 constructors in fn_fields list.
8023
8024Fri Apr 22 12:48:10 1994 Kung Hsu (kung@mexican.cygnus.com)
8025
8026 * class.c (finish_struct): use TYPE_DECL_SUPPRESS_DEBUG to flag
8027 types not to be dumped in stabs, like types in #pragma interface.
8028 * decl.c (init_decl_processing): use TYPE_DECL_SUPPRESS_DEBUG to
8029 mark unknown type.
8030
15fa00e9
DE
8031Fri Apr 22 03:27:26 1994 Doug Evans (dje@cygnus.com)
8032
8033 * Language directory reorganization.
8034 See parent makefile.
8035
39211cd5
MS
8036Thu Apr 21 18:27:57 1994 Per Bothner (bothner@kalessin.cygnus.com)
8037
8038 * cp-tree.h (THUNK_DELTA): It is normally negative, so
8039 use signed .i variant of frame_size rather than unsigned .u.
8040 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
8041 use "VT" rather than "vt" due to binary incompatibility.
8042 * class.c (get_vtable_name): Use strlen of VTABLE_NAME_FORMAT,
8043 rather than sizeof, since it is now an expression.
8044 * class.c (modify_one_vtable): Modify to skip initial element
8045 containing a count of the vtable.
8046
7177d104
MS
8047Thu Apr 21 00:09:02 1994 Jason Merrill (jason@deneb.cygnus.com)
8048
8049 * lex.c (check_newline): Force interface_unknown on main input file.
8050
8051 * pt.c (do_pending_expansions): Always emit functions that have been
8052 explicitly instantiated.
8053 (do_function_instantiation): Set DECL_EXPLICITLY_INSTANTIATED.
8054 (do_type_instantiation): Set CLASSTYPE_VTABLE_NEEDS_WRITING and
8055 DECL_EXPLICITLY_INSTANTIATED on all my methods.
8056 * parse.y (explicit_instantiation): Call do_type_instantiation for
8057 types.
8058 * decl2.c (finish_vtable_vardecl): Call import_export_vtable.
8059 * decl.c (start_function): Don't set DECL_EXTERNAL on a function
8060 that has been explicitly instantiated.
8061 * cp-tree.h (DECL_EXPLICITLY_INSTANTIATED): Alias for
8062 DECL_LANG_FLAG_4.
8063 * class.c: Move import_export_vtable to decl2.c, and comment out all
8064 uses.
8065
8066Wed Apr 20 16:51:06 1994 Jason Merrill (jason@deneb.cygnus.com)
8067
8068 * lex.c (process_next_inline): Don't muck with DECL_INLINE.
8069 (do_pending_inlines): Ditto.
8070
6060a796 8071Tue Apr 19 22:25:41 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
8072
8073 Reimplement vtable building, and most vtable pointer setting.
8074 Allows for earier maintenance, easier understandability, and most
8075 importantly, correct semantics.
8076
8077 * class.c (build_vtable): Removed unneeded
8078 SET_BINFO_VTABLE_PATH_MARKED.
8079 * class.c (prepare_fresh_vtable): Ditto. Added argument.
8080 * class.c (modify_vtable_entry): General cleanup.
8081 * class.c (related_vslot, is_normal, modify_other_vtable_entries,
8082 modify_vtable_entries): Removed.
8083 * class.c (add_virtual_function): General cleanup.
8084 * class.c (finish_base_struct): Setup BINFO_VTABLE and
8085 BINFO_VIRTUALS as early as we can, so that modify_all_vtables can
8086 work.
8087 * class.c (finish_vtbls): New routine, mostly from
8088 unmark_finished_struct.
8089 * class.c (overrides): New routine.
8090 * class.c (modify_one_vtable): New routine, mostly from
8091 modify_other_vtable_entries and modify_vtable_entries.
8092 * class.c (modify_all_direct_vtables, modify_all_indirect_vtables,
8093 modify_all_vtables): New routines.
8094 * class.c (finish_struct): Added arguemnt to prepare_fresh_vtable
8095 call. General cleanup on how pending_hard_virtuals are handled.
8096 General cleanup on modifying vtables. Use finish_vtbls, instead of
8097 unmark_finished_struct.
8098 * cp-tree.h (init_vtbl_ptrs, expand_direct_vtbls_init,
8099 get_first_matching_virtual, get_matching_virtual,
8100 expand_vbase_vtables_init, expand_indirect_vtbls_init): Update.
8101 * cvt.c (convert_pointer_to_real): cleanup error message.
8102 * decl.c (grokfndecl): General cleanup.
8103 * decl.c (finish_function): Change init_vtbl_ptrs call to
8104 expand_direct_vtbls_init. Change expand_vbase_vtables_init call to
8105 expand_indirect_vtbls_init.
8106 * init.c (expand_virtual_init): Remove unneeded argument.
8107 * init.c (init_vtbl_ptrs): Rename to expand_direct_vtbls_init, added
8108 two arguments to make more general. Made more general. Now can be
8109 used for vtable pointer initialization from virtual bases.
8110 * init.c (emit_base_init): Change expand_vbase_vtables_init call to
8111 expand_indirect_vtbls_init. Change init_vtbl_ptrs call to
8112 expand_direct_vtbls_init.
8113 * init.c (expand_virtual_init): General cleanup.
8114 * init.c (expand_default_init): Change expand_vbase_vtables_init
8115 call to expand_indirect_vtbls_init.
8116 * init.c (expand_recursive_init_1): Change expand_vbase_vtables_init
8117 call to expand_indirect_vtbls_init.
8118 * init.c (expand_recursive_init): Change expand_vbase_vtables_init
8119 call to expand_indirect_vtbls_init.
8120 * search.c (get_first_matching_virtual): Rename to
8121 get_matching_virtual. General cleanup and remove setting of
8122 DECL_CONTEXT. That is now done in a cleaner way in
8123 modify_vtable_entry and add_virtual_function.
8124 * search.c (expand_vbase_vtables_init): Rename to
8125 expand_indirect_vtbls_init. General cleanup. Use
8126 expand_direct_vtbls_init to do hard work. Ensures that _all_ vtable
8127 pointers from virtual bases are set up.
8128 * search.c (bfs_unmark_finished_struct, unmark_finished_struct):
8129 Removed.
8130
8131 * *.[chy]: Remove support for VTABLE_USES_MASK.
8132
8133Tue Apr 19 12:51:59 1994 Jason Merrill (jason@deneb.cygnus.com)
8134
8135 * cvt.c (convert_to_reference): Use NOP_EXPRs to switch between
8136 reference and pointer types instead of bashing the types directly.
8137
8138 * call.c (build_overload_call_real): Use the TREE_CODE to determine
8139 whether the function is overloaded or not, rather than
8140 TREE_OVERLOADED.
8141 * *: Remove all uses of TREE_OVERLOADED.
8142
8143 * decl.c (grokdeclarator): Only complain about initializing const
8144 fields when -ansi or -pedantic.
8145
8146Tue Apr 19 12:42:42 1994 Doug Evans (dje@canuck.cygnus.com)
8147
8148 * cp-tree.h (THUNK_DELTA): frame_size is now a union.
8149
8150Mon Apr 18 00:17:13 1994 Jason Merrill (jason@deneb.cygnus.com)
8151
8152 Do overloading on a block-by-block basis, not function-by-function.
8153 * decl.c: Lose overloads_to_forget.
8154 (struct binding_level): Add overloads_shadowed field.
8155 (poplevel): Restore overloads_shadowed.
8156 (push_overloaded_decl): Use overloads_shadowed instead of
8157 overloads_to_forget.
8158 (finish_function): Don't look at overloads_to_forget.
8159
8160 Copy enum_overflow logic from c-decl.c.
8161 * decl.c (start_enum): Initialize enum_overflow.
8162 (build_enumerator): Use enum_overflow. Also use current_scope().
8163
8164 * search.c (current_scope): Move Brendan's comment from
8165 build_enumerator here.
8166
8167 * typeck.c (convert_for_assignment): Change warnings to pedwarns for
8168 discarding const/volatile.
8169
8170Sat Apr 16 01:18:21 1994 Jason Merrill (jason@deneb.cygnus.com)
8171
8172 * typeck.c (comp_target_parms): Accept TEMPLATE_TYPE_PARMs on the rhs.
8173 (comp_target_types): Ditto.
8174
8175 * decl.c (lookup_name): Don't unset got_scope here.
8176
8177 * spew.c (yylex): Only replace yylval with the TYPE_NESTED_NAME if
8178 got_scope != NULL_TREE.
8179
8180Fri Apr 15 16:36:33 1994 Jason Merrill (jason@deneb.cygnus.com)
8181
8182 Horrible kludge to prevent templates from being instantiated by
8183 their base classes.
8184 * parse.y (template_instantiate_once): Unset TYPE_BEING_DEFINED
8185 before we get to left_curly.
8186 * pt.c (instantiate_class_template): Set TYPE_BEING_DEFINED.
8187
8188 * error.c (dump_decl): If it's a typedef, print out the name of the
8189 decl, not just the underlying type.
8190
8191 * decl.c (pushdecl): If the old duplicate decl was a TYPE_DECL,
8192 update the IDENTIFIER_TYPE_VALUE of its name.
8193
8194 * decl2.c (finish_file): When processing the initializer for a
8195 static member, pretend that the dummy function is a member of the
8196 same class.
8197
8198Fri Apr 15 15:56:35 1994 Kung Hsu (kung@mexican.cygnus.com)
8199
63718c49
GB
8200 * class.c (build_vtable_entry): revert Apr 4 change.
8201 * decl2.c (mark_vtable_entries): replace pure virtual function
8202 decl with abort's.
7177d104
MS
8203
8204Fri Apr 15 13:49:33 1994 Jason Merrill (jason@deneb.cygnus.com)
8205
8206 * typeck.c (build_conditional_expr): Pedwarn on pointer/integer
8207 mismatch, and don't pedwarn on 0/function pointer mismatch.
8208
8209 * typeck2.c (digest_init): Lose code for special handling of unions.
8210 (process_init_constructor): Since they're handled just fine here.
8211 Pedwarn on excess elements.
8212
8213 * decl2.c (grokfield): Complain about local class method declaration
8214 without definition.
8215
8216Fri Apr 15 13:19:40 1994 Per Bothner (bothner@kalessin.cygnus.com)
8217
8218 * method.c (emit_thunk): Add extern declaration for
8219 current_call_is_indirect (needed for hppa).
8220
8221Thu Apr 14 16:12:31 1994 Jason Merrill (jason@deneb.cygnus.com)
8222
8223 Improve local class support; allow classes in different blocks to
8224 have the same name.
8225 * decl.c (pushtag): Support local classes better.
8226 (pushdecl_nonclass_level): New function for pushing mangled decls of
8227 nested types into the appropriate scope.
8228 (xref_defn_tag): Use pushdecl_nonclass_level instead of
8229 pushdecl_top_level.
8230 (grokfndecl): Don't mess with IDENTIFIER_GLOBAL_VALUE for local
8231 class methods.
8232 * method.c (do_inline_function_hair): Ditto.
8233
8234 * class.c (finish_struct): It is legal for a class with no
8235 constructors to have nonstatic const and reference members.
8236
8237Thu Apr 14 07:15:11 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
8238
8239 * decl.c (push_overloaded_decl): Avoid giving errors about
8240 built-ins, since duplicate_decls will have given warnings/errors
8241 for them.
8242
8243Thu Apr 14 03:45:12 1994 Jason Merrill (jason@deneb.cygnus.com)
8244
8245 * cvt.c (convert_to_reference): Warn about casting pointer type to
8246 reference type when this is probably not what they wanted.
8247
8248Wed Apr 13 13:12:35 1994 Per Bothner (bothner@kalessin.cygnus.com)
8249
8250 * decl.c (finish_decl): Don't mindlessly set TREE_USED for
8251 static consts any more (toplev.c has now been modified to
8252 not emit warnings if they are unused).
8253
8254Wed Apr 13 00:22:35 1994 Jason Merrill (jason@deneb.cygnus.com)
8255
8256 * decl.c (grok_op_properties): If op new/delete get here with
8257 METHOD_TYPEs, do a revert_static_member_fn.
8258
8259 * cp-tree.h (IDENTIFIER_CLASS_TYPE_VALUE): Lose.
8260 * init.c (is_aggr_typedef): Don't look at
8261 IDENTIFIER_CLASS_TYPE_VALUE.
8262 (get_aggr_from_typedef): Ditto.
8263 (get_type_value): Ditto.
8264 * call.c (build_scoped_method_call): Don't rely on overloaded
8265 template names having IDENTIFIER_CLASS_VALUE set.
8266
8267 * parse.y (component_decl_1, fn.def2): Revert rules for
8268 constructors.
8269 (component_decl_1, fn.def2): Use $1 instead of $$, since $$ is being
8270 clobbered.
8271
8272 * decl.c (start_function): Only warn about `void main()' if pedantic
8273 || warn_return_type.
8274
8275Tue Apr 12 02:14:17 1994 Jason Merrill (jason@deneb.cygnus.com)
8276
8277 Clean up overloading of the template name.
8278 * class.c (pushclass): overload the template name whenever pushing
8279 into the scope of a template class, not just if it is
8280 uninstantiated.
8281 (popclass): Correspondingly.
8282 * search.c (push_class_decls): Don't overload_template_name.
8283 * pt.c (overload_template_name): Don't set IDENTIFIER_LOCAL_VALUE or
8284 DECL_CONTEXT on things.
8285 * parse.y (left_curly): Don't overload_template_name.
8286 * class.c (finish_struct): Don't undo_template_name_overload.
8287
8288 * method.c (build_opfncall): Only pass one argument to global op
8289 delete.
8290
8291 * call.c (build_method_call): Use TYPE_VEC_DELETE_TAKES_SIZE to
8292 decide how many arguments to use for vec delete.
8293
8294 * decl.c (grok_op_properties): Be consistent in modifying
8295 current_class_type.
8296 (grokdeclarator): Only complain about function decls with no return
8297 type if we're being pedantic.
8298
8299Mon Apr 11 00:10:53 1994 Jason Merrill (jason@deneb.cygnus.com)
8300
8301 Add support for operator new [] and operator delete [].
8302
8303 * tree.def: Add VEC_NEW_EXPR and VEC_DELETE_EXPR.
8304 * ptree.c (print_lang_type): Indicate vec new/delete.
8305 * parse.y: Support vec new/delete.
8306 * method.c (build_decl_overload): Deal with vec new/delete.
8307 (build_opfncall): Ditto.
8308 * lex.c (init_lex): Set up values of ansi_opname and opname_tab for
8309 vec new/delete. vec new uses "__vn", and vec delete uses "__vd".
8310 * init.c (init_init_processing): Set up BIVN and BIVD.
8311 (do_friend): Don't clean up after mistaken setting of TREE_GETS_NEW,
8312 since it doesn't happen any more.
8313 (build_new): Support vec new. Always call something.
8314 (build_x_delete): Support vec delete.
8315 (build_vec_delete): Lose dtor_dummy argument, add use_global_delete,
8316 and pass it to build_x_delete.
8317 * decl2.c (delete_sanity): Don't change behavior by whether or not
8318 the type has a destructor. Pass use_global_delete to
8319 build_vec_delete.
8320 (coerce_delete_type): Make sure that the type returned has a first
8321 argument of ptr_type_node.
8322 * decl.c (init_decl_processing): Also declare the global vec
8323 new/delete.
8324 (grokdeclarator): Also force vec new/delete to be static.
8325 (grok_op_properties): Note presence of vec new/delete, and play with
8326 their args. If vec delete takes the optional size_t argument, set
8327 TYPE_VEC_DELETE_TAKES_SIZE.
8328 * cp-tree.h (TYPE_GETS_{REG,VEC}_DELETE): New macros to simplify
8329 checking for one delete or the other.
8330 (lang_type): gets_new and gets_delete are now two bits long. The
8331 low bit is for the non-array version. Lose gets_placed_new.
8332 (TYPE_VEC_DELETE_TAKES_SIZE): New macro indicating that the vec
8333 delete defined by this class wants to know how much space it is
8334 deleting.
8335 (TYPE_VEC_NEW_USES_COOKIE): New macro to indicate when vec new must
8336 add a header containing the number of elements in the vector; i.e.
8337 when the elements need to be destroyed or vec delete wants to know
8338 the size.
8339 * class.c (finish_struct_methods): Also check for overloading vec
8340 delete.
8341 * call.c (build_method_call): Also delete second argument for vec
8342 delete.
8343
8344 * decl.c (grokdeclarator): Correct complaints again.
8345 (grokdeclarator): Fix segfault on null declarator.
8346 (decls_match): Also accept redeclaration with no arguments if both
8347 declarations were in C context. Bash TREE_TYPE (newdecl) here.
8348 (duplicate_decls): Instead of here.
8349
8350 * parse.y (nested_name_specifier_1): Lose rules for dealing with
8351 syntax errors nicely, since they break parsing of 'const i;'.
8352
8353 * decl.c (lookup_name): if (got_scope == current_class_type)
8354 val = IDENTIFIER_CLASS_VALUE (name).
8355
8356 * search.c (lookup_nested_tag): Look in enclosing classes, too.
8357
8358 * spew.c (yylex): Only look one character ahead when checking for a
8359 SCOPE.
8360
8361 * lex.c (check_newline): Read first nonwhite char before
8362 incrementing lineno.
8363
8364 * decl.c (grokdeclarator): Don't claim that typedefs are variables
8365 in warning.
8366
8367 * parse.y: Divide up uses of unqualified_id into
8368 notype_unqualified_id and unqualified_id, so that TYPENAME can be
8369 used as an identifier after an object.
8370
8371 * class.c (push_nested_class): Don't push into non-class scope.
8372
8373 * decl.c (grokdeclarator): If an identifier could be a type
8374 conversion operator, but has no associated type, it's not a type
8375 conversion operator.
8376
8377 * pt.c (unify): Check for equality of constants better.
8378
8379 * decl.c (grokdeclarator): Don't complain about access decls.
8380
8381Sun Apr 10 02:39:55 1994 Jason Merrill (jason@deneb.cygnus.com)
8382
8383 * decl.c (grokdeclarator): pedwarn about data definitions without
8384 types here.
8385
8386 * parse.y (datadef): Don't pedwarn about decls without types here,
8387 since that is valid for functions.
8388 (fn.def2, component_decl): Support constructors with declmods again.
8389 (nomods_initdecls): For decls without any mods, so that we don't try
8390 to get declspecs from some arbitrary $0.
8391
8392 * search.c (lookup_field): Use cp_error.
8393
8394 * parse.y (nested_name_specifier_1): Don't check aggr/non-aggr type
8395 here; it breaks destructors for non-aggr types.
8396
8397 * decl.c (lookup_name): Only look for TYPE_DECLs in base classes of
8398 a type being defined, like the comment says.
8399 If got_scope is not an aggregate, just return NULL_TREE.
8400
8401 * pt.c (create_nested_upt): Kung's code for creating types nested
8402 within uninstantiated templates now lives here (it used to live in
8403 hack_more_ids). It needs to be expanded.
8404
8405 * parse.y: Stop calling see_typename so much.
8406
8407 * decl.c (lookup_name): Deal with TTPs and UPTs.
8408
8409 * lex.c (real_yylex): Don't set looking_for_typename just because we
8410 saw a 'new'.
8411 (dont_see_typename): #if 0 out.
8412
8413 * spew.c (yylex): Increment looking_for_typename if the next
8414 character is SCOPE, rather than setting it to 1; this way, the value
8415 from seeing an aggr specifier will not be lost. This kinda relies
8416 on looking_for_typename never being < 0, which is now true.
8417
8418 * parse.y (nested_name_specifier_1): Accept TEMPLATE_TYPE_PARMs,
8419 too.
8420 (named_class_head_sans_basetype): Accept template types, too. Oops.
8421
8422Fri Apr 8 16:39:35 1994 Jason Merrill (jason@deneb.cygnus.com)
8423
8424 * decl2.c (reparse_decl_as_expr1): Handle SCOPE_REFs.
8425
8426 * parse.y: Lose START_DECLARATOR.
8427
8428 * search.c (lookup_nested_tag): New function to scan CLASSTYPE_TAGS
8429 for a class.
8430
8431 * parse.y: Simplify fn.def2 and component_decl. Support 'enum
8432 A::foo' syntax. Catch invalid scopes better.
8433
8434 * parse.y, lex.c: lose TYPENAME_COLON.
8435
8436 * decl2.c (groktypefield): #if 0 out.
8437
8438 * decl.c (lookup_name): If the type denoted by got_scope is
8439 currently being defined, look in CLASSTYPE_TAGS rather than FIELDS.
8440
8441 * class.c (push_nested_class): Don't try to push into
8442 error_mark_node.
8443
8444Fri Apr 8 07:26:36 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
8445
8446 * Makefile.in (stamp-parse): Update count of conflicts to 33.
8447
8448Thu Apr 7 17:47:53 1994 Jason Merrill (jason@deneb.cygnus.com)
8449
8450 A saner implementation of nested types that treats template types
8451 no differently from non-template types. There are still some
8452 shortcomings of our system; most notably, it is difficult to look
8453 for a nested type that is hidden by another name, because of the way
8454 we keep track of hidden types. But this shouldn't be a problem for
8455 just about anyone. Perhaps lookup_field should be fixed up a bit.
8456
8457 * spew.c: Moved handling of nested types/scoping from the lexer
8458 into the parser. Removed variable template_type_seen_before_scope.
8459 Removed functions frob_identifier, hack_more_ids, and various cruft
8460 that was #if 0'd out in the past, reducing the size of the file from
8461 1146 lines to 450 lines. We can't quite do away with spew.c yet,
8462 though; we still need it for do_aggr () and checking for SCOPE after
8463 the current identifier. And setting lastiddecl.
8464
8465 * parse.y: Moved handling of nested types/scoping from the lexer
8466 into the parser, using a new global variable `got_scope'. Reduced
8467 the number of states by 53. Implemented all uses of explicit global
8468 scope. Removed terminals SCOPED_TYPENAME and SCOPED_NAME. Removed
8469 nonterminals tmpl.1, scoped_base_class, id_scope, typename_scope,
8470 scoped_typename. Added nonterminals nested_type,
8471 qualified_type_name, complete_type_name, qualified_id, ptr_to_mem,
8472 nested_name_specifier, global_scope, overqualified_id, type_name.
8473 Changed many others. Added 9 new reduce/reduce conflicts, which are
8474 nested type parallels of 9 that were already in the grammar for
8475 non-nested types. Eight of the now 33 conflicts should be removed
8476 in the process of resolving the late binding between variable and
8477 function decls.
8478
8479 * gxxint.texi (Parser): Update.
8480
8481 * cp-tree.h (IS_AGGR_TYPE_CODE): Add UNINSTANTIATED_P_TYPE.
8482
8483 * lex.h: Add decl for got_scope.
8484
8485 * lex.c (see_typename): Claim to be the lexer when calling
8486 lookup_name.
8487
8488 * decl.c (lookup_name): When called from the lexer, look at
8489 got_scope and looking_at_typename; otherwise don't.
8490
6060a796 8491Thu Apr 7 22:05:47 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
8492
8493 31th Cygnus<->FSF merge.
8494
8495Thu Apr 7 17:47:53 1994 Jason Merrill (jason@deneb.cygnus.com)
8496
8497 * decl2.c (mark_vtable_entries): Call this to mark all the
8498 entries in the vtable addressable.
8499 (finish_decl_parsing): Handle SCOPE_REFs.
8500
8501 * decl.c (decls_match): Always call compparms with strict == 1.
8502 Handle the special case of C function redecl here.
8503 (duplicate_decls): Only keep the old type if the new decl takes no
8504 arguments.
8505
8506 * typeck.c (compparms): Also allow t1 to be ... if strict == 0.
8507
6060a796 8508Thu Apr 7 16:17:50 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
8509
8510 * class.c (build_vtable_entry): Fix breakage introduced Apr 5
8511 17:48:41.
8512
8513Wed Apr 6 16:05:10 1994 Per Bothner (bothner@kalessin.cygnus.com)
8514
8515 * init.c (build_virtual_init), search.c (build_vbase_vtables_init),
8516 ch-tree.h: Every place these functions were called, the result was
8517 immediately passed to expand_expr_stmt. Reduce redundancy by
8518 calling expand_expr_init *inside* these functions. These
8519 makes for a simpler interface, and we don't have to build
8520 compound expressions. Hence, rename these function to:
8521 expand_virtual_init and expand_vbase_vtables_init respectively.
8522 * init.c, decl.c: Change callers of these functions.
8523 * init.c, cp-tree.h (expand_virtual_init): Make static.
8524
8525 * decl2.c (finish_file): Check TREE_PUBLIC||TREE_ADDRESSABLE
8526 rather than DECL_SAVED_INSNS before emitting inlines.
8527
8528Wed Apr 6 13:06:39 1994 Jason Merrill (jason@deneb.cygnus.com)
8529
8530 * spew.c (init_spew): #if 0 out stuff used by arbitrate_lookup.
8531
8532 * decl.c (duplicate_decls): If this is a new declaration of an
8533 extern "C" function, keep the type (for the argtypes).
8534 (redeclaration_error_message): Don't check DECL_LANGUAGE here.
8535 (decls_match): Call compparms with a value of strict dependent on
8536 the value of strict_prototypes for DECL_LANGUAGE (oldecl).
8537
8538 * typeck.c (compparms): ... is only equivalent to non-promoting
8539 parms if we're not being strict.
8540
8541 * parse.y (empty_parms): Don't check flag_ansi || pedantic here.
8542
8543 * decl.c (init_decl_processing): if (flag_ansi || pedantic)
8544 strict_prototypes_lang_c = strict_prototypes_lang_cplusplus;
8545
8546 * decl2.c (grok_function_init): Don't set DECL_INITIAL on pure
8547 virtuals.
8548
8549Tue Apr 5 17:48:41 1994 Per Bothner (bothner@kalessin.cygnus.com)
8550
8551 Support for implementing vtables with thunks.
8552 * tree.def (THUNK_DECL): New TREE_CODE.
8553 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY), tree.c
8554 (fnaddr_from_vtable_entry): Handle flag_vtable_thunks case.
8555 * cp-tree.h (memptr_type): New variable.
8556 * class.c (build_vtable_entry): Build thunk if necessary.
8557 * class.c (build_vfn_ref): If using thunks, don't need
8558 to add delta field from vtable (there is none!).
8559 * decl.c: Add memptr_type as well as vtable_entry_type.
8560 If using thunks, the latter is just ptr_type_node.
8561 * gc.c, typeck.c: Use memptr_typeChange, not vtable_entry_type.
8562 * decl2.c (finish_vtable_vardecl): Handle thunks.
8563 * expr.c (cplus_expand_expr): Support THUNK_DECL.
8564
8565 * decl.c (grokdeclarator): Set DECL_THIS_EXTERN if "extern".
8566 * decl.c (start_function): Set current_extern_inline based on
8567 DECL_THIS_EXTERN, not TREE_PUBLIC.
8568 * decl.c (finish_function): Call mark_inline_for_output if needed,
8569
8570 Improve intelligence about when to emit inlines.
8571 * cp-tree.h (lang_decl_flags): New field saved_inline.
8572 * cp-tree.h (DECL_SAVED_INLINE): New macro.
8573 * class.c (add_virtual_function): Don't set TREE_ADDRESSABLE.
8574 * decl.h, decl.c (pending_addressable_inlines): Removed.
8575 * decl2.c (pending_addressable_inlines): Renamed to saved_inlines.
8576 * decl2.c (mark_inline_for_output): Do nothing if
8577 DECL_SAVED_INLINE; otherwise set it (and add to saved_inlines list).
8578 * decl2.c (finish_vtable_vardecl): SET_CLASSTYPE_INTERFACE_KNOWN
8579 and set CLASSTYPE_INTERFACE_ONLY if there is a non-inline virtual.
8580 * decl2.c (finish_file): Writing out inlines later, so we can
8581 also handle the ones needed for vtbales.
8582 * decl2.c (write_vtable_entries, finish_vtable_typedecl): Removed.
8583
8584 * cp-tree.h, class.c, decl2.c, search.c: Remove -fvtable-hack
8585 and flag_vtable_hack. Use -fvtable-thunks and flag_vtable_thunks
8586 instead. (The rationale is that these optimizations both break binary
8587 compatibility, but should become the default in a future release.)
8588
6060a796 8589Wed Apr 6 10:53:56 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
8590
8591 * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT
8592 of a fndecl, as we might not be from that vfield.
8593
8594Tue Apr 5 17:43:35 1994 Kung Hsu (kung@mexican.cygnus.com)
8595
8596 * class.c (add_virtual_function): fix bug for pure virtual, so
8597 that DECL_VINDEX of the dummy decl copied won't be error.
8598 (see also Apr 4 change)
8599
8600Tue Apr 5 17:23:45 1994 Per Bothner (bothner@kalessin.cygnus.com)
8601
8602 * typeck.c (c_expand_return): Before checking that we're not
8603 returning the address of a local, make sure it's a VAR_DECL.
8604 (And don't worry about it being a TREE_LIST.)
8605
8606Tue Apr 5 13:26:42 1994 Jason Merrill (jason@deneb.cygnus.com)
8607
8608 * parse.y (YYDEBUG): Always define.
8609 * lex.c (YYDEBUG): Ditto.
8610
8611Mon Apr 4 11:28:17 1994 Kung Hsu (kung@mexican.cygnus.com)
8612
8613 * class.c (finish_struct): backup out the change below, put the
8614 new change for the same purpose. The change below breaks code.
8615
8616 * class.c (finish_struct): if pure virtual, copy node and make
8617 RTL point to abort, then put in virtual table.
8618 * decl2.c (grok_function_iit): reinstate Mar 31 change.
8619
8620Sat Apr 2 03:12:58 1994 Jason Merrill (jason@deneb.cygnus.com)
8621
8622 * init.c (build_new): pedwarn about newing const and volatile
8623 types.
8624
8625 * tree.c (get_identifier_list): Only do the special handling
8626 thing if we're dealing with the main variant of the record type.
8627
8628 * cvt.c (convert_to_reference): When converting between
8629 compatible reference types, use the pointer conversion machinery.
8630 Don't just blindly overwrite the old type.
8631
8632Fri Apr 1 17:14:42 1994 Jason Merrill (jason@deneb.cygnus.com)
8633
8634 * call.c (build_method_call): When looking at global functions,
8635 be sure to use instance_ptr for the first argument, not some version
8636 of it that has been cast to a base class. Also do this before
8637 comparing candidates.
8638
8639Thu Mar 31 19:50:35 1994 Jason Merrill (jason@deneb.cygnus.com)
8640
8641 * call.c (build_method_call): Constructors can be called for
8642 const objects.
8643
8644Thu Mar 31 16:20:16 1994 Kung Hsu (kung@mexican.cygnus.com)
8645
8646 * decl2.c (grok_func_init): do not abort as rtl for pur virtual
8647 fucntions. They can be defined somewhere else.
8648
8649Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
8650
8651 * decl.c (init_decl_processing): Declare __builtin_return_address
8652 and __builtin_frame_address for C++ as well.
8653
6060a796 8654Thu Mar 31 12:35:49 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
8655
8656 * typeck2.c (store_init_value): Integral constant variables are
8657 always constant, even when doing -fpic.
8658
8659Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
8660
8661 * decl.c (redeclaration_error_message): Pass the types to
8662 comptypes.
8663
6060a796 8664Wed Mar 30 21:29:25 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
8665
8666 Cures incorrect errors about pure virtuals in a class, when they
8667 have been overridden in a derived class.
8668
8669 * search.c (get_abstract_virtuals): Reimplement.
8670 * search.c (get_abstract_virtuals_1): New routine.
8671
8672Wed Mar 30 14:10:04 1994 Jason Merrill (jason@deneb.cygnus.com)
8673
8674 * pt.c (push_template_decls): Make the pushed level pseudo
8675 global.
8676
8677 * parse.y (extdefs): Don't pop everything if the current binding
8678 level is pseudo_global.
8679
8680 * decl.c (pop_everything): Stop on reaching a pseudo-global
8681 binding level.
8682
8683 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Change to more reliable test.
8684
8685 * decl.c (duplicate_decls): Only copy DECL_SOURCE_{FILE_LINE} if
8686 the old decl actually had an initializer.
8687
8688 * {various}: Clean up gcc -W complaints.
8689
8690 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Currently defined to be
8691 (DECL_CONTEXT (NODE) != NULL_TREE).
8692
8693 * parse.y (lang_extdef): Call pop_everything if necessary.
8694
8695 * decl.c (pop_everything): New function for popping binding
8696 levels left over after a syntax error.
8697 (pushdecl): Use DECL_FUNCTION_MEMBER_P to decide whether or not
8698 a function is a member.
8699
6060a796 8700Wed Mar 30 14:20:50 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
8701
8702 Cures calling a more base base class function, when a more derived
8703 base class member should be called in some MI situations.
8704
8705 * search.c (make_binfo): Use more the more specialized base
63718c49
GB
8706 binfos from the binfo given as the second argument to make_binfo,
8707 instead of the unspecialized ones from the TYPE_BINFO.
7177d104
MS
8708 * class.c (finish_base_struct): Ditto, update callers.
8709 * search.c (dfs_get_vbase_types): Ditto.
8710 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Ditto.
8711 * decl.c (xref_tag): Use NULL_TREE instead of 0.
8712 * lex.c (make_lang_type): Ditto.
8713
8714Wed Mar 30 14:10:04 1994 Jason Merrill (jason@deneb.cygnus.com)
8715
8716 * decl.c (pushdecl): If pushing a C-linkage function, only do a
8717 push_overloaded_decl.
8718 (duplicate_decls): Standard overloading does not shadow built-ins.
8719
8720Tue Mar 29 00:54:18 1994 Jason Merrill (jason@deneb.cygnus.com)
8721
8722 * pt.c (end_template_decl): Don't call push_overloaded_decl.
8723
8724 * init.c (do_friend): Don't call push_overloaded_decl.
8725
8726 * decl.c (pushdecl): Call push_overloaded_decl for functions and
8727 function templates.
8728 (duplicate_decls): functions and function templates are not
8729 duplicates, but don't complain about calling this function to
8730 compare them.
8731 (push_overloaded_decl): Don't deal with linkage. Call
8732 duplicate_decls.
8733 (redeclaration_error_message): Deal with linkage.
8734
8735 * decl.c (start_function): If push_overloaded_decl returns an
8736 older version of the function, deal with it.
8737
8738 * decl.c (start_function): Be sure only to push_overloaded_decl
8739 for non-members.
8740
8741 * decl.c (grokfndecl): Put back clearing of DECL_CHAIN for
8742 methods.
8743 (start_function): Lose broken and redundant code for checking old
8744 decl.
8745
8746 * init.c (add_friend): Give line numbers of both friend decls
8747 when warning about re-friending.
8748
8749 * pt.c (tsubst): Use comptypes rather than == to compare the
8750 types of the method as declared and as defined, since default
8751 parameters may be different.
8752
8753 * call.c (build_method_call): Use brendan's candidate printing
8754 routine.
8755
8756 * decl.c (start_method): Methods defined in the class body are
8757 inline whether or not it's a template class.
8758
8759Mon Mar 28 16:39:26 1994 Jason Merrill (jason@deneb.cygnus.com)
8760
8761 * parse.y (initdcl0): Add "extern" to current_declspecs if
8762 have_extern_spec && ! used_extern_spcec.
8763
8764 * tree.c (really_overloaded_fn): A fn with more than one
8765 overload.
8766
8767 * pt.c (end_template_decl): Use really_overloaded_fn.
8768
8769 * decl.c (duplicate_decls): When smashing a decl into a previous
8770 definition, keep the old file and line.
8771 Don't deal with overloaded functions.
8772 Lose old code for checking arg types of functions.
8773 Check for overloaded C functions.
8774 (pushdecl): Deal with overloaded functions.
8775 (start_decl): Expect pushdecl to return an appropriate function decl.
8776 (start_function): Ditto.
8777 (push_overloaded_decl): Don't check for overloaded C functions.
8778
8779 * *.c: Stop using DECL_OVERLOADED, it being archaic.
8780 TREE_OVERLOADED should probably go, too.
8781
8782Mon Mar 28 14:00:45 1994 Ron Guilmette (rfg@netcom.com)
8783
8784 * typeck.c (comp_target_types): Call comp_target_parms with
8785 strict == 1.
8786
8787Sun Mar 27 00:07:45 1994 Jason Merrill (jason@deneb.cygnus.com)
8788
8789 * parse.y (empty_parms): Don't parse () as (...) in extern "C"
8790 sections if we're compiling with -ansi or -pedantic.
8791
8792 * decl.c (decls_match): Don't treat (int) and (int&) as matching.
8793
8794 * decl2.c (grokfield): Don't pedwarn twice about initializing
8795 field.
8796
8797 * decl.c (push_overloaded_decl): Warn about shadowing
8798 constructor.
8799 (redeclaration_error_message): Don't allow 'int a; int a;'
8800
8801 * cvt.c (build_up_reference): Only check for valid upcast if
8802 LOOKUP_PROTECT is set, not just any flag.
8803
8804Fri Mar 25 01:22:31 1994 Jason Merrill (jason@deneb.cygnus.com)
8805
8806 * lex.c (check_newline): When we see a #pragma implementation,
8807 also set it for the main input file.
8808
8809 * init.c (build_new): Convert array size argument to size_t.
8810
8811 * parse.y (primary): If we're doing a parenthesized type-id, call
8812 groktypename before passing it to build_new.
8813
8814 * call.c (build_method_call): Deal properly with const and
8815 volatile for instances of reference type.
8816
8817 * decl.c (store_return_init): Change 'if (pedantic) error' to 'if
8818 (pedantic) pedwarn'.
8819
8820 * decl.c (grokdeclarator): Don't complain about putting `static'
8821 and `inline' on template function decls.
8822
8823Thu Mar 24 23:18:19 1994 Jason Merrill (jason@deneb.cygnus.com)
8824
8825 * call.c (build_method_call): Preserve const & volatile on
8826 `this'.
8827
6060a796 8828Thu Mar 24 16:21:52 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
8829
8830 * init.c (build_new, build_vec_delete): Use global new and delete
8831 for arrays.
8832 * decl2.c (delete_sanity): Ditto.
8833
8834Thu Mar 24 02:10:46 1994 Jason Merrill (jason@deneb.cygnus.com)
8835
8836 * cvt.c (convert_to_reference): If i is an lvalue,
8837 (int &)i -> *(int*)&i, as per 5.2.8p9 of the latest WP.
8838 (convert_force): Call convert_to_reference with LOOKUP_COMPLAIN.
8839
8840Wed Mar 23 17:45:37 1994 Jason Merrill (jason@deneb.cygnus.com)
8841
8842 * decl.c (duplicate_decls): Also propagate DECL_TEMPLATE_MEMBERS
8843 and DECL_TEMPLATE_INSTANTIATIONS.
8844
8845 * init.c (build_new): Handle array typedefs properly.
8846
6060a796 8847Wed Mar 23 18:23:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
8848
8849 30th Cygnus<->FSF merge.
8850
6060a796 8851Wed Mar 23 00:46:24 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
8852
8853 * class.c (modify_vtable_entries): Avoid running off the end of the
8854 virtuals list when processing a virtual destructor.
8855 * class.c (get_vtable_entry): Ditto.
8856
8857Wed Mar 23 00:23:59 1994 Jason Merrill (jason@deneb.cygnus.com)
8858
8859 * decl.c (duplicate_decls): If two template decls don't match,
8860 just return 0.
8861
8862Tue Mar 22 23:49:41 1994 Jason Merrill (jason@deneb.cygnus.com)
8863
8864 * typeck.c (convert_for_assignment): Don't pedwarn about
8865 converting function pointer to void *.
8866
6060a796 8867Tue Mar 22 22:23:19 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
8868
8869 Major revamp of pointer to member functions. Cures major
8870 nonfunctionality when used in casts, and MI situations.
8871
8872 * cvt.c (convert_force): Update call site of build_ptrmemfunc.
8873 * typeck.c (convert_for_assignment): Ditto.
8874 * typeck2.c (digest_init): Ditto.
8875 * typeck2.c (process_init_constructor): Simplify by moving code into
8876 digest_init.
8877 * typeck2.c (digest_init): Do default_conversions on init value, if
8878 we are processing pointer to member functions.
8879 * class.c (get_vfield_offset): Now non-static. Convert bit offset
8880 into byte offset.
8881 * cp-tree.h (get_vfield_offset): Ditto.
8882 * typeck.c (get_member_function_from_ptrfunc): Convert down to right
8883 instance, before fetching vtable pointer.
8884 * typeck.c (get_delta_difference): New routine.
8885 * typeck.c (build_ptrmemfunc): Revamp to handle casting better, also
8886 get vtable pointer out of right subobject.
8887
6060a796 8888Tue Mar 22 17:56:48 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
8889
8890 * search.c (get_binfo): Return NULL instead of aborting, when
8891 passed a UNION_TYPE.
8892
8893Tue Mar 22 12:44:54 1994 Jason Merrill (jason@deneb.cygnus.com)
8894
8895 These patches implement handling of redefinition/redeclaration of
8896 templates.
8897
8898 * typeck.c (comptypes): Simplify. All TEMPLATE_TYPE_PARMs are
8899 considered compatible.
8900
8901 * parse.y (template_def): Pass defn argument to end_template_decl.
8902
8903 * pt.c (end_template_decl): Add defn argument. Check for
8904 redefinition. Simplify.
8905
8906 * error.c (OB_UNPUT): New macro, to remove mistakes.
8907 (aggr_variety): Subroutine of dump_aggr_type.
8908
8909 * decl.c (decls_match): Support templates.
8910 (duplicate_decls): No longer static. Don't try to lay out template
8911 decls.
8912 (pushdecl): Simplify.
8913
8914 * cp-tree.h (DECL_TEMPLATE_MEMBERS): Use DECL_SIZE instead of
8915 DECL_INITIAL.
8916
8917Mon Mar 21 11:46:55 1994 Jason Merrill (jason@deneb.cygnus.com)
8918
8919 * error.c (dump_decl): Support class template decls.
8920 (dump_type): Don't adorn template type parms.
8921
8922 * decl.c (duplicate_decls): Save DECL_TEMPLATE_INFO from old decl
8923 if it was a definition.
8924 (redeclaration_error_message): Do the cp_error thang, and reject
8925 redefinition of templates.
8926
8927Mon Mar 21 19:36:06 1994 Per Bothner (bothner@kalessin.cygnus.com)
8928
8929 * decl.c (grokdeclarator): Set TREE_PUBLIC for METHOD_TYPE
8930 in FIELD context, when appropriate. Also,
8931 CLASSTYPE_INTERFACE_ONLY is irrelevant to setting TREE_PUBLIC.
8932 Also, simplify check for bogus return specifiers.
8933
8934Mon Mar 21 11:46:55 1994 Jason Merrill (jason@deneb.cygnus.com)
8935
8936 * parse.y (after_type_declarator1): Expand type_quals.
8937 (notype_declarator1): Ditto.
8938 (absdcl1): Ditto.
8939
8940Sat Mar 19 01:05:17 1994 Jason Merrill (jason@deneb.cygnus.com)
8941
8942 * decl.c (grokdeclarator): Treat class-local typedefs like static
8943 members; i.e. 'typedef int f();' means that f is a function type,
8944 not a method type.
8945
8946 * parse.y (decl): Change direct_* back to *.
8947 (type_id): Change direct_abstract_declarator to absdcl.
8948 (direct_declarator, direct_initdecls, direct_initdcl0): Remove again.
8949
8950Fri Mar 18 12:47:59 1994 Jason Merrill (jason@deneb.cygnus.com)
8951
8952 These two patches fix crashes on instantiating a template inside a
8953 function with C linkage or containing labels.
8954
8955 * class.c (current_lang_stacksize): No longer static.
8956
8957 * decl.c (struct saved_scope): Add lang_base, lang_stack,
8958 lang_name, lang_stacksize, and named_labels.
8959 (push_to_top_level): Save them.
8960 (pop_from_top_level): Restore them.
8961
8962 * gxxint.texi (Parser): Update.
8963
8964 These two patches finish moving the task of expr/declarator
8965 ambiguity resolution from the lexer to the parser, and add one more
8966 r/r conflict. START_DECLARATOR can now be nuked.
8967
8968 * parse.y (decl): Add "direct_" in typespec X rules.
8969 (direct_declarator): New nonterminal for
8970 direct_after_type_declarator and direct_notype_declarator.
8971 (direct_initdecls): Like initdecls, but uses direct_initdcl0.
8972 (direct_initdcl0): Like initdcl0, but uses direct_declarator.
8973 (named_parm): Add typespec direct_declarator rule.
8974
8975 * spew.c (yylex): #if 0 out START_DECLARATOR insertion.
8976
8977 These two patches disable some excessive cleverness on the part of
8978 g++; a non-class declaration always hides a class declaration in the
8979 same scope, and g++ was trying to unhide it depending on the
8980 enclosing expression.
8981
8982 * spew.c (arbitrate_lookup): #if 0 out.
8983
8984 * decl.c (lookup_name): Never call arbitrate_lookup.
8985
8986 * parse.y (complex_notype_declarator1): Add '*'
8987 complex_notype_declarator1 and '&' complex_notype_declarator1 rules.
8988
8989 * parse.y (complex_direct_notype_declarator): Restore id_scope
8990 see_typename TYPENAME rule, remove all other rules beginning with
8991 those tokens.
8992 (notype_unqualified_id): Add '~' see_typename IDENTIFIER rule.
8993
8994Thu Mar 17 17:30:01 1994 Jason Merrill (jason@deneb.cygnus.com)
8995
8996 These changes fix the compiler's handling of the functional cast/
8997 object declaration ambiguities in section 6.8 of the ARM. They also
8998 add 11 reduce/reduce conflicts. Sigh.
8999
9000 * parse.y: Add precedence decls for OPERATOR and '~'.
9001 (notype_unqualified_id): New nonterminal, encompasses all of the
9002 ANSI unqualified-id nonterminal except TYPENAMEs.
9003 (expr_or_declarator): New nonterminal to delay parsing of code like
9004 `int (*a)'.
9005 (primary): Use notype_unqualified_id.
9006 (decl): Add typespec initdecls ';' and typespec declarator ';'
9007 rules.
9008 (initdcl0): Deal with the above.
9009 (complex_notype_declarator1): A notype_declarator that is not also
9010 an expr_or_declarator.
9011 (complex_direct_notype_declarator): A direct_notype_declarator that
9012 doesn't conflict with expr_or_declarator. Use
9013 notype_unqualified_id. Remove id_scope see_typename TYPENAME rule.
9014 (functional_cast): New nonterminal, for the three functional cast
9015 rules. So that they can be moved after
9016 complex_direct_notype_declarator.
9017 (see_typename): Don't accept type_quals any more.
9018
9019 * decl2.c (reparse_decl_as_expr): New function to deal with parse
9020 nodes for code like `int (*a)++;'.
9021 (reparse_decl_as_expr1): Recursive subroutine of the above.
9022 (finish_decl_parsing): New function to deal with parse nodes for
9023 code like `int (*a);'. See the difference?
9024
6060a796 9025Thu Mar 17 12:16:10 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9026
9027 These changes break binary compatibility in code with classes
9028 that use virtual bases.
9029
9030 * search.c (dfs_get_vbase_types): Simplify and correct to make
9031 sure virtual bases are initialized in dfs ordering.
9032 * search.c (get_vbase_types): Simplify and make readable.
9033
9034Thu Mar 17 12:01:10 1994 Jason Merrill (jason@deneb.cygnus.com)
9035
9036 * parse.y: s/ typename / type_id /g
9037
9038Wed Mar 16 17:42:52 1994 Kung Hsu (kung@mexican.cygnus.com)
9039
9040 * parse.y (typespec): add SCOPE TYPENAME for global scoped
9041 type. e.g. ::B x.
9042
9043 * decl.c (complete_array_type): fix a bug that in -pendantic
9044 mode even there's no initializer, it will continue to build
9045 default index.
9046
9047Wed Mar 16 17:43:07 1994 Jason Merrill (jason@deneb.cygnus.com)
9048
9049 * parse.y (direct_notype_declarator): Add PTYPENAME rule, remove
9050 all of the scoped PTYPENAME rules.
9051
6060a796 9052Wed Mar 16 16:39:02 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9053
9054 * init.c (build_offset_ref): The value of A::typedef_name is
9055 always the TYPE_DECL, and never an error.
9056
9057Tue Mar 15 20:02:35 1994 Jason Merrill (jason@deneb.cygnus.com)
9058
9059 * search.c (get_base_distance_recursive): Two binfos can only
9060 represent the same object if they are both via_virtual.
9061
9062 * class.c (finish_base_struct): Check vbases for ambiguity, too.
9063
9064 * search.c (get_vbase_types): Accept binfo argument, too.
9065
9066Tue Mar 15 19:22:05 1994 Kung Hsu (kung@mexican.cygnus.com)
9067
9068 * decl.c (complete_array_type): complete TYPE_DOMAIN of the
9069 initializer also, because back-end requires it.
9070
9071Tue Mar 15 15:33:31 1994 Jason Merrill (jason@deneb.cygnus.com)
9072
9073 * error.c (dump_expr): Support member functions (which show up as
9074 OFFSET_REFs).
9075
6060a796 9076Mon Mar 14 16:24:36 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9077
9078 * init.c (build_new): Set the return type of multidimensional
9079 news correctly.
9080
9081Fri Mar 11 15:35:39 1994 Kung Hsu (kung@mexican.cygnus.com)
9082
9083 * call.c (build_method_call): if basetype not equal to type
9084 of the instance, use the type of the instance in building
9085 destructor.
9086
9087Thu Mar 10 17:07:10 1994 Kung Hsu (kung@mexican.cygnus.com)
9088
9089 * parse.y (direct_notype_declarator): add push_nested_type for
9090 'template_type SCOPED_NAME' rule.
9091
9092Tue Mar 8 00:19:58 1994 Jason Merrill (jason@deneb.cygnus.com)
9093
9094 * parse.y (parm): Add typed_declspec1 {absdcl, epsilon} rules.
9095
9096Sat Mar 5 04:47:48 1994 Jason Merrill (jason@deneb.cygnus.com)
9097
9098 * parse.y (regcast_or_absdcl): New nonterminal to implement late
9099 reduction of constructs like `int ((int)(int)(int))'.
9100 (cast_expr): Use it.
9101 (sub_cast_expr): Everything that can come after a cast.
9102 (typed_declspecs1): typed_declspecs that are not typed_typespecs.
9103 (direct_after_type_declarator): Lose PAREN_STAR_PAREN rule.
9104 (direct_abstract_declarator): Replace '(' parmlist ')' rule with
9105 '(' complex_parmlist ')' and regcast_or_absdcl.
9106 (parmlist): Split
9107 (complex_parmlist): Parmlists that are not also typenames.
9108 (parms_comma): Enabler.
9109 (named_parm): A parm that is not also a typename. Use declarator
9110 rather than dont_see_typename abs_or_notype_decl. Expand
9111 typed_declspecs inline.
9112 (abs_or_notype_decl): Lose.
9113 (dont_see_typename): Comment out.
9114 (bad_parm): Break out abs_or_notype_decl into two rules.
9115
9116Fri Mar 4 18:22:39 1994 Jason Merrill (jason@deneb.cygnus.com)
9117
9118 * decl2.c (reparse_decl_as_casts): New function to change parse
9119 nodes for `(int)(int)(int)' from "function taking int and returning
9120 function taking int and returning function taking int" to "... cast
9121 to int, cast to int, cast to int".
9122
9123 * decl2.c (reparse_decl_as_expr): Recursive function to change
9124 parse nodes for `A()()' from "function returning function returning
9125 A" to "A().operator()".
9126
9127 * parse.y (primary): Replace `typespec LEFT_RIGHT' rule with
9128 `typespec fcast_or_absdcl' rule.
9129 (fcast_or_absdcl): New nonterminal to implement late reduction of
9130 constructs like `A()()()()'.
9131 (typename): Replace `typespec absdcl1' rule with
9132 `typespec direct_abstract_declarator' rule.
9133 (direct_abstract_declarator): Replace `LEFT_RIGHT type_quals' rule
9134 with `fcast_or_absdcl type_quals' rule.
9135
6060a796 9136Fri Mar 4 16:18:03 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9137
9138 * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it
9139 matches Section 5.5.
9140
9141Fri Mar 4 14:01:59 1994 Jason Merrill (jason@deneb.cygnus.com)
9142
9143 * error.c (dump_type_prefix): Don't print basetype twice for
9144 pmfs.
9145
6060a796 9146Fri Mar 4 13:24:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9147
9148 * typeck.c (convert_arguments): Handle setHandler(A::handlerFn)
9149 so that it is like setHandler(&A::handlerFn). Cures an `invalid
9150 lvalue in unary `&''.
9151
9152Fri Mar 4 11:15:59 1994 Jason Merrill (jason@deneb.cygnus.com)
9153
9154 * gxxint.texi (Copying Objects): New section discussing default
9155 op= problems with virtual inheritance.
9156
9157 * decl2.c (grokoptypename): Just does grokdeclarator and
9158 build_typename_overload, since the parser can't call grokdeclarator
9159 directly.
9160
9161 * method.c (build_typename_overload): Set IDENTIFIER_GLOBAL_VALUE
9162 and TREE_TYPE on generated identifiers.
9163
9164 * decl.c (grokdeclarator): Don't deal with TYPE_EXPRs anymore.
9165
9166 * parse.y (parm): Convert `const char *' to `__opPCc' here.
9167
9168 * error.c (dump_decl): Say sorry rather than my_friendly_aborting
9169 if we can't figure out what to do.
9170 (dump_type*): Ditto.
9171
9172 * typeck2.c (build_m_component_ref): 'component' is an expr, not
9173 a decl. Also move the IS_AGGR_TYPE check after the stripping of
9174 REFERENCE_TYPE.
9175
6060a796 9176Fri Mar 4 04:46:05 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9177
9178 * call.c (build_method_call): Handle b->setHandler(A::handlerFn)
9179 so that it is like b->setHandler(&A::handlerFn). Cures an `invalid
9180 lvalue in unary `&''.
9181
9182Thu Mar 3 12:38:15 1994 Jason Merrill (jason@deneb.cygnus.com)
9183
9184 * parse.y: Add precedence specification for START_DECLARATOR.
9185 (type_quals): Move before primary.
9186 (typename): Move before typed_declspecs, add 'typespec absdcl1' rule.
9187
9188 * decl2.c (grokoptypename): Lose.
9189
9190 * decl.c (grokdeclarator): Parse TYPE_EXPRs in the initial scan,
9191 rather than waiting until later.
9192
9193Wed Mar 2 14:12:23 1994 Jason Merrill (jason@deneb.cygnus.com)
9194
9195 * parse.y (unary_expr): Use 'typename' in 'new' rules, rather
9196 than expanding it inline.
9197 (typename): Expand empty option of (former) absdcl inline.
9198 (abs_or_notype_decl): Ditto.
9199 (absdcl): Lose empty rule.
9200 (conversion_declarator): New nonterminal for 'typename' of 'operator
9201 typename'.
9202 (operator_name): Use it instead of absdcl.
9203
9204 * parse.y: Add precedence declarations for SCOPED_TYPENAME,
9205 TYPEOF, and SIGOF.
9206 (typed_declspecs): Accept typed_typespecs, rather than typespec
9207 directly. Add rules with reserved_typespecquals.
9208 (reserved_declspecs): Don't accept typespecqual_reserved at the
9209 beginning of the list. The typed_declspecs rule will deal with this
9210 omission.
9211 (declmods): Accept nonempty_type_quals, rather than TYPE_QUAL
9212 directly.
9213
9214 * parse.y (direct_notype_declarator,
9215 direct_after_type_declarator, direct_abstract_declarator): Split up
9216 the declarator1 nonterminals to match the draft standard and avoid
9217 ambiguities.
9218 (new_type_id, new_declarator, direct_new_declarator,
9219 new_member_declarator): New nonterminals to implement the subset of
9220 'typename' allowed in new expressions.
9221 (unary_expr): Use new_type_id instead of typename.
9222 (after_type_declarator1, absdcl1): Fix semantics of member pointers.
9223 (abs_member_declarator, after_type_member_declarator): Lose.
9224
9225 * parse.y (absdcl1): Don't require parens around
9226 abs_member_declarator.
9227 (abs_member_declarator): Lose see_typename from rules.
9228 (after_type_member_declarator): Ditto.
9229
9230 * tree.c (get_identifier_list): New function, containing code
9231 previously duplicated in get_decl_list and list_hash_lookup_or_cons.
9232 (get_decl_list): Use it.
9233 (list_hash_lookup_or_cons): Ditto.
9234
9235 * parse.y (typed_declspecs, declmods): It's not necessary to hash
9236 the declspecs on class_obstack, so don't. This way typed_typespecs
9237 can reduce to typed_declspecs.
9238
9239Wed Mar 2 14:29:18 1994 Jason Merrill (jason@cygnus.com)
9240
9241 * cvt.c (build_up_reference): If we aren't checking visibility,
9242 also allow base->derived conversions.
9243
9244Mon Feb 28 15:14:29 1994 Per Bothner (bothner@kalessin.cygnus.com)
9245
9246 * typeck.c (build_c_cast): Remove bogus hack when converting
9247 to a reference type.
9248
9249 * cp-tree.h (lang_decl::vbase_init_list, DECL_VBASE_INIT_LIST):
9250 Removed, not used.
9251 (lang_stype::methods, lang_decl::next_method): New fields.
9252 (CLASSTYPE_METHODS, DECL_NEXT_METHOD): New macros.
9253 * decl.c (duplicate_decls): Preserve DECL_NEXT_METHOD.
9254
9255 * cp-tree.h, decl2.c (flag_vtable_hack): New flag.
9256 * decl2.c (finish_vtable_vardecl): If flag_vtable_hack,
9257 and !CLASSTYPE_INTERFACE_KNOWN, try to use the presence of
9258 a non-inline virtual function to control emitting of vtables.
9259 * class.c (finish_struct): Build CLASSTYPE_METHODS list.
9260 * search.c (build_vbase_vtables_init): Don't assemble_external
9261 (yet) if flag_vtable_hack.
9262 * class.c (build_vfn_ref): Ditto.
9263
9264Mon Feb 28 14:54:13 1994 Jason Merrill (jason@deneb.cygnus.com)
9265
9266 * parse.y (component_decl): Don't include "typed_declspecs
9267 declarator ';'" speedup, since it breaks enums.
9268
9269Fri Feb 25 15:43:44 1994 Per Bothner (bothner@kalessin.cygnus.com)
9270
9271 * class.c (finish_struct): Minor optimization for building
9272 fn_fields list.
9273
9274Fri Feb 25 15:23:42 1994 Jason Merrill (jason@deneb.cygnus.com)
9275
9276 * decl.c (start_function): Fix detection of function overloading.
9277
6060a796 9278Thu Feb 24 22:26:19 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9279
9280 * lex.c (check_newline): #pragma interface can take a string
9281 argument, just like #pragma implementation. #pragma implementation
9282 checks for garbage on the line, line #pragma interface does. Main
9283 input files do not auto implement like named files, #pragma
9284 implementation must be used explicitly.
9285
9286Thu Feb 24 17:09:01 1994 Jason Merrill (jason@deneb.cygnus.com)
9287
9288 * parse.y (components): Handle list of one again.
9289 (notype_components): Ditto.
9290 (after_type_declarator1): Take maybe_raises out again.
9291
9292 * gxxint.texi (Parser): Document additional r/r conflict.
9293
9294Wed Feb 23 14:42:55 1994 Jason Merrill (jason@deneb.cygnus.com)
9295
9296 * gxxint.texi (Parser): Add node.
9297
9298 * Makefile.in (stamp-parse): Update expected conflict count.
9299
9300 * parse.y (various): Replace "declmods declarator" with "declmods
9301 notype_declarator". The comment saying that "declmods declarator ';'"
9302 corresponds to "int i;" was wrong; it corresponds to "const i;".
9303 (component_decl): Add "typed_declspecs declarator ';'" rule; this
9304 *does* correspond to "int i;". Change "declmods components" to
9305 "declmods notype_components".
9306 (components): Don't deal with a list of one anymore.
9307 (notype_components): New nonterminal, corresponds to notype_declarator.
9308 ({after_,no}type_component_decl{,0}): More new nonterminals.
9309 ({after_,no}type_declarator): Fold in START_DECLARATOR token.
9310 Eliminates four reduce/reduce conflicts.
9311
9312 (expr): Depend on nontrivial_exprlist instead of nonnull_exprlist.
9313 (nontrivial_exprlist): New nonterminal: A list of at least two
9314 expr_no_commas's.
9315 (nonnull_exprlist): Depend on nontrival_exprlist.
9316 Eliminates four reduce/reduce conflicts.
9317
9318 (named_class_head): Move intermediate code block into separate
9319 nonterminal so that we can stick %prec EMPTY on it.
9320
9321 Add more %prec EMPTY's to eliminate remaining shift/reduce
9322 conflicts.
9323
9324 (after_type_declarator): Add maybe_raises to fndecl rules.
9325 (after_type_declarator_no_typename): Remove.
9326 For correctness.
9327
9328 Document remaining reduce/reduce conflicts.
9329
9330Tue Feb 22 12:10:32 1994 Jason Merrill (jason@deneb.cygnus.com)
9331
9332 * search.c (get_base_distance): Only bash BINFO_INHERITANCE_CHAIN
9333 (TYPE_BINFO (type)) if we care about the path.
9334
9335 * tree.c (lvalue_p): A COND_EXPR is an lvalue if both of the
9336 options are.
9337
6060a796 9338Mon Feb 21 19:59:40 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9339
9340 * Makefile.in (mostlyclean): lex.c is a source file, don't
9341 remove.
9342
9343Sat Feb 19 01:27:14 1994 Jason Merrill (jason@deneb.cygnus.com)
9344
9345 * parse.y: Eliminate 20 shift/reduce conflicts.
9346
9347Fri Feb 18 11:49:42 1994 Jason Merrill (jason@deneb.cygnus.com)
9348
9349 * pt.c (type_unification): Add subr argument; if set, it means
9350 that we are calling ourselves recursively, so a partial match is OK.
9351 (unify): Support pointers to methods and functions.
9352 (tsubst): Support method pointers.
9353 * decl.c (build_ptrmemfunc_type): No longer static, so that
9354 tsubst can get at it.
9355
9356 * init.c (is_aggr_typedef): Pretend template type parms are
9357 aggregates.
9358 * decl2.c (build_push_scope): If cname refers to a template type
9359 parm, just grin and nod.
9360
9361 * call.c (build_overload_call_real): Pass subr argument to
9362 type_unification.
9363 * pt.c (do_function_instantiation): Ditto.
9364 * class.c (instantiate_type): Ditto.
9365
9366 * search.c (get_base_distance): If BINFO is a binfo, use it and
9367 don't mess with its BINFO_INHERITANCE_CHAIN.
9368
9369 * cvt.c (convert_to_reference): Fix temporary generation.
9370 If ambiguous, return error_mark_node.
9371
9372 * init.c (build_new): Put back some necessary code.
9373
9374Thu Feb 17 15:39:47 1994 Jason Merrill (jason@deneb.cygnus.com)
9375
9376 * init.c (build_new): Deal with array types properly.
9377
9378 * search.c (get_binfo): Become a shell for get_base_distance.
9379 (get_binfo_recursive): Lose.
9380 (get_base_distance_recursive): Find the path to the via_virtual base
9381 that provides the most access.
9382 (get_base_distance): Ditto.
9383
9384 * parse.y (explicit_instantiation): Syntax is 'template class
9385 A<int>', not 'template A<int>'.
9386
9387 * typeck.c (convert_for_initialization): Remove bogus warning.
9388
9389 * parse.y (datadef): Revert patch of Oct 27.
9390
9391Thu Feb 17 15:12:29 1994 Per Bothner (bothner@kalessin.cygnus.com)
9392
9393 * class.c (build_vfn_ref): Cast delta field to ptrdiff_type_node,
9394 rather than integer_type_node. Does wonders for the Alpha.
9395
9396Thu Feb 17 13:36:21 1994 Jason Merrill (jason@deneb.cygnus.com)
9397
9398 * decl.c (build_ptrmemfunc_type): Make sure that the pmf type
9399 goes onto the same obstack as its target type.
9400
9401Wed Feb 16 00:34:46 1994 Jason Merrill (jason@deneb.cygnus.com)
9402
9403 * cvt.c (convert_to_reference): If converting via constructor
9404 on local level, go back to build_cplus_new approach.
9405
9406 * tree.c (build_cplus_new): If with_cleanup_p, set cleanup slot
9407 to error_mark_node to prevent expand_expr from building a cleanup
9408 for this variable.
9409
9410 * lex.c (default_assign_ref_body): Return *this from the memcpy
9411 version, too.
9412
9413 * decl.c (grok_reference_init): Just return if called with
9414 error_mark_node, don't worry about initializing non-const reference
9415 with temporary.
9416
9417 * cvt.c (convert_to_reference): Do the right thing for
9418 non-aggregate reference conversions, pedwarn when generating a
9419 non-const reference to a temporary.
9420
9421 * class.c (finish_struct): TYPE_HAS_COMPLEX_{INIT,ASSIGN}_REF and
9422 TYPE_NEEDS_CONSTRUCTING all depend on TYPE_USES_VIRTUAL_BASECLASSES
9423 again.
9424
9425Tue Feb 15 19:47:19 1994 Jason Merrill (jason@deneb.cygnus.com)
9426
9427 * decl.c (grok_reference_init): Pawn off a lot of the work on
9428 convert_to_reference. Generally do the right thing.
9429
9430 * cvt.c (convert_to_reference): Conform to the initial comment;
9431 i.e. don't create temps if decl != error_mark_node. Handle
9432 cleanups better for temps that do get created. Don't pretend
9433 that we can use an 'A' to initialize a 'const double &' just by
9434 tacking on a NOP_EXPR. Support LOOKUP_SPECULATIVELY.
9435
9436 * call.c (build_method_call): Set TREE_HAS_CONSTRUCTOR on
9437 constructor calls.
9438
9439Mon Feb 14 14:50:17 1994 Jason Merrill (jason@deneb.cygnus.com)
9440
9441 * decl.c (grok_reference_init): Make a temporary for initializing
9442 const reference from constant expression.
9443
9444Mon Feb 14 11:31:31 1994 Per Bothner (bothner@kalessin.cygnus.com)
9445
9446 * cp-tree.h, decl.c (set_identifier_local_value): Deleted function.
9447 * decl.c (pushdecl): Define decl in correct binding_level
9448 (which isn't always the inner_binding_level).
9449
9450 * cvt.c (build_up_reference): Don't ever call expand_aggr_init.
9451 It's ugly, and I don't think it's the right thing to do.
9452
9453 * cp-tree.h, class.c, decl.c, decl2.c, sp/search.c:
9454 Remove NEW_CLASS_SCOPING, assuming it is always 1.
9455 * decl.c (pop_decl_level): Removed; manually inlined.
9456
9457Sun Feb 13 19:04:56 1994 Jason Merrill (jason@deneb.cygnus.com)
9458
9459 * class.h (candidate): Add basetypes field.
9460
9461 * call.c (build_method_call): Do access checking after choosing a
9462 function, not before.
9463
9464 * Makefile.in (cvt.o, call.o, method.o): Depend on class.h.
9465 (mostlyclean): Remove ../cc1plus.
9466
9467Fri Feb 11 11:52:26 1994 Jason Merrill (jason@deneb.cygnus.com)
9468
9469 * class.c (finish_struct): Don't allow adjusting access to a field
9470 of a base class if a local field has the same name.
9471
9472 * error.c (dump_type_prefix): Output basetype for METHOD_TYPEs.
9473
9474hu Jan 13 17:55:51 EST 1994 Gnanasekaran Swaminathan (gs4t@virginia.edu)
9475
63718c49 9476 * cp-tree.h (DESTRUCTOR_NAME_P): do not confuse AUTO_TEMP names
7177d104
MS
9477 with destructor names when either NO_DOLLAR_IN_LABEL or
9478 NO_DOT_IN_LABEL are not defined.
9479
9480 Now `template <class T, T f(T&), const T*> class A {...}' works.
9481
9482 * pt.c (grok_template_type): substitute template parm types
9483 with actual types in complex type as well.
9484 (coerce_template_parms): update the grok_template_type ()
9485 function call.
9486
9487 * pt.c (tsubst): Traverse method list using DECL_CHAIN.
9488
9489 * decl.c (grok_op_properties): Allow operator++/-- to have
9490 default arguments.
9491
9492 * typeck2.c (store_init_value): Don't abort when called to
9493 initialize a type that needs constructing with a CONSTRUCTOR.
9494
9495 * init.c (expand_aggr_init_1, CONSTRUCTOR case): If
9496 store_init_value fails, build and expand an INIT_EXPR. If
9497 store_init_value succeeds, call expand_decl_init.
9498
6060a796 9499Fri Feb 11 02:49:23 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9500
9501 * class.c (build_vbase_path): Use complete_type_p instead of
9502 resolves_to_fixed_type_p to determine if the virtual bases are in
9503 their right place for the type of expr. Cures problem of thinking a
9504 virtual base class is one place, when it is in fact someplace else.
9505
6060a796 9506Fri Feb 11 00:26:46 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9507
9508 * init.c (resolve_offset_ref): Make sure we first convert to
9509 intermediate type, if given, when dealing with members off `this'.
9510 Solves an incorrrect `type `foo' is not a base type for type
9511 `multiple'' when it is infact, a base type.
9512
6060a796 9513Thu Feb 10 21:49:35 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9514
9515 * class.c (modify_other_vtable_entries): Use get_binfo, instead
9516 of binfo_value. Solves problem with compiler giving a `base class
9517 `B' ambiguous in binfo_value (compiler error)' on complex MI
9518 herarchies, when a virtual function is first defied in a virtual
9519 base class.
9520
6060a796 9521Thu Feb 10 17:19:32 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9522
9523 * class.c (build_vbase_path): Don't complain about ambiguous
9524 intermediate conversion when converting down to a virtual base
9525 class, even if they might seem to be ambiguous.
9526
9527Thu Feb 10 12:18:26 1994 Jason Merrill (jason@deneb.cygnus.com)
9528
9529 * typeck2.c (build_functional_cast): #if 0 out constructor
9530 inheritance code, improve error messages.
9531
9532 * class.c (finish_base_struct): Complain about base with only
9533 non-default constructors in derived class with no constructors.
9534
9535 * decl.c (grokdeclarator): Fix detection of virtual new/delete.
9536
6060a796 9537Wed Feb 9 22:02:32 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9538
9539 * search.c (build_mi_virtuals, add_mi_virtuals,
9540 report_ambiguous_mi_virtuals): Removed unneeded code.
9541 * class.c (finish_struct_bits): Ditto.
9542
9543Wed Feb 9 11:27:17 1994 Jason Merrill (jason@deneb.cygnus.com)
9544
9545 * pt.c (end_template_instantiation): Push decl before
9546 pop_from_top_level.
9547
9548 * typeck2.c (build_m_component_ref): Make sure datum is of
9549 aggregate type.
9550
9551 * init.c (get_type_value): New function, returns
9552 IDENTIFIER_TYPE_VALUE or IDENTIFIER_CLASS_TYPE_VALUE or NULL_TREE.
9553
9554 * call.c (build_method_call): Don't die on call to destructor for
9555 non-type.
9556
9557 * decl.c (grokdeclarator): Complain about virtual op new and op
9558 delete, make static virtuals unvirtual instead of unstatic.
9559
9560 * typeck.c (build_c_cast): Also call default_conversion on
9561 methods.
9562
9563 * decl.c (grokdeclarator): Don't complain about anonymous
9564 bitfields.
9565
9566 * parse.y (simple_stmt, for loops): Move the continue point after
9567 the cleanups.
9568
9569 * class.c (finish_struct): Fix setting of
9570 TYPE_HAS_COMPLEX_INIT_REF.
9571
9572Tue Feb 8 13:21:40 1994 Jason Merrill (jason@deneb.cygnus.com)
9573
9574 * init.c (build_new): Deal with `new double (1)'.
9575
9576 * class.c (finish_struct): TYPE_HAS_COMPLEX_*_REF are supersets of
9577 TYPE_HAS_REAL_*_REF, but TYPE_HAS_COMPLEX_INIT_REF is independent of
9578 TYPE_NEEDS_CONSTRUCTING.
9579
9580 * decl.c (duplicate_decls): Propagate access decls.
9581
9582 * typeck2.c (process_init_constructor): Accept empty_init_node
9583 for initializing unions.
9584
9585 * class.c, lex.c, cp-tree.h: Use
9586 TYPE_HAS_COMPLEX_ASSIGN_REF where TYPE_HAS_REAL_ASSIGN_REF was used
9587 before, use TYPE_HAS_COMPLEX_INIT_REF for TYPE_NEEDS_CONSTRUCTING in
9588 some places.
9589
9590 * decl.c (finish_decl): Don't complain about uninitialized const
9591 if it was initialized before.
9592
9593Mon Feb 7 18:12:34 1994 Jason Merrill (jason@deneb.cygnus.com)
9594
9595 * lex.c (default_assign_ref_body): Don't deal with vbases for
9596 now.
9597
9598 * decl.c (finish_decl): Fix reversed logic for objects and other
9599 things that need to be constructed but have no initializer.
9600
9601 * class.c (finish_struct): Don't set TYPE_HAS_* flags that are
9602 set by grok_op_properties or finish_decl.
9603
9604 * decl.c: Don't warn about extern redeclared inline unless
9605 -Wextern-inline is given.
9606 * decl2.c (lang_decode_option): Ditto.
9607 * cp-tree.h: Ditto.
9608
9609Mon Feb 7 17:29:24 1994 Per Bothner (bothner@kalessin.cygnus.com)
9610
9611 * decl.c (pushdecl_with_scope): Fix thinko. Add forward
9612 declaration.
9613
9614 * decl.c (pushdecl_with_scope): New function.
9615 * decl.c (pushdecl_top_level): Use new function.
9616 * decl.c (pushtag): Initialize newdecl.
9617 * decl.c (pushtag): Push new type decl into correct scope.
9618
9619Mon Feb 7 14:42:03 1994 Jason Merrill (jason@deneb.cygnus.com)
9620
9621 * call.c, cvt.c, init.c, search.c, cp-tree.h:
9622 Eradicate LOOKUP_PROTECTED_OK.
9623
9624Mon Feb 7 13:57:19 1994 Per Bothner (bothner@kalessin.cygnus.com)
9625
9626 * decl.c (pushtag, xref_tag), cp-tree.h: Add extra parameter
9627 'globalize' to signify implicit declarations.
9628 * decl.c (globalize_nested_type, maybe_globalize_type): Removed.
9629 * decl.c (set_identifier_type_value_with_scope): New function.
9630 * decl.c (set_identifier_local_value): Simplify.
9631 * spew.c (yylex, do_addr): Modify to return a _DEFN if a
9632 forward declaration (followed by ';' and not preceded by 'friend').
9633 * class.c, decl.c, except.c, init.c, parse.y,
9634 pt.c, search.c: Add new argument to calls to xref_tag and
9635 pushtag.
9636
9637Mon Feb 7 00:22:59 1994 Jason Merrill (jason@deneb.cygnus.com)
9638
9639 * cp-tree.h (ACCESSIBLY_UNIQUELY_DERIVED_P): New macro, means what
9640 ACCESSIBLY_DERIVED_FROM_P meant before.
9641 (ACCESSIBLY_DERIVED_FROM_P): Now disregards ambiguity.
9642
9643 * cvt.c (build_up_reference): Call get_binfo with PROTECT == 1.
9644
9645 * search.c (get_base_distance_recursive): Members and friends of
9646 a class X can implicitly convert an X* to a pointer to a private or
9647 protected immediate base class of X.
9648 (get_binfo_recursive): Ditto.
9649 (get_base_distance): Ignore ambiguity if PROTECT < 0.
9650 (get_binfo): Lose multiple values of PROTECT.
9651 (compute_access): Protected is OK if the start of the
9652 search is an accessible base class of current_class_type.
9653
9654 * method.c (build_opfncall): Do check access on operator new here.
9655
9656 * decl.c (finish_function): Don't check access on operator new
9657 here.
9658
9659Sun Feb 6 14:06:58 1994 Jason Merrill (jason@deneb.cygnus.com)
9660
9661 * decl.c (xref_tag): The base of a derived struct is NOT always
9662 public. Duh.
9663
9664 * pt.c (do_explicit_instantiation): New function, called from
9665 parser to do explicit function instantiation.
9666 (type_unification): Allow the args list to be terminated with
9667 void_list_node.
9668 (do_pending_expansions): Look at i->interface for non-member
9669 templates.
9670
9671 * parse.y (datadef): Move explicit_instantiation here.
9672 (structsp): From here.
9673 (datadef): Complain about `int;'.
9674
9675Sun Feb 6 12:33:18 1994 Per Bothner (bothner@kalessin.cygnus.com)
9676
9677 * pt.c (end_template_instantiation), cp-tree.h: Remove unused
9678 second parameter, and simplify first from a TREE_LIST where
9679 we only care about its TREE_VALUE to just the value (an IDENTIFIER).
9680 * pt.c (instantiate_member_templates): Simplify argument list
9681 from a TREE_LIST to just an IDENTIFIER.
9682 * lex.c (yyprint): PRE_PARSED_CLASS_DECL is now just an IDENTIFIER.
9683 * parse.y (template_instantiate_once): Simplify accordingly.
9684 * decl.c (inner_binding_level): New. Use various places to
9685 simplify.
9686
9687Sun Feb 6 02:49:37 1994 Jason Merrill (jason@deneb.cygnus.com)
9688
9689 * typeck2.c (build_functional_cast): int() -> int(0).
9690
9691Sat Feb 5 00:53:21 1994 Jason Merrill (jason@deneb.cygnus.com)
9692
9693 * class.c (finish_struct): Don't do a bitwise copy for op= if the
9694 class has a virtual function table.
9695
9696 * typeck.c (convert_for_initialization): Restore warnings about
9697 not using defined op=. Should really be my_friendly_aborts, I
9698 s'pose.
9699
9700Fri Feb 4 14:21:00 1994 Jason Merrill (jason@deneb.cygnus.com)
9701
9702 * class.c (finish_struct): Tidy up conditions for doing bitwise
9703 copies of objects.
9704
9705 * decl.c (build_default_constructor): #if 0 out.
9706
9707 * *: Eradicate TYPE_GETS_{ASSIGNMENT,ASSIGN_REF,CONST_ASSIGN_REF,
9708 CONST_INIT_REF}, TYPE_HAS_REAL_CONSTRUCTOR.
9709
9710 * decl.c (grokdeclarator): Don't return void_type_node for
9711 friends being defined here.
9712
9713 * init.c (perform_member_init): Only do the init if it's useful.
9714
9715 * lex.c (default_copy_constructor_body): If we don't need to do
9716 memberwise init, just call __builtin_memcpy.
9717 (default_assign_ref_body): Ditto.
9718
9719 * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0.
9720
6060a796 9721Fri Feb 4 13:02:56 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9722
9723 * lex.c (reinit_parse_for_method, cons_up_default_function):
9724 Don't give warn_if_unknown_interface warning when it came from a
9725 system header file.
9726 * pt.c (end_template_decl, instantiate_template): Ditto.
9727 * decl.c (start_decl): Ditto.
9728
9729Fri Feb 4 00:41:21 1994 Jason Merrill (jason@deneb.cygnus.com)
9730
9731 * decl.c (grokdeclarator): Don't try to set TYPE_WAS_ANONYMOUS on
9732 enums.
9733
9734 * decl2.c (constructor_name_full): Use IS_AGGR_TYPE_CODE instead of
9735 IS_AGGR_TYPE, since we don't know it's a type.
9736
9737Thu Feb 3 11:36:46 1994 Jason Merrill (jason@deneb.cygnus.com)
9738
9739 * decl.c (grokdeclarator): Don't complain about anonymous unions.
9740
9741 * cp-tree.h (TYPE_WAS_ANONYMOUS): This struct was originally
9742 anonymous, but had a name given to it by a typedef.
9743
9744 * decl.c (grokdeclarator): When renaming an anonymous struct, set
9745 TYPE_WAS_ANONYMOUS.
9746
9747 * decl2.c (constructor_name_full): Use TYPE_WAS_ANONYMOUS.
9748
9749 * cp-tree.h (DECL_UNDEFINED_FRIENDS): #if 0 out.
9750
9751 * init.c (xref_friend): Don't set up DECL_UNDEFINED_FRIENDS.
9752 (embrace_waiting_friends): Don't use DECL_UNDEFINED_FRIENDS.
9753
9754 * decl.c (grokdeclarator): Set TYPE_NESTED_NAME properly on nested
9755 anonymous structs that get typedef'd.
9756
9757 * decl.c (grokdeclarator): Always return void_type_node for
9758 friends.
9759
9760 * error.c (dump_function_decl): Don't use DECL_CLASS_CONTEXT for
9761 friends.
9762 (dump_function_decl): Don't print out default args for
9763 a function used in an expression.
9764
9765 * decl.c (grokdeclarator): Give error on abstract declarator used
9766 in an invalid context (i.e. `void (*)();').
9767
9768 * error.c (cp_line_of): Support _TYPE nodes.
9769 (cp_file_of): Ditto.
9770
9771 * cvt.c (build_up_reference): Don't abort if passed a SAVE_EXPR;
9772 it can happen for the RHS of an assignment stmt where the LHS is
9773 a COND_EXPR.
9774
9775 * init.c (expand_aggr_init_1): Deal with bracketed initializer
9776 lists properly.
9777
9778 * class.c (finish_struct): Deal with enumerators and typedefs
9779 again.
9780
9781Wed Feb 2 11:30:22 1994 Jason Merrill (jason@deneb.cygnus.com)
9782
9783 * class.c (finish_struct): Tidy up loop over fields.
9784
9785 * errfn.c (cp_thing): Don't advance twice after a format.
9786
9787 * class.c (finish_struct): Complain about needing a constructor
9788 if a member has only non-default constructors, and don't try to
9789 generate a default constructor.
9790
9791 * decl.c (finish_decl): Also do the constructor thing if
9792 TYPE_NEEDS_CONSTRUCTING is set (for arrays).
9793
9794 * search.c (unuse_fields): New function: mark all fields in this
9795 type unused.
9796 (dfs_unuse_fields): Helper function.
9797
9798 * class.c (pushclass): If the new class is the same as the old
9799 class, still unuse the fields.
9800 (unuse_fields): Move to search.c.
9801
9802 * decl.c (grok_op_properties): Add friendp argument.
9803 (grokfndecl): Pass it.
9804 (start_method): Ditto.
9805
9806 * decl2.c (delete_sanity): Add use_global_delete parameter to catch
9807 ::delete calls.
9808
9809 * parse.y (unary_expr): Pass new parameter to delete_sanity.
9810
9811 * lex.c (default_copy_constructor_body): Don't choke if the union
9812 has no fields.
9813 (default_assign_ref_body): Ditto.
9814
9815 * call.c (compute_conversion_costs_ansi): Do the right thing for
9816 ellipsis matches.
9817
9818 * decl.c (push_to_top_level): Optimize.
9819
9820 * decl.c (start_function): Look for the lexical scope of a friend
9821 in DECL_CLASS_CONTEXT.
9822
9823 * init.c (do_friend): Set DECL_CLASS_CONTEXT on global friends.
9824
9825Tue Feb 1 15:59:24 1994 Jason Merrill (jason@deneb.cygnus.com)
9826
9827 * cp-tree.h (TREE_GETS_PLACED_NEW): New macro.
9828
9829 * init.c (init_init_processing): Don't assign BIN/BID to the
9830 IDENTIFIER_GLOBAL_VALUEs of their respective operators.
9831 (build_new): Check TREE_GETS_PLACED_NEW.
9832
9833 * decl.c (grok_op_properties): Don't set TREE_GETS_NEW for a decl of
9834 op new with placement, set TREE_GETS_PLACED_NEW.
9835
9836 * cp-tree.h (ANON_UNION_P): New macro. Applies to decls.
9837
9838 * class.c (finish_struct): Don't treat anonymous unions like
9839 other aggregate members. Do synthesize methods for unions without
9840 a name, since they may or may not be "anonymous unions".
9841
9842 * decl2.c (grok_x_components): Wipe out memory of synthesized methods
9843 in anonymous unions.
9844
9845 * lex.c (default_copy_constructor_body): Support unions.
9846 (default_assign_ref_body): Ditto.
9847
9848Mon Jan 31 12:07:30 1994 Jason Merrill (jason@deneb.cygnus.com)
9849
9850 * cp-tree.h: Fix documentation of LOOKUP_GLOBAL, add prototypes.
9851
9852 * error.c (args_as_string): New function (%A), like type_as_string
9853 except NULL_TREE -> "..."
9854
9855 * call.c (build_overload_call_real): Fix for new overloading.
9856
9857 * decl.c (grok_op_properties): Set all of the TYPE_OVERLOADS_* flags
9858 here.
9859
9860 * parse.y (operator_name): Instead of here.
9861
9862 * typeck2.c (build_functional_cast): Treat a TREE_LIST as a list
9863 of functions.
9864
9865 * call.c (build_overload_call_real): Support LOOKUP_SPECULATIVELY.
9866
9867 * method.c (build_opfncall): Don't need to massage return value
9868 any more, call build_overload_call with all flags.
9869
9870 * typeck.c (build_x_binary_op): Put back speculative call to
9871 build_opfncall.
9872 (build_x_unary_op): Ditto.
9873 (build_x_conditional_expr): Ditto.
9874
6060a796 9875Mon Jan 31 10:00:30 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9876
9877 * cvt.c (build_type_conversion_1): Change call to pedwarn into
9878 warning, and conditionalize upon warn_cast_qual.
9879
9880Fri Jan 28 11:48:15 1994 Jason Merrill (jason@deneb.cygnus.com)
9881
9882 * search.c (lookup_field): If xbasetype is a binfo, copy it to
9883 avoid clobbering its inheritance info.
9884
9885 * call.c (build_method_call): Don't overwrite basetype_path with
9886 TYPE_BINFO (inst_ptr_basetype) if they have the same type.
9887
9888 * search.c (compute_access): Fix handling of protected inheritance
9889 and friendship with the enclosing class.
9890
9891 * typeck2.c (store_init_value): Allow passing of TREE_CHAIN for
9892 initialization of arbitrary variable.
9893
9894 * typeck2.c (build_functional_cast): Only try calling a method if
9895 one exists.
9896
9897 * decl.c (grokdeclarator): Move handling of constructor syntax
9898 initialization into first loop for generality.
9899 (parmlist_is_random): Lose.
9900
9901 * lex.c (cons_up_default_function): Set TREE_PARMLIST on arguments
9902 to default function.
9903
9904Thu Jan 27 19:26:51 1994 Jason Merrill (jason@deneb.cygnus.com)
9905
9906 * decl.c (grokparms): Abort if we get called with something we don't
9907 expect.
9908
6060a796 9909Thu Jan 27 17:37:25 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9910
9911 * call.c (build_overload_call_real): Change argument complain to
9912 flags to match style of rest of code. Pass it down to
9913 build_function_call_real as necessary.
9914 * call.c (build_overload_call, build_overload_call_maybe): Change
9915 argument complain to flags to match style of rest of code.
9916 * cp-tree.h (build_function_call_real): Added fourth flags
9917 argument.
9918 * cvt.c (convert_to_reference): Only give warning messages, if
9919 LOOKUP_COMPLAIN is set.
9920 * typeck.c (build_x_function_call): Change simple complain
9921 argument to build_overload_call_maybe and build_overload_call, to
9922 LOOKUP_COMPLAIN to match style of rest of code.
9923 * typeck2.c (build_functional_cast): Ditto.
9924 * typeck.c (build_function_call_real): Add flags, so that we can
9925 not complain, if we don't want to complain. Complain about
9926 arguments, if we are complaining, otherwise don't.
9927 * typeck.c (build_function_call, build_function_call_maybe):
9928 Stick in flags argument.
9929 * typeck.c (build_x_binary_op, build_x_unary_op,
9930 build_x_conditional_expr, build_x_compound_expr): Follow style of
9931 build_x_indirect_ref, as it is more correct and more common.
9932
9933Thu Jan 27 14:36:20 1994 Jason Merrill (jason@deneb.cygnus.com)
9934
9935 * call.c (build_method_call): Don't check for being called with
9936 a pointer.
9937
9938 * decl2.c (finish_file): Don't play with DECL_CLASS_CONTEXT for the
9939 static initializer function.
9940
9941 * init.c (build_member_call): Use convert_force here, too.
9942
9943 * search.c (compute_access): Only treat static members specially
9944 if they are referenced directly.
9945
9946Wed Jan 26 18:28:14 1994 Jason Merrill (jason@deneb.cygnus.com)
9947
9948 * gxxint.texi (Access Control): New node.
9949
9950 * search.c (current_scope): New function; returns whichever of
9951 current_class_type and current_function_decl is the most nested.
9952 (compute_access): Total overhaul to make it clearer and more
9953 correct. Don't use the cache for now; in the only situation where
9954 it was used before, it gained nothing. This frees up three of the
9955 DECL_LANG_FLAGs for possible other use!
9956
9957 * cp-tree.h: #if 0 out DECL_PUBLIC & friends.
9958
9959 * typeck.c (build_component_ref_1): Don't check DECL_PUBLIC.
9960
9961 * call.c (build_method_call): Use convert_force to cast `this' --
9962 rely on the access checking for the method itself.
9963
9964 * init.c (is_friend): Do the nesting thing, handle types. I am
9965 my own friend.
9966 (is_friend_type): Become a shell for is_friend.
9967 (add_friend): Never stick in ctype.
9968 Why are the friendship functions in init.c, anyway?
9969
6060a796 9970Wed Jan 26 17:50:00 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9971
9972 * cvt.c (build_type_conversion_1): Don't conditionalize call to
9973 pedwarn upon pedantic.
9974
6060a796 9975Wed Jan 26 17:20:46 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9976
9977 * cvt.c (convert_to_reference): Add 8.4.3 checking so that one
9978 gets a warning if one tries to initialize a non-const & from a
9979 non-lvalue.
9980 * cvt.c (convert_to_reference): Use %P format for argument
9981 numbers in warnings.
9982
6060a796 9983Wed Jan 26 14:35:06 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9984
9985 * init.c (build_delete): Follow style in call.c to construct the
9986 virtual call to the desctructor, as that code is right. Fixes a
9987 problem of the compiler saying a pointer conversion is ambiguous.
9988
9989Wed Jan 26 11:28:14 1994 Jason Merrill (jason@deneb.cygnus.com)
9990
9991 * cp-tree.h (VTABLE_NAME_P): Change other occurrence of
9992 VTABLE_NAME_FORMAT to VTABLE_NAME.
9993
9994 * *: s/visibility/access/g
9995
9996Tue Jan 25 18:39:12 1994 Jason Merrill (jason@deneb.cygnus.com)
9997
9998 * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR.
9999
6060a796 10000Tue Jan 25 13:54:29 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10001
10002 * init.c (build_delete): Back out Jan 17th & 18th pacthes, as
10003 they break libg++.
10004
10005Tue Jan 25 13:11:45 1994 Jason Merrill (jason@deneb.cygnus.com)
10006
10007 * decl.c (duplicate_decls): Fix pointer arithmetic.
10008
10009Mon Jan 24 15:50:06 1994 Chip Salzenberg (chip@fin.uucp)
10010
10011 [ cp-* changes propagated from c-* changes in 940114 snapshot ]
10012 * cp-parse.y (maybe_attribute): Allow multiple __attribute__
10013 clauses on a declaration.
10014
10015Mon Jan 24 17:06:23 1994 Jason Merrill (jason@deneb.cygnus.com)
10016
10017 * class.c (finish_struct): Do synthesize methods for anon
10018 structs, just not unions.
10019
10020Mon Jan 24 13:50:13 1994 Kung Hsu (kung@mexican.cygnus.com)
10021
10022 * decl.c (xref_tag): handle anonymous nested type.
10023 * decl.c (globalize_nested_type): add no globalize bit check.
10024 * spew.c (hack_more_ids) : templated nested decl not push top
10025 level.
10026
10027 * parse.y : get rid of 'goto do_components'. It is much better
10028 for debugging.
10029
10030 * decl.c (is_anon_name): get rid of the function and use the
10031 macro ANON_AGGRNAME_P.
10032 * pt.c : ditto.
10033
10034Fri Jan 21 14:06:02 1994 Jason Merrill (jason@deneb.cygnus.com)
10035
10036 * class.c (finish_struct): Don't synthesize any methods for
10037 anonymous structs/unions.
10038
10039 * typeck.c (build_modify_expr): Don't treat pmf's as class objects.
10040
10041Thu Jan 20 18:56:46 1994 Jason Merrill (jason@deneb.cygnus.com)
10042
10043 * method.c (build_opfncall): Call build_indirect_ref on
10044 synthesized instance for operator delete.
10045
10046 * pt.c (type_unification): Don't abort if called with a list of
10047 types in ARGS.
10048
10049 * class.c (instantiate_type): Deal with function templates.
10050
10051Thu Jan 20 16:55:35 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
10052
10053 * Makefile.in (CC): Default to cc not gcc.
10054
10055Thu Jan 20 13:47:54 1994 Jason Merrill (jason@deneb.cygnus.com)
10056
10057 * typeck.c (build_modify_expr): Call constructor if appropriate.
10058
10059 * decl.c (push_to_top_level): Clear out class-level bindings cache.
10060
10061Wed Jan 19 13:51:22 1994 Jason Merrill (jason@deneb.cygnus.com)
10062
10063 * call.c (resolve_scope_to_name): Work recursively (previously only
10064 looked down one level).
10065
10066 * lex.c (do_pending_inlines): If we're still dealing with the last
10067 batch of inlines, don't start working on a new one.
10068
10069 * Makefile.in (stamp-parse): Update conflict count.
10070 (TAGS): Fix.
10071
10072 * parse.y (explicit_instantiation): New rule; implements
10073 'template A<int>' syntax (though not 'template foo(int)' yet).
10074 (structsp): Add explicit_instantiation.
10075
10076Tue Jan 18 13:53:05 1994 Jason Merrill (jason@deneb.cygnus.com)
10077
10078 * class.c (finish_struct, etc.): Simplify decision to synthesize
10079 a destructor.
10080
10081 * call.c, class.c, cp-tree.h, decl.c, init.c,
10082 ptree.c, search.c, typeck.c, typeck2.c: Nuke
10083 TYPE_NEEDS_CONSTRUCTOR (change all calls to TYPE_NEEDS_CONSTRUCTING).
10084 * init.c (expand_aggr_init_1): Don't try non-constructor methods
10085 of initializing objects.
10086 (build_new): Don't try other methods if the constructor lookup fails.
10087
10088 * class.c (finish_base_struct): Set cant_have_default_ctor and
10089 cant_synth_copy_ctor properly.
10090 (finish_struct): Ditto.
10091
10092Mon Jan 17 13:58:18 1994 Jason Merrill (jason@deneb.cygnus.com)
10093
10094 * typeck.c (build_modify_expr_1): #if 0 out again.
10095 (build_modify_expr): #if 0 out memberwise init code again.
10096
10097 * lex.c (default_copy_constructor_body): Be const-correct.
10098 (default_assign_ref_body): Ditto.
10099
10100 * init.c (perform_member_init): Use TYPE_HAS_CONSTRUCTOR to decide
10101 whether or not to use it, rather than TYPE_NEEDS_CONSTRUCTING.
10102 (expand_aggr_init): Disable silent conversion from initializer list
10103 to list of args for a constructor.
10104
10105 * class.c (base_info): Lose needs_default_ctor.
10106 (finish_base_struct): Ditto.
10107 (finish_struct): Ditto.
10108
10109 * decl.c (init_decl_processing): Don't turn off flag_default_inline
10110 just because flag_no_inline is on.
10111 (finish_decl): Use TYPE_HAS_CONSTRUCTOR to decide to use
10112 constructor.
10113
10114 * class.c (finish_struct): Synthesize default ctor whenever
10115 allowed.
10116
10117 * Makefile.in (TAGS): Don't try to run etags on cp-parse.y.
10118
6060a796 10119Sat Jan 15 18:34:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10120
10121 * Makefile.in, configure: Handle the C++ front-end in a
10122 subdirectory.
10123 * cp-*: Move C++ front-end to cp/*.
10124
10125Fri Jan 14 14:09:37 1994 Jason Merrill (jason@deneb.cygnus.com)
10126
10127 * cp-typeck.c (build_function_call_real): Modify to match other
10128 instances of taking the address of the function.
10129
10130 * cp-class.c (finish_struct): Set TYPE_HAS_REAL_CONSTRUCTOR to 1 if
10131 there are non-synthesized constructors.
10132 Only set TYPE_NEEDS_CONSTRUCTOR if TYPE_HAS_REAL_CONSTRUCTOR.
10133 Always generate copy constructor if possible.
10134
10135 * cp-tree.h (lang_type): Add has_real_constructor bitfield.
10136 (TYPE_HAS_REAL_CONSTRUCTOR): Define.
10137
10138 * cp-lex.c (default_copy_constructor_body): Use init syntax
10139 for all bases.
10140
10141 * cp-type2.c (store_init_value): Only give error for initializer list
10142 if TYPE_HAS_REAL_CONSTRUCTOR.
10143
10144Thu Jan 13 15:38:29 1994 Jason Merrill (jason@deneb.cygnus.com)
10145
10146 * cp-tree.h (DECL_SYNTHESIZED): Add defn.
10147 (lang_decl): Add synthesized bitfield to decl_flags.
10148
10149 * cp-lex.c (cons_up_default_function): Use DECL_SYNTHESIZED to mark
10150 artificial methods, rather than a line # of 0.
10151
10152Fri Jan 14 18:25:29 1994 Kung Hsu (kung@mexican.cygnus.com)
10153
10154 * cp-decl (xref_tag): fix a bug in conflict type.
10155 * cp-parse.y : add SCOPED_NAME for uninstantiated template nested
10156 type reference.
10157 * cp-spew.c (yylex) : generated SCOPED_NAME token.
10158 * cp-lex.c (yyprint): handle SCOPED_NAME.
10159
6060a796 10160Fri Jan 14 17:00:29 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10161
10162 * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is
10163 not right.
10164
10165Thu Jan 13 14:00:35 1994 Kung Hsu (kung@mexican.cygnus.com)
10166
10167 * cp-decl2.c (grok_x_components): fix a bug that enum type does not
10168 have type_flags.
10169
6060a796 10170Thu Jan 13 11:39:34 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10171
10172 Ensure that all vtable pointers are initialized with all the right
10173 values.
10174
10175 * cp-class.c (is_normal): Changed to reflect new meaning of
10176 CLASSTYPE_VFIELD_PARENT.
10177 * cp-class.c (maybe_fixup_vptrs): Use of
10178 CLASSTYPE_NEEDS_VIRTUAL_REINIT here is misguided. Use
10179 BINFO_MODIFIED instead.
10180 * cp-class.c (finish_struct): Changed to reflect new meaning of
10181 CLASSTYPE_VFIELD_PARENT.
10182 * cp-decl.c (get_binfo_from_vfield): Removed, unneeded now.
10183 * cp-decl.c (finish_function): Use init_vtbl_ptrs, instead of open
10184 coding it here.
10185 * cp-init.c (init_vfields): Changed name to init_vtbl_ptrs, and
10186 re-implement.
10187 * cp-init.c (emit_base_init): Use new name init_vtbl_ptrs.
10188 * cp-tree.h (vfield_parent): Changed to integer.
10189 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Changed docs to reflect new
10190 meaning.
10191 * cp-tree.h (init_vtbl_ptrs): Added init_vtbl_ptrs.
10192
10193Wed Jan 12 18:24:16 1994 Kung Hsu (kung@mexican.cygnus.com)
10194
10195 * cp-decl.c (xref_tag): re-implement globalize nested type.
10196 * cp-decl2.c (grok_x_components): ditto.
10197 * cp-parse.y: ditto.
10198 * cp-tree.h (lang_type): add no_globalize bit in type_flags.
10199
10200Wed Jan 12 14:08:09 1994 Jason Merrill (jason@deneb.cygnus.com)
10201
10202 * cp-decl.c (grokdeclarator): Don't set TREE_PUBLIC on friend
10203 decls with a definition attached.
10204
10205 * cp-typeck.c (build_modify_expr): Undo previous change in the case
10206 of INIT_EXPRs.
10207
10208Tue Jan 11 19:33:03 1994 Jason Merrill (jason@deneb.cygnus.com)
10209
10210 * cp-typeck.c (build_modify_expr): Replace code for generating
10211 assignment semantics for classes with an error.
10212 (build_modify_expr_1): #if 0 out.
10213
10214 * cp-decl.c (pushdecl): Patch bogus design of pushdecl
10215 behavior for overloaded functions (it doesn't push anything).
10216
10217 * cp-class.c (finish_struct): When generating default op=,
10218 set TYPE_HAS_ASSIGNMENT.
10219
6060a796 10220Mon Jan 10 18:48:06 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10221
10222 * cp-cvt.c (convert): Make {double, clashing enum} -> enum
10223 invalid.
10224 * cp-typeck.c (convert_for_assignment): Simplify.
10225 * cp-decl2.c (warn_enum_clash): Removed.
10226 * invoke.texi (-Wenum-clash): Removed.
10227 * toplev.c (-Wenum-clash): Removed.
10228
10229Mon Jan 10 17:48:37 1994 Kung Hsu (kung@mexican.cygnus.com)
10230
10231 * cp-decl.c (finish_decl): fix incorrect popclass call.
10232
10233 * cp-decl.c (is_anon_name): new function, check whether the name
10234 is anonymous name generated by compiler.
10235 * cp-decl.c (grokdeclarator): allow nested SCOPE_REF
10236 * cp-spew.c (hack_more_ids): handle nested type in template.
10237 * cp-parse.y : handle nested type reference in uninstantiated
10238 template.
10239 * cp-call.c (build_method_call): handle uninstantiated template
10240 case.
10241 * cp-pt.c (search_nested_type_in_tmpl): new function, search nested
10242 type in template.
10243 * cp-pt.c (lookup_nested_type_by_name): new function, lookup nested
10244 type by name.
10245 * cp-pt.c (tsubst): handle nested type search by name.
10246
10247Mon Jan 10 14:32:18 1994 Jason Merrill (jason@deneb.cygnus.com)
10248
10249 * cp-init.c (build_member_call): Propagate qualifiers to new type.
10250
10251 * cp-call.c (build_method_call): Count functions the new way.
10252
10253Fri Jan 7 19:03:26 1994 Jason Merrill (jason@deneb.cygnus.com)
10254
10255 * cp-decl.c (pushtag): Set DECL_ASSEMBLER_NAME for nested classes,
10256 too.
10257
10258Tue Jan 4 16:45:51 1994 Kung Hsu (kung@cirdan.cygnus.com)
10259
10260 * cp-parse.y: change to handle whether to globalize nested class.
10261 * cp-decl.c(xref_tag, maybe_globalize_type): Ditto.
10262
10263Mon Jan 3 22:22:32 1994 Gerald Baumgartner (gb@cygnus.com)
10264
10265 * Makefile.in cp-call.c cp-class.c cp-cvt.c cp-decl.c cp-decl2.c
10266 cp-error.c cp-init.c cp-lex.c cp-lex.h cp-method.c cp-parse.y
10267 cp-spew.c cp-tree.c cp-tree.h cp-type2.c cp-typeck.c cp-xref.c
10268 gplus.gperf toplev.c: Incorporated C++ signature extension.
10269 * cp-sig.c: New file, contains most of signature processing.
10270 * cp-hash.h: Regenerated from gplus.gperf.
10271
10272 * gcc.1 g++.1: Added explanation for the `-fhandle-signatures'
10273 and `-fno-handle-signatures' command line flags.
10274
10275 * gcc.texi: Changed the last-modification date.
10276 * invoke.texi: Added `-fhandle-signatures' in the list of
10277 C++ language options. Added explanation for this option.
10278
6060a796 10279Tue Dec 28 21:10:03 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
10280
10281 * cp-init.c (expand_vec_init): Remove comptypes test, as it is too
10282 harsh here.
10283
6060a796 10284Tue Dec 28 13:42:22 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
10285
10286 * cp-pt.c (do_pending_expansions): Decide to expand a template
10287 member function, based upon it's class type, not the class type of
10288 the first place it was declared.
10289
6060a796 10290Tue Dec 28 05:42:31 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
10291
10292 * cp-class.c (is_normal): New routine, use to determine when the
10293 given binfo is the normal one. (The one that should have the simple
10294 vtable name.)
10295 * cp-class.c (modify_other_vtable_entries): Use DECL_ASSEMBLER_NAME
10296 to check if two fndecls are `the same'. Sometimes this routine can
10297 modify the main vtable, and normal should be 1, in that case, so use
10298 is_normal() to determine if this is the main vtable for the class.
10299 Don't recurse down virtual bases, as they are shared, and we take
10300 care of them elsewhere.
10301 * cp-class.c (modify_vtable_entries): If we have already updated the
10302 vtable with the new virtual, don't do it again.
10303 * cp-class.c (finish_struct): Set CLASSTYPE_VFIELD_PARENT as
10304 appropriate. Do virtual function overriding in virtual bases, after
10305 normal overriding, so that the base function list in DECL_VINDEX is
10306 not overridden, before we have a chance to run through the list.
10307 Use DECL_ASSEMBLER_NAME to check if two fndecls are `the same'.
10308 Make sure we pass the right address into modify_vtable_entries.
10309 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): New field to indicate which
10310 binfo is the one that has the vtable that we based our vtable on.
10311
10312Fri Dec 24 09:40:52 1993 Michael Tiemann (tiemann@blues.cygnus.com)
10313
10314 * cp-typeck.c (c_expand_start_case): Use default_conversion to
10315 convert expression from reference type if necessary.
10316
10317Wed Dec 22 17:58:43 1993 Jason Merrill (jason@deneb.cygnus.com)
10318
10319 * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before
10320 trying to read its TREE_VALUE.
10321
10322 * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here.
10323 (finish_struct): Instead of here.
10324
10325Tue Dec 21 14:34:25 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10326
10327 * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't
10328 have TYPE_PTRMEMFUNC_P set before we try to build its
10329 CLASSTYPE_ID_AS_LIST.
10330 (get_decl_list): Likewise, when trying to read it.
10331
10332 * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined.
10333 (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT.
10334
10335Mon Dec 20 13:35:03 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10336
10337 * cp-typeck.c (rationalize_conditional_expr): New function.
10338 (unary_complex_lvalue): Use it.
10339 (build_modify_expr): Use it, since trying to do an ADDR_EXPR of it
10340 with build_unary_op won't cut it. Don't wrap the COND_EXPR with a
10341 SAVE_EXPR either.
10342
10343 * cp-decl2.c (explicit_warn_return_type): Deleted variable.
10344 (lang_decode_option): Set warn_return_type, not explicit_*, for
10345 -Wreturn-type and -Wall. This is what rest_of_compilation uses to
10346 decide if it should go into jump_optimize or not.
10347 * cp-tree.h (explicit_warn_return_type): Deleted.
10348 * cp-decl.c (grokdeclarator): Use warn_return_type, not explicit_*.
10349 (finish_function): Also complain about no return in a non-void fn if
10350 we're being pedantic (don't rely on use of -Wreturn-type).
10351
10352Fri Dec 17 15:45:46 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10353
10354 * cp-decl.c (grokdeclarator): Forbid declaration of a function as
10355 static if it's being done inside another function.
10356
10357 * cp-search.c (compute_visibility): Check for friendship both ways.
10358
10359Fri Dec 17 14:28:25 1993 Jason Merrill (jason@deneb.cygnus.com)
10360
10361 * cp-cvt.c (build_default_binary_type_conversion): Make error
10362 messages more helpful.
10363
10364 * cp-error.c (op_as_string): New function, returns "operator =="
10365 given EQ_EXPR or suchlike.
10366
10367Fri Dec 17 13:28:11 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10368
10369 * cp-call.c (print_n_candidates): New function.
10370 (build_overload_call_real): Use it when we complain about a call
10371 being ambiguous.
10372
10373Fri Dec 17 12:41:17 1993 Jason Merrill (jason@deneb.cygnus.com)
10374
10375 * cp-call.c (build_method_call): Fix checking for static call
10376 context.
10377
10378 * cp-method.c (build_opfncall): Call build_indirect_ref on argument
10379 to operator new.
10380
10381 * cp-init.c (build_new): Don't mess with rval when building
10382 indirect ref.
10383
10384Thu Dec 16 16:48:05 1993 Kung Hsu (kung@cirdan.cygnus.com)
10385
10386 * cp-lex.c (default_assign_ref_body): add check when TYPE_NESTED_
10387 NAME(type) may not be exist. It's not a problem for old compiler.
10388
10389Thu Dec 16 14:46:06 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10390
10391 * cp-tree.h (CLASSTYPE_ALTERS_VISIBILITIES_P): Delete macro, it's
10392 never used for anything.
10393 (struct lang_type, member type_flags): Delete field
10394 `alters_visibility', and up `dummy' by 1.
10395 * cp-class.c (finish_base_struct): Delete code that copies the
10396 setting of CLASSTYPE_ALTERS_VISIBILITIES_P.
10397 (finish_struct): Delete code that sets it.
10398
10399Thu Dec 16 14:44:39 1993 Jason Merrill (jason@deneb.cygnus.com)
10400
10401 * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to
10402 build_method_call that I messed up before.
10403
10404 * cp-search.c (get_base_distance): If protect > 1, allow immediate
10405 private base.
10406
10407 * cp-class.c (finish_base_struct): Set cant_synth_* correctly.
10408 (finish_struct): Ditto. Well, nigh-correctly; it won't deal
10409 properly with the case where a class contains an object of an
10410 ambiguous base class which has a protected op=. Should be fixed
10411 when the access control code gets overhauled.
10412 (finish_struct_methods): Set TYPE_HAS_NONPUBLIC_* correctly.
10413
10414Thu Dec 16 12:17:06 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10415
10416 * cp-lex.c (real_yylex): Turn the code back on that deals with
10417 __FUNCTION__ and __PRETTY_FUNCTION__. Don't use lookup_name, to
10418 avoid the ambiguity problems that led to it being turned off in the
10419 first place.
10420
10421 * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P
10422 to see if something is a method.
10423
6060a796 10424Wed Dec 15 18:35:58 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
10425
10426 * cp-typeck.c (build_modify_expr): Avoid error messages on small
10427 enum bit fields.
10428 * cp-typeck.c (convert_for_assignment): Add missing argument to
10429 cp_warning and cp_pedwarn calls.
10430
10431Wed Dec 15 18:25:32 1993 Jason Merrill (jason@deneb.cygnus.com)
10432
10433 * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base
10434 initializers; it's just anachronistic.
10435
10436 * cp-decl.c (finish_decl): Don't require external-linkage arrays
10437 to have a complete type at declaration time when pedantic.
10438
10439Tue Dec 14 11:37:23 1993 Jason Merrill (jason@deneb.cygnus.com)
10440
10441 * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set.
10442
10443 * cp-call.c (build_method_call): Don't dereference pointer given
10444 as instance.
10445
10446 * cp-decl.c (finish_function): Don't pass pointer to
10447 build_method_call.
10448 (finish_function): Ditto.
10449
10450 * cp-typeck.c (build_x_function_call): Ditto.
10451
10452 * cp-method.c (build_component_type_expr): Ditto.
10453
10454 * cp-init.c (build_member_call): Ditto.
10455 (build_new): Ditto.
10456
10457Mon Dec 13 18:04:33 1993 Kung Hsu (kung@cirdan.cygnus.com)
10458
10459 * cp-decl.c (xref_tag): fix regression created by changes made
10460 in Dec. 7 1993.
10461 * cp-decl.c (xref_defn_tag): fix parallel nested class problem.
10462
10463Fri Dec 10 12:40:25 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10464
10465 * cp-call.c (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print
10466 out the final evaluation of the function, so we can see if ELLIPSIS,
10467 USER, and EVIL were set at the end.
10468
10469 * cp-call.c (convert_harshness_ansi): When the parm isn't an lvalue,
10470 only go for setting TRIVIAL_CODE if we are dealing with types that
10471 are compatible.
10472
6060a796 10473Thu Dec 9 18:27:22 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
10474
10475 * cp-decl.c (flag_huge_objects): New flag to allow large objects.
10476 * toplev.c (lang_options): Ditto.
10477 * cp-decl2.c (flag_huge_objects, lang_f_options): Ditto.
10478 * cp-decl.c (delta_type_node): New type for delta entries.
10479 * cp-tree.h (delta_type_node): Ditto.
10480 * cp-decl.c (init_decl_processing): Setup delta_type_node.
10481 * cp-decl.c (init_decl_processing, build_ptrmemfunc_type): Use
10482 delta_type_node instead of short_integer_type_node.
10483 * cp-class.c (build_vtable_entry): Ditto.
10484
10485Thu Dec 9 16:19:05 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10486
10487 * cp-tree.h (OPERATOR_TYPENAME_P): Define outside of
10488 NO_{DOLLAR,DOT} macro checks, so it always gets defined.
10489 (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL.
10490
6060a796 10491Wed Dec 8 17:38:06 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
10492
10493 * cp-decl.c (finish_decl): Make sure things that can go into
10494 "common", do go into common, if -fcommon is given.
10495
10496Wed Dec 8 13:01:54 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10497
63718c49
GB
10498 * cp-call.c (print_harshness) [DEBUG_MATCHING]: New function.
10499 (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print out
10500 argument matching diagnostics to make instantly clear what the
10501 compiler is doing.
7177d104
MS
10502
10503 * cp-call.c (convert_harshness_ansi): If the parm isn't an lvalue,
10504 then check to see if the penalty was increased due to
10505 signed/unsigned mismatch, and use a TRIVIAL_CODE if it wasn't.
10506
10507Tue Dec 7 18:29:14 1993 Kung Hsu (kung@cirdan.cygnus.com)
10508
10509 * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution
10510 problem.
10511
10512Tue Dec 7 16:09:34 1993 Jason Merrill (jason@deneb.cygnus.com)
10513
10514 * cp-class.c (finish_struct): Before synthesizing methods, if no
10515 methods have yet been declared then set nonprivate_method. Don't
10516 set non_private method after synthesizing a method.
10517
10518 * cp-lex.c (extract_interface_info): If flag_alt_external_templates
10519 is set, tie emitted code to the location of template instantiation,
10520 rather than definition.
10521
10522 * cp-tree.h: Declare flag_alt_external_templates.
10523
10524 * cp-decl2.c (lang_decode_option): Support -falt-external-templates.
10525
10526 * toplev.c (lang_options): Ditto.
10527
9e9ff709 10528Mon Oct 4 12:50:02 1993 Chip Salzenberg (chip@fin.uucp)
7177d104 10529
63718c49
GB
10530 [changes propagated from 930810 snapshot]
10531 * cp-decl.c (init_decl_processing): Make long long available for use
10532 as SIZE_TYPE and PTRDIFF_TYPE.
10533 (finish_decl): Allow file-scope static incomplete array.
10534 (grokdeclarator): Don't pass on const and volatile fron function
10535 value type to function type.
10536 Warn here for volatile fn returning non-void type.
10537 * cp-parse.y (attrib): Accept attributes `volatile' with alias
10538 `noreturn', and `const'.
10539 * cp-typeck.c (default_conversion): Don't lose const and volatile.
10540 (build_binary_op_nodefault): Generate pedantic warning for comparison
10541 of complete pointer type with incomplete pointer type.
10542 (build_c_cast): Be careful that null pointer constant be INTEGER_CST.
7177d104
MS
10543
10544Tue Dec 7 10:46:48 1993 Jason Merrill (jason@deneb.cygnus.com)
10545
10546 * cp-init.c (expand_vec_init): When creating a temporary for copying
10547 arrays, use the type of the source, not the target.
10548
10549 * cp-cvt.c (convert): Pass an argument for errtype to
10550 convert_to_reference.
10551
10552 * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with
10553 methods, -> and `this'.
10554
10555Mon Dec 6 17:12:33 1993 Jason Merrill (jason@deneb.cygnus.com)
10556
10557 * cp-error.c (parm_as_string): New function; returns `this' or arg
10558 number. Corresponds to %P.
10559 (dump_expr): Deal with method calls.
10560
10561 * cp-cvt.c (convert_to_reference): Stop using warn_for_assignment.
10562 * cp-typeck.c (convert_for_assignment): Ditto.
10563 (warn_for_assignment): Lose.
10564
10565Mon Dec 6 11:33:35 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10566
10567 * cp-call.c (ideal_candidate_ansi): Delete code that was never
10568 doing anything useful. Instead, sort once, and DO NOT wipe
10569 out any codes with EVIL_CODE, since that's what we use as a
10570 marker for the end of the list of candidates.
10571
10572 * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN.
10573
10574Mon Dec 6 12:49:17 1993 Jason Merrill (jason@deneb.cygnus.com)
10575
10576 * cp-init.c (get_aggr_from_typedef): New function, like
10577 is_aggr_typedef but returns the _TYPE.
10578
10579 * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name.
10580
10581Sun Dec 5 18:12:48 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10582
10583 * cp-lex.c (readescape): Pedwarn when a hex escape is out of range.
10584
10585Thu Nov 25 23:50:19 1993 Chip Salzenberg (chip@fin.uucp)
10586
10587 Delay language context change until beginning of next decl.
10588
10589 * cp-lex.h (c_header_level): Removed.
10590 (pending_lang_change): Declared.
10591 * cp-lex.c (c_header_level): Renamed from in_c_header, made static.
10592 (pending_lang_change): Defined.
10593 (check_newline): Rework code that recognizes line number and
10594 filename changes. Instead of pushing and popping lang context,
10595 increment and decrement pending_lang_change.
10596 (do_pending_lang_change): Push and pop lang context according
10597 to value of pending_lang_change.
10598 * cp-parse.y (extdefs): Use lang_extdef instead of extdef.
10599 (extdef): Same as extdef, but call do_pending_lang_change() first.
10600
10601Mon Nov 15 15:39:15 1993 Chip Salzenberg (chip@fin.uucp)
10602
10603 * cp-typeck.c (build_binary_op_nodefault): Warn for ordered
10604 compare of ptr with 0 only if pedantic in both cases.
10605
10606Thu Nov 25 13:31:37 1993 Chip Salzenberg (chip@fin.uucp)
10607
10608 Reinstate the below patch, which got lost in the Cygnus merge:
10609 Tue Nov 23 13:59:24 1993 Hallvard B Furuseth (hbf@durin.uio.no)
10610 * cp-parse.y (maybe_type_qual): Don't fail to set $$.
10611
10612Wed Nov 17 19:03:30 1993 Chip Salzenberg (chip@fin.uucp)
10613
10614 * cp-parse.y (attrib): Allow "ident(ident)" like the C front end.
10615
10616Fri Oct 22 20:43:37 1993 Paul Eggert (eggert@twinsun.com)
10617
10618 * cp-lex.c (real_yylex): Diagnose floating point constants
10619 that are too large.
10620
10621Wed Nov 17 19:10:37 1993 Chip Salzenberg (chip@fin.uucp)
10622
10623 * cp-type2.c (build_functional_cast): ARM page 16: When a class
10624 and an object, function or enumerator are declared in the same
10625 scope with the same name, the class name is hidden.
10626
10627Wed Nov 17 19:07:18 1993 Chip Salzenberg (chip@fin.uucp)
10628
10629 * cp-call.c (convert_harshness_ansi): Distinguish float, double,
10630 and long double from each other when overloading.
10631 (compute_conversion_costs_{ansi,old}, build_method_call,
10632 build_overlay_call_real, convert_to_aggr): Always set and
10633 always use H_LEN member of candidate structure.
10634
10635Mon Oct 11 23:10:53 1993 Chip Salzenberg (chip@fin.uucp)
10636
10637 * cp-decl.c (duplicate_decls): Note redeclarations of library
10638 functions, and generate distinct warnings for them.
10639
10640Mon Oct 4 12:26:49 1993 Chip Salzenberg (chip@fin.uucp)
10641
10642 Support format warnings in G++.
10643
10644 * cp-tree.h: Protect against multiple inclusion.
10645 Declare all public functions in c-common.c (copy from c-tree.h).
10646 (STDIO_PROTO): Define.
10647 (warn_format): Declare.
10648 (record_format_info): Remove declaration.
10649 * cp-decl.c (init_decl_processing): Call init_function_format_info.
10650 * cp-decl2.c (lang_decode_option): Make "-Wall" include warn_format.
10651 * cp-typeck.c (build_function_call_real): Call check_function_format.
10652 (record_format_info): Remove -- obsolete stub.
10653
10654Sat Jul 24 12:04:29 1993 Chip Salzenberg (chip@fin.uucp)
10655
10656 * cp-decl.c (duplicate_decls): Don't warn for non-extern var decl
10657 following an extern one (for -Wredundant-decls).
10658 * cp-parse.y (primary): In statement expression case, if compstmt
10659 returns something other than a BLOCK, return it unchanged.
10660
10661Thu Dec 2 20:44:58 1993 Chip Salzenberg (chip@fin.uucp)
10662
10663 * cp-decl.c (warn_extern_redeclared_static): New function made
10664 from code extracted from pushdecl.
10665 (duplicate_decls, pushdecl): Call new function.
10666 (lookup_name_current_level): Allow for IDENTIFIER_GLOBAL_VALUE
10667 to be a TREE_LIST when function is declared in 'extern "C" {}'.
10668
10669Fri Dec 3 16:01:10 1993 Jason Merrill (jason@deneb.cygnus.com)
10670
10671 * cp-class.c (duplicate_tag_error): Use cp_error.
10672 (finish_base_struct): Check for ambiguity with direct base, and don't
10673 generate op= or copy ctor if it exists.
10674
10675Fri Dec 3 15:32:34 1993 Kung Hsu (kung@cirdan.cygnus.com)
10676
10677 * cp-init.c (expand_member_init): when initializer name is null,
10678 don't try to build it now because emit_base_init will handle it.
10679
10680Fri Dec 3 12:28:59 1993 Jason Merrill (jason@deneb.cygnus.com)
10681
10682 * cp-lex.c (init_lex): Initialize input_filename to "<internal>" for
10683 code such as ExceptionHandler::operator=.
10684
10685Fri Dec 3 10:32:08 1993 Jason Merrill (jason@deneb.cygnus.com)
10686
10687 * cp-decl.c (grokdeclarator): Don't try to print out dname when
10688 complaining about arrays of references if decl_context==TYPENAME,
10689 since it will be null.
10690
10691 * cp-decl2.c: Default to flag_ansi_overloading.
10692
10693Thu Dec 2 18:05:56 1993 Kung Hsu (kung@cirdan.cygnus.com)
10694
10695 * cp-call.c (build_method_call): use binfo from instance if it's
10696 different from binfo (basetype_path) passed from above.
10697
10698Thu Dec 2 12:48:36 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10699
10700Wed Nov 17 19:14:29 1993 Chip Salzenberg (chip@fin.uucp)
10701
10702 cp-error.c (dump_expr): Use unsigned chars to output a
10703 TREE_REAL_CST in hex.
10704
10705Thu Dec 2 11:05:48 1993 Jason Merrill (jason@deneb.cygnus.com)
10706
10707 * cp-class.c (finish_struct): Fix typo in setting
10708 cant_synth_asn_ref.
10709
10710 * cp-tree.h (TYPE_NESTED_NAME): New macro, does
10711 DECL_NESTED_TYPENAME (TYPE_NAME (NODE)).
10712
10713 * cp-lex.c (default_copy_constructor_body): Change
10714 DECL_NAME (TYPE_NAME (btype)) to TYPE_NESTED_NAME (btype).
10715 (default_assign_ref_body): Ditto.
10716 (default_copy_constructor_body): Call operator= explicitly for
10717 base classes that have no constructor.
10718
10719Thu Dec 2 10:47:15 1993 Michael Tiemann (tiemann@blues.cygnus.com)
10720
10721 * cp-call.c (build_method_call): If the instance variable is
10722 converted to error_mark_node when we're trying to convert it to the
10723 base type of a method we're looking up, return error_mark_node.
10724
10725Thu Dec 2 10:41:16 1993 Torbjorn Granlund (tege@cygnus.com)
10726
10727 * cp-typeck.c (build_binary_op_nodefault): In *_DIV_EXPR *_MOD_EXPR
10728 cases, tests for unsigned operands by peeking inside a NOP_EXPR.
10729
10730Wed Dec 1 13:33:34 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10731
10732 * cp-call.c (compute_conversion_costs_ansi): Use the size of struct
10733 harshness_code, not the size of short, for clearing out the
10734 ansi_harshness.
10735
10736 * cp-call.c (print_candidates): New function.
10737 (build_method_call): When we had some candidates, but didn't get a
10738 usable match, don't report that we got an error with the first
10739 candidate. Instead, say there were no matches, and list the
10740 candidates with print_candidates. In the second pass, make sure we
10741 clear out ever_seen, so we can accurately count the number of
10742 functions that qualified.
10743
10744Wed Dec 1 09:53:59 1993 Torbjorn Granlund (tege@cygnus.com)
10745
10746 * cp-typeck.c (build_binary_op_nodefault): Shorten for *_MOD_EXPR
10747 only if op1 is known to be != -1.
10748 (build_binary_op_nodefault): Handle *_DIV_EXPR likewise.
10749
10750Tue Nov 30 14:07:26 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
10751
10752 * cp-method.c (hack_identifier): If the field itself is private, and
10753 not from a private base class, say so.
10754
10755Mon Nov 29 03:00:56 1993 Jason Merrill (jason@deneb.cygnus.com)
10756
10757 * cp-decl.c (grokdeclarator): Always warn on initialization of
10758 const member.
10759
10760Wed Nov 24 00:49:35 1993 Jason Merrill (jason@deneb.cygnus.com)
10761
10762 * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly.
10763 (finish_base_struct): Set cant_synth_asn_ref properly.
10764
10765 * cp-lex.c (cons_up_default_function): Add section for operator=.
10766 (default_assign_ref_body): New function, mostly cribbed from
10767 default_copy_constructor_body.
10768
10769 * cp-class.c (base_info): Add members cant_synth_copy_ctor,
10770 cant_synth_asn_ref, no_const_asn_ref.
10771 (finish_base_struct): Update no_const_asn_ref, note that you should
10772 update cant_synth_*, propagate TYPE_GETS_ASSIGN_REF.
10773 (finish_struct): Add decls for cant_synth_*, no_const_asn_ref, and
10774 initialize them properly. Set no_const_asn_ref properly. Set
10775 cant_synth_* in some of the situations where they should be set.
10776 Propagate TYPE_GETS_ASSIGN_REF. Use cant_synth_copy_ctor. Add call
10777 to cons_up_default_function for operator=.
10778
6060a796 10779Tue Nov 23 20:24:58 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
10780
10781 * cp-cvt.c (convert_force): Add code to perform casting of pointer
10782 to member function types.
10783 * cp-typeck.c (build_ptrmemfunc): Add FORCE parameter to indicate
10784 when the conversion should be done, regardless.
10785 * cp-tree.h (build_ptrmemfunc): Ditto.
10786 * cp-type2.c (digest_init): Ditto.
10787 * cp-typeck.c (convert_for_assignment): Ditto.
10788
10789Tue Nov 23 18:06:58 1993 Jason Merrill (jason@deneb.cygnus.com)
10790
10791 * cp-error.c (dump_expr): Do the right thing for variables of
10792 reference type.
10793
10794 * cp-decl.c (grok_op_properties): Set TYPE_HAS_ASSIGN_REF
10795 and its kin properly.
10796 (xref_tag): Propagate TYPE_GETS_ASSIGN_REF.
10797
6060a796 10798Tue Nov 23 12:26:13 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
10799
10800 * cp-method.c (build_opfncall): Don't count pointer to member
10801 functions as aggregates here, as we don't want to look up methods in
10802 them. The compiler would core dump if we did, as they don't have
10803 normal names.
10804 * cp-typeck.c (build_indirect_ref): Improve wording on error
10805 message.
10806
10807Mon Nov 22 14:22:23 1993 Jason Merrill (jason@deneb.cygnus.com)
10808
10809 * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn
10810 (since it's supported in other compiler bits).
10811
10812 * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name
10813 argument.
10814
10815 * cp-error.c (dump_function_decl): Don't print return type for
10816 constructors and destructors.
10817
10818 * cp-cvt.c (cp_convert_to_pointer): Import code from
10819 convert_to_pointer so we can return error_mark_node in the case of an
10820 error, and to allow more meaningful error messages.
10821 (build_type_conversion): Don't go through void* when trying
10822 to convert to a pointer type.
10823
10824 * cp-decl.c (grokfndecl): Move call to grok_op_properties back
10825 after grokclassfn so that it's dealing with the right decl.
63718c49 10826 (grok_op_properties): Don't assert !methodp for op new and op delete.
7177d104
MS
10827
10828 * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now
10829 no uses of it in the compiler).
10830
10831 * cp-call.c (build_scoped_method_call): Fix for destructors of simple
10832 types.
10833 (build_method_call): Ditto.
10834
10835Fri Nov 19 12:59:38 1993 Jason Merrill (jason@deneb.cygnus.com)
10836
10837 * cp-tree.c (count_functions): Abstraction function.
10838
10839 * cp-call.c (build_overload_call_real): Deal with new overloading
10840 properly, remove dead code.
10841
10842 * gcc.c (default_compilers): Generate and use .ii files in the
10843 intermediate stage of compiling C++ source.
10844
10845Fri Nov 19 11:26:09 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
10846
10847 * cp-expr.c (cplus_expand_expr): Make call_target a valid memory
10848 address before using it, so it can be later safely compared.
10849
10850Fri Nov 12 15:30:27 1993 Jason Merrill (jason@deneb.cygnus.com)
10851
10852 * cp-pt.c (tsubst): Deal with new overloading.
10853
10854 * cp-typeck.c (fntype_p): is the arg function type?
10855 (comp_target_parms): pedwarn on conversion from (anything) to (...).
10856 (build_x_function_call): Deal with new overloading.
10857
10858 * cp-tree.c (decl_list_length): Deal with new overloading.
10859 (decl_value_member): Like value_member, but for DECL_CHAINs.
10860
10861 * cp-decl.c (duplicate_decls): Deal with new overloading.
10862 (start_decl): Ditto.
10863
10864 * cp-class.c (instantiate_type): Deal with new overloading.
10865
10866 * cp-call.c (convert_harshness_ansi): Deal with new overloading.
10867 (convert_harshness_old): Deal with new overloading.
10868 (build_overload_call_real): Ditto.
10869
10870Mon Nov 8 13:50:49 1993 Jason Merrill (jason@deneb.cygnus.com)
10871
10872 * cp-tree.c (get_unique_fn): New function; returns FUNCTION_DECL
10873 if unambiguous, NULL_TREE otherwise.
10874 (get_first_fn): Returns the first appropriate FUNCTION_DECL.
10875 (is_overloaded_fn): Returns whether or not the passed tree is
10876 a function or list of functions.
10877
10878 * cp-init.c (init_init_processing): use `get_first_fn' to find
10879 the FUNCTION_DEFN for new and delete.
10880
10881 * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut
10882 code size in half (I spit on special cases).
10883
10884Tue Sep 7 20:03:33 1993 Jason Merrill (jason@deneb.cygnus.com)
10885
10886 * cp-decl.c: Allow references and template type parameters as well
This page took 1.13613 seconds and 5 git commands to generate.