]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
(ASM_SPEC): Correct typos in Jun 18 change.
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
574baa64
DE
1Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
2
3 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
4 (finish_file): Likewise.
5
a0128b67
MS
6Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
7
8 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
9 LOOKUP_ONLYCONVERTING at all for now.
10
11 * search.c (add_conversions): Put the conversion function in
12 TREE_VALUE, the basetype in TREE_PURPOSE.
13 * cvt.c (build_type_conversion): Adjust.
14 * cvt.c (build_expr_type_conversion): Adjust.
15 * call.c (user_harshness): Adjust.
16
17Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
18
19 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
20 backend's benefit.
21
22Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
23
24 * cp-tree.h (OFFSET_REF): Remove.
25 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
26 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
27 * init.c (expand_aggr_init_1): Ditto.
28 (build_new): Ditto.
29 * typeck.c (expand_target_expr): Ditto.
30
31Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
32
33 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
34 TARGET_EXPR.
35
e349ee73
MS
36Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
37
38 * cvt.c (build_up_reference): Redo how and when temporaries are
39 created.
40 * decl.c (grok_reference_init): Don't try and be smart about
41 running cleanups.
42
43Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
44
45 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
46 (TARGET_EXPR...), now that it has 4 arguments.
47 * tree.c (build_cplus_new): Ditto.
48
49Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
50
51 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
52
53 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
54 * decl.c (struct saved_scope): Remove named_labels,
55 {base,member}_init_list.
56 (maybe_push_to_top_level): Don't set them. Call
57 push_cp_function_context if appropriate.
58 (pop_from_top_level): Likewise.
59
60 * method.c (do_build_assign_ref): Remove obsolete check of
61 TYPE_HAS_ASSIGN_REF (basetype).
62
63 * decl.c (grokfndecl): Diagnose user definition of
64 implicitly-declared methods.
65
66Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
67
68 * method.c (do_build_copy_constructor): Add code to give
69 meaningful error messages instead of crashing.
70 (do_build_assign_ref): Don't synthesize assignment operators for
71 classes containing reference or const members.
72
73 * class.c (struct base_info): Remove cant_synth_copy_ctor
74 and cant_synth_asn_ref.
75 (finish_base_struct): Remove the code that tries to conditionalize
76 synthesis of copy constructors & assignment operators based on
77 access permissions. Instead, let it fail when it tries to
78 synthesize the copy constructor. This will give meaningful error
79 messages instead of silently generating code to perform a bitcopy.
80
81Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
82
83 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
84 determining types for constant values.
85
86 * decl.c (struct named_label_list): Use instead of stuffing
87 random items into a TREE_LIST node.
88 (named_label_uses): Use the new struct.
89 (poplevel): Ditto.
90 (lookup_label): Ditto.
91 (define_label): Add an error message to tell the user the line
92 where the goto is located in addition to the destination of the
93 goto.
94 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
95 named_label_uses.
96 (finish_function): Ditto.
97
98 (start_decl): Complain about defining a static data member
99 in a different type from which it was declared.
100
101Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
102
103 * cvt.c (build_expr_type_conversion): Adjust.
104
105Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
106
107 * call.c (build_method_call): Always convert 'this' to the
108 appropriate type.
109
110 * search.c (add_conversions): Put the conversion function in
111 TREE_VALUE, the type in TREE_PURPOSE.
112 * cvt.c (build_type_conversion): Adjust.
113 * call.c (user_harshness): Adjust.
114
115 * method.c (emit_thunk): Call temporary_allocation and
116 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
117
118 * tree.c (build_cplus_array_type): Handle tweaking of
119 TYPE_MAIN_VARIANT here.
120 * typeck.c (common_type): Not here.
121
122 * typeck.c (complete_type): Only try to complete an array type if
123 it has a domain.
124
125Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
126
127 * decl.c (grokvardecl): Call complete_type.
128 (grokdeclarator): Call complete_type for PARM_DECLs.
129
130Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
131
132 * pt.c (instantiate_class_template): Re-set
133 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
134
135Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
136
137 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
138 smart enough to do it right.
139 * tree.c (cp_expand_decl_cleanup): Ditto.
140 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
141 cp_expand_decl_cleanup.
142 (store_parm_decls): Ditto.
143 (hack_incomplete_structures): Ditto.
144 * except.c (push_eh_cleanup): Ditto.
145
146Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
147
148 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
149 frontend to the backend where it belongs.
150 * tree.c (unsave_expr): Ditto.
151 (unsave_expr_now): Ditto.
152 * tree.def (UNSAVE_EXPR): Ditto.
153 * cp-tree.h (unsave_expr): Ditto.
154 (unsave_expr_now): Ditto.
155
156Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
157
158 * init.c (emit_base_init): Make sure the partial EH cleanups live
159 on the function_obstack.
160
ce122a86
MS
161Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
162
163 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
164 when checking for pointer types.
165
166Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
167
168 * pt.c (instantiate_class_template): Remove obsolete check for
169 access declarations.
170
171Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
172
173 * call.c (build_overload_call): Simplify calls to
174 build_overload_call by removing last parameter.
175 (build_method_call): Ditto.
176 * cp-tree.h: Ditto.
177 * method.c (build_opfncall): Ditto.
178 * typeck.c (build_x_function_call): Ditto.
179
180Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
181
182 * call.c (default_parm_conversions): Factor out common code.
183 (build_method_call): Use it.
184 (build_overload_call_real): Use it.
185
4ac14744
MS
186Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
187
188 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
189 but pedwarn as the code is bogus.
190 * typeck.c (decay_conversion): Ditto.
191 (build_function_call_real): Use build_addr_func instead of
192 default_conversion. Don't allow pointer-to-method functions down
193 here.
194 (build_unary_op): Use real pointer-to-member functions instead of
195 fake ones.
196 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
197 (convert_for_assignment): Removed some obsolete code.
198 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
199 build_x_function_call instead of current_class_ptr. Only call
200 digest_init once on an initializer, we do this just checking
201 TREE_TYPE.
202 (build_expr_from_tree): Pass current_class_ref to
203 build_x_function_call instead of current_class_ptr.
204 * init.c (build_member_call): Ditto.
205 * pase.y: Ditto.
206 * error.c (dump_expr): Handle OFFSET_REFs better.
207 * pt.c (unify): Handle pointer-to-member functions better.
208 * decl.c (finish_function): Clear out current_class_ref just like
209 we do for current_class_ptr.
210
211 * typeck.c (get_delta_difference): Handle virtual bases better.
212
213Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
214
215 * sig.c (build_signature_table_constructor): Use the delta for
216 the original basetype for this virtual function with thunks.
217 (build_signature_method_call): We still need to adjust 'this'
218 with thunks.
219
220Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
221
222 * call.c (build_addr_func): New routine. Used to get the `real'
223 address of a function or a method. Needed to avoid getting a
224 pointer-to-member function.
225 (build_call): New routine to build CALL_EXPRs.
226 (build_method_call): Use it.
227 * cvt.c (convert_to_aggr): Ditto.
228 * typeck.c (build_function_call_real): Ditto.
229 * sig.c (build_signature_table_constructor): Use build_addr_func.
230 * cp-tree.h (build_call, build_addr_func): Declare them.
231
232Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
233
234 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
235 * parse.y: Remove uses of LOOKUP_AGGR.
236
237Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
238
239 * *.[chy]: Rename current_class_decl to current_class_ptr, and
240 C_C_D to current_class_ref.
241
242Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
243
244 * call.c (convert_harshness): Tighten up pointer conversions.
245
246Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
247
248 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
249 (finish_file): Likewise.
250
251Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
252
253 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
254
255 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
256 code.
257
258Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
259
260 * decl2.c: Turn on thunks by default where supported.
261
4dabb379
MS
262Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
263
264 * cp-tree.h (build_overload_call_maybe): Removed.
265 * call.c (build_overload_call_real): Invert meaning of last arg to
266 be require_complete.
267 (build_overload_call): Ditto.
268 * typeck.c (build_x_function_call): Use build_overload_call_real
269 instead of build_overload_call_maybe.
270
a50f0918
MS
271Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
272
273 * decl2.c (finish_file): Don't try to emit functions that haven't
274 been compiled.
275
276Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
277
278 * decl2.c (finish_vtable_vardecl): Oops.
279
280 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
281 Also store the bindings from previous_class_values.
282 (pop_from_top_level): Restore them.
283
284Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
285
286 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
287 symbol has been referenced.
288 (finish_file): Re-join synthesis/vtable loop with inline emission
289 loop, disable inlining when an inline is output.
290
291Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
292
293 * except.c (init_exception_processing): Setup saved_in_catch.
294 (push_eh_cleanup): Reset __eh_in_catch.
295 (expand_start_catch_block): Set __eh_in_catch.
296
297Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
298
299 * except.c (push_eh_cleanup): Add tracking for whether or not we
300 have an active exception object.
301 (expand_builtin_throw): Use it to make sure a rethrow without an
302 exception object is caught.
303
304Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
305
306 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
307 cache.
308
809c8c30
JM
309Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
310
311 * decl2.c (finish_file): Also use sentries for vars with
312 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
313 created).
314
315 * lex.c (handle_cp_pragma): Disable #pragma
316 interface/implementation if SUPPORTS_ONE_ONLY > 1.
317
318Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
319
320 * method.c (emit_thunk): Wrap default case in
321 temporary/permanent_allocation.
322
323 * method.c (make_thunk): Use DECL_ONE_ONLY.
324 (emit_thunk): Call assemble_end_function.
325
46b02c6d
MS
326Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
327
328 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
329 (import_export_decl): Ditto.
330 (finish_prevtable_vardecl): Disable vtable hack if
331 SUPPORTS_ONE_ONLY > 1.
332
333Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
334
335 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
336 PREDECREMENT_EXPRs take two arguments, not one.
337
338Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
339
340 * class.c (build_vtable_entry): Don't build thunks for abstract
341 virtuals.
342
343 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
344 frontend.
345
346Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
347
348 * class.c (set_rtti_entry): Use size_zero_node.
349 (build_vtable): Ditto.
350
351Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
352
353 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
354 (prepare_fresh_vtable): Ditto.
355
356Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
357
358 * method.c (emit_thunk): Call mark_used on the target function.
359
360 * call.c (build_method_call): Don't warn about pending templates.
361
c7690c68
JM
362Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
363
364 * decl2.c (finish_file): Fix list walking logic.
365
46b02c6d
MS
366 * typeck2.c (check_for_new_type): Only warn if -pedantic.
367
368Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
369
370 * class.c (finish_struct_1): Remove old code for
371 dont_allow_type_definitions.
372 * cp-tree.h: Ditto.
373 * spew.c: Make sure cp-tree.h is included before parse.h, so the
374 definition of flagged_type_tree is found before it is used.
375 * lex.c: Ditto.
376 * parse.y: Added the ftype member to the type union, and changed a
377 number of rules to use it instead of ttype. Added calls to
378 check_for_new_type() as appropriate.
379 * typeck2.c (check_for_new_type): New function for checking
380 if a newly defined type appears in the specified tree.
381 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
382 for check_for_new_type().
383
67d743fe
MS
384Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
385
c7690c68
JM
386 * decl2.c (finish_file): Only use a sentry if the decl is public.
387
67d743fe
MS
388 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
389 don't pass LOOKUP_ONLYCONVERTING.
390
391Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
392
393 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
394 properly keeps track of const and volatile type modifiers.
395
396Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
397
398 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
399 * pt.c (comp_template_args): Use it.
400
401 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
402 assemble_external for artificial function decls.
403
404 * decl.c (cp_finish_decl): Oops.
405
406Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
407
408 * decl2.c (import_export_decl): Put static data member templates
409 into common storage, or make them weak, depending on whether they
410 are dynamically or statically initialized.
411 (get_sentry): New function.
412 (finish_file): Do import_export_decl for static data members before
413 building the init/fini functions. Don't init/fini a variable that's
414 EXTERNAL. Use a sentry for variables in common. Fix mismatching
415 push/pop_temp_slots.
416 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
417 expand_static_init thang.
418 * method.c (get_id_2): New function.
419
420Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
421
422 * parse.y (empty_parms): Make sure we use C++-style prototypes
423 when we're declaring member functions.
424
425Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
426
427 * Makefile.in (CONFLICTS): 16 s/r conflicts.
428 * parse.y (self_template_type): New nonterminal.
429
a80e4195
MS
430Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
431
432 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
433 name.
434 * parse.y (base_class.1): Allow 'typename foo::bar'.
435
436 * lex.c (check_newline): Remove #pragma code that plays with the
437 input stream, since we now deal with tokens. Clear nextchar when
438 we're done.
439 (handle_cp_pragma): Use real_yylex.
440 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
441 in one place.
442
443 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
444
445 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
446
447Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
448
449 * parse.y: New token SELFNAME for potential constructor.
450 * spew.c (yylex): Handle it.
451 * lex.c (identifier_type): Produce it.
452
453 * parse.y (complete_type_name): In :: case, don't push class binding.
454 (complex_type_name): Ditto.
455
456Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
457
458 * typeck.c (build_reinterpret_cast): Handle pointer to member
459 functions.
460
461Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
f72bbc37
BK
462
463 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
a80e4195 464 pragmas.
f72bbc37 465 (check_newline): Put the vtable/unit/implementation/interface pragma
a80e4195 466 code into handle_cp_pragma, replacing it with a call.
f72bbc37 467 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
a80e4195
MS
468 args. Get the next token after handling the pragma token.
469
470Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
471
472 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
473 (convert_to_pointer_force): Ditto.
474
475 * init.c (build_new): Fix array new without -fcheck-new.
476
477Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
478
479 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
480 tree.c: Lose TYPE_NESTED_NAME.
481
482 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
483 as identifiers.
484
485 * tree.def: Add VEC_INIT_EXPR.
486 * expr.c (cplus_expand_expr): Handle it.
487 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
488 the extra file-scope symbol nastiness.
489
490Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
491
492 * method.c (make_thunk): Thunks are static.
493 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
494
495 * decl2.c (mark_vtable_entries): Emit thunks as needed.
496 (finish_file): Don't emit them here.
497
498Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
499
500 * rtti.c (build_dynamic_cast): Handle null pointers.
501 (ifnonnull): New function.
f72bbc37 502
6b5fbb55
MS
503Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
504
a80e4195
MS
505 * call.c (build_method_call): Remember the original basetype we
506 were called with. Give an error message instead of trying
507 (incorrectly) to call a non-static member function through a
508 non-inherited class.
509
6b5fbb55
MS
510 * search.c (expand_upcast_fixups): Mark the new fixup as
511 DECL_ARTIFICIAL.
512
513Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
514
515 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
516
517 * class.c (set_rtti_entry): Fix for thunks.
518
519 * decl2.c (import_export_decl): Still emit typeinfo fns for
520 cv-variants of builtin types.
521
522 * rtti.c (expand_class_desc): Set up base_info_type_node here.
523 (init_rtti_processing): Instead of here.
524
525Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
526
527 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
528 (build_typeid): Only complain about taking dynamic typeid without
529 -frtti.
530
531 * decl2.c: flag_rtti defaults to 1.
532
533 * rtti.c (get_tinfo_var): The general class case is now smaller.
534 (init_rtti_processing): Pack the latter three fields of base_info
535 into 32 bits.
536
537Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
538
539 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
540
541Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
542
543 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
544 (push_memoized_context): Split out code to undefer pop_type_level to
545 (clear_memoized_cache): here.
546 (pop_memoized_context): We can only handle one layer of deferral of
547 pop_type_level so clear the cache, if there was a previous level.
548
549Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
550
551 * rtti.c (init_rtti_processing): Build up base_info_type_node.
552 (expand_class_desc): Use one pointer to an array of base_info
553 structs, passed using a CONSTRUCTOR.
554
555Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
556
557 * class.c (build_vbase_path): Remove block extern for
558 flag_assume_nonnull_objects here.
559 (build_vfn_ref): Split out functionality into build_vtbl_ref.
560 (build_vtbl_ref): New routine.
561 (build_vtable): Set up rtti info here.
562 (add_virtual_function): Note in CLASSTYPE_RTTI the best
563 place where we can get the rtti pointers from to avoid having to
564 search around for a place.
565 (finish_base_struct): Ditto.
566 (finish_struct_1): Ditto. Never create totally new vtables with totally
567 new vtable pointers for rtti. Disable code to layout vtable pointers
568 better until we want to break binary compatibility.
569 * rtti.c (build_headof_sub): New routine to convert down to a
570 sub-object that has an rtti pointer in the vtable.
571 (build_headof): Use it. Also, use build_vtbl_ref now to be more
572 maintainable.
573 (build_dynamic_cast): Make sure we have saved it, if we need to.
574 * search.c (dfs_init_vbase_pointers): Disable code that deals with
575 a more efficient vtable layout, enable later.
576 * call.c (flag_assume_nonnull_objects): Moved declaration to
577 * cp-tree.h: here. Declare build_vtbl_ref.
578 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
579 function calls that want a tree.
580
581Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
582
583 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
584 other X subobjects in the most derived type. Ack.
585
586 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
587 get_typeid will do it for us.
588 (get_typeid_1): Break out call-building for expand_*_desc to use.
589 (get_typeid): Call it.
590 (expand_*_desc): Ditto.
591 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
592 and void *.
593 (init_decl_processing): Lose builtin_type_tdescs lossage.
594 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
595
596Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
597
598 * pt.c (tsubst): When calling set_nested_typename, use
599 TYPE_NESTED_NAME (current_class_type) instead of
600 current_class_name.
601
602 * decl.c (pushdecl): Ditto.
603 (pushdecl_class_level): Ditto.
604 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
605 set_nested_typename.
606
607Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
608
609 * rtti.c (synthesize_tinfo_fn): Handle arrays.
610
611 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
612
613Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
614
615 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
616 (init_rtti_processing): Lose bad_cast_type.
617 (build_dynamic_cast): Use throw_bad_cast.
618
619 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
620
621 * decl2.c (finish_file): Don't synthesize artificial functions
622 that are external and not inline.
623
624 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
625
626 * decl2.c (finish_file): Handle having new inlines added to
627 saved_inlines by synthesis.
628
629 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
630
631Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
632
633 RTTI rewrite to initialize nodes as needed, not require that
634 users #include <typeinfo>, complete functionality and reduce wasted
635 space.
636 * rtti.c (init_rtti_processing): New fn.
637 (build_typeid): The vtable entry is now a function.
638 (get_tinfo_var): New fn.
639 (get_tinfo_fn): Ditto.
640 (get_typeid): Use it.
641 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
642 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
643 points __rtti_*.
644 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
645 (synthesize_tinfo_fn): New fn.
646 * method.c (build_t_desc_overload): Lose.
647 (build_overload_with_type): More generic.
648 * decl.c (init_decl_processing): Call init_rtti_processing.
649 * class.c (set_rtti_entry): Use get_tinfo_fn.
650 * decl2.c (mark_vtable_entries): Mark the rtti function.
651 (finish_prevtable_vardecl): Don't build_t_desc.
652 (import_export_decl): Handle tinfo functions.
653 (finish_file): Ditto.
654 * typeck.c (inline_conversion): New fn.
655 (build_function_call_real): Use it.
656 * cp-tree.h: Add decls.
657
658 * method.c (hack_identifier): Also convert component_refs from
659 references.
660
661 * lex.c (cons_up_default_function): Use the type, not the name, in
662 declspecs.
663
664 * decl2.c (import_export_vtable): Fix weak vtables.
665
666Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
667
668 * search.c (get_base_distance_recursive): Fix access checks for
669 protected bases.
670
671Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
672
673 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
674 cp-tree.h.
675 (convert_harshness): Add prototypes wrapped by PROTO.
676 * decl2.c (grok_function_init): Likewise.
677 (do_toplevel_using_decl): Change to void return type.
678 * class.c (build_vtable_entry): Remove decl of make_thunk.
679 (merge_overrides): Fix order of arg definitions.
680 (finish_vtbls): Likewise.
681 (fixup_vtable_deltas): Likewise.
682 (modify_all_direct_vtables): Likewise.
683 (modify_all_indirect_vtables): Likewise.
684 * search.c (get_base_distance_recursive): Likewise.
685 (get_abstract_virtuals_1): Likewise.
686 (fixup_virtual_upcast_offsets): Likewise.
687 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
688 * init.c (perform_member_init): Fix order of arg definitions.
689 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
690 * cp-tree.h (make_thunk): Add decl.
691 (overload_template_name, push_template_decl): Add decls.
692 (do_toplevel_using_decl): Change to void return type.
693 (vec_binfo_member): Add decl.
694
cdf5b885
MS
695Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
696
697 * typeck.c (mark_addressable, convert_for_assignment,
698 convert_for_initialization, pointer_int_sum, pointer_diff,
699 unary_complex_lvalue): Add prototypes wrapped by PROTO.
700 (convert_sequence): #if 0 fn decl, since definition also is.
701
702Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
703
704 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
705 cast to pointer types for type searching.
706
707Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
708
709 * typeck.c (get_delta_difference): Use cp_error, not error, in the
710 case where BINFO == 0.
711
712Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
713
714 * call.c (build_method_call): Fix wording of error messages so
715 constructors come out right.
716
717Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
718
719 * decl.c (push_overloaded_decl): Don't warn about hidden
720 constructors when both the type and the function are declared
721 in a system header file.
722
c91a56d2
MS
723Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
724
725 * class.c (finish_struct_1): Propagate the TYPE_PACKED
726 flag for the type to the type's fields.
727
728Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
729
730 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
731
732Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
733
734 * class.c (base_info, finish_base_struct): Replace
735 needs_virtual_dtor with base_has_virtual.
736
737 (finish_struct_1): Remove the old code that tried to make default
738 destructors virtual. Use base_has_virtual when checking if we need
739 to add a vtable entry for the rtti code.
740
741Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
742
743 * pt.c (push_template_decl): Complain about template decl with
744 inappropriate declaration.
745
746Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
747
748 * typeck.c (build_x_unary_op): Remove bogus check for taking
749 the address of a member function.
750
751Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
752
753 * parse.y (constructor_declarator): Only push the class if
754 we are not already in the class.
755
756Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
6752b7d4
JL
757
758 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
759 Add additional argument to INIT_CUMULATIVE_ARGS.
760
c91a56d2
MS
761Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
762
763 * decl.c (shadow_tag): Fix error about anon union with methods.
764
765 * parse.y (self_reference): Only generate a self-reference if this
766 is a non-template class.
767 (opt.component_decl_list): Only use it if it was generated.
768
769 * parse.y (component_decl_1): Use constructor_declarator.
770 (fn.def2): Ditto.
771 (notype_component_declarator0): Ditto.
772
773Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
774
775 * typeck.c (build_x_unary_op): Add checks for taking the address
776 of a TARGET_EXPR or of a member function, and give appropriate
777 warnings.
778
779Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
780
781 * pt.c (process_template_parm): Allow template type parms to be
782 used as types for template const parms.
783
784Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
785
786 * init.c (expand_vec_init): Ensure the eh cleanups are on the
787 function_obstack.
788
789Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
790
791 * decl.c (lookup_name_real): Be even more picky about the
792 ambiguous lookup warning.
793 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
794 * parse.y (constructor_declarator): Rather than here.
795
796 * parse.y (constructor_declarator): New nonterminal.
797 (fn.def1): Use it.
798 (explicit_instantiation): Ditto.
799
800Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
801
802 Add implicit declaration of class name at class scope.
803 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
804 * parse.y (self_reference): New nonterminal.
805 (opt.component_decl_list): Use it.
806 (fn.def1): Add nested_name_specifier type_name cases.
807 * class.c (build_self_reference): New function.
808 (finish_struct): Handle access_default later, move self-reference
809 decl to the end.
810 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
811 * cp-tree.h: Adjust.
812
813 * pt.c (do_function_instantiation): Separate handling of member
814 functions and non-member functions properly.
815
816Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
817
818 * pt.c (process_template_parm): Improve error for 'volatile class K'.
819
820 * class.c (finish_struct_1): Check the right slot for destructors.
821
822 * decl.c (start_enum): Complain about enum templates.
823
824Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
825
826 * init.c (resolve_offset_ref): Offset pointers to member data by one.
827 * typeck.c (unary_complex_lvalue): Ditto.
828
829Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
830
831 * typeck.c (c_expand_return): Check for a returned local
832 array name, similar to the check for an ADDR_EXPR.
833
834Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
835
836 * decl.c (cp_finish_decl): Don't build cleanups for static
837 variables here.
838
839Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
840
841 * typeck.c (build_modify_expr): Fix error messages to be more
842 accurate.
843 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
844 assignment operators.
845 * error.c (assop_as_string): Ditto. Add support for `%Q' for
846 assignment operators.
847
909e536a
MS
848Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
849
c91a56d2
MS
850 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
851 give an error if initialized. Pedwarn about nested type with the
852 same name as its enclosing class.
853
909e536a
MS
854 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
855
856 * typeck.c (require_complete_type): Be sure to instantiate the
857 MAIN_VARIANT of the type.
858
859 * decl2.c (finish_file): Instantiate pending templates before
860 processing static constructors and destructors.
861
862 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
863 unless at_eof.
864
865Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
866
867 * decl2.c (delete_sanity): If error_mark_node is passed
868 in as an expression, quit while we're ahead.
869
870 * decl.c (grokdeclarator): Give an error message if `friend'
871 is combined with any storage class specifiers.
872
fc378698
MS
873Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
874
875 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
876 definition of nonexistent nested type.
877
878 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
879 not to say 'typedef'.
880
881Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
882
883 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
884 * search.c (dfs_walk, dfs_init_vbase_pointers,
885 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
886 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
887
888Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
889
890 * except.c (build_throw): Support minimal parse.
891 * pt.c (tsubst_copy): Support THROW_EXPR.
892 * decl2.c (build_expr_from_tree): Ditto.
893
894 * pt.c (mangle_class_name_for_template): Always allocate
895 scratch_firstobj.
896
897Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
898
899 * cvt.c (cp_convert_to_pointer): Give an appropriate error
900 when trying to cast from an incomplete type.
901
902Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
903
904 * pt.c (instantiate_class_template): Don't bother setting up
905 CLASSTYPE_TAGS explicitly, as the nested types will add
906 themselves.
907
908Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
909
910 * decl.c (shadow_tag): Remove old error check for usage of
911 an enum without a previous declaration.
912 (xref_tag): Add error message about usage of enums without a
913 previous declaration.
914
915Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
916
917 * lex.c (do_identifier): Only do name consistency check if we're
918 parsing.
919
920 * pt.c (push_template_decl): Don't crash if we get a member defn
921 that doesn't match.
922
923 * decl.c (xref_tag_from_type): New function to do an xref without
924 always having to figure out code_type_node.
925 * cp-tree.h: Declare it.
926 * pt.c (instantiate_class_template): Use it for friend classes.
927 (lookup_template_class): Use it.
928
929 * typeck2.c (build_functional_cast): Pull out a single parm before
930 passing it to build_c_cast.
931
932Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
933
934 * expr.c (do_case): Give an error message if a pointer is
935 given as a case value.
936
937Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
938
939 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
940 an overload list.
941
942 * lex.c (cons_up_default_function): Really, now, interface hackery
943 does not apply to synthesized methods.
944
945Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
946
947 * call.c (build_method_call): Ctors and dtors now have special names
948 with respect to lookups.
949 * class.c (add_method): Ditto.
950 (grow_method): Ditto.
951 (finish_struct_methods): Ditto.
952 (warn_hidden): Ditto.
953 (finish_struct_1): Ditto.
954 * cvt.c (convert_to_reference): Ditto.
955 (convert_to_aggr): Ditto.
956 (cp_convert): Ditto.
957 * decl2.c (check_classfn): Ditto.
958 * init.c (expand_member_init): Ditto.
959 (expand_default_init): Ditto.
960 (expand_aggr_init_1): Ditto.
961 (build_offset_ref): Ditto.
962 (build_new): Ditto.
963 (build_delete): Ditto.
964 * lex.c (do_inline_function_hair): Ditto.
965 * search.c (lookup_field_1): Ditto.
966 (lookup_fnfields_here): Ditto.
967 (lookup_field): Ditto.
968 (lookup_fnfields): Ditto.
969 (get_virtual_destructor): Ditto.
970 (dfs_debug_mark): Ditto.
971 (dfs_pushdecls): Ditto.
972 (dfs_compress_decls): Ditto.
973 * tree.c (layout_basetypes): Ditto.
974 * typeck.c (build_component_ref): Ditto.
975 (build_x_function_call): Ditto.
976 (build_modify_expr): Ditto.
977 (convert_for_initialization): Ditto.
978 (build_functional_cast): Ditto.
979 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Ditto.
980 (CTOR_NAME): New.
981 (DTOR_NAME): New.
982 * decl.c (ctor_identifier): New.
983 (dtor_identifier): New.
984 (init_decl_processing): Set them.
985
986Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
987
988 * typeck.c (build_component_ref): Don't get confused by fields whose
989 context has no type name, like pointer to member functions.
990
991Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
992
993 * decl.c (grokdeclarator): Handle typedef without declarator.
994
995 * pt.c (tsubst): Handle SCOPE_REF in declarator.
996
997 * parse.y (bad_parm): Catch another case of missing `typename'.
998
999 * lex.c (yyprint): Handle TYPE_DECLs.
1000
1001 * decl.c (start_function): Don't try to be clever.
1002
1003 * lex.c: Lose compiler_error_with_decl.
1004 * typeck2.c: Lose error_with_aggr_type.
1005 (incomplete_type_error): Use cp_* instead of old functions.
1006 (readonly_error): Ditto.
1007 * typeck.c (convert_arguments): Ditto.
1008 * search.c (lookup_nested_field): Ditto.
1009 * method.c (make_thunk): Ditto.
1010 * decl.c (grokparms): Ditto.
1011 * cp-tree.h: Update.
1012
1013 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
1014 and value.
1015
1016Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
1017
1018 * method.c (build_opfncall): When deleting a pointer to an
1019 array, build a new pointer to the tree past any ARRAY_TYPE
1020 nodes.
1021
1022Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1023
1024 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
1025
1026Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
1027
1028 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
1029 and ! DECL_INLINE.
1030
1031 * decl.c (finish_function): Don't set nested based on
1032 hack_decl_function_context.
1033 * parse.y (function_try_block): Check for nested function.
1034 (pending_inlines): Ditto.
1035
1036 * decl2.c (build_expr_from_tree): If a unary op already has a
1037 type, just return it.
1038
1039 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
1040
1041 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
1042 (finish_file): Check the return value of walk_vtables.
1043 (finish_prevtable_vardecl): Return int.
1044 (finish_vtable_vardecl): Ditto.
1045 (prune_vtable_vardecl): Ditto.
1046 * lex.c (set_vardecl_interface_info): Ditto.
1047 * cp-tree.h: Adjust return types.
1048
1049 * class.c (delete_duplicate_fields_1): Don't complain about
1050 duplicate nested types if they're the same type.
1051 (finish_struct): Remove check for duplicate.
1052 * decl2.c (grokfield): Don't check for typedef of anonymous type.
1053
1054Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
1055
1056 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
1057
1058 * decl.c (grokdeclarator): Lose special handling of class-level
1059 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
1060 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
1061
1062 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
1063
1064 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
1065
1066 * search.c (compute_access): Fix handling of anonymous union
1067 members.
1068 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
1069 from anonymous unions to their members.
1070
1071 * typeck.c (build_x_function_call): For static member functions,
1072 hand off to build_member_call.
1073
1074Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
1075
1076 * typeck.c (build_component_ref): Handle OFFSET_REFs.
1077
1078 * init.c (expand_vec_init): Fix init == 0 case.
1079
1080Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
1081
1082 * init.c (build_new): Pedwarn about init and array new.
1083 (expand_vec_init): Handle lists, use convert_for_initialization
1084
1085 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
1086 when converting to an aggregate type.
1087 * cvt.c (cp_convert): Pass it through.
1088
1089 * typeck.c (build_conditional_expr): Handle user-defined
1090 conversions to slightly different types.
1091
1092 * decl.c (grokdeclarator): Force an array type in a parm to be
1093 permanent.
1094
1095 * decl2.c (do_using_directive): Sorry.
1096 (do_namespace_alias): Ditto.
1097 * lex.c (real_yylex): Warn about using the `namespace' keyword.
1098
1099Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
1100
1101 * parse.y (datadef): Move call to note_list_got_semicolon up.
1102
934c6b13
MS
1103Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
1104
1105 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
1106
1107Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
1108
1109 * decl.c (cp_finish_decl): The exception regions have to be
1110 nested, not overlapping. We start the exception region for a
1111 decl, after it has been fully built, and all temporaries for it
1112 have been cleaned up.
1113
1114Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
1115
1116 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
1117
e76a2646
MS
1118Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
1119
1120 * tree.def: Add RETURN_INIT.
1121 * pt.c (instantiate_decl): Handle RETURN_INIT.
1122 * decl.c (store_return_init): Handle minimal_parse_mode.
1123
1124 * tree.c (cp_build_type_variant): Just return an error_mark_node.
1125 * decl.c (make_typename_type): Don't try to get the file and line
1126 of an identifier.
1127 * typeck.c (comptypes): Handle TYPENAME_TYPE.
1128
1129Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
1130
1131 * decl.c (poplevel): Make sure we clear out and restore old local
1132 non-VAR_DECL values by default when they go out of scope.
1133
1134Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
1135
1136 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
1137 referring to addresses of variables and functions.
1138
1139 * error.c (dump_expr): Support SIZEOF_EXPR.
1140
1141 * init.c (do_friend): Use the return value of check_classfn.
1142
1143 * typeck.c (convert_arguments): Call complete_type.
1144
1145 * method.c (hack_identifier): After giving an error, set value to
1146 error_mark_node.
1147
1148Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
1149
1150 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
1151 lossage for local classes.
1152 * cp-tree.h: Declare it.
1153 * decl.c (lookup_name_real): Evil, painful hack for local classes.
1154 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
1155 Use hack_decl_function_context.
1156 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
1157 (start_function): Use hack_decl_function_context.
1158 (finish_function): Ditto.
1159 * method.c (synthesize_method): Ditto.
1160 * lex.c (process_next_inline): Ditto.
1161 (do_pending_inlines): Ditto.
1162 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
1163 done with it.
1164
1165Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
1166
1167 * sig.c (build_signature_pointer_or_reference_type): Align
1168 signature pointers/references on 8-byte boundaries so they can be
1169 grabbed 2 words at a time on a Sparc.
1170
1171Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
1172
1173 * method.c (hack_identifier): Requiring a static chain is now a
1174 hard error.
1175 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
1176 functions.
1177
1178Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
1179
1180 * init.c (build_offset_ref): Call complete_type.
1181
1182 * decl.c (pop_from_top_level): Always pop previous_class_type.
1183
1184 * parse.y: Handle multiple decls in a for-init-statement.
1185 * pt.c (tsubst_expr): Ditto.
1186
1187 * pt.c (tsubst): Use tsubst_expr for the second operand of an
1188 ARRAY_REF.
1189
1190 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
1191 (poplevel_class): Set it here.
1192 (pop_from_top_level): Pop it here if we're returning to class scope.
1193 * class.c (pushclass): Don't set it here.
1194
1195 * decl.c (maybe_push_to_top_level): Save current_template_parms,
1196 and clear it if !pseudo.
1197 (pop_from_top_level): Restore it.
1198
1199 * decl2.c (finish_file): Push the dummy each time we walk the list
1200 of vtables.
1201
1202 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
1203 something for CAST_EXPR.
1204
1205Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
1206
1207 * cvt.c (cp_convert): Warn about implicit conversion of the
1208 address of a function to bool, as it is always true.
1209
1210Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
1211
1212 * typeck.c (c_expand_return): Fix warning for local externs returned.
1213
1214Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
1215
1216 * tree.c (mapcar): Propagate const and volatile properly.
1217
1218 * typeck.c (complete_type): Be sure to instantiate the
1219 MAIN_VARIANT of the type.
1220
1221 * method.c (synthesize_method): Class interface hackery does not
1222 apply to synthesized methods.
1223
1224Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
1225
1226 * pt.c (comp_template_args): Use comptypes rather than just
1227 checking for TEMPLATE_TYPE_PARM equivalence.
1228
1229 * typeck.c (build_x_function_call): Call complete_type before
1230 checking TYPE_OVERLOADS_CALL_EXPR.
1231
7ea63af7
MH
1232Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
1233
1234 * g++.c (main): Check also for new define ALT_LIBM.
1235
ec255269
MS
1236Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
1237
1238 * pt.c (instantiate_class_template): If we don't have a pattern
1239 yet, that's OK.
1240 (coerce_template_parms): If we see a local class, bail.
1241
1242 * decl.c (grok_reference_init): Make sure there's a type before
1243 checking its code.
1244
1245 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
1246 (push_template_decl): Ditto.
1247
1248 * parse.y (named_class_head): Set
1249 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
1250
1251 * decl.c (xref_tag): Diagnose redeclaration of template
1252 type-parameter name.
1253
1254 * error.c (dump_type): Handle anonymous template type parms.
1255
1256 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
1257 TYPE_STUB_DECL.
1258 (coerce_template_parms): Ditto.
1259
1260Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
1261
1262 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
1263 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
1264
1265Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
1266
1267 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
1268 before trying to get its STUB_DECL.
1269 (coerce_template_parms): Ditto.
1270
1271 * parse.y (template_type_parm): If they didn't use 'class',
1272 pretend they did after giving an error.
1273
1274 * pt.c (coerce_template_parms): Diagnose use of local class.
1275
1276 * decl.c (grok_reference_init): Use instantiate_type.
1277
1278 * error.c (dump_expr): Handle TEMPLATE_DECLs.
1279
1280 * parse.y (named_class_head): Diagnose mismatching types and tags.
1281
1282 * decl.c (pushdecl): Type decls and class templates clash with
1283 artificial type decls, not hide them.
1284
1285 * decl.c (redeclaration_error_message): Diagnose redefinition of
1286 templates properly.
1287 (duplicate_decls): Diagnose disallowed overloads for template
1288 functions, too.
1289
1290 * decl.c (start_decl): Call complete_type before checking for a
1291 destructor.
1292
1293 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
1294
1295 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
1296
5566b478
MS
1297Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
1298
ec255269
MS
1299 * decl.c (grok_op_properties): Don't check for operator++(int) in
1300 a template.
1301
1302 * tree.c (perm_manip): Return a copy of variable and function
1303 decls with external linkage.
1304
1305 * tree.def: Change some of the min tree codes to type "1".
1306 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
1307 * method.c (build_overload_int): Emit something arbitrary for
1308 anything but an INTEGER_CST if we're in a template.
1309
1310 * decl.c (cp_finish_decl): Call complete_type before deciding
1311 whether or not to lay out the decl.
1312
5566b478
MS
1313 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
1314
1315Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
1316
1317 * typeck2.c (build_x_arrow): Call complete_type.
1318
1319 * pt.c (add_pending_template): Broken out.
1320 (lookup_template_class): If -fexternal-templates, call it for all
1321 the methods of implemented types.
1322 (instantiate_class_template): Instead of instantiating them here.
1323 (instantiate_decl): Handle -fexternal-templates earlier.
1324
1325Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1326
1327 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
1328 memoized lookup stuff inside GATHER_STATISTICS.
1329
1330Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
1331
1332 * decl.c (start_decl): Complain about array of incomplete type
1333 here.
1334 (grokdeclarator): Not here.
1335
1336 * parse.y (template_parm): Expand full_parm inline so we can set
1337 the rule's precedence.
1338
1339 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
1340 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
1341 * decl2.c (grokbitfield): Don't check for integer constant here.
1342 * class.c (finish_struct_1): Check here.
1343
1344 * decl.c (define_label): Make the min decl go on permanent_obstack.
1345
1346 * pt.c (unify): Don't handle CONST_DECLs.
1347 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
1348 (tsubst_copy): Ditto.
1349
1350 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
1351 CONST_DECL for a template parm.
1352
1353Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
1354
1355 * decl.c (grokdeclarator): Complain about array of incomplete type
1356 here.
1357 (start_decl_1): Not here.
1358
1359 * pt.c (tsubst): Handle pointer-to-function declarators.
1360
1361 * method.c (hack_identifier): If pedantic, diagnose local class
1362 methods that require a static chain.
1363
1364 * decl.c (grok_op_properties): No longer static.
1365 * cp-tree.h: Declare it.
1366 * pt.c (tsubst): Call it for operators.
1367 Use tsubst_copy for TREE_VECs.
1368
1369 * parse.y (template_arg): The expr has precedence like '>'.
1370
1371Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
1372
1373 * pt.c (coerce_template_parms): Don't coerce an expression using
1374 template parms.
1375 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
1376 (tsubst): Don't use build_index_2_type if the max_value uses template
1377 parms.
1378 * method.c (build_overload_int): Emit something arbitrary for an
1379 expression using template parms.
1380
1381 * parse.y (template_close_bracket): New non-terminal to catch use
1382 of '>>' instead of '> >' in template class names.
1383 (template_type): Use it.
1384 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
1385
1386 * tree.def: Add CAST_EXPR.
1387 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
1388 CONVERT_EXPR for minimal_parse_mode.
1389 * typeck.c (build_c_cast): Ditto.
1390 * pt.c (tsubst_copy): Ditto.
1391 * decl2.c (build_expr_from_tree): Ditto.
1392 * error.c (dump_expr): Ditto.
1393
1394Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1395
1396 * except.c (SetTerminate, SetUnexpected): Put back global vars.
1397 (init_exception_processing): Put back decl/init of
1398 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
1399 fns from libstdc++.
1400
1401 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
1402 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
1403 Delete unused fns.
1404 * cp-tree.h (declare_uninstantiated_type_level,
1405 uninstantiated_type_level_p): Delete prototypes.
1406
1407Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
1408
1409 * pt.c (tsubst_expr): Add default return.
1410
1411Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1412
1413 * error.c (fndecl_as_string): Delete unused arg CNAME.
1414 * sig.c (build_signature_table_constructor,
1415 build_signature_method_call): Fix calls.
1416
1417 * class.c (the_null_vtable_entry): Delete var definition.
1418 (init_class_processing): Delete tree the_null_vtable_entry init.
1419 * decl.c (no_print_{functions, builtins}): Declare as static.
1420 (__tp_desc_type_node): #if 0 var definition.
1421 (init_type_desc): #if 0 init of __tp_desc_type_node.
1422 (vb_off_identifier): Move var decl into init_decl_processing.
1423 (current_function_assigns_this): Declare as static.
1424 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
1425 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
1426 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
1427 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
1428 * init.c (BI_header_type, BI_header_size): Declare as static.
1429 * pt.c (template_classes): Delete unused var.
1430 (add_pending_template): Delete decl for non-existent fn.
1431 (lookup_template_class): Delete vars CODE and TAG_CODE.
1432 (instantiate_template): Delete unused var TARGS.
1433 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
1434 Delete decls.
1435 (__tp_desc_type_node): #if 0 var decl.
1436 (fndecl_as_string): Fix prototype.
1437
1438Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
1439
1440 * tree.def: Add GOTO_STMT.
1441 * pt.c (tsubst_expr): Support goto and labels.
1442 * decl.c (define_label): Support minimal parsing.
1443 * parse.y (simple_stmt): Ditto.
1444
1445Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1446
1447 * xref.c (GNU_xref_member): Only define/set var I if
1448 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
1449 used.
1450 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
1451 (GNU_xref_end): Fix call.
1452 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
1453 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
1454
1455 * tree.c (build_exception_variant): Delete unused vars I, A, T,
1456 T2, and CNAME.
1457 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
1458 (mapcar): Delete unused var CODE.
1459 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
1460 (break_out_cleanups): Fix call.
1461 (bot_manip): Likewise.
1462 * call.c (build_method_call): Likewise.
1463 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
1464 Likewise.
1465 * typeck.c (unary_complex_lvalue, build_modify_expr,
1466 convert_for_initialization): Likewise.
1467 * typeck2.c (build_functional_cast): Likewise.
1468 * cp-tree.h (build_cplus_new): Fix prototype.
1469
1470 * repo.c (open_repo_file): Delete unused var Q.
1471 (repo_compile_flags, repo_template_declared,
1472 repo_template_defined, repo_class_defined, repo_inline_used,
1473 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
1474 (repo_get_id, repo_vtable_used): Declare as static.
1475 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
1476 prototypes.
1477
1478Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
1479
1480 * parse.y (pending_inlines): Add function_try_block case.
1481
1482 * pt.c (unify): Fix for template const parms.
1483
1484Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1485
1486 * lex.c (extract_interface_info): Delete forward decl.
1487 (default_copy_constructor_body, default_assign_ref_body): Delete
1488 decls for non-existent functions.
1489 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
1490 (init_lex): Delete setting them.
1491 (cons_up_default_function): Delete unused vars FUNC_BUF,
1492 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
1493 #if 0'd synth code.
1494 (toplevel, expression_obstack): Delete unused extern decls.
1495 (tree_node_kind): Delete unused enum.
1496 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
1497 GATHER_STATISTICS.
1498 (tree_node_kind_names): Delete unused extern decl.
1499 (synth_obstack): Delete unused var.
1500 (init_lex): Don't set it.
1501 (init_parse): Add decl before use.
1502 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
1503 (current_unit_{name, language}): Delete unused vars.
1504 (check_newline): Don't bother setting them, just accept the #pragma.
1505 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
1506 (current_unit_{name, language}): Delete decls.
1507
1508 * search.c: Wrap all of the memoized functions, macros, and
1509 variables inside #ifdef GATHER_STATISTICS.
1510 (lookup_field, lookup_fnfields): Likewise.
1511 (init_search_processing): Likewise.
1512 (reinit_search_statistics): Wrap whole function.
1513 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
1514
1515 * decl.c (finish_function): Only call pop_memoized_context if
1516 GATHER_STATISTICS is defined.
1517 (start_function): Likewise for push_memoized_context.
1518 * class.c (pushclass, popclass): Likewise.
1519
1520 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
1521 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
1522
1523 * cvt.c (cp_convert): Delete unused local var FORM.
1524 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
1525 prototypes.
1526
1527Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
1528
1529 * pt.c (do_poplevel): Oops; really return what we get from
1530 poplevel this time.
1531
1532Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1533
1534 * cp-tree.h (is_aggr_type): Add prototype.
1535
1536 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
1537 * method.c ({push,pop}_cp_function_context): Delete decls.
1538 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
1539 (SetUnexpected, SetTerminate): Delete unused vars.
1540 (init_exception_processing): Don't set SetUnexpected or
1541 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
1542 (output_exception_table_entry): Delete unused array LABEL.
1543 (expand_internal_throw): Delete unused var PARAMS.
1544 (expand_start_catch_block): Delete unused var CLEANUP.
1545 (emit_exception_table): Delete unused var EH_NODE_DECL.
1546 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
1547 GOTO_UNWIND_AND_THROW. Don't set them.
1548 (end_eh_unwinder): Add top decl.
1549 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
1550 (exception_section, push_rtl_perm, do_function_call,
1551 lang_interim_eh, push_eh_cleanup, eh_outer_context,
1552 expand_end_eh_spec, end_eh_unwinder): Declare as static.
1553 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
1554 throw_used): Likewise.
1555 * cp-tree.h (expand_end_eh_spec): Delete prototype.
1556
1557 * search.c (dfs_mark, dfs_mark_vtable_path,
1558 dfs_unmark_vtable_path, dfs_mark_new_vtable,
1559 dfs_unmark_new_vtable, dfs_clear_search_slot,
1560 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
1561 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
1562 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
1563 functions.
1564 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
1565 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
1566 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
1567 Only define #ifdef GATHER_STATISTICS.
1568 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
1569 is defined.
1570 (vbase_decl): Delete var definition.
1571 (init_search): Delete old decl.
1572 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
1573 never actually used.
1574 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
1575 (get_base_distance_recursive): Delete unused fourth arg
1576 BASETYPE_PATH. Fix call .
1577 (get_base_distance): Fix call.
1578 (push_class_decls): Delete unused var ID.
1579 (make_memoized_table_entry): Declare as static.
1580 (breadth_first_search): Declare as static.
1581 (tree_has_any_destructor_p): Declare as static.
1582 (pop_class_decls): Delete unused arg pop_class_decls.
1583 * class.c (popclass): Fix call to pop_class_decls.
1584 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
1585 tree_has_any_destructor_p): Delete prototypes.
1586
1587 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
1588 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
1589 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
1590 (build_user_desc): Delete unused var T.
1591 (build_class_desc): Delete unused vars T and OFF.
1592 (build_t_desc): Delete unused var NAME_STRING.
1593 (build_headof): Make static.
1594 (get_bad_cast_node): Likewise.
1595 (get_def_to_follow): Likewise.
1596 * cp-tree.h (init_type_desc): Add prototype.
1597 (build_headof): Remove prototype.
1598
1599Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
1600
1601 * pt.c (tsubst): Only look for matching decls at file scope for
1602 non-member functions.
1603
1604 * call.c (build_scoped_method_call): Handle scoped destructor
1605 calls in templates.
1606
1607 * decl.c (*_top_level): Also save previous_class_values.
1608
1609 * pt.c (tsubst_expr): Support do {} while loops.
1610 * parse.y (simple_stmt): Ditto.
1611 * tree.def: Ditto.
1612
1613 * method.c (build_overload_identifier): For a class nested in a
1614 template class, don't mangle in the template parms from our
1615 context.
1616
1617 * lex.c, cp-tree.h: Remove support for template instantiations in
1618 the pending_inlines code.
1619 * pt.c: Remove dead functions and unused arguments.
1620 (uses_template_parms): TYPENAME_TYPEs always use template parms.
1621 * parse.y: Stop passing anything to end_template_decl.
1622 * tree.c (print_lang_statistics): Only print tinst info #ifdef
1623 GATHER_STATISTICS.
1624
1625Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1626
1627 * init.c (expand_recursive_init{,_1}): Delete decls.
1628 (sort_member_init): Delete unused var INIT.
1629 (emit_base_init): Delete unused var X.
1630 (build_offset_ref): Delete unused var CNAME.
1631 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
1632 (emit_base_init): Delete unused local var BASE. Delete extern
1633 decl of IN_CHARGE_IDENTIFIER.
1634 (build_delete): Delete unused local var VIRTUAL_SIZE.
1635
1636 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
1637 (build_delete): Fix call.
1638 * decl2.c (delete_sanity): Likewise.
1639 * cp-tree.h (build_vec_delete): Update prototype.
1640
1641 * typeck.c (common_base_type): Delete unused var TMP.
1642 (build_binary_op): Delete local var ARGS_SAVE.
1643 (build_array_ref): Delete unused var ITYPE.
1644 (c_expand_return): Delete unused var USE_TEMP.
1645
1646 * typeck.c (compexcepttypes): Delete unused arg STRICT.
1647 (comptypes): Fix calls.
1648 * decl.c (duplicate_decls): Likewise.
1649 * cp-tree.h (compexcepttypes): Delete extra arg.
1650
1651 * decl2.c (check_classfn): Delete unused second arg CNAME.
1652 * decl.c (start_decl, grokfndecl): Fix calls.
1653 * init.c (do_friend): Likewise.
1654 * cp-tree.h (check_classfn): Update prototype.
1655
1656 * cp-tree.h (signature_error, import_export_vtable,
1657 append_signature_fields, id_in_current_class, mark_used,
1658 copy_assignment_arg_p): Add decls.
1659 * decl2.c (mark_used): Delete decl.
1660
1661 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
1662
1663 * class.c (get_vtable_entry): Diable unused function.
1664 (doing_hard_virtuals): Delete unused static global var.
1665 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
1666 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
1667 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
1668 (modify_one_vtable): Delete unused var OLD_RTTI.
1669 (finish_struct_anon): Delete unused vars OFFSET and X.
1670 (finish_struct_bits): Delete unused var METHOD_VEC.
1671 (get_basefndecls): Delete unused var PURPOSE. Delete unused
1672 for-scope local variable METHODS.
1673
1674 * call.c (user_harshness): Delete unused/unneeded arg PARM.
1675 (ideal_candidate): Delete unused args BASETYPE and PARMS.
1676 (build_method_call): Delete unused args passed into ideal_candidate.
1677 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
1678 * cp-tree.h (synthesize_method): Add decl.
1679
1680 * decl.c (note_level_for_for): Give void return type.
1681 (pushdecl_nonclass_level): Likewise.
1682 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
1683 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
1684 (suspend_binding_level): Delete unused var LEVEL.
1685 (duplicate_decls): Delete unused var CTYPE.
1686 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
1687 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
1688 PTR_ENDLINK.
1689 (grokdeclarator): Delete unused var C.
1690 (grokdeclarator): Delete unused var SIZE_VARIES.
1691 (grokparms): Delete unused var SAW_VOID.
1692 (start_function): Delete unused var OLDDECL.
1693 (cplus_expand_expr_stmt): Delete unused var
1694 REMOVE_IMPLICIT_IMMEDIATELY.
1695
1696 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
1697
1698 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
1699
1700Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
1701
1702 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
1703 (build_min_nt): Ditto.
1704 * pt.c (do_pushlevel): Emit line note.
1705 (do_poplevel): Return what we get from poplevel.
1706 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
1707 * parse.y: Use do_pushlevel and do_poplevel.
1708 * cp-tree.h: Declare do_poplevel.
1709
1710 * cp-tree.h: Declare at_eof.
1711 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
1712 * decl2.c (import_export_decl): Renamed from import_export_inline.
1713 (finish_file): Call it to do interface handling for statics.
1714 * pt.c (tsubst_copy): Call mark_used on variables and functions
1715 used here.
1716
1717 * decl2.c (finish_file): Don't emit statics we can't generate.
1718 * pt.c (instantiate_decl): Don't set interface on instantiations
1719 we can't generate.
1720
1721 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
1722 * tree.c (print_lang_statistics): Print max template depth.
1723 * pt.c (push_tinst_level): Dump entire instantiation context.
1724 (instantiate_class_template): Use it and pop_tinst_level.
1725 (instantiate_decl): Ditto.
1726
1727 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
1728 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
1729
1730Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
1731
1732 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
1733 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
1734 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
1735 the new template implementation.
1736
1737Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1738
1739 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
1740
cffa8729
MS
1741Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
1742
1743 * decl.c (cp_finish_decl): Delay emitting the debug information for
1744 a typedef that has been installed as the canonical typedef, if the
1745 type has not yet been defined.
1746
1747Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
1748
1749 * decl2.c (grokfield): Still call pop_nested_class for access decls.
1750
1751Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1752
1753 * decl.c (lookup_label): Call label_rtx.
1754
1755 * decl.c (make_binding_level): New function.
1756 (pushlevel, pushlevel_class): Call it instead of explicit
1757 duplicate calls to xmalloc.
1758
1759 * decl.c (init_decl_processing): Delete useless build_pointer_type
1760 call.
1761
1762 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
1763 (sizet_ftype_string): Delete variable.
1764 (init_decl_processing): Add built-in functions fabsf, fabsl,
1765 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
1766 variable strlen_ftype, used for strlen.
1767
1768Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
1769
1770 * decl.c (push_to_top_level): Start from current_binding_level
1771 again for now; the stl hacks depend on g++ being broken in this
1772 way, and it'll be fixed in the template rewrite.
1773
1774 * tree.def: Add USING_DECL.
1775 * decl2.c (do_class_using_decl): Implement.
1776 (grokfield): Pass access decls off to do_class_using_decl instead of
1777 grokdeclarator.
1778 * error.c (dump_decl): Handle USING_DECLs.
1779 * decl.c (grokdeclarator): Remove code for handling access decls.
1780 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
1781 as access decls for now.
1782 (finish_struct): Don't check USING_DECLs for other uses of the name.
1783
1784 * search.c (get_matching_virtual): Use cp_error_at.
1785
1786Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1787
1788 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
1789 match c-typeck.c.
1790 (self_promoting_args_p): Move the check that TYPE is non-nil
1791 before trying to look at its main variant.
1792 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
1793
1794 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
1795 Delete macros.
1796 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
1797 (do_friend): Delete call to xref_friend.
1798 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
1799
1800 * typeck.c (convert_sequence): #if 0 unused function.
1801
1802 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
1803 be in decl_in_memory_p.
1804 (decl_in_memory_p): Delete decl.
1805 * expr.c (decl_in_memory_p): Delete fn.
1806 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
1807
1808 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
1809
1810Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
1811
1812 * class.c (finish_struct_1): Check for a pure-specifier on a
1813 non-virtual function here.
1814
1815 * decl2.c (grok_function_init): Don't check whether the function
1816 is virtual here.
1817 (grokfield): Don't call check_for_override here.
1818
1819 * decl.c (push_to_top_level): Start from inner_binding_level,
1820 check class_shadowed in class levels.
1821
1822Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
1823
1824 * decl.c (resume_level): Ignore things that don't have names, instead
1825 of core dumping.
1826
1827Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1828
1829 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
1830
1831Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
1832
1833 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
1834 synthesized dtor.
1835
1836 * parse.y (complete_type_name): Bind global_scope earlier.
1837 (complex_type_name): Ditto.
1838 (qualified_type_name): Remove.
1839
2ee887f2
MS
1840Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
1841
1842 * decl.c (grokfndecl): Move code that looks for virtuals in base
1843 classes...
cffa8729 1844 * class.c (check_for_override): ... to a new function.
2ee887f2
MS
1845 (finish_struct_1): Call it.
1846
1847 * cp-tree.h: Declare warn_sign_compare.
1848
1849 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
1850 rather than extra_warnings to decide whether to warn about
1851 comparison of signed and unsigned.
1852
1853 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
1854 implies -Wsign-compare. -Wall doesn't imply -W.
1855
1856Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
1857
1858 * typeck.c (build_component_ref): Fix to handle anon unions in base
1859 classes as well.
1860
1861Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1862
1863 * class.c (resolves_to_fixed_type_p): Delete code dealing with
1864 a WITH_CLEANUP_EXPR, since we don't generate them any more.
1865 * cvt.c (build_up_reference): Likewise.
1866 * decl.c (grok_reference_init): Likewise.
1867 (cp_finish_decl): Likewise.
1868 * error.c (dump_expr): Likewise.
1869 * tree.c (real_lvalue_p): Likewise.
1870 (lvalue_p): Likewise.
1871 (build_cplus_new): Likewise.
1872 (unsave_expr_now): Likewise.
1873 * typeck.c (unary_complex_lvalue, build_modify_expr,
1874 c_expand_return): Likewise.
1875
1876Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1877
1878 Make the C++ front-end pay attention to attributes for structures.
1879 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
1880 finish_struct_1.
1881 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
1882 Take out old round_up_size use and setting the DECL_ALIGN possibly
1883 using it. Take out setting of TYPE_ALIGN to round_up_size, which
1884 can override what the attribute set.
1885 * cp-tree.h (finish_struct): Update prototype.
1886 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
1887 attributes to finish_struct.
1888 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
1889 value down into finish_struct.
1890 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
1891
1892Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
1893
1894 * decl.c (poplevel): Re-word dead for local handling.
1895 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
1896 (cp_finish_decl): If is_for_scope, check for duplicates so
1897 we can disable is_for_scope. Otherwise, preserve_temp_slots.
1898
1899 * lex.c (do_identifier): Use global binding in preference of
1900 dead for local variable.
1901
1902Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
1903
1904 * init.c (initializing_context): Handle anon union changes, the
1905 context where fields of anon unions can be initialized now has to be
1906 found by walking up the TYPE_CONTEXT chain.
1907
1908Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
1909
1910 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
1911 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
1912 (obscure_complex_init): If bss is supported, always set
1913 DECL_INITIAL to error_mark_node.
1914
1915Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1916
1917 * init.c (is_friend): Make sure there's a context before we see if
1918 it's an aggr type.
1919
1920Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
1921
1922 * init.c (is_friend): Classes are not friendly with nested classes.
1923
1924Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
1925
1926 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
1927 and record its result.
1928
9e9ff709
MS
1929Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
1930
1931 * class.c (finish_struct_anon): Switch around code to not move anon
1932 union elements around, nor mess up their contexts, nor offsets,
1933 instead we now build up the right number of COMPONENT_REFs for all
1934 the anon unions that may be present at build_component_ref time.
1935 * typeck.c (lookup_anon_field): New routine to handle field lookup
1936 on fields without names. We find them, based upon their unique type
1937 instead.
1938 * typeck.c (build_component_ref): Allow FIELD_DECL components.
1939 Handle finding components in anonymous unions, and ensure that a
1940 COMPONENT_REF is built for each level as necessary.
1941
1942Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
1943
1944 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
1945 code that ensures that copy ctors are used if appropriate.
1946
1947Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1948
1949 * init.c (build_vec_delete): Only give an error if base isn't an
1950 error_mark_node.
1951
1952Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
1953
1954 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
1955 (yylex): If we see `new', keep slurping.
1956
1957Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
1958
1959 * class.c (finish_struct_1): Move code for handling anon unions...
1960 (finish_struct_anon): to here. Fixup so that we do the offset
1961 calculations right, and so that the fields are physically moved to
1962 the containers's chain.
1963
1964Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1965
1966 * decl.c (grokdeclarator): Avoid trying to get an operand off an
1967 identifier node.
1968
1969Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
1970
1971 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
1972 POINTER_SIZE to agree with expr.c.
1973
1974Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
1975
1976 * search.c (lookup_field): Don't report ambiguities if protect is 0,
1977 instead return NULL_TREE.
1978
1979Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
1980
1981 * class.c (finish_struct_1): Call warn_hidden if we want warnings
1982 about overloaded virtual functions.
1983 (warn_hidden): New routine to warn of virtual functions that are
1984 hidden by other virtual functions, that are not overridden.
1985 (get_basefndecls): New routine, used by warn_hidden.
1986 (mark_overriders): New routine, used by warn_hidden.
1987 * search.c (get_matching_virtual): Remove old warning that just
1988 isn't very useful.
1989
1990Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1991
1992 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
1993
1994 * typeck.c (null_ptr_cst_p): Delete unused fn.
1995 (build_function_call_maybe): Delete unused fn.
1996
1997 * expr.c (extract_init): #if 0 the code after unconditional return 0
1998 for now.
1999
2000 Delete old cadillac code.
2001 * edsel.c: Remove file.
2002 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
2003 * Makefile.in (CXX_OBJS): Delete edsel.o.
2004 (edsel.o): Delete rule.
2005 * cp-tree.h (flag_cadillac): Delete var decl.
2006 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
2007 * decl2.c (flag_cadillac): Delete var definition.
2008 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
2009 (grokfield): Delete code depending on flag_cadillac.
2010 (finish_anon_union): Likewise.
2011 * class.c (finish_struct_1): Likewise.
2012 (pushclass): Likewise.
2013 (popclass): Likewise.
2014 (push_lang_context): Likewise.
2015 (pop_lang_context): Likewise.
2016 * decl.c (init_decl_processing): Likewise.
2017 (start_decl): Likewise.
2018 (cp_finish_decl): Likewise.
2019 (xref_tag): Likewise.
2020 (finish_enum): Likewise.
2021 (start_function): Likewise.
2022 (finish_function): Likewise.
2023 (finish_stmt): Likewise.
2024 * lex.c (lang_init): Likewise.
2025 (check_newline): Likewise.
2026
2027 * lex.c (do_pending_inlines): Delete synthesized method kludge.
2028
2029 Delete defunct, ancient garbage collection implementation.
2030 * rtti.c: New file with the RTTI stuff from gc.c.
2031 * gc.c: Removed file (moved the remaining stuff into rtti.c).
2032 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
2033 (rtti.o): New rule, replacing gc.o.
2034 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
2035 * cp-tree.h: Delete gc-related fn decls.
2036 (DECL_GC_OFFSET): Delete macro.
2037 (flag_gc): Delete extern decl.
2038 * decl.c (current_function_obstack_index): Delete var decl.
2039 (current_function_obstack_usage): Delete var decl.
2040 (start_function): Delete clearing of current_function_obstack_index
2041 and current_function_obstack_usage.
2042 (init_decl_processing): Delete code relying on -fgc.
2043 Delete call to init_gc_processing.
2044 (cp_finish_decl): Delete calls to build_static_gc_entry and
2045 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
2046 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
2047 and to expand_expr of a __gc_main call.
2048 (maybe_gc_cleanup): Delete var decl.
2049 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
2050 * decl2.c (flag_gc): Delete var decl.
2051 (lang_f_options): Delete offering of -fgc.
2052 (lang_decode_option): Delete -fgc and -fno-gc handling.
2053 (get_temp_regvar): Delete gc code.
2054 * init.c (build_new): Delete gc code.
2055 * lex.c (init_lex): Delete checking of flag_gc.
2056
2057 * typeck.c (convert_arguments): Delete gc code.
2058 (build_component_addr): Delete -fgc warning.
2059 (build_modify_expr): Delete gc code.
2060
2061 * decl2.c (build_push_scope): Delete fn.
2062 * cp-tree.h (build_push_scope): Delete decl.
2063
2064 * search.c (clear_search_slots): Delete fn.
2065 * cp-tree.h (clear_search_slots): Delete decl.
2066
2067 * search.c (tree_needs_constructor_p): Delete fn.
2068 * cp-tree.h (tree_needs_constructor_p): Delete decl.
2069
2070 * tree.c (id_cmp): Delete fn.
2071
2072 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
2073 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
2074
2075 * tree.c (decl_value_member): Delete fn.
2076 * cp-tree.h (decl_value_member): Delete decl.
2077
2078 * tree.c (list_hash_lookup_or_cons): Delete fn.
2079 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
2080
2081 * method.c (cplus_exception_name): Delete fn.
2082 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
2083
2084 * spew.c (shift_tokens): Delete fn.
2085
2086Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2087
2088 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
2089 to cp_finish_decl.
2090 * parse.y: Ditto.
2091
2092Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2093
2094 * tree.c (build_cplus_staticfn_type): Delete function definition;
2095 never used.
2096 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
2097
2098 * tree.c (virtual_member): Delete function definition; never used.
2099 * cp-tree.h (virtual_member): Delete decl.
2100
45537677
MS
2101Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
2102
2103 * typeck.c (build_component_ref): Handle getting vbase pointers
2104 out of complex multiple inheritance better.
2105
2106Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
2107
2108 * typeck.c (build_object_ref): Make sure we use the real type, not
2109 any reference type.
2110
2111Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
2112
2113 * tree.c (build_exception_variant): Don't create new types if we
2114 don't have to, also build new types on the right obstack.
2115
2116Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
2117
2118 * decl.c (store_bindings): Split out from push_to_top_level.
9e9ff709
MS
2119 (push_to_top_level): Call it for b->type_shadowed on class binding
2120 levels.
45537677
MS
2121
2122Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
2123
2124 * search.c (expand_upcast_fixups): Fix so that offsets stored in
2125 vbase_offsets are always right. Fixes a problem where virtual base
2126 upcasting and downcasting could be wrong during conversions on this
2127 during virtual function dispatch at ctor/dtor time when dynamic
2128 vtable fixups for deltas are needed. This only sounds easier than
2129 it is. :-)
2130 (fixup_virtual_upcast_offsets): Change to reflect new calling
2131 convention for expand_upcast_fixups.
2132
2133Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2134
2135 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
2136 check that it's usable as the bitfield width.
2137
2138Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2139
2140 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
2141 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
2142 only ever used for functions in it.
2143
2144Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
2145
2146 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
2147 (nested_type): Ditto.
2148 (nested_name_specifier): Use lastiddecl.
2149
2150 * decl.c (grokdeclarator): Adjust accordingly.
2151 * init.c (expand_member_init): Ditto.
2152 * parse.y (base_class): Ditto.
2153 * typeck2.c (build_functional_cast): Ditto.
2154
2155 * typeck2.c (build_functional_cast): Fill in name after we've
2156 checked for non-aggr type.
2157
be99da77
MS
2158Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
2159
2160 * decl2.c (warn_pointer_arith): Default to on.
2161
2162Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
2163
2164 * lex.c (is_rid): New function.
2165 * decl.c (grokdeclarator): Diagnose reserved words used as
2166 declarator-ids.
2167
2168Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
2169
2170 * tree.c (get_decl_list): Don't lose cv-quals.
2171
2172 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
2173 typespecs used as declarator-ids.
2174
2175Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
2176
2177 * decl.c (poplevel): When poping a level, don't give a warning for
2178 any subblocks that already exist.
2179
2180Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2181
2182 * typeck.c (build_object_ref): Finish what I started.
2183
2184 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
2185
2186 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
2187
2188 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
9e9ff709 2189 scope.
be99da77
MS
2190
2191Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
2192
2193 * decl.c (xref_tag): Handle passing a type in directly.
2194
2195 * parse.y (qualified_type_name): Pull out the type.
2196 (nested_type): Ditto.
2197 Take types directly instead of as identifiers.
2198 * call.c (build_scoped_method_call): Take types directly instead of
9e9ff709
MS
2199 as identifiers.
2200 * decl.c (xref_basetypes): Ditto.
be99da77
MS
2201 * init.c (expand_member_init): Ditto.
2202 (build_member_call): Ditto.
2203 (build_offset_ref): Ditto.
2204 * typeck2.c (build_scoped_ref): Ditto, remove bogus code.
2205 * method.c (do_build_assign_ref): Ditto.
2206 * decl.c (grokdeclarator): Handle a type appearing as the
2207 declarator-id for constructors.
2208 * method.c (do_build_copy_constructor): current_base_init_list now
2209 uses the types directly, not their names.
2210 * init.c (sort_base_init): Ditto.
2211 (expand_member_init): Ditto.
2212 * init.c (is_aggr_type): New function, like is_aggr_typedef.
be99da77
MS
2213
2214Mon Jan 15 08:45:01 1996 Jeffrey A Law (law@cygnus.com)
2215
2216 * tree.c (layout_basetypes): Call build_lang_field_decl instead
2217 of build_lang_decl if first arg is a FIELD_DECL.
2218 (tree_copy_lang_decl_for_deferred_output): Reverse test for when
2219 to copy DECL_MAIN_VARIANT and DECL_CHAIN.
2220
2221Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2222
2223 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
2224 non-empty.
2225 * except.c (expand_start_catch_block): Set TREE_USED to avoid
2226 warnings about the catch handler.
2227
2228Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
2229
2230 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
9e9ff709 2231 expand_target_expr.
be99da77
MS
2232
2233Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2234
2235 Fix access control to use trees rather than integers.
2236 * class.c (access_{default, public, protected, private,
2237 default_virtual, public_virtual, private_virtual}_node): Add
2238 definitions.
2239 (init_class_processing): Do creation of those nodes.
2240 * cp-tree.h (access_type): Delete enum decl.
2241 (access_{default, public, protected, private, default_virtual,
2242 public_virtual, private_virtual}_node): Add decls.
2243 (compute_access): Change return type.
2244 * search.c (compute_access): Have tree return type, instead of enum.
2245 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
2246 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
2247 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
2248 * parse.y (VISSPEC): Make ttype rather than itype.
2249 (base_class_access_list): Likewise.
2250 * *.[cy]: Change all refs of `access_public' to `access_public_node',
2251 etc.
2252 * call.c (build_method_call): Make ACCESS be a tree.
2253 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
2254 * cvt.c (convert_to_aggr): Likewise.
2255 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
2256 Likewise.
2257 * method.c (hack_identifier): Likewise.
2258 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
2259
2260Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
2261
2262 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
2263 frontend, and make it more consistent with respect to
2264 warn_pointer_arith.
2265
2266Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
2267
2268 * decl.c (pushdecl): Check for duplicate parameter names.
2269
2270Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
2271
2272 * decl.c (expand_static_init): Call assemble_external for atexit.
2273
2274Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
2275
2276 * except.c (do_unwind): Remove some generated dead code.
2277 (eh_outer_context): New routine, factor out some common code from
2278 expand_builtin_throw and end_eh_unwinder. Add code to do return
2279 address masking for the PA.
2280 (expand_builtin_throw): Use eh_outer_context instead of open coding
2281 it here.
2282 (end_eh_unwinder): Ditto.
2283
2284Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
2285
2286 * except.c (expand_throw): Call assemble_external for __empty, if we
2287 use it.
2288
21451173
MS
2289Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
2290
2291 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
2292 NORMAL_RETURN_ADDR_OFFSET.
2293 (end_eh_unwinder): Ditto.
2294
2295Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
2296
2297 * gc.c (build_dynamic_cast): Make sure we don't cast away const
2298 when dealing with references, and make sure we handle dynamic
2299 casting to a cv qualified reference.
2300
2301Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
2302
2303 * except.c (struct eh_context): New structure top hold eh context
2304 information.
2305 (push_eh_context): New routine.
2306 (pop_eh_context): Ditto.
2307 * decl.c (push_cp_function_context): Use them.
2308 (pop_cp_function_context): Ditto.
2309
2310Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
2311
2312 * decl2.c (finish_file): Also prune uninteresting functions in the
2313 inline emission loop.
2314
2315Wed Dec 20 02:32:07 1995 Jeffrey A Law (law@cygnus.com)
2316
2317 * sig.c (build_signature_table_constructor): Mark functions
2318 in the signature as referenced.
2319
2320Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
2321
2322 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
2323 the inline emission stuff.
2324
72b7eeff
MS
2325Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
2326
2327 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
9e9ff709 2328 weak symbols.
72b7eeff
MS
2329 * lang-options.h: Add -f{no-,}weak.
2330 * decl.c (init_decl_processing): If the target does not support weak
2331 symbols, don't use them.
2332 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
2333
2334Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
2335
2336 * init.c (expand_member_init): warning for base init after members.
2337
2338Sun Dec 17 22:06:56 1995 Jeffrey A Law (law@cygnus.com)
2339
2340 * tree.c (tree_copy_lang_decl_for_deferred_output): Handle
2341 CONST_DECLs correctly.
2342
2343Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
2344
2345 * cvt.c (build_expr_type_conversion): Don't convert to a reference
2346 type.
2347
2348Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
2349
2350 * method.c (report_type_mismatch): Improve wording for volatile
2351 mismatches.
2352
2353Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
2354
2355 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
9e9ff709 2356 expand_assignment, as the later doesn't handle things that have
72b7eeff
MS
2357 copy constructors well. The compiler would do bitwise copying,
2358 instead of ctor calling in some cases.
2359
2360Wed Dec 13 17:05:54 PST 1995 Paul Eggert <eggert@twinsun.com>
2361
2362 * g++.c (my_strerror): Return "cannot access" if errno is 0.
2363 (pfatal_with_name, perror_exec): Don't assume that
2364 the returned value from my_strerror contains no '%'s.
2365 (concat): Remove.
2366 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
2367
2368Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
2369
2370 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
2371 TYPE_METHODS/TREE_CHAIN mean what they used to.
2372 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
2373 instead of TYPE_METHODS.
2374 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
2375 * tree.c (tree_copy_lang_decl_for_deferred_output): Ditto.
2376 * cp-tree.h (CLASSTYPE_METHODS): Lose.
2377 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
2378 TYPE_METHODS.
2379 (struct lang_decl): Lose next_method field.
2380 (DECL_NEXT_METHOD): Lose.
2381 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
2382 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
2383 anymore.
2384 (finish_struct_methods): Don't mess with the TREE_CHAINs in
2385 fn_fields.
2386
2387 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
2388 vector.
2389
2390 * call.c (build_method_call): Synthesize here even when not inlining.
2391 * typeck.c (build_function_call_real): Ditto.
2392
2393Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
2394
2395 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
2396 == DBX_DEBUG, call dbxout_start_new_source_file and
2397 dbxout_resume_previous_source_file when appropriate.
2398
2399Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
2400
2401 * except.c (start_anon_func): Push to the top level.
2402 (end_anon_func): Pop from the top level.
2403
2404Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
2405
2406 * cp-tree.h (build_cleanup): New routine to build cleanups.
2407 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
2408 call at ctor time and use atexit to run it later.
2409 * decl2.c (build_cleanup): New routine, taken from finish_file.
2410 (finish_file): Use build_cleanup instead, and don't put function
2411 local statics in global dtor list.
2412
2413Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
2414
2415 * except.c (expand_throw): Ensure that we have cleanups, if we try
2416 and expand cleanups.
2417
2418Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
2419
2420 * except.c (expand_throw): Add logic to manage dynamic cleanups for
2421 the EH object.
2422 (expand_end_catch_block): Use the magic of expand_goto, instead of
2423 emit_jump so that we get the cleanup for any catch clause parameter
2424 and the cleanup for the exception object. Update to reflect label
2425 changes.
2426 (push_eh_cleanup): New routine to register a cleanup for an
2427 exception object.
9e9ff709 2428 (empty_fndecl): Used to default cleanup actions to
72b7eeff
MS
2429 nothing.
2430 (init_exception_processing): Setup empty_fndecl. Setup
2431 saved_cleanup.
2432 (expand_start_catch_block): Update to reflect label changes. Call
2433 push_eh_object to register the cleanup for the EH object.
2434 (start_anon_func): New routine to start building lambda expressions
2435 from trees.
2436 (end_anon_func): New routine to end them.
2437 (struct labelNode): Change so that we can use tree labels, or rtx
2438 labels.
2439 (saved_cleanup): Object to check for dynamic cleanups for the
2440 exception handling object.
2441 (push_label_entry): Change so that we can use tree labels, or rtx
2442 labels.
2443 (pop_label_entry): Ditto.
2444 (top_label_entry): Ditto.
2445 (expand_start_all_catch): Use tree label instead of rtx label, so
2446 that we can get the magic of expand_goto.
2447 (expand_end_all_catch): Update to reflect label changes.
2448
2449 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
2450 use UNSAVE_EXPRs.
2451 typeck.c (get_member_function_from_ptrfunc): Remove remnants of
2452 building_cleanup logic, as we now use UNSAVE_EXPRs.
2453 * cp-tree.h (unsave_expr): Declare it.
2454 * decl.c (building_cleanup): Remove.
2455 (maybe_build_cleanup): Remove building_cleanup logic, and use
2456 UNSAVE_EXPR instead.
2457
2458Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
2459
2460 * gc.c (build_t_desc): Update error message to say <typeinfo>.
2461
2462Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2463
2464 * decl.c (pushdecl): Only warn about shadowing a local variable if
2465 warn_shadow is true.
2466
2467Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
2468
2469 * typeck.c (build_binary_op_nodefault): Added warning about
2470 comparisons between different enum types with -Wall, unless
2471 -fenum-int-equiv set.
2472
2473Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
2474
2475 * class.c (finish_struct_1): Skip down to the inner type in
2476 multidimensional arrays. Ensures ctors will be made for types that
2477 need constructing.
2478
2479Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
2480
2481 * decl.c (last_dtor_insn): New to track the last compiler generated
2482 insn in a dtor.
2483 (store_parm_decls): Set it.
2484 (finish_function): Use it to see if the dtor is empty. Avoid doing
2485 vtable setup all the time, if we can.
2486 (struct cp_function): Add last_dtor_insn.
2487 (push_cp_function_context): Save it.
2488 (pop_cp_function_context): Restore it.
2489
2490Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
2491
2492 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
9e9ff709 2493 warnings.
72b7eeff
MS
2494
2495Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
2496
2497 * typeck.c (expand_target_expr): Make sure targets get put into the
2498 current temp_slot_level, so that the free_temp_slots call will reuse
2499 them.
2500
2501Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
2502
2503 * class.c (finish_struct_1): Delay delta fixups for virtual bases
2504 until after we have done the hard virtuals, to avoid a bogus `every
2505 virtual function must have a unique final overrider' for virtual
2506 functions that are only overridden by hard virtuals.
2507
2508Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
2509
2510 * pt.c (do_function_instantiation): Don't try to find a file-scope
9e9ff709 2511 template for a member function.
72b7eeff
MS
2512
2513Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
2514
2515 * g++.c (main): Add handling of -nodefaultlibs.
2516
2517Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
2518
2519 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
2520 distinguish between direct bindings of reference variables, and
2521 indirect bindings of reference variables.
2522 * cvt.c (build_up_reference): Use it.
2523 * typeck.c (convert_arguments): Use it to indicate this is an
2524 indirect binding.
2525 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
2526 as they are unused.
e349ee73 2527 (expand_static_init): Ditto.
72b7eeff
MS
2528 (cplus_expand_expr_stmt): Ditto.
2529 * decl2.c (finish_file): Ditto.
2530 * init.c (perform_member_init): Ditto.
2531 (emit_base_init): Ditto.
2532 (expand_aggr_vbase_init_1): Ditto.
2533
2534Fri Nov 10 09:19:31 1995 Jeffrey A Law (law@cygnus.com)
2535
2536 * tree.c (tree_copy_lang_decl_for_deferred_output): Handle
2537 copying of DECL_ARGUMENTS field.
2538 (tree_copy_lang_type_for_deferred_output): Handle disgusting
2539 re-use of TYPE_LANG_SPECIFIC for pointer to member function
2540 type nodes.
2541
2542Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2543
2544 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
2545 get a DECL_LANG_SPECIFIC node.
2546 * cp-tree.h (lang_decl_flags): Add new member `level'.
2547 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
2548 decl_flags level member.
2549
2550Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2551
2552 * call.c (build_method_call): Make sure instance has a
2553 TYPE_LANG_SPECIFIC node before we dive into it.
2554
2555Sat Nov 4 20:01:52 1995 Jason Molenda (crash@phydeaux.cygnus.com)
2556
2557 * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
2558
2559Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
2560
2561 * decl.c (duplicate_decls): When smashing decls, smash staticness in
2562 the usual way.
2563
2564Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
2565
2566 * decl.c (poplevel): Handle the merging of subblocks of cleanups
2567 when finishing blocks that have already been created (usually due to
2568 the fixup goto code). Fixes bad debugging information.
2569
2570Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
2571
2572 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
2573 that's not a list of overloaded functions.
2574
2575Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2576
2577 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
2578 before trying to use DECL_ABSTRACT_VIRTUAL_P.
2579
2580Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
2581
2582 * decl2.c (mark_used): New function for hooking into setting of
2583 TREE_USED on decls.
2584 * call.c (build_method_call): Use it.
2585 * class.c (instantiate_type): Ditto.
2586 * init.c (build_offset_ref): Ditto. Don't call assemble_external
2587 for all like-named functions.
2588 * method.c (hack_identifier): Ditto.
2589 (emit_thunk): Don't call assemble_external.
2590 (make_thunk): Create thunk as a FUNCTION_DECL so that it
2591 gets the right mode and ENCODE_SECTION_INFO works.
2592
2593 * parse.y: Use mark_used. Pass operator names to do_identifier.
2594 * lex.c (do_identifier): Handle operator names.
2595
2596 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
2597
2598Thu Oct 26 20:58:59 1995 Jeffrey A Law (law@cygnus.com)
2599
2600 * cp/tree.c (tree_copy_lang_decl_for_deferred_output): Handle
2601 FIELD_DECLs and VAR_DECLs correctly.
2602
2603Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2604
2605 * errfn.c: Include stdio.h.
2606 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
2607
2608Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
2609
2610 * typeck2.c (digest_init): Always convert initializers to the
2611 right type.
2612
2613Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
2614
2615 * init.c (member_init_ok_or_else): Don't allow member initializers
2616 for indirect members, as it is invalid.
2617
2618Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2619
2620 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
2621
2622Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
2623
2624 * parse.y (for.init.statement): Catch compound statements inside for
2625 initializations, if we're being pedantic.
2626
2627Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
2628
2629 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
2630 looking for.
2631
2632Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
2633
2634 * error.c (dump_expr): Don't core dump when a boolean expression is
2635 used as a default argument.
2636
2637Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
2638
2639 * class.c (finish_struct_bits): Check aggregate_value_p instead of
9e9ff709 2640 RETURN_IN_MEMORY.
72b7eeff
MS
2641
2642Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
2643
2644 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
2645 BLKmode type that would otherwise be returned in registers.
2646
2647Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2648
2649 * g++.c (WITHLIBC): New macro.
2650 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
2651 saw_libc and pass it at the end if it was set.
2652
2653Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2654
2655 * parse.y (fn.def1): Call split_specs_attrs in
2656 declmods notype_declarator case.
2657
21451173 2658Sun Nov 26 14:47:42 1995 Richard Kenner <kenner@mole.gnu.ai.mit.edu>
1b898c06
MS
2659
2660 * Version 2.7.2 released.
2661
2662Mon Nov 20 14:05:00 1995 Mike Stump <mrs@cygnus.com>
2663
2664 * g++.c (pfatal_with_name): Add missing third argument to concat.
2665
e7843f33
MS
2666Thu Oct 26 13:59:54 1995 Mike Stump <mrs@cygnus.com>
2667
2668 * init.c (expand_aggr_init): Handle cv qualifiers on the object's
2669 type.
2670
21451173 2671Sat Nov 11 08:25:55 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
07674418
MS
2672
2673 * Version 2.7.1 released.
2674
2675Thu Nov 2 17:02:47 1995 Jason Merrill <jason@yorick.cygnus.com>
2676
2677 * call.c (convert_harshness): Handle references to arrays.
2678
2679Fri Oct 27 14:20:21 1995 Jason Merrill <jason@yorick.cygnus.com>
2680
2681 * typeck.c (comp_target_types): Check multi-level pointer
2682 conversions in both directions.
2683
2684Tue Oct 17 21:39:05 1995 Jason Merrill <jason@yorick.cygnus.com>
2685
2686 * parse.y (explicit_instantiation): Fix 'extern template' with no
2687 return type.
2688
2689Mon Oct 16 14:35:20 1995 Jason Merrill <jason@yorick.cygnus.com>
2690
2691 * parse.y (explicit_instantiation): Support automatic instantiation
2692 of constructors.
2693 (named_class_head_*): Support out-of-class definition of nested
2694 types.
2695
f30432d7
MS
2696Wed Oct 11 12:20:56 1995 Mike Stump <mrs@cygnus.com>
2697
2698 * search.c (envelope_add_decl): New routine. Fix so that
2699 methods are hidden in the same way that other members are.
2700 (dfs_pushdecls): Cleanup and move functionality out of line,
2701 into envelope_add_decl.
2702
2703Tue Oct 10 15:46:01 1995 Mike Stump <mrs@cygnus.com>
2704
2705 * typeck.c (mark_addressable): Only call assemble_external if we
2706 have started the output file.
2707
2708Tue Oct 10 11:27:18 1995 Jason Merrill <jason@yorick.cygnus.com>
2709
2710 * decl.c (start_function): Fix earlier cv-quals change.
2711
2712Mon Oct 9 23:53:05 1995 Mike Stump <mrs@cygnus.com>
2713
2714 * parse.y (complex_direct_notype_declarator): Only push the class if
2715 we are not already in the class.
2716
2717Mon Oct 9 11:22:03 1995 Doug Evans <dje@canuck.cygnus.com>
2718
2719 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
2720 Update olddecl's attributes too.
2721 (grokdeclarator): #if 0 out call to build_decl_attribute_variant.
2722 * typeck.c (common_type): Call merge_machine_type_attributes.
2723
2724Fri Oct 6 14:44:27 1995 Mike Stump <mrs@cygnus.com>
2725
2726 * typeck.c (mark_addressable): Add missing call to
2727 assemble_external.
2728
2729Wed Oct 4 22:05:23 1995 Jeff Law (law@hurl.cygnus.com
2730
2731 * cp/decl.c (deplicate_decls): Merge in deferred output
2732 status for variables.
2733 * cp/tree.c (tree_copy_lang_decl_for_deferred_output): New
2734 function to copy the g++ specific parts of a DECL node.
2735 (tree_copy_lang_type_for_deferred_output): Similarly for
2736 TYPE nodes.
2737
2738Wed Oct 4 15:06:39 1995 Mike Stump <mrs@cygnus.com>
2739
2740 * decl.c (store_parm_decls): Make sure the unwinder start comes
2741 before the exception specification start.
2742 * except.c (expand_exception_blocks): Make sure the unwinder end
2743 comes after the terminate protected catch clause region and after
2744 the end of the exception specification region.
2745
2746Wed Oct 4 12:47:02 1995 Jason Merrill <jason@yorick.cygnus.com>
2747
2748 * lex.c (real_yylex): Fix identifier case for linemode.
2749 (handle_sysv_pragma): Don't abort when we see a pragma we don't
2750 recognize.
2751
2752Tue Oct 3 14:09:46 1995 Mike Stump <mrs@cygnus.com>
2753
2754 * decl.c (store_parm_decls): Add a call to start_eh_unwinder.
2755 * except.c (init_exception_processing): __throw doesn't take any
2756 arguments.
2757 (expand_builtin_throw): Ditto. Always use Pmode, instead of SImode
2758 for all pointers. Use expand_builtin_return_addr to unwind the
2759 first level off the stack.
2760 (do_unwind): Always use Pmode, instead of SImode for all pointers.
2761 (expand_exception_blocks): Add a call to end_eh_unwinder.
2762 (start_eh_unwinder, end_eh_unwinder): New routines to build machine
2763 independent stack unwinders for function/method calls.
2764
2765Mon Oct 2 17:20:42 1995 Mike Stump <mrs@cygnus.com>
2766
2767 * tree.c (unsave_expr_now): Make sure we process the argument list
2768 of any called functions. Fixes incorrect code generation for
2769 cleanups.
2770
2771Mon Oct 2 13:04:16 1995 Mike Stump <mrs@cygnus.com>
2772
2773 * typeck.c (get_member_function_from_ptrfunc): Save function if it
2774 needs it. Cures core dump on things like (this->*(f()))().
2775
2776Sat Sep 23 22:51:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2777
2778 * decl.c (start_function): Conform to gcc cv-quals convention (no
2779 expression has a cv-qualified type) in RESULT_DECLs.
2780 * method.c (make_thunk): Ditto.
2781
2782Fri Sep 22 10:21:13 1995 Mike Stump <mrs@cygnus.com>
2783
2784 * decl.c (pushtag): Add in the namespace name for the tag.
2785
2786Thu Sep 21 13:11:13 1995 Mike Stump <mrs@cygnus.com>
2787
2788 * parse.y (maybe_base_class_list, base_class_list, base_class,
2789 base_class_access_list): Make sure we see the typenames for base
2790 classes.
2791 * lex.c (see_typename): Instead of failing to see a typename when
2792 there is no next token, perfer a typename, and get the next token.
2793
2794Wed Sep 20 12:35:27 1995 Michael Meissner <meissner@cygnus.com>
2795
2796 * decl.c (init_decl_processing): Add __builtin_expect.
2797
2798Tue Sep 19 16:48:11 1995 Mike Stump <mrs@cygnus.com>
2799
2800 * cvt.c (cp_convert_to_pointer): Don't allow leftover conversions to
2801 or from pointer to member functions, they must all be handled before
2802 this point.
2803
2804Fri Sep 15 17:14:47 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2805
2806 * init.c (resolve_offset_ref): Fix wording of non-static member
2807 being referenced as a static.
2808
2809Fri Sep 15 12:39:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2810
2811 * typeck.c (build_indirect_ref): Only bash pointer if we actually
2812 call build_expr_type_conversion.
2813
2814Thu Sep 14 18:24:56 1995 Jason Merrill <jason@deneb.cygnus.com>
2815
2816 * cvt.c (build_expr_type_conversion): Handle conversion from
2817 reference.
2818 * typeck.c (build_indirect_ref): Avoid infinite recursion.
2819
2820Thu Sep 14 17:23:28 1995 Mike Stump <mrs@cygnus.com>
2821
2822 * decl.c (expand_start_early_try_stmts): New routine to start a try
2823 block at the start of the function, for function-try-blocks.
2824 * cp-tree.h (expand_start_early_try_stmts): Declare it.
2825 * parse.y (function_try_block): Use it, instead of doing it here, as
2826 we don't want to include rtl.h here, as that conflicts with RETURN
2827 in the parser.
2828
2829Wed Sep 13 18:32:24 1995 Mike Stump <mrs@cygnus.com>
2830
2831 * lex.c (reinit_parse_for_block): Support saving inline
2832 function-try-blocks, uses peekyylex.
2833 * parse.y (eat_saved_input): New rule, permit the parser to see that
2834 END_OF_SAVED_INPUT is ok, as it can see this when parsing the
2835 handlers of a function-try-block.
2836 (fndef): Use it.
2837 (component_decl): Make sure TRY and RETURN can come after fn.def2.
2838 * spew.c (peekyylex): New routine to peek at what will come next.
2839
cf54380f
JM
2840Wed Sep 13 16:52:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2841
f30432d7 2842 * typeck.c (comptypes): Tighten up comparisons of template type
9e9ff709 2843 parms.
f30432d7 2844
cf54380f
JM
2845 * decl.c (duplicate_decls): Turn off whining about virtual functions
2846 redeclared inline for now.
2847
f30432d7
MS
2848Wed Sep 13 11:13:40 1995 Mike Stump <mrs@cygnus.com>
2849
2850 * decl.c (store_in_parms): New routine to put things before we
2851 put base inits.
2852 * cp-tree.h (store_in_parms): Declare it.
2853 * decl.c (store_parm_decls): Use it to makr sure the starting of the
2854 eh spec comes before base inits.
2855 (finish_function): Use sequences instead of the obsolete
2856 reorder_insns.
2857 * parse.y (fndef): Enhance readability and maintainability. Update
2858 to include function_try_block syntax.
2859 (function_try_block): Add.
2860
2861Tue Sep 12 17:43:07 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2862
2863 * call.c (convert_harshness): Use comptypes, not ==, to check if
2864 TYPE and PARMTYPE are equivalent on a function type.
2865
2453e8d1
DR
2866Tue Sep 12 17:31:33 1995 Douglas Rupp (drupp@cs.washington.edu)
2867
2868 * Make-lang.in (cc1plus) : Removed unnecessary $(exeext).
2869
f30432d7
MS
2870Mon Sep 11 23:24:07 1995 Mike Stump <mrs@cygnus.com>
2871
2872 * except.c (expand_throw): Never allocate storage for thrown pointer
2873 to objects.
2874
2875Mon Sep 11 19:36:45 1995 Mike Stump <mrs@cygnus.com>
2876
2877 * except.c (expand_start_catch_block): Pointers to objects come
2878 back from catch matching already dereferenced, don't dereference
2879 again.
2880
2881Mon Sep 11 15:46:28 1995 Mike Stump <mrs@cygnus.com>
2882
2883 * except.c (expand_throw): Only decay the throw expression, don't do
2884 any default conversions. This is so that one can throw and catch
2885 characters, and not have them match integers.
2886
2887Mon Sep 11 13:46:45 1995 Mike Stump <mrs@cygnus.com>
2888
2889 * error.c (dump_aggr_type): Deal with anonymous unions that don't
2890 have a TYPE_NAME.
2891
38267a70
BK
2892Fri Sep 8 20:40:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2893
2894 * lex.c (handle_sysv_pragma): Deal with getting a comma from yylex.
2895
f30432d7
MS
2896Fri Sep 8 15:51:41 1995 Mike Stump <mrs@cygnus.com>
2897
2898 * except.c (expand_end_eh_spec): Handle empty EH specifications.
2899
2900Fri Sep 8 15:27:22 1995 Mike Stump <mrs@cygnus.com>
2901
2902 * cp-tree.h (expand_start_eh_spec): Declare new routine.
2903 (expand_end_eh_spec): Ditto.
2904 * decl.c (store_parm_decls): Call expand_start_eh_spec to process
2905 exception specifications.
2906 * except.c (expand_leftover_cleanups): Remove unused parameter.
2907 (expand_end_catch_block): Ditto.
2908 (expand_exception_blocks): Ditto.
2909 (expand_start_eh_spec): New routine to mark the start of an
2910 exception specification region.
2911 (expand_end_eh_spec): New routine to mark the end of an exception
2912 specification region.
2913 (expand_exception_blocks): Call expand_end_eh_spec to process
2914 exception specifications.
2915
b37d04bc
PB
2916Fri Sep 8 14:40:48 1995 Per Bothner <bothner@kalessin.cygnus.com>
2917
2918 * lex.c (do_identifier): Use global binding in preference of
2919 dead for local variable.
2920
f30432d7
MS
2921Wed Sep 6 19:32:59 1995 Mike Stump <mrs@cygnus.com>
2922
2923 * cp-tree.h (build_exception_variant): Remove used first argument.
2924 * decl.c (duplicate_decls): Ditto.
2925 (grokfndecl): Ditto.
2926 (revert_static_member_fn): Ditto.
2927 * decl2.c (grok_method_quals): Ditto.
2928 * tree.c (build_exception_variant): Ditto.
2929 * typeck.c (common_type): Ditto.
2930 * decl2.c (grokclassfn): After changing the type, call
2931 build_exception_variant, if necessary.
2932
2933Tue Sep 5 15:56:27 1995 Mike Stump <mrs@cygnus.com>
2934
2935 * except.c (expand_throw): Run cleanups for the throw expression.
2936
2937Wed Aug 30 15:24:38 1995 Stephen L. Favor (sfavor@tigger.intecom.com)
2938
2939 * except.c (expand_builtin_throw): Moved gen_label_rtx calls beyond
2940 the store_parm_decls call which does initialization in the emit_*
2941 code concerning label numbering.
2942
2943Thu Aug 31 09:01:07 1995 Mike Stump <mrs@cygnus.com>
2944
2945 * except.c (expand_internal_throw): Let the frontend be responsible
2946 for managing all frontend EH parameters, the backend routine only
2947 needs to deal with backend values. type and value are no longer
2948 passed to __throw.
2949 (init_exception_processing): Ditto.
2950 (expand_start_all_catch): Ditto.
2951 (expand_end_all_catch): Ditto.
2952 (expand_leftover_cleanups): Ditto.
2953 (expand_end_catch_block): Ditto.
2954 (expand_builtin_throw): Ditto.
2955 (expand_throw): Ditto.
2956
2957Tue Aug 29 15:04:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2958
2959 * cp-tree.h (DECL_REAL_CONTEXT): Give the real declaration context
2960 for a decl.
2961 * decl.c (cp_finish_decl): Use it.
2962
2963Tue Aug 29 10:30:27 1995 Mike Stump <mrs@cygnus.com>
2964
2965 * except.c (expand_internal_throw): Oops, almost forgot type and
2966 value are now trees.
2967
2968Mon Aug 28 17:57:45 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
2969
2970 Fix the attribute handling to make sure they get noted before we
2971 create the function's RTL, in case they can affect that.
2972 * decl.c (grokfndecl): New arg ATTRLIST. Run
2973 cplus_decl_attributes before creating the decl's rtl.
2974 (grokdeclarator): New arg ATTRLIST, passed down into grokfndecl.
2975 (shadow_tag, groktypename, start_decl, start_method): Pass a
2976 NULL_TREE to grokdeclarator's new last arg.
2977 * decl2.c (grokfield): New arg ATTRLIST, passed into grokdeclarator.
2978 (grokbitfield, grokoptypename): Pass a NULL_TREE to
2979 grokdeclarator's new last arg.
2980 * except.c (expand_start_catch_block): Likewise.
2981 * pt.c (process_template_parm, end_template_decl,
2982 do_function_instantiation): Likewise.
2983 * cp-tree.h (grokfield): Add arg.
2984 (grokdeclarator): Move the prototype from here...
2985 * decl.h: ...to here.
2986 * lex.c (cons_up_default_function): Pass NULL_TREE to grokfield
2987 ATTRLIST argument.
2988 * parse.y: Create a list for the grokfield arg where appropriate,
2989 and pass it down instead of calling cplus_decl_attributes.
2990
2991Mon Aug 28 15:07:24 1995 Mike Stump <mrs@cygnus.com>
2992
2993 * except.c: Always allow turning on exception handling. Allow cross
2994 compilations to use EH.
2995
2996Thu Aug 24 17:39:24 1995 Mike Stump <mrs@cygnus.com>
2997
2998 * except.c (saved_pc, saved_throw_type, saved_throw_value): Use
2999 trees, instead of rtxs, and don't depend on using special machine
3000 dependent registers.
3001 (expand_internal_throw): Ditto.
3002 (init_exception_processing): Ditto.
3003 (expand_start_all_catch): Ditto.
3004 (expand_end_all_catch): Ditto.
3005 (expand_start_catch_block): Ditto.
3006 (expand_leftover_cleanups): Ditto.
3007 (expand_end_catch_block): Ditto.
3008 (expand_builtin_throw): Ditto.
3009 (expand_throw): Ditto.
3010
3011Wed Aug 23 17:25:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3012
3013 * cvt.c (build_expr_type_conversion): Handle conversions to
3014 reference types.
3015
3016Wed Aug 23 15:33:59 1995 Mike Stump <mrs@cygnus.com>
3017
3018 * except.c (do_unwind): Work around backend bug with -fpic.
3019
fb409a19
PB
3020Tue Aug 22 17:20:07 1995 Per Bothner <bothner@kalessin.cygnus.com>
3021
3022 * decl2.c (flag_new_for_scope): Add a new mode that follows ANSI
3023 for-scoping, but supports (and warns about) old programs.
3024 Make the new mode (with value 1) the default.
3025 (lang_f_options): The on-value for flag_new_for_scope is now 2.
3026 * cp-tree.h (DECL_DEAD_FOR_LOCAL, DECL_ERROR_REPORTED): New macros
3027 (DECL_SHADOWED_FOR_VAR): Likewise.
3028 * decl.c (struct binding_level): New fields dead_vars_from_for
3029 and is_for_scope.
3030 (note_level_for_for): New function.
3031 (poplevel): Special processing if is_for_scope.
3032 (pushdecl): Warn if for-scope variable shadows local.
3033 * lex.c (do_identifier): Handle old (non-ANSI) for scoping,
3034 and warn if conflicts.
3035 * parse.y (FOR): Call note_level_for_for.
3036
f30432d7
MS
3037Mon Aug 21 10:28:31 1995 Jason Merrill <jason@deneb.cygnus.com>
3038
3039 * decl2.c (import_export_inline): Class interface hackery does not
3040 apply to synthesized methods.
3041
3042Sun Aug 20 16:29:00 1995 Mike Stump <mrs@cygnus.com>
3043
3044 * search.c (virtual_context): Find the right context more often.
3045 Solves a `recoverable compiler error, fixups for virtual function'
3046 problem.
3047
3048Sun Aug 20 13:53:24 1995 Mike Stump <mrs@cygnus.com>
3049
3050 * except.c (expand_start_all_catch): Ensure that we always transfer
3051 control to the right EH handler, by rethrowing the end label on the
3052 region, instead of hoping we are nested and falling through.
3053 (expand_leftover_cleanups): Ditto.
3054 (end_protect): Since we now rethrow the end label, put a
3055 nop after it, so that outer regions are recognized.
3056 * init.c (build_vec_delete_1): New routine to handle most of vector
3057 deleting, all code moved here from build_vec_delete.
3058 (build_array_eh_cleanup): Use build_vec_delete_1 to do all the real
3059 work.
3060 (expand_vec_init): If the array needs partial destructing, setup an
3061 EH region to handle it.
3062 (build_vec_delete): Move lots of code to build_vec_delete_1, use
3063 build_vec_delete_1 to do the grunt work.
3064
3065Sat Aug 19 14:25:33 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
3066
3067 Handle decl attributes properly for function definitions without
3068 previous attribute-loaded declarations.
3069 * decl.c (start_function): New arg ATTRS. Add a call to
3070 cplus_decl_attributes with it before we create the RTL.
3071 * cp-tree.h (start_function): Update prototype.
3072 * parse.y (fn.def1): Pass ATTRS into start_function instead of
3073 trying to call cplus_decl_attributes too late. Pass a NULL_TREE
3074 for other use.
3075 * decl2.c (finish_file): Pass NULL_TREE as fourth arg to
3076 start_function.
3077 * method.c (synthesize_method): Likewise.
3078 * except.c (expand_builtin_throw): Likewise for start on __throw.
3079
3080Sat Aug 19 13:36:08 1995 Mike Stump <mrs@cygnus.com>
3081
3082 * class.c (set_rtti_entry): Turn on -fvtable-thunk -frtti support.
3083 This changes -fvtable-thunks vtable layout, so a recompile will be
3084 necessary, if you use -fvtable-thunks.
3085 (get_vtable_entry): Use n, instead of i to be consistent with the
3086 rest of the compiler.
3087 (get_vtable_entry_n): Ditto.
3088 (add_virtual_function): Add a slot for the tdesc, if -fvtable-thunks
3089 are being used.
3090 (finish_struct_1): Ditto.
3091 (skip_rtti_stuff): New routine to collapse similar code from many
3092 different parts of the compiler. I think I got them all.
3093 (modify_one_vtable): Use it.
3094 (fixup_vtable_deltas1): Ditto.
3095 (override_one_vtable): Ditto.
3096 * decl2.c (mark_vtable_entries): Ditto.
3097 * tree.c (debug_binfo): Ditto.
3098 * search.c (expand_upcast_fixups): Ditto.
3099 (get_abstract_virtuals_1): Ditto. Use virtuals, instead of tmp to
3100 consistent with the rest of the compiler.
3101 (get_abstract_virtuals): Ditto.
3102 * cp-tree.h (skip_rtti_stuff): New routine, declare it.
3103 * gc.c (build_headof): Support -fvtable-thunk and -frtti together.
3104 (build_typeid): Ditto.
3105 (build_classof): Remove old style way of doing rtti. Remove support
3106 for `classof' and `headof'.
3107 * gxx.gperf: Ditto.
3108 * hash.h: Ditto.
3109 * parse.y: Ditto.
3110
3111Fri Aug 18 17:31:58 1995 Jason Merrill <jason@deneb.cygnus.com>
3112
3113 * decl.c (start_function): Clear ctor_label and dtor_label.
3114
3115 * class.c (finish_struct_1): Fix handling of access decls.
3116
3117Tue Aug 15 19:21:54 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3118
3119 * class.c (finish_struct): Only do minimal processing here, so it
3120 can be used for class template definitions, as well.
3121 (finish_struct_1): New function with the rest of the code.
3122
3123Tue Aug 15 09:46:16 1995 Mike Stump <mrs@cygnus.com>
3124
3125 * class.c (prepare_fresh_vtable): On second though, always build the
3126 offset (see Aug 10 change), unless -fvtable-thunks is given. It
3127 does this by calling the new routine set_rtti_entry.
3128 (finish_struct): Ditto.
3129 (set_rtti_entry): New routine to update the rtti information at the
3130 start of the vtable.
3131
3132Mon Aug 14 12:21:22 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
3133
3134 * error.c (dump_decl, case IDENTIFIER_NODE): Only work on a dtor
3135 if it's declared in the C++ language spec.
3136 (dump_function_decl): Likewise.
3137 (dump_function_name): Likewise.
3138 (ident_fndecl): Make sure we got something back from lookup_name.
3139 * decl.c (start_function): Likewise.
3140
3141Fri Aug 11 16:52:15 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3142
3143 * call.c (build_method_call): Don't call build_new when calling a
3144 constructor without an instance.
3145
3146Thu Aug 10 20:00:17 1995 Mike Stump <mrs@cygnus.com>
3147
3148 * class.c (prepare_fresh_vtable): Always build the offset to the
3149 complete object, as it doesn't cost much. This allows dynamic_cast
3150 to void * to work when -frtti isn't given.
3151 (finish_struct): Ditto.
3152
3153Thu Aug 10 16:31:28 1995 Mike Stump <mrs@cygnus.com>
3154
3155 * except.c (build_eh_type): Split out some functionality to new
3156 routine named build_eh_type_type.
3157 (build_eh_type_type): New routine.
3158 (expand_start_catch_block): Use build_eh_type_type, as we never want
3159 the dynamic type of the catch parameter, just the static type.
3160 Fixes core dumps when -frtti is used and one catchs pointers to
3161 classes.
3162
3163Thu Aug 10 14:55:29 1995 Mike Stump <mrs@cygnus.com>
3164
3165 * except.c (expand_builtin_throw): Since we now use normal calling
3166 conventions for __throw, we have to remove the first layer off the
3167 stack, so that the next context we search for handlers is the outer
3168 context instead of the context that had the call to __throw, if we
3169 don't immediately find the desired context.
3170
3171Tue Aug 8 17:44:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3172
3173 * tree.c (cp_expand_decl_cleanup): Returns int, not tree.
3174 * cp-tree.h: Update.
3175
3176 * parse.y (template_type_parm): Add support for `typename'.
3177
3178Tue Aug 8 12:06:31 1995 Mike Stump <mrs@cygnus.com>
3179
3180 * except.c (expand_internal_throw): New internal routine to throw a
3181 value.
3182 (expand_end_all_catch, expand_leftover_cleanups): All throwers
3183 changed to use `expand_internal_throw' instead of jumping to throw
3184 label.
3185 (expand_end_catch_block, expand_throw): Ditto.
3186 (throw_label): Removed.
3187 (expand_builtin_throw): Changed so that EH parameters are passed by
3188 normal function call conventions. Completes Aug 4th work.
3189
3190Fri Aug 4 17:17:08 1995 Mike Stump <mrs@cygnus.com>
3191
3192 * cp-tree.h (expand_builtin_throw): Declare it.
3193 * decl2.c (finish_file): Call expand_builtin_throw.
3194 * except.c (make_first_label): Remove.
3195 (init_exception_processing): Don't use a LABEL_REF for throw_label,
3196 instead use a SYMBOL_REF, this is so that we don't use LABEL_REFs in
3197 other functions that don't really appear in those functions. This
3198 solves a problem where cc1plus consumed exponential amounts of
3199 memory when -Wall was used.
3200 (expand_end_all_catch, expand_leftover_cleanups,
3201 expand_end_catch_block, expand_throw): Change all uses of
3202 throw_label to match new style.
3203 (do_unwind): Rename parameter to inner_throw_label, as it is now
3204 different from throw_label. Also, assume that our caller will wrap
3205 the passed label with a LABEL_REF, if needed.
3206 (expand_builtin_throw): Make external, change so that the generated
3207 throw is now a real function.
3208 (expand_exception_blocks): Never generate throw code inside another
3209 function.
3210
3211Fri Aug 4 12:20:02 1995 Mike Stump <mrs@cygnus.com>
3212
3213 * decl.c (grokdeclarator): Move checking of mutable const objects
3214 and mutable static objects down, as we might decide during parsing
3215 to unset staticp or constp (for example, when const is part of the
3216 object being pointed to).
3217
3218Thu Aug 3 17:13:43 1995 Mike Stump <mrs@cygnus.com>
3219
3220 * except.c (output_exception_table_entry): Enhance portability to
3221 weird machines.
3222 (emit_exception_table): Ditto.
3223
3224Thu Aug 3 16:41:38 1995 Mike Stump <mrs@cygnus.com>
3225
3226 * typeck.c (build_ptrmemfunc): Handle casting of pointer to
3227 non-virtual member functions.
3228
3229Wed Aug 2 11:58:25 1995 Mike Stump <mrs@cygnus.com>
3230
3231 * gc.c (build_typeid): Strip cv qualifiers so that const T&, T&, T
3232 and const T all match.
3233
3234Wed Aug 2 11:25:33 1995 Mike Stump <mrs@cygnus.com>
3235
3236 * except.c (build_eh_type): Strip cv qualifiers so that const T&,
3237 T&, T and const T all match.
3238
3239Tue Aug 1 14:20:16 1995 Mike Stump <mrs@cygnus.com>
3240
3241 * except.c: Fix up comments, cleanup code and eliminate exceptNode,
3242 exceptStack, exceptstack, push_except_stmts, pop_except_stmts,
3243 new_except_stack, push_last_insn, pop_last_insn, insn_save_node and
3244 InsnSave. Also, numerous speed improvements, and correctness
3245 improvements. Double faulting in all situations should now be
3246 handled correctly.
3247 (expand_start_all_catch): Instead of having many terminate protected
3248 regions, just have one.
3249 (expand_start_catch_block): No longer have to protect
3250 false_label_rtx, as it isn't used for EH region marking.
3251 (expand_end_catch_block): Expand out EH cleanups here by using
3252 expand_leftover_cleanups.
3253 (expand_end_all_catch): Use sequences instead of playing with insn
3254 links directly.
3255 (expand_exception_blocks): Ditto. Also protect all catch clauses
3256 with one terminate region.
3257
3258Mon Jul 31 13:24:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3259
3260 * method.c (report_type_mismatch): Don't talk about an object
3261 parameter for non-methods.
3262
3263Sun Jul 30 13:13:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3264
3265 * class.c (finish_struct): Catch private and protected members of
3266 anonymous unions here.
3267 * decl2.c (finish_anon_union): And here.
3268 * parse.y: Instead of here.
3269
3270 * errfn.c (ARGSLIST): Support passing four args.
3271 * error.c (cv_as_string): New function.
3272 (cp_printers): Add it.
3273 * call.c (build_method_call): Report 'const' at end of pseudo-decl.
3274
3275 * method.c (report_type_mismatch): Deal with a bad_arg of 0.
3276
3277 * init.c (expand_aggr_init): Handle volatile objects, too.
3278
3279Sat Jul 29 13:42:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3280
3281 * decl.c (struct binding_level): Keep list of incomplete decls.
3282 (print_binding_level): Use list_length to count them.
3283 (pushdecl): Build up the list.
3284 (hack_incomplete_structures): Walk it and prune completed decls.
3285
3286Fri Jul 28 15:26:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3287
3288 * typeck.c (comp_target_types): Don't check const and volatile for
3289 function types.
3290 (comp_ptr_ttypes_real): Ditto.
3291
3292Thu Jul 27 15:40:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3293
3294 * typeck.c (comp_target_types): Fix.
3295
3296Thu Jul 27 15:10:48 1995 Mike Stump <mrs@cygnus.com>
3297
3298 * cp-tree.h (unsave_expr_now, build_unsave_expr,
3299 cp_expand_decl_cleanup): Declare new routines.
3300 * decl.c (cp_finish_decl, store_parm_decls,
3301 hack_incomplete_structures): Change all cals from
3302 expand_decl_cleanup to cp_expand_decl_cleanup.
3303 * gc.c (protect_value_from_gc): Ditto.
3304 * expr.c (cplus_expand_expr): Handle UNSAVE_EXPRs.
3305 * tree.c (unsave_expr): New routine to build an UNSAVE_EXPR.
3306 (unsave_expr_now): Backend routine used by tree expander.
3307 (cp_expand_decl_cleanup): Wrap second argument in an UNSAVE_EXPR to
3308 work around a limitation in the backend. The backend uses the
3309 cleanups multiple times, on disjoint control flows, so we cannot
3310 pass unsaved SAVE_EXPRs to the backend.
3311 * tree.def (UNSAVE_EXPR): New tree code.
3312 * typeck.c (c_expand_return): Move goto/return code up inside
3313 conditional, as we don't always want to do this, we only want to do
3314 this when we don't otherwise finish with this control flow.
3315
3316Thu Jul 27 10:38:43 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
3317
3318 * parse.y (typespec): Only complain about typeof if we're not
3319 getting it from a system header.
3320
3321Thu Jul 27 10:26:23 1995 Doug Evans <dje@canuck.cygnus.com>
3322
3323 Clean up prefix attribute handling.
3324 * parse.y (reserved_declspecs): Link prefix attributes with declspecs.
3325 (declmods): Likewise.
3326 (all rules that reference typed_declspecs and declmods): Call
3327 split_specs_attrs or strip_attrs to separate declspecs and attrs.
3328 (lang_extdef): Delete resetting of prefix_attributes.
3329 (template_def, notype_declarator rule): Use NULL_TREE for
3330 prefix_attributes.
3331 (condition): Use NULL_TREE for prefix_attributes.
3332 (setattrs): Deleted.
3333 (nomods_initdcl0): Set prefix_attributes to NULL_TREE.
3334 (component_decl): Delete resetting of prefix_attributes.
3335 (component_decl_1, notype_components rule): Use NULL_TREE for
3336 prefix_attributes.
3337 (simple_stmt): Delete resetting of prefix_attributes.
3338
3339Mon Jul 24 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3340
3341 * call.c (convert_harshness): Deal with reference conversions before
3342 others. Actually do array->pointer decay. Call comp_target_types
3343 with pointer types rather than their targets.
3344
3345 * typeck.c (comp_target_types): Avoid assigning D const * to B *.
3346
3347Mon Jul 24 08:54:46 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
3348
3349 * pt.c (to_be_restored): Move decl to global scope.
3350
3351Sat Jul 22 12:22:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3352
3353 * decl.c (start_decl): Put back clearing of DECL_IN_AGGR_P.
3354
3355Fri Jul 21 17:09:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3356
3357 * decl.c (grokdeclarator): Downgrade error about 'extern int A::i'
3358 to pedwarn.
3359
3360 * pt.c (instantiate_template): Also avoid instantiation if the
3361 function has already been declared to be a specialization.
3362
3363 * decl2.c (check_classfn): Ignore cname argument, and return the
3364 matching function.
3365
3366 * decl.c (start_decl): Handle declarations of member functions
3367 outside of the class (i.e. specialization declarations).
3368
3369Thu Jul 20 10:34:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3370
3371 * class.c (finish_struct): Don't mess with the type of bitfields.
3372
3373 * various.c: s/TYPE_POINTER_TO/build_pointer_type/.
3374
3375Thu Jul 20 01:43:10 1995 Mike Stump <mrs@cygnus.com>
3376
3377 * init.c (expand_aggr_init): Assume LOOKUP_ONLYCONVERTING if init
3378 is not a parameter list (TREE_LIST).
3379 (expand_default_init): If LOOKUP_ONLYCONVERTING is set, then set
3380 LOOKUP_NO_CONVERSION so that we don't allow two-level conversions,
3381 but don't set it otherwise.
3382
3383Wed Jul 19 20:32:01 1995 Mike Stump <mrs@cygnus.com>
3384
3385 * init.c (expand_default_init): Don't allow two-level conversions
3386 during construction.
3387
3388Wed Jul 19 18:06:37 1995 Mike Stump <mrs@cygnus.com>
3389
3390 * gc.c (build_headof): The type of dyncasting to a pointer to cv
3391 void, should be pointer to cv void.
3392
3393Wed Jul 19 17:25:43 1995 Mike Stump <mrs@cygnus.com>
3394
3395 * gc.c (build_dynamic_cast): Allow casting in const.
3396
3397Wed Jul 19 16:34:27 1995 Mike Stump <mrs@cygnus.com>
3398
3399 * typeck.c (build_const_cast): If we are passed error_mark_node,
3400 return it.
3401
3402Wed Jul 19 15:24:48 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
3403
3404 * class.c (push_nested_class): Make sure TYPE is non-nil.
3405
3406 * cvt.c (type_promotes_to): Watch for error_mark_node on the
3407 incoming TYPE.
3408
3409Wed Jul 19 13:23:12 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
f65f5f62
GB
3410
3411 * cp-tree.h (SIGTABLE_VT_OFF_NAME): Renamed from SIGTABLE_OFFSET_NAME.
3412 (SIGTABLE_VB_OFF_NAME): New macro.
3413 (vt_off_identifier): Renamed from offset_identifier.
3414 (vb_off_identifier): Added extern declaration.
3415
3416 * decl.c (vt_off_identifier): Renamed from offset identifier.
3417 (vb_off_identifier): New variable to hold the identifier for the
3418 sigtable field vb_off.
3419 (init_decl_processing): Initialize vb_off_identifier.
3420 Renamed vt_off_identifier from offset_identifier.
3421 * sig.c (build_signature_method_call): Renamed offset_identifier and
3422 local variable offset to vt_off_identifer and vt_off, respecitively.
3423 * sig.c (build_signature_table_constructor): Renamed offset to vt_off.
3424
3425 * decl.c (init_decl_processing): Add vb_off field to
3426 sigtable_entry_type. Reorder fields so that pfn gets properly
3427 aligned at a 64 bit boundary on the Alpha.
3428 * sig.c (build_signature_table_constructor): Build the constructor
3429 according to the new layout. Set the vb_off field to -1 for now.
3430
3431 * decl.c (init_decl_processing): Align sigtable_entry_type on word
3432 boundaries instead of double word boundaries to save space.
3433
f30432d7
MS
3434Tue Jul 18 16:58:37 1995 Mike Stump <mrs@cygnus.com>
3435
3436 * cvt.c (cp_convert): Always call build_cplus_new for a ctor.
3437
3438Tue Jul 18 14:24:53 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
3439
3440 * parse.y (opt.component_decl_list): Only forbid private/protected
3441 in anonymous unions. We need to make this know when the type is
3442 defined for an object, to not give the error.
3443
3444Mon Jul 17 14:22:44 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
3445
3446 * parse.y (opt.component_decl_list): Don't allow access control
3447 as private or protected for union members.
3448
3449Sun Jul 16 14:01:00 1995 Jim Wilson <wilson@chestnut.cygnus.com>
3450
3451 * lex.c (check_newline): For 'p' case, move goto skipline line to
3452 before end brace for 'pragma'.
3453
3454Fri Jul 7 13:55:58 1995 Mike Stump <mrs@cygnus.com>
3455
3456 * g++.1: Tiny updates.
3457
3458Fri Jul 7 13:05:20 1995 Mike Stump <mrs@cygnus.com>
3459
3460 * decl.c (cp_finish_decl): Only destruct local static variables if
3461 they are constructed, and only construct the first time control
3462 passes completely through its declaration (if not initialized with a
3463 constant-expression).
3464 (expand_static_init): Ditto.
3465
3466Wed Jul 5 14:05:04 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
3467
3468 * typeck.c (comptypes, case OFFSET_REF): If either offset basetype
3469 is a TEMPLATE_TYPE_PARM, give a match.
3470
f30432d7
MS
3471Fri Jun 30 15:42:57 1995 Mike Stump <mrs@cygnus.com>
3472
3473 * method.c (build_overload_value): Handle encoding of null pointer
3474 constants (or any pointer with a constant numeric value) for
3475 templates.
3476
42783eab
BK
3477Fri Jun 30 13:45:51 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
3478
3479 * call.c (convert_harshness): Add QUAL_CODE when we're faced with
3480 const vs non-const for void conversions.
3481
f30432d7
MS
3482Fri Jun 30 10:19:52 1995 Mike Stump <mrs@cygnus.com>
3483
3484 * except.c (expand_start_all_catch): Fix problem with finding an
3485 outer nested try block when there is no code to separate it from an
3486 inner try block.
3487
3488Fri Jun 30 02:22:26 1995 Mike Stump <mrs@cygnus.com>
3489
3490 * search.c (dfs_pushdecls): Consume 2 or 3 orders of magnitude less
3491 memory please when virtual bases are used.
3492
3493Thu Jun 29 19:03:47 1995 Mike Stump <mrs@cygnus.com>
3494
3495 * class.c (build_vbase_path): Avoid testing things that cannot be
3496 null to see if they are null.
3497 * cvt.c (convert_pointer_to_vbase): Remove code that doesn't work.
3498 * decl.c (finish_function): Pass a type into the new
3499 convert_pointer_to_vbase instead of a binfo.
3500 * search.c (convert_pointer_to_vbase): Rewritten to use get_vbase
3501 and convert_pointer_to_real.
3502 (expand_indirect_vtbls_init): Use convert_pointer_to_vbase instead
3503 of the more cryptic call to get_vbase.
3504
e18923b4 3505Thu Jun 29 09:35:05 1995 Mike Stump <mrs@cygnus.com>
535c9c21
MS
3506
3507 * decl.c (BOOL_TYPE_SIZE): Fix broken SLOW_BYTE_ACCESS check.
3508
f30432d7
MS
3509Thu Jun 29 03:43:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3510
3511 * pt.c (instantiate_template): Don't strip 'this' twice.
3512
3513 * pt.c (coerce_template_parms): Allow null pointer constants.
3514
3515 * decl.c (revert_static_member_fn): But only if DECL_ARGUMENTS is
3516 set.
3517
f30432d7
MS
3518Wed Jun 28 18:39:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3519
3520 * decl.c (revert_static_member_fn): Also remove 'this' from
3521 DECL_ARGUMENTS.
3522 * decl2.c (check_classfn): Don't revert this function until we get a
3523 match.
3524
3525Wed Jun 28 14:07:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
3526
3527 * parse.y (component_decl): Clear PREFIX_ATTRIBUTES here.
3528
3529Wed Jun 28 11:05:13 1995 Mike Stump <mrs@cygnus.com>
3530
3531 * decl2.c (finish_file): Handle global vector news.
3532 * init.c (build_new): Encode vector news so that later we will know
3533 how many elements there are.
3534
e18923b4 3535Mon Jun 26 13:38:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
415bfbd0
JM
3536
3537 * expr.c (cplus_expand_expr): Don't mess with temp slots.
3538
f30432d7
MS
3539 * decl2.c (warn_if_unknown_interface): Don't crash if tinst_for_decl
3540 returns null.
3541
3542 * decl2.c (check_classfn): Use revert_static_member_fn.
3543 * decl.c (revert_static_member_fn): Diagnose static member functions
3544 declared const or volatile.
3545
3546 * decl2.c (grokfield): Check for missing default args here, too.
3547 (check_default_args): Function to do the checking.
3548 * decl.c (pushdecl): Use it.
3549
3550 * decl.c (pushdecl): Don't warn about shadowing a member of `this'
3551 if there is no `this'.
3552
3553Sun Jun 25 11:34:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3554
3555 * call.c (build_method_call): Downgrade 'called before definition'
3556 to a warning, as it ought to go away after Monterey.
3557
3558Sat Jun 24 14:18:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3559
3560 * pt.c (coerce_template_parms): Don't do extra checking on pointer
3561 to member arguments.
3562
3563 * class.c (finish_struct): const and reference members don't prevent
3564 a class from being an aggregate.
3565
3566 * class.c (finish_struct): Signatures are always aggregates.
3567
f7d9d4a8
JM
3568Fri Jun 23 17:20:29 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3569
f30432d7
MS
3570 * decl2.c (check_classfn): Improve error message.
3571
3572 * pt.c (tsubst): Handle PROMOTE_PROTOTYPES.
f7d9d4a8 3573
f7522313
JM
3574Thu Jun 22 01:50:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3575
f30432d7 3576 * typeck.c (comptypes): Don't ignore method quals.
f7522313 3577
f30432d7
MS
3578 * class.c (finish_struct): Non-abstract virtuals are always USED.
3579
3580 * decl.c (build_ptrmemfunc_type): The underlying union type isn't
3581 IS_AGGR_TYPE, either.
3582 * class.c (finish_struct): Use CLASSTYPE_NON_AGGREGATE instead.
3583 * cp-tree.h: Ditto.
3584
3585 * cp-tree.h (lang_type): Add aggregate.
3586 (CLASSTYPE_AGGREGATE): New macro.
3587 (TYPE_NON_AGGREGATE_CLASS): Ditto.
3588 * class.c (finish_struct): Determine whether a class is an
3589 aggregate.
3590 * decl.c (cp_finish_decl): Check TYPE_NON_AGGREGATE_CLASS instead of
3591 TYPE_NEEDS_CONSTRUCTING.
3592 * typeck2.c (digest_init): Check TYPE_NON_AGGREGATE_CLASS for
3593 subobjects, too.
3594
3595 * pt.c (tsubst, PARM_TYPE): Propagate DECL_ARTIFICIAL.
d8f1d487
RK
3596
3597 * decl.c (start_function): For pre-parsed functions, layout all of
3598 the parm decls again.
3599 (grokvardecl): TREE_PUBLIC depends on DECL_THIS_EXTERN, not
3600 DECL_EXTERNAL.
3601
f30432d7
MS
3602 * pt.c (coerce_template_parms): Improve checking for invalid
3603 template parms.
3604
3605Wed Jun 21 12:01:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
3606
3607 * decl.c (grokdeclarator): Forbid declaration of a static member
3608 with the same name as its enclosing class.
3609
d8f1d487
RK
3610Mon Jun 19 10:28:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3611
3612 * decl.c (finish_function): Clear current_class_decl.
3613
3614 * typeck.c (build_conditional_expr): Use convert (boolean_type_node
3615 instead of truthvalue_conversion.
3616
3617 * class.c (finish_struct): A data member with the same name as the
3618 class doesn't suppress constructors.
3619
3620Fri Jun 16 18:11:39 1995 Gerald Baumgartner (gb@alexander.cs.purdue.edu)
3621
3622 * decl.c (start_function): If current_class_decl is a signature
3623 pointer, don't dereference it but set C_C_D to current_class_decl.
3624
3625Fri Jun 16 17:06:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3626
3627 * decl.c (duplicate_decls): Complain about virtual functions
3628 redeclared to be inline.
3629
3630Fri Jun 16 13:20:38 1995 Mike Stump <mrs@cygnus.com>
3631
3632 * decl.c (get_unique_name): New routine to name unnamed namespaces.
3633 (push_namespace): Use get_unique_name for naming unnamed namespaces.
3634
d3c89e1f
JM
3635Thu Jun 15 15:00:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3636
d8f1d487 3637 * parse.y: Call cplus_decl_attributes with prefix_attributes where
f30432d7 3638 appropriate.
d8f1d487
RK
3639
3640Wed Jun 14 19:24:49 1995 Mike Stump <mrs@cygnus.com>
3641
3642 * search.c (get_vbase): New routine to switch hierarchies from the
3643 CLASSTYPE_VBASECLASSES to the normal one.
3644 (expand_indirect_vtbls_init): Use get_vbase to figure out how we
3645 want to convert to a vbase pointer.
3646
3647Mon Jun 12 17:50:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3648
3649 * pt.c (instantiate_class_template): Add the new instantiation to
f30432d7 3650 template_classes.
d8f1d487
RK
3651 (do_pending_expansions): Call instantiate_member_templates on all of
3652 the classes in template_classes.
3653
3654Mon Jun 12 12:36:59 1995 Mike Stump <mrs@cygnus.com>
3655
3656 * decl.c (complete_array_type): Fill in the TYPE_DOMAIN of our
3657 TYPE_MAIN_VARIANT if it is not filled in.
3658 * init.c (build_delete): If the TYPE_DOMAIN is not set, give an
3659 error instead of core dumping.
3660
3661Mon Jun 12 10:41:40 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3662
3663 * call.c (can_convert): Also check for distance > 0.
3664 (can_convert_arg): Ditto.
3665 (user_harshness): Ditto.
3666
3667Fri Jun 9 19:17:21 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3668
3669 * g++.c (MATH_LIBRARY): Provide default.
3670 (main): Always link with the math library if we link with libstdc++.
3671
3672 * decl.c (start_function): Complain about redefinition of a function
3673 even when the pending_inline version is compiled after the other
3674 version.
3675
3676Thu Jun 8 15:44:38 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3677
3678 * gc.c (build_dynamic_cast): Build up a reference to a parameter of
3679 aggregate type.
3680
d8f1d487
RK
3681Wed Jun 7 15:31:57 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3682
3683 * init.c (build_vec_delete): Resolve an offset ref before we try to
3684 use it.
3685
3686Wed Jun 7 14:19:32 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3687
3688 * typeck.c (build_modify_expr): If the class lacks a constructor or
3689 assignment operator, return error_mark_node.
3690 (common_type): Use build_cplus_array_type.
3691
3692Tue Jun 6 09:41:27 1995 Mike Stump <mrs@cygnus.com>
3693
3694 * class.c (dont_allow_type_definitions): New variable set when types
3695 cannot be defined.
3696 (finish_struct): Use it.
3697 * cp-tree.h (dont_allow_type_definitions): Define it.
3698 * parse.y (primary, handler_seq): Set it.
3699
3700Mon Jun 5 18:49:38 1995 Mike Stump <mrs@cygnus.com>
3701
3702 * method.c (build_opfncall): Use DECL_CHAIN, not TREE_CHAIN for
3703 results from lookup_fnfields. Always give warning/error on bad
3704 code.
3705
3706Mon Jun 5 11:39:37 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3707
3708 * init.c (member_init_ok_or_else): Don't allow initialization of
3709 an ancestor's member from within a constructor.
3710
3711Mon Jun 5 11:20:34 1995 Gerald Baumgartner (gb@alexander.cs.purdue.edu)
3712
3713 * sig.c (build_signature_table_constructor): Use DECL_CONTEXT
3714 instead of DECL_CLASS_CONTEXT for calculating the vfield offset so
3715 abstract virtual functions are handled correctly.
3716
3717 * sig.c (build_signature_table_constructor): Store the correct
3718 delta in signature table entries. It does not yet work for
3719 classes with virtual base classes as implementations of signatures.
3720 (build_signature_method_call): Add the delta to the object_ptr
3721 before generating the function call.
3722
3723 * call.c (build_method_call): Make instance_ptr the signature
3724 pointer itself instead of dereferencing the optr.
3725 * sig.c (build_signature_method_call): Dereference the optr for the
3726 direct and virtual calls.
3727
3728 * sig.c (build_signature_table_constructor): Make the tag for
3729 default implementations -1 instead of 2.
3730 (build_signature_method_call): Change the generated conditional
3731 expression correspondingly.
3732
3733 * sig.c (build_signature_pointer_constructor): Deleted the sorry
3734 message that said we can't handle multiple inheritance for
3735 implementations of signatures
3736 (build_signature_method_call): Use the offset from the sigtable
3737 entry instead of the vptr field from the signature pointer for
3738 building a virtual function call.
3739
3740 * class.c (build_vfn_ref): Deleted signature specific code, we don't
3741 call this function anymore from build_signature_method_call.
3742
3743 * cp-tree.h (SIGNATURE_VPTR_NAME): Deleted. We use the right vptr
3744 field in the object now instead of in the signature pointer/ref.
3745 (build_vptr_ref): Deleted extern declaration.
3746 * sig.c (build_vptr_ref): Deleted.
3747 (build_signature_pointer_or_reference_type): Deleted construction of
3748 the vptr field.
3749 (build_signature_pointer_constructor): Deleted initialization of/
3750 assignment to the vptr field.
3751
3752 * sig.c (build_signature_table_constructor): Convert the signature
3753 table entry fields to their correct types.
3754
3755 * sig.c (build_signature_table_constructor): Don't call digest_init
3756 for the fields of a sigtable entry, it's wasted time.
3757
3758 * sig.c (build_signature_table_constructor): Correctly set the
3759 offset and index fields of a sigtable entry. Build the constructor
3760 the way digest_init does, digest_init can't handle initializing an
3761 anonymous union inside a struct.
3762 (build_signature_method_call): Use the index field instead of the
3763 delta field to get the vtable index.
3764
3765 * decl.c (init_decl_processing): Fix number of fields for building
3766 sigtable_entry_type.
3767
3768 * cp-tree.h (tag_identifier, offset_identifier): Added extern decls.
3769 (SIGTABLE_CODE_NAME): Renamed to SIGTABLE_TAG_NAME.
3770 (SIGTABLE_PFN_NAME): Deleted, we'll use VTABLE_PFN_NAME instead.
3771 * decl.c (tag_identifier, offset_identifier): New variables to
3772 hold the identifiers for the sigtable fields tag and offset.
3773 (init_decl_processing): Initialize these variables.
3774 (init_decl_processing): Use these variables to build the
3775 sigtable_entry_type structure. Rename the code and offset fields
3776 to tag and delta, respectively; add offset and index fields. Changed
3777 types of fields from short_integer_type_node to delta_type_node.
3778 * sig.c (build_signature_table_constructor): Rename code and offset
3779 to tag and delta, respectively.
3780 (build_signature_method_call): Ditto. Use above variables.
3781
d8f1d487
RK
3782Thu Jun 1 17:03:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3783
3784 * decl.c (lookup_name_real): Don't try to look anything up in an
3785 erroneous object.
3786
3787Fri Jun 2 10:30:14 1995 Mike Stump <mrs@cygnus.com>
3788
3789 * method.c (build_overload_int): New routine. Break out
3790 functionality from build_overload_value so we can reuse it.
3791 (build_overload_value): Handle pointer to member functions as value
3792 parameters for templates.
3793 (build_overload_identifier): Since template parameters are shared
3794 among all instantiations, we have to substitute in the real types
3795 in TREE_TYPE (parm).
3796 pt.c (coerce_template_parms): Ditto.
3797 (push_template_decls): Ditto.
3798 (grok_template_type): Deleted as template parameters are shared
3799 among all instantiations.
3800
3801Wed May 31 19:10:32 1995 Mike Stump <mrs@cygnus.com>
3802
3803 * decl.c (grokdeclarator): Always give errors on constant overflow
3804 for array indices.
3805
3806Wed May 31 11:39:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3807
3808 * typeck.c (commonparms): Don't abort if simple_cst_equal returns < 0.
3809 (build_c_cast): Don't tack on a NON_LVALUE_EXPR when casting to
3810 reference type.
3811 (build_indirect_ref): Fix check for *&.
3812
72b7eeff
MS
3813Fri Jun 16 06:54:03 1995 Mike Stump <mrs@cygnus.com>
3814
3815 * Version 2.7.0 released.
3816
3817Fri Jun 16 15:07:29 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
3818
3819 * Make-lang.in (DEMANGLER_PROG): Add LIBS.
3820
3821Thu Jun 15 15:00:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3822
3823 * decl.c (define_function): Don't set DECL_INTERFACE_KNOWN.
3824
3825Wed Jun 7 20:00:31 1995 Mike Stump <mrs@cygnus.com>
3826
3827 * *.[chy]: Change all callers of finish_decl to cp_finish_decl.
3828 * decl.c (finish_decl): New routine to handle call backs from the
3829 mid end (declare_hidden_char_array).
3830
3831Wed Jun 7 19:02:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3832
3833 * decl.c (start_function): Handle setting C_C_D here.
3834 (set_C_C_D): Removed.
3835 (struct saved_scope): Remove class_decl.
3836 (push_to_top_level): Don't save current_class_decl.
3837 (pop_from_top_level): Don't restore current_class_decl or C_C_D.
3838 (struct cp_function): Add C_C_D.
3839 (push_cp_function_context): Save C_C_D.
3840 (pop_cp_function_context): Restore C_C_D.
3841
3842Fri Jun 2 11:05:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3843
3844 * decl.c (set_C_C_D): New function. suspend_momentary before
3845 building C_C_D.
3846 (pop_from_top_level): Call it.
3847 (start_function): Ditto.
3848 (pop_cp_function_context): Ditto.
3849
3850 * class.c, cp-tree.h, decl.c, decl2.c, parse.y: Lose all references
3851 to current_vtable_decl, CLASSTYPE_INST_VAR and CLASSTYPE_VTBL_PTR.
3852
3853 * decl.c (push_cp_function_context): Save current_class_decl.
3854 (pop_cp_function_context): Restore current_class_decl and set C_C_D.
3855 (pop_from_top_level): Don't use CLASSTYPE_INST_VAR to set C_C_D.
3856 (start_function): Ditto.
3857
3858 * class.c (popclass): Don't mess with current_class_decl,
3859 current_vtable_decl, or C_C_D.
3860
3861Mon May 29 12:45:10 1995 Paul Eggert <eggert@twinsun.com>
3862
3863 * Make-lang.in (c++.mostlyclean): Remove $(DEMANGLER_PROG).
3864
b796119f
RK
3865Wed May 24 15:55:18 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
3866
3867 * decl.c (duplicate_decls): Check simple_cst_equal result against 0.
3868 * decl2.c (finish_anon_union): Likewise.
3869 * method.c (largest_union_member): Likewise.
3870
103894f1
L
3871Wed May 24 14:41:11 1995 H.J. Lu (hjl@nynexst.com)
3872
3873 * Make-lang.in (cxxmain.o): Replace single quotes with backslashes.
3874
fbb47000
RK
3875Mon May 22 17:38:48 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
3876
3877 * Make-lang.in (g++, g++-cross, cc1plus, DEMANGLER_PROG):
3878 Use $@ instead of output name so works even if have .exe.
3879 (cxxmain.o): Use cp if ln -s fails.
3880 (c++.install-man): Use $(exeext) in executable names.
3881 (c++.mostlyclean, stage[1-4]): Use $(objext) in object file names.
3882 * Makefile.in (../cc1plus): Use $(exeext) in name of executable.
3883
878cd289
MS
3884Wed May 24 01:39:03 1995 Jason Merrill <jason@deneb.cygnus.com>
3885
3886 * call.c (build_method_call): parms can be null, duh.
3887
3888Tue May 23 01:32:09 1995 Jason Merrill <jason@deneb.cygnus.com>
3889
3890 * call.c (build_method_call): If convert_arguments failed, just bail.
3891
3892Fri May 19 10:31:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3893
3894 * cvt.c (convert_force): Pass LOOKUP_NORMAL to cp_convert.
3895
3896 * tree.c (copy_to_permanent): Oops.
3897
3898Fri May 19 10:01:07 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
3899
3900 * cp-tree.h (break_out_target_exprs): Add decl.
3901
3902Thu May 18 13:02:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3903
3904 * decl.c (start_function): Move *all* interface handling stuff after
3905 the pushdecl.
3906
3907 * tree.c (mapcar): Renamed from make_deep_copy and generalized.
3908 (perm_manip): Return t if permanent, otherwise 0.
3909 (copy_to_permanent): Use them.
3910 (bot_manip): Helper for break_out_target_exprs.
3911 (break_out_target_exprs): New function. Uses mapcar.
3912
3913 * typeck.c (convert_arguments): Use it.
3914
3915 * method.c (hack_identifier): Use convert_from_reference to
3916 dereference a reference.
3917
3918Wed May 17 17:54:54 1995 Mike Stump <mrs@cygnus.com>
3919
3920 * call.c (convert_harshness): Move reference bashing before pointer
3921 to member bashing.
3922
3923Wed May 17 16:57:53 1995 Mike Stump <mrs@cygnus.com>
3924
3925 * cvt.c (convert_to_reference): Only complain, if complaints are
3926 wanted.
d8f1d487 3927 * typeck.c (build_function_call_real): Ditto. If LOOKUP_SPECULATIVELY
878cd289 3928 is set and something won't work, return NULL_TREE.
d8f1d487 3929 * cvt.c (cp_convert): Ditto. Pass flags down to build_method_call.
878cd289 3930 (convert): Pass LOOKUP_NORMAL to cp_convert.
d8f1d487 3931 * typeck.c (convert_for_assignment): Ditto.
878cd289 3932 (convert_force): Pass LOOKUP_COMPLAIN to cp_convert.
d8f1d487 3933 (convert_arguments): Get out early if we get an error_mark_node.
878cd289
MS
3934 (convert_for_initialization): Use cp_convert instead of convert so
3935 that we can pass flags down.
3936 * cp-tree.h (LOOKUP_SPECULATIVELY): Added documentation.
3937
c19a8067
JM
3938Wed May 17 01:43:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3939
878cd289
MS
3940 * typeck2.c (store_init_value): Don't take the MAIN_VARIANT of the
3941 decl type.
3942
c19a8067
JM
3943 * class.c (finish_struct): Don't complain about a class with no
3944 user-defined constructors but with a member that has no default
3945 constructor, as this is OK for aggregates.
3946
3947 * expr.c (cplus_expand_expr, NEW_EXPR): If this is an explicit
3948 constructor call, mark slot addressable.
3949
eacd15bc
DR
3950Tue May 16 18:37:51 1995 Douglas Rupp (drupp@cs.washington.edu)
3951
3952 * g++.c: Changed WINNT to _WIN32.
3953
a9aedbc2
MS
3954Tue May 16 12:40:16 1995 Jason Merrill <jason@lisa.cygnus.com>
3955
3956 * lex.c (handle_sysv_pragma): Don't use token_buffer.
3957
3958Tue May 16 12:05:26 1995 Mike Stump <mrs@cygnus.com>
3959
3960 * call.c (resolve_scope_to_name): Add initial semantic support for
3961 namespaces.
3962 * class.c (finish_struct): Ditto.
3963 * cp-tree.h (NAMESPACE_LEVEL): Ditto.
3964 * cvt.c (build_up_reference, convert_to_reference): Ditto.
3965 * decl.c (binding_level::namespace_p, suspend_binding_level): Ditto.
3966 (resume_binding_level, toplevel_bindings_p): Ditto
3967 (namespace_bindings_p, declare_namespace_level): Ditto.
3968 (resume_level, push_namespace, pop_namespace): Ditto.
3969 (pop_everything, pushtag, duplicate_decls, pushdecl): Ditto.
3970 (implicitly_declare, lookup_namespace_name, lookup_name_real): Ditto.
3971 (start_decl, make_temporary_for_reference), Ditto.
3972 (obscure_complex_init, finish_decl, expand_static_init): Ditto.
3973 (grokvardecl, grokdeclarator, parmlist_is_exprlist): Ditto.
3974 (store_parm_decls, hack_incomplete_structures): Ditto.
3975 * decl2.c (get_temp_name, finish_anon_union, current_namespace): Ditto.
3976 (push_namespace, pop_namespace, do_namespace_alias): Ditto.
3977 (do_toplevel_using_decl, do_class_using_decl): Ditto.
3978 * error.c (dump_decl): Ditto.
3979 * init.c (build_member_call, build_offset_ref): Ditto.
3980 * lex.c (identifier_type): Ditto.
3981 * parse.y (lang_extdef, using_decl, extdef, component_decl_1): Ditto.
3982 (nested_name_specifier_1): Ditto.
3983 * spew.c (yylex): Ditto.
3984 * tree.def (NAMESPACE_DECL): Ditto.
3985
3986Tue May 16 11:55:35 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3987
3988 * decl.c (push_overloaded_decl): Return the new decl even if it
3989 can't be pushed.
3990
3991Tue May 16 11:00:37 1995 Jason Merrill <jason@lisa.cygnus.com>
3992
3993 * typeck.c (decay_conversion): Split out from default_conversion.
3994 (default_conversion): Call it.
3995 (build_binary_op): Ditto.
3996 (build_binary_op_nodefault): Use decay_conversion for truth ops.
3997
3998Mon May 15 12:47:56 1995 Jason Merrill <jason@phydeaux.cygnus.com>
3999
4000 * decl.c (warn_extern_redeclared_static): This is a pedwarn.
4001 (duplicate_decls): Always use the old decl's linkage info. Don't
4002 play with linkage of consts.
4003 (pushdecl): Don't play with linkage of consts.
4004 (redeclaration_error_message): Don't complain about an old public
4005 decl and a new non-public decl here.
4006 (grokvardecl): Handle linkage of consts here.
4007 (grokdeclarator): An 'extern inline' is public. Pass constp to
4008 grokvardecl.
4009 (start_function): Wait until after the pushdecl to do some linkage
4010 stuff.
4011
4012 * decl2.c (import_export_vtable): Make duplicates weak rather than
4013 static if supported.
4014 (import_export_inline): Ditto.
4015 * pt.c (do_pending_expansions): Ditto.
4016
4017 * class.c (build_vbase_path): flag_assume_nonnull_objects only
4018 affects reference conversion.
4019
4020 * init.c (emit_base_init): Build up an RTL_EXPR and add it to
f30432d7 4021 rtl_expr_chain.
a9aedbc2
MS
4022 * decl.c, decl2.c: s/base_init_insns/base_init_expr/.
4023
7154457b
PE
4024Tue May 16 07:06:28 1995 Paul Eggert <eggert@twinsun.com>
4025
4026 * method.c (numeric_output_need_bar): Renamed from misspelling.
4027
45ca9d09
RK
4028 * typeck.c (build_ptrmemfunc): Fix misspellings in messages.
4029
7ab7b006
RK
4030Sun May 14 10:26:22 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4031
4032 * lang-options.h, lang-specs.h: New files.
4033
fd378c9d
JM
4034Thu May 11 00:31:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4035
4036 * typeck.c (default_conversion): Don't check for BLKmode before
4037 pulling out the decl_constant_value.
4038
4039 * decl.c (start_function): Clear named_labels and shadowed_labels.
4040
4041 * typeck.c (build_function_call_real): Also synthesize methods here.
4042
4043Wed May 10 00:55:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4044
4045 * decl2.c (finish_file): Synthesize exported methods before the
4046 reconsider loop.
4047
4048 * parse.y: Move declaration of flag_new_for_scope to file scope.
4049
863adfc0
MS
4050Tue May 9 19:10:33 1995 Mike Stump <mrs@cygnus.com>
4051
4052 * decl2.c: Add flag_new_for_scope for new -ffor-scope flag.
4053 * parse.y (FOR): Conditionalize the pushing and poping of scope for
4054 the for-init-statement upon the new flag_new_for_scope.
4055 * parse.y (try_block): Simplify and use compstmt.
4056
4057Mon May 8 12:41:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4058
4059 * decl.c (define_function): Mark function decl artificial.
4060
4061Sun May 7 00:51:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4062
4063 * parse.y (simple_stmt, FOR): Put back push/pop for condition scope.
4064
4065 * decl2.c (grokclassfn): DECLs don't have cv-qualified types.
4066 * tree.c (build_cplus_method_type): Ditto.
4067
4068 * cp-tree.h (SET_DECL_ARTIFICIAL): Just set DECL_ARTIFICIAL to 1.
4069
4070 * typeck.c (build_function_call_real): If convert_arguments failed,
4071 just bail.
4072 (convert_arguments): If one of the arguments is error_mark_node,
4073 just bail.
4074
4075Sat May 6 02:39:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4076
4077 * decl.c (duplicate_decls): Don't check DECL_NOT_REALLY_EXTERN for
4078 decls that don't include it.
4079
4080Fri May 5 14:23:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4081
4082 * decl.c (duplicate_decls): Decls that have DECL_INTERFACE_KNOWN or
4083 DECL_NOT_REALLY_EXTERN set aren't extern decls.
4084
4085 * typeck.c (build_indirect_ref): Don't call default_conversion for a
4086 parameter of reference_type.
4087 * cvt.c (convert_from_reference): Just use build_indirect_ref.
4088
4089 * pt.c (do_type_instantiation): Only instantiate member functions
4090 that actually come from templates.
4091
4092Fri May 5 09:46:05 1995 Mike Stump <mrs@cygnus.com>
4093
4094 * parse.y: Generalized cleanup of poplevels, and compound statements
4095 and compound statements in try blocks. Rewritten `for' rule so that
4096 the scope of variables declared in the for clause is shortened to
4097 span just to the end of the statement, instead of the whole
4098 containing block.
4099
4100Fri May 5 00:37:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4101
4102 * call.c (convert_harshness): Handle pointers to members better.
4103
4104Thu May 4 16:00:26 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4105
4106 * decl2.c (delete_sanity): Do access control here.
4107 * init.c (build_delete): Instead of here.
4108
4109 * Make-lang.in: Build c++filt.
4110
4111Wed May 3 02:59:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4112
4113 * decl2.c (cplus_decl_attributes): If we just modified a TYPE_DECL,
4114 update our IDENTIFIER_TYPE_VALUE.
4115
a5894242
MS
4116Fri Apr 28 07:58:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4117
4118 * lex.c (cons_up_default_function): Fix linkage of #pragma
4119 implemented functions.
4120
4121Thu Apr 27 16:56:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4122
4123 * method.c (build_overload_name): Simplify and fix repeated type
4124 folding.
4125
4126 * decl.c (grokdeclarator): Prohibit pointers to void or reference
f30432d7 4127 members.
a5894242
MS
4128
4129Thu Apr 27 09:49:07 1995 Mike Stump <mrs@cygnus.com>
4130
4131 * typeck2.c (process_init_constructor): Make sure initializers are
4132 fully digested.
4133
4134Thu Apr 27 01:11:55 1995 Jason Merrill <jason@python.cygnus.com>
4135
4136 * lex.c (cons_up_default_function): Always defer synthesis.
4137
4138Thu Apr 27 00:20:37 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4139
4140 * decl2.c (mark_inline_for_output): Don't play with pending_inline
4141 stuff.
4142
4143Wed Apr 26 17:48:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4144
4145 * call.c (user_harshness): New function; like build_type_conversion,
4146 but doesn't actually build anything.
4147 (compute_conversion_costs): Use it instead of build_type_conversion.
4148
4149Wed Apr 26 17:11:25 1995 Jason Merrill <jason@deneb.cygnus.com>
4150
4151 * typeck.c (build_function_call_real): Improve error message for
4152 calling a non-function.
4153
4154 * method.c (hack_identifier): Lose check for calling a data member.
4155
4156Wed Apr 26 16:59:13 1995 Mike Stump <mrs@cygnus.com>
4157
4158 * typeck2.c (build_functional_cast): Remove very old cruft.
4159 Seems like good code is generated without it.
4160
4161Wed Apr 26 00:47:16 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4162
4163 * method.c (do_build_assign_ref): Fix handling of anonymous unions.
4164 (do_build_copy_constructor): Ditto.
4165
4166 * parse.y (simple_stmt, SWITCH): Call {push,pop}_switch.
4167
4168 * decl.c (push_switch): New function.
4169 (pop_switch): Ditto.
4170 (define_case_label): Check for jumping over initialization.
4171
4172 * call.c (build_method_call): Check for an inline function being
4173 called before its definition has been seen.
4174 * typeck.c (build_function_call_real): Ditto.
4175
4176 * decl.c (duplicate_decls): Check for a function being redeclared
4177 inline after its address has been taken.
4178
4179 * typeck.c (build_conditional_expr): Handle related class lvalues.
4180
4181Tue Apr 25 13:20:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4182
4183 * pt.c (do_pending_expansions): Don't expand unused templates.
4184
4185 * parse.y (component_decl): Accept a lone semicolon.
4186
4187Tue Apr 25 00:25:56 1995 Jason Merrill <jason@rtl.cygnus.com>
4188
4189 * call.c (build_method_call): Don't allow an RTL_EXPR to serve as the
4190 object parameter anymore.
4191
4192 * expr.c (cplus_expand_expr): Don't create RTL_EXPRs with no insns.
4193
4194Mon Apr 24 12:35:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4195
4196 * parse.y (simple_stmt, decl case): Clear prefix_attributes.
4197 (lang_extdef): Ditto.
4198
4199 * parse.y (maybe_parmlist): New rule for use in declarators where
4200 this could either be a list of expressions or parameters. Calls
4201 suspend_momentary before deciding which.
4202 (direct_after_type_declarator): Use it.
4203 (complex_direct_notype_declarator): Use it.
4204
4205 * pt.c (tsubst): Propagate attributes const and noreturn.
4206
4207 * typeck.c (build_modify_expr): If warn_synth, call build_opfncall
4208 before doing the default thing.
4209
2db70b29
DE
4210Thu Apr 27 21:49:36 1995 Doug Evans <dje@cygnus.com>
4211
4212 * typeck.c (common_type): Call lookup_attribute instead of
4213 value_member.
4214
91887f0b
RK
4215Tue Apr 25 18:07:43 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
4216
4217 * Make-lang.in: Change "realclean" to "maintainer-clean".
4218
e8abc66f
MS
4219Sun Apr 23 12:32:38 1995 Mike Stump <mrs@cygnus.com>
4220
4221 * decl2.c (finish_file): Fix broken linked list handling.
4222
4223Fri Apr 21 18:08:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4224
4225 * class.c (finish_base_struct): Don't set TYPE_HAS_COMPLEX_*_REF
4226 as often.
4227 (finish_struct): Ditto.
4228
4229 * various: Use TYPE_HAS_TRIVIAL_* instead of TYPE_HAS_COMPLEX_*.
4230
4231 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): New macro.
4232 (TYPE_HAS_TRIVIAL_ASSIGN_REF): New macro.
4233
4234Fri Apr 21 15:52:22 1995 Jason Merrill <jason@python.cygnus.com>
4235
4236 * typeck.c (c_expand_return): Only expand a returned TARGET_EXPR if
4237 it is of the same type as the return value.
4238
4239Fri Apr 21 03:01:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4240
4241 * decl2.c (finish_file): Reconsider if synthesizing a method wrote
4242 out its assembly.
4243
4244 * typeck.c (convert_for_initialization): Don't call a trivial copy
4245 constructor.
4246
4247 * typeck2.c (store_init_value): Only abort if the type has a
4248 non-trivial copy constructor.
4249
4250 * typeck.c (c_expand_return): If we're returning in a register and
4251 the return value is a TARGET_EXPR, expand it. Only do
4252 expand_aggr_init if we're returning in memory.
4253 (expand_target_expr): Function to expand a TARGET_EXPR.
4254 (build_modify_expr): Use it.
4255
4256 * tree.c (build_cplus_new): Layout the slot.
4257
4258 * expr.c (cplus_expand_expr): Use expand_call to expand the call
4259 under a NEW_EXPR, so the target is not discarded.
4260
4261Thu Apr 20 14:59:31 1995 Mike Stump <mrs@cygnus.com>
4262
4263 * gc.c (build_dynamic_cast): Tighten error checking.
4264
4265Thu Apr 20 11:23:54 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4266
4267 * expr.c (cplus_expand_expr): Only abort if the returned target is
4268 different from what we expected if the type has a non-trivial copy
4269 constructor.
4270
4271 * decl2.c (cplus_decl_attributes): Attributes applied to a template
4272 really apply to the template's result.
4273
4274 * tree.c (lvalue_p): Check IS_AGGR_TYPE instead of TREE_ADDRESSABLE
4275 to decide whether to consider a CALL_EXPR an lvalue.
4276
4277 * class.c (finish_struct_bits): Only set TREE_ADDRESSABLE if the
4278 type has a non-trivial copy constructor.
4279
4280 * decl.c (start_function): If interface_known, unset
4281 DECL_NOT_REALLY_EXTERN on the function.
4282
4283Wed Apr 19 16:53:13 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4284
4285 * pt.c (do_function_instantiation): Handle explicit instantiation of
4286 member functions.
4287 (do_type_instantiation): Handle 'inline template class foo<int>',
4288 meaning just spit out the vtable.
4289
4290 * lex.c (cons_up_default_function): Set DECL_NOT_REALLY_EXTERN on
4291 the consed functions.
4292
4293 * decl2.c (import_export_inline): Set DECL_INTERFACE_KNOWN.
4294
4295Wed Apr 19 16:28:17 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4296
4297 * call.c, class.c, decl2.c, gc.c, init.c, parse.y, pt.c, search.c,
4298 typeck.c: Include output.h.
4299
4300Wed Apr 19 14:57:21 1995 Gerald Baumgartner (gb@alexander.cs.purdue.edu)
4301
4302 * call.c (build_method_call): Allow a signature member functions to
4303 be called from a default implementation.
4304
4305Wed Apr 19 10:21:17 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4306
4307 * repo.c (finish_repo): Remember what directory we are in.
4308
4309 * search.c (expand_upcast_fixups): Don't mess with abort_fndecl.
4310
4311 * repo.c: Use obstacks instead of fixed-size buffers. Don't spit
4312 out the second copy of the symbol name. Don't remember COLLECT_GCC.
4313
43f2999d
MS
4314Wed Apr 19 02:32:40 1995 Mike Stump <mrs@cygnus.com>
4315
4316 * search.c (virtual_context): New function to get the virtual
4317 context of a function.
4318 (expand_upcast_fixups): New function to generate runtime vtables.
4319 (fixup_virtual_upcast_offsets): Ditto.
4320 (expand_indirect_vtbls_init): Use fixup_virtual_upcast_offsets to
4321 ensure that the this offsets for upcasts from virtual bases into
4322 other virtual bases or non-virtual bases are correct at construction
4323 time and destruction time.
4324 * class.c (fixup_vtable_deltas): Modify to fixup all offsets in all
4325 vtables in all virtual bases, instead of just one vtable in each
4326 virtual base.
4327 (fixup_vtable_deltas1): Ditto.
4328
44a8d0b3
MS
4329Tue Apr 18 03:57:35 1995 Michael Meissner (meissner@cygnus.com)
4330
4331 * Makefile.in (lex.o): Add dependency on c-pragma.h.
4332
4333 * lex.c (handle_sysv_pragma): Use NULL_PTR and NULL_TREE as
4334 appropriate, instead of 0.
4335
4336Mon Apr 17 12:28:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4337
4338 * decl.c (pushdecl): Use decls_match, not duplicate_decls, for
4339 comparing local and global decls.
4340
4341Fri Apr 14 01:46:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4342
4343 * typeck.c (convert_arguments): Only prohibit passing to ... of
4344 types with non-trivial copy constructors.
4345
4346 * repo.c (repo_template_used): Don't try to mess with no id.
4347
4348Fri Apr 14 23:32:50 1995 Per Bothner <bothner@rtl.cygnus.com>
4349
4350 * decl.c (duplicate_decls): Use cp_warning_at for redundant-decls.
4351
4352Thu Apr 13 15:37:42 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4353
4354 * cp-tree.h (current_tinst_level): Delete declaration, since it's
4355 static inside pt.c.
4356
4357 * typeck.c (build_modify_expr): Catch incompatible array assignment.
4358
4359 * parse.y (attribute_list, attrib): Rewrite actions to feed the
4360 right stuff to decl_attributes.
4361
4362Thu Apr 13 11:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4363
4364 * search.c (dfs_debug_mark): Check for magic virtual like
4365 import_export_vtable.
4366
4367 * typeck.c (build_binary_op_nodefault): Don't call cp_pedwarn with
4368 four args.
4369
4370Wed Apr 12 12:02:57 1995 Jason Merrill <jason@deneb.cygnus.com>
4371
4372 * decl2.c (finish_file): Move prevtable pass before needs_messing_up
4373 decision.
4374
4375Tue Apr 11 11:20:27 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4376
4377 * decl.c (finish_decl): If we're writing out a static data member of
4378 a class, we want the debug info for that class.
4379
4380 * gc.c (build_t_desc): Check linkage of a class properly.
4381
4382 * class.c (finish_struct): Set the 'headof' offset for the main
4383 vtable properly.
4384 (prepare_fresh_vtable): Fix typeinfo pointer here.
4385 (modify_one_vtable): Instead of here.
4386
4387Mon Apr 10 12:15:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4388
4389 * repo.c (repo_get_id): New function to return the interesting
4390 identifier for a repo entity.
4391 (repo_template_used): Use it.
4392 (repo_template_instantiated): Mark the id as chosen.
4393 (init_repo): Record whether or not the id was chosen.
4394 (finish_repo): Note if an id was newly chosen.
4395
4396 * pt.c (do_function_instantiation): Call repo_template_instantiated.
4397 (do_type_instantiation): Ditto. Don't diagnose multiple
4398 instantiation.
4399
4400 * decl2.c (finish_file): Use DECL_NOT_REALLY_EXTERN when deciding
4401 whether or not to synthesize a method.
4402
4403 Undo these changes:
4404 * class.c (finish_vtbls): build more vtables if flag_rtti is on.
4405 * class.c (modify_all_direct_vtables): ditto.
4406 * init.c (expand_direct_vtbls_init): expand more vtables if
4407 flag_rtti is on.
4408
79ff2c6c
MS
4409Sat Apr 8 17:45:41 1995 Mike Stump <mrs@cygnus.com>
4410
4411 * gc.c (build_headof): Use ptrdiff_type_node instead of
4412 integer_type_node on pointer arithmetic.
4413
4414Sat Apr 8 11:57:04 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4415
4416 * typeck.c (build_modify_expr): Undo previous change.
4417
4418Thu Apr 6 01:23:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4419
4420 * Makefile.in (compiler): Remove ../cc1plus before rebuilding it.
4421
4422 * repo.c (get_base_filename): Put the .rpo file in the directory
4423 with the object file, not the source.
4424
4425 * typeck.c (build_conditional_expr): Handle pmf's better.
4426
4427 * repo.c (finish_repo): Also use ASM_OUTPUT_LABELREF to print out
4428 the name of the symbol.
4429
4430Wed Apr 5 15:24:12 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4431
4432 * repo.c (open_repo_file): Make repo filename DOS-compliant.
4433 (*): Also write a new repo file if some previously-used
4434 templates are no longer used. Only remember the identifier.
4435
4436 * lex.c (cons_up_default_function): If this function belongs to a
4437 template class, call repo_template_used for it.
4438
4439 * repo.c (repo_template_used): Using a class means using its vtable,
4440 if any.
4441 (finish_repo): Ditto.
4442
4443 * typeck.c (build_modify_expr): Only wrap TARGET_EXPRs in RTL_EXPRs
4444 if the type has a complex copy constructor.
4445
4446 * decl2.c (lang_decode_option): -frepo implies
4447 -fno-implicit-templates.
4448
4449 * decl.c (start_function): Clear current_{base,member}_init_list.
4450
4451 * lex.c (init_lex): Also unset *_eq if ! flag_operator_names.
4452
4453Tue Apr 4 16:11:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4454
4455 * decl.c (struct cp_function): Add {base,member}_init_list.
4456 (push_cp_function_context): Save current_{base,member}_init_list.
4457 (pop_cp_function_context): Restore them.
4458
b19b4a78
MS
4459Mon Apr 3 16:55:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4460
4461 * repo.c (get_base_filename): Take filename parm, fix logic bug.
4462
4463 * typeck.c (build_compound_expr): Do not warn about a compound expr
4464 in which the first expression has no side effects.
4465 (build_x_compound_expr): Warn here instead.
4466 (build_conditional_expr): Don't warn about a conditional expression
4467 between an enum and the type it promotes to.
4468
4469 * init.c (build_new): Handle initialization of arrays of builtins
4470 properly.
4471
4472Mon Apr 3 15:08:04 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4473
4474 * repo.c: Include config.h to get definitions of bcopy and rindex
4475 on systems that don't have them (e.g., SVR4).
4476
4477Mon Apr 3 14:41:55 1995 Mike Stump <mrs@cygnus.com>
4478
4479 * decl2.c (finish_table): Pass NULL_TREE instead of init to
4480 finish_decl so that it won't try and do error checking on the
4481 initializer.
4482
4483Mon Apr 3 10:45:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4484
4485 * repo.c (get_base_filename): Analyze COLLECT_GCC_OPTIONS to
4486 determine whether this compile used -c -o.
4487 (open_repo_file): Use get_base_filename. Remove the extension.
4488 (finish_repo): Spit out the values of main_input_filename,
4489 COLLECT_GCC and COLLECT_GCC_OPTIONS.
4490
4491 * parse.y (structsp): Add TYPENAME_KEYWORD complex_type_name.
4492
faae18ab
MS
4493Sun Apr 2 23:43:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4494
4495 * search.c (compute_access): Don't try to do access control on
4496 nested types.
4497
4498Fri Mar 31 10:14:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4499
4500 * repo.c: New file to handle things repo.
4501
4502 * pt.c (instantiate_template): Call repo_template_used if the
4503 definition is accessible.
4504 (mark_function_instantiated): Split out from
4505 do_function_instantiation.
4506 (mark_class_instantiated): Split out from do_type_instantiation.
4507
4508 * parse.y (template_instantiate_once): Call repo_template_used.
4509
4510 * lex.c (lang_init): Call init_repo.
4511
4512 * decl2.c: Handle flag_use_repository.
4513 (finish_file): Call finish_repo.
4514
4515 * decl.c (start_method): Call repo_template_used if this is a
4516 template method.
4517
4518 * Makefile.in (CXX_OBJS): Add repo.o.
4519 (repo.o): Add dependencies.
4520
4521 * Make-lang.in (CXX_SRCS): Add repo.c.
4522
4523 * decl.c (start_function): If DECL_INTERFACE_KNOWN and
4524 DECL_NOT_REALLY_EXTERN are both set, unset DECL_EXTERNAL.
4525
4526 * typeck.c (build_binary_op_nodefault): Identify the invalid operand
4527 types used.
4528
4529 * decl.c (duplicate_decls): Propagate DECL_NOT_REALLY_EXTERN.
4530
4531Thu Mar 30 17:54:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4532
4533 * typeck.c (build_binary_op_nodefault): Tidy up use of build_type
4534 and result_type. When checking for comparison between signed
4535 and unsigned, use result_type rather than the (possibly shortened)
4536 type of op0. Also, don't warn about equality comparison of a
4537 signed operand to an unsigned constant that fits in the signed
4538 type.
4539
4540 * method.c (do_build_copy_constructor): Reverse
4541 current_base_init_list after we've built it up.
4542
4543Thu Mar 30 14:35:18 1995 Mike Stump <mrs@cygnus.com>
4544
4545 * except.c (build_throw): Never warn about the value of throw not
4546 being used.
4547
4548Thu Mar 30 13:16:54 1995 Mike Stump <mrs@cygnus.com>
4549
4550 * except.c (expand_start_catch_block): Check for bad catch parameter
4551 declarations.
4552
4553Thu Mar 30 13:06:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4554
4555 * decl.c (finish_function): Only set DECL_NOT_REALLY_EXTERN if
4556 DECL_EXTERNAL is not already set.
4557
4558Thu Mar 30 11:26:24 1995 Mike Stump <mrs@cygnus.com>
4559
4560 * method.c (emit_thunk): Let poplevel know that the last level is
4561 for a function so it can create a BLOCK_NODE and set DECL_INITIAL.
4562
4563Thu Mar 30 11:15:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4564
4565 * decl2.c (import_export_inline): Don't set DECL_NOT_REALLY_EXTERN
4566 here.
4567
4568 * decl.c (grokdeclarator): OK, don't abort if we see a decl with
4569 METHOD_TYPE.
4570 (finish_function): Set DECL_EXTERNAL and DECL_NOT_REALLY_EXTERN on
4571 all deferred inlines.
4572
4573Wed Mar 29 19:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4574
4575 * cp-tree.h (DECL_THIS_INLINE): New macro.
4576 (DECL_NOT_REALLY_EXTERN): New macro.
4577 (DECL_THIS_STATIC): New macro.
4578
4579 * decl.c: Lose all references to current_extern_inline. Break
4580 inline semantics into DECL_INLINE for actual inlining and
4581 DECL_THIS_INLINE for the linkage wierdness. Use DECL_THIS_STATIC.
4582 * decl2.c: Use DECL_NOT_REALLY_EXTERN to indicate that we want to
4583 emit an inline here. Associated changes.
4584 * lex.c: Ditto.
4585 * pt.c: Ditto.
4586 * typeck.c: Ditto.
4587
4588 * call.c (build_method_call): Don't bother trying to handle inlines
4589 specially.
4590 * cvt.c (convert_to_aggr): Ditto.
4591
4592 * pt.c (do_function_instantiation): Handle instantiation of
4593 public inlines, too.
4594
4595Wed Mar 29 16:04:25 1995 Mike Stump <mrs@cygnus.com>
4596
4597 * except.c (init_exception_processing): Change the interface for
4598 __throw_type_match and add decl for new rtti matching routine
4599 __throw_type_match_rtti.
4600 (build_eh_type): New routine to build a run time descriptor for the
4601 expression given.
4602 (expand_start_catch_block): Update to use new calling convention for
4603 the matcher.
4604 (expand_throw): Update to use build_eh_type.
4605
08fb8ad0
WL
4606Mon Mar 27 07:14:33 1995 Warner Losh <imp@village.org>
4607
4608 * g++.c: Removed __NetBSD__ from conditional.
4609 Declare strerror if HAVE_STRERROR is defined; otherwise
4610 declare sys_errlist and sys_nerr.
4611 (my_strerror): New function.
4612
71851aaa
MS
4613Tue Mar 28 14:16:35 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4614
4615 * search.c (get_binfo): Don't try to be so clever.
4616
4617 * tree.c (copy_to_permanent): Also suspend_momentary().
4618
4619 * cvt.c (cp_convert_to_pointer): Hand off to convert_fn_pointer even
4620 if the types are the same.
4621
4622 * decl.c (start_function): Handle extern inlines more like C++ says
f30432d7 4623 we should.
71851aaa
MS
4624
4625 * init.c (build_member_call): Hand constructor calls off to
4626 build_functional_cast.
4627
4628 * typeck2.c (build_functional_cast): Use DECL_NESTED_TYPENAME to get
4629 the name of the type.
4630
4631Tue Mar 28 13:13:56 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4632
4633 * decl.c (grokdeclarator): Check for the decl returned by
4634 grokfndecl to be null before using build_decl_attribute_variant.
4635
4636Mon Mar 27 18:04:41 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4637
4638 * init.c (build_new): Use build_pointer_type instead of
4639 TYPE_POINTER_TO.
4640
7215f9a0
MS
4641Fri Mar 24 12:11:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4642
71851aaa
MS
4643 * typeck.c (build_conditional_expr): Handle pmfs.
4644 (convert_for_assignment): Fix pmf support.
4645
4646 * cvt.c (convert_fn_ptr): Support !flag_vtable_thunks.
4647 (cp_convert_to_pointer): Handle pmfs.
4648 (cp_convert): Pass pmfs to cp_convert_to_pointer.
4649
4650 * typeck.c (common_type): Handle inheritance for pmfs.
4651
4652 * typeck2.c (build_m_component_ref): Do access control.
4653
4654 * typeck.c (comp_target_types): Check for conversion to void *
4655 before checking trickier conversions.
4656
7215f9a0
MS
4657 * decl.c (duplicate_decls): Propagate DECL_ABSTRACT_VIRTUAL_P.
4658
4659 * pt.c (push_tinst_level): Complain if template instantiation depth
4660 is greater than max_tinst_depth.
4661
4662 * typeck.c (common_type): Assume that we can call common_type to
4663 unify the target type of a pointer.
4664
4665Thu Mar 23 00:48:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4666
4667 * decl2.c (finish_file): Don't synthesize methods at
4668 finish_vtable_prevardecl time. Do synthesize methods that are not
4669 used, but are public and not external.
4670
4671 * cvt.c (build_type_conversion): Only give an error if for_sure.
4672
4673 * typeck.c (comp_target_types): Only support pointer conversions if
4674 nptrs > 0.
4675
4676Wed Mar 22 19:30:15 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4677
4678 * init.c (build_new): Catch use of an initializer list where it
4679 shouldn't be.
4680
4681Wed Mar 22 16:21:07 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4682
4683 * init.c (build_new): Wrap alloc_expr in an RTL_EXPR if nelts is
4684 non-constant.
4685
4686 * decl2.c: temp_name_counter is now public.
4687
4688 * decl.c (struct cp_function): Add temp_name_counter field.
4689 (push_cp_function_context): Save it.
4690 (pop_cp_function_context): Restore it.
4691
4692 * typeck.c (common_type): Handle unifying function types, and unify
4693 unmatched things to void* with a compiler_error, rather than
4694 silently like before.
4695
28cbf42c
MS
4696Wed Mar 22 15:10:34 1995 Mike Stump <mrs@cygnus.com>
4697
4698 * decl2.c (finish_prevtable_vardecl, finish_vtable_vardecl): Revert
4699 Brendan's last change and fix latent problem that causes TD entries
4700 to not come out when the things that need them has yet to be
4701 expanded.
4702
4703Wed Mar 22 15:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4704
4705 * typeck.c (build_binary_op_nodefault, comparison ops): Update type0
4706 and type1, since we might have changed op0 or op1.
4707
4708Wed Mar 22 13:33:45 1995 Jason Merrill <jason@python.cygnus.com>
4709
4710 * typeck.c (common_type): Don't mess up templates.
4711
4712Wed Mar 22 04:56:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4713
4714 * typeck.c (common_type): Handle ptms properly. Also handle
4715 T* -> void*.
4716 (build_binary_op_nodefault): New variable build_type controls what
4717 type is given to the expression when it is created. Set this to
4718 boolean_type_node for comparison ops instead of using result_type.
4719 (comp_target_types): Allow T * -> void *.
4720
4721 * cvt.c (cp_convert_to_pointer): Do access control when converting
4722 ptms, too.
4723
4724Tue Mar 21 17:25:06 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4725
4726 * parse.y (extern_lang_string): Catch use of linkage specs that
4727 aren't all naming the same language.
4728
4729 * class.c (finish_struct): Delete accidental duplicate code.
4730
4731Tue Mar 21 14:00:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4732
4733 * typeck.c (build_binary_op_nodefault): Disable pedwarns about
4734 comparing functions and incomplete types.
4735
4736 * decl.c (finish_function): Only unset current_function_decl if
4737 !nested.
4738 (duplicate_decls): Last change went too far; we only want to stop
4739 checking for value/reference ambiguity.
4740
4741Tue Mar 21 01:26:39 1995 Mike Stump <mrs@cygnus.com>
4742
4743 * gc.c (build_generic_desc): Zap the DECL_SIZE so that we can lay it
4744 out fresh, as the new type may be larger.
4745
4746Mon Mar 20 19:01:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4747
4748 * expr.c (extract_init): Try to expand the RTL for the
4749 initialization and figure out what it will look like so we can avoid
4750 run-time initialization. Disabled for now.
4751 (extract_scalar_init): Helper for scalar initialization.
4752 (extract_aggr_init): Helper for aggregate initialization.
4753
4754 * decl.c (duplicate_decls): Don't complain about ambiguous
4755 declarations.
4756 (obscure_complex_init): Now returns a tree. Call extract_init if
4757 we're optimizing and this is a toplevel decl.
4758 (finish_decl): Update accordingly.
4759
4760 * lex.c (check_newline): If we're just changing files (not pushing
4761 or popping), update input_file_stack->name.
4762
4763Mon Mar 20 17:55:04 1995 Mike Stump <mrs@cygnus.com>
4764
4765 * pt.c (type_unification): Only TEMPLATE_DECLs are handled right now
4766 in the transitive unification code.
4767
4768Mon Mar 20 16:07:50 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4769
4770 * decl.c (shadow_tag): Don't allow inline, virtual, or explicit on
4771 non-functions.
4772 (grokdeclarator): Don't allow friends to be defined in local classes.
4773
4774Sat Mar 18 04:03:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4775
4776 * decl2.c (finish_prevtable_vardecl): Use DECL_DECLARED_STATIC
4777 rather than DECL_SAVED_INSNS to decide whether or not this method
4778 was declared inline.
4779
4780 * method.c (synthesize_method): Turn off DECL_INLINE if
4781 function_cannot_inline_p thinks we're too large.
4782
4783 * typeck.c (build_indirect_ref): Use build_expr_type_conversion.
4784
4785Fri Mar 17 17:47:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4786
4787 * class.c (instantiate_type): Handle pmfs.
4788
4789 * typeck.c (convert_for_assignment): Check types when assigning one
4790 pmf to another.
4791
4792 * decl.c (define_label): Fix logic for printing out the name of the
4793 label in an error message.
4794
4795 * error.c (dump_expr): Support ARRAY_REF.
4796
4797Fri Mar 17 17:43:02 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4798
4799 * decl2.c (finish_vtable_vardecl): Call build_t_desc here.
4800 (finish_prevtable_vardecl): Instead of here.
4801
4802Fri Mar 17 14:40:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4803
4804 * decl.c (expand_static_init): Also use expand_aggr_init if the
4805 initializer is a TREE_LIST.
4806 (grokdeclarator): Only pedwarn about extra qualification if -pedantic.
4807
4808 * pt.c (unify): Fix unification of return type.
4809
4810 * expr.c (fixup_result_decl): Use store_expr, rather than
4811 emit_move_insn, to move the return value into the place where
4812 callers will expect it.
4813
4814Thu Mar 16 22:05:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4815
4816 * init.c (build_offset_ref): Call assmble_external on functions.
4817 * typeck.c (build_component_ref): Ditto.
4818
4819Thu Mar 16 20:28:16 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4820
4821 * decl.c (struct saved_scope): Add members base_init_list and
4822 member_init_list.
4823 (push_to_top_level): Save current_base_init_list and
4824 current_member_init_list to them.
4825 (pop_from_top_level): Put it back.
4826
4827Thu Mar 16 19:21:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4828
4829 * pt.c (instantiate_template): Call assemble_external.
4830
4831Thu Mar 16 18:07:54 1995 Brendan Kehoe (brendan@phydeaux.cygnus.com)
4832
4833 * class.c: Include rtl.h, to get NULL_RTX.
4834 (finish_struct): Also zero out DECL_SAVED_INSNS, to avoid problems
4835 on hosts with different sizes for each part of the union.
4836 * tree.c: Also include rtl.h.
4837 (layout_basetypes): Same change for DECL_SAVED_INSNS.
4838
4839Thu Mar 16 13:57:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4840
4841 * pt.c (unify): Fix array domain unification for 64-bit targets.
4842
4843 * decl2.c (finish_file): Push bizarre type decl before walking the
4844 vtables the first time.
4845 (walk_vtables): OK, don't set prev to vars if the vardecl_fn messed
4846 with TREE_CHAIN (prev).
4847
4848 * init.c (emit_base_init): Use convert_pointer_to_real instead of
4849 convert_pointer_to when converting to a direct base.
4850
4851Wed Mar 15 20:26:29 1995 Mike Stump <mrs@cygnus.com>
4852
4853 * pt.c (type_unification): Handle transitive unification better.
4854
4855Wed Mar 15 13:56:16 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4856
4857 * decl2.c (walk_vtables): Always set prev to vars.
4858 (mark_vtable_entries): Call assemble_external on the vtable entries.
4859
4860 * class.c (finish_struct): Set the vtable's size to NULL_TREE before
f30432d7 4861 calling layout_decl, so that it gets updated properly.
28cbf42c
MS
4862
4863 Finally re-enable dynamic synthesis. This time it works.
4864 * method.c (synthesize_method): Pass decl_function_context (fndecl)
4865 to {push,pop}_cp_function_context.
4866 * decl.c (push_cp_function_context): Now takes a tree argument.
4867 (pop_cp_function_context): Ditto.
4868 * call.c (build_method_call): Enable synthesis.
4869 * lex.c (cons_up_default_function): Ditto.
4870
4871Tue Mar 14 19:14:19 1995 Doug Evans <dje@chestnut.cygnus.com>
4872
4873 * parse.y (setattrs): Chain onto prefix_attributes rather than
4874 setting it.
4875
4876Wed Mar 15 13:00:00 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4877
4878 * decl.c (pushdecl): Check if the type of the VAR_DECL is an
4879 error_mark_node before trying to read TYPE_LANG_SPECIFIC.
4880
b7484fbe
MS
4881Mon Mar 13 21:00:28 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4882
4883 * decl.c (grokdeclarator, case ARRAY_REF): Wrap the exp with fold,
4884 and convert the size and integer_one_node to the index type.
4885
4886Mon Mar 13 08:01:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4887
4888 * typeck.c (get_member_function_from_ptrfunc): Save the instance
4889 argument, and tack it onto the front of the COND_EXPR to make the
4890 semantics come out right. Grab the instance argument from
4891 '*instance_ptrptr', rather than having it passed in separately.
4892
4893 * various: Change various consed-up comparison operations to have
4894 boolean type. Remove the instance argument in calls to
4895 get_member_function_from_ptrfunc.
4896
4897 * error.c (dump_expr): Dump true and false as "true" and "false".
4898
4899 * decl2.c (finish_file): Also set DECL_STATIC_FUNCTION_P on the
4900 global init function.
4901
4902 * decl.c (finish_function): Only set DECL_EXTERNAL here if the
4903 inline function is public.
4904
4905Sat Mar 11 00:58:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4906
4907 * init.c (is_friend): Be more careful about checking
4908 DECL_CLASS_CONTEXT on non-member functions.
4909
4910 * decl2.c (finish_vtable_vardecl): Don't bother calling
4911 assemble_external here.
4912 (prune_vtable_vardecl): New function that just splices out the
4913 vtable decl from the top-level decls.
4914 (import_export_inline): Unset DECL_EXTERNAL at first.
4915 (finish_file): Don't bother calling assemble_external here. Do
4916 splice out all of the vtables.
4917
4918Fri Mar 10 14:42:29 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4919
4920 * decl.c (finish_function): If we're not emitting the function yet,
4921 call assemble_external for it.
4922
4923 * decl2.c (finish_prevtable_vardecl): Don't call mark_vtable_entries
4924 here.
4925 (finish_vtable_vardecl): Don't do the linkage deduction thing here.
4926 Also don't splice out the current vtable if it is unused.
4927 (finish_file): Move the second walk_vtables and the synthesis check
4928 inside the 'reconsider' loop. Move thunk emission after the
4929 'reconsider' loop.
4930
4931Thu Mar 9 16:28:16 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4932
4933 * pt.c (tsubst): Don't bother calling cp_build_type_variant, since it
4934 was passing bogus values for readonly and volatile from the original
4935 template decl, not the resultant type of the tsubst call.
4936
4937 * class.c (duplicate_tag_error): Use cp_error_at to point out the
4938 previous definition of the tag.
4939
4940Thu Mar 9 10:46:17 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4941
4942 * decl.c (start_function): Clear base_init_insns and protect_list.
4943 (struct cp_function): Add base_init_insns field.
4944 (push_cp_function_context): Also save base_init_insns.
4945 (pop_cp_function_context): Also restore base_init_insns.
4946
4947Wed Mar 8 13:31:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4948
4949 * init.c (member_init_ok_or_else): Check for initializing a static
4950 member here.
4951 (emit_base_init): Instead of here.
4952
4953Tue Mar 7 16:03:26 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4954
4955 * call.c (build_method_call): Disable synthesis as needed.
4956 * lex.c (cons_up_default_function): Ditto.
4957
f6abb50a
BK
4958Tue Mar 7 10:14:29 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
4959
4960 * parse.y: New rules to allow attributes in a prefix position.
4961 (prefix_attributes): New variable. Pass it into cplus_decl_attributes.
4962 (setattr): New rule.
4963 (reserved_declspecs, declmods): Catch attributes here.
4964 * decl2.c (cplus_decl_attributes): Add PREFIX_ATTRIBUTES argument.
4965 * decl.c (duplicate_decls): Pass DECL_MACHINE_ATTRIBUTES to
4966 descendent typedef.
4967 (grokdeclarator): Added code to support machine attributes.
4968 * Makefile.in (stamp-parse): Expect 5 shift/reduce failures.
4969
b7484fbe
MS
4970Mon Mar 6 15:07:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
4971
4972 * call.c (build_method_call): Don't synthesize methods outside of a
4973 function.
4974
4975 Make base initialization more re-entrant so that synthesis on the
4976 fly will work (and, eventually, template instantation on the fly).
4977 * init.c (sort_member_init): Don't bother with members that can't be
4978 initialized. Reorganize a bit. Don't initialize base members here.
4979 (sort_base_init): New function, like sort_member_init, but for base
4980 classes. Steals some code from emit_base_init.
4981 (emit_base_init): Simplify. Call sort_{member,base}_init before
4982 doing any initialization, so we don't have to save
4983 current_{member,base}_init_list in push_cp_function_context.
4984 (expand_aggr_vbase_init_1): Adjust for sort_base_init.
4985 (expand_aggr_vbase_init): Simplify.
4986 * decl.c (struct cp_function): Add protect_list field.
4987 (push_cp_function_context): Also save protect_list.
4988 (pop_cp_function_context): Also restore protect_list.
4989 * call.c (build_method_call): Enable synthesis at point of call.
4990 * lex.c (cons_up_default_function): Ditto.
4991
4992 * parse.y: Turn -ansi checks back into -pedantic checks.
4993
4994 * init.c (build_new): Fix -fcheck-new for array new.
4995
4996Sat Mar 4 15:55:42 1995 Fergus Henderson <fjh@cs.mu.oz.au>
4997
4998 * typeck.c (build_compound_expr): warn if left-hand operand of
4999 comma expression has no side-effects.
5000
5001Fri Mar 3 15:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5002
5003 * parse.y (primary): Change 'object qualified_id *' rules to 'object
5004 overqualified_id *'.
5005
5006Fri Mar 3 12:48:17 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
5007
5008 * parse.y (unary_expr): Catch doing sizeof an overloaded function.
5009 Make the error look the same as the one we issue in c_sizeof.
5010
5011 * typeck.c (build_binary_op_nodefault): Give an error for trying
5012 to compare a pointer-to-member to `void *'.
5013
5014Fri Mar 3 11:28:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5015
5016 * typeck.c (build_unary_op): Handle bool increment with smoke and
5017 mirrors here, rather than in expand_increment where it belongs,
5018 because Kenner doesn't agree with me.
5019
5020Fri Mar 3 00:08:10 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
5021
5022 * decl.c (grokparms): Catch a PARM_DECL being used for a default
5023 argument as well.
5024
5025Thu Mar 2 20:05:54 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
5026
5027 * init.c (build_new): Don't allow new on a function type.
5028
5029 * parse.y (primary): Avoid a crash when seeing if the arg is of
5030 the same type as that given for the typespec in an explicit dtor call.
5031
5032Thu Mar 2 00:49:38 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5033
5034 * decl.c (finish_function): Change test for calling
5035 mark_inline_for_output.
5036
5037Wed Mar 1 11:23:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5038
5039 * typeck.c (build_modify_expr): Complain if
5040 build_default_binary_type_conversion fails.
5041
5042 * init.c (expand_default_init): Handle arguments of unknown type
5043 properly.
5044
5045 * cvt.c (build_expr_type_conversion): Only complain about ambiguity
5046 if 'complain'.
5047 * various: Pass 'complain'.
5048
5049 * typeck.c (comptypes): Be more picky about comparing UPTs.
5050
5051Wed Mar 1 11:03:41 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
5052
5053 * decl.c (grokdeclarator): If declarator is null, say that the
5054 type used has an incomplete type.
5055
5056Wed Mar 1 10:06:20 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5057
5058 * pt.c (instantiate_template): Copy the template arguments to the
5059 permanent_obstack. Also use simple_cst_equal to compare them when
5060 looking for a previous instantiation.
5061
5062 * tree.c (make_deep_copy): Support copying INTEGER_TYPEs (assuming
5063 they are array domain types).
5064
5065Tue Feb 28 23:24:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5066
5067 * cp-tree.h: Define WANT_* constants for passing to
5068 build_expr_type_conversion.
5069 * cvt.c (build_expr_type_conversion): New function to build
5070 conversion to one of a group of suitable types.
5071 (build_default_binary_type_conversion): Use it.
5072 * decl2.c (grok_array_decl): Ditto.
5073 * typeck.c (build_unary_op): Ditto.
5074 (build_array_ref): Tidy up a bit.
5075 (build_binary_op): Ditto.
5076
5077Tue Feb 28 19:57:31 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
5078
5079 * decl.c (grokdeclarator): Don't allow decl of an argument as `void'.
5080
5081Tue Feb 28 17:23:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5082
5083 * parse.y (typed_declspecs1): Add 'typespec reserved_typespecquals
5084 reserved_declspecs' rule.
5085
5086 * parse.y (expr_or_declarator): Remove notype_qualified_id rule.
5087 (direct_notype_declarator): Ditto.
5088 (complex_direct_notype_declarator): Add notype_qualified_id rule.
5089
5090 * lex.c (real_yylex): Handle :> digraph properly.
5091
5092Tue Feb 28 12:26:29 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
5093
5094 * decl.c (grokdeclarator): Check if it's a friend, not if it's
5095 non-virtual, that's being initialized. Move the check up to
5096 before FRIENDP would get cleared. Catch an unnamed var/field
5097 being declared void. Say just `field' instead of `structure field'
5098 in the error message. Only go for the operator name if DECLARATOR
5099 is non-null.
5100
5101Tue Feb 28 00:08:01 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5102
5103 * decl.c (start_function): Complain about abstract return type.
5104 (grokdeclarator): Complain about declaring constructors and
5105 destructors to be const or volatile. Complain about declaring
5106 destructors to be static.
5107
5108 * pt.c (uses_template_parms): Handle pmfs.
5109
5110 * decl.c (grokdeclarator): Don't call variable_size for array bounds
5111 that only depend on template constant parameters.
5112
5113Mon Feb 27 15:38:16 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
5114
5115 * error.c (dump_decl): Only look to see if it's a vtable if we
5116 actually have a name to check out.
5117
5118Mon Feb 27 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5119
5120 * cvt.c (convert_to_aggr): Lose misleading shortcut.
5121
5122Sun Feb 26 17:27:32 1995 Doug Evans <dje@canuck.cygnus.com>
5123
5124 * decl.c (set_nested_typename): Always set DECL_IGNORED_P,
5125 not just for dwarf.
5126
5127Sun Feb 26 00:10:18 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
5128
5129 * decl.c (grokdeclarator): Don't allow a static member to be
5130 declared `register'.
5131
5132 * init.c (make_friend_class): Move up to a pedwarn for the warning
5133 about a class declaring friends with itself.
5134
5135 * decl.c (grokdeclarator): You can't do `volatile friend class foo'
5136 or `inline friend class foo'. Only try to make a friend out of
5137 TYPE if we didn't already reset it to integer_type_node.
5138
5139Sat Feb 25 22:32:03 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
5140
5141 * decl.c (grokdeclarator): Don't allow initialization of a
5142 non-virtual function.
5143
5144 * decl.c (start_function): Do a pedwarn if we're changing `main'
5145 to have an int return type.
5146
5147Sat Feb 25 00:02:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5148
5149 * typeck.c (build_modify_expr): Handle simple assignment from
5150 TARGET_EXPRs by building up an RTL_EXPR to force expansion. Whew.
5151
5152Fri Feb 24 18:27:14 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
5153
5154 * decl.c (grokdeclarator): Also don't allow virtual outside of a
5155 class decl for a scope method definition performed at global binding.
5156
5157 * init.c (build_offset_ref): Don't allow creation of an OFFSET_REF
5158 of a bitfield.
5159
5160 * decl.c (grokdeclarator): Don't allow a const to be declared mutable.
5161
5162 * typeck.c (build_binary_op): Return an error_mark_node if either
5163 one of the args turned into an error_mark_node when we tried to
5164 use default_conversion.
5165
5166 * typeck.c (build_unary_op): Forbid using postfix -- on a bool.
5167
5168 * decl.c (grokdeclarator): Allow `signed' and `unsigned' to be
5169 used on `__wchar_t'.
5170
5171Fri Feb 24 13:59:53 1995 Mike Stump <mrs@cygnus.com>
5172
5173 * except.c (end_protect_partials): Do it the right way.
5174
5175Wed Feb 22 15:42:56 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5176
5177 * typeck.c (build_binary_op_nodefault): Upgrade warning about
5178 comparing distinct pointer types to pedwarn.
5179
5180 * typeck2.c (digest_init): Cope with extra braces.
5181
5182 * typeck.c (build_binary_op_nodefault): Use tree_int_cst_sgn instead
5183 of INT_CST_LT (..., interger_zero_node).
5184
5185Wed Feb 22 14:45:52 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
5186
5187 * except.c [!TRY_NEW_EH] (end_protect_partials): Define dummy
5188 function for systems that don't have EH.
5189
5190Tue Feb 21 19:18:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5191
5192 * call.c (can_convert_arg): Like can_convert, but takes an arg as
5193 well.
5194
5195 * pt.c (type_unification): Allow implicit conversions for parameters
5196 that do not depend on template parameters.
5197
1b65f56d
DR
5198Tue Feb 21 18:43:48 1995 Douglas Rupp (drupp@cs.washington.edu)
5199
5200 * Make-lang.in, config-lang.in: ($exeext): New macro.
5201 * Make-lang.in: Try a "cp" if "ln" fails.
5202 * cp-tree.h (decl_attributes): Added argument.
5203 * decl2.c (cplus_decl_attribute): Add arg to decl_attributes.
5204 * cp/g++.c: Added #ifdefs for sys/file.h and process.h for NT.
5205 Modified spawnvp to have to correct number of arguments for OS/2, NT.
5206
b7484fbe
MS
5207Tue Feb 21 18:36:55 1995 Mike Stump <mrs@cygnus.com>
5208
5209 * decl.c (finish_function): Add calls to end_protect_partials to end
5210 the exception region that protects constructors so that partially
5211 constructed objects can be partially destructed when the constructor
5212 throws an exception.
5213 * init.c (perform_member_init, sort_member_init, emit_base_init):
5214 Added support for partially constructed objects.
5215 * init.c (build_partial_cleanup_for): New routine to do partial
5216 cleanups of a base class.
5217 * decl2.c (finish_file): Move the emitting of the exception table
5218 down, after we emit all code that might have exception regions in
5219 them.
5220 * except.c (end_protect_partials, might_have_exceptions_p): New
5221 routines.
5222 (emit_exception_table): Always output table if called.
5223 * cp-tree.h (protect_list, end_protect_partials,
5224 might_have_exceptions_p, emit_exception_table): Added.
5225
5226Tue Feb 21 16:05:59 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
5227
5228 * gc.c (build_typeid): Pass a NULL_TREE, not the bogus, unused
5229 address of a local variable.
5230 * class.c (build_vfn_ref): Only try to build the PLUS_EXPR if we
5231 were given a non-null PTR_TO_INSTPTR.
5232
5233Tue Feb 21 01:53:18 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5234
5235 * decl.c (duplicate_decls): Always lay out the merged decl.
5236
5237 * decl2.c (finish_vtable_vardecl): Don't do vtable hack on templates.
5238 (finish_prevtable_vardecl): Ditto.
59be85d7 5239
b7484fbe
MS
5240 * method.c (synthesize_method): Set interface_{unknown,only}
5241 according to the settings for our class, not the file where it comes
5242 from.
59be85d7 5243
b7484fbe 5244Sat Feb 18 12:26:48 1995 Mike Stump <mrs@cygnus.com>
3a887df4 5245
b7484fbe 5246 * except.c: Handle systems that define __i386__ but not __i386.
3a887df4 5247
e3417fcd
MS
5248Fri Feb 17 15:31:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5249
5250 * decl2.c (reparse_decl_as_expr): Support being called without a
5251 type argument.
5252
5253 * parse.y (primary): Add '(' expr_or_declarator ')'. Adds 4 r/r
5254 conflicts. Sigh.
5255
5256Fri Feb 17 12:02:06 1995 Mike Stump <mrs@cygnus.com>
5257
5258 * parse.y (template_def, fndef, fn.def1, return_init, condition,
5259 initdcl0, initdcl, notype_initdcl0, nomods_initdcl0,
5260 component_decl_1, after_type_component_declarator0,
5261 notype_component_declarator0, after_type_component_declarator,
5262 notype_component_declarator, after_type_component_declarator,
5263 full_parm, maybe_raises, exception_specification_opt): Fix up,
5264 include exception_specification_opt maybeasm maybe_attribute and
5265 maybe_init if missing. Rename maybe_raises to
5266 exception_specification_opt to match draft wording. Use maybe_init
5267 to simplify rules.
5268
5269Fri Feb 17 01:54:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5270
5271 * init.c (build_new): Set TREE_NO_UNUSED_WARNING on COMPOUND_EXPRs
5272 built for news of scalar types.
5273
5274Thu Feb 16 17:48:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5275
5276 * typeck.c (build_binary_op_nodefault): Update code for warning
5277 about signed/unsigned comparisons from C frontend. Realize that the
5278 code in the C frontend is, if anything, even more bogus. Fix it.
5279 (build_binary_op): Undo default_conversion if it wasn't useful.
5280
5281 * typeck.c (build_unary_op, ADDR_EXPR): Lose bogus special case for
5282 PRE*CREMENT_EXPR.
5283
5284 * decl2.c (import_export_vtable): Don't try the vtable hack
5285 if the class doesn't have any real non-inline virtual functions.
5286 (finish_vtable_vardecl): Don't bother trying to find a non-inline
5287 virtual function in a non-polymorphic class.
5288 (finish_prevtable_vardecl): Ditto.
5289
5290 * decl2.c (import_export_vtable): Use and set DECL_INTERFACE_KNOWN.
5291
5292 * cp-tree.h (DECL_INTERFACE_KNOWN): Use DECL_LANG_FLAG_5.
5293
5294 * init.c (expand_virtual_init): Always call assemble_external.
5295
5296 * class.c (build_vfn_ref): Always call assemble_external.
5297 (build_vtable): Always call import_export_vtable.
5298 (prepare_fresh_vtable): Ditto.
5299 (add_virtual_function): Don't bother setting TREE_ADDRESSABLE.
5300
8ccc31eb
MS
5301Thu Feb 16 03:28:49 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5302
5303 * class.c (finish_struct): Use TYPE_{MIN,MAX}_VALUE to determine
5304 whether an enumerated type fits in a bitfield.
5305
5306Wed Feb 15 15:38:12 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5307
5308 * class.c (grow_method): Update method_vec after growing the class
f30432d7 5309 obstack.
8ccc31eb
MS
5310
5311Wed Feb 15 13:42:59 1995 Mike Stump <mrs@cygnus.com>
5312
5313 * parse.y (handler_seq): Push a level for the catch parameters.
5314
5315Wed Feb 15 12:42:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5316
5317 * init.c (emit_base_init): Update BINFO_INHERITANCE_CHAIN on my
5318 bases, in case they've been clobbered.
5319
5320Wed Feb 15 12:07:29 1995 Mike Stump <mrs@cygnus.com>
5321
5322 * class.c (finish_base_struct): Set up BINFO_INHERITANCE_CHAIN here,
5323 so that one day it will always be valid.
5324 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Ditto.
5325
5326 * cp-tree.h (copy_binfo): Removed, unused.
5327 * tree.c (copy_binfo): Ditto.
5328
5329Wed Feb 15 00:05:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5330
5331 * init.c (build_new): Save the allocation before calling
5332 expand_vec_init on it.
5333
5334 * decl.c (finish_enum): The TYPE_PRECISION of the enum type mush
5335 match the TYPE_PRECISION of the underlying type for constant folding
5336 to work.
5337
5338Tue Feb 14 15:31:25 1995 Mike Stump <mrs@cygnus.com>
5339
5340 * except.c (push_eh_entry, expand_start_all_catch,
5341 expand_leftover_cleanups, expand_end_catch_block): Keep track of
5342 the context in which the exception region occurs.
5343 (build_exception_table): If the region was not output, don't output
5344 the entry in the eh table for it.
5345
5346Tue Feb 14 02:15:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5347
5348 * init.c (expand_default_init): Only use a previous constructor call
5349 if it's a call to our constructor. Does the word "Duh" mean
5350 anything to you?
5351
5352 * decl.c (grokparms): Fine, just don't call
5353 convert_for_initialization at all. OK? Happy now?
5354
5355Mon Feb 13 02:23:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5356
5357 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Make sure that the class
5358 method vector has a second element before returning it.
5359
5360 * decl.c (grokparms): Don't strip REFERENCE_TYPE before calling
5361 convert_for_initialization.
5362
5363Sun Feb 12 03:57:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5364
5365 * typeck.c (build_modify_expr): Compare function name to
5366 constructor_name (current_class_type) instead of current_class_name.
5367
5368 * decl.c (grokparms): Don't do anything with the return value of
5369 convert_for_initialization.
5370
5371 * error.c (dump_decl): Also dump_readonly_or_volatile on the decl.
5372
5373 * decl.c (duplicate_decls): Tweak error message.
5374
5375 * typeck.c (build_const_cast): Implement checking.
5376 (build_reinterpret_cast): Implement some checking.
5377
5378 * cp-tree.h (CONV_FORCE_TEMP): Require a new temporary when
5379 converting to the same aggregate type.
5380 (CONV_STATIC_CAST): Include it.
5381 (CONV_C_CAST): Ditto.
5382 * cvt.c (convert_force): Use CONV_C_CAST instead of CONV_OLD_CONVERT.
5383 (cp_convert): Only force a new temporary if CONV_FORCE_TEMP.
5384
5385Fri Feb 10 16:18:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5386
5387 * typeck.c (build_c_cast): Use non_lvalue to tack something on
f30432d7 5388 where necessary.
8ccc31eb
MS
5389
5390 * decl.c (auto_function): Now a function.
5391 * except.c (init_exception_processing): terminate, unexpected,
5392 set_terminate, and set_unexpected have C++ linkage.
5393
5394 * typeck.c (build_unary_op, TRUTH_NOT_EXPR): Use convert instead of
5395 truthvalue_conversion for converting to bool, as it handles
5396 user-defined conversions properly.
5397 (condition_conversion): Ditto.
5398
5399 * except.c (expand_throw): Don't call convert_to_reference.
5400 Pass the correct parameters to build_new.
5401
5402 * method.c (do_build_assign_ref): Don't use access control when
5403 converting to a base reference here.
5404 (do_build_copy_constructor): Or here.
5405
5406 * init.c (build_new): Unset TREE_READONLY on the dereferenced
5407 pointer before assigning to it.
5408
5409 * decl.c (maybe_build_cleanup): Don't bother stripping const here.
5410
5411 * decl2.c (delete_sanity): You can now delete pointer to const.
5412
5413Fri Feb 10 13:28:38 1995 Jason Merrill <jason@python.cygnus.com>
5414
5415 * decl.c (finish_function): Don't rely on actual parameters being
5416 evaluated left-to-right.
5417 * except.c (expand_end_catch_block): Ditto.
5418
5419Fri Feb 10 00:52:04 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5420
5421 * tree.c (real_lvalue_p): Like lvalue_p, but class temps aren't
5422 considered lvalues.
5423 * cvt.c (convert_to_reference): Use real_lvalue_p instead of
f30432d7 5424 lvalue_p.
8ccc31eb
MS
5425
5426 * cvt.c (build_type_conversion_1): Don't call convert on aggregate
5427 types.
5428 (convert_to_reference): Fix erroneous text substitution.
5429
5430 * typeck2.c (initializer_constant_valid_p): Update from C frontend.
5431 Add new argument to all callers.
5432
5433 * typeck.c (convert_arguments): Check for error_mark_node before
5434 trying to do anything with the actual parameter.
5435
5436 * typeck.c (condition_conversion): Build up a CLEANUP_POINT_EXPR and
5437 fold it.
5438 (bool_truthvalue_conversion): Remove. Fix all callers to call
5439 truthvalue_conversion instead.
5440 (various): Fold CLEANUP_POINT_EXPRs.
5441
5442 * parse.y (conditions): Call condition_conversion rather than
5443 building up a CLEANUP_POINT_EXPR.
5444
5445 * pt.c (end_template_decl): Don't warn_if_unknown_interface here
5446 under -falt-external-templates.
5447
5448Thu Feb 9 05:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5449
5450 * init.c (build_new): Complain about new of const type without
5451 initializer. Other cleanup.
5452
5453 * call.c (compute_conversion_costs): Don't call
5454 build_type_conversion with a reference type; convert to the target
5455 type and check its lvaluetude.
5456 * cvt.c (convert_to_reference): Ditto.
5457
5458 * cvt.c (build_type_conversion_1): There will never be any need to
5459 dereference references here now.
5460
5461Thu Feb 9 00:37:47 1995 Mike Stump <mrs@cygnus.com>
5462
5463 * except.c (expand_builtin_throw): Make sure we only `use' the
5464 value of return_val_rtx.
5465
5466Wed Feb 8 15:45:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5467
5468 * parse.y (structsp): Don't complain about declaring a type being
5469 defined to be a friend.
5470
5471 * decl2.c (warn_if_unknown_interface): Note the template in question
5472 and the point of instantiation, for -falt-external-templates.
5473 * lex.c (reinit_parse_for_method): Pass the decl to
5474 warn_if_unknown_interface.
5475 * pt.c (instantiate_template): Ditto.
5476 (end_template_decl): Ditto.
5477
5478 * decl.c (set_nested_typename): Set IDENTIFIER_TYPE_VALUE on the
5479 nested name again, to make local classes work a bit better.
5480
5481 * typeck.c (build_function_call_real): Dereference reference after
5482 checking for incomplete type.
5483
5484 * init.c (build_new): Accept new of const and volatile types.
5485
5486Wed Feb 8 14:04:16 1995 Jason Merrill <jason@deneb.cygnus.com>
5487
5488 * decl.c (grokdeclarator): Fix error message.
5489
5490Wed Feb 8 03:16:15 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5491
5492 * typeck.c (convert_for_initialization): Do bash arrays when
5493 converting to a reference to non-array.
5494
5495Tue Feb 7 15:50:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5496
5497 * cvt.c (cp_convert): Don't call convert_to_reference, or
5498 automatically dereference references. Do pass reference conversions
5499 to cp_convert_to_pointer.
5500 (cp_convert_to_pointer): Support references.
5501
5502 * call.c (build_method_call): Don't build up a reference to the
5503 parameter here; let build_overload_call handle that.
5504
5505 * typeck.c (build_c_cast): Call convert_to_reference directly if
5506 converting to a reference type.
5507 * method.c (do_build_copy_constructor): Ditto.
5508 * method.c (do_build_copy_constructor): Ditto.
5509 (do_build_assign_ref): Ditto.
5510
5511 * call.c (build_method_call): Dereference a returned reference.
5512 * typeck.c (build_function_call_real): Ditto.
5513
5514 * decl.c (xref_basetypes): Check for unions with basetypes here.
5515 (xref_tag): Instead of here.
5516
5517 * pt.c (process_template_parm): Template type parm decls are
5518 artificial.
5519
5520Mon Feb 6 04:32:09 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5521
5522 * parse.y (typed_declspecs): Add missing semicolon.
5523 (do_xref_defn): Resurrect.
5524 (named_class_head_sans_basetype): Move template specialization
5525 definition cases to named_class_head_sans_basetype_defn.
5526
5527 * decl2.c (grokfield): Call pushdecl_class_level after setting the
5528 TYPE_NAME, not before.
5529
5530Sun Feb 5 02:50:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5531
5532 * call.c (convert_harshness): Don't call sorry here. Don't allow
5533 conversions between function pointer types if pedantic.
5534
5535 * pt.c (overload_template_name): Pass globalize=1 to xref_tag.
5536
5537 * lex.c (cons_up_default_function): Use the full name for the return
5538 type of op=.
5539
5540 * decl.c (set_nested_typename): Don't worry about anonymous types,
5541 as they already have a unique name.
5542 (pushdecl): Remove redundant set_nested_typename
5543 (xref_tag): Split out base handling into xref_basetypes.
5544
5545 * cp-tree.h (TYPE_INCOMPLETE): New macro; TEMPLATE_TYPE_PARMs are
5546 not considered incomplete even though their definition is unknown.
5547
5548 * decl.c (xref_defn_tag): Lose.
5549 (xref_tag): xref_next_defn = ! globalize.
5550 (pushdecl): Don't set DECL_NESTED_TYPENAME on artificial decls. The
5551 ones that should have it set will have it set by pushtag.
5552 (pushdecl_class_level): Ditto.
5553 (pushtag): Tidy up a bit.
5554 (set_nested_typename): Push a decl for the nested typename from
5555 here, rather than from xref_defn_tag.
5556
5557 * parse.y (do_xref): Lose.
5558 (named_class_head): If we see 'class foo:' we know it's a
5559 definition, so don't worry about base lists for non-definitions.
5560
5561 * pt.c (push_template_decls): Template parm decls are artificial.
5562
5563 * decl.c (duplicate_decls): Restore check for qualifier
5564 disagreement for non-functions.
5565 (decls_match): Remove check for qualifier disagreement.
5566
5567Fri Feb 3 14:58:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5568
5569 * decl.c (grok_reference_init): Convert initializer from
f30432d7 5570 reference.
8ccc31eb
MS
5571 * typeck.c (convert_for_initialization): Ditto.
5572
5573 * decl.c (duplicate_decls): Propagate DECL_NESTED_TYPENAME.
5574
5575 * cvt.c (cp_convert): Don't convert to the same class type by just
5576 tacking on a NOP_EXPR.
5577 (convert_to_reference): Use comp_target_types instead of comptypes
5578 so that we don't allow conversions two levels down.
5579
5580Thu Feb 2 15:07:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5581
5582 * class.c (build_vbase_path): Bash types to make the backend happy.
5583 * cvt.c (build_up_reference): Bash the types bashed by
5584 build_vbase_path to be reference types instead of pointer types.
5585 (convert_to_reference): Ditto.
5586
5587 * typeck.c (build_c_cast): Don't strip NOPs if we're converting to a
5588 reference type.
5589
5590 * parse.y (structsp): Put back error for 'struct B: public A;'.
5591
5592Wed Feb 1 23:02:06 1995 Mike Stump <mrs@cygnus.com>
5593
5594 * except.c: Add support for mips systems that don't define __mips
5595 but do define mips, like Ultrix.
5596
5597Wed Feb 1 22:39:07 1995 Mike Stump <mrs@cygnus.com>
5598
5599 * except.c: Add support for exception handling on the Alpha.
5600
1038f4f9
MS
5601Wed Feb 1 10:12:14 1995 Mike Stump <mrs@cygnus.com>
5602
5603 * decl2.c (finish_file): Fix bug in Jan 31st change.
5604
5605Tue Jan 31 16:59:15 1995 Gerald Baumgartner (gb@lorenzo.cs.purdue.edu)
5606
5607 * sig.c (build_signature_pointer_or_reference_type): Don't set
5608 IS_AGGR_TYPE for signature pointers/reference so expand_default_init
5609 doesn't expect to find a copy constructor.
5610 * call.c (build_method_call): Treat signature pointers/reference
5611 as if IS_AGGR_TYPE were set.
5612
d18c083e
MS
5613Tue Jan 31 13:28:56 1995 Mike Stump <mrs@cygnus.com>
5614
5615 * gc.c (get_typeid): Pawn off error messages to build_t_desc.
5616 (build_t_desc): Inform the user here if they try and build
5617 with -frtti and don't include <typeinfo.h>.
5618
5619 * decl2.c (finish_prevtable_vardecl): Support rescanning.
5620 (finish_file): Move finish_prevtable_vardecl up to before the global
5621 initializers are done as tdecls are initialized in the global
5622 initializer. Also Pick up any new tdecls or vtables needed by
5623 synthesized methods.
5624
5625 * class.c (finish_struct): Simplify. We have to do rtti scanning at
5626 end, so we might as well do all of it there.
5627
5628Tue Jan 31 05:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5629
5630 * call.c (build_method_call): Fix -fthis-is-variable for 32-bit
5631 targets, too.
5632
5633Tue Jan 31 00:11:04 1995 Mike Stump <mrs@cygnus.com>
5634
5635 * decl2.c (finish_prevtable_vardecl): New routine, mostly split from
5636 finish_vtable_vardecl. It has the first half functionality from
5637 that routine.
5638 * decl2.c (finish_vtable_vardecl): Update to not include stuff not
5639 in finish_prevtable_vardecl.
5640 * decl2.c (finish_file): Call finish_prevtable_vardecl.
5641 * gc.c (build_generic_desc): Allow it to be called when not at the
5642 global binding layer, but behave as if we were.
5643 (build_t_desc): Rearrange a bit so that it really works and is
5644 easier to follow.
5645 * class.c (finish_struct): Don't decide on tdecls here, as we have
5646 to wait until the end of the file in general to decide whether or
5647 not they come out.
5648
5649Mon Jan 30 01:00:40 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5650
5651 * init.c (build_delete): Check access to operator delete before
5652 calling the destructor.
5653 * method.c (build_opfncall, DELETE_EXPR): build_method is allowed to
5654 return error_mark_node.
5655 * call.c (build_method_call): Use the one-argument op delete even if
5656 it's an error.
5657
5658 * init.c (build_new): Fix -fthis-is-variable support.
5659 * call.c (build_method_call): Ditto.
5660
5661 * call.c (convert_harshness): Make conversion from a pointer to bool
5662 worse than conversion to another pointer.
5663
5664Sat Jan 28 16:46:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5665
5666 * init.c (build_new): Check new return value if -fcheck-new.
5667
5668 * lex.c (check_newline): Clear end_of_file when we're done, too.
5669
5670Sat Jan 28 10:38:39 1995 Mike Stump <mrs@cygnus.com>
5671
5672 * decl2.c (finish_vtable_vardecl): Make rtti TD tables follow
5673 vtables whereever they go.
5674
5675 * gc.c (build_t_desc): Remove old way of setting it up, as it wasn't
5676 right.
5677
5678Sat Jan 28 09:10:44 1995 Mike Stump <mrs@cygnus.com>
5679
5680 * decl2.c (finish_vtable_vardecl): Now set the
5681 interface/implementation of vtables on the first virtual function,
5682 if one exists, otherwise we use the old method. This is a major win
5683 in terms of cutting down the size of objects and executables in
5684 terms of text space and data space. Now most of the savings that
5685 #pragma interface/implementation gives is automatic in a fair number
5686 of cases.
5687
5688Sat Jan 28 04:57:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5689
5690 * decl.c (grokdeclarator): Discard the template parameters in a
5691 template constructor declaration so that the function is always
5692 named constructor_name (ctype).
5693
5694 * lex.c (check_newline): Use ungetc to put back the character before
5695 calling HANDLE_PRAGMA.
5696
5697Fri Jan 27 17:23:47 1995 Mike Stump <mrs@cygnus.com>
5698
5699 * decl2.c (check_classfn): If the cname is T<int> and fn_name is T,
5700 make sure we still match them.
5701
5702Fri Jan 27 16:32:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5703
5704 * parse.y: Add END_OF_LINE token.
5705
5706 * lex.c (check_newline): Set linemode when we see a # directive, and
5707 unset it when we're done. Turn all 'return's into 'goto skipline'.
5708 Fix all uses of '\n', since we won't see it anymore. Put back the
5709 character we read before checking for a sysv or target pragma.
5710 (real_yylex): If we see an EOF in linemode, return END_OF_LINE.
5711 (handle_sysv_pragma): Don't look at the input stream; quit when we
5712 see an END_OF_LINE token.
5713
5714 * input.c (getch): Return EOF if we're in line mode and at the end
5715 of a line.
5716 (put_back): Don't put back an EOF.
5717
5718Thu Jan 26 19:26:34 1995 Mike Stump <mrs@cygnus.com>
5719
5720 * except.c (expand_throw): Do the newing of the exception object
5721 before we load the type descriptor or the address so that we don't
5722 wipe any of the values out.
5723
5724Thu Jan 26 19:20:00 1995 Mike Stump <mrs@cygnus.com>
5725
5726 * except.c (init_exception_processing): Don't use r12 on the rs6000.
5727
5728Tue Jan 24 16:36:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5729
5730 * decl.c (grokparms): Don't try to build up a reference at this point.
5731
5732 * typeck2.c (build_functional_cast): Don't assume that a NOP_EXPR
5733 will suffice to convert from integer_zero_node.
5734
b7484fbe
MS
5735Wed Jan 25 15:02:09 1995 David S. Miller (davem@nadzieja.rutgers.edu)
5736
5737 * class.c (instantiate_type): Change error message text.
5738 * typeck2.c (store_init_value): Likewise.
5739
e1cd6e56
MS
5740Mon Jan 23 21:57:14 1995 Mike Stump <mrs@cygnus.com>
5741
5742 * pt.c (tsubst): When we copy a node, don't forget to copy
5743 TREE_CHAIN, we use it later.
5744
5745Mon Jan 23 03:33:47 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5746
5747 * typeck.c (convert_for_assignment): Initialize variable before use.
5748
5749Fri Jan 20 01:17:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5750
5751 * g++.c (main): Link with both libstdc++ and libg++ if called as
5752 something ending with "g++", otherwise only libstdc++. Move -lm to
5753 the end of the line.
5754
5755Thu Jan 19 15:43:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5756
5757 * call.c (build_method_call): Don't mess with 'this' before calling
f30432d7 5758 compute_conversion_costs.
e1cd6e56
MS
5759
5760Wed Jan 18 15:40:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5761
5762 * search.c (get_matching_virtual): Give line number for previous
f30432d7 5763 declaration.
e1cd6e56
MS
5764
5765 * call.c (convert_harshness): Handle conversions to references
5766 better.
5767
5768 * cvt.c (build_up_reference): OK, handle {MIN,MAX}_EXPR *properly*.
5769
5770Wed Jan 18 15:21:38 1995 Mike Stump <mrs@cygnus.com>
5771
5772 * class.c (instantiate_type): Use DECL_CHAIN to walk lists instead,
5773 as the TREE_CHAIN for methods will take us to the next differently
5774 named function, DECL_CHAIN won't.
5775
5776Wed Jan 18 14:26:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5777
5778 * tree.c (lvalue_p): Handle {MIN,MAX}_EXPR.
5779
5780 * decl2.c (lang_decode_option): -Wall implies -Wparentheses.
5781 warn_parentheses defaults to 0.
5782
5783 * decl.c (grokparms): Put back call to require_instantiated_type.
5784
5785Tue Jan 17 19:56:15 1995 Mike Stump <mrs@cygnus.com>
5786
5787 * except.c (exception_section): Use the data section on the rs6000.
5788 Change calling convention for named_section.
5789
5790Wed Jan 17 18:20:57 1994 Fergus Henderson <fjh@munta.cs.mu.oz.au>
5791
f30432d7
MS
5792 * cp-tree.h : Make if (x=0) warn with wall
5793 * parse.y : Make if (x=0) warn with wall
e1cd6e56 5794
255512c1
JM
5795Tue Jan 17 14:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5796
e1cd6e56
MS
5797 * decl.c (BOOL_TYPE_SIZE): BITS_PER_WORD if SLOW_BYTE_ACCESS,
5798 BITS_PER_UNIT otherwise.
5799
5800 * search.c (get_matching_virtual): Don't check the binfo if the
5801 types are the same.
5802
5803 * cvt.c (cp_convert): Just call truthvalue_conversion to convert to
f30432d7 5804 bool.
255512c1
JM
5805
5806Mon Jan 16 13:28:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5807
e1cd6e56
MS
5808 * various: Use boolean_type_node, boolean_true_node,
5809 boolean_false_node.
5810
5811 * search.c (get_matching_virtual): Allow covariant returns that
5812 don't require pointer adjustment.
5813
5814 * typeck.c (build_conditional_expr): Don't call default_conversion
5815 on ifexp.
5816
5817 * cvt.c (build_up_reference): Handle MIN_EXPR and MAX_EXPR.
5818
5819 * decl.c (grokdeclarator): Upgrade warning about &const to pedwarn.
5820
5821Sun Jan 15 22:17:32 1995 dcb@lovat.fmrco.COM (David Binderman)
5822
5823 * pt.c (do_function_instantiation): Free targs once we're done.
255512c1
JM
5824
5825Sun Jan 15 22:17:32 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5826
e1cd6e56
MS
5827 * decl.c (BOOL_TYPE_SIZE): Defaults to BITS_PER_WORD.
5828 (init_decl_processing): Use BOOL_TYPE_SIZE instead of CHAR_TYPE_SIZE
5829 for bool.
5830
5831Sat Jan 14 05:33:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5832
5833 * decl2.c (finish_file): We need to mess up if there are any
5834 variables in the list, not just if there is one with a constructor.
5835
5836Fri Jan 13 14:42:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5837
5838 * decl.c (duplicate_decls): Propagate DECL_STATIC_{CON,DE}STRUCTOR.
5839 (finish_function): Handle DECL_STATIC_{CON,DE}STRUCTOR.
5840 (finish_function): Trust rest_of_compilation.
5841
5842 * decl2.c (finish_file): Also call functions designated as static
5843 constructors/destructors.
5844
5845 * decl.c (grokdeclarator): Allow access decls of operator functions.
5846 (grokparms): Only do convert_for_initialization if the initializer
5847 has a type.
5848 (duplicate_decls): Put back push_obstacks_nochange call.
5849
5850 * lex.c (real_yylex): Downgrade complaint about the escape sequence
5851 being too large from pedwarn to warning.
5852
5853 * decl.c (grokdeclarator): Don't complain about long long in system
5854 headers.
5855
5856 * lex.c (real_yylex): Handle digraphs.
5857
5858Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5859
5860 * decl.c (init_decl_processing): -f{no-,}strict-prototype only
5861 affects C linkage declarations now.
5862
5863 * typeck.c (comp_target_types): Grok simple contravariant conversions.
5864 (common_type): t1 and t2 are interchangeable.
5865
5866 * various: Test return value of comp_target_types differently in
5867 different places; it now returns -1 for a contravariant conversion
5868 (which is fine in symmetric cases).
5869
5870 (common_type): Prefer long double to double even when
5871 they have the same precision.
5872
5873 * decl.c (grokparms): Call convert_for_initialization to check
5874 default arguments.
5875
5876 * init.c (build_new): void_type_node has a size (of 0).
5877
5878 * decl.c (decls_match): Also check for agreement of TREE_READONLY
5879 and TREE_THIS_VOLATILE.
5880 (push_class_level_binding): Properly handle shadowing of
5881 nested tags by fields.
5882
5883 * search.c (dfs_pushdecls): Ditto.
5884
5885 * decl2.c (finish_file): Don't second-guess self-initialization.
5886
5887 * cvt.c (convert_to_reference): Work with expr directly, rather than
5888 a copy.
5889
5890 * decl.c (push_overloaded_decl): Only shadow artificial TYPE_DECLs.
5891
5892 * init.c (add_friend): Downgrade duplicate friend message from
5893 pedwarn to warning.
5894
5895 * decl.c (duplicate_decls): Push obstacks before calling common_type.
5896
5897Thu Jan 12 17:15:21 1995 Michael Ben-Gershon <mybg@cs.huji.ac.il>
5898
5899 * except.c (push_eh_entry): set LABEL_PRESERVE_P flag for
5900 exception table labels.
5901 (expand_start_all_catch): Ditto.
5902 (expand_leftover_cleanups): Ditto.
5903 (expand_end_catch_block): Ditto.
5904 * except.c (make_first_label): new function.
5905 (expand_start_all_catch): add a call to make_first_label() before
5906 using a label as a jump destination.
5907 (expand_end_all_catch): Ditto.
5908 (expand_leftover_cleanups): Ditto.
5909 (expand_end_catch_block): Ditto.
5910 (expand_builtin_throw): Ditto.
5911 (expand_throw): Ditto.
5912 * except.c: Add ARM processor support for exception handling.
5913
5914Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5915
5916 (complete_array_type): Copy code from C frontend.
5917
5918 * lex.c (real_yylex): Don't multiply the length of a wide string
5919 literal by WCHAR_BYTES.
5920
5921 * decl.c (pushdecl): Check for redeclaration of wchar_t here.
5922 (duplicate_decls): Instead of here.
5923 (define_label): Complain about a label named wchar_t.
5924 (grokdeclarator): Complain about declarations of
5925 operator-function-ids as non-functions.
5926
5927 * typeck.c (unary_complex_lvalue): Also wrap prefix -- and ++ in
5928 COMPOUND_EXPRs.
5929 (build_unary_op): Wrap unary plus in a NON_LVALUE_EXPR.
5930
5931 * lex.c (real_yylex): Don't skip whitespace when reading the next
5932 character after ->.
5933
5934Wed Jan 11 16:32:49 1995 Mike Stump <mrs@cygnus.com>
5935
5936 * except.c: Allow cc1plus to be built with native compiler on rs6000.
5937 (expand_start_all_catch): Add assemble_external calls for various
5938 routines we call.
5939 (expand_leftover_cleanups): Ditto.
5940 (expand_start_catch_block): Ditto.
5941 (do_unwind): Ditto.
5942 (expand_builtin_throw): Ditto.
5943
5944Wed Jan 11 01:05:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5945
5946 * decl.c (pushtag): Only look for a previous decl in the current
5947 binding level. Use explicit global scope in DECL_NESTED_TYPENAME.
5948
5949 * gxx.gperf: Add __signature__ and __sigof__ keywords.
5950
5951 * decl2.c (lang_decode_option): -ansi does not set flag_no_asm. It
5952 does set flag_no_gnu_keywords and flag_operator_names.
5953
5954 * lex.c (init_lex): 'overload' is not a keyword unless -traditional.
5955 Unset extension keywords if -fno-gnu-keywords.
5956 Allow operator names ('bitand') if -foperator-names.
5957 Never unset 'asm'; -fno-asm only affects 'typeof'.
5958
5959 * decl.c (lookup_name_real): The got_object special lookup only
5960 applies to types.
5961
5962Tue Jan 10 18:07:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5963
5964 * spew.c (yylex): Also use DECL_NESTED_TYPENAME if got_object is set.
5965
5966 * parse.y (primary): Unset got_object after all rules that use the
f30432d7 5967 'object' nonterminal.
e1cd6e56
MS
5968 (object): Set got_object.
5969
5970 * lex.h: Declare got_object.
5971
5972 * decl.c (lookup_name_real): Also lookup names in the context of an
5973 object specified.
5974
5975Tue Jan 10 14:30:30 1995 Mike Stump <mrs@cygnus.com>
5976
5977 * typeck.c (get_member_function_from_ptrfunc): Use ptrdiff_type_node
5978 for things that have to be added to pointers, not size_type. Cures
5979 problems with pointer to members on Alphas.
5980 (build_binary_op_nodefault): Ditto.
5981 (get_delta_difference_: Ditto.
5982 (build_ptrmemfunc): Ditto.
5983
5984Tue Jan 10 01:49:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5985
5986 * decl.c (pushtag): Stick the new decl in TYPE_NAME before pushing
5987 it.
5988
5989 * typeck.c (build_component_ref): Don't build up a COMPONENT_REF
5990 when dealing with overloaded member functions; just act like
5991 build_offset_ref.
5992 (commonparms): Remove misleading comment.
5993
5994 * decl.c (duplicate_decls): Complain about repeated default
5995 arguments here.
5996 (redeclaration_error_message): Instead of here.
5997 (pushdecl): Complain about missing default arguments here.
5998 (grokparms): Instead of here.
5999 (lookup_name_current_level): Also match on DECL_ASSEMBLER_NAME.
6000 (grok_reference_init): Do not complain about missing initializer if
6001 declared 'extern'.
6002
6003 * search.c (lookup_field): Don't return a TYPE_DECL if there is a
6004 function alternative and want_type is not set.
6005
6006Mon Jan 9 18:16:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6007
6008 * decl.c (pushtag): Don't set TYPE_NAME to an identifier. Do push
6009 the decl when the type has no TYPE_NAME.
6010 (lookup_nested_type): Don't assume that type has TYPE_NAME set.
6011 (lookup_name_real): Call lookup_field with want_type =
6012 prefer_type.
6013
6014 * search.c (lookup_field): Handle want_type properly in the presence
6015 of fields with the same name.
6016
6017 * decl.c (set_nested_typename): Set nested name for file-scope types
6018 to include leading ::.
6019 (pushdecl): Set the nested typename if the decl doesn't have one,
6020 rather than if the type's canonical decl doesn't have one.
6021
e1cd6e56
MS
6022Mon Jan 9 03:44:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6023
6024 * typeck.c (convert_for_assignment): Complain about contravariance
6025 violation here.
6026 (comp_target_types): Instead of here.
6027 (build_unary_op): resolve_offset_ref before checking for a valid
6028 type.
6029
6030 * spew.c (yylex): Decrement looking_for_typename after we see a
6031 _DEFN.
6032
6033 * decl.c (pushdecl): Don't install an artificial TYPE_DECL in
f30432d7 6034 IDENTIFIER_LOCAL_VALUE if we already have a decl with that name.
e1cd6e56
MS
6035
6036 * typeck.c (convert_for_assignment): Converting pointers to bool
6037 does not need a cast.
6038
6039Sun Jan 8 18:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6040
6041 * class.c (instantiate_type): Initialize nsubsts parm.
6042
6043 * pt.c (do_function_instantiation): Ditto.
6044
6045Sat Jan 7 14:37:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6046
6047 * pt.c (tsubst): Use TREE_STATIC instead of DECL_INLINE &&
6048 DECL_SAVED_INSNS to determine whether or not we've seen a definition
6049 of this function.
6050 (instantiate_template): Ditto.
6051
6052 * call.c (convert_harshness): Allow const reference binding when
6053 called from the overloading code, but not when called from
6054 can_convert (since it isn't a conversion).
6055 (convert_harshness): Put back some disabled code.
6056
6057Fri Jan 6 14:10:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6058
6059 * call.c (convert_harshness): There is no implicit conversion from
6060 void* to other pointer types (unless the parameter is (void*)0).
6061 (convert_harshness): Non-lvalues do not convert to reference types.
6062
6063 * class.c (finish_struct_methods): Still set
f30432d7 6064 TYPE_HAS_{INT,REAL}_CONVERSION.
e1cd6e56
MS
6065
6066 * call.c (can_convert): Don't use aggregate initialization.
6067
6068 * cp-tree.h: Declare lookup_conversions.
6069
6070Thu Jan 5 21:08:00 1995 Mike Stump <mrs@cygnus.com>
6071
6072 * parse.y (simple_stmt): Fix duplicate case value error messages to
6073 be more readable.
6074
6075Wed Jan 4 16:44:19 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6076
6077 * cvt.c (build_type_conversion): Total rewrite to use
6078 convert_harshness instead of reproducing conversion logic here. Now
6079 much shorter.
6080
6081 * call.c (convert_harshness): Support conversions to bool.
6082 (can_convert): Checks whether a conversion is less harsh
6083 than USER_CODE, for build_type_conversion.
6084
6085 * search.c (add_conversions): Function for passing to dfs_walk which
6086 adds all the type conversion operators in the current type to a list.
6087 (lookup_conversions): Calls dfs_walk with add_conversions and return
6088 the list.
6089 (dfs_walk): Don't require a qfn.
6090
6091 * cp-tree.h: Lose CLASSTYPE_CONVERSIONS hackery.
6092 (CLASSTYPE_FIRST_CONVERSION): Points to elt 1 of CLASSTYPE_METHOD_VEC.
6093
6094 * class.c (finish_struct_bits): Lose CLASSTYPE_CONVERSIONS hackery.
6095 (grow_method): A separate function for building onto the growing
6096 method vector.
6097 (finish_struct_methods): Use it. Put all type conversion operators
6098 right after the constructors. Perhaps we should sort the methods
f30432d7 6099 alphabetically?
e1cd6e56
MS
6100
6101Mon Jan 2 14:42:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6102
6103 * call.c (build_method_call): Lose another misleading shortcut.
6104
6105Fri Dec 30 17:57:30 1994 Mike Stump <mrs@cygnus.com>
6106
6107 * gc.c (build_bltn_desc): Handle bool as a built-in type.
6108
6109Fri Dec 30 14:20:21 1994 Mike Stump <mrs@cygnus.com>
6110
6111 * tree.c (layout_vbasetypes): Ensure that we don't loose alignment
6112 on the complete type because of small virtual bases.
255512c1 6113
8145f082
MS
6114Fri Dec 30 12:22:29 1994 Mike Stump <mrs@cygnus.com>
6115
6116 * decl.c (n_incomplete): Bump n_incomplete up to int to match C
6117 front end.
6118 (pushdecl): Also count decls pushed that are of a type being defined
6119 as incomplete things.
6120 * class.c (finish_struct): Move hack_incomplete_structures up to
6121 just after we set it as not being defined, so that the decls we
6122 build for RTTI don't count as incomplete.
6123
6124Thu Dec 29 18:20:57 1994 Mike Stump <mrs@cygnus.com>
6125
6126 * pt.c (tsubst): Fix problem with defining constructors in templated
6127 classes with virtual bases.
6128
6129Wed Dec 28 08:31:00 1994 Mike Stump <mrs@cygnus.com>
6130
6131 * parse.y (TYPEID): Strip top-level cv-qualifiers on typeid
6132 expressions.
6133 * gc.c (build_typeid): Ditto.
6134
6135Thu Dec 22 17:26:33 1994 Mike Stump <mrs@cygnus.com>
6136
6137 * cvt.c (build_up_reference): Fix breakage introduced on Nov 29,
6138 don't assert on complex AGGR inits.
6139
6140Thu Dec 22 14:32:31 1994 Mike Stump <mrs@cygnus.com>
6141
6142 * method.c (build_overload_value): Handle pointer to members as
6143 template arguments.
6144
6145Thu Dec 22 13:09:07 1994 Mike Stump <mrs@cygnus.com>
6146
6147 * typeck.c (unary_complex_lvalue): Don't call sorry if we know how
6148 to do take the address of a data member for a pointer to data
6149 member.
6150
6151Thu Dec 22 10:04:19 1994 Mike Stump <mrs@cygnus.com>
6152
6153 * decl.c (grokdeclarator): Use the typedef name for linkage if the
6154 type doesn't otherwise have a name.
6155
6156 * decl2.c (grokfield): Ditto.
6157
6158 * class.c (finish_struct): Since we reuse the TYPE_DECL for the
6159 DECL_NAME of enums, structs and classes, we have to avoid trying to
6160 put it in the TYPE_FIELDS again.
6161
6162Wed Dec 21 11:07:05 1994 Mike Stump <mrs@cygnus.com>
6163
6164 * decl2.c (check_classfn): Ignore this parameter on static functions
6165 when checking to see if we match.
6166
6167Tue Dec 20 17:47:02 1994 Mike Stump <mrs@cygnus.com>
6168
6169 * typeck.c (unary_complex_lvalue): Handle address of non-left most
6170 pointers to members by calling get_delta_difference.
6171
5edb8b93
MS
6172Mon Dec 19 22:40:53 1994 Mike Stump <mrs@cygnus.com>
6173
6174 * decl2.c (check_classfn): Don't use decls_match yet, as it modifies
6175 static functions to early.
6176
6177Thu Dec 19 22:37:48 1994 Mike Stump <mrs@cygnus.com>
6178
6179 * method.c (make_thunk): Handle encoding of positive thunk offsets.
6180
6181Sat Dec 17 13:29:50 1994 Doug Evans <dje@canuck.cygnus.com>
6182
6183 * Make-lang.in (.PHONY): Tell GNU make C++ and c++ are phony targets.
6184
6060a796
MS
6185Thu Dec 15 16:32:12 1994 Mike Stump <mrs@cygnus.com>
6186
6187 * decl2.c (check_classfn): Use decls_match to check if this has
6188 already been declared, as the DECL_ASSEMBLER_NAME may have been
6189 changed via asm("new_name").
6190 * decl.c (decls_match): Make public.
6191
6192Thu Dec 15 15:17:55 1994 Mike Stump <mrs@cygnus.com>
6193
6194 * *.[chy] (expand_aggr_init) Add fourth argument to handle
6195 distinction between = init and (init) style of initializations.
6196 * *.[chy] (finish_decl): Add fifth argument to to handle
6197 distinction between = init and (init) style of initializations.
6198
6199Tue Dec 13 19:16:05 1994 Mike Stump <mrs@cygnus.com>
6200
6201 Fix some random `explicit' bugs.
6202
6203 * cvt.c (convert_to_reference): Add third parameter to
6204 convert_force.
6205 (convert_force): Ditto.
6206 * call.c (build_method_call): Ditto.
6207 * decl2.c (setup_vtbl_ptr): Ditto.
6208 * init.c (expand_virtual_init): Ditto.
6209 (build_member_call): Ditto.
6210 (build_delete): Ditto.
6211 (build_vbase_delete): Ditto.
6212 * typeck.c (build_component_addr): Ditto.
6213 (build_c_cast): Ditto.
6214 (build_modify_expr): Ditto.
6215 * cp-tree.h (CONV_NONCONVERTING): Ditto. Add so that we can
6216 distinguish the context in which the conversion appears. Add thrid
6217 argument to build_c_cast.
6218 * cvt.c (cp_convert): Pass whether or not we want to consider
6219 non-converting constructors down to build_method_call.
6220 * decl2.c (reparse_absdcl_as_casts): Add third argument to
6221 build_c_cast.
6222 * gc.c (build_m_desc): Ditto.
6223 * init.c (build_new): Ditto.
6224 * parse.y (expr_no_commas): Ditto.
6225 (primary): Ditto.
6226 * typeck.c (build_x_function_call): Ditto.
6227 (build_static_cast): Ditto.
6228 (build_reinterpret_cast): Ditto.
6229 (build_const_cast): Ditto.
6230 (build_c_cast): Ditto.
6231 (build_ptrmemfunc): Ditto.
6232 * typeck2.c (build_functional_cast): Ditto.
6233 * init.c (expand_aggr_init): Added LOOKUP_ONLYCONVERTING to
6234 expand_aggr_init_1 as inits are converted to the destination type.
6235
6236Tue Dec 13 16:18:57 1994 Jason Merrill <jason@phydeaux.cygnus.com>
6237
6238 * Make-lang.in (cc1plus): Depends on c-pragma.o.
6239
6240 * Makefile.in (OBJ{DEP,}S): Add ../c-pragma.o.
6241
6242 * lex.c (check_newline): If the #pragma is not recognized by g++,
6243 try machine-specific ones too.
6244 (handle_sysv_pragma): Copied from c-lex.c.
6245
6246Mon Dec 12 23:53:06 1994 Mike Stump <mrs@cygnus.com>
6247
6248 * except.c (expand_throw): Fix Dec 6th change, build_new likes a
6249 reference better.
6250
6251Mon Dec 12 18:01:00 1994 Jason Merrill <jason@phydeaux.cygnus.com>
6252
6253 * typeck.c (build_binary_op): Lose checks on TYPE_PTRMEMFUNC_P with
6254 IS_AGGR_TYPE, since now they will not both be set on the same type.
6255
6256 * pt.c (do_pending_expansions): Don't clear TREE_PUBLIC on
6257 instantiations controlled by -fexternal-templates.
6258
6259 * decl.c (duplicate_decls): Don't complain about different values of
6260 __attribute__ ((const)) and ((noreturn)).
6261
81cdf787
DE
6262Fri Dec 9 18:17:37 1994 Doug Evans <dje@cygnus.com>
6263
6264 * Makefile.in (BISONFLAGS): Delete --yacc.
6265 (PARSE_H): Depend on $(PARSE_C), for parallel makes.
6266 (PARSE_C): Undo last patch.
6267
be99da77 6268Fri Dec 2 10:44:36 1994 Mike Stump <mrs@cygnus.com>
30ffea6b 6269
3526f730 6270 * Makefile.in (BISONFLAGS): Add --yacc so that output winds up in
30ffea6b
MS
6271 y.tab.c.
6272
6060a796
MS
6273Thu Dec 8 17:39:46 1994 Jason Merrill <jason@phydeaux.cygnus.com>
6274
6275 * decl.c (finish_decl): Don't call obscure_complex_init for decls
6276 of indeterminate size.
6277
6278Wed Dec 7 16:49:22 1994 Jason Merrill <jason@phydeaux.cygnus.com>
6279
6280 * decl.c (obscure_complex_init): Function to tweak the decl to
6281 prevent expand_decl from tring to initialize it.
6282 (finish_decl): Use it rather than writing the same code in three
6283 different places.
6284
6285 * parse.y (bad_parm): Stop trying to support parms without types.
6286
6287Wed Dec 7 12:06:56 1994 Mike Stump <mrs@cygnus.com>
6288
6289 * decl2.c (grokfield): Make asm specs on static member functions
6290 work.
6291
6292Tue Dec 6 15:43:20 1994 Mike Stump <mrs@cygnus.com>
6293
6294 * except.c (expand_throw): Make a copy of the thrown object.
6295
6296Tue Dec 6 14:16:34 1994 Jason Merrill <jason@phydeaux.cygnus.com>
6297
6298 * parse.y: : has lower precedence than =.
6299
6300Tue Dec 6 12:46:17 1994 Mike Stump <mrs@cygnus.com>
6301
6302 * decl.c (pushdecl): Use DECL_NAME of VAR_DECLs to avoid namespace
6303 manglings.
6304 (grokvardecl): Add namespace into variable name.
6305
6306Tue Dec 6 11:26:55 1994 Mike Stump <mrs@cygnus.com>
6307
6308 * decl2.c (current_namespace_id): New routine to transform a simple
6309 name into a name in a namespace.
6310 * decl.c (grokdeclarator): Use it.
6311 * decl2.c (get_namespace_id): Find the name of the current
6312 namespace.
6313 (push_namespace, pop_namespace): Complete out missing
6314 functionality.
6315
6316Mon Dec 5 17:11:51 1994 Jason Merrill <jason@phydeaux.cygnus.com>
6317
6318 * class.c (finish_struct): Don't use LONG_LONG_TYPE_SIZE, as it may
6319 not be defined. Fix warning message for enums and restore warning
6320 for non-enums.
6321
6322 * decl2.c (push_namespace): Dummy function.
6323 (pop_namespace): Ditto.
6324 (do_namespace_alias): Ditto.
6325 (do_using_decl): Ditto.
6326 (do_using_directive): Ditto.
6327
6328 * parse.y: New token NSNAME for namespace names.
6329 (extdef): Add namespace, using definitions.
6330 (using_decl): New rule for using declarations.
6331 (any_id): New rule for identifiers with any degree of scoping.
6332 (identifier): Add NSNAME.
6333 (notype_identifier): Ditto.
6334 (component_decl): Add using_decl.
6335 (nested_name_specifier): Add NSNAME SCOPE.
6336
6337 * typeck.c (convert_for_assignment): Handle conversions between
6338 enums and bool.
6339
6340 * decl.c (duplicate_decls): Only propagate DECL_MAIN_VARIANT on
6341 FUNCTION_DECLs.
6342
6343Mon Dec 5 13:03:16 1994 Mike Stump <mrs@cygnus.com>
6344
6345 * class.c (finish_struct): Give an error if one tries to declare a
6346 bit-field's size greater than a long long, as the backend will dump.
6347 It is not an error to declare an enum bit-field greater than its
6348 precision. Warn if an enum bit-field is too small to hold all
6349 its values.
6350
6351Mon Dec 5 11:41:50 1994 Mike Stump <mrs@cygnus.com>
6352
6353 * typeck.c (convert_for_assignment): Use cp_convert instead of
6354 convert so that we don't get static casts.
6355
6356Sun Dec 4 11:59:01 1994 Mike Stump <mrs@cygnus.com>
6357
6358 * cvt.c (cp_convert): Don't complain about int->enum conversion if
6359 we are doing static casts.
6360
6361Fri Dec 2 18:32:41 1994 Mike Stump <mrs@cygnus.com>
6362
6363 * error.c (dump_expr): Do something more intelligent with SAVE_EXPRs
6364 when dumping expressions in error messages.
6365
6366Fri Dec 2 17:04:27 1994 Mike Stump <mrs@cygnus.com>
6367
6368 * gc.c (build_dynamic_cast): Change interface to libg++, ensure that
f30432d7 6369 the return type is the right type, and make references work.
6060a796
MS
6370
6371Fri Dec 2 16:36:43 1994 Jason Merrill <jason@phydeaux.cygnus.com>
6372
6373 * decl.c (poplevel): Don't be confused by function-scope
6374 declarations of non-nested functions.
6375 (duplicate_decls): Propagate DECL_MAIN_VARIANT.
6376 (pushdecl): Use duplicate_decls to copy info from old decl into new
6377 function-scope one rather than doing it here.
6378
6379 * decl2.c (mark_inline_for_output): Deal with the DECL_MAIN_VARIANT
6380 of this decl, in case this is a function-scope declaration.
6381
6382 * decl.c (finish_enum): Make sure that the type has the right
6383 precision when we call fixup_*_type.
6384
6385Tue Nov 29 19:12:07 1994 Jason Merrill <jason@phydeaux.cygnus.com>
6386
6387 * cvt.c (build_up_reference): Strip superfluous NOP_EXPRs; we do
6388 want to build up references to rvalues if possible.
6389 (cp_convert): Stick on a NOP_EXPR when converting to the same type.
6390
6391Tue Nov 29 11:28:59 1994 Mike Stump <mrs@cygnus.com>
6392
6393 * parse.y (maybe_raises): Handle throw ().
6394 * parse.y (ansi_raise_identifier): grok type-ids in exception
6395 specifications.
6396 * tree.c (build_exception_variant): Use list compare to check if
6397 two exception specifications match.
6398 * decl.c (duplicate_decls, bad_specifiers): Enhance wording on error
6399 messages.
6400 * call.c (build_method_call): Remove TREE_RAISES.
6401 * cvt.c (convert_to_aggr): Ditto.
6402 * typeck.c (build_function_call_real, convert_arguments): Ditto.
6403 * init.c (expand_aggr_init_1): Ditto.
6404
6405Tue Nov 29 09:50:39 1994 Mike Stump <mrs@cygnus.com>
6406
6407 * except.c: Add support for m68k and mips exception handling
6408 support.
6409
6410Tue Nov 29 08:48:33 1994 Mike Stump <mrs@cygnus.com>
6411
6412 * except.c (expand_end_all_catch): Throw into outer context, if we
6413 fall off end of catch handlers.
6414
db5ae43f
MS
6415Mon Nov 28 16:44:41 1994 Mike Stump <mrs@cygnus.com>
6416
6417 * Makefile.in: Make is easier to decide where parse.[ch] will be
6418 built.
6419
af824546
DE
6420Thu Nov 17 20:11:24 1994 Doug Evans <dje@cygnus.com>
6421
6422 * cp/Make-lang.in (CXX_INSTALL_NAME) Use program_transform_name.
6423 (GXX_INSTALL_NAME) Likewise.
6424 (CXX_CROSS_NAME) Use program_transform_cross_name.
6425 (GXX_CROSS_NAME) Likewise.
6426 (c++.install-man): Use program_transform_name on g++.1.
6427 (c++.uninstall): Likewise.
6428
db5ae43f
MS
6429Mon Nov 28 13:53:03 1994 Mike Stump <mrs@cygnus.com>
6430
6431 * parse.y (THROW): Fix precedence of throw expressions.
6432
6433Mon Nov 28 13:15:16 1994 Mike Stump <mrs@cygnus.com>
6434
6435 * typeck.c (build_unary_op): Allow promotions from bool to int on
6436 unary ~.
6437
6438Sun Nov 27 00:16:21 1994 Jason Merrill <jason@phydeaux.cygnus.com>
6439
6440 * method.c (build_overload_name): Use DECL_ASSEMBLER_NAME for
6441 classes when appropriate.
6442 (build_overload_nested_name): When dealing with a function context,
6443 use ASM_FORMAT_PRIVATE_NAME to tweak the name of the function to
6444 avoid conflicts between local classes of the same name.
6445
6446Wed Nov 23 17:59:42 1994 Mike Stump <mrs@cygnus.com>
6447
6448 * gxx.gperf, parse.y, lex.h, hash.h, lex.c (init_lex), delc.c
6449 (duplicate_decls, grokdeclarator), cp-tree.h: Add support for
6450 `explicit'.
6451 * cvt.c (convert_to_reference, cp_convert, build_type_conversion_1,
6452 build_type_conversion): Use LOOKUP_ONLYCONVERTING in
6453 build_method_calls so that non-converting constructors are not used.
6454 * call.c (build_method_call): If we shouldn't use a non-converting
6455 constructor, then don't.
6456
6457Wed Nov 23 14:46:56 1994 Jason Merrill <jason@phydeaux.cygnus.com>
6458
6459 * call.c (build_method_call): Don't try to synthesize methods yet.
6460
6461Tue Nov 22 12:45:21 1994 Jason Merrill <jason@phydeaux.cygnus.com>
ea943e1d 6462
db5ae43f
MS
6463 * pt.c (push_template_decls): Create CONST_DECLs for template
6464 constant parameters, not VAR_DECLs.
6465
6466Sat Nov 19 15:28:31 1994 Jim Wilson (wilson@chestnut.cygnus.com)
6467
6468 * typeck.c (build_binary_op_nodefault): Can shorten shift only if
6469 shift count is less than size in bits of arg0.
6470
6471Thu Nov 17 15:30:50 1994 Mike Stump <mrs@cygnus.com>
6472
6473 * gxx.gperf, hash.h, lex.c (init_lex, real_yylex), parse.y: Add new
6474 ANSI keywords and, and_eq, bitand, bitor, explicit, namespace, not,
6475 not_eq, or, or_eq, typename, using, xor, xor_eq to g++. Still need
6476 to add support for explicit, namespace, typename, and using, support
6477 for the rest is already in.
6478
db5ae43f
MS
6479Fri Nov 4 19:04:18 1994 Mike Stump <mrs@cygnus.com>
6480
6481 * gc.c (get_bad_cast_node): New routine to support compile time
6482 throws of bad_cast.
6483 * gc.c (build_dynamic_cast): Support throwing of bad_cast at compile
6484 time.
6485
6486Fri Nov 4 11:12:00 1994 Mike Stump <mrs@cygnus.com>
6487
6488 * except.c: Add hppa support.
6489
6490Fri Nov 4 10:50:50 1994 Mike Stump <mrs@cygnus.com>
6491
6492 * except.c: Add rs6000 support.
6493
6494Thu Nov 3 14:24:23 1994 Mike Stump <mrs@cygnus.com>
6495
6496 * except.c (do_unwind): Add i[34]86 support.
6497
6498Thu Nov 3 00:10:46 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6499
6500 * pt.c (do_pending_expansions): Unset TREE_PUBLIC on implicit
6501 instantiations.
6502
6503Wed Nov 2 15:08:24 1994 Kung Hsu (kung@mexican.cygnus.com)
6504
6505 * decl.c (finish_function): emit types used in method parameters
6506 into symbol table.
6507
6508Wed Nov 2 15:05:47 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6509
6510 * pt.c (process_template_parm): Allow pointer to member function
6511 template parameter types.
6512 (uses_template_parms): Handle pointer to member function
6513 CONSTRUCTORs.
6514
6515 * g++.c (main): Cast first argument of bzero to (char *).
6516 Pass -lstdc++ instead of -lg++ unless we are invoked as 'g++'.
6517
6518Mon Oct 31 14:50:48 1994 Kung Hsu (kung@mexican.cygnus.com)
6519
6520 * gc.c (build_dynamic_cast): rewrite to make it work.
6521 * class.c (finish_vtbls): build more vtables if flag_rtti is on.
6522 * class.c (modify_all_direct_vtables): ditto.
6523 * init.c (expand_direct_vtbls_init): expand more vtables if
6524 flag_rtti is on.
6525 * decl.c (init_type_desc): add default return.
6526
6527Tue Oct 25 17:13:09 1994 Kung Hsu (kung@mexican.cygnus.com)
6528
6529 * tree.c (debug_binfo): get rid of the initial size entry of
6530 vtable.
6531 * cp-tree.h: change flag_dossier to flag rtti, define type
6532 descriptor type nodes.
6533 * decl.c (init_type_desc): new function to initialize type
6534 descriptor type nodes.
6535 * decl.c (record_builtin_type): change flag_dossier to flag_rtti.
6536 * lex.c (init_lex): ditto.
6537 * decl.c : change variable flag_dossier to flag_rtti.
6538 * decl.c (duplicate_decls): get rid initial size entry of vtable.
6539 * decl.c (hack_incomplete_structures): take out assert 164.
6540 * search.c (get_abstract_virtuals_1): ditto.
6541 * search.c (dfs_init_vbase_pointers): change CLASSTYPE_DOSSIER to
6542 CLASSTYPE_RTTI.
6543 * parse.y: ditto.
6544 * class.c (prepare_fresh_vtable): for virtual bases, get right
6545 offset.
6546 * class.c (add_virtual_function): change flag_dossier to
6547 flag_rtti.
6548 * class.c (modify_one_vtable): modify the right rtti entry.
6549 * class.c (override_one_vtable): get rid of size entry.
6550 * class.c (finish_struct): change flag_dossier to flag_rtti, and
6551 build extra vtables, build type descriptors for polymorphic
6552 classes.
6553 * gc.c (build_headof): make headof() works correctly with new
6554 rtti.
6555 * gc.c (build_typeid): make this function work with new rtti.
6556 * gc.c (get_typeid): make this function work with new rtti.
6557 * gc.c (build_bltn_desc): new function for new rtti.
6558 * gc.c (build_user_desc): ditto.
6559 * gc.c (build_class_desc): ditto.
6560 * gc.c (build_ptr_desc): ditto.
6561 * gc.c (build_attr_desc): ditto.
6562 * gc.c (build_func_desc): ditto.
6563 * gc.c (build_ptmf_desc): ditto.
6564 * gc.c (build_ptmd_desc): ditto.
6565 * gc.c (build_t_desc): ditto.
6566 * gc.c : comment out old build_t_desc, build_i_desc, build_m_desc.
6567
6568Tue Oct 25 13:37:41 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6569
6570 * call.c (convert_harshness): Check for TREE_UNSIGNED differences
6571 after checking for integral conversions.
ea943e1d 6572
72b7eeff
MS
6573Wed Nov 30 19:13:50 1994 Mike Stump <mrs@cygnus.com>
6574
6575 * Version 2.6.3 released.
6576
6577Thu Nov 17 10:56:50 1994 Jason Merrill <jason@phydeaux.cygnus.com>
6578
6579 * typeck2.c (build_m_component_ref): Check the basetype of the
6580 member pointer against the main variant of the object type.
6581
6582Mon Nov 14 14:21:52 1994 Jason Merrill <jason@phydeaux.cygnus.com>
6583
6584 * cvt.c (convert_to_reference): Make sure that the original expr
6585 gets its type back when converting a reference.
6586
6587 * method.c (build_overload_name): Clear numeric_outputed_need_bar here.
6588 (build_decl_overload): Instead of here.
6589
6590Tue Nov 8 17:11:24 1994 Jason Merrill <jason@phydeaux.cygnus.com>
6591
6592 * cvt.c (cp_convert): Don't build a TARGET_EXPR if we're not in a
6593 function.
6594
6595 * typeck.c (convert_for_initialization): Handle initialization from
6596 a TARGET_EXPR.
6597
6598Sun Nov 6 01:34:24 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6599
6600 * pt.c (lookup_nested_type_by_name): Fix list-walking logic.
6601 (tsubst): When replacing a TEMPLATE_TYPE_PARM, propagate
6602 TYPE_READONLY and TYPE_VOLATILE from the argument.
6603 (unify): When unifying with a TEMPLATE_TYPE_PARM, remove cv-quals
6604 present in parm from arg.
6605 (type_unification): Strip REFERENCE_TYPE from the argument type.
6606 (unify): Don't strip REFERENCE_TYPE from the argument type.
6607
6608Sat Nov 5 22:42:15 1994 Greg McGary (gkm@magilla.cichlid.com)
6609
6610 * pt.c (do_type_instantiation): Check to see if there's a
6611 IDENTIFIER_TEMPLATE on a class before calling
6612 instantiate_member_templates().
6613
6614Sat Nov 12 06:35:42 1994 Mike Stump <mrs@cygnus.com>
6615
6616 * Version 2.6.2 released.
6617
6618Thu Nov 3 18:48:19 1994 Paul Eggert <eggert@twinsun.com>
6619
6620 * Makefile.in (spew.o, lex.o, pt.o):
6621 Depend on $(srcdir)/parse.h, not parse.h.
6622
6623Tue Nov 1 19:19:41 1994 Mike Stump <mrs@cygnus.com>
6624
6625 * Version 2.6.1 released.
6626
eae89e04
JM
6627Sun Oct 23 13:19:55 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6628
db5ae43f
MS
6629 * decl2.c: Declare flag_access_control.
6630 (struct lang_f_options): Add access-control.
6631 * expr.c (cplus_expand_expr, NEW_EXPR): Unset flag_access_control
6632 for the call to expand_aggr_init to copy the object out of the
6633 pcc_struct_return slot.
6634 * search.c (compute_access): if (!flag_access_control) return
6635 access_public.
eae89e04
JM
6636
6637Fri Oct 21 00:32:54 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6638
db5ae43f
MS
6639 * lex.c (cons_up_default_function): Don't try to defer method
6640 synthesis now.
6641
6642 * decl.c (init_decl_processing): Use __pure_virtual for abort_fndecl
6643 instead of abort, since the OSF/1 dynamic linker doesn't like to see
6644 relocation entries for abort.
eae89e04 6645
db5ae43f
MS
6646 * tree.c (array_type_nelts_total): Use sizetype, not
6647 integer_type_node.
6648 (array_type_nelts_top): Ditto.
6649
6650Thu Oct 20 15:48:27 1994 Mike Stump <mrs@cygnus.com>
6651
6652 * decl.c (grokdeclarator): Added handling for catch parameters
6653 (CATCHPARM).
6654 * except.c (expand_start_catch_block): Use the new CATCHPARM context
6655 instead of NORMAL.
6656 * except.c (expand_throw): Don't let convert_to_reference complain
6657 about what we are doing.
6658
6659Thu Oct 20 12:55:24 1994 Jim Wilson (wilson@cygnus.com)
6660
6661 * method.c (emit_thunk): Call instantiate_virtual_regs.
6662
6663Wed Oct 19 14:15:33 1994 Mike Stump <mrs@cygnus.com>
6664
6665 * except.c (expand_exception_blocks): Make sure throw code doesn't
6666 get put in function that won't be output.
eae89e04
JM
6667
6668Mon Oct 17 18:03:15 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6669
db5ae43f
MS
6670 * decl.c (init_decl_processing): Make alloca a builtin.
6671
6672Thu Oct 27 21:10:25 1994 Craig Burley (craig@burley)
6673
6674 * g++.c (main): Only decrement "added" and set "library" to
6675 NULL when "library" != NULL (just like 940829 fix).
eae89e04 6676
c199879d
MS
6677Mon Oct 17 15:56:11 1994 Mike Stump <mrs@cygnus.com>
6678
6679 * except.c (expand_start_catch_block): Make sure the false label
6680 gets onto the permanent obstack, as it is used for the exception
6681 table.
6682
13306d4f
MS
6683Fri Oct 14 18:54:48 1994 Mike Stump <mrs@cygnus.com>
6684
6685 * class.c (modify_one_vtable): Since the DECL_CONTEXT of fndecl can
6686 be set just below, use current_fndecl instead.
6687
db5ae43f
MS
6688Fri Oct 14 15:12:22 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6689
6690 * init.c (expand_aggr_vbase_init_1): Don't call expand_aggr_init_1
6691 with LOOKUP_SPECULATIVELY.
6692 (expand_default_init): Abort if build_method_call returns NULL_TREE.
6693
6694 * typeck.c (build_modify_expr): Don't just build a MODIFY_EXPR if
6695 the rhs is a TARGET_EXPR.
6696
6697 * parse.y (left_curly): Anonymous types are not affected by #pragma
6698 interface/implementation.
6699
6700 * method.c (synthesize_method): Don't call setup_vtbl_ptr for the
6701 default constructor if it isn't needed.
6702
6703 * lex.c (cons_up_default_function): Do synthesize methods for
6704 anonymous types if necessary.
6705
2f4f907d
JM
6706Thu Oct 13 17:44:55 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6707
db5ae43f 6708 * method.c (build_decl_overload): Set numeric_outputed_need_bar to 0.
2f4f907d
JM
6709
6710Wed Oct 12 13:27:57 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6711
db5ae43f
MS
6712 * typeck.c (build_modify_expr): Understand how to copy an aggregate.
6713
6714 * init.c (expand_default_init): Ditto. Also remove some of the
6715 crufty code that assumes methods will not be synthesized properly.
6716
6717 * lex.c (cons_up_default_function): If the containing type has no
6718 name, these functions should never need to be called, so just
6719 declare them.
2f4f907d 6720
db5ae43f
MS
6721 * lex.c (real_yylex): Use HOST_BITS_PER_WIDE_INT to determine the
6722 bitmask for lexing character constants.
6723
6724 * call.c (build_method_call): Disable code that tries to do tricky
6725 stuff with a default parameter that is a constructor call, but
6726 actually does other tricky stuff that breaks things.
2f4f907d
JM
6727
6728Wed Oct 12 16:14:01 1994 Benoit Belley <belley@cae.ca>
6729
db5ae43f
MS
6730 * decl.c (finish_enum): Disable code which forces enums to be signed,
6731 since this conflicts with their use as bitfields. type_promotes_to
6732 handles promotion of enums of underlying unsigned types to signed
6733 integer types.
2f4f907d
JM
6734
6735Wed Oct 12 13:24:03 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6736
db5ae43f
MS
6737 * cvt.c (type_promotes_to): Also promote enums to long if
6738 appropriate.
2f4f907d 6739
db5ae43f
MS
6740 * typeck.c (default_conversion): Don't expect type_promotes_to to
6741 return a main variant.
2f4f907d
JM
6742
6743Wed Oct 12 12:19:45 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6744
db5ae43f
MS
6745 * call.c (build_scoped_method_call): Don't lose side effects in the
6746 object expression when calling a non-existent destructor.
2f4f907d
JM
6747
6748Fri Sep 2 19:05:21 1994 Rohan Lenard (rjl@iassf.easams.com.au)
6749
db5ae43f
MS
6750 * call.c (build_scoped_method_call): Remove erroneous error message
6751 when destructor call is written as a scoped call.
2f4f907d 6752
252b87c7 6753Tue Oct 11 23:48:31 1994 Jason Merrill (jason@phydeaux.cygnus.com)
db5ae43f
MS
6754
6755 * various: Cast pointer arguments to bzero and bcopy to char *.
252b87c7 6756
13306d4f
MS
6757Tue Oct 11 19:34:32 1994 Mike Stump <mrs@cygnus.com>
6758
6759 * class.c (get_derived_offset): Added a type parameter to limit how
6760 far up the CLASSTYPE_VFIELD_PARENT chain we search.
6761 * class.c (modify_one_vtable, fixup_vtable_deltas): When forming the
6762 offset to put into the vtable for the this parameter, make sure we
6763 don't offset from a parent of the DECL_CONTEXT of the function.
6764
db5ae43f
MS
6765Tue Oct 11 16:10:52 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6766
6767 * pt.c (do_function_instantiation): Set DECL_EXTERNAL and
6768 TREE_STATIC when setting DECL_INTERFACE_KNOWN.
6769 (do_type_instantiation): Ditto.
6770
6771 * lex.c (cons_up_default_function): Set DECL_INTERFACE_KNOWN,
6772 DECL_EXTERNAL and TREE_STATIC as appropriate.
6773
6774 * decl2.c (finish_file): Also synthesize methods that don't have
6775 DECL_EXTERNAL set. Set interface_unknown before doing so.
6776
6777 * decl.c (start_function): If DECL_INTERFACE_KNOWN is set on the
6778 function decl, don't muck with TREE_PUBLIC and DECL_EXTERNAL.
6779
cba8ba35
JM
6780Mon Oct 10 00:56:53 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6781
db5ae43f
MS
6782 * lex.c (cons_up_default_function): Mark methods in a template class
6783 as template instances. Store the values of interface_unknown and
6784 interface_only for do_pending_inlines.
6785 (do_pending_inlines): Use them.
6786
6787 * decl2.c (finish_file): If we haven't seen a definition of a
6788 function declared static, make the decl non-PUBLIC so compile_file
6789 can give an error.
cba8ba35
JM
6790
6791Sun Oct 9 02:42:29 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6792
db5ae43f
MS
6793 * method.c (do_build_copy_constructor): Handle anonymous unions.
6794 (do_build_assign_ref): Ditto.
6795 (largest_union_member): Move from lex.c.
6796
6797Sat Oct 8 14:59:43 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6798
6799 Re-implement g++'s vague linkage independent of TREE_PUBLIC.
6800 * pt.c (instantiate_member_templates): Lose redundant
6801 -fexternal-templates handling.
6802 (tsubst): Set TREE_PUBLIC and DECL_EXTERNAL on new decls. Don't set
6803 TREE_STATIC or DECL_INTERFACE_KNOWN.
6804 (do_pending_expansions): Predicate on DECL_INTERFACE_KNOWN instead
6805 of DECL_EXTERNAL for explicit instantiations.
6806 (do_function_instantiation): Do the new thing.
6807 (do_type_instantiation): Ditto.
6808 (instantiate_template): Deal with member templates defined in a .cc
6809 file with -fexternal-templates.
6810 * except.c (expand_exception_blocks): Use DECL_LINKAGE_KNOWN to
6811 decide whether to stick builtin_throw here.
6812 * decl2.c (import_export_inline): Predicate on DECL_INTERFACE_KNOWN
6813 rather than TREE_PUBLIC. Generally fix rules.
6814 (finish_file): Use DECL_INITIAL to determine whether or not a method
6815 has been synthesized, rather than TREE_ASM_WRITTEN.
6816 * decl.c (warn_extern_redeclared_static): Use DECL_PUBLIC instead of
6817 TREE_PUBLIC.
6818 (pushdecl): Ditto.
6819 (duplicate_decls): Ditto. Deal with DECL_DECLARED_STATIC and
6820 DECL_INTERFACE_KNOWN.
6821 (redeclaration_error_message): Fix checking for conflicting linkage.
6822 (define_function): Set DECL_INTERFACE_KNOWN.
6823 (grokfndecl): Function decls are PUBLIC until we are sure about
6824 their linkage. Set DECL_DECLARED_STATIC as needed.
6825 (start_function): Deal with linkage. Move pushdecl after linkage
6826 magic.
6827 (finish_function): Don't set TREE_ASM_WRITTEN on discarded inlines.
6828 * cp-tree.h (lang_decl_flags): Add interface_known and
6829 declared_static.
6830 (DECL_INTERFACE_KNOWN): New macro.
6831 (DECL_DECLARED_STATIC): New macro.
6832 (DECL_PUBLIC): New macro.
6833
6834 Clean up bogus use of TREE_PUBLIC.
6835 * class.c (alter_access): Fix mistaken use of TREE_PUBLIC (it
6836 doesn't correspond to TREE_PROTECTED and TREE_PRIVATE).
6837 * init.c (do_friend): Don't arbitrarily set TREE_PUBLIC.
cba8ba35
JM
6838
6839Wed Oct 5 13:44:41 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6840
db5ae43f
MS
6841 * call.c (build_overload_call_real): Don't immediately do
6842 array->pointer conversion.
cba8ba35 6843
db5ae43f
MS
6844 * pt.c (type_unification): If not passing to a reference, strip
6845 cv-quals. Also handle array->pointer conversion.
cba8ba35
JM
6846
6847Tue Oct 4 17:45:37 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6848
db5ae43f
MS
6849 * decl.c (grokdeclarator): Don't warn about applying const to a
6850 const typedef or template type parameter.
6851
6852 * decl2.c (finish_file): Also synthesize methods after walking the
6853 vtables. Ugly ugly ugly.
cba8ba35
JM
6854
6855Mon Oct 3 15:02:41 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6856
db5ae43f
MS
6857 * various: Remove lingering remnants of old exception handling code.
6858
6859 * decl2.c (finish_file): Synthesize methods before walking the
6860 vtables, so that the vtables get emitted as needed.
6861
6862 * decl.c (shadow_tag): Remove obsolete code for pushing tags and
6863 dealing with exceptions.
6864
6865Mon Oct 3 13:05:27 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
6866
6867 * Make-lang.in (g++-cross): Depend upon version.o and $(LIBDEPS).
6868
6869Mon Oct 3 02:59:28 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6870
6871 * decl2.c (finish_file): Fix inline handling.
cba8ba35
JM
6872
6873Sun Oct 2 00:21:56 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6874
db5ae43f
MS
6875 * decl.c (grokdeclarator): Handle redundant scope even better.
6876 ({push,pop}_cp_function_context): Take toplev parameter.
cba8ba35 6877
db5ae43f
MS
6878 * method.c (synthesize_method): Pass toplev parameter to
6879 {push,pop}_cp_function_context depending on decl_function_context
6880 (fndecl).
cba8ba35 6881
db5ae43f
MS
6882 * typeck.c (build_x_unary_op): Unary & on OFFSET_REFs is always the
6883 built-in version.
cba8ba35 6884
db5ae43f
MS
6885 * method.c (synthesize_method): Don't be confused by __in_chrg
6886 parameter.
b3738072 6887
db5ae43f 6888 * class.c (popclass): Set C_C_D like start_function does.
b3738072 6889
db5ae43f 6890 * decl.c (grokdeclarator): Handle redundant scope better.
81613e43 6891
db5ae43f
MS
6892 * parse.y (expr_or_declarator): Add '(' expr_or_declarator ')' rule.
6893 (direct_notype_declarator): Ditto.
6894 (complex_direct_notype_declarator): Remove it here.
81613e43 6895
db5ae43f 6896Sat Oct 1 21:42:18 1994 Jason Merrill (jason@deneb.cygnus.com)
44c5421f 6897
db5ae43f
MS
6898 * init.c (resolve_offset_ref): Fix types used in resolving .*
6899 expressions.
6900
6901Sat Oct 1 15:18:49 1994 Jason Merrill (jason@phydeaux.cygnus.com)
6902
6903 Beginnings of work to synthesize methods only when needed.
6904 * call.c (build_method_call): Synthesize methods as necessary
6905 (currently never necessary).
6906 * class.c (popclass): Don't try to set C_C_D here, as it'll end up
6907 on the wrong obstack.
6908 * decl.c (push_cp_function_context): Mostly copied from
6909 push_c_function_context.
6910 (pop_cp_function_context): Similarly.
6911 (finish_function): Reverse order of poplevel and pop_nested_class so
6912 that current_class_decl is restored properly.
6913 (start_function): Ditto.
6914 (finish_function): Add parameter 'nested'. Don't call
6915 permanent_allocation if (nested).
6916 * various: Pass extra parameter to finish_function.
6917 * decl2.c (finish_file): Reorganize end-of-file inline handling,
6918 synthesizing methods as necessary.
6919 * lex.c (cons_up_default_function): Call mark_inline_for_output.
6920 Only synthesize methods immediately if #pragma implementation
6921 (currently disabled).
6922 (do_pending_inlines): Call synthesize_method.
6923 * method.c (synthesize_method): New function; all method synthesis
6924 goes through here. Calls do_build_assign_ref and
6925 do_build_copy_constructor.
6926 (build_default_constructor): Remove.
6927 (build_dtor): Ditto.
6928 (build_assign_ref): Rename to do_build_assign_ref and remove stuff
6929 done by synthesize_method.
6930 (build_copy_constructor): Similarly.
44c5421f 6931
eac293a1
MS
6932Thu Sep 29 16:58:52 1994 Mike Stump <mrs@cygnus.com>
6933
6934 * typeck.c (c_expand_return): Use magic so the backend can fixup the
6935 assignment into the return register, so cleanups won't clobber it.
6936
6937Thu Sep 29 13:08:50 1994 Jason Merrill (jason@deneb.cygnus.com)
6938
6939 * method.c (hack_identifier): Don't call assemble_external for
6940 template decls.
6941
6942 * decl.c (finish_decl): Also end temporary allocation if the decl in
6943 question has a type of error_mark_node.
6944
6060a796 6945Wed Sep 28 21:45:00 1994 Mike Stump <mrs@cygnus.com>
eac293a1
MS
6946
6947 * typeck.c (build_modify_expr): When optimizing ?: on lhs, make sure
6948 that if the ?: was a reference type, that the subparts will be also.
6949
6950Wed Sep 28 16:14:04 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
6951
6952 * except.c (register_exception_table): Use Pmode, not PTRmode.
6953
6954Fri Sep 23 13:54:27 1994 Jason Merrill (jason@deneb.cygnus.com)
6955
6956 * lex.c (do_pending_inlines): Do method synthesis after the
6957 pending_inlines have been reversed.
6958
f376e137
MS
6959Thu Sep 22 12:53:03 1994 Per Bothner (bothner@kalessin.cygnus.com)
6960
6961 * decl2.c (finish_file): Fix Brendan's fix: Only call
6962 register_exception_table if there is a non-empty exception table.
6963
6964Thu Sep 22 12:03:46 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
6965
6966 * decl2.c (finish_file): Only do register_exception_table if
6967 -fhandle-exceptions is being used.
6968
6969Wed Sep 21 19:01:51 1994 Per Bothner (bothner@kalessin.cygnus.com)
6970
6971 * except.c (output_exception_table_entry): Simplify
6972 by using assemble_integer.
6973 (build_exception_table): Change to return a count.
6974 Cleanup to use standard macros, instead of hard-wired
6975 sparc asm format. Don't make __EXCEPTION_TABLE__ global.
6976 (register_exception_table): New function. Generate call to builtin.
6977 * decl2.c (finish_file): Call register_exception_table.
6978 * cp-tree.h (build_exception_table): Fix prototype.
6979
6980Wed Sep 21 13:20:42 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
6981
6982 * tree.c (break_out_calls): Don't try to duplicate the DECL_INITIAL.
6983
6984 * decl2.c (delete_sanity): Give an error at trying to delete a
6985 function.
6986
6987Wed Sep 21 11:47:10 1994 Jason Merrill (jason@deneb.cygnus.com)
6988
6989 * lex.c (cons_up_default_function): Mark synthesized destructors
6990 inline.
6991
6992 * decl.c (duplicate_decls): Ignore redeclarations of wchar_t as
6993 something other than __wchar_t, complaining if -pedantic and not in
6994 a system header.
6995
6996Tue Sep 20 09:43:28 1994 Jason Merrill (jason@deneb.cygnus.com)
6997
6998 * decl.c (xref_tag): Set up BINFO_INHERITANCE_CHAIN on base binfos
6999 here.
7000
7001 * typeck.c (build_modify_expr): Require complete type after checking
7002 for error_mark_node.
7003
7004 * call.c (build_method_call): Print parmtypes when complaining of
7005 ambiguous call.
7006
7007 * typeck.c (build_modify_expr): Handle assignment to array from
7008 non-array.
7009
7010 * decl.c (lookup_name_real): Deal with got_scope == error_mark_node.
7011
7012 * call.c (build_method_call): Don't bother with the exact match.
7013
7014Mon Sep 19 00:51:39 1994 Jason Merrill (jason@deneb.cygnus.com)
7015
7016 * init.c (expand_aggr_init): If we munge the type of the variable,
7017 also munge the type of the initializer.
7018
7019 * decl.c (grokdeclarator): Use <= when comparing to RID_LAST_MODIFIER.
7020 (init_decl_processing): Push artificial declaration of wchar_t so
7021 people don't have to declare it before they can use it.
7022
7023 * error.c (cp_line_of): return lineno in lieu of 0.
7024
7025 * typeck.c (convert_for_assignment): Handle conversion of pmfs to
7026 int and bool.
7027 (build_component_ref): Fold the COMPONENT_REF in case it can be
7028 reduced.
7029
7030 * typeck2.c (store_init_value): Don't pedwarn about non-constant
7031 bracketed initializers for automatic variables.
7032
7033Sun Sep 18 10:12:12 1994 Jason Merrill (jason@deneb.cygnus.com)
7034
7035 * error.c (dump_decl): Don't say `typedef enum foo foo'.
7036
7037 * decl.c (start_decl): Don't set TREE_PUBLIC on template decls just
7038 because they're affected by #pragma i/i. We'll deal with that when
7039 they get instantiated.
7040
7041 * typeck.c (build_unary_op): Clean up cruft in ADDR_EXPR case.
7042
7043 * class.c (instantiate_type): Set TREE_CONSTANT on instantiated
7044 ADDR_EXPRs if appropriate.
7045
7046 * decl.c (build_ptrmemfunc_type): Unset IS_AGGR_TYPE on pmf types.
7047
7048 * typeck.c (build_ptrmemfunc): Handle &overloaded_method as an
7049 initializer properly.
7050 * typeck2.c (digest_init): Ditto.
7051
7052 * tree.c (cp_build_type_variant): Like c_build_type_variant, except
7053 it uses build_cplus_array_type.
7054 * *.c: Use cp_build_type_variant instead of c_build_type_variant.
7055
7056 * pt.c (do_type_instantiation): Don't try to instantiate nested
db5ae43f 7057 enums.
f376e137
MS
7058
7059Tue Sep 13 10:56:58 1994 Jason Merrill (jason@deneb.cygnus.com)
7060
7061 * cvt.c (build_up_reference): Handle preincrement and predecrement
db5ae43f 7062 properly.
f376e137
MS
7063
7064Tue Sep 13 09:51:59 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
7065
7066 * decl.c (finish_decl): Only lay out the rtl for DECL if it is, in
7067 fact, static.
7068
7069Mon Sep 12 14:40:30 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
7070
7071 * decl.c (finish_decl): Lay out the rtl for DECL before doing
7072 grok_reference_init, in case it's static.
7073
7074Mon Sep 12 12:45:38 1994 Jason Merrill (jason@deneb.cygnus.com)
7075
7076 * class.c (finish_struct): Don't synthesize constructors if the
7077 class has a field with the same name as the class. Don't die on
7078 classes with no constructors or destructors. Don't die if the head
7079 and tail of the class are in different files.
7080
7081 * decl.c (grokdeclarator): Don't treat a function pointer field
7082 with the same name as the class as a constructor.
7083
7084Fri Sep 9 13:17:00 1994 Jason Merrill (jason@deneb.cygnus.com)
7085
7086 * typeck.c (build_c_cast): Pull constant values out of their
7087 variables here.
7088
7089 * decl.c (duplicate_decls): Only propagate DECL_CHAIN in
7090 FUNCTION_DECLs and TEMPLATE_DECLs.
7091
7092Thu Sep 8 10:07:48 1994 Jason Merrill (jason@deneb.cygnus.com)
7093
7094 * decl.c (duplicate_decls): Propagate DECL_CHAIN in all DECLs that
7095 have it.
7096
7097 * pt.c (unify): REALs and INTEGERs only unify with their own genus.
7098 (instantiate_member_templates): Don't muck with DECL_EXTERNAL and
7099 TREE_PUBLIC unless -fexternal-templates.
7100
7101Wed Sep 7 13:17:10 1994 Jason Merrill (jason@deneb.cygnus.com)
7102
7103 * pt.c (do_type_instantiation): Call instantiate_member_templates.
7104 Deal with specializations.
7105 (tsubst): Don't stick the mangled name in DECL_NAME for function
7106 instantiations. Don't push them, either.
7107
7108 * decl2.c (grokfield): Move code for generating the
7109 DECL_ASSEMBLER_NAME for static members from here.
7110 * method.c (build_static_name): To here.
7111 * decl.c (grokvardecl): Call build_static_name.
7112 (duplicate_decls): Keep old DECL_ASSEMBLER_NAME.
7113
7114Mon Sep 5 12:49:18 1994 Jason Merrill (jason@deneb.cygnus.com)
7115
7116 * call.c (build_method_call): if -Wsynth, warn when selecting
7117 synthesized op= over user-supplied one cfront would select.
7118 * decl2.c (lang_decode_option): Handle -Wsynth.
7119
7120Fri Sep 2 15:11:59 1994 Jason Merrill (jason@deneb.cygnus.com)
7121
7122 * decl.c (finish_enum): Overhaul to fix several bugs.
7123 (start_enum): Disable useless code.
7124
7125Thu Sep 1 16:04:54 1994 Jason Merrill (jason@deneb.cygnus.com)
7126
7127 * typeck.c (c_expand_return): Warn about returning a reference to a
7128 temporary.
7129 (convert_arguments): Increment argument counter when using default
7130 arguments, too.
7131
7132Wed Aug 31 14:29:22 1994 Jason Merrill (jason@deneb.cygnus.com)
7133
7134 * decl.c (finish_decl): If the type of decl is error_mark_node,
7135 don't bother trying to do anything.
7136
7137 * typeck.c (convert_for_initialization): If the rhs contains a
7138 constructor call, pretend the lhs type needs to be constructed.
7139
7140 * init.c (expand_default_init): If we stick the object inside the
7141 initializer, mark the initializer used.
7142
7143Tue Aug 30 13:50:18 1994 Jason Merrill (jason@deneb.cygnus.com)
7144
7145 * method.c (build_assign_ref): return *this;
7146 (build_assign_ref): Fix base assignment order.
7147 (build_copy_constructor): Fix member init order.
7148
7149Mon Aug 29 13:54:39 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
7150
7151 * g++.c (main): Remember to clear out SAW_SPECLANG after we see
7152 its argument.
7153
7154Sat Aug 27 09:36:03 1994 Jason Merrill (jason@deneb.cygnus.com)
7155
7156 * method.c (build_copy_constructor): Also copy virtual bases.
7157
7158Fri Aug 26 17:05:15 1994 Jason Merrill (jason@deneb.cygnus.com)
7159
7160 * lex.c (do_pending_inlines): Clear out pending_inlines before doing
7161 any synthesis. Also first set deja_vu on all pending_inlines.
7162
7163 * method.c (build_assign_ref): Use build_member_call to invoke base
7164 operator=, rather than build_modify_expr. And use
7165 build_reference_type instead of TYPE_REFERENCE_TO.
7166 (build_copy_constructor): Use TYPE_NESTED_NAME to identify the
7167 basetype.
7168
7169 * decl2.c (grokfield): Don't complain about undefined local class
7170 methods.
7171
7172 * class.c (finish_struct): Don't try to synthesize methods here.
7173 * lex.c (do_pending_inlines): Instead, synthesize them here.
7174 (init_lex): Initialize synth_obstack.
7175 (cons_up_default_function): Stick synthesis request on
7176 pending_inlines.
7177
7178Fri Aug 26 12:24:14 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
7179
7180 * call.c (build_method_call) [PCC_STATIC_STRUCT_RETURN]: Also
7181 accept an RTL_EXPR in what we're about to use for the instance,
7182 since anything which would end up with pcc_struct_return set
7183 inside cplus_expand_expr.
7184
7185 * cp-tree.h (cons_up_default_function): Note change of prototype.
7186
7187Thu Aug 25 23:05:30 1994 Gerald Baumgartner (gb@cs.purdue.edu)
7188
7189 * class.c (finish_struct): Undid change from Aug 21 testing
7190 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
7191 * parse.y (left_curly): Ditto, undid change from Aug 21.
7192 * decl.c (xref_tag): Undid change from Aug 21, set
7193 CLASSTYPE_INTERFACE correctly, and added comments.
7194
7195Thu Aug 25 00:36:31 1994 Jason Merrill (jason@deneb.cygnus.com)
7196
7197 Rework approach to synthesized methods; don't go through the parser
7198 anymore.
7199 * class.c (finish_struct): Use new synthesis approach.
7200 * lex.c (cons_up_default_function): Now just creates declaration,
7201 not code.
7202 (largest_union_member): #if 0 out.
7203 (default_assign_ref_body): Ditto.
7204 (default_copy_constructor_body): Ditto.
7205 * method.c (build_default_constructor): New function to synthesize X().
7206 (build_copy_constructor): Synthesize X(X&).
7207 (build_assign_ref): Synthesize X::operator=(X&).
7208 (build_dtor): Synthesize ~X().
7209
7210 * error.c (cp_line_of): If we're dealing with an artificial
7211 TYPE_DECL, look at the type instead.
7212
7213Wed Aug 24 11:11:50 1994 Jason Merrill (jason@deneb.cygnus.com)
7214
7215 * init.c (sort_member_init): Check warn_reorder.
7216 * decl2.c (lang_decode_option): Handle -W{no-,}reorder.
7217
7218 * cp-tree.h (CLASSTYPE_SOURCE_LINE): New macro.
7219 * error.c (cp_line_of): Use CLASSTYPE_SOURCE_LINE for aggregates.
7220 * class.c (finish_struct): Set CLASSTYPE_SOURCE_LINE.
7221
6060a796 7222Tue Aug 23 09:28:35 1994 Mike Stump <mrs@cygnus.com>
f376e137
MS
7223
7224 * error.c (dump_decl): Improve wording, so that error messages
7225 dont't read template<, class foo>...
7226
7227Mon Aug 22 15:30:51 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
7228
7229 * parse.y (label_colon): Also match a TYPENAME as a label name,
7230 since they may have declared a class by that name but have also
7231 tried to have a local label under the same name.
7232
7233 * pt.c (coerce_template_parms): Call cp_error, not cp_error_at,
7234 for the message so they know at what point it was instantiated.
7235
7236Sun Aug 21 23:07:35 1994 Gerald Baumgartner (gb@cs.purdue.edu)
7237
7238 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
7239 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures up to left_curly time.
7240 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
db5ae43f 7241 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures down to left_curly time.
f376e137
MS
7242 * parse.y (left_curly): New final resting place for setting
7243 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING for signatures.
7244
7245 * class.c (finish_struct): Don't test for function/field name
7246 conflicts in signatures, since all the fields are compiler-constructed.
7247
7248Fri Aug 19 14:04:47 1994 Kung Hsu (kung@mexican.cygnus.com)
7249
7250 * method.c (build_overload_nested_name): in qualified name
7251 mangling, the template with value instantiation will have numeric
7252 at end and may mixed with the name length of next nested level.
7253 Add a '_' in between.
7254 * method.c (build_overload_name): ditto.
7255 * method.c (build_overload_identifier): ditto.
7256
6060a796 7257Thu Aug 18 16:24:43 1994 Mike Stump <mrs@cygnus.com>
f376e137
MS
7258
7259 * error.c (dump_decl): Handle NULL args.
7260
db5ae43f
MS
7261Thu Sep 29 16:15:36 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
7262
7263 * g++.c: Rework last change so it's done like collect.c (and
7264 gcc.c).
7265
7266Wed Sep 14 10:17:27 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
7267
7268 * g++.c: Include <sys/errno.h> in case `errno' is a macro
7269 as permitted by ANSI C.
7270
6060a796 7271Thu Aug 18 12:48:09 1994 Mike Stump <mrs@cygnus.com>
00595019
MS
7272
7273 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
7274 CLASSTYPE_VTABLE_NEEDS_WRITING up to left_curly time.
7275 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
db5ae43f 7276 CLASSTYPE_VTABLE_NEEDS_WRITING down to left_curly time.
00595019
MS
7277 * parse.y (left_curly): New final resting place for setting
7278 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
7279
7280Thu Aug 11 11:32:42 1994 H.J. Lu (hjl@nynexst.com)
7281
7282 * g++.c (main): Only decrement "added" and set "library" to
7283 NULL when "library" != NULL.
7284
7285Sat Aug 13 00:14:52 1994 Jason Merrill (jason@deneb.cygnus.com)
7286
7287 * decl.c (grokdeclarator): Don't set TREE_PUBLIC on a function decl
7288 just because its class has a known interface.
7289 (decls_match): Deal with new format of template parms.
7290
7291 * lex.c (cons_up_default_function): Don't play with TREE_PUBLIC and
7292 DECL_EXTERNAL here.
7293
7294Fri Aug 12 01:55:15 1994 Jason Merrill (jason@deneb.cygnus.com)
7295
7296 * decl.c (pushtag): SET_DECL_ARTIFICIAL on gratuitous typedefs.
7297 (xref_defn_tag): Ditto.
7298 (pushdecl): Only allow artificial typedefs to be shadowed.
7299
7300 * init.c (emit_base_init): Pass the right binfos to
7301 expand_aggr_init_1.
7302
7303 * class.c (delete_duplicate_fields_1): Make it work right.
7304 (finish_struct): Catch function/field name conflict.
7305
7306 * decl2.c (check_classfn): Pass the function to cp_error, not just
7307 the name.
7308
7309 * init.c (sort_member_init): Warn when order of member initializers
7310 does not match order of member declarations.
7311 (emit_base_init): Call expand_aggr_init_1 with LOOKUP_PROTECT.
7312
7313 * error.c (dump_expr): Handle lists of functions.
7314
7315 * decl.c (start_function): #pragma interface only affects functions
7316 that would otherwise be static.
7317 (finish_decl): Don't warn about an unused variable if it has both
7318 constructor and destructor, since the 'resource allocation is
7319 initialization' idiom is relatively common.
7320
7321 * typeck.c (comp_target_types): Don't handle TEMPLATE_TYPE_PARMs.
7322 (comp_target_parms): Ditto.
7323 (compparms): Never consider default parms.
7324 (common_base_type): Don't choose a virtual baseclass if there is a
7325 more derived class in common.
7326 (build_conditional_expr): If pedantic, pedwarn about conversion to
7327 common base in conditional expr.
7328
7329 * class.c (instantiate_type): Handle template instantiation better.
7330
7331 * typeck.c (convert_arguments): Don't try to get tricky and convert
7332 to int directly when PROMOTE_PROTOTYPES is set, as it breaks
7333 user-defined conversions.
7334
7335 * lex.c (check_for_missing_semicolon): Also give error at end of
7336 file.
7337
7338 * call.c (build_method_call): Don't promote arrays to pointers here.
7339
7340 * typeck.c (convert_arguments): Don't require the actual parameter
7341 to be of a complete type if the formal parameter is a reference.
7342
7343Thu Aug 11 15:21:40 1994 Jason Merrill (jason@deneb.cygnus.com)
7344
7345 * decl.c (grokdeclarator): Soften 'static' on member function error
7346 to pedwarn.
7347
7348 * init.c (build_new): Don't automatically save rval.
7349 (build_offset_ref): Do field lookup with proper basetype_path.
7350
7351Thu Aug 11 12:46:54 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
7352
7353 * errfn.c (cp_silent): Declare to mark when we should avoid
7354 emitting warnings and errors.
7355 (cp_error): Check it.
7356 (cp_warning): Likewise.
7357 (cp_pedwarn): Likewise.
7358 (cp_compiler_error): Likewise.
7359 (cp_error_at): Likewise.
7360 (cp_warning_at): Likewise.
7361 (cp_pedwarn_at): Likewise.
7362 * call.c (compute_conversion_costs): Set CP_SILENT when we start
7363 out, and make sure we turn it off before we leave.
7364
7365Thu Aug 11 00:02:54 1994 Jason Merrill (jason@deneb.cygnus.com)
7366
7367 * decl2.c (grok_array_decl): Try computing *(A+B) if neither
7368 argument is obviously an array.
7369
7370Wed Aug 10 15:32:04 1994 Jason Merrill (jason@deneb.cygnus.com)
7371
7372 * typeck.c (c_expand_start_case): Do cleanups here.
7373
7374 * parse.y (xcond): Do bool conversion here, too.
7375 (simple_stmt, SWITCH case): Don't do cleanups here.
7376
7377 * decl.c (duplicate_decls): Don't treat builtins that have been
7378 explicitly declared specially.
7379
7380Tue Aug 9 01:16:09 1994 Jason Merrill (jason@deneb.cygnus.com)
7381
7382 * tree.c (make_deep_copy): Support copying pointer, reference,
7383 function, array, offset and method types.
7384
7385 * decl.c (init_decl_processing): Mark exit and abort as
7386 BUILT_IN_NONANSI so that duplicate_decls is kinder about
7387 redeclaration.
7388 (duplicate_decls): Don't give two errors for redeclaring a C
7389 function with the same parms but a different return type.
7390
7391 * parse.y (paren_cond_or_null): Do cleanup and bool conversion here.
7392 (condition): Instead of here.
7393 (simple_stmt, SWITCH case): Also do cleanup here.
7394
7395 * decl2.c (finish_anon_union): Only break out FIELD_DECLs.
7396
7397 * call.c (build_method_call): Don't throw away the side effects of
7398 the object in a call to a non-existent constructor.
7399 * parse.y (primary): Ditto.
7400
7401 * method.c (build_decl_overload): Oop.
7402
7403 * decl2.c (lang_decode_option): Deal with flag_no_nonansi_builtin,
7404 warn about uselessness of specifying -fansi-overloading.
7405
7406 * method.c (build_decl_overload): Treat any non-member new with one
7407 parameter as __builtin_new.
7408
7409 * decl.c (init_decl_processing): Setup built-in meanings of exit,
7410 _exit and abort.
7411
7412Mon Aug 8 15:03:30 1994 Jason Merrill (jason@deneb.cygnus.com)
7413
7414 * error.c (dump_readonly_or_volatile): Put a space between const and
7415 volatile if both apply.
7416
7417 * init.c (perform_member_init): Clean up after this initialization.
7418 (emit_base_init): Clean up after each base init, not after all have
7419 been done.
7420 (expand_aggr_vbase_init_1): Clean up after this init.
7421
7422Sun Aug 7 14:55:05 1994 Jason Merrill (jason@deneb.cygnus.com)
7423
7424 * call.c (build_method_call): Deal with destroying references.
7425
7426 * parse.y (condition): Do bool_truthvalue_conversion here.
7427 (paren_expr_or_null): And here.
7428 (simple_if): Not here.
7429 (simple_stmt): Or here.
7430
7431Sat Aug 6 22:29:45 1994 Jason Merrill (jason@deneb.cygnus.com)
7432
7433 * parse.y (paren_expr_or_null): Wrap the expression in a
7434 CLEANUP_POINT_EXPR.
7435 (condition): Ditto.
7436
7437Sat Aug 6 19:46:37 1994 Rohan Lenard (rjl@easams.com.au)
7438
7439 * call.c (build_scoped_method_call): Fix error message when
7440 destructor call refers to a nonexistent type.
7441
7442Sat Apr 16 22:43:30 1993 Gerald Baumgartner (gb@cs.purdue.edu)
7443
7444 * lex.h (rid): Deleted RID_RAISES, it's never used.
7445 Moved RID_PUBLIC, RID_PRIVATE, RID_PROTECTED, RID_EXCEPTION,
7446 RID_TEMPLATE and RID_SIGNATURE to the end of the enumeration,
7447 they don't need to be touched in `grokdeclarator.'
7448 (RID_LAST_MODIFIER): Defined macro to be RID_MUTABLE.
7449
7450 * decl.c (grokdeclarator): Use RID_LAST_MODIFIER instead of
7451 RID_MAX as loop limit for finding declaration specifiers.
7452
7453Sat Apr 3 21:59:07 1993 Gerald Baumgartner (gb@cs.purdue.edu)
7454
7455 * lex.c (debug_yytranslate): Moved to parse.y since it needs to
7456 access `yytname,' which is static in parse.c.
7457
7458Fri Apr 2 23:36:57 1993 Gerald Baumgarnter (gb@cs.purdue.edu)
7459
7460 * cp-tree.h (GNU_xref_ref): Fixed typo in extern declaration, it
7461 was `GNU_xref_def' instead of `GNU_xref_ref.'
7462
7463Fri Aug 5 14:20:16 1994 Jason Merrill (jason@deneb.cygnus.com)
7464
7465 * pt.c (do_function_instantiation): Don't set TREE_PUBLIC and
7466 DECL_EXTERNAL on 'extern' instantiations; wait until EOF to do that.
7467 (do_type_instantiation): Ditto.
7468
7469 * decl2.c (import_export_inline): Decides at EOF what an inline's
7470 linkage should be.
7471 (finish_file): Call it.
7472
7473 * decl.c (start_function): Don't rely on the settings of TREE_PUBLIC
7474 and DECL_EXTERNAL from do_*_instantiation. Only set
7475 DECL_DEFER_OUTPUT on inlines whose linkage might actually change.
7476 (finish_function): Use DECL_DEFER_OUTPUT to decide which inlines to
7477 mark for later consideration, rather than DECL_FUNCTION_MEMBER_P.
7478
6060a796 7479Fri Aug 5 01:12:20 1994 Mike Stump <mrs@cygnus.com>
a292b002
MS
7480
7481 * class.c (get_class_offset_1, get_class_offset): New routine to
7482 find the offset of the class where a virtual function is defined,
7483 from the complete type.
7484 * class.c (modify_one_vtable, fixup_vtable_deltas): Use
7485 get_class_offset instead of virtual_offset as get_class_offset will
7486 always provide the right answer.
7487 * tree.c (virtual_offset): Remove. It only ever worked some of the
7488 time.
7489
7490Tue Aug 2 12:44:21 1994 Jason Merrill (jason@deneb.cygnus.com)
7491
7492 * call.c (build_method_call): Put back unary_complex_lvalue call
7493 that I thought was redundant.
7494
7495 * typeck.c (c_expand_return): Fix a case I missed before.
7496
7497Sun Jul 31 17:54:02 1994 Jason Merrill (jason@deneb.cygnus.com)
7498
7499 * pt.c (unify): Strip cv-quals from template type arguments (when
7500 'const T*' is matched to 'const char*', that does not mean that T is
7501 'const char').
7502
7503Fri Jul 29 01:03:06 1994 Jason Merrill (jason@deneb.cygnus.com)
7504
7505 * pt.c (do_type_instantiation): Instantiate nested TAGS, not
7506 typedefs. Third time's the charm?
7507
7508 * parse.y (template_parm): Support default template parms.
7509 * pt.c (process_template_parm): Ditto.
7510 (end_template_parm_list): Ditto.
7511 (coerce_template_parms): Ditto.
7512 (mangle_class_name_for_template): Ditto.
7513 (push_template_decls): Ditto.
7514 (unify): Ditto.
7515 * method.c (build_overload_identifier): Ditto.
7516 * error.c (dump_decl): Ditto.
7517
7518Wed Jul 27 17:47:00 1994 Jason Merrill (jason@deneb.cygnus.com)
7519
7520 * pt.c (do_type_instantiation): Only instantiate nested *classes*.
7521
7522Tue Jul 26 13:22:40 1994 Jason Merrill (jason@deneb.cygnus.com)
7523
7524 * search.c (note_debug_info_needed): Also emit debugging information
7525 for the types of fields.
7526
7527Mon Jul 25 00:34:44 1994 Jason Merrill (jason@deneb.cygnus.com)
7528
7529 * pt.c (lookup_template_class): Pass 'template' to
7530 coerce_template_parms instead of 'in_decl', since it's a more
7531 meaningful context.
7532
7533 * typeck.c (c_expand_return): Make sure any cleanups for the return
7534 expression get run.
7535 (build_c_cast): Use CONVERT_EXPR for conversion to void.
7536
7537 * pt.c (do_type_instantiation): Also instantiate nested types.
7538
7539 * typeck.c (convert_for_assignment): Don't die when comparing
7540 pointers with different levels of indirection.
7541
7542 * decl.c (grokdeclarator): The sub-call to grokdeclarator for
7543 class-local typedefs sets DECL_ARGUMENTS, so we need to clear it
7544 out.
7545
7546 * decl2.c (finish_anon_union): Don't die if the union has no
7547 members.
7548
7549 * decl.c (grokdeclarator): Undo changes to declspecs when we're done
7550 so that 'typedef int foo, bar;' will work.
7551
7552 * decl2.c (finish_file): Don't call expand_aggr_init for
7553 non-aggregates.
7554
7555Mon Jul 25 00:03:10 1994 Teemu Torma (tot@trema.fi)
7556
7557 * decl.c (finish_function): We can't inline constructors and
7558 destructors under some conditions with -fpic, but don't unset
7559 DECL_INLINE.
7560
7561Mon Jul 25 00:03:10 1994 Jason Merrill (jason@deneb.cygnus.com)
7562
7563 * typeck.c (build_object_ref): Make sure 'datum' is a valid object.
7564
7565Sun Jul 24 14:19:31 1994 Jason Merrill (jason@deneb.cygnus.com)
7566
7567 * class.c (finish_struct): Don't set DECL_FIELD_BITPOS on
7568 non-fields.
7569 (finish_struct_methods): Use copy_assignment_arg_p.
7570
7571 * cvt.c (cp_convert): If expr is an OFFSET_REF, resolve it instead
7572 of giving an error.
7573
7574 * typeck.c (build_binary_op_nodefault): Don't set result_type if we
7575 don't know how to compare the operands.
7576
7577 * decl.c (grokdeclarator): Avoid seg fault when someone uses '__op'
7578 as a declarator-id in their program. Like the Linux headers do.
7579 Arrgh.
7580
7581 * tree.c (lvalue_p): Treat calls to functions returning objects by
7582 value as lvalues again.
7583
7584 * typeck.c (build_component_addr): Use convert_force to convert the
7585 pointer in case the component type is also a private base class.
7586
7587 * search.c (get_matching_virtual): Fix bogus warning of overloaded
7588 virtual.
7589
7590 * pt.c (overload_template_name): Set DECL_ARTIFICIAL on the created
7591 TYPE_DECL to fix bogus shadowing warnings.
7592
7593Fri Jul 22 01:15:32 1994 Jason Merrill (jason@deneb.cygnus.com)
7594
7595 * init.c (expand_aggr_init_1): const and volatile mismatches do not
7596 prevent a TARGET_EXPR from initializing an object directly.
7597
7598Tue Jul 19 17:55:37 1994 Jason Merrill (jason@deneb.cygnus.com)
7599
7600 * cvt.c (build_up_reference): Allow building up references to
7601 `this', don't warn about making references to artificial variables
7602 (like `this').
7603
7604 * tree.c (lvalue_p): `this' is not an lvalue.
7605
7606 * call.c (build_method_call): Accept using a typedef name (or
7607 template type parameter) for explicit destructor calls.
7608
72b7eeff
MS
7609Thu Jul 14 09:42:23 1994 Mike Stump <mrs@cygnus.com>
7610
7611 * Version 2.6.0 released.
7612
cf17cae3
JM
7613Wed Jul 13 03:57:54 1994 Jason Merrill (jason@deneb.cygnus.com)
7614
a292b002
MS
7615 * method.c (hack_identifier): Put back old code so lists of
7616 non-functions will be handled properly.
a5ef9010 7617
a292b002
MS
7618 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): #if 0 out; this macro is now
7619 defined in the language-independent tree.h.
cf17cae3 7620
a292b002
MS
7621 * tree.c (count_functions): Avoid bogus warning when compiling this
7622 function.
cf17cae3
JM
7623
7624Mon Jul 11 18:37:20 1994 Jason Merrill (jason@deneb.cygnus.com)
7625
a292b002
MS
7626 * decl.c (grok_reference_init): Always save the initializer of a
7627 reference.
cf17cae3 7628
6060a796 7629Fri Jul 8 17:41:46 1994 Mike Stump <mrs@cygnus.com>
5b605f68
MS
7630
7631 * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside
7632 CLEANUP_POINT_EXPRs so that the stack slots can be reused.
63c68bb7 7633 (disabled for now)
5b605f68
MS
7634
7635Fri Jul 8 12:59:38 1994 Jason Merrill (jason@deneb.cygnus.com)
7636
7637 * method.c (hack_identifier): Fix for new overloading.
7638
7639 * typeck.c (build_binary_op_nodefault): Don't mess with division by
db5ae43f 7640 zero.
5b605f68
MS
7641
7642Fri Jul 8 13:20:28 1994 Gerald Baumgartner (gb@cs.purdue.edu)
7643
7644 * decl2.c (finish_file): Only call walk_sigtables, if
7645 flag_handle_signatures is turned on, don't waste time otherwise.
7646
7647Fri Jul 8 02:27:41 1994 Jason Merrill (jason@deneb.cygnus.com)
7648
7649 * decl.c (push_overloaded_decl): Don't create overloads of one when
7650 shadowing a class type.
a292b002 7651 * typeck.c (build_x_function_call): Complain about overloads of one.
5b605f68
MS
7652
7653 * decl.c (grokdeclarator): Don't try to treat a char* as a tree.
7654 (grokdeclarator): Fix setting of TREE_STATIC.
7655 (start_decl): Clear DECL_IN_AGGR_P after calling duplicate_decls.
7656
311862c8
GB
7657Thu Jul 7 22:20:46 1994 Gerald Baumgartner (gb@andros.cygnus.com)
7658
7659 * cp-tree.h (walk_sigtables): Created extern declaration.
7660 * decl2.c (walk_sigtables): Created function, patterned after
7661 walk_vtables, even though we only need it to write out sigtables.
7662 (finish_sigtable_vardecl): Created function.
7663 (finish_vtable_vardecl): Changed 0 to NULL_PTR.
7664 (finish_file): Call walk_sigtables.
7665
7666 * sig.c (build_signature_table_constructor): Mark class member
7667 function pointed to from signature table entry as addressable.
7668
5b605f68
MS
7669Thu Jul 7 13:39:37 1994 Jason Merrill (jason@deneb.cygnus.com)
7670
7671 * decl.c (start_decl): Check new decl of static member variable
7672 against the declaration in the class here.
7673 (grokvardecl): Instead of here.
7674
7675 * class.c (prepare_fresh_vtable): Call import_export_vtable if not
7676 -fvtable-thunks.
7677 (build_vtable): Ditto.
7678
7679 * decl2.c (import_export_vtable): Move logic for deciding the
7680 interface of a template class from here.
7681 (import_export_template): To here.
7682 (finish_vtable_vardecl): Call import_export_template before
7683 import_export_vtable.
7684
6060a796 7685Wed Jul 6 20:25:48 1994 Mike Stump <mrs@cygnus.com>
a3b49ccd
MS
7686
7687 * except.c (init_exception_processing): Setup interim_eh_hook to
7688 call lang_interim_eh.
7689 * except.c (do_unwind): Propagate throw object value across
7690 stack unwinding.
7691 * except.c (saved_throw_value): Used to hold the value of the object
7692 being thrown. It is always a reference to the real value.
7693 * except.c (expand_start_catch_block): Add handling for the
7694 value of the exception object.
7695 * except.c (expand_start_catch_block): Add handler for the handler,
7696 so that throws inside the handler go to the outer block.
7697 * except.c (expand_end_catch_block): Ditto.
7698 * parse.y (handler_args): Use parm instead, as the other doesn't yet
7699 handle references correctly.
7700
7701Wed Jul 6 17:55:32 1994 Per Bothner (bothner@kalessin.cygnus.com)
7702
7703 * decl2.c (mark_vtable_entries): If -ftable-thunks, set the
7704 vtable entry properly to abort.
7705
5b605f68
MS
7706Tue Jul 5 14:07:54 1994 Jason Merrill (jason@deneb.cygnus.com)
7707
7708 * typeck.c (build_binary_op_nodefault): Downgrade division by zero
7709 errors to warnings.
7710
7711 * call.c (build_overload_call_real): Handle fnname being a list of
7712 functions.
7713 * typeck.c (build_x_function_call): Pass list of functions to
7714 build_overload_call, not just the name.
7715 * tree.c (count_functions): Complain when called for invalid
7716 argument.
7717
7718 * decl.c (grokdeclarator): Fix settings of TREE_STATIC, TREE_PUBLIC
7719 and DECL_EXTERNAL on static members and initialized const members.
7720 * decl2.c (grokfield): Reflect this change.
7721
9a0e77ba
JM
7722Fri Jul 1 09:35:51 1994 Jason Merrill (jason@deneb.cygnus.com)
7723
7724 * parse.y (init): ANSI C++ does not forbid { }.
7725
7726Thu Jun 30 00:35:22 1994 Jason Merrill (jason@deneb.cygnus.com)
7727
7728 * decl2.c (lang_decode_option): Set warn_nonvdtor along with -Wall.
7729 warn_nonvdtor defaults to off.
7730
7731 * class.c (instantiate_type): Use comptypes rather than relying on
7732 types to satisfy ==.
7733
7734 * decl.c (start_function): Set DECL_DEFER_OUTPUT on all inlines that
7735 might be static.
7736
7737 * tree.c (build_cplus_new): Never build WITH_CLEANUP_EXPRs.
7738
7739 * decl.c (grok_reference_init): Deal with ADDR_EXPRs of TARGET_EXPRs.
7740
7741 * cvt.c (cp_convert): Pass 0 to with_cleanup_p arg of
7742 build_cplus_new.
7743
7744Wed Jun 29 22:31:09 1994 Jason Merrill (jason@deneb.cygnus.com)
7745
7746 * decl2.c (finish_file): Maybe consider static inlines multiple
7747 times, in case they reference each other.
7748
63718c49
GB
7749Tue Jun 28 11:58:38 1994 Gerald Baumgartner (gb@cs.purdue.edu)
7750
7751 * class.c (finish_struct): Don't `cons_up_default_function's
7752 for signatures.
7753 (finish_struct): Handle an empty method_vec correctly.
7754
7755 * decl.c (grokdeclarator): Don't warn about a signature being
7756 empty in a signature pointer declaration if we only saw a
7757 forward declaration of the signature. Changed `warning's into
7758 `cp_warning's.
7759
7760 * sig.c (build_sigtable): Don't die if a null signature table
7761 constructor is returned.
7762 (build_signature_pointer_constructor): If the signature table
7763 constructor is null, the _sptr field is set to a null pointer
7764 and cast to the appropriate type. Make copies of all null
7765 pointers so that the type null_pointer_node doesn't get changed.
7766 (build_signature_table_constructor): Added comments.
7767
7768 * sig.c (build_signature_pointer_constructor): Complain if we
7769 try to assign to/initialize a signature pointer/reference of
7770 an undefined signature.
7771
7772Mon Jun 27 14:05:16 1994 Gerald Baumgartner (gb@cs.purdue.edu)
7773
7774 * typeck2.c (store_init_value): Don't be pedantic about
7775 non-constant initializers of signature tables/pointers/references.
7776
7777Fri Jun 24 16:49:41 1994 Gerald Baumgartner (gb@cs.purdue.edu)
7778
7779 * decl.c (grokdeclarator): If we are grokking an opaque typedef
7780 in a signature, don't complain about it begin static.
7781
6060a796 7782Wed Jun 29 16:44:45 1994 Mike Stump <mrs@cygnus.com>
21474714
MS
7783
7784 Fixes a problem of the this pointer being wrong in virtual calls to
7785 methods that are not overridden in more derived classes.
7786
7787 * class.c (fixup_vtable_delta): New routine. It will fixup the
7788 delta entries in vtables, wheever they need updating.
7789 * class.c (finish_struct): Call the new routine for all virtual
7790 bases, as they can have different offsets, than those used in base
7791 classes that we derive our vtable from.
7792
7793Tue Jun 28 23:49:28 1994 Jason Merrill (jason@deneb.cygnus.com)
7794
7795 * typeck.c (build_binary_op): Use the types before default
7796 conversions in the error message.
7797
7798 * *.c: Use c_build_type_variant instead of build_type_variant where
7799 the type might be an array.
7800
7801 * call.c (build_method_call): Call build_type_variant and
7802 build_reference_type in the right order.
7803 * decl.c (record_builtin_type): Ditto.
7804
7805Wed Jun 29 16:58:53 1994 Jason Merrill (jason@deneb.cygnus.com)
7806
7807 * call.c (build_method_call): Call build_type_variant and
7808 build_reference_type in the right order.
7809 * decl.c (record_builtin_type): Ditto.
7810
7811Tue Jun 28 23:49:28 1994 Jason Merrill (jason@deneb.cygnus.com)
7812
7813 * typeck.c (build_binary_op): Use the types before default
7814 conversions in the error message.
7815
7816 * *.c: Use c_build_type_variant instead of build_type_variant where
7817 the type might be an array.
7818
7819Sat Jun 25 11:50:54 1994 Jason Merrill (jason@deneb.cygnus.com)
7820
7821 * cvt.c (convert_to_reference): Try UDC's before doing the
7822 reinterpret_cast thang, though.
7823
7824Fri Jun 24 01:24:01 1994 Jason Merrill (jason@deneb.cygnus.com)
7825
7826 * typeck.c (c_expand_return): Don't USE the return value location
7827 after we've expanded the jump.
7828
7829 * decl2.c (finish_file): Make sure DECL_SAVED_INSNS is not 0 before
7830 trying to write out an inline.
7831
7832 * cvt.c (build_up_reference): Also do address adjustment when the
7833 target type uses MI.
7834 (convert_to_reference): Try UDCs only after built-in conversions.
7835 (build_type_conversion_1): Don't play games with the argument to the
7836 method.
7837 (build_type_conversion): #if 0 out code for binding to reference.
7838
a3203465
MS
7839Thu Jun 23 00:22:28 1994 Jason Merrill (jason@deneb.cygnus.com)
7840
21474714
MS
7841 * decl2.c (finish_file): Use TREE_SYMBOL_REFERENCED to decide
7842 whether to emit inlines.
7843
a3203465
MS
7844 * decl.c (grokdeclarator): Set explicit_int for decls that just
7845 specify, say, 'long'.
7846
7847 * init.c (do_friend): Do overload C functions (or call pushdecl,
63718c49 7848 anyaway).
a3203465
MS
7849
7850Wed Jun 22 13:40:49 1994 Jason Merrill (jason@deneb.cygnus.com)
7851
7852 * cvt.c (build_up_reference): Don't call readonly_error.
7853 (convert_to_reference): Propagate const and volatile from expr to
7854 its type.
7855
7856 * tree.c (lvalue_p): Random CALL_EXPRs are not lvalues.
7857
7858 * cvt.c (build_up_reference): Break out WITH_CLEANUP_EXPR when
7859 creating a temporary.
7860 (convert_to_reference): Lose excessive and incorrect trickiness.
7861 (cp_convert): Call build_cplus_new with with_cleanup_p set.
7862
7863 * typeck2.c (build_functional_cast): Ditto.
7864
7865Tue Jun 21 17:38:38 1994 Jason Merrill (jason@deneb.cygnus.com)
7866
7867 * decl.c (grokdeclarator): signed, unsigned, long and short all
7868 imply 'int'.
7869
7870 * decl.c (grokdeclarator): Allow "this is a type" syntax.
7871 (grok_reference_init): Simplify and fix.
7872
7873Sun Jun 19 17:08:48 1994 Jason Merrill (jason@deneb.cygnus.com)
7874
7875 * decl.c (grokdeclarator): pedwarn about a typedef that specifies no
7876 type.
7877
7878Sat Jun 18 04:16:50 1994 Jason Merrill (jason@deneb.cygnus.com)
7879
7880 * decl.c (start_function): Move TREE_PUBLIC and DECL_EXTERNAL
7881 tinkering to after call to pushdecl.
7882
7883Fri Jun 17 14:48:28 1994 Jason Merrill (jason@deneb.cygnus.com)
7884
7885 * call.c (build_method_call): Handle destructors for non-aggregate
7886 types properly.
7887
7888Thu Jun 16 16:48:05 1994 Jason Merrill (jason@deneb.cygnus.com)
7889
7890 * call.c (build_method_call): Make sure that the name given for the
7891 destructor matches the constructor_name of the instance.
7892
7893 * pt.c (do_function_instantiation): A non-extern instantiation
7894 overrides a later extern one.
7895 (do_type_instantiation): Ditto.
7896
7897Wed Jun 15 19:34:54 1994 Jason Merrill (jason@deneb.cygnus.com)
7898
7899 * init.c (expand_aggr_init): Use TYPE_MAIN_VARIANT to get the
7900 unqualified array type.
7901
7902 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Tests whether NODE is a
7903 CONSTRUCTOR with no elements.
7904
7905 * decl.c (various): Lose empty_init_node.
7906 (finish_decl): Use EMPTY_CONSTRUCTOR_P, do the empty CONSTRUCTOR
7907 thing depending on the value of DECL_COMMON instead of
7908 flag_conserve_space, do the empty CONSTRUCTOR thing for types that
7909 don't have constructors, don't treat a real empty CONSTRUCTOR
7910 specially.
7911
7912 * typeck2.c (process_init_constructor): Don't treat empty_init_node
7913 specially.
7914
6060a796 7915Wed Jun 15 19:05:25 1994 Mike Stump <mrs@cygnus.com>
a3203465
MS
7916
7917 * class.c (override_one_vtable): Don't forget to merge in an old
7918 overrider when we wanted to reuse a vtable, but couldn't.
7919
7920Wed Jun 15 15:03:16 1994 Jason Merrill (jason@deneb.cygnus.com)
7921
7922 * decl.c (start_decl): Put statics in common again.
7923
7924 * decl.c (grokdeclarator): Return NULL_TREE for an error rather than
7925 setting the type to error_mark_node.
7926
7927 * typeck.c (build_modify_expr): Build up a COMPOUND_EXPR for enum
7928 bitfield assignments.
7929
f0e01782
MS
7930Tue Jun 14 12:23:38 1994 Jason Merrill (jason@deneb.cygnus.com)
7931
7932 * decl.c (grok_op_properties): Const objects can be passed by value.
7933
7934Mon Jun 13 03:10:59 1994 Jason Merrill (jason@deneb.cygnus.com)
7935
7936 * decl2.c (import_export_vtable): Force implicit instantiations to
7937 be interface_only when -fno-implicit-templates.
7938
7939 * decl.c (duplicate_decls): Redeclaring a class template name is an
7940 error.
7941
7942 * pt.c (end_template_decl): Call GNU_xref_decl for class templates.
7943 * xref.c (GNU_xref_decl): Support templates.
7944
7945Sat Jun 11 17:09:05 1994 Jason Merrill (jason@deneb.cygnus.com)
7946
7947 * decl.c (grok_op_properties): Split out checking for whether this
7948 function should suppress the default assignment operator.
7949 * decl2.c (grok_function_init): Ditto.
7950 (copy_assignment_arg_p): New function do do just that.
7951 Now considers virtual assignment operators that take a base as an
7952 argument to count as copy assignment operators.
7953
7954 * search.c (dfs_debug_mark): Lose checks for DWARF_DEBUG and
7955 TREE_ASM_WRITTEN, as they are redundant.
7956
7957 * pt.c (end_template_decl): Don't try to set DECL_CLASS_CONTEXT on a
7958 decl that has no LANG_SPECIFIC part.
7959 (do_type_instantiation): Force the debugging information for this
7960 type to be emitted.
7961
7962 * decl.c (start_decl): Clear up uses of various types of templates
7963 (say sorry for static data members, rather than "invalid template").
7964 (expand_static_init): Fix initialization of static data members of
7965 template classes.
7966
7967Fri Jun 10 00:41:19 1994 Jason Merrill (jason@deneb.cygnus.com)
7968
7969 * decl.c (grokdeclarator): Set DECL_CONTEXT on static data members.
7970
7971 * g++.c (main): Use -xc++-cpp-output for .i files.
7972
7973 * pt.c (tsubst): Give meaningful error about declaring template for
7974 a copy constructor which was not declared in the class template.
7975 (do_type_instantiation): Explicit instantiation before the class
7976 template is an error.
7977 (instantiate_template): Don't die if tsubst returns error_mark_node.
7978
7979Thu Jun 9 19:04:59 1994 Jason Merrill (jason@deneb.cygnus.com)
7980
7981 Don't synthesize the copy assignment operator if the one in a base
7982 class is pure virtual.
7983 * cp-tree.h (TYPE_HAS_ABSTRACT_ASSIGN_REF): New macro to indicate
7984 whether the type has a pure virtual copy assignment operator.
7985 * class.c (finish_base_struct): Don't generate the copy assignment
7986 operator if a base class has a pure virtual one.
7987 * decl.c (grok_op_properties): Add disabled code to set
7988 TYPE_HAS_ABSTRACT_ASSIGN_REF with comment pointing to where it is
7989 actually set.
7990 * decl2.c (grok_function_init): Set TYPE_HAS_ABSTRACT_ASSIGN_REF.
7991
7992 * decl2.c (import_export_vtable): Always treat template
7993 instantiations as if write_virtuals >= 2, and treat implicit
7994 instantiations as external if -fno-implicit-templates.
7995 (finish_file): Output all pending inlines if
7996 flag_keep_inline_functions.
7997
6060a796 7998Wed Jun 8 20:48:02 1994 Mike Stump <mrs@cygnus.com>
f0e01782
MS
7999
8000 * tree.c (layout_vbasetypes): Align virtual base classes inside
8001 complete objects, so that we don't core dump on machines such as
8002 SPARCs when we access members that require larger than normal
8003 alignments, such as a double. Also, we bump up the total alignment
8004 on the complete type, as necessary.
8005
8006Wed Jun 8 16:18:14 1994 Jason Merrill (jason@deneb.cygnus.com)
8007
8008 * gxxint.texi (Free Store): New section with code for examining
8009 cookie.
8010 (Limitations of g++): Remove operator delete entry, since it is no
8011 longer accurate. Fix access control entry.
8012
8013 * typeck.c (build_unary_op): Pedwarn about taking the address of or
8014 incrementing a cast to non-reference type.
8015 (build_modify_expr): Use convert instead of convert_force again.
8016
8017 * search.c (get_base_distance): Use IS_AGGR_TYPE_CODE to check for
8018 class type, not == RECORD_TYPE.
8019
8020 * decl.c (grokdeclarator): Cope with grokfndecl returning NULL_TREE.
8021
8022 * typeck2.c (report_case_error): #if 0 out.
8023 * lex.c (real_yylex): Lose RANGE.
8024 * parse.y: Ditto.
8025
8026Tue Jun 7 18:17:35 1994 Jason Merrill (jason@deneb.cygnus.com)
8027
8028 * parse.y (simple_stmt, case ranges): Use ELLIPSIS instead of RANGE.
8029
8030Mon Jun 6 19:39:57 1994 Jason Merrill (jason@deneb.cygnus.com)
8031
8032 * typeck.c (build_c_cast): Don't shortcut conversions to the same
8033 type. Don't replace consts with their values here, since that's now
8034 done in cp_convert.
8035
8036 * cvt.c (cp_convert): When converting to bool, take
8037 integer_zero_node to false_node and all other INTEGER_CSTs to
8038 true_node.
8039 (build_type_conversion): Don't complain about multiple conversions
8040 to float if we're not really converting.
8041
a0a33927
MS
8042Fri Jun 3 02:10:56 1994 Jason Merrill (jason@deneb.cygnus.com)
8043
f0e01782
MS
8044 Implement 'extern template class A<int>;' syntax for suppressing
8045 specific implicit instantiations.
8046 * cp-tree.h: Update prototypes for do_*_instantiation.
8047 * pt.c (do_pending_expansions): Don't compile 'extern' explicit
8048 instantiations.
8049 (do_function_instantiation): Set DECL_EXTERNAL on 'extern' explicit
8050 instantiations.
8051 (do_type_instantiation): Ditto.
8052 * parse.y (explicit_instantiation): Support 'extern template class
8053 A<int>;' syntax.
8054 * decl.c (start_function): Don't modify the settings of TREE_PUBLIC
8055 and DECL_EXTERNAL on explicit instantiations.
8056
a0a33927
MS
8057 * cvt.c (cp_convert): Replace constants with their values before
8058 converting.
f0e01782 8059 (cp_convert): Consistently use 'e' instead of 'expr'.
a0a33927
MS
8060
8061Thu Jun 2 03:53:30 1994 Jason Merrill (jason@deneb.cygnus.com)
8062
8063 * typeck2.c (build_x_arrow): Resolve OFFSET_REFs first.
8064
8065Wed Jun 1 18:57:35 1994 Jason Merrill (jason@deneb.cygnus.com)
8066
8067 * typeck2.c (digest_init): Handle initializing a pmf with an
8068 overloaded method.
8069 * typeck.c (build_ptrmemfunc): Handle overloaded methods.
8070
8071 * decl.c (pushtag): Use build_decl to make TYPE_DECLs.
8072 (xref_defn_tag): Ditto.
8073 * pt.c (process_template_parm): Ditto.
8074 (lookup_template_class): Ditto.
8075 (push_template_decls): Ditto.
8076 (instantiate_class_template): Ditto.
8077 (create_nested_upt): Ditto.
8078 * class.c (finish_struct): Don't try to set DECL_CLASS_CONTEXT on
8079 TYPE_DECLs.
8080
8081 * typeck.c (convert_arguments): Make sure type is not NULL before
8082 checking its TREE_CODE.
8083
6060a796 8084Wed Jun 1 17:40:39 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
8085
8086 * class.c (get_derived_offset): New routine.
8087 * class.c (finish_base_struct): Make sure we set BINFO_VTABLE and
8088 BINFO_VIRTUALS when we choose a new base class to inherit from.
8089 * class.c (modify_one_vtable): Use get_derived_offset to get the
8090 offset to the most base class subobject that we derived this binfo
8091 from.
8092 * class.c (finish_struct): Move code to calculate the
8093 DECL_FIELD_BITPOS of the vfield up, as we need might need it for
8094 new calls to get_derived_offset in modify_one_vtable.
8095
8096Wed Jun 1 16:50:59 1994 Jason Merrill (jason@deneb.cygnus.com)
8097
8098 * init.c (build_member_call): Use build_pointer_type instead of
8099 TYPE_POINTER_TO.
8100
8101Wed Jun 1 11:11:15 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
8102
8103 * decl.c (grokdeclarator): Make sure we have a DNAME set before we
8104 try to use it in an error.
8105
6060a796 8106Wed Jun 1 09:48:49 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
8107
8108 * typeck.c (convert_arguments, convert_for_initialization): Don't
8109 strip NOP_EXPRs, when we are converting to a reference.
8110
8111Wed Jun 1 01:11:38 1994 Jason Merrill (jason@deneb.cygnus.com)
8112
8113 * typeck.c (build_modify_expr): Don't dereference references when
8114 initializing them.
8115
8116 * decl2.c (grokfield): Don't check for grokdeclarator returning
8117 error_mark_node any more.
8118
8119 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
8120 (start_method): Return void_type_node instead of error_mark_node.
8121
8122 * typeck.c (build_modify_expr): Resolve offset refs earlier.
8123
8124Tue May 31 16:06:58 1994 Jason Merrill (jason@deneb.cygnus.com)
8125
8126 * call.c (build_method_call): Resolve OFFSET_REFs in the object.
8127
8128 * typeck.c (build_modify_expr): Dereference references before trying
8129 to assign to them.
8130
8131 * call.c (build_method_call): Don't confuse type conversion
8132 operators with constructors.
8133 * typeck2.c (build_functional_cast): Just call build_c_cast if there
8134 was only one parameter.
8135 * method.c (build_typename_overload): Don't set
8136 IDENTIFIER_GLOBAL_VALUE on these identifiers.
8137 * decl.c (grok_op_properties): Warn about defining a type conversion
8138 operator that converts to a base class (or reference to it).
8139 * cvt.c (cp_convert): Don't try to use a type conversion operator
8140 when converting to a base class.
8141 (build_type_conversion_1): Don't call constructor_name_full on an
8142 identifier.
8143 * cp-tree.h (DERIVED_FROM_P): Should be self-explanatory.
8144
8145 * decl.c (start_decl): Don't complain that error_mark_node is an
8146 incomplete type.
8147 (finish_decl): Check for type == error_mark_node.
8148
8149Mon May 30 23:38:55 1994 Jason Merrill (jason@deneb.cygnus.com)
8150
8151 * decl.c (start_function): Set DECL_DEFER_OUTPUT on implicit
8152 instantiations and inline members.
8153
8154 * spew.c (yylex): Set looking_for_template if the next token is a '<'.
8155
8156 * lex.h: Declare looking_for_template.
8157
8158 * decl.c (lookup_name_real): Use looking_for_template to arbitrate
8159 between type and template interpretations of an identifier.
8160
8161Sat May 28 04:07:40 1994 Jason Merrill (jason@deneb.cygnus.com)
8162
8163 * pt.c (instantiate_template): Zero out p if we found a
8164 specialization.
8165
8166 * decl.c (grokdeclarator): Elucidate warning.
8167 (grokdeclarator): If pedantic AND -ansi, complain about long long.
8168
8169 Make explicit instantiation work reasonably. It is now appropriate
8170 to deprecate the use of -fexternal-templates.
8171 * pt.c (instantiate_template): Set DECL_TEMPLATE_SPECIALIZATION or
8172 DECL_IMPLICIT_INSTANTIATION on fndecl as appropriate.
8173 (end_template_instantiation): Reflect changes in USE_TEMPLATE
8174 semantics.
8175 (do_pending_expansions): if (!flag_implicit_templates) DECIDE(0);
8176 (do_function_instantiation): Don't set EXPLICIT_INST if
8177 flag_external_templates is set. Do set TREE_PUBLIC and DECL_EXTERN
8178 appropriately otherwise.
8179 (do_type_instantiation): Set interface info for class. Set
8180 TREE_PUBLIC and DECL_EXTERN for methods. Do none of this if
8181 flag_external_templates is set.
8182 * parse.y: Reflect changes in USE_TEMPLATE semantics.
8183 * decl2.c: New flag flag_implicit_templates determines whether or
8184 not implicit instantiations get emitted. This flag currently
8185 defaults to true, and must be true for -fexternal-templates to work.
8186 (finish_file): Consider flag_implement_inlines when
8187 setting DECL_EXTERNAL. Consider flag_implicit_templates when
8188 deciding whether or not to emit a static copy.
8189 * decl.c (start_function): Set TREE_PUBLIC and DECL_EXTERNAL
8190 properly for template instantiations.
8191 (start_method): Set DECL_IMPLICIT_INSTANTIATION on methods of a
8192 template class.
8193 * cp-tree.h (CLASSTYPE_USE_TEMPLATE): Change semantics.
8194 (DECL_USE_TEMPLATE): Parallel macro for FUNCTION and VAR_DECLs.
8195 (various others): Accessor macros for the above.
8196
8197Fri May 27 13:57:40 1994 Jason Merrill (jason@deneb.cygnus.com)
8198
8199 * typeck.c (build_binary_op_nodefault): Division by constant zero is
8200 an error.
8201
6060a796 8202Fri May 27 13:50:15 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
8203
8204 * class.c (override_one_vtable): Don't modify things we don't own.
8205
8206Fri May 27 01:42:58 1994 Jason Merrill (jason@deneb.cygnus.com)
8207
8208 * decl.c (finish_decl): Don't postpone processing the initializer of
8209 a decl with DECL_EXTERNAL set, and do call rest_of_compilation for a
8210 PUBLIC const at toplevel.
8211 (grokdeclarator): pedwarn about initializing non-const or
8212 non-integral statics in the class body.
8213
8214 * decl.c (pushtag): Don't try to set DECL_CLASS_CONTEXT on a
8215 TYPE_DECL.
8216
8217 * call.c (convert_harshness): Dereference reference on rhs before
8218 proceeding, properly grok passing const things to non-const
8219 references.
8220
8221 * typeck.c (build_unary_op): Soften error about taking the address
8222 of main() to a pedwarn.
8223
8224 * lex.c (default_copy_constructor_body): Unambiguously specify base
8225 classes (i.e. A((const class ::A&)_ctor_arg) ).
8226 (default_assign_ref_body): Ditto.
8227
8228Thu May 26 13:13:55 1994 Gerald Baumgartner (gb@mexican.cygnus.com)
8229
8230 * decl2.c (grokfield): Don't complain about local signature
8231 method declaration without definition.
8232
8233 * call.c (convert_harshness): If `type' is a signature pointer
8234 and `parmtype' is a pointer to a signature, just return 0. We
8235 don't really convert in this case; it's a result of making the
8236 `this' parameter of a signature method a signature pointer.
8237
8238 * call.c (build_method_call): Distinguish calling the default copy
8239 constructor of a signature pointer/reference from a signature
8240 member function call.
8241
8242Thu May 26 12:56:25 1994 Jason Merrill (jason@deneb.cygnus.com)
8243
8244 * decl2.c (grokfield): Don't set TREE_PUBLIC on member function
8245 declarations.
8246
8247 * decl.c (duplicate_decls): A previous function declaration as
8248 static overrides a subsequent non-static definition.
8249 (grokdeclarator): Don't set TREE_PUBLIC on inline method
8250 declarations.
8251
8252Wed May 25 14:36:38 1994 Jason Merrill (jason@deneb.cygnus.com)
8253
8254 * decl.c (grokdeclarator): Handle initialization of static const
8255 members.
8256 (finish_decl): Ditto.
8257
8258 * decl2.c (grokfield): Allow initialization of static const members
8259 even when pedantic.
8260
8261 * decl2.c (grokfield): Deal with grokdeclarator returning
8262 error_mark_node.
8263
8264 * decl.c (grok_ctor_properties): Return 0 for A(A) constructor.
8265 (grokfndecl): Check the return value of grok_ctor_properties.
8266 (start_method): Ditto.
8267
8268 * parse.y (absdcl): Expand type_quals inline.
8269
8270Tue May 24 19:10:32 1994 Jason Merrill (jason@deneb.cygnus.com)
8271
8272 * decl.c (pushtag): Use IS_AGGR_TYPE rather than checking for a
8273 RECORD_TYPE.
8274
8275Tue May 24 18:09:16 1994 Per Bothner (bothner@kalessin.cygnus.com)
8276
8277 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
8278 always use "__vt_%s".
8279 * decl2.c (finish_vtable_vardecl): Don't consider abstract virtuals
8280 when looking for a "sentinal" method (to decide on emitting vtables).
8281 * decl2.c (finish_file): Scan all decls for thunks that need
8282 to be emitted.
8283 * decl2.c (finish_vtable_vardecl): Don't bother calling emit_thunk.
8284 * method.c (make_thunk): Use a more meaningful label. If there
8285 exists a matching top-level THUNK_DECL re-use it; otherwise
8286 create a new THUNK_DECL (and declare it).
8287 * method.c (emit_thunk): Make thunk external/public depending
8288 on the underlying method.
8289
8290Tue May 24 00:22:04 1994 Jason Merrill (jason@deneb.cygnus.com)
8291
8292 * pt.c (tsubst): Use lookup_name_nonclass to find guiding decls, not
8293 lookup_name.
8294
8295 * call.c (build_overload_call_real): Don't immediately pick a
8296 function which matches perfectly.
8297
8298 * decl.c (grokdeclarator): Use c_build_type_variant for arrays.
8299 (grokdeclarator): Warn about, and throw away, cv-quals attached to a
8300 reference (like 'int &const j').
8301
8302 * typeck.c (convert_arguments): Don't mess with i for methods.
8303 * call.c (build_method_call): Pass the function decl to
8304 convert_arguments.
8305
8306 * typeck.c (comp_ptr_ttypes_real): New function. Implements the
8307 checking for which multi-level pointer conversions are allowed.
8308 (comp_target_types): Call it.
8309 (convert_for_assignment): Check const parity on the ultimate target
8310 type, too. And make those warnings pedwarns.
8311
8312Mon May 23 14:11:24 1994 Jason Merrill (jason@deneb.cygnus.com)
8313
8314 * error.c (dump_char): Use TARGET_* for character constants.
8315
8316Mon May 23 13:03:03 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
8317
8318 * tree.c (debug_no_list_hash): Make static.
8319
8320 * decl.c (decls_match): Say the types don't match if newdecl ends up
8321 with a null type, after we've checked if olddecl does.
8322 (pushdecl): Check if the decls themselves match before looking for
8323 an extern redeclared as static, to avoid inappropriate and incorrect
8324 warnings.
8325
8326Fri May 20 14:04:34 1994 Jason Merrill (jason@deneb.cygnus.com)
8327
8328 * decl.c (grokdeclarator): Make warning about duplicate short, etc.
8329 a pedwarn.
8330
8331 * typeck.c (build_c_cast): Casting to function or method type is an
8332 error.
8333
8334 * class.c (finish_struct): Make warning for anonymous class with no
8335 instances a pedwarn.
8336
8337 * Makefile.in (stamp-parse): Expect a s/r conflict.
8338
8339 * typeck.c (build_modify_expr): pedwarn about using a non-lvalue
8340 cast as an lvalue.
8341
2986ae00
MS
8342Thu May 19 12:08:48 1994 Jason Merrill (jason@deneb.cygnus.com)
8343
8344 * cvt.c (type_promotes_to): Make sure bool promotes to int rather
8345 than unsigned on platforms where sizeof(char)==sizeof(int).
8346
8347Wed May 18 14:27:06 1994 Jason Merrill (jason@deneb.cygnus.com)
8348
8349 * typeck.c (build_c_cast): Tack on a NOP_EXPR when casting to
8350 another variant.
8351 (build_modify_expr): Don't strip NOP_EXPRs, and don't get tricky
8352 and treat them as lvalues.
8353
8354 * decl.c (shadow_tag): Do complain about forward declarations of
8355 enums and empty declarations.
8356 * parse.y: Don't complain about forward declarations of enums and
8357 empty declarations.
8358
8359 * typeck.c (convert_for_assignment): Complain about changing
8360 the signedness of a pointer's target type.
8361
8362 * parse.y (stmt): Move duplicated code for checking case values from
8363 here.
8364 * decl2.c (check_cp_case_value): To here. And add a call to
8365 constant_expression_warning.
8366
8367 * typeck.c (convert_for_assignment): Don't complain about assigning
8368 a negative value to bool.
8369
8370 * decl.c (init_decl_processing): Make bool unsigned.
8371
8372 * class.c (finish_struct): Allow bool bitfields.
8373
2986ae00
MS
8374Wed May 18 12:35:27 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
8375
8376 * Make-lang.in (c++.install-man): Get g++.1 from $(srcdir)/cp.
8377
8378Wed May 18 03:28:35 1994 Jason Merrill (jason@deneb.cygnus.com)
8379
8380 * cvt.c (build_type_conversion): Lose special handling of
8381 truthvalues.
8382
8383 * search.c (dfs_pushdecls): Improve shadowing warning.
8384
8385Tue May 17 13:34:46 1994 Jason Merrill (jason@deneb.cygnus.com)
8386
8387 * init.c (build_delete): Throw away const and volatile on `this'.
8388
8389 * decl.c (finish_enum): Put the constants in TYPE_VALUES again,
8390 rather than the enumerators.
8391 (pushtag): s/cdecl/c_decl/g
8392
8393Mon May 16 23:04:01 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
8394
63718c49
GB
8395 * cp/typeck.c (common_type): Attribute merging.
8396 (comp_types): Utilise COMP_TYPE_ATTRIBUTES macro.
2986ae00 8397
63718c49 8398 * cp/parse.y: Revamp attribute parsing.
2986ae00
MS
8399
8400Mon May 16 01:40:34 1994 Jason Merrill (jason@deneb.cygnus.com)
8401
8402 * decl.c (shadow_tag): Also check for inappropriate use of auto and
8403 register.
8404
8405 * method.c (build_overload_name): Clarify that the illegal case is a
8406 pointer or reference to array of unknown bound.
8407
8408 * error.c (dump_type_prefix): Print references to arrays properly.
8409
8410 * typeck.c (various): Be more helpful in pointer
8411 comparison diagnostics.
8412
8413 * tree.c (lvalue_p): MODIFY_EXPRs are lvalues again. Isn't this
8414 fun?
8415
8416 * parse.y: Also catch an error after valid stmts.
8417
8418 * search.c (dfs_init_vbase_pointers): Don't abort because `this' is
8419 const.
8420
8421 * typeck.c (convert_for_initialization): If call to
8422 convert_to_reference generated a diagnostic, print out the parm
8423 number and function decl if any.
8424
8425 * errfn.c (cp_thing): Check atarg1 to determine whether or not we're
8426 specifying a line, not atarg.
8427
8428 * tree.c (build_cplus_method_type): Always make `this' const.
8429
8430 * decl2.c (grokclassfn): If -fthis-is-variable and this function is
8431 a constructor or destructor, make `this' non-const.
8432
8433 * typeck.c (build_modify_expr): Don't warn specially about
8434 assignment to `this' here anymore, since it will be caught by the
8435 usual machinery.
8436
8437 * various: Disallow specific GNU extensions (variable-size arrays,
8438 etc.) when flag_ansi is set, not necessarily when pedantic is set,
8439 so that people can compile with -pedantic-errors for tighter const
8440 checking and such without losing desirable extensions.
8441
8442 * typeck2.c (build_functional_cast): Call build_method_call with
8443 LOOKUP_PROTECT.
8444 (process_init_constructor): Only process FIELD_DECLs.
8445
8446 * decl.c (finish_decl): Also force static consts with no explicit
8447 initializer that need constructing into the data segment.
8448
8449 * init.c (build_delete): Undo last patch, as it interferes with
8450 automatic cleanups.
8451
8452Sat May 14 01:59:31 1994 Jason Merrill (jason@deneb.cygnus.com)
8453
8454 * call.c, class.h, cp-tree.h, cvt.c, decl2.c: Lose old overloading
8455 code.
8456
8457 * init.c (build_delete): pedwarn about using plain delete to delete
8458 an array.
8459
8460Fri May 13 16:45:07 1994 Jason Merrill (jason@deneb.cygnus.com)
8461
8462 * typeck.c (comp_target_types): Be more helpful in contravariance
8463 warnings, and make them pedwarns.
8464
8465 * decl.c (grokdeclarator): Use decl_context to decide whether or not
8466 this is an access declaration.
8467
8468 * class.c (finish_struct_bits): Set TYPE_HAS_INT_CONVERSION if it
8469 has a conversion to enum or bool, too.
8470
6060a796 8471Fri May 13 16:31:27 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
8472
8473 * method.c (emit_thunk): Make declaration for
8474 current_call_is_indirect local (needed for hppa).
8475
8476Fri May 13 16:16:37 1994 Jason Merrill (jason@deneb.cygnus.com)
8477
8478 * pt.c (uses_template_parms): Grok BOOLEAN_TYPE.
8479 (tsubst): Ditto.
8480
6060a796 8481Fri May 13 16:23:32 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
8482
8483 * pt.c (tsubst): If there is already a function for this expansion,
8484 use it.
8485 * pt.c (instantiate_template): Ditto.
8486
8487Fri May 13 10:30:42 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
8488
8489 * parse.y (implicitly_scoped_stmt, simple_stmt case): Use
8490 kept_level_p for MARK_ENDS argument to expand_end_bindings, to avoid
8491 generating debug info for unemitted symbols on some systems.
8492
8493 * cp-tree.h (build_static_cast, build_reinterpret_cast,
8494 build_const_cast): Add declarations.
8495
6060a796 8496Fri May 13 09:50:31 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
8497
8498 * search.c (expand_indirect_vtbls_init): Fix breakage from Apr 27
8499 fix. We now try get_binfo, and if that doesn't find what we want,
8500 we go back to the old method, which still sometimes fails.
8501
8502Fri May 13 01:43:18 1994 Jason Merrill (jason@deneb.cygnus.com)
8503
8504 * parse.y (initdcl): Call cplus_decl_attributes on the right
8505 variable.
8506 * decl2.c (cplus_decl_attributes): Don't call decl_attributes for
8507 void_type_node.
8508
8509 * typeck.c (build_binary_op_nodefault): Change result_type for
8510 comparison ops to bool.
8511 (build_binary_op): Convert args of && and || to bool.
8512 * cvt.c (build_default_binary_type_conversion): Convert args of &&
8513 and || to bool.
8514 (build_default_unary_type_conversion): Convert arg of ! to bool.
8515 (type_promotes_to): bool promotes to int.
8516
6060a796 8517Fri May 13 01:43:18 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
8518
8519 Implement the new builtin `bool' type.
8520 * typeck.c (build_binary_op_nodefault): Convert args of && and || to
8521 bool.
8522 (build_unary_op): Convert arg of ! to bool.
8523 * parse.y: Know true and false. Use bool_truthvalue_conversion.
8524 * method.c (build_overload_value): Know bool.
8525 (build_overload_name): Ditto.
8526 * lex.c (init_lex): Set up RID_BOOL.
8527 * gxx.gperf: Add bool, true, false.
8528 * error.c (*): Know bool.
8529 * decl.c (init_decl_processing): Set up bool, true, false.
8530 * cvt.c (cp_convert): Handle conversion to bool.
8531 (build_type_conversion): Ditto.
8532 * *.c: Accept bool where integers and enums are accepted (use
8533 INTEGRAL_CODE_P macro).
8534
8de7634e
RE
8535Thu May 12 19:13:54 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk)
8536
8537 * g++.c: Use #ifdef for __MSDOS__, not #if.
8538
6060a796 8539Thu May 12 18:05:18 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
8540
8541 * decl2.c (lang_f_options): Handle -fshort-temps. -fshort-temps
8542 gives old behavior , and destroys temporaries earlier. Default
8543 behavior now conforms to the ANSI working paper.
8544
8545Thu May 12 14:45:35 1994 Jason Merrill (jason@deneb.cygnus.com)
8546
8547 * typeck.c (build_modify_expr): Understand MODIFY_EXPR as an lvalue.
8548 Use convert_force to convert the result of a recursive call when we
8549 are dealing with a NOP_EXPR. Don't automatically wrap MODIFY_EXPRs
8550 in COMPOUND_EXPRs any more.
8551 (various): Lose pedantic_lvalue_warning.
8552 (unary_complex_lvalue): Understand MODIFY_EXPR.
8553
8554 * cvt.c (convert_to_reference): Allow DECL to be error_mark_node if
8555 we don't know what we're initializing.
8556
8557Wed May 11 01:59:36 1994 Jason Merrill (jason@deneb.cygnus.com)
8558
8559 * cvt.c (convert_to_reference): Modify to use convtype parameter.
8560 Only create temporaries when initializing a reference, not when
8561 casting.
8562 (cp_convert): New main function.
8563 (convert): Call cp_convert.
8564 * cvt.c, decl.c, typeck.c: Fix calls to convert_to_reference.
8565 * cp-tree.h (CONV_*): New constants used by conversion code for
8566 selecting conversions to perform.
8567
8568 * tree.c (lvalue_p): MODIFY_EXPRs are no longer lvalues.
8569
8570 * typeck.c (build_{static,reinterpret,const_cast): Stubs that just
8571 call build_c_cast.
8572 * parse.y: Add {static,reinterpret,const}_cast.
8573 * gxx.gperf: Ditto.
8574
8575 * typeck.c (common_type): Allow methods with basetypes of different
8576 UPTs.
8577 (comptypes): Deal with UPTs.
8578 (build_modify_expr): Wrap all MODIFY_EXPRs in a COMPOUND_EXPR.
8579
8580 * pt.c (end_template_decl): Check for multiple definitions of member
8581 templates.
8582
8583 * call.c (build_method_call): Complain about calling an abstract
8584 virtual from a constructor.
8585
8586 * typeck.c (pointer_int_sum): Check for the integer operand being 0
8587 after checking the validity of the pointer operand.
8588
8589 * typeck2.c (digest_init): Pedwarn about string initializer being
8590 too long.
8591
8592Tue May 10 12:10:28 1994 Jason Merrill (jason@deneb.cygnus.com)
8593
8594 * decl.c (push_overloaded_decl): Only throw away a builtin if the
8595 decl in question is the artificial one.
8596
8597 * parse.y (simple_stmt, switch): Use implicitly_scoped_stmt because
8598 expand_{start,end}_case cannot happen in the middle of a block.
8599
8600 * cvt.c (build_type_conversion_1): Use convert again.
8601
8602Tue May 10 11:52:04 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
8603
8604 * typeck2.c (digest_init): Make sure we check for signed and
8605 unsigned chars as well when warning about string initializers.
8606
8607 * init.c (emit_base_init): Check if there's a DECL_NAME on the
8608 member before trying to do an initialization for it.
8609
6060a796 8610Tue May 10 11:34:37 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
8611
8612 * except.c: Don't do anything useful when cross compiling.
8613
8614Tue May 10 03:04:13 1994 Jason Merrill (jason@deneb.cygnus.com)
8615
8616 * decl.c (duplicate_decls): Fix up handling of builtins yet again.
8617 (push_overloaded_decl): Ditto.
8618
8619 * cvt.c (convert): Don't look for void type conversion.
8620
8621Mon May 9 18:05:41 1994 Jason Merrill (jason@deneb.cygnus.com)
8622
8623 * init.c (do_friend): Only do a pushdecl for friends, not
8624 pushdecl_top_level.
8625
8626Mon May 9 13:36:34 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
8627
8628 * decl.c (lookup_name_current_level): Put empty statement after
8629 the label OUT to make the code valid C.
8630
8631Mon May 9 12:20:57 1994 Jason Merrill (jason@deneb.cygnus.com)
8632
8633 * typeck.c (build_binary_op_nodefault): Only complain about
8634 comparing void * and a function pointer if void * is smaller.
8635
8636Sun May 8 01:29:13 1994 Jason Merrill (jason@deneb.cygnus.com)
8637
8638 * decl.c (lookup_name_current_level): Move through temporary binding
8639 levels.
8640
8641 * parse.y (already_scoped_stmt): Revive.
8642 (simple_stmt): Use it again.
8643
8644 * decl.c (poplevel): Always call poplevel recursively if we're
8645 dealing with a temporary binding level.
8646
6060a796 8647Sat May 7 10:52:28 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
8648
8649 * decl.c (finish_decl): Make sure we run cleanups for initial values
8650 of decls. Cures memory leak.
8651 * decl.c (expand_static_init): Ditto for static variables.
8652 * decl2.c (finish_file): Ditto for globals.
8653
8654Sat May 7 03:57:44 1994 Jason Merrill (jason@deneb.cygnus.com)
8655
8656 * typeck.c (commonparms): Don't complain about redefining default
8657 args.
8658
8659 * decl.c (duplicate_decls): Don't complain twice about conflicting
8660 function decls.
8661 (decls_match): Don't look at default args.
8662 (redeclaration_error_message): Complain about redefining default
8663 args.
8664
8665 * call.c (build_overload_call_real): Also deal with guiding
8666 declarations coming BEFORE the template decl.
8667
8668 * pt.c (unify): Allow different parms to have different
8669 cv-qualifiers.
8670 (unify): Allow trivial conversions on non-template parms.
8671
8672Fri May 6 03:53:23 1994 Jason Merrill (jason@deneb.cygnus.com)
8673
8674 * pt.c (tsubst): Support OFFSET_TYPEs.
8675 (unify): Ditto.
8676
8677 * decl2.c (finish_decl_parsing): Call push_nested_class with a type.
8678
8679 * init.c (build_offset_ref): Fix error message.
8680 * search.c (lookup_field): Ditto.
8681
8682 * call.c (build_scoped_method_call): Pass binfo to
8683 build_method_call.
8684 * typeck.c (build_object_ref): Ditto.
8685
8686 * typeck2.c (binfo_or_else): Don't return a _TYPE.
8687
8688 * class.c (finish_struct): Don't complain about re-use of inherited
8689 names or shadowing of type decls.
8690 * decl.c (pushdecl_class_level): Ditto.
8691
8692 * decl.c (finish_enum): Set the type of all the enums.
8693
8694 * class.c (finish_struct): Don't get confused by access decls.
8695
8696 * cp-tree.h (TYPE_MAIN_DECL): New macro to get the _DECL for a
8697 _TYPE. You can stop using TYPE_NAME for that now.
8698
8699 * parse.y: Lose doing_explicit (check $0 instead).
8700 * gxx.gperf: 'template' now has a RID.
8701 * lex.h (rid): Ditto.
8702 * lex.c (init_lex): Set up the RID for 'template'.
8703
8704 * parse.y (type_specifier_seq): typed_typespecs or
8705 nonempty_type_quals. Use it.
8706 (handler_args): Fix bogus syntax.
8707 (raise_identifier{,s}, optional_identifier): Lose.
8708 * except.c (expand_start_catch_block): Use grokdeclarator to parse
8709 the catch variable.
8710 (init_exception_processing): The second argument to
8711 __throw_type_match is ptr_type_node.
8712
8713 Fri May 6 07:18:54 1994 Chip Salzenberg (chip@fin)
8714
8715 [ change propagated from c-decl.c of snapshot 940429 ]
8716 * cp/decl.c (finish_decl): Setting asmspec_tree should not
8717 zero out the old RTL.
8718
6060a796 8719Fri May 6 01:25:38 1994 Mike Stump <mrs@cygnus.com>
8d2733ca
MS
8720
8721 Add alpha exception handling support to the compiler.
8722 Quick and dirty backend in except.c.
8723
8724 * cp/*: Remove most remnants of old exception handling support.
8725 * decl.c (finish_function): Call expand_exception_blocks to put
8726 the exception hanlding blocks at the end of the function.
8727 * dec.c (hack_incomplete_structures): Make sure expand_decl_cleanup
8728 comes after expand_decl_init.
8729 * except.c: Reimplementation.
8730 * expr.c (cplus_expand_expr): Handle THROW_EXPRs.
8731 * lex.c (init_lex): Always have catch, try and throw be reserved
8732 words, so that we may always parse exception handling.
8733 * parse.y: Cleanup to support new interface into exception handling.
8734 * tree.def (THROW_EXPR): Add.
8735
8736Thu May 5 17:35:37 1994 Jason Merrill (jason@deneb.cygnus.com)
8737
8738 * parse.y (simple_stmt, for loops): Use implicitly_scoped_stmt.
8739 (various): Lose .kindof_pushlevel and partially_scoped_stmt.
8740
8741Thu May 5 16:17:27 1994 Kung Hsu (kung@mexican.cygnus.com)
8742
8743 * parse.y (already_scoped_stmt): move expand_end_binding() to
8744 fix the unmatched LBB/LBE in stabs.
8745
8746Thu May 5 14:36:17 1994 Jason Merrill (jason@deneb.cygnus.com)
8747
8748 * decl.c (set_nested_typename): Set TREE_MANGLED on the new
8749 identifiers.
8750 (pushdecl): Check TREE_MANGLED.
8751 (xref_tag): Ditto.
8752 * cp-tree.h (TREE_MANGLED): This identifier is a
8753 DECL_NESTED_TYPENAME (named to allow for future use to denote
8754 mangled function names as well).
8755
8756 Implement inconsistency checking specified in [class.scope0].
8757 * decl.c (lookup_name_real): Don't set ICV here after all.
8758 (finish_enum): Also set the type of the enumerators themselves.
8759 (build_enumerator): Put the CONST_DECL in the list instead of its
8760 initial value.
8761 (pushdecl_class_level): Check inconsistent use of a name in the
8762 class body.
8763 * class.c (finish_struct): Check inconsistent use of a name in the
8764 class body. Don't set DECL_CONTEXT on types here anymore.
8765 * parse.y (qualified_type_name): Note that the identifier has now
8766 been used (as a type) in the class body.
8767 * lex.c (do_identifier): Note that the identifier has now been used
8768 (as a constant) in the class body.
8769 * error.c (dump_decl): Print type and enum decls better.
8770
700f8a87
MS
8771Thu May 5 09:35:35 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
8772
8773 * typeck.c (build_modify_expr): Warn about assignment to `this'.
8774
8775Wed May 4 15:55:49 1994 Jason Merrill (jason@deneb.cygnus.com)
8776
8777 * init.c (build_delete): Use the global operator delete when
8778 requested.
8779
8780 * decl.c (lookup_name_real): If we find the type we're looking in a
8781 base class while defining a class, set IDENTIFIER_CLASS_VALUE for
8782 the type.
8783
8784 * class.c (finish_struct): Remove a couple of dependencies on
8785 language linkage.
8786
8787 * decl.c (pushtag): Classes do nest in extern "C" blocks.
8788 (pushdecl): Only set DECL_NESTED_TYPENAME on the canonical one for
8789 the type.
8790 (pushtag): Remove another dependency on the language linkage.
8791
8792 * lex.c (cons_up_default_function): Don't set DECL_CLASS_CONTEXT to
8793 a const-qualified type.
8794
8795 * decl.c (push_overloaded_decl): Throw away built-in decls here.
8796 (duplicate_decls): Instead of here.
8797
8798Wed May 4 15:27:40 1994 Per Bothner (bothner@kalessin.cygnus.com)
8799
8800 * typeck.c (get_member_function_from_ptrfunc): Do The Right
8801 Thing (I hope) if we're using thunks.
8802
8803Wed May 4 13:52:38 1994 Jason Merrill (jason@deneb.cygnus.com)
8804
8805 * parse.y (specialization): aggr template_type_name ';'.
8806 (named_class_head_sans_basetype): Use it.
8807 (explicit_instantiation): Ditto.
8808 (tmpl.2): Revert.
8809
8810 * cvt.c (build_type_conversion_1): Use convert_for_initialization,
8811 rather than convert, to do conversions after the UDC.
8812
8813 * cp-tree.h (SHARED_MEMBER_P): This member is shared between all
8814 instances of the class.
8815
8816 * search.c (lookup_field): If the entity found by two routes is the
8817 same, it's not ambiguous.
8818
8819Wed May 4 12:10:00 1994 Per Bothner (bothner@kalessin.cygnus.com)
8820
8821 * decl.c (lookup_name_real): Check for a NULL TREE_VALUE,
8822 to prevent the compiler from crashing ...
8823
8824Wed May 4 11:19:45 1994 Jason Merrill (jason@deneb.cygnus.com)
8825
8826 * call.c (build_method_call): If we don't have an object, check
8827 basetype_path to figure out where to look up the function.
8828
8829 * typeck.c (convert_for_initialization): Pass TYPE_BINFO (type) to
8830 build_method_call in case exp is NULL_TREE.
8831
8832Tue May 3 16:02:53 1994 Per Bothner (bothner@kalessin.cygnus.com)
8833
8834 Give a vtable entries a unique named type, for the sake of gdb.
8835 * class.c (build_vtable_entry): The addres of a thunk now has
8836 type vtable_entry_type, not ptr_type_node.
8837 * method.c (make_thunk): Fix type of THUNK_DECL.
8838 * class.c (add_virtual_function, override_one_vtable): Use
8839 vfunc_ptr_type_node, instead of ptr_type_node.
8840 * cp-tree.h (vfunc_ptr_type_node): New macro.
8841 * decl.c (init_decl_processing): Make vtable_entry_type
8842 be a unique type of pointer to a unique function type.
8843
8844Tue May 3 09:20:44 1994 Jason Merrill (jason@deneb.cygnus.com)
8845
8846 * parse.y (do_explicit): Sets doing_explicit to 1.
8847 (explicit_instantiation): Use do_explicit rather than TEMPLATE
8848 directly, add "do_explicit error" rule.
8849 (datadef): Set doing_explicit to 0 after an explicit instantiation.
8850 (tmpl.2): Don't instantiate if we see a ';' unless we're doing an
8851 explicit instantiation.
8852 (named_class_head_sans_basetype): Remove aggr template_type_name
8853 ';' again.
8854
8855Mon May 2 23:17:21 1994 Jason Merrill (jason@deneb.cygnus.com)
8856
8857 * search.c (lookup_nested_tag): Lose.
8858
8859 * decl2.c (grokfield): Set DECL_CONTEXT on TYPE_DECLs.
8860 (lookup_name_nonclass): Lose.
8861
8862 * decl.c (poplevel_class): Add force parameter.
8863 (lookup_name_real): Fix handling of explicit scoping which specifies
8864 a class currently being defined. Add 'nonclass' argument.
8865 (lookup_name, lookup_name_nonclass): Shells for lookup_name_real.
8866
8867 * class.c (finish_struct): Don't unset IDENTIFIER_CLASS_VALUEs here.
8868 (popclass): Force clearing of IDENTIFIER_CLASS_VALUEs if we're being
8869 called from finish_struct.
8870
8871Mon May 2 19:06:21 1994 Per Bothner (bothner@kalessin.cygnus.com)
8872
8873 * decl.c (init_decl_processing), cp-tree.h: Removed memptr_type.
8874 (It seeems redundant, given build_ptrmemfunc_type.)
8875 * typeck.c (get_member_function_from_ptrfunc), gc.c (build_headof,
8876 build_classof): Use vtable_entry_type instead of memptr_type.
8877 * method.c (emit_thunk): Call poplevel with functionbody==0
8878 to prevent DECL_INITIAL being set to a BLOCK.
8879
8880Mon May 2 15:02:11 1994 Jason Merrill (jason@deneb.cygnus.com)
8881
8882 * parse.y (named_class_head_sans_basetype): Add "aggr
8883 template_type_name ';'" rule for forward declaration of
8884 specializations.
8885
8886Mon May 2 15:02:11 1994 Jason Merrill (jason@deneb.cygnus.com)
8887
8888 * class.c (instantiate_type): Deal with pmf's.
bfef964b
JM
8889
8890 * Make-lang.in (cc1plus): Don't depend on OBJS or BC_OBJS, since
8891 stamp-objlist does.
700f8a87 8892
bfef964b
JM
8893 * Makefile.in (../cc1plus): Depend on OBJDEPS.
8894 (OBJDEPS): Dependency version of OBJS.
8895
700f8a87
MS
8896Mon May 2 12:51:31 1994 Kung Hsu (kung@mexican.cygnus.com)
8897
8898 * search.c (dfs_debug_mark): unmark TYPE_DECL_SUPPRESS_DEBUG, not
8899 DECL_IGNORED_P.
8900
8901Fri Apr 29 12:29:56 1994 Jason Merrill (jason@deneb.cygnus.com)
8902
8903 * class.c (finish_struct): Clear out memory of local tags. And
8904 typedefs.
8905
8906 * decl2.c (grokclassfn): Don't set DECL_CONTEXT to a cv-qualified
8907 type.
8908 * search.c (get_matching_virtual): Be more helpful in error message.
8909
8910 * *: Use DECL_ARTIFICIAL (renamed from DECL_SYNTHESIZED).
8911
8912 * lex.c (default_assign_ref_body): Expect TYPE_NESTED_NAME to work.
8913 (default_copy_constructor_body): Ditto.
8914
8915 * class.c (finish_struct): Don't gratuitously create multiple decls
8916 for nested classes.
8917
8918Thu Apr 28 23:39:38 1994 Jason Merrill (jason@deneb.cygnus.com)
8919
8920 Avoid clobbering the arg types of other functions when reverting
8921 static member functions.
8922 * decl.c (revert_static_member_fn): Rearrange arguments, don't
8923 require values for 'fn' and 'argtypes', add warning to comment
8924 above.
8925 (decls_match): Rearrange arguments in call to rsmf.
8926 (grok_op_properties): Don't pass values for fn and argtypes.
8927 * pt.c (instantiate_template): Don't pass values for fn and argtypes.
8928
15fa00e9
DE
8929Thu Apr 28 16:29:11 1994 Doug Evans (dje@canuck.cygnus.com)
8930
8931 * Make-lang.in (cc1plus): Depend on stamp-objlist.
8932 * Makefile.in (BC_OBJS): Delete.
700f8a87
MS
8933 (OBJS): Cat ../stamp-objlist to get language independent files.
8934 Include ../c-common.o.
15fa00e9
DE
8935 (../cc1plus): Delete reference to BC_OBJS.
8936
700f8a87
MS
8937Thu Apr 28 02:12:08 1994 Jason Merrill (jason@deneb.cygnus.com)
8938
8939 * search.c (compute_access): No really, deal with static members
8940 properly. Would I lie to you?
8941
8942 Implement lexical hiding of function declarations.
8943 * pt.c (tsubst): Use lookup_name to look for function decls to guide
8944 instantiation.
8945 * method.c (build_opfncall): Use lookup_name_nonclass to look for
8946 non-member functions.
8947 * init.c (do_friend): Use lookup_name_nonclass to look for
8948 functions.
8949 * error.c (ident_fndecl): Use lookup_name to look for functions.
8950 * decl2.c (lookup_name_nonclass): New function, skips over
8951 CLASS_VALUE.
8952 * decl.c (struct binding_level): Lose overloads_shadowed field.
8953 (poplevel): Don't deal with overloads_shadowed.
8954 (push_overloaded_decl): Do lexical hiding for functions.
8955 * class.c (instantiate_type): Don't check non-members if we have
8956 members with the same name.
8957 * call.c (build_method_call): Use lookup_name_nonclass instead of
8958 IDENTIFIER_GLOBAL_VALUE to check for non-member functions.
8959 (build_overload_call_real): Ditto.
8960
8961 * decl.c (duplicate_decls): Check for ambiguous overloads here.
8962 (push_overloaded_decl): Instead of here.
8963
8964 * decl.c (pushdecl): Back out Chip's last change.
8965
8966 * decl.c (grok_op_properties): operators cannot be static members.
8967
8968 * cp-tree.h (DECL_SYNTHESIZED): DECL_SOURCE_LINE == 0
8969 (SET_DECL_SYNTHESIZED): DECL_SOURCE_LINE = 0
8970 * lex.c (cons_up_default_function): Use SET_DECL_SYNTHESIZED.
8971
8972 * method.c (do_inline_function_hair): Don't put friends of local
8973 classes into global scope, either.
8974
8975 * typeck2.c (build_functional_cast): Don't look for a function call
8976 interpretation.
8977
6060a796 8978Thu Apr 28 15:19:46 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
8979
8980 * cp-tree.h: disable use of backend EH.
8981
15fa00e9
DE
8982Wed Apr 27 21:01:24 1994 Doug Evans (dje@canuck.cygnus.com)
8983
8984 * Make-lang.in (c++.distdir): mkdir tmp/cp first.
8985 * Makefile.in (INCLUDES): Move definition to same place as
8986 parent makefile.
8987 (ALLOCA): Define.
8988 (OLDAR_FLAGS): Delete.
8989 (OLDCC): Define.
8990 (DIR): Delete.
8991 (CLIB): Define.
8992 (####site): Delete.
8993 (SUBDIR_USE_ALLOCA): Don't use ALLOCA if compiling with gcc.
8994
39211cd5
MS
8995Wed Apr 27 19:10:04 1994 Kung Hsu (kung@mexican.cygnus.com)
8996
8997 * decl.c (xref_tag): not to use strstr(), it's not available on
8998 all platforms.
8999
9000Wed Apr 27 18:10:12 1994 Jason Merrill (jason@deneb.cygnus.com)
9001
9002 * class.c (finish_struct): Resolve yet another class/pmf confusion.
9003
9004 * call.c (build_overload_call_real): Don't take the single-function
9005 shortcut if we're dealing with an overloaded operator.
9006
6060a796 9007Wed Apr 27 17:35:37 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
9008
9009 * search.c (get_base_distance): Search the virtual base class
9010 binfos, incase someone wants to convert to a real virtual base
9011 class.
9012 * search.c (expand_indirect_vtbls_init): Use convert_pointer_to_real
9013 instead of convert_pointer_to, as it now will work.
9014
9015Wed Apr 27 15:36:49 1994 Jason Merrill (jason@deneb.cygnus.com)
9016
9017 * cvt.c (convert_to_reference): Don't complain about casting away
9018 const and volatile.
9019
9020 * typeck.c (build_unary_op): References are too lvalues.
9021
6060a796 9022Wed Apr 27 13:58:05 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
9023
9024 * class.c (override_one_vtable): We have to prepare_fresh_vtable
9025 before we modify it, not after, also, we cannot reuse an old vtable,
9026 once we commit to a new vtable. Implement ambiguous overrides in
9027 virtual bases as abstract. Hack until we make the class
9028 ill-formed.
9029
9030Wed Apr 27 01:17:08 1994 Jason Merrill (jason@deneb.cygnus.com)
9031
9032 * parse.y (unary_expr): Expand new_placement[opt] and
9033 new_initializer[opt] inline.
9034
9035 * search.c (lookup_fnfields): Don't throw away the inheritance
9036 information here, either.
9037 (compute_access): Handle static members properly.
9038
9039 * init.c (build_member_call): Always set basetype_path, and pass it
9040 to lookup_fnfields.
9041
9042 * search.c (lookup_field): Deal properly with the case where
9043 xbasetype is a chain of binfos; don't throw away the inheritance
9044 information.
9045 (compute_access): protected_ok always starts out at 0.
9046
9047 * init.c (resolve_offset_ref): Don't cast `this' to the base type
9048 until we've got our basetype_path.
9049
9050 * cp-tree.h (IS_OVERLOAD_TYPE): aggregate or enum.
9051
9052 * cvt.c (build_up_reference): Use build_pointer_type rather than
9053 TYPE_POINTER_TO.
9054
9055 * call.c (convert_harshness_ansi): Call type_promotes_to for reals
9056 as well.
9057
9058 * cvt.c (type_promotes_to): Retain const and volatile, add
9059 float->double promotion.
9060
9061 * decl.c (grokdeclarator): Don't bash references to arrays into
9062 references to pointers in function parms. Use type_promotes_to.
9063
6060a796 9064Tue Apr 26 23:44:36 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
9065
9066 Finish off Apr 19th work.
9067
9068 * class.c (finish_struct_bits): Rename has_abstract_virtuals to
9069 might_have_abstract_virtuals.
9070 * class.c (strictly_overrides, override_one_vtable,
9071 merge_overrides): New routines to handle virtual base overrides.
9072 * class.c (finish_struct): Call merge_overrides to handle overrides
9073 in virtual bases.
9074
9075Tue Apr 26 12:45:53 1994 Jason Merrill (jason@deneb.cygnus.com)
9076
9077 * typeck.c (build_function_call): Call build_function_call_real with
9078 LOOKUP_NORMAL.
9079
9080 * *: Don't deal with TYPE_EXPRs.
9081
9082 * tree.c (lvalue_p): If the type of the expression is a reference,
9083 it's an lvalue.
9084
9085 * cvt.c (convert_to_reference): Complain about passing const
9086 lvalues to non-const references.
9087 (convert_from_reference): Don't arbitrarily throw away const and
9088 volatile on the target type.
9089
9090 * parse.y: Simplify and fix rules for `new'.
9091
9092 * decl.c (grok_op_properties): operator void is illegal.
9093
9094Mon Apr 25 02:36:28 1994 Jason Merrill (jason@deneb.cygnus.com)
9095
9096 * parse.y (components): Anonymous bitfields can still have declspecs.
9097
9098 * decl.c (pushdecl): Postpone handling of function templates like we
9099 do C functions.
9100
9101 * search.c (expand_indirect_vtbls_init): Fix infinite loop when
9102 convert_pointer_to fails.
9103
9104 * call.c (compute_conversion_costs_ansi): A user-defined conversion
9105 by itself is better than that UDC followed by standard conversions.
9106 Don't treat integers and reals specially.
9107
9108 * cp-tree.h: Declare flag_ansi.
9109
9110 * typeck.c (c_expand_return): pedwarn on return in void function
9111 even if the expression is of type void.
9112 (build_c_cast): Don't do as much checking for casts to void.
9113 (build_modify_expr): pedwarn about array assignment if this code
9114 wasn't generated by the compiler.
9115
9116 * tree.c (lvalue_p): A comma expression is an lvalue if its second
9117 operand is.
9118
9119 * typeck.c (default_conversion): Move code for promoting enums and
9120 ints from here.
9121 * cvt.c (type_promotes_to): To here.
9122 * call.c (convert_harshness_ansi): Use type_promotes_to. Also fix
9123 promotion semantics for reals.
9124
15fa00e9
DE
9125Sun Apr 24 16:52:51 1994 Doug Evans (dje@canuck.cygnus.com)
9126
9127 * Make-lang.in (c++.install-common): Check for g++-cross.
9128 * Makefile.in: Remove Cygnus cruft.
9129 (config.status): Delete.
9130 (RTL_H): Define.
9131 (TREE_H): Use complete pathname, some native makes have minimal
9132 VPATH support.
9133 (*.o): Use complete pathname to headers in parent dir.
9134 (doc, info, dvi): Delete.
9135
700f8a87
MS
9136Sun Apr 24 16:52:51 1994 Doug Evans (dje@canuck.cygnus.com)
9137
9138 * Make-lang.in (c++.install-common): Check for g++-cross.
9139 * Makefile.in: Remove Cygnus cruft.
9140 (config.status): Delete.
9141 (RTL_H): Define.
9142 (TREE_H): Use complete pathname, some native makes have minimal
9143 VPATH support.
9144 (*.o): Use complete pathname to headers in parent dir.
9145 (doc, info, dvi): Delete.
9146
39211cd5
MS
9147Sun Apr 24 00:47:49 1994 Jason Merrill (jason@deneb.cygnus.com)
9148
9149 * decl.c (pushdecl): Avoid redundant warning on redeclaring function
9150 with different return type.
9151 (decls_match): Compare return types strictly.
9152
9153Fri Apr 22 12:55:42 1994 Jason Merrill (jason@deneb.cygnus.com)
9154
9155 * cvt.c (build_type_conversion): Do try to convert through other
9156 pointers. This will fail if the class defines multiple pointer
9157 conversions.
9158
9159 * error.c (dump_type_prefix): Print out pointers to arrays properly.
9160 (dump_type_suffix): Ditto. (was 'int *[]', now 'int (*)[]')
9161
9162 * typeck.c (build_unary_op): Disallow ++/-- on pointers to
9163 incomplete type.
9164
9165 * decl.c (duplicate_decls): Check mismatched TREE_CODES after
9166 checking for shadowing a builtin. If we're redeclaring a builtin
9167 function, bash the old decl to avoid an ambiguous overload.
9168
9169 * cvt.c (convert_to_reference): Don't force arrays to decay here.
9170
9171 * tree.c (lvalue_p): A MODIFY_EXPR is an lvalue.
9172
9173 * decl.c (duplicate_decls): Don't assume that the decls will have
9174 types.
9175
9176 Mon Apr 18 11:35:32 1994 Chip Salzenberg (chip@fin.uucp)
9177
9178 [ cp/* changes propagated from c-* changes in 940318 snapshot ]
9179 * c-decl.c (pushdecl): Warn if type mismatch with another external decl
9180 in a global scope.
9181
9182 Fri Apr 22 06:38:56 1994 Chip Salzenberg (chip@fin.uucp)
9183
9184 * cp/typeck2.c (signature_error): Use cp_error for "%T".
9185
9186 Mon Apr 18 11:59:59 1994 Chip Salzenberg (chip@fin.uucp)
9187
9188 [ cp/* changes propagated from c-* changes in 940415 snapshot ]
9189 * cp/decl.c (duplicate_decls, pushdecl, builtin_function):
9190 Use DECL_FUNCTION_CODE instead of DECL_SET_FUNCTION_CODE.
9191
9192 Mon Apr 18 11:55:18 1994 Chip Salzenberg (chip@fin.uucp)
9193
9194 [ cp/* changes propagated from c-* changes in 940409 snapshot ]
9195 * cp/decl.c (duplicate_decls): Put new type in same obstack as
9196 old ones, or permanent if old ones in different obstacks.
9197
9198 Mon Apr 18 11:48:49 1994 Chip Salzenberg (chip@fin.uucp)
9199
9200 [ cp/* changes propagated from c-* changes in 940401 snapshot ]
9201 * cp/parse.y (attrib): Handle string args as expressions,
9202 merging the two rules. `mode' attribute now takes a string arg.
9203 Delete the rule for an identifier as arg.
9204
9205 Mon Apr 18 11:24:00 1994 Chip Salzenberg (chip@fin.uucp)
9206
9207 [ cp/* changes propagated from c-* changes in 940312 snapshot ]
9208 * cp/typeck.c (pointer_int_sum): Multiplication should be done signed.
9209 (pointer_diff): Likewise the division.
9210
9211 Sun Mar 6 19:43:39 1994 Chip Salzenberg (chip@fin.uucp)
9212
9213 [ cp/* changes propagated from c-* changes in 940304 snapshot ]
9214 * cp/decl.c (finish_decl): Issue warning for large objects,
9215 if requested.
9216
9217 Sat Feb 19 22:20:32 1994 Chip Salzenberg (chip@fin.uucp)
9218
9219 [ cp/* changes propagated from c-* changes in 940218 snapshot ]
9220 * cp/parse.y (attrib): Handle attribute ((section ("string"))).
9221 * cp/decl.c (duplicate_decls): Merge section name into new decl.
9222
9223 Tue Feb 8 09:49:17 1994 Chip Salzenberg (chip@fin.uucp)
9224
9225 [ cp/* changes propagated from c-* changes in 940206 snapshot ]
9226 * cp/typeck.c (signed_or_unsigned_type): Check for any
63718c49 9227 INTEGRAL_TYPE_P not just INTEGER_TYPE.
39211cd5
MS
9228
9229 Mon Dec 6 13:35:31 1993 Norbert Kiesel (norbert@i3.INformatik.rwth-aachen.DE)
9230
9231 * cp/decl.c (finish_enum): Start from 0 when determining precision
9232 for short enums.
9233
9234 Fri Dec 3 17:07:58 1993 Ralph Campbell (ralphc@pyramid.COM)
9235
9236 * cp/parse.y (unary_expr): Look at $1 for tree_code rather than
9237 casting $$.
9238
9239 Wed Nov 17 19:22:09 1993 Chip Salzenberg (chip@fin.uucp)
9240
9241 * cp/typeck.c (build_binary_op_nodefault): Propagate code
9242 from C front-end to optimize unsigned short division.
9243 (build_conditional_expr): Fix bug in "1 ? 42 : (void *) 8".
9244
9245 Wed Nov 17 19:17:18 1993 Chip Salzenberg (chip@fin.uucp)
9246
9247 * cp/call.c (convert_harshness_ansi): Given an (e.g.) char
9248 constant, prefer 'const char &' to 'int'.
9249
9250 Wed Feb 3 13:11:48 1993 Chip Salzenberg (chip@fin.uucp)
9251
9252 * cp/class.c (finish_struct_methods): Handle multiple
9253 constructors in fn_fields list.
9254
9255Fri Apr 22 12:48:10 1994 Kung Hsu (kung@mexican.cygnus.com)
9256
9257 * class.c (finish_struct): use TYPE_DECL_SUPPRESS_DEBUG to flag
9258 types not to be dumped in stabs, like types in #pragma interface.
9259 * decl.c (init_decl_processing): use TYPE_DECL_SUPPRESS_DEBUG to
9260 mark unknown type.
9261
15fa00e9
DE
9262Fri Apr 22 03:27:26 1994 Doug Evans (dje@cygnus.com)
9263
9264 * Language directory reorganization.
9265 See parent makefile.
9266
39211cd5
MS
9267Thu Apr 21 18:27:57 1994 Per Bothner (bothner@kalessin.cygnus.com)
9268
9269 * cp-tree.h (THUNK_DELTA): It is normally negative, so
9270 use signed .i variant of frame_size rather than unsigned .u.
9271 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
9272 use "VT" rather than "vt" due to binary incompatibility.
9273 * class.c (get_vtable_name): Use strlen of VTABLE_NAME_FORMAT,
9274 rather than sizeof, since it is now an expression.
9275 * class.c (modify_one_vtable): Modify to skip initial element
9276 containing a count of the vtable.
9277
7177d104
MS
9278Thu Apr 21 00:09:02 1994 Jason Merrill (jason@deneb.cygnus.com)
9279
9280 * lex.c (check_newline): Force interface_unknown on main input file.
9281
9282 * pt.c (do_pending_expansions): Always emit functions that have been
9283 explicitly instantiated.
9284 (do_function_instantiation): Set DECL_EXPLICITLY_INSTANTIATED.
9285 (do_type_instantiation): Set CLASSTYPE_VTABLE_NEEDS_WRITING and
9286 DECL_EXPLICITLY_INSTANTIATED on all my methods.
9287 * parse.y (explicit_instantiation): Call do_type_instantiation for
9288 types.
9289 * decl2.c (finish_vtable_vardecl): Call import_export_vtable.
9290 * decl.c (start_function): Don't set DECL_EXTERNAL on a function
9291 that has been explicitly instantiated.
9292 * cp-tree.h (DECL_EXPLICITLY_INSTANTIATED): Alias for
9293 DECL_LANG_FLAG_4.
9294 * class.c: Move import_export_vtable to decl2.c, and comment out all
9295 uses.
9296
9297Wed Apr 20 16:51:06 1994 Jason Merrill (jason@deneb.cygnus.com)
9298
9299 * lex.c (process_next_inline): Don't muck with DECL_INLINE.
9300 (do_pending_inlines): Ditto.
9301
6060a796 9302Tue Apr 19 22:25:41 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9303
9304 Reimplement vtable building, and most vtable pointer setting.
9305 Allows for earier maintenance, easier understandability, and most
9306 importantly, correct semantics.
9307
9308 * class.c (build_vtable): Removed unneeded
9309 SET_BINFO_VTABLE_PATH_MARKED.
9310 * class.c (prepare_fresh_vtable): Ditto. Added argument.
9311 * class.c (modify_vtable_entry): General cleanup.
9312 * class.c (related_vslot, is_normal, modify_other_vtable_entries,
9313 modify_vtable_entries): Removed.
9314 * class.c (add_virtual_function): General cleanup.
9315 * class.c (finish_base_struct): Setup BINFO_VTABLE and
9316 BINFO_VIRTUALS as early as we can, so that modify_all_vtables can
9317 work.
9318 * class.c (finish_vtbls): New routine, mostly from
9319 unmark_finished_struct.
9320 * class.c (overrides): New routine.
9321 * class.c (modify_one_vtable): New routine, mostly from
9322 modify_other_vtable_entries and modify_vtable_entries.
9323 * class.c (modify_all_direct_vtables, modify_all_indirect_vtables,
9324 modify_all_vtables): New routines.
9325 * class.c (finish_struct): Added arguemnt to prepare_fresh_vtable
9326 call. General cleanup on how pending_hard_virtuals are handled.
9327 General cleanup on modifying vtables. Use finish_vtbls, instead of
9328 unmark_finished_struct.
9329 * cp-tree.h (init_vtbl_ptrs, expand_direct_vtbls_init,
9330 get_first_matching_virtual, get_matching_virtual,
9331 expand_vbase_vtables_init, expand_indirect_vtbls_init): Update.
9332 * cvt.c (convert_pointer_to_real): cleanup error message.
9333 * decl.c (grokfndecl): General cleanup.
9334 * decl.c (finish_function): Change init_vtbl_ptrs call to
9335 expand_direct_vtbls_init. Change expand_vbase_vtables_init call to
9336 expand_indirect_vtbls_init.
9337 * init.c (expand_virtual_init): Remove unneeded argument.
9338 * init.c (init_vtbl_ptrs): Rename to expand_direct_vtbls_init, added
9339 two arguments to make more general. Made more general. Now can be
9340 used for vtable pointer initialization from virtual bases.
9341 * init.c (emit_base_init): Change expand_vbase_vtables_init call to
9342 expand_indirect_vtbls_init. Change init_vtbl_ptrs call to
9343 expand_direct_vtbls_init.
9344 * init.c (expand_virtual_init): General cleanup.
9345 * init.c (expand_default_init): Change expand_vbase_vtables_init
9346 call to expand_indirect_vtbls_init.
9347 * init.c (expand_recursive_init_1): Change expand_vbase_vtables_init
9348 call to expand_indirect_vtbls_init.
9349 * init.c (expand_recursive_init): Change expand_vbase_vtables_init
9350 call to expand_indirect_vtbls_init.
9351 * search.c (get_first_matching_virtual): Rename to
9352 get_matching_virtual. General cleanup and remove setting of
9353 DECL_CONTEXT. That is now done in a cleaner way in
9354 modify_vtable_entry and add_virtual_function.
9355 * search.c (expand_vbase_vtables_init): Rename to
9356 expand_indirect_vtbls_init. General cleanup. Use
9357 expand_direct_vtbls_init to do hard work. Ensures that _all_ vtable
9358 pointers from virtual bases are set up.
9359 * search.c (bfs_unmark_finished_struct, unmark_finished_struct):
9360 Removed.
9361
9362 * *.[chy]: Remove support for VTABLE_USES_MASK.
9363
9364Tue Apr 19 12:51:59 1994 Jason Merrill (jason@deneb.cygnus.com)
9365
9366 * cvt.c (convert_to_reference): Use NOP_EXPRs to switch between
9367 reference and pointer types instead of bashing the types directly.
9368
9369 * call.c (build_overload_call_real): Use the TREE_CODE to determine
9370 whether the function is overloaded or not, rather than
9371 TREE_OVERLOADED.
9372 * *: Remove all uses of TREE_OVERLOADED.
9373
9374 * decl.c (grokdeclarator): Only complain about initializing const
9375 fields when -ansi or -pedantic.
9376
9377Tue Apr 19 12:42:42 1994 Doug Evans (dje@canuck.cygnus.com)
9378
9379 * cp-tree.h (THUNK_DELTA): frame_size is now a union.
9380
9381Mon Apr 18 00:17:13 1994 Jason Merrill (jason@deneb.cygnus.com)
9382
9383 Do overloading on a block-by-block basis, not function-by-function.
9384 * decl.c: Lose overloads_to_forget.
9385 (struct binding_level): Add overloads_shadowed field.
9386 (poplevel): Restore overloads_shadowed.
9387 (push_overloaded_decl): Use overloads_shadowed instead of
9388 overloads_to_forget.
9389 (finish_function): Don't look at overloads_to_forget.
9390
9391 Copy enum_overflow logic from c-decl.c.
9392 * decl.c (start_enum): Initialize enum_overflow.
9393 (build_enumerator): Use enum_overflow. Also use current_scope().
9394
9395 * search.c (current_scope): Move Brendan's comment from
9396 build_enumerator here.
9397
9398 * typeck.c (convert_for_assignment): Change warnings to pedwarns for
9399 discarding const/volatile.
9400
9401Sat Apr 16 01:18:21 1994 Jason Merrill (jason@deneb.cygnus.com)
9402
9403 * typeck.c (comp_target_parms): Accept TEMPLATE_TYPE_PARMs on the rhs.
9404 (comp_target_types): Ditto.
9405
9406 * decl.c (lookup_name): Don't unset got_scope here.
9407
9408 * spew.c (yylex): Only replace yylval with the TYPE_NESTED_NAME if
9409 got_scope != NULL_TREE.
9410
9411Fri Apr 15 16:36:33 1994 Jason Merrill (jason@deneb.cygnus.com)
9412
9413 Horrible kludge to prevent templates from being instantiated by
9414 their base classes.
9415 * parse.y (template_instantiate_once): Unset TYPE_BEING_DEFINED
9416 before we get to left_curly.
9417 * pt.c (instantiate_class_template): Set TYPE_BEING_DEFINED.
9418
9419 * error.c (dump_decl): If it's a typedef, print out the name of the
9420 decl, not just the underlying type.
9421
9422 * decl.c (pushdecl): If the old duplicate decl was a TYPE_DECL,
9423 update the IDENTIFIER_TYPE_VALUE of its name.
9424
9425 * decl2.c (finish_file): When processing the initializer for a
9426 static member, pretend that the dummy function is a member of the
9427 same class.
9428
9429Fri Apr 15 15:56:35 1994 Kung Hsu (kung@mexican.cygnus.com)
9430
63718c49
GB
9431 * class.c (build_vtable_entry): revert Apr 4 change.
9432 * decl2.c (mark_vtable_entries): replace pure virtual function
9433 decl with abort's.
7177d104
MS
9434
9435Fri Apr 15 13:49:33 1994 Jason Merrill (jason@deneb.cygnus.com)
9436
9437 * typeck.c (build_conditional_expr): Pedwarn on pointer/integer
9438 mismatch, and don't pedwarn on 0/function pointer mismatch.
9439
9440 * typeck2.c (digest_init): Lose code for special handling of unions.
9441 (process_init_constructor): Since they're handled just fine here.
9442 Pedwarn on excess elements.
9443
9444 * decl2.c (grokfield): Complain about local class method declaration
9445 without definition.
9446
9447Fri Apr 15 13:19:40 1994 Per Bothner (bothner@kalessin.cygnus.com)
9448
9449 * method.c (emit_thunk): Add extern declaration for
9450 current_call_is_indirect (needed for hppa).
9451
9452Thu Apr 14 16:12:31 1994 Jason Merrill (jason@deneb.cygnus.com)
9453
9454 Improve local class support; allow classes in different blocks to
9455 have the same name.
9456 * decl.c (pushtag): Support local classes better.
9457 (pushdecl_nonclass_level): New function for pushing mangled decls of
9458 nested types into the appropriate scope.
9459 (xref_defn_tag): Use pushdecl_nonclass_level instead of
9460 pushdecl_top_level.
9461 (grokfndecl): Don't mess with IDENTIFIER_GLOBAL_VALUE for local
9462 class methods.
9463 * method.c (do_inline_function_hair): Ditto.
9464
9465 * class.c (finish_struct): It is legal for a class with no
9466 constructors to have nonstatic const and reference members.
9467
9468Thu Apr 14 07:15:11 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
9469
9470 * decl.c (push_overloaded_decl): Avoid giving errors about
9471 built-ins, since duplicate_decls will have given warnings/errors
9472 for them.
9473
9474Thu Apr 14 03:45:12 1994 Jason Merrill (jason@deneb.cygnus.com)
9475
9476 * cvt.c (convert_to_reference): Warn about casting pointer type to
9477 reference type when this is probably not what they wanted.
9478
9479Wed Apr 13 13:12:35 1994 Per Bothner (bothner@kalessin.cygnus.com)
9480
9481 * decl.c (finish_decl): Don't mindlessly set TREE_USED for
9482 static consts any more (toplev.c has now been modified to
9483 not emit warnings if they are unused).
9484
9485Wed Apr 13 00:22:35 1994 Jason Merrill (jason@deneb.cygnus.com)
9486
9487 * decl.c (grok_op_properties): If op new/delete get here with
9488 METHOD_TYPEs, do a revert_static_member_fn.
9489
9490 * cp-tree.h (IDENTIFIER_CLASS_TYPE_VALUE): Lose.
9491 * init.c (is_aggr_typedef): Don't look at
9492 IDENTIFIER_CLASS_TYPE_VALUE.
9493 (get_aggr_from_typedef): Ditto.
9494 (get_type_value): Ditto.
9495 * call.c (build_scoped_method_call): Don't rely on overloaded
9496 template names having IDENTIFIER_CLASS_VALUE set.
9497
9498 * parse.y (component_decl_1, fn.def2): Revert rules for
9499 constructors.
9500 (component_decl_1, fn.def2): Use $1 instead of $$, since $$ is being
9501 clobbered.
9502
9503 * decl.c (start_function): Only warn about `void main()' if pedantic
9504 || warn_return_type.
9505
9506Tue Apr 12 02:14:17 1994 Jason Merrill (jason@deneb.cygnus.com)
9507
9508 Clean up overloading of the template name.
9509 * class.c (pushclass): overload the template name whenever pushing
9510 into the scope of a template class, not just if it is
9511 uninstantiated.
9512 (popclass): Correspondingly.
9513 * search.c (push_class_decls): Don't overload_template_name.
9514 * pt.c (overload_template_name): Don't set IDENTIFIER_LOCAL_VALUE or
9515 DECL_CONTEXT on things.
9516 * parse.y (left_curly): Don't overload_template_name.
9517 * class.c (finish_struct): Don't undo_template_name_overload.
9518
9519 * method.c (build_opfncall): Only pass one argument to global op
9520 delete.
9521
9522 * call.c (build_method_call): Use TYPE_VEC_DELETE_TAKES_SIZE to
9523 decide how many arguments to use for vec delete.
9524
9525 * decl.c (grok_op_properties): Be consistent in modifying
9526 current_class_type.
9527 (grokdeclarator): Only complain about function decls with no return
9528 type if we're being pedantic.
9529
9530Mon Apr 11 00:10:53 1994 Jason Merrill (jason@deneb.cygnus.com)
9531
9532 Add support for operator new [] and operator delete [].
9533
9534 * tree.def: Add VEC_NEW_EXPR and VEC_DELETE_EXPR.
9535 * ptree.c (print_lang_type): Indicate vec new/delete.
9536 * parse.y: Support vec new/delete.
9537 * method.c (build_decl_overload): Deal with vec new/delete.
9538 (build_opfncall): Ditto.
9539 * lex.c (init_lex): Set up values of ansi_opname and opname_tab for
9540 vec new/delete. vec new uses "__vn", and vec delete uses "__vd".
9541 * init.c (init_init_processing): Set up BIVN and BIVD.
9542 (do_friend): Don't clean up after mistaken setting of TREE_GETS_NEW,
9543 since it doesn't happen any more.
9544 (build_new): Support vec new. Always call something.
9545 (build_x_delete): Support vec delete.
9546 (build_vec_delete): Lose dtor_dummy argument, add use_global_delete,
9547 and pass it to build_x_delete.
9548 * decl2.c (delete_sanity): Don't change behavior by whether or not
9549 the type has a destructor. Pass use_global_delete to
9550 build_vec_delete.
9551 (coerce_delete_type): Make sure that the type returned has a first
9552 argument of ptr_type_node.
9553 * decl.c (init_decl_processing): Also declare the global vec
9554 new/delete.
9555 (grokdeclarator): Also force vec new/delete to be static.
9556 (grok_op_properties): Note presence of vec new/delete, and play with
9557 their args. If vec delete takes the optional size_t argument, set
9558 TYPE_VEC_DELETE_TAKES_SIZE.
9559 * cp-tree.h (TYPE_GETS_{REG,VEC}_DELETE): New macros to simplify
9560 checking for one delete or the other.
9561 (lang_type): gets_new and gets_delete are now two bits long. The
9562 low bit is for the non-array version. Lose gets_placed_new.
9563 (TYPE_VEC_DELETE_TAKES_SIZE): New macro indicating that the vec
9564 delete defined by this class wants to know how much space it is
9565 deleting.
9566 (TYPE_VEC_NEW_USES_COOKIE): New macro to indicate when vec new must
9567 add a header containing the number of elements in the vector; i.e.
9568 when the elements need to be destroyed or vec delete wants to know
9569 the size.
9570 * class.c (finish_struct_methods): Also check for overloading vec
9571 delete.
9572 * call.c (build_method_call): Also delete second argument for vec
9573 delete.
9574
9575 * decl.c (grokdeclarator): Correct complaints again.
9576 (grokdeclarator): Fix segfault on null declarator.
9577 (decls_match): Also accept redeclaration with no arguments if both
9578 declarations were in C context. Bash TREE_TYPE (newdecl) here.
9579 (duplicate_decls): Instead of here.
9580
9581 * parse.y (nested_name_specifier_1): Lose rules for dealing with
9582 syntax errors nicely, since they break parsing of 'const i;'.
9583
9584 * decl.c (lookup_name): if (got_scope == current_class_type)
9585 val = IDENTIFIER_CLASS_VALUE (name).
9586
9587 * search.c (lookup_nested_tag): Look in enclosing classes, too.
9588
9589 * spew.c (yylex): Only look one character ahead when checking for a
9590 SCOPE.
9591
9592 * lex.c (check_newline): Read first nonwhite char before
9593 incrementing lineno.
9594
9595 * decl.c (grokdeclarator): Don't claim that typedefs are variables
9596 in warning.
9597
9598 * parse.y: Divide up uses of unqualified_id into
9599 notype_unqualified_id and unqualified_id, so that TYPENAME can be
9600 used as an identifier after an object.
9601
9602 * class.c (push_nested_class): Don't push into non-class scope.
9603
9604 * decl.c (grokdeclarator): If an identifier could be a type
9605 conversion operator, but has no associated type, it's not a type
9606 conversion operator.
9607
9608 * pt.c (unify): Check for equality of constants better.
9609
9610 * decl.c (grokdeclarator): Don't complain about access decls.
9611
9612Sun Apr 10 02:39:55 1994 Jason Merrill (jason@deneb.cygnus.com)
9613
9614 * decl.c (grokdeclarator): pedwarn about data definitions without
9615 types here.
9616
9617 * parse.y (datadef): Don't pedwarn about decls without types here,
9618 since that is valid for functions.
9619 (fn.def2, component_decl): Support constructors with declmods again.
9620 (nomods_initdecls): For decls without any mods, so that we don't try
9621 to get declspecs from some arbitrary $0.
9622
9623 * search.c (lookup_field): Use cp_error.
9624
9625 * parse.y (nested_name_specifier_1): Don't check aggr/non-aggr type
9626 here; it breaks destructors for non-aggr types.
9627
9628 * decl.c (lookup_name): Only look for TYPE_DECLs in base classes of
9629 a type being defined, like the comment says.
9630 If got_scope is not an aggregate, just return NULL_TREE.
9631
9632 * pt.c (create_nested_upt): Kung's code for creating types nested
9633 within uninstantiated templates now lives here (it used to live in
9634 hack_more_ids). It needs to be expanded.
9635
9636 * parse.y: Stop calling see_typename so much.
9637
9638 * decl.c (lookup_name): Deal with TTPs and UPTs.
9639
9640 * lex.c (real_yylex): Don't set looking_for_typename just because we
9641 saw a 'new'.
9642 (dont_see_typename): #if 0 out.
9643
9644 * spew.c (yylex): Increment looking_for_typename if the next
9645 character is SCOPE, rather than setting it to 1; this way, the value
9646 from seeing an aggr specifier will not be lost. This kinda relies
9647 on looking_for_typename never being < 0, which is now true.
9648
9649 * parse.y (nested_name_specifier_1): Accept TEMPLATE_TYPE_PARMs,
9650 too.
9651 (named_class_head_sans_basetype): Accept template types, too. Oops.
9652
9653Fri Apr 8 16:39:35 1994 Jason Merrill (jason@deneb.cygnus.com)
9654
9655 * decl2.c (reparse_decl_as_expr1): Handle SCOPE_REFs.
9656
9657 * parse.y: Lose START_DECLARATOR.
9658
9659 * search.c (lookup_nested_tag): New function to scan CLASSTYPE_TAGS
9660 for a class.
9661
9662 * parse.y: Simplify fn.def2 and component_decl. Support 'enum
9663 A::foo' syntax. Catch invalid scopes better.
9664
9665 * parse.y, lex.c: lose TYPENAME_COLON.
9666
9667 * decl2.c (groktypefield): #if 0 out.
9668
9669 * decl.c (lookup_name): If the type denoted by got_scope is
9670 currently being defined, look in CLASSTYPE_TAGS rather than FIELDS.
9671
9672 * class.c (push_nested_class): Don't try to push into
9673 error_mark_node.
9674
9675Fri Apr 8 07:26:36 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
9676
9677 * Makefile.in (stamp-parse): Update count of conflicts to 33.
9678
9679Thu Apr 7 17:47:53 1994 Jason Merrill (jason@deneb.cygnus.com)
9680
9681 A saner implementation of nested types that treats template types
9682 no differently from non-template types. There are still some
9683 shortcomings of our system; most notably, it is difficult to look
9684 for a nested type that is hidden by another name, because of the way
9685 we keep track of hidden types. But this shouldn't be a problem for
9686 just about anyone. Perhaps lookup_field should be fixed up a bit.
9687
9688 * spew.c: Moved handling of nested types/scoping from the lexer
9689 into the parser. Removed variable template_type_seen_before_scope.
9690 Removed functions frob_identifier, hack_more_ids, and various cruft
9691 that was #if 0'd out in the past, reducing the size of the file from
9692 1146 lines to 450 lines. We can't quite do away with spew.c yet,
9693 though; we still need it for do_aggr () and checking for SCOPE after
9694 the current identifier. And setting lastiddecl.
9695
9696 * parse.y: Moved handling of nested types/scoping from the lexer
9697 into the parser, using a new global variable `got_scope'. Reduced
9698 the number of states by 53. Implemented all uses of explicit global
9699 scope. Removed terminals SCOPED_TYPENAME and SCOPED_NAME. Removed
9700 nonterminals tmpl.1, scoped_base_class, id_scope, typename_scope,
9701 scoped_typename. Added nonterminals nested_type,
9702 qualified_type_name, complete_type_name, qualified_id, ptr_to_mem,
9703 nested_name_specifier, global_scope, overqualified_id, type_name.
9704 Changed many others. Added 9 new reduce/reduce conflicts, which are
9705 nested type parallels of 9 that were already in the grammar for
9706 non-nested types. Eight of the now 33 conflicts should be removed
9707 in the process of resolving the late binding between variable and
9708 function decls.
9709
9710 * gxxint.texi (Parser): Update.
9711
9712 * cp-tree.h (IS_AGGR_TYPE_CODE): Add UNINSTANTIATED_P_TYPE.
9713
9714 * lex.h: Add decl for got_scope.
9715
9716 * lex.c (see_typename): Claim to be the lexer when calling
9717 lookup_name.
9718
9719 * decl.c (lookup_name): When called from the lexer, look at
9720 got_scope and looking_at_typename; otherwise don't.
9721
6060a796 9722Thu Apr 7 22:05:47 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9723
9724 31th Cygnus<->FSF merge.
9725
9726Thu Apr 7 17:47:53 1994 Jason Merrill (jason@deneb.cygnus.com)
9727
9728 * decl2.c (mark_vtable_entries): Call this to mark all the
9729 entries in the vtable addressable.
9730 (finish_decl_parsing): Handle SCOPE_REFs.
9731
9732 * decl.c (decls_match): Always call compparms with strict == 1.
9733 Handle the special case of C function redecl here.
9734 (duplicate_decls): Only keep the old type if the new decl takes no
9735 arguments.
9736
9737 * typeck.c (compparms): Also allow t1 to be ... if strict == 0.
9738
6060a796 9739Thu Apr 7 16:17:50 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9740
9741 * class.c (build_vtable_entry): Fix breakage introduced Apr 5
9742 17:48:41.
9743
9744Wed Apr 6 16:05:10 1994 Per Bothner (bothner@kalessin.cygnus.com)
9745
9746 * init.c (build_virtual_init), search.c (build_vbase_vtables_init),
9747 ch-tree.h: Every place these functions were called, the result was
9748 immediately passed to expand_expr_stmt. Reduce redundancy by
9749 calling expand_expr_init *inside* these functions. These
9750 makes for a simpler interface, and we don't have to build
9751 compound expressions. Hence, rename these function to:
9752 expand_virtual_init and expand_vbase_vtables_init respectively.
9753 * init.c, decl.c: Change callers of these functions.
9754 * init.c, cp-tree.h (expand_virtual_init): Make static.
9755
9756 * decl2.c (finish_file): Check TREE_PUBLIC||TREE_ADDRESSABLE
9757 rather than DECL_SAVED_INSNS before emitting inlines.
9758
9759Wed Apr 6 13:06:39 1994 Jason Merrill (jason@deneb.cygnus.com)
9760
9761 * spew.c (init_spew): #if 0 out stuff used by arbitrate_lookup.
9762
9763 * decl.c (duplicate_decls): If this is a new declaration of an
9764 extern "C" function, keep the type (for the argtypes).
9765 (redeclaration_error_message): Don't check DECL_LANGUAGE here.
9766 (decls_match): Call compparms with a value of strict dependent on
9767 the value of strict_prototypes for DECL_LANGUAGE (oldecl).
9768
9769 * typeck.c (compparms): ... is only equivalent to non-promoting
9770 parms if we're not being strict.
9771
9772 * parse.y (empty_parms): Don't check flag_ansi || pedantic here.
9773
9774 * decl.c (init_decl_processing): if (flag_ansi || pedantic)
9775 strict_prototypes_lang_c = strict_prototypes_lang_cplusplus;
9776
9777 * decl2.c (grok_function_init): Don't set DECL_INITIAL on pure
9778 virtuals.
9779
9780Tue Apr 5 17:48:41 1994 Per Bothner (bothner@kalessin.cygnus.com)
9781
9782 Support for implementing vtables with thunks.
9783 * tree.def (THUNK_DECL): New TREE_CODE.
9784 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY), tree.c
9785 (fnaddr_from_vtable_entry): Handle flag_vtable_thunks case.
9786 * cp-tree.h (memptr_type): New variable.
9787 * class.c (build_vtable_entry): Build thunk if necessary.
9788 * class.c (build_vfn_ref): If using thunks, don't need
9789 to add delta field from vtable (there is none!).
9790 * decl.c: Add memptr_type as well as vtable_entry_type.
9791 If using thunks, the latter is just ptr_type_node.
9792 * gc.c, typeck.c: Use memptr_typeChange, not vtable_entry_type.
9793 * decl2.c (finish_vtable_vardecl): Handle thunks.
9794 * expr.c (cplus_expand_expr): Support THUNK_DECL.
9795
9796 * decl.c (grokdeclarator): Set DECL_THIS_EXTERN if "extern".
9797 * decl.c (start_function): Set current_extern_inline based on
9798 DECL_THIS_EXTERN, not TREE_PUBLIC.
9799 * decl.c (finish_function): Call mark_inline_for_output if needed,
9800
9801 Improve intelligence about when to emit inlines.
9802 * cp-tree.h (lang_decl_flags): New field saved_inline.
9803 * cp-tree.h (DECL_SAVED_INLINE): New macro.
9804 * class.c (add_virtual_function): Don't set TREE_ADDRESSABLE.
9805 * decl.h, decl.c (pending_addressable_inlines): Removed.
9806 * decl2.c (pending_addressable_inlines): Renamed to saved_inlines.
9807 * decl2.c (mark_inline_for_output): Do nothing if
9808 DECL_SAVED_INLINE; otherwise set it (and add to saved_inlines list).
9809 * decl2.c (finish_vtable_vardecl): SET_CLASSTYPE_INTERFACE_KNOWN
9810 and set CLASSTYPE_INTERFACE_ONLY if there is a non-inline virtual.
9811 * decl2.c (finish_file): Writing out inlines later, so we can
9812 also handle the ones needed for vtbales.
9813 * decl2.c (write_vtable_entries, finish_vtable_typedecl): Removed.
9814
9815 * cp-tree.h, class.c, decl2.c, search.c: Remove -fvtable-hack
9816 and flag_vtable_hack. Use -fvtable-thunks and flag_vtable_thunks
9817 instead. (The rationale is that these optimizations both break binary
9818 compatibility, but should become the default in a future release.)
9819
6060a796 9820Wed Apr 6 10:53:56 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9821
9822 * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT
9823 of a fndecl, as we might not be from that vfield.
9824
9825Tue Apr 5 17:43:35 1994 Kung Hsu (kung@mexican.cygnus.com)
9826
9827 * class.c (add_virtual_function): fix bug for pure virtual, so
9828 that DECL_VINDEX of the dummy decl copied won't be error.
9829 (see also Apr 4 change)
9830
9831Tue Apr 5 17:23:45 1994 Per Bothner (bothner@kalessin.cygnus.com)
9832
9833 * typeck.c (c_expand_return): Before checking that we're not
9834 returning the address of a local, make sure it's a VAR_DECL.
9835 (And don't worry about it being a TREE_LIST.)
9836
9837Tue Apr 5 13:26:42 1994 Jason Merrill (jason@deneb.cygnus.com)
9838
9839 * parse.y (YYDEBUG): Always define.
9840 * lex.c (YYDEBUG): Ditto.
9841
9842Mon Apr 4 11:28:17 1994 Kung Hsu (kung@mexican.cygnus.com)
9843
9844 * class.c (finish_struct): backup out the change below, put the
9845 new change for the same purpose. The change below breaks code.
9846
9847 * class.c (finish_struct): if pure virtual, copy node and make
9848 RTL point to abort, then put in virtual table.
9849 * decl2.c (grok_function_iit): reinstate Mar 31 change.
9850
9851Sat Apr 2 03:12:58 1994 Jason Merrill (jason@deneb.cygnus.com)
9852
9853 * init.c (build_new): pedwarn about newing const and volatile
9854 types.
9855
9856 * tree.c (get_identifier_list): Only do the special handling
9857 thing if we're dealing with the main variant of the record type.
9858
9859 * cvt.c (convert_to_reference): When converting between
9860 compatible reference types, use the pointer conversion machinery.
9861 Don't just blindly overwrite the old type.
9862
9863Fri Apr 1 17:14:42 1994 Jason Merrill (jason@deneb.cygnus.com)
9864
9865 * call.c (build_method_call): When looking at global functions,
9866 be sure to use instance_ptr for the first argument, not some version
9867 of it that has been cast to a base class. Also do this before
9868 comparing candidates.
9869
9870Thu Mar 31 19:50:35 1994 Jason Merrill (jason@deneb.cygnus.com)
9871
9872 * call.c (build_method_call): Constructors can be called for
9873 const objects.
9874
9875Thu Mar 31 16:20:16 1994 Kung Hsu (kung@mexican.cygnus.com)
9876
9877 * decl2.c (grok_func_init): do not abort as rtl for pur virtual
9878 fucntions. They can be defined somewhere else.
9879
9880Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
9881
9882 * decl.c (init_decl_processing): Declare __builtin_return_address
9883 and __builtin_frame_address for C++ as well.
9884
6060a796 9885Thu Mar 31 12:35:49 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9886
9887 * typeck2.c (store_init_value): Integral constant variables are
9888 always constant, even when doing -fpic.
9889
9890Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
9891
9892 * decl.c (redeclaration_error_message): Pass the types to
9893 comptypes.
9894
6060a796 9895Wed Mar 30 21:29:25 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9896
9897 Cures incorrect errors about pure virtuals in a class, when they
9898 have been overridden in a derived class.
9899
9900 * search.c (get_abstract_virtuals): Reimplement.
9901 * search.c (get_abstract_virtuals_1): New routine.
9902
9903Wed Mar 30 14:10:04 1994 Jason Merrill (jason@deneb.cygnus.com)
9904
9905 * pt.c (push_template_decls): Make the pushed level pseudo
9906 global.
9907
9908 * parse.y (extdefs): Don't pop everything if the current binding
9909 level is pseudo_global.
9910
9911 * decl.c (pop_everything): Stop on reaching a pseudo-global
9912 binding level.
9913
9914 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Change to more reliable test.
9915
9916 * decl.c (duplicate_decls): Only copy DECL_SOURCE_{FILE_LINE} if
9917 the old decl actually had an initializer.
9918
9919 * {various}: Clean up gcc -W complaints.
9920
9921 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Currently defined to be
9922 (DECL_CONTEXT (NODE) != NULL_TREE).
9923
9924 * parse.y (lang_extdef): Call pop_everything if necessary.
9925
9926 * decl.c (pop_everything): New function for popping binding
9927 levels left over after a syntax error.
9928 (pushdecl): Use DECL_FUNCTION_MEMBER_P to decide whether or not
9929 a function is a member.
9930
6060a796 9931Wed Mar 30 14:20:50 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
9932
9933 Cures calling a more base base class function, when a more derived
9934 base class member should be called in some MI situations.
9935
9936 * search.c (make_binfo): Use more the more specialized base
63718c49
GB
9937 binfos from the binfo given as the second argument to make_binfo,
9938 instead of the unspecialized ones from the TYPE_BINFO.
7177d104
MS
9939 * class.c (finish_base_struct): Ditto, update callers.
9940 * search.c (dfs_get_vbase_types): Ditto.
9941 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Ditto.
9942 * decl.c (xref_tag): Use NULL_TREE instead of 0.
9943 * lex.c (make_lang_type): Ditto.
9944
9945Wed Mar 30 14:10:04 1994 Jason Merrill (jason@deneb.cygnus.com)
9946
9947 * decl.c (pushdecl): If pushing a C-linkage function, only do a
9948 push_overloaded_decl.
9949 (duplicate_decls): Standard overloading does not shadow built-ins.
9950
9951Tue Mar 29 00:54:18 1994 Jason Merrill (jason@deneb.cygnus.com)
9952
9953 * pt.c (end_template_decl): Don't call push_overloaded_decl.
9954
9955 * init.c (do_friend): Don't call push_overloaded_decl.
9956
9957 * decl.c (pushdecl): Call push_overloaded_decl for functions and
9958 function templates.
9959 (duplicate_decls): functions and function templates are not
9960 duplicates, but don't complain about calling this function to
9961 compare them.
9962 (push_overloaded_decl): Don't deal with linkage. Call
9963 duplicate_decls.
9964 (redeclaration_error_message): Deal with linkage.
9965
9966 * decl.c (start_function): If push_overloaded_decl returns an
9967 older version of the function, deal with it.
9968
9969 * decl.c (start_function): Be sure only to push_overloaded_decl
9970 for non-members.
9971
9972 * decl.c (grokfndecl): Put back clearing of DECL_CHAIN for
9973 methods.
9974 (start_function): Lose broken and redundant code for checking old
9975 decl.
9976
9977 * init.c (add_friend): Give line numbers of both friend decls
9978 when warning about re-friending.
9979
9980 * pt.c (tsubst): Use comptypes rather than == to compare the
9981 types of the method as declared and as defined, since default
9982 parameters may be different.
9983
9984 * call.c (build_method_call): Use brendan's candidate printing
9985 routine.
9986
9987 * decl.c (start_method): Methods defined in the class body are
9988 inline whether or not it's a template class.
9989
9990Mon Mar 28 16:39:26 1994 Jason Merrill (jason@deneb.cygnus.com)
9991
9992 * parse.y (initdcl0): Add "extern" to current_declspecs if
9993 have_extern_spec && ! used_extern_spcec.
9994
9995 * tree.c (really_overloaded_fn): A fn with more than one
9996 overload.
9997
9998 * pt.c (end_template_decl): Use really_overloaded_fn.
9999
10000 * decl.c (duplicate_decls): When smashing a decl into a previous
10001 definition, keep the old file and line.
10002 Don't deal with overloaded functions.
10003 Lose old code for checking arg types of functions.
10004 Check for overloaded C functions.
10005 (pushdecl): Deal with overloaded functions.
10006 (start_decl): Expect pushdecl to return an appropriate function decl.
10007 (start_function): Ditto.
10008 (push_overloaded_decl): Don't check for overloaded C functions.
10009
10010 * *.c: Stop using DECL_OVERLOADED, it being archaic.
10011 TREE_OVERLOADED should probably go, too.
10012
10013Mon Mar 28 14:00:45 1994 Ron Guilmette (rfg@netcom.com)
10014
10015 * typeck.c (comp_target_types): Call comp_target_parms with
10016 strict == 1.
10017
10018Sun Mar 27 00:07:45 1994 Jason Merrill (jason@deneb.cygnus.com)
10019
10020 * parse.y (empty_parms): Don't parse () as (...) in extern "C"
10021 sections if we're compiling with -ansi or -pedantic.
10022
10023 * decl.c (decls_match): Don't treat (int) and (int&) as matching.
10024
10025 * decl2.c (grokfield): Don't pedwarn twice about initializing
10026 field.
10027
10028 * decl.c (push_overloaded_decl): Warn about shadowing
10029 constructor.
10030 (redeclaration_error_message): Don't allow 'int a; int a;'
10031
10032 * cvt.c (build_up_reference): Only check for valid upcast if
10033 LOOKUP_PROTECT is set, not just any flag.
10034
10035Fri Mar 25 01:22:31 1994 Jason Merrill (jason@deneb.cygnus.com)
10036
10037 * lex.c (check_newline): When we see a #pragma implementation,
10038 also set it for the main input file.
10039
10040 * init.c (build_new): Convert array size argument to size_t.
10041
10042 * parse.y (primary): If we're doing a parenthesized type-id, call
10043 groktypename before passing it to build_new.
10044
10045 * call.c (build_method_call): Deal properly with const and
10046 volatile for instances of reference type.
10047
10048 * decl.c (store_return_init): Change 'if (pedantic) error' to 'if
10049 (pedantic) pedwarn'.
10050
10051 * decl.c (grokdeclarator): Don't complain about putting `static'
10052 and `inline' on template function decls.
10053
10054Thu Mar 24 23:18:19 1994 Jason Merrill (jason@deneb.cygnus.com)
10055
10056 * call.c (build_method_call): Preserve const & volatile on
10057 `this'.
10058
6060a796 10059Thu Mar 24 16:21:52 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10060
10061 * init.c (build_new, build_vec_delete): Use global new and delete
10062 for arrays.
10063 * decl2.c (delete_sanity): Ditto.
10064
10065Thu Mar 24 02:10:46 1994 Jason Merrill (jason@deneb.cygnus.com)
10066
10067 * cvt.c (convert_to_reference): If i is an lvalue,
10068 (int &)i -> *(int*)&i, as per 5.2.8p9 of the latest WP.
10069 (convert_force): Call convert_to_reference with LOOKUP_COMPLAIN.
10070
10071Wed Mar 23 17:45:37 1994 Jason Merrill (jason@deneb.cygnus.com)
10072
10073 * decl.c (duplicate_decls): Also propagate DECL_TEMPLATE_MEMBERS
10074 and DECL_TEMPLATE_INSTANTIATIONS.
10075
10076 * init.c (build_new): Handle array typedefs properly.
10077
6060a796 10078Wed Mar 23 18:23:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10079
10080 30th Cygnus<->FSF merge.
10081
6060a796 10082Wed Mar 23 00:46:24 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10083
10084 * class.c (modify_vtable_entries): Avoid running off the end of the
10085 virtuals list when processing a virtual destructor.
10086 * class.c (get_vtable_entry): Ditto.
10087
10088Wed Mar 23 00:23:59 1994 Jason Merrill (jason@deneb.cygnus.com)
10089
10090 * decl.c (duplicate_decls): If two template decls don't match,
10091 just return 0.
10092
10093Tue Mar 22 23:49:41 1994 Jason Merrill (jason@deneb.cygnus.com)
10094
10095 * typeck.c (convert_for_assignment): Don't pedwarn about
10096 converting function pointer to void *.
10097
6060a796 10098Tue Mar 22 22:23:19 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10099
10100 Major revamp of pointer to member functions. Cures major
10101 nonfunctionality when used in casts, and MI situations.
10102
10103 * cvt.c (convert_force): Update call site of build_ptrmemfunc.
10104 * typeck.c (convert_for_assignment): Ditto.
10105 * typeck2.c (digest_init): Ditto.
10106 * typeck2.c (process_init_constructor): Simplify by moving code into
10107 digest_init.
10108 * typeck2.c (digest_init): Do default_conversions on init value, if
10109 we are processing pointer to member functions.
10110 * class.c (get_vfield_offset): Now non-static. Convert bit offset
10111 into byte offset.
10112 * cp-tree.h (get_vfield_offset): Ditto.
10113 * typeck.c (get_member_function_from_ptrfunc): Convert down to right
10114 instance, before fetching vtable pointer.
10115 * typeck.c (get_delta_difference): New routine.
10116 * typeck.c (build_ptrmemfunc): Revamp to handle casting better, also
10117 get vtable pointer out of right subobject.
10118
6060a796 10119Tue Mar 22 17:56:48 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10120
10121 * search.c (get_binfo): Return NULL instead of aborting, when
10122 passed a UNION_TYPE.
10123
10124Tue Mar 22 12:44:54 1994 Jason Merrill (jason@deneb.cygnus.com)
10125
10126 These patches implement handling of redefinition/redeclaration of
10127 templates.
10128
10129 * typeck.c (comptypes): Simplify. All TEMPLATE_TYPE_PARMs are
10130 considered compatible.
10131
10132 * parse.y (template_def): Pass defn argument to end_template_decl.
10133
10134 * pt.c (end_template_decl): Add defn argument. Check for
10135 redefinition. Simplify.
10136
10137 * error.c (OB_UNPUT): New macro, to remove mistakes.
10138 (aggr_variety): Subroutine of dump_aggr_type.
10139
10140 * decl.c (decls_match): Support templates.
10141 (duplicate_decls): No longer static. Don't try to lay out template
10142 decls.
10143 (pushdecl): Simplify.
10144
10145 * cp-tree.h (DECL_TEMPLATE_MEMBERS): Use DECL_SIZE instead of
10146 DECL_INITIAL.
10147
10148Mon Mar 21 11:46:55 1994 Jason Merrill (jason@deneb.cygnus.com)
10149
10150 * error.c (dump_decl): Support class template decls.
10151 (dump_type): Don't adorn template type parms.
10152
10153 * decl.c (duplicate_decls): Save DECL_TEMPLATE_INFO from old decl
10154 if it was a definition.
10155 (redeclaration_error_message): Do the cp_error thang, and reject
10156 redefinition of templates.
10157
10158Mon Mar 21 19:36:06 1994 Per Bothner (bothner@kalessin.cygnus.com)
10159
10160 * decl.c (grokdeclarator): Set TREE_PUBLIC for METHOD_TYPE
10161 in FIELD context, when appropriate. Also,
10162 CLASSTYPE_INTERFACE_ONLY is irrelevant to setting TREE_PUBLIC.
10163 Also, simplify check for bogus return specifiers.
10164
10165Mon Mar 21 11:46:55 1994 Jason Merrill (jason@deneb.cygnus.com)
10166
10167 * parse.y (after_type_declarator1): Expand type_quals.
10168 (notype_declarator1): Ditto.
10169 (absdcl1): Ditto.
10170
10171Sat Mar 19 01:05:17 1994 Jason Merrill (jason@deneb.cygnus.com)
10172
10173 * decl.c (grokdeclarator): Treat class-local typedefs like static
10174 members; i.e. 'typedef int f();' means that f is a function type,
10175 not a method type.
10176
10177 * parse.y (decl): Change direct_* back to *.
10178 (type_id): Change direct_abstract_declarator to absdcl.
10179 (direct_declarator, direct_initdecls, direct_initdcl0): Remove again.
10180
10181Fri Mar 18 12:47:59 1994 Jason Merrill (jason@deneb.cygnus.com)
10182
10183 These two patches fix crashes on instantiating a template inside a
10184 function with C linkage or containing labels.
10185
10186 * class.c (current_lang_stacksize): No longer static.
10187
10188 * decl.c (struct saved_scope): Add lang_base, lang_stack,
10189 lang_name, lang_stacksize, and named_labels.
10190 (push_to_top_level): Save them.
10191 (pop_from_top_level): Restore them.
10192
10193 * gxxint.texi (Parser): Update.
10194
10195 These two patches finish moving the task of expr/declarator
10196 ambiguity resolution from the lexer to the parser, and add one more
10197 r/r conflict. START_DECLARATOR can now be nuked.
10198
10199 * parse.y (decl): Add "direct_" in typespec X rules.
10200 (direct_declarator): New nonterminal for
10201 direct_after_type_declarator and direct_notype_declarator.
10202 (direct_initdecls): Like initdecls, but uses direct_initdcl0.
10203 (direct_initdcl0): Like initdcl0, but uses direct_declarator.
10204 (named_parm): Add typespec direct_declarator rule.
10205
10206 * spew.c (yylex): #if 0 out START_DECLARATOR insertion.
10207
10208 These two patches disable some excessive cleverness on the part of
10209 g++; a non-class declaration always hides a class declaration in the
10210 same scope, and g++ was trying to unhide it depending on the
10211 enclosing expression.
10212
10213 * spew.c (arbitrate_lookup): #if 0 out.
10214
10215 * decl.c (lookup_name): Never call arbitrate_lookup.
10216
10217 * parse.y (complex_notype_declarator1): Add '*'
10218 complex_notype_declarator1 and '&' complex_notype_declarator1 rules.
10219
10220 * parse.y (complex_direct_notype_declarator): Restore id_scope
10221 see_typename TYPENAME rule, remove all other rules beginning with
10222 those tokens.
10223 (notype_unqualified_id): Add '~' see_typename IDENTIFIER rule.
10224
10225Thu Mar 17 17:30:01 1994 Jason Merrill (jason@deneb.cygnus.com)
10226
10227 These changes fix the compiler's handling of the functional cast/
10228 object declaration ambiguities in section 6.8 of the ARM. They also
10229 add 11 reduce/reduce conflicts. Sigh.
10230
10231 * parse.y: Add precedence decls for OPERATOR and '~'.
10232 (notype_unqualified_id): New nonterminal, encompasses all of the
10233 ANSI unqualified-id nonterminal except TYPENAMEs.
10234 (expr_or_declarator): New nonterminal to delay parsing of code like
10235 `int (*a)'.
10236 (primary): Use notype_unqualified_id.
10237 (decl): Add typespec initdecls ';' and typespec declarator ';'
10238 rules.
10239 (initdcl0): Deal with the above.
10240 (complex_notype_declarator1): A notype_declarator that is not also
10241 an expr_or_declarator.
10242 (complex_direct_notype_declarator): A direct_notype_declarator that
10243 doesn't conflict with expr_or_declarator. Use
10244 notype_unqualified_id. Remove id_scope see_typename TYPENAME rule.
10245 (functional_cast): New nonterminal, for the three functional cast
10246 rules. So that they can be moved after
10247 complex_direct_notype_declarator.
10248 (see_typename): Don't accept type_quals any more.
10249
10250 * decl2.c (reparse_decl_as_expr): New function to deal with parse
10251 nodes for code like `int (*a)++;'.
10252 (reparse_decl_as_expr1): Recursive subroutine of the above.
10253 (finish_decl_parsing): New function to deal with parse nodes for
10254 code like `int (*a);'. See the difference?
10255
6060a796 10256Thu Mar 17 12:16:10 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10257
10258 These changes break binary compatibility in code with classes
10259 that use virtual bases.
10260
10261 * search.c (dfs_get_vbase_types): Simplify and correct to make
10262 sure virtual bases are initialized in dfs ordering.
10263 * search.c (get_vbase_types): Simplify and make readable.
10264
10265Thu Mar 17 12:01:10 1994 Jason Merrill (jason@deneb.cygnus.com)
10266
10267 * parse.y: s/ typename / type_id /g
10268
10269Wed Mar 16 17:42:52 1994 Kung Hsu (kung@mexican.cygnus.com)
10270
10271 * parse.y (typespec): add SCOPE TYPENAME for global scoped
10272 type. e.g. ::B x.
10273
10274 * decl.c (complete_array_type): fix a bug that in -pendantic
10275 mode even there's no initializer, it will continue to build
10276 default index.
10277
10278Wed Mar 16 17:43:07 1994 Jason Merrill (jason@deneb.cygnus.com)
10279
10280 * parse.y (direct_notype_declarator): Add PTYPENAME rule, remove
10281 all of the scoped PTYPENAME rules.
10282
6060a796 10283Wed Mar 16 16:39:02 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10284
10285 * init.c (build_offset_ref): The value of A::typedef_name is
10286 always the TYPE_DECL, and never an error.
10287
10288Tue Mar 15 20:02:35 1994 Jason Merrill (jason@deneb.cygnus.com)
10289
10290 * search.c (get_base_distance_recursive): Two binfos can only
10291 represent the same object if they are both via_virtual.
10292
10293 * class.c (finish_base_struct): Check vbases for ambiguity, too.
10294
10295 * search.c (get_vbase_types): Accept binfo argument, too.
10296
10297Tue Mar 15 19:22:05 1994 Kung Hsu (kung@mexican.cygnus.com)
10298
10299 * decl.c (complete_array_type): complete TYPE_DOMAIN of the
10300 initializer also, because back-end requires it.
10301
10302Tue Mar 15 15:33:31 1994 Jason Merrill (jason@deneb.cygnus.com)
10303
10304 * error.c (dump_expr): Support member functions (which show up as
10305 OFFSET_REFs).
10306
6060a796 10307Mon Mar 14 16:24:36 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10308
10309 * init.c (build_new): Set the return type of multidimensional
10310 news correctly.
10311
10312Fri Mar 11 15:35:39 1994 Kung Hsu (kung@mexican.cygnus.com)
10313
10314 * call.c (build_method_call): if basetype not equal to type
10315 of the instance, use the type of the instance in building
10316 destructor.
10317
10318Thu Mar 10 17:07:10 1994 Kung Hsu (kung@mexican.cygnus.com)
10319
10320 * parse.y (direct_notype_declarator): add push_nested_type for
10321 'template_type SCOPED_NAME' rule.
10322
10323Tue Mar 8 00:19:58 1994 Jason Merrill (jason@deneb.cygnus.com)
10324
10325 * parse.y (parm): Add typed_declspec1 {absdcl, epsilon} rules.
10326
10327Sat Mar 5 04:47:48 1994 Jason Merrill (jason@deneb.cygnus.com)
10328
10329 * parse.y (regcast_or_absdcl): New nonterminal to implement late
10330 reduction of constructs like `int ((int)(int)(int))'.
10331 (cast_expr): Use it.
10332 (sub_cast_expr): Everything that can come after a cast.
10333 (typed_declspecs1): typed_declspecs that are not typed_typespecs.
10334 (direct_after_type_declarator): Lose PAREN_STAR_PAREN rule.
10335 (direct_abstract_declarator): Replace '(' parmlist ')' rule with
10336 '(' complex_parmlist ')' and regcast_or_absdcl.
10337 (parmlist): Split
10338 (complex_parmlist): Parmlists that are not also typenames.
10339 (parms_comma): Enabler.
10340 (named_parm): A parm that is not also a typename. Use declarator
10341 rather than dont_see_typename abs_or_notype_decl. Expand
10342 typed_declspecs inline.
10343 (abs_or_notype_decl): Lose.
10344 (dont_see_typename): Comment out.
10345 (bad_parm): Break out abs_or_notype_decl into two rules.
10346
10347Fri Mar 4 18:22:39 1994 Jason Merrill (jason@deneb.cygnus.com)
10348
10349 * decl2.c (reparse_decl_as_casts): New function to change parse
10350 nodes for `(int)(int)(int)' from "function taking int and returning
10351 function taking int and returning function taking int" to "... cast
10352 to int, cast to int, cast to int".
10353
10354 * decl2.c (reparse_decl_as_expr): Recursive function to change
10355 parse nodes for `A()()' from "function returning function returning
10356 A" to "A().operator()".
10357
10358 * parse.y (primary): Replace `typespec LEFT_RIGHT' rule with
10359 `typespec fcast_or_absdcl' rule.
10360 (fcast_or_absdcl): New nonterminal to implement late reduction of
10361 constructs like `A()()()()'.
10362 (typename): Replace `typespec absdcl1' rule with
10363 `typespec direct_abstract_declarator' rule.
10364 (direct_abstract_declarator): Replace `LEFT_RIGHT type_quals' rule
10365 with `fcast_or_absdcl type_quals' rule.
10366
6060a796 10367Fri Mar 4 16:18:03 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10368
10369 * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it
10370 matches Section 5.5.
10371
10372Fri Mar 4 14:01:59 1994 Jason Merrill (jason@deneb.cygnus.com)
10373
10374 * error.c (dump_type_prefix): Don't print basetype twice for
10375 pmfs.
10376
6060a796 10377Fri Mar 4 13:24:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10378
10379 * typeck.c (convert_arguments): Handle setHandler(A::handlerFn)
10380 so that it is like setHandler(&A::handlerFn). Cures an `invalid
10381 lvalue in unary `&''.
10382
10383Fri Mar 4 11:15:59 1994 Jason Merrill (jason@deneb.cygnus.com)
10384
10385 * gxxint.texi (Copying Objects): New section discussing default
10386 op= problems with virtual inheritance.
10387
10388 * decl2.c (grokoptypename): Just does grokdeclarator and
10389 build_typename_overload, since the parser can't call grokdeclarator
10390 directly.
10391
10392 * method.c (build_typename_overload): Set IDENTIFIER_GLOBAL_VALUE
10393 and TREE_TYPE on generated identifiers.
10394
10395 * decl.c (grokdeclarator): Don't deal with TYPE_EXPRs anymore.
10396
10397 * parse.y (parm): Convert `const char *' to `__opPCc' here.
10398
10399 * error.c (dump_decl): Say sorry rather than my_friendly_aborting
10400 if we can't figure out what to do.
10401 (dump_type*): Ditto.
10402
10403 * typeck2.c (build_m_component_ref): 'component' is an expr, not
10404 a decl. Also move the IS_AGGR_TYPE check after the stripping of
10405 REFERENCE_TYPE.
10406
6060a796 10407Fri Mar 4 04:46:05 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10408
10409 * call.c (build_method_call): Handle b->setHandler(A::handlerFn)
10410 so that it is like b->setHandler(&A::handlerFn). Cures an `invalid
10411 lvalue in unary `&''.
10412
10413Thu Mar 3 12:38:15 1994 Jason Merrill (jason@deneb.cygnus.com)
10414
10415 * parse.y: Add precedence specification for START_DECLARATOR.
10416 (type_quals): Move before primary.
10417 (typename): Move before typed_declspecs, add 'typespec absdcl1' rule.
10418
10419 * decl2.c (grokoptypename): Lose.
10420
10421 * decl.c (grokdeclarator): Parse TYPE_EXPRs in the initial scan,
10422 rather than waiting until later.
10423
10424Wed Mar 2 14:12:23 1994 Jason Merrill (jason@deneb.cygnus.com)
10425
10426 * parse.y (unary_expr): Use 'typename' in 'new' rules, rather
10427 than expanding it inline.
10428 (typename): Expand empty option of (former) absdcl inline.
10429 (abs_or_notype_decl): Ditto.
10430 (absdcl): Lose empty rule.
10431 (conversion_declarator): New nonterminal for 'typename' of 'operator
10432 typename'.
10433 (operator_name): Use it instead of absdcl.
10434
10435 * parse.y: Add precedence declarations for SCOPED_TYPENAME,
10436 TYPEOF, and SIGOF.
10437 (typed_declspecs): Accept typed_typespecs, rather than typespec
10438 directly. Add rules with reserved_typespecquals.
10439 (reserved_declspecs): Don't accept typespecqual_reserved at the
10440 beginning of the list. The typed_declspecs rule will deal with this
10441 omission.
10442 (declmods): Accept nonempty_type_quals, rather than TYPE_QUAL
10443 directly.
10444
10445 * parse.y (direct_notype_declarator,
10446 direct_after_type_declarator, direct_abstract_declarator): Split up
10447 the declarator1 nonterminals to match the draft standard and avoid
10448 ambiguities.
10449 (new_type_id, new_declarator, direct_new_declarator,
10450 new_member_declarator): New nonterminals to implement the subset of
10451 'typename' allowed in new expressions.
10452 (unary_expr): Use new_type_id instead of typename.
10453 (after_type_declarator1, absdcl1): Fix semantics of member pointers.
10454 (abs_member_declarator, after_type_member_declarator): Lose.
10455
10456 * parse.y (absdcl1): Don't require parens around
10457 abs_member_declarator.
10458 (abs_member_declarator): Lose see_typename from rules.
10459 (after_type_member_declarator): Ditto.
10460
10461 * tree.c (get_identifier_list): New function, containing code
10462 previously duplicated in get_decl_list and list_hash_lookup_or_cons.
10463 (get_decl_list): Use it.
10464 (list_hash_lookup_or_cons): Ditto.
10465
10466 * parse.y (typed_declspecs, declmods): It's not necessary to hash
10467 the declspecs on class_obstack, so don't. This way typed_typespecs
10468 can reduce to typed_declspecs.
10469
10470Wed Mar 2 14:29:18 1994 Jason Merrill (jason@cygnus.com)
10471
10472 * cvt.c (build_up_reference): If we aren't checking visibility,
10473 also allow base->derived conversions.
10474
10475Mon Feb 28 15:14:29 1994 Per Bothner (bothner@kalessin.cygnus.com)
10476
10477 * typeck.c (build_c_cast): Remove bogus hack when converting
10478 to a reference type.
10479
10480 * cp-tree.h (lang_decl::vbase_init_list, DECL_VBASE_INIT_LIST):
10481 Removed, not used.
10482 (lang_stype::methods, lang_decl::next_method): New fields.
10483 (CLASSTYPE_METHODS, DECL_NEXT_METHOD): New macros.
10484 * decl.c (duplicate_decls): Preserve DECL_NEXT_METHOD.
10485
10486 * cp-tree.h, decl2.c (flag_vtable_hack): New flag.
10487 * decl2.c (finish_vtable_vardecl): If flag_vtable_hack,
10488 and !CLASSTYPE_INTERFACE_KNOWN, try to use the presence of
10489 a non-inline virtual function to control emitting of vtables.
10490 * class.c (finish_struct): Build CLASSTYPE_METHODS list.
10491 * search.c (build_vbase_vtables_init): Don't assemble_external
10492 (yet) if flag_vtable_hack.
10493 * class.c (build_vfn_ref): Ditto.
10494
10495Mon Feb 28 14:54:13 1994 Jason Merrill (jason@deneb.cygnus.com)
10496
10497 * parse.y (component_decl): Don't include "typed_declspecs
10498 declarator ';'" speedup, since it breaks enums.
10499
10500Fri Feb 25 15:43:44 1994 Per Bothner (bothner@kalessin.cygnus.com)
10501
10502 * class.c (finish_struct): Minor optimization for building
10503 fn_fields list.
10504
10505Fri Feb 25 15:23:42 1994 Jason Merrill (jason@deneb.cygnus.com)
10506
10507 * decl.c (start_function): Fix detection of function overloading.
10508
6060a796 10509Thu Feb 24 22:26:19 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10510
10511 * lex.c (check_newline): #pragma interface can take a string
10512 argument, just like #pragma implementation. #pragma implementation
10513 checks for garbage on the line, line #pragma interface does. Main
10514 input files do not auto implement like named files, #pragma
10515 implementation must be used explicitly.
10516
10517Thu Feb 24 17:09:01 1994 Jason Merrill (jason@deneb.cygnus.com)
10518
10519 * parse.y (components): Handle list of one again.
10520 (notype_components): Ditto.
10521 (after_type_declarator1): Take maybe_raises out again.
10522
10523 * gxxint.texi (Parser): Document additional r/r conflict.
10524
10525Wed Feb 23 14:42:55 1994 Jason Merrill (jason@deneb.cygnus.com)
10526
10527 * gxxint.texi (Parser): Add node.
10528
10529 * Makefile.in (stamp-parse): Update expected conflict count.
10530
10531 * parse.y (various): Replace "declmods declarator" with "declmods
10532 notype_declarator". The comment saying that "declmods declarator ';'"
10533 corresponds to "int i;" was wrong; it corresponds to "const i;".
10534 (component_decl): Add "typed_declspecs declarator ';'" rule; this
10535 *does* correspond to "int i;". Change "declmods components" to
10536 "declmods notype_components".
10537 (components): Don't deal with a list of one anymore.
10538 (notype_components): New nonterminal, corresponds to notype_declarator.
10539 ({after_,no}type_component_decl{,0}): More new nonterminals.
10540 ({after_,no}type_declarator): Fold in START_DECLARATOR token.
10541 Eliminates four reduce/reduce conflicts.
10542
10543 (expr): Depend on nontrivial_exprlist instead of nonnull_exprlist.
10544 (nontrivial_exprlist): New nonterminal: A list of at least two
10545 expr_no_commas's.
10546 (nonnull_exprlist): Depend on nontrival_exprlist.
10547 Eliminates four reduce/reduce conflicts.
10548
10549 (named_class_head): Move intermediate code block into separate
10550 nonterminal so that we can stick %prec EMPTY on it.
10551
10552 Add more %prec EMPTY's to eliminate remaining shift/reduce
10553 conflicts.
10554
10555 (after_type_declarator): Add maybe_raises to fndecl rules.
10556 (after_type_declarator_no_typename): Remove.
10557 For correctness.
10558
10559 Document remaining reduce/reduce conflicts.
10560
10561Tue Feb 22 12:10:32 1994 Jason Merrill (jason@deneb.cygnus.com)
10562
10563 * search.c (get_base_distance): Only bash BINFO_INHERITANCE_CHAIN
10564 (TYPE_BINFO (type)) if we care about the path.
10565
10566 * tree.c (lvalue_p): A COND_EXPR is an lvalue if both of the
10567 options are.
10568
6060a796 10569Mon Feb 21 19:59:40 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10570
10571 * Makefile.in (mostlyclean): lex.c is a source file, don't
10572 remove.
10573
10574Sat Feb 19 01:27:14 1994 Jason Merrill (jason@deneb.cygnus.com)
10575
10576 * parse.y: Eliminate 20 shift/reduce conflicts.
10577
10578Fri Feb 18 11:49:42 1994 Jason Merrill (jason@deneb.cygnus.com)
10579
10580 * pt.c (type_unification): Add subr argument; if set, it means
10581 that we are calling ourselves recursively, so a partial match is OK.
10582 (unify): Support pointers to methods and functions.
10583 (tsubst): Support method pointers.
10584 * decl.c (build_ptrmemfunc_type): No longer static, so that
10585 tsubst can get at it.
10586
10587 * init.c (is_aggr_typedef): Pretend template type parms are
10588 aggregates.
10589 * decl2.c (build_push_scope): If cname refers to a template type
10590 parm, just grin and nod.
10591
10592 * call.c (build_overload_call_real): Pass subr argument to
10593 type_unification.
10594 * pt.c (do_function_instantiation): Ditto.
10595 * class.c (instantiate_type): Ditto.
10596
10597 * search.c (get_base_distance): If BINFO is a binfo, use it and
10598 don't mess with its BINFO_INHERITANCE_CHAIN.
10599
10600 * cvt.c (convert_to_reference): Fix temporary generation.
10601 If ambiguous, return error_mark_node.
10602
10603 * init.c (build_new): Put back some necessary code.
10604
10605Thu Feb 17 15:39:47 1994 Jason Merrill (jason@deneb.cygnus.com)
10606
10607 * init.c (build_new): Deal with array types properly.
10608
10609 * search.c (get_binfo): Become a shell for get_base_distance.
10610 (get_binfo_recursive): Lose.
10611 (get_base_distance_recursive): Find the path to the via_virtual base
10612 that provides the most access.
10613 (get_base_distance): Ditto.
10614
10615 * parse.y (explicit_instantiation): Syntax is 'template class
10616 A<int>', not 'template A<int>'.
10617
10618 * typeck.c (convert_for_initialization): Remove bogus warning.
10619
10620 * parse.y (datadef): Revert patch of Oct 27.
10621
10622Thu Feb 17 15:12:29 1994 Per Bothner (bothner@kalessin.cygnus.com)
10623
10624 * class.c (build_vfn_ref): Cast delta field to ptrdiff_type_node,
10625 rather than integer_type_node. Does wonders for the Alpha.
10626
10627Thu Feb 17 13:36:21 1994 Jason Merrill (jason@deneb.cygnus.com)
10628
10629 * decl.c (build_ptrmemfunc_type): Make sure that the pmf type
10630 goes onto the same obstack as its target type.
10631
10632Wed Feb 16 00:34:46 1994 Jason Merrill (jason@deneb.cygnus.com)
10633
10634 * cvt.c (convert_to_reference): If converting via constructor
10635 on local level, go back to build_cplus_new approach.
10636
10637 * tree.c (build_cplus_new): If with_cleanup_p, set cleanup slot
10638 to error_mark_node to prevent expand_expr from building a cleanup
10639 for this variable.
10640
10641 * lex.c (default_assign_ref_body): Return *this from the memcpy
10642 version, too.
10643
10644 * decl.c (grok_reference_init): Just return if called with
10645 error_mark_node, don't worry about initializing non-const reference
10646 with temporary.
10647
10648 * cvt.c (convert_to_reference): Do the right thing for
10649 non-aggregate reference conversions, pedwarn when generating a
10650 non-const reference to a temporary.
10651
10652 * class.c (finish_struct): TYPE_HAS_COMPLEX_{INIT,ASSIGN}_REF and
10653 TYPE_NEEDS_CONSTRUCTING all depend on TYPE_USES_VIRTUAL_BASECLASSES
10654 again.
10655
10656Tue Feb 15 19:47:19 1994 Jason Merrill (jason@deneb.cygnus.com)
10657
10658 * decl.c (grok_reference_init): Pawn off a lot of the work on
10659 convert_to_reference. Generally do the right thing.
10660
10661 * cvt.c (convert_to_reference): Conform to the initial comment;
10662 i.e. don't create temps if decl != error_mark_node. Handle
10663 cleanups better for temps that do get created. Don't pretend
10664 that we can use an 'A' to initialize a 'const double &' just by
10665 tacking on a NOP_EXPR. Support LOOKUP_SPECULATIVELY.
10666
10667 * call.c (build_method_call): Set TREE_HAS_CONSTRUCTOR on
10668 constructor calls.
10669
10670Mon Feb 14 14:50:17 1994 Jason Merrill (jason@deneb.cygnus.com)
10671
10672 * decl.c (grok_reference_init): Make a temporary for initializing
10673 const reference from constant expression.
10674
10675Mon Feb 14 11:31:31 1994 Per Bothner (bothner@kalessin.cygnus.com)
10676
10677 * cp-tree.h, decl.c (set_identifier_local_value): Deleted function.
10678 * decl.c (pushdecl): Define decl in correct binding_level
10679 (which isn't always the inner_binding_level).
10680
10681 * cvt.c (build_up_reference): Don't ever call expand_aggr_init.
10682 It's ugly, and I don't think it's the right thing to do.
10683
10684 * cp-tree.h, class.c, decl.c, decl2.c, sp/search.c:
10685 Remove NEW_CLASS_SCOPING, assuming it is always 1.
10686 * decl.c (pop_decl_level): Removed; manually inlined.
10687
10688Sun Feb 13 19:04:56 1994 Jason Merrill (jason@deneb.cygnus.com)
10689
10690 * class.h (candidate): Add basetypes field.
10691
10692 * call.c (build_method_call): Do access checking after choosing a
10693 function, not before.
10694
10695 * Makefile.in (cvt.o, call.o, method.o): Depend on class.h.
10696 (mostlyclean): Remove ../cc1plus.
10697
10698Fri Feb 11 11:52:26 1994 Jason Merrill (jason@deneb.cygnus.com)
10699
10700 * class.c (finish_struct): Don't allow adjusting access to a field
10701 of a base class if a local field has the same name.
10702
10703 * error.c (dump_type_prefix): Output basetype for METHOD_TYPEs.
10704
10705hu Jan 13 17:55:51 EST 1994 Gnanasekaran Swaminathan (gs4t@virginia.edu)
10706
63718c49 10707 * cp-tree.h (DESTRUCTOR_NAME_P): do not confuse AUTO_TEMP names
7177d104
MS
10708 with destructor names when either NO_DOLLAR_IN_LABEL or
10709 NO_DOT_IN_LABEL are not defined.
10710
10711 Now `template <class T, T f(T&), const T*> class A {...}' works.
10712
10713 * pt.c (grok_template_type): substitute template parm types
10714 with actual types in complex type as well.
10715 (coerce_template_parms): update the grok_template_type ()
10716 function call.
10717
10718 * pt.c (tsubst): Traverse method list using DECL_CHAIN.
10719
10720 * decl.c (grok_op_properties): Allow operator++/-- to have
10721 default arguments.
10722
10723 * typeck2.c (store_init_value): Don't abort when called to
10724 initialize a type that needs constructing with a CONSTRUCTOR.
10725
10726 * init.c (expand_aggr_init_1, CONSTRUCTOR case): If
10727 store_init_value fails, build and expand an INIT_EXPR. If
10728 store_init_value succeeds, call expand_decl_init.
10729
6060a796 10730Fri Feb 11 02:49:23 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10731
10732 * class.c (build_vbase_path): Use complete_type_p instead of
10733 resolves_to_fixed_type_p to determine if the virtual bases are in
10734 their right place for the type of expr. Cures problem of thinking a
10735 virtual base class is one place, when it is in fact someplace else.
10736
6060a796 10737Fri Feb 11 00:26:46 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10738
10739 * init.c (resolve_offset_ref): Make sure we first convert to
10740 intermediate type, if given, when dealing with members off `this'.
10741 Solves an incorrrect `type `foo' is not a base type for type
10742 `multiple'' when it is infact, a base type.
10743
6060a796 10744Thu Feb 10 21:49:35 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10745
10746 * class.c (modify_other_vtable_entries): Use get_binfo, instead
10747 of binfo_value. Solves problem with compiler giving a `base class
10748 `B' ambiguous in binfo_value (compiler error)' on complex MI
10749 herarchies, when a virtual function is first defied in a virtual
10750 base class.
10751
6060a796 10752Thu Feb 10 17:19:32 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10753
10754 * class.c (build_vbase_path): Don't complain about ambiguous
10755 intermediate conversion when converting down to a virtual base
10756 class, even if they might seem to be ambiguous.
10757
10758Thu Feb 10 12:18:26 1994 Jason Merrill (jason@deneb.cygnus.com)
10759
10760 * typeck2.c (build_functional_cast): #if 0 out constructor
10761 inheritance code, improve error messages.
10762
10763 * class.c (finish_base_struct): Complain about base with only
10764 non-default constructors in derived class with no constructors.
10765
10766 * decl.c (grokdeclarator): Fix detection of virtual new/delete.
10767
6060a796 10768Wed Feb 9 22:02:32 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10769
10770 * search.c (build_mi_virtuals, add_mi_virtuals,
10771 report_ambiguous_mi_virtuals): Removed unneeded code.
10772 * class.c (finish_struct_bits): Ditto.
10773
10774Wed Feb 9 11:27:17 1994 Jason Merrill (jason@deneb.cygnus.com)
10775
10776 * pt.c (end_template_instantiation): Push decl before
10777 pop_from_top_level.
10778
10779 * typeck2.c (build_m_component_ref): Make sure datum is of
10780 aggregate type.
10781
10782 * init.c (get_type_value): New function, returns
10783 IDENTIFIER_TYPE_VALUE or IDENTIFIER_CLASS_TYPE_VALUE or NULL_TREE.
10784
10785 * call.c (build_method_call): Don't die on call to destructor for
10786 non-type.
10787
10788 * decl.c (grokdeclarator): Complain about virtual op new and op
10789 delete, make static virtuals unvirtual instead of unstatic.
10790
10791 * typeck.c (build_c_cast): Also call default_conversion on
10792 methods.
10793
10794 * decl.c (grokdeclarator): Don't complain about anonymous
10795 bitfields.
10796
10797 * parse.y (simple_stmt, for loops): Move the continue point after
10798 the cleanups.
10799
10800 * class.c (finish_struct): Fix setting of
10801 TYPE_HAS_COMPLEX_INIT_REF.
10802
10803Tue Feb 8 13:21:40 1994 Jason Merrill (jason@deneb.cygnus.com)
10804
10805 * init.c (build_new): Deal with `new double (1)'.
10806
10807 * class.c (finish_struct): TYPE_HAS_COMPLEX_*_REF are supersets of
10808 TYPE_HAS_REAL_*_REF, but TYPE_HAS_COMPLEX_INIT_REF is independent of
10809 TYPE_NEEDS_CONSTRUCTING.
10810
10811 * decl.c (duplicate_decls): Propagate access decls.
10812
10813 * typeck2.c (process_init_constructor): Accept empty_init_node
10814 for initializing unions.
10815
10816 * class.c, lex.c, cp-tree.h: Use
10817 TYPE_HAS_COMPLEX_ASSIGN_REF where TYPE_HAS_REAL_ASSIGN_REF was used
10818 before, use TYPE_HAS_COMPLEX_INIT_REF for TYPE_NEEDS_CONSTRUCTING in
10819 some places.
10820
10821 * decl.c (finish_decl): Don't complain about uninitialized const
10822 if it was initialized before.
10823
10824Mon Feb 7 18:12:34 1994 Jason Merrill (jason@deneb.cygnus.com)
10825
10826 * lex.c (default_assign_ref_body): Don't deal with vbases for
10827 now.
10828
10829 * decl.c (finish_decl): Fix reversed logic for objects and other
10830 things that need to be constructed but have no initializer.
10831
10832 * class.c (finish_struct): Don't set TYPE_HAS_* flags that are
10833 set by grok_op_properties or finish_decl.
10834
10835 * decl.c: Don't warn about extern redeclared inline unless
10836 -Wextern-inline is given.
10837 * decl2.c (lang_decode_option): Ditto.
10838 * cp-tree.h: Ditto.
10839
10840Mon Feb 7 17:29:24 1994 Per Bothner (bothner@kalessin.cygnus.com)
10841
10842 * decl.c (pushdecl_with_scope): Fix thinko. Add forward
10843 declaration.
10844
10845 * decl.c (pushdecl_with_scope): New function.
10846 * decl.c (pushdecl_top_level): Use new function.
10847 * decl.c (pushtag): Initialize newdecl.
10848 * decl.c (pushtag): Push new type decl into correct scope.
10849
10850Mon Feb 7 14:42:03 1994 Jason Merrill (jason@deneb.cygnus.com)
10851
10852 * call.c, cvt.c, init.c, search.c, cp-tree.h:
10853 Eradicate LOOKUP_PROTECTED_OK.
10854
10855Mon Feb 7 13:57:19 1994 Per Bothner (bothner@kalessin.cygnus.com)
10856
10857 * decl.c (pushtag, xref_tag), cp-tree.h: Add extra parameter
10858 'globalize' to signify implicit declarations.
10859 * decl.c (globalize_nested_type, maybe_globalize_type): Removed.
10860 * decl.c (set_identifier_type_value_with_scope): New function.
10861 * decl.c (set_identifier_local_value): Simplify.
10862 * spew.c (yylex, do_addr): Modify to return a _DEFN if a
10863 forward declaration (followed by ';' and not preceded by 'friend').
10864 * class.c, decl.c, except.c, init.c, parse.y,
10865 pt.c, search.c: Add new argument to calls to xref_tag and
10866 pushtag.
10867
10868Mon Feb 7 00:22:59 1994 Jason Merrill (jason@deneb.cygnus.com)
10869
10870 * cp-tree.h (ACCESSIBLY_UNIQUELY_DERIVED_P): New macro, means what
10871 ACCESSIBLY_DERIVED_FROM_P meant before.
10872 (ACCESSIBLY_DERIVED_FROM_P): Now disregards ambiguity.
10873
10874 * cvt.c (build_up_reference): Call get_binfo with PROTECT == 1.
10875
10876 * search.c (get_base_distance_recursive): Members and friends of
10877 a class X can implicitly convert an X* to a pointer to a private or
10878 protected immediate base class of X.
10879 (get_binfo_recursive): Ditto.
10880 (get_base_distance): Ignore ambiguity if PROTECT < 0.
10881 (get_binfo): Lose multiple values of PROTECT.
10882 (compute_access): Protected is OK if the start of the
10883 search is an accessible base class of current_class_type.
10884
10885 * method.c (build_opfncall): Do check access on operator new here.
10886
10887 * decl.c (finish_function): Don't check access on operator new
10888 here.
10889
10890Sun Feb 6 14:06:58 1994 Jason Merrill (jason@deneb.cygnus.com)
10891
10892 * decl.c (xref_tag): The base of a derived struct is NOT always
10893 public. Duh.
10894
10895 * pt.c (do_explicit_instantiation): New function, called from
10896 parser to do explicit function instantiation.
10897 (type_unification): Allow the args list to be terminated with
10898 void_list_node.
10899 (do_pending_expansions): Look at i->interface for non-member
10900 templates.
10901
10902 * parse.y (datadef): Move explicit_instantiation here.
10903 (structsp): From here.
10904 (datadef): Complain about `int;'.
10905
10906Sun Feb 6 12:33:18 1994 Per Bothner (bothner@kalessin.cygnus.com)
10907
10908 * pt.c (end_template_instantiation), cp-tree.h: Remove unused
10909 second parameter, and simplify first from a TREE_LIST where
10910 we only care about its TREE_VALUE to just the value (an IDENTIFIER).
10911 * pt.c (instantiate_member_templates): Simplify argument list
10912 from a TREE_LIST to just an IDENTIFIER.
10913 * lex.c (yyprint): PRE_PARSED_CLASS_DECL is now just an IDENTIFIER.
10914 * parse.y (template_instantiate_once): Simplify accordingly.
10915 * decl.c (inner_binding_level): New. Use various places to
10916 simplify.
10917
10918Sun Feb 6 02:49:37 1994 Jason Merrill (jason@deneb.cygnus.com)
10919
10920 * typeck2.c (build_functional_cast): int() -> int(0).
10921
10922Sat Feb 5 00:53:21 1994 Jason Merrill (jason@deneb.cygnus.com)
10923
10924 * class.c (finish_struct): Don't do a bitwise copy for op= if the
10925 class has a virtual function table.
10926
10927 * typeck.c (convert_for_initialization): Restore warnings about
10928 not using defined op=. Should really be my_friendly_aborts, I
10929 s'pose.
10930
10931Fri Feb 4 14:21:00 1994 Jason Merrill (jason@deneb.cygnus.com)
10932
10933 * class.c (finish_struct): Tidy up conditions for doing bitwise
10934 copies of objects.
10935
10936 * decl.c (build_default_constructor): #if 0 out.
10937
10938 * *: Eradicate TYPE_GETS_{ASSIGNMENT,ASSIGN_REF,CONST_ASSIGN_REF,
10939 CONST_INIT_REF}, TYPE_HAS_REAL_CONSTRUCTOR.
10940
10941 * decl.c (grokdeclarator): Don't return void_type_node for
10942 friends being defined here.
10943
10944 * init.c (perform_member_init): Only do the init if it's useful.
10945
10946 * lex.c (default_copy_constructor_body): If we don't need to do
10947 memberwise init, just call __builtin_memcpy.
10948 (default_assign_ref_body): Ditto.
10949
10950 * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0.
10951
6060a796 10952Fri Feb 4 13:02:56 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
10953
10954 * lex.c (reinit_parse_for_method, cons_up_default_function):
10955 Don't give warn_if_unknown_interface warning when it came from a
10956 system header file.
10957 * pt.c (end_template_decl, instantiate_template): Ditto.
10958 * decl.c (start_decl): Ditto.
10959
10960Fri Feb 4 00:41:21 1994 Jason Merrill (jason@deneb.cygnus.com)
10961
10962 * decl.c (grokdeclarator): Don't try to set TYPE_WAS_ANONYMOUS on
10963 enums.
10964
10965 * decl2.c (constructor_name_full): Use IS_AGGR_TYPE_CODE instead of
10966 IS_AGGR_TYPE, since we don't know it's a type.
10967
10968Thu Feb 3 11:36:46 1994 Jason Merrill (jason@deneb.cygnus.com)
10969
10970 * decl.c (grokdeclarator): Don't complain about anonymous unions.
10971
10972 * cp-tree.h (TYPE_WAS_ANONYMOUS): This struct was originally
10973 anonymous, but had a name given to it by a typedef.
10974
10975 * decl.c (grokdeclarator): When renaming an anonymous struct, set
10976 TYPE_WAS_ANONYMOUS.
10977
10978 * decl2.c (constructor_name_full): Use TYPE_WAS_ANONYMOUS.
10979
10980 * cp-tree.h (DECL_UNDEFINED_FRIENDS): #if 0 out.
10981
10982 * init.c (xref_friend): Don't set up DECL_UNDEFINED_FRIENDS.
10983 (embrace_waiting_friends): Don't use DECL_UNDEFINED_FRIENDS.
10984
10985 * decl.c (grokdeclarator): Set TYPE_NESTED_NAME properly on nested
10986 anonymous structs that get typedef'd.
10987
10988 * decl.c (grokdeclarator): Always return void_type_node for
10989 friends.
10990
10991 * error.c (dump_function_decl): Don't use DECL_CLASS_CONTEXT for
10992 friends.
10993 (dump_function_decl): Don't print out default args for
10994 a function used in an expression.
10995
10996 * decl.c (grokdeclarator): Give error on abstract declarator used
10997 in an invalid context (i.e. `void (*)();').
10998
10999 * error.c (cp_line_of): Support _TYPE nodes.
11000 (cp_file_of): Ditto.
11001
11002 * cvt.c (build_up_reference): Don't abort if passed a SAVE_EXPR;
11003 it can happen for the RHS of an assignment stmt where the LHS is
11004 a COND_EXPR.
11005
11006 * init.c (expand_aggr_init_1): Deal with bracketed initializer
11007 lists properly.
11008
11009 * class.c (finish_struct): Deal with enumerators and typedefs
11010 again.
11011
11012Wed Feb 2 11:30:22 1994 Jason Merrill (jason@deneb.cygnus.com)
11013
11014 * class.c (finish_struct): Tidy up loop over fields.
11015
11016 * errfn.c (cp_thing): Don't advance twice after a format.
11017
11018 * class.c (finish_struct): Complain about needing a constructor
11019 if a member has only non-default constructors, and don't try to
11020 generate a default constructor.
11021
11022 * decl.c (finish_decl): Also do the constructor thing if
11023 TYPE_NEEDS_CONSTRUCTING is set (for arrays).
11024
11025 * search.c (unuse_fields): New function: mark all fields in this
11026 type unused.
11027 (dfs_unuse_fields): Helper function.
11028
11029 * class.c (pushclass): If the new class is the same as the old
11030 class, still unuse the fields.
11031 (unuse_fields): Move to search.c.
11032
11033 * decl.c (grok_op_properties): Add friendp argument.
11034 (grokfndecl): Pass it.
11035 (start_method): Ditto.
11036
11037 * decl2.c (delete_sanity): Add use_global_delete parameter to catch
11038 ::delete calls.
11039
11040 * parse.y (unary_expr): Pass new parameter to delete_sanity.
11041
11042 * lex.c (default_copy_constructor_body): Don't choke if the union
11043 has no fields.
11044 (default_assign_ref_body): Ditto.
11045
11046 * call.c (compute_conversion_costs_ansi): Do the right thing for
11047 ellipsis matches.
11048
11049 * decl.c (push_to_top_level): Optimize.
11050
11051 * decl.c (start_function): Look for the lexical scope of a friend
11052 in DECL_CLASS_CONTEXT.
11053
11054 * init.c (do_friend): Set DECL_CLASS_CONTEXT on global friends.
11055
11056Tue Feb 1 15:59:24 1994 Jason Merrill (jason@deneb.cygnus.com)
11057
11058 * cp-tree.h (TREE_GETS_PLACED_NEW): New macro.
11059
11060 * init.c (init_init_processing): Don't assign BIN/BID to the
11061 IDENTIFIER_GLOBAL_VALUEs of their respective operators.
11062 (build_new): Check TREE_GETS_PLACED_NEW.
11063
11064 * decl.c (grok_op_properties): Don't set TREE_GETS_NEW for a decl of
11065 op new with placement, set TREE_GETS_PLACED_NEW.
11066
11067 * cp-tree.h (ANON_UNION_P): New macro. Applies to decls.
11068
11069 * class.c (finish_struct): Don't treat anonymous unions like
11070 other aggregate members. Do synthesize methods for unions without
11071 a name, since they may or may not be "anonymous unions".
11072
11073 * decl2.c (grok_x_components): Wipe out memory of synthesized methods
11074 in anonymous unions.
11075
11076 * lex.c (default_copy_constructor_body): Support unions.
11077 (default_assign_ref_body): Ditto.
11078
11079Mon Jan 31 12:07:30 1994 Jason Merrill (jason@deneb.cygnus.com)
11080
11081 * cp-tree.h: Fix documentation of LOOKUP_GLOBAL, add prototypes.
11082
11083 * error.c (args_as_string): New function (%A), like type_as_string
11084 except NULL_TREE -> "..."
11085
11086 * call.c (build_overload_call_real): Fix for new overloading.
11087
11088 * decl.c (grok_op_properties): Set all of the TYPE_OVERLOADS_* flags
11089 here.
11090
11091 * parse.y (operator_name): Instead of here.
11092
11093 * typeck2.c (build_functional_cast): Treat a TREE_LIST as a list
11094 of functions.
11095
11096 * call.c (build_overload_call_real): Support LOOKUP_SPECULATIVELY.
11097
11098 * method.c (build_opfncall): Don't need to massage return value
11099 any more, call build_overload_call with all flags.
11100
11101 * typeck.c (build_x_binary_op): Put back speculative call to
11102 build_opfncall.
11103 (build_x_unary_op): Ditto.
11104 (build_x_conditional_expr): Ditto.
11105
6060a796 11106Mon Jan 31 10:00:30 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11107
11108 * cvt.c (build_type_conversion_1): Change call to pedwarn into
11109 warning, and conditionalize upon warn_cast_qual.
11110
11111Fri Jan 28 11:48:15 1994 Jason Merrill (jason@deneb.cygnus.com)
11112
11113 * search.c (lookup_field): If xbasetype is a binfo, copy it to
11114 avoid clobbering its inheritance info.
11115
11116 * call.c (build_method_call): Don't overwrite basetype_path with
11117 TYPE_BINFO (inst_ptr_basetype) if they have the same type.
11118
11119 * search.c (compute_access): Fix handling of protected inheritance
11120 and friendship with the enclosing class.
11121
11122 * typeck2.c (store_init_value): Allow passing of TREE_CHAIN for
11123 initialization of arbitrary variable.
11124
11125 * typeck2.c (build_functional_cast): Only try calling a method if
11126 one exists.
11127
11128 * decl.c (grokdeclarator): Move handling of constructor syntax
11129 initialization into first loop for generality.
11130 (parmlist_is_random): Lose.
11131
11132 * lex.c (cons_up_default_function): Set TREE_PARMLIST on arguments
11133 to default function.
11134
11135Thu Jan 27 19:26:51 1994 Jason Merrill (jason@deneb.cygnus.com)
11136
11137 * decl.c (grokparms): Abort if we get called with something we don't
11138 expect.
11139
6060a796 11140Thu Jan 27 17:37:25 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11141
11142 * call.c (build_overload_call_real): Change argument complain to
11143 flags to match style of rest of code. Pass it down to
11144 build_function_call_real as necessary.
11145 * call.c (build_overload_call, build_overload_call_maybe): Change
11146 argument complain to flags to match style of rest of code.
11147 * cp-tree.h (build_function_call_real): Added fourth flags
11148 argument.
11149 * cvt.c (convert_to_reference): Only give warning messages, if
11150 LOOKUP_COMPLAIN is set.
11151 * typeck.c (build_x_function_call): Change simple complain
11152 argument to build_overload_call_maybe and build_overload_call, to
11153 LOOKUP_COMPLAIN to match style of rest of code.
11154 * typeck2.c (build_functional_cast): Ditto.
11155 * typeck.c (build_function_call_real): Add flags, so that we can
11156 not complain, if we don't want to complain. Complain about
11157 arguments, if we are complaining, otherwise don't.
11158 * typeck.c (build_function_call, build_function_call_maybe):
11159 Stick in flags argument.
11160 * typeck.c (build_x_binary_op, build_x_unary_op,
11161 build_x_conditional_expr, build_x_compound_expr): Follow style of
11162 build_x_indirect_ref, as it is more correct and more common.
11163
11164Thu Jan 27 14:36:20 1994 Jason Merrill (jason@deneb.cygnus.com)
11165
11166 * call.c (build_method_call): Don't check for being called with
11167 a pointer.
11168
11169 * decl2.c (finish_file): Don't play with DECL_CLASS_CONTEXT for the
11170 static initializer function.
11171
11172 * init.c (build_member_call): Use convert_force here, too.
11173
11174 * search.c (compute_access): Only treat static members specially
11175 if they are referenced directly.
11176
11177Wed Jan 26 18:28:14 1994 Jason Merrill (jason@deneb.cygnus.com)
11178
11179 * gxxint.texi (Access Control): New node.
11180
11181 * search.c (current_scope): New function; returns whichever of
11182 current_class_type and current_function_decl is the most nested.
11183 (compute_access): Total overhaul to make it clearer and more
11184 correct. Don't use the cache for now; in the only situation where
11185 it was used before, it gained nothing. This frees up three of the
11186 DECL_LANG_FLAGs for possible other use!
11187
11188 * cp-tree.h: #if 0 out DECL_PUBLIC & friends.
11189
11190 * typeck.c (build_component_ref_1): Don't check DECL_PUBLIC.
11191
11192 * call.c (build_method_call): Use convert_force to cast `this' --
11193 rely on the access checking for the method itself.
11194
11195 * init.c (is_friend): Do the nesting thing, handle types. I am
11196 my own friend.
11197 (is_friend_type): Become a shell for is_friend.
11198 (add_friend): Never stick in ctype.
11199 Why are the friendship functions in init.c, anyway?
11200
6060a796 11201Wed Jan 26 17:50:00 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11202
11203 * cvt.c (build_type_conversion_1): Don't conditionalize call to
11204 pedwarn upon pedantic.
11205
6060a796 11206Wed Jan 26 17:20:46 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11207
11208 * cvt.c (convert_to_reference): Add 8.4.3 checking so that one
11209 gets a warning if one tries to initialize a non-const & from a
11210 non-lvalue.
11211 * cvt.c (convert_to_reference): Use %P format for argument
11212 numbers in warnings.
11213
6060a796 11214Wed Jan 26 14:35:06 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11215
11216 * init.c (build_delete): Follow style in call.c to construct the
11217 virtual call to the desctructor, as that code is right. Fixes a
11218 problem of the compiler saying a pointer conversion is ambiguous.
11219
11220Wed Jan 26 11:28:14 1994 Jason Merrill (jason@deneb.cygnus.com)
11221
11222 * cp-tree.h (VTABLE_NAME_P): Change other occurrence of
11223 VTABLE_NAME_FORMAT to VTABLE_NAME.
11224
11225 * *: s/visibility/access/g
11226
11227Tue Jan 25 18:39:12 1994 Jason Merrill (jason@deneb.cygnus.com)
11228
11229 * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR.
11230
6060a796 11231Tue Jan 25 13:54:29 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11232
11233 * init.c (build_delete): Back out Jan 17th & 18th pacthes, as
11234 they break libg++.
11235
11236Tue Jan 25 13:11:45 1994 Jason Merrill (jason@deneb.cygnus.com)
11237
11238 * decl.c (duplicate_decls): Fix pointer arithmetic.
11239
11240Mon Jan 24 15:50:06 1994 Chip Salzenberg (chip@fin.uucp)
11241
11242 [ cp-* changes propagated from c-* changes in 940114 snapshot ]
11243 * cp-parse.y (maybe_attribute): Allow multiple __attribute__
11244 clauses on a declaration.
11245
11246Mon Jan 24 17:06:23 1994 Jason Merrill (jason@deneb.cygnus.com)
11247
11248 * class.c (finish_struct): Do synthesize methods for anon
11249 structs, just not unions.
11250
11251Mon Jan 24 13:50:13 1994 Kung Hsu (kung@mexican.cygnus.com)
11252
11253 * decl.c (xref_tag): handle anonymous nested type.
11254 * decl.c (globalize_nested_type): add no globalize bit check.
11255 * spew.c (hack_more_ids) : templated nested decl not push top
11256 level.
11257
11258 * parse.y : get rid of 'goto do_components'. It is much better
11259 for debugging.
11260
11261 * decl.c (is_anon_name): get rid of the function and use the
11262 macro ANON_AGGRNAME_P.
11263 * pt.c : ditto.
11264
11265Fri Jan 21 14:06:02 1994 Jason Merrill (jason@deneb.cygnus.com)
11266
11267 * class.c (finish_struct): Don't synthesize any methods for
11268 anonymous structs/unions.
11269
11270 * typeck.c (build_modify_expr): Don't treat pmf's as class objects.
11271
11272Thu Jan 20 18:56:46 1994 Jason Merrill (jason@deneb.cygnus.com)
11273
11274 * method.c (build_opfncall): Call build_indirect_ref on
11275 synthesized instance for operator delete.
11276
11277 * pt.c (type_unification): Don't abort if called with a list of
11278 types in ARGS.
11279
11280 * class.c (instantiate_type): Deal with function templates.
11281
11282Thu Jan 20 16:55:35 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
11283
11284 * Makefile.in (CC): Default to cc not gcc.
11285
11286Thu Jan 20 13:47:54 1994 Jason Merrill (jason@deneb.cygnus.com)
11287
11288 * typeck.c (build_modify_expr): Call constructor if appropriate.
11289
11290 * decl.c (push_to_top_level): Clear out class-level bindings cache.
11291
11292Wed Jan 19 13:51:22 1994 Jason Merrill (jason@deneb.cygnus.com)
11293
11294 * call.c (resolve_scope_to_name): Work recursively (previously only
11295 looked down one level).
11296
11297 * lex.c (do_pending_inlines): If we're still dealing with the last
11298 batch of inlines, don't start working on a new one.
11299
11300 * Makefile.in (stamp-parse): Update conflict count.
11301 (TAGS): Fix.
11302
11303 * parse.y (explicit_instantiation): New rule; implements
11304 'template A<int>' syntax (though not 'template foo(int)' yet).
11305 (structsp): Add explicit_instantiation.
11306
11307Tue Jan 18 13:53:05 1994 Jason Merrill (jason@deneb.cygnus.com)
11308
11309 * class.c (finish_struct, etc.): Simplify decision to synthesize
11310 a destructor.
11311
11312 * call.c, class.c, cp-tree.h, decl.c, init.c,
11313 ptree.c, search.c, typeck.c, typeck2.c: Nuke
11314 TYPE_NEEDS_CONSTRUCTOR (change all calls to TYPE_NEEDS_CONSTRUCTING).
11315 * init.c (expand_aggr_init_1): Don't try non-constructor methods
11316 of initializing objects.
11317 (build_new): Don't try other methods if the constructor lookup fails.
11318
11319 * class.c (finish_base_struct): Set cant_have_default_ctor and
11320 cant_synth_copy_ctor properly.
11321 (finish_struct): Ditto.
11322
11323Mon Jan 17 13:58:18 1994 Jason Merrill (jason@deneb.cygnus.com)
11324
11325 * typeck.c (build_modify_expr_1): #if 0 out again.
11326 (build_modify_expr): #if 0 out memberwise init code again.
11327
11328 * lex.c (default_copy_constructor_body): Be const-correct.
11329 (default_assign_ref_body): Ditto.
11330
11331 * init.c (perform_member_init): Use TYPE_HAS_CONSTRUCTOR to decide
11332 whether or not to use it, rather than TYPE_NEEDS_CONSTRUCTING.
11333 (expand_aggr_init): Disable silent conversion from initializer list
11334 to list of args for a constructor.
11335
11336 * class.c (base_info): Lose needs_default_ctor.
11337 (finish_base_struct): Ditto.
11338 (finish_struct): Ditto.
11339
11340 * decl.c (init_decl_processing): Don't turn off flag_default_inline
11341 just because flag_no_inline is on.
11342 (finish_decl): Use TYPE_HAS_CONSTRUCTOR to decide to use
11343 constructor.
11344
11345 * class.c (finish_struct): Synthesize default ctor whenever
11346 allowed.
11347
11348 * Makefile.in (TAGS): Don't try to run etags on cp-parse.y.
11349
6060a796 11350Sat Jan 15 18:34:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11351
11352 * Makefile.in, configure: Handle the C++ front-end in a
11353 subdirectory.
11354 * cp-*: Move C++ front-end to cp/*.
11355
11356Fri Jan 14 14:09:37 1994 Jason Merrill (jason@deneb.cygnus.com)
11357
11358 * cp-typeck.c (build_function_call_real): Modify to match other
11359 instances of taking the address of the function.
11360
11361 * cp-class.c (finish_struct): Set TYPE_HAS_REAL_CONSTRUCTOR to 1 if
11362 there are non-synthesized constructors.
11363 Only set TYPE_NEEDS_CONSTRUCTOR if TYPE_HAS_REAL_CONSTRUCTOR.
11364 Always generate copy constructor if possible.
11365
11366 * cp-tree.h (lang_type): Add has_real_constructor bitfield.
11367 (TYPE_HAS_REAL_CONSTRUCTOR): Define.
11368
11369 * cp-lex.c (default_copy_constructor_body): Use init syntax
11370 for all bases.
11371
11372 * cp-type2.c (store_init_value): Only give error for initializer list
11373 if TYPE_HAS_REAL_CONSTRUCTOR.
11374
11375Thu Jan 13 15:38:29 1994 Jason Merrill (jason@deneb.cygnus.com)
11376
11377 * cp-tree.h (DECL_SYNTHESIZED): Add defn.
11378 (lang_decl): Add synthesized bitfield to decl_flags.
11379
11380 * cp-lex.c (cons_up_default_function): Use DECL_SYNTHESIZED to mark
11381 artificial methods, rather than a line # of 0.
11382
11383Fri Jan 14 18:25:29 1994 Kung Hsu (kung@mexican.cygnus.com)
11384
11385 * cp-decl (xref_tag): fix a bug in conflict type.
11386 * cp-parse.y : add SCOPED_NAME for uninstantiated template nested
11387 type reference.
11388 * cp-spew.c (yylex) : generated SCOPED_NAME token.
11389 * cp-lex.c (yyprint): handle SCOPED_NAME.
11390
6060a796 11391Fri Jan 14 17:00:29 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11392
11393 * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is
11394 not right.
11395
11396Thu Jan 13 14:00:35 1994 Kung Hsu (kung@mexican.cygnus.com)
11397
11398 * cp-decl2.c (grok_x_components): fix a bug that enum type does not
11399 have type_flags.
11400
6060a796 11401Thu Jan 13 11:39:34 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11402
11403 Ensure that all vtable pointers are initialized with all the right
11404 values.
11405
11406 * cp-class.c (is_normal): Changed to reflect new meaning of
11407 CLASSTYPE_VFIELD_PARENT.
11408 * cp-class.c (maybe_fixup_vptrs): Use of
11409 CLASSTYPE_NEEDS_VIRTUAL_REINIT here is misguided. Use
11410 BINFO_MODIFIED instead.
11411 * cp-class.c (finish_struct): Changed to reflect new meaning of
11412 CLASSTYPE_VFIELD_PARENT.
11413 * cp-decl.c (get_binfo_from_vfield): Removed, unneeded now.
11414 * cp-decl.c (finish_function): Use init_vtbl_ptrs, instead of open
11415 coding it here.
11416 * cp-init.c (init_vfields): Changed name to init_vtbl_ptrs, and
11417 re-implement.
11418 * cp-init.c (emit_base_init): Use new name init_vtbl_ptrs.
11419 * cp-tree.h (vfield_parent): Changed to integer.
11420 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Changed docs to reflect new
11421 meaning.
11422 * cp-tree.h (init_vtbl_ptrs): Added init_vtbl_ptrs.
11423
11424Wed Jan 12 18:24:16 1994 Kung Hsu (kung@mexican.cygnus.com)
11425
11426 * cp-decl.c (xref_tag): re-implement globalize nested type.
11427 * cp-decl2.c (grok_x_components): ditto.
11428 * cp-parse.y: ditto.
11429 * cp-tree.h (lang_type): add no_globalize bit in type_flags.
11430
11431Wed Jan 12 14:08:09 1994 Jason Merrill (jason@deneb.cygnus.com)
11432
11433 * cp-decl.c (grokdeclarator): Don't set TREE_PUBLIC on friend
11434 decls with a definition attached.
11435
11436 * cp-typeck.c (build_modify_expr): Undo previous change in the case
11437 of INIT_EXPRs.
11438
11439Tue Jan 11 19:33:03 1994 Jason Merrill (jason@deneb.cygnus.com)
11440
11441 * cp-typeck.c (build_modify_expr): Replace code for generating
11442 assignment semantics for classes with an error.
11443 (build_modify_expr_1): #if 0 out.
11444
11445 * cp-decl.c (pushdecl): Patch bogus design of pushdecl
11446 behavior for overloaded functions (it doesn't push anything).
11447
11448 * cp-class.c (finish_struct): When generating default op=,
11449 set TYPE_HAS_ASSIGNMENT.
11450
6060a796 11451Mon Jan 10 18:48:06 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11452
11453 * cp-cvt.c (convert): Make {double, clashing enum} -> enum
11454 invalid.
11455 * cp-typeck.c (convert_for_assignment): Simplify.
11456 * cp-decl2.c (warn_enum_clash): Removed.
11457 * invoke.texi (-Wenum-clash): Removed.
11458 * toplev.c (-Wenum-clash): Removed.
11459
11460Mon Jan 10 17:48:37 1994 Kung Hsu (kung@mexican.cygnus.com)
11461
11462 * cp-decl.c (finish_decl): fix incorrect popclass call.
11463
11464 * cp-decl.c (is_anon_name): new function, check whether the name
11465 is anonymous name generated by compiler.
11466 * cp-decl.c (grokdeclarator): allow nested SCOPE_REF
11467 * cp-spew.c (hack_more_ids): handle nested type in template.
11468 * cp-parse.y : handle nested type reference in uninstantiated
11469 template.
11470 * cp-call.c (build_method_call): handle uninstantiated template
11471 case.
11472 * cp-pt.c (search_nested_type_in_tmpl): new function, search nested
11473 type in template.
11474 * cp-pt.c (lookup_nested_type_by_name): new function, lookup nested
11475 type by name.
11476 * cp-pt.c (tsubst): handle nested type search by name.
11477
11478Mon Jan 10 14:32:18 1994 Jason Merrill (jason@deneb.cygnus.com)
11479
11480 * cp-init.c (build_member_call): Propagate qualifiers to new type.
11481
11482 * cp-call.c (build_method_call): Count functions the new way.
11483
11484Fri Jan 7 19:03:26 1994 Jason Merrill (jason@deneb.cygnus.com)
11485
11486 * cp-decl.c (pushtag): Set DECL_ASSEMBLER_NAME for nested classes,
11487 too.
11488
11489Tue Jan 4 16:45:51 1994 Kung Hsu (kung@cirdan.cygnus.com)
11490
11491 * cp-parse.y: change to handle whether to globalize nested class.
11492 * cp-decl.c(xref_tag, maybe_globalize_type): Ditto.
11493
11494Mon Jan 3 22:22:32 1994 Gerald Baumgartner (gb@cygnus.com)
11495
11496 * Makefile.in cp-call.c cp-class.c cp-cvt.c cp-decl.c cp-decl2.c
11497 cp-error.c cp-init.c cp-lex.c cp-lex.h cp-method.c cp-parse.y
11498 cp-spew.c cp-tree.c cp-tree.h cp-type2.c cp-typeck.c cp-xref.c
11499 gplus.gperf toplev.c: Incorporated C++ signature extension.
11500 * cp-sig.c: New file, contains most of signature processing.
11501 * cp-hash.h: Regenerated from gplus.gperf.
11502
11503 * gcc.1 g++.1: Added explanation for the `-fhandle-signatures'
11504 and `-fno-handle-signatures' command line flags.
11505
11506 * gcc.texi: Changed the last-modification date.
11507 * invoke.texi: Added `-fhandle-signatures' in the list of
11508 C++ language options. Added explanation for this option.
11509
6060a796 11510Tue Dec 28 21:10:03 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
11511
11512 * cp-init.c (expand_vec_init): Remove comptypes test, as it is too
11513 harsh here.
11514
6060a796 11515Tue Dec 28 13:42:22 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
11516
11517 * cp-pt.c (do_pending_expansions): Decide to expand a template
11518 member function, based upon it's class type, not the class type of
11519 the first place it was declared.
11520
6060a796 11521Tue Dec 28 05:42:31 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
11522
11523 * cp-class.c (is_normal): New routine, use to determine when the
11524 given binfo is the normal one. (The one that should have the simple
11525 vtable name.)
11526 * cp-class.c (modify_other_vtable_entries): Use DECL_ASSEMBLER_NAME
11527 to check if two fndecls are `the same'. Sometimes this routine can
11528 modify the main vtable, and normal should be 1, in that case, so use
11529 is_normal() to determine if this is the main vtable for the class.
11530 Don't recurse down virtual bases, as they are shared, and we take
11531 care of them elsewhere.
11532 * cp-class.c (modify_vtable_entries): If we have already updated the
11533 vtable with the new virtual, don't do it again.
11534 * cp-class.c (finish_struct): Set CLASSTYPE_VFIELD_PARENT as
11535 appropriate. Do virtual function overriding in virtual bases, after
11536 normal overriding, so that the base function list in DECL_VINDEX is
11537 not overridden, before we have a chance to run through the list.
11538 Use DECL_ASSEMBLER_NAME to check if two fndecls are `the same'.
11539 Make sure we pass the right address into modify_vtable_entries.
11540 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): New field to indicate which
11541 binfo is the one that has the vtable that we based our vtable on.
11542
11543Fri Dec 24 09:40:52 1993 Michael Tiemann (tiemann@blues.cygnus.com)
11544
11545 * cp-typeck.c (c_expand_start_case): Use default_conversion to
11546 convert expression from reference type if necessary.
11547
11548Wed Dec 22 17:58:43 1993 Jason Merrill (jason@deneb.cygnus.com)
11549
11550 * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before
11551 trying to read its TREE_VALUE.
11552
11553 * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here.
11554 (finish_struct): Instead of here.
11555
11556Tue Dec 21 14:34:25 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
11557
11558 * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't
11559 have TYPE_PTRMEMFUNC_P set before we try to build its
11560 CLASSTYPE_ID_AS_LIST.
11561 (get_decl_list): Likewise, when trying to read it.
11562
11563 * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined.
11564 (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT.
11565
11566Mon Dec 20 13:35:03 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
11567
11568 * cp-typeck.c (rationalize_conditional_expr): New function.
11569 (unary_complex_lvalue): Use it.
11570 (build_modify_expr): Use it, since trying to do an ADDR_EXPR of it
11571 with build_unary_op won't cut it. Don't wrap the COND_EXPR with a
11572 SAVE_EXPR either.
11573
11574 * cp-decl2.c (explicit_warn_return_type): Deleted variable.
11575 (lang_decode_option): Set warn_return_type, not explicit_*, for
11576 -Wreturn-type and -Wall. This is what rest_of_compilation uses to
11577 decide if it should go into jump_optimize or not.
11578 * cp-tree.h (explicit_warn_return_type): Deleted.
11579 * cp-decl.c (grokdeclarator): Use warn_return_type, not explicit_*.
11580 (finish_function): Also complain about no return in a non-void fn if
11581 we're being pedantic (don't rely on use of -Wreturn-type).
11582
11583Fri Dec 17 15:45:46 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
11584
11585 * cp-decl.c (grokdeclarator): Forbid declaration of a function as
11586 static if it's being done inside another function.
11587
11588 * cp-search.c (compute_visibility): Check for friendship both ways.
11589
11590Fri Dec 17 14:28:25 1993 Jason Merrill (jason@deneb.cygnus.com)
11591
11592 * cp-cvt.c (build_default_binary_type_conversion): Make error
11593 messages more helpful.
11594
11595 * cp-error.c (op_as_string): New function, returns "operator =="
11596 given EQ_EXPR or suchlike.
11597
11598Fri Dec 17 13:28:11 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
11599
11600 * cp-call.c (print_n_candidates): New function.
11601 (build_overload_call_real): Use it when we complain about a call
11602 being ambiguous.
11603
11604Fri Dec 17 12:41:17 1993 Jason Merrill (jason@deneb.cygnus.com)
11605
11606 * cp-call.c (build_method_call): Fix checking for static call
11607 context.
11608
11609 * cp-method.c (build_opfncall): Call build_indirect_ref on argument
11610 to operator new.
11611
11612 * cp-init.c (build_new): Don't mess with rval when building
11613 indirect ref.
11614
11615Thu Dec 16 16:48:05 1993 Kung Hsu (kung@cirdan.cygnus.com)
11616
11617 * cp-lex.c (default_assign_ref_body): add check when TYPE_NESTED_
11618 NAME(type) may not be exist. It's not a problem for old compiler.
11619
11620Thu Dec 16 14:46:06 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
11621
11622 * cp-tree.h (CLASSTYPE_ALTERS_VISIBILITIES_P): Delete macro, it's
11623 never used for anything.
11624 (struct lang_type, member type_flags): Delete field
11625 `alters_visibility', and up `dummy' by 1.
11626 * cp-class.c (finish_base_struct): Delete code that copies the
11627 setting of CLASSTYPE_ALTERS_VISIBILITIES_P.
11628 (finish_struct): Delete code that sets it.
11629
11630Thu Dec 16 14:44:39 1993 Jason Merrill (jason@deneb.cygnus.com)
11631
11632 * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to
11633 build_method_call that I messed up before.
11634
11635 * cp-search.c (get_base_distance): If protect > 1, allow immediate
11636 private base.
11637
11638 * cp-class.c (finish_base_struct): Set cant_synth_* correctly.
11639 (finish_struct): Ditto. Well, nigh-correctly; it won't deal
11640 properly with the case where a class contains an object of an
11641 ambiguous base class which has a protected op=. Should be fixed
11642 when the access control code gets overhauled.
11643 (finish_struct_methods): Set TYPE_HAS_NONPUBLIC_* correctly.
11644
11645Thu Dec 16 12:17:06 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
11646
11647 * cp-lex.c (real_yylex): Turn the code back on that deals with
11648 __FUNCTION__ and __PRETTY_FUNCTION__. Don't use lookup_name, to
11649 avoid the ambiguity problems that led to it being turned off in the
11650 first place.
11651
11652 * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P
11653 to see if something is a method.
11654
6060a796 11655Wed Dec 15 18:35:58 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
11656
11657 * cp-typeck.c (build_modify_expr): Avoid error messages on small
11658 enum bit fields.
11659 * cp-typeck.c (convert_for_assignment): Add missing argument to
11660 cp_warning and cp_pedwarn calls.
11661
11662Wed Dec 15 18:25:32 1993 Jason Merrill (jason@deneb.cygnus.com)
11663
11664 * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base
11665 initializers; it's just anachronistic.
11666
11667 * cp-decl.c (finish_decl): Don't require external-linkage arrays
11668 to have a complete type at declaration time when pedantic.
11669
11670Tue Dec 14 11:37:23 1993 Jason Merrill (jason@deneb.cygnus.com)
11671
11672 * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set.
11673
11674 * cp-call.c (build_method_call): Don't dereference pointer given
11675 as instance.
11676
11677 * cp-decl.c (finish_function): Don't pass pointer to
11678 build_method_call.
11679 (finish_function): Ditto.
11680
11681 * cp-typeck.c (build_x_function_call): Ditto.
11682
11683 * cp-method.c (build_component_type_expr): Ditto.
11684
11685 * cp-init.c (build_member_call): Ditto.
11686 (build_new): Ditto.
11687
11688Mon Dec 13 18:04:33 1993 Kung Hsu (kung@cirdan.cygnus.com)
11689
11690 * cp-decl.c (xref_tag): fix regression created by changes made
11691 in Dec. 7 1993.
11692 * cp-decl.c (xref_defn_tag): fix parallel nested class problem.
11693
11694Fri Dec 10 12:40:25 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
11695
11696 * cp-call.c (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print
11697 out the final evaluation of the function, so we can see if ELLIPSIS,
11698 USER, and EVIL were set at the end.
11699
11700 * cp-call.c (convert_harshness_ansi): When the parm isn't an lvalue,
11701 only go for setting TRIVIAL_CODE if we are dealing with types that
11702 are compatible.
11703
6060a796 11704Thu Dec 9 18:27:22 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
11705
11706 * cp-decl.c (flag_huge_objects): New flag to allow large objects.
11707 * toplev.c (lang_options): Ditto.
11708 * cp-decl2.c (flag_huge_objects, lang_f_options): Ditto.
11709 * cp-decl.c (delta_type_node): New type for delta entries.
11710 * cp-tree.h (delta_type_node): Ditto.
11711 * cp-decl.c (init_decl_processing): Setup delta_type_node.
11712 * cp-decl.c (init_decl_processing, build_ptrmemfunc_type): Use
11713 delta_type_node instead of short_integer_type_node.
11714 * cp-class.c (build_vtable_entry): Ditto.
11715
11716Thu Dec 9 16:19:05 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
11717
11718 * cp-tree.h (OPERATOR_TYPENAME_P): Define outside of
11719 NO_{DOLLAR,DOT} macro checks, so it always gets defined.
11720 (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL.
11721
6060a796 11722Wed Dec 8 17:38:06 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
11723
11724 * cp-decl.c (finish_decl): Make sure things that can go into
11725 "common", do go into common, if -fcommon is given.
11726
11727Wed Dec 8 13:01:54 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
11728
63718c49
GB
11729 * cp-call.c (print_harshness) [DEBUG_MATCHING]: New function.
11730 (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print out
11731 argument matching diagnostics to make instantly clear what the
11732 compiler is doing.
7177d104
MS
11733
11734 * cp-call.c (convert_harshness_ansi): If the parm isn't an lvalue,
11735 then check to see if the penalty was increased due to
11736 signed/unsigned mismatch, and use a TRIVIAL_CODE if it wasn't.
11737
11738Tue Dec 7 18:29:14 1993 Kung Hsu (kung@cirdan.cygnus.com)
11739
11740 * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution
11741 problem.
11742
11743Tue Dec 7 16:09:34 1993 Jason Merrill (jason@deneb.cygnus.com)
11744
11745 * cp-class.c (finish_struct): Before synthesizing methods, if no
11746 methods have yet been declared then set nonprivate_method. Don't
11747 set non_private method after synthesizing a method.
11748
11749 * cp-lex.c (extract_interface_info): If flag_alt_external_templates
11750 is set, tie emitted code to the location of template instantiation,
11751 rather than definition.
11752
11753 * cp-tree.h: Declare flag_alt_external_templates.
11754
11755 * cp-decl2.c (lang_decode_option): Support -falt-external-templates.
11756
11757 * toplev.c (lang_options): Ditto.
11758
9e9ff709 11759Mon Oct 4 12:50:02 1993 Chip Salzenberg (chip@fin.uucp)
7177d104 11760
63718c49
GB
11761 [changes propagated from 930810 snapshot]
11762 * cp-decl.c (init_decl_processing): Make long long available for use
11763 as SIZE_TYPE and PTRDIFF_TYPE.
11764 (finish_decl): Allow file-scope static incomplete array.
11765 (grokdeclarator): Don't pass on const and volatile fron function
11766 value type to function type.
11767 Warn here for volatile fn returning non-void type.
11768 * cp-parse.y (attrib): Accept attributes `volatile' with alias
11769 `noreturn', and `const'.
11770 * cp-typeck.c (default_conversion): Don't lose const and volatile.
11771 (build_binary_op_nodefault): Generate pedantic warning for comparison
11772 of complete pointer type with incomplete pointer type.
11773 (build_c_cast): Be careful that null pointer constant be INTEGER_CST.
7177d104
MS
11774
11775Tue Dec 7 10:46:48 1993 Jason Merrill (jason@deneb.cygnus.com)
11776
11777 * cp-init.c (expand_vec_init): When creating a temporary for copying
11778 arrays, use the type of the source, not the target.
11779
11780 * cp-cvt.c (convert): Pass an argument for errtype to
11781 convert_to_reference.
11782
11783 * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with
11784 methods, -> and `this'.
11785
11786Mon Dec 6 17:12:33 1993 Jason Merrill (jason@deneb.cygnus.com)
11787
11788 * cp-error.c (parm_as_string): New function; returns `this' or arg
11789 number. Corresponds to %P.
11790 (dump_expr): Deal with method calls.
11791
11792 * cp-cvt.c (convert_to_reference): Stop using warn_for_assignment.
11793 * cp-typeck.c (convert_for_assignment): Ditto.
11794 (warn_for_assignment): Lose.
11795
11796Mon Dec 6 11:33:35 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
11797
11798 * cp-call.c (ideal_candidate_ansi): Delete code that was never
11799 doing anything useful. Instead, sort once, and DO NOT wipe
11800 out any codes with EVIL_CODE, since that's what we use as a
11801 marker for the end of the list of candidates.
11802
11803 * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN.
11804
11805Mon Dec 6 12:49:17 1993 Jason Merrill (jason@deneb.cygnus.com)
11806
11807 * cp-init.c (get_aggr_from_typedef): New function, like
11808 is_aggr_typedef but returns the _TYPE.
11809
11810 * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name.
11811
11812Sun Dec 5 18:12:48 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
11813
11814 * cp-lex.c (readescape): Pedwarn when a hex escape is out of range.
11815
11816Thu Nov 25 23:50:19 1993 Chip Salzenberg (chip@fin.uucp)
11817
11818 Delay language context change until beginning of next decl.
11819
11820 * cp-lex.h (c_header_level): Removed.
11821 (pending_lang_change): Declared.
11822 * cp-lex.c (c_header_level): Renamed from in_c_header, made static.
11823 (pending_lang_change): Defined.
11824 (check_newline): Rework code that recognizes line number and
11825 filename changes. Instead of pushing and popping lang context,
11826 increment and decrement pending_lang_change.
11827 (do_pending_lang_change): Push and pop lang context according
11828 to value of pending_lang_change.
11829 * cp-parse.y (extdefs): Use lang_extdef instead of extdef.
11830 (extdef): Same as extdef, but call do_pending_lang_change() first.
11831
11832Mon Nov 15 15:39:15 1993 Chip Salzenberg (chip@fin.uucp)
11833
11834 * cp-typeck.c (build_binary_op_nodefault): Warn for ordered
11835 compare of ptr with 0 only if pedantic in both cases.
11836
11837Thu Nov 25 13:31:37 1993 Chip Salzenberg (chip@fin.uucp)
11838
11839 Reinstate the below patch, which got lost in the Cygnus merge:
11840 Tue Nov 23 13:59:24 1993 Hallvard B Furuseth (hbf@durin.uio.no)
11841 * cp-parse.y (maybe_type_qual): Don't fail to set $$.
11842
11843Wed Nov 17 19:03:30 1993 Chip Salzenberg (chip@fin.uucp)
11844
11845 * cp-parse.y (attrib): Allow "ident(ident)" like the C front end.
11846
11847Fri Oct 22 20:43:37 1993 Paul Eggert (eggert@twinsun.com)
11848
11849 * cp-lex.c (real_yylex): Diagnose floating point constants
11850 that are too large.
11851
11852Wed Nov 17 19:10:37 1993 Chip Salzenberg (chip@fin.uucp)
11853
11854 * cp-type2.c (build_functional_cast): ARM page 16: When a class
11855 and an object, function or enumerator are declared in the same
11856 scope with the same name, the class name is hidden.
11857
11858Wed Nov 17 19:07:18 1993 Chip Salzenberg (chip@fin.uucp)
11859
11860 * cp-call.c (convert_harshness_ansi): Distinguish float, double,
11861 and long double from each other when overloading.
11862 (compute_conversion_costs_{ansi,old}, build_method_call,
11863 build_overlay_call_real, convert_to_aggr): Always set and
11864 always use H_LEN member of candidate structure.
11865
11866Mon Oct 11 23:10:53 1993 Chip Salzenberg (chip@fin.uucp)
11867
11868 * cp-decl.c (duplicate_decls): Note redeclarations of library
11869 functions, and generate distinct warnings for them.
11870
11871Mon Oct 4 12:26:49 1993 Chip Salzenberg (chip@fin.uucp)
11872
11873 Support format warnings in G++.
11874
11875 * cp-tree.h: Protect against multiple inclusion.
11876 Declare all public functions in c-common.c (copy from c-tree.h).
11877 (STDIO_PROTO): Define.
11878 (warn_format): Declare.
11879 (record_format_info): Remove declaration.
11880 * cp-decl.c (init_decl_processing): Call init_function_format_info.
11881 * cp-decl2.c (lang_decode_option): Make "-Wall" include warn_format.
11882 * cp-typeck.c (build_function_call_real): Call check_function_format.
11883 (record_format_info): Remove -- obsolete stub.
11884
11885Sat Jul 24 12:04:29 1993 Chip Salzenberg (chip@fin.uucp)
11886
11887 * cp-decl.c (duplicate_decls): Don't warn for non-extern var decl
11888 following an extern one (for -Wredundant-decls).
11889 * cp-parse.y (primary): In statement expression case, if compstmt
11890 returns something other than a BLOCK, return it unchanged.
11891
11892Thu Dec 2 20:44:58 1993 Chip Salzenberg (chip@fin.uucp)
11893
11894 * cp-decl.c (warn_extern_redeclared_static): New function made
11895 from code extracted from pushdecl.
11896 (duplicate_decls, pushdecl): Call new function.
11897 (lookup_name_current_level): Allow for IDENTIFIER_GLOBAL_VALUE
11898 to be a TREE_LIST when function is declared in 'extern "C" {}'.
11899
11900Fri Dec 3 16:01:10 1993 Jason Merrill (jason@deneb.cygnus.com)
11901
11902 * cp-class.c (duplicate_tag_error): Use cp_error.
11903 (finish_base_struct): Check for ambiguity with direct base, and don't
11904 generate op= or copy ctor if it exists.
11905
11906Fri Dec 3 15:32:34 1993 Kung Hsu (kung@cirdan.cygnus.com)
11907
11908 * cp-init.c (expand_member_init): when initializer name is null,
11909 don't try to build it now because emit_base_init will handle it.
11910
11911Fri Dec 3 12:28:59 1993 Jason Merrill (jason@deneb.cygnus.com)
11912
11913 * cp-lex.c (init_lex): Initialize input_filename to "<internal>" for
11914 code such as ExceptionHandler::operator=.
11915
11916Fri Dec 3 10:32:08 1993 Jason Merrill (jason@deneb.cygnus.com)
11917
11918 * cp-decl.c (grokdeclarator): Don't try to print out dname when
11919 complaining about arrays of references if decl_context==TYPENAME,
11920 since it will be null.
11921
11922 * cp-decl2.c: Default to flag_ansi_overloading.
11923
11924Thu Dec 2 18:05:56 1993 Kung Hsu (kung@cirdan.cygnus.com)
11925
11926 * cp-call.c (build_method_call): use binfo from instance if it's
11927 different from binfo (basetype_path) passed from above.
11928
11929Thu Dec 2 12:48:36 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
11930
11931Wed Nov 17 19:14:29 1993 Chip Salzenberg (chip@fin.uucp)
11932
11933 cp-error.c (dump_expr): Use unsigned chars to output a
11934 TREE_REAL_CST in hex.
11935
11936Thu Dec 2 11:05:48 1993 Jason Merrill (jason@deneb.cygnus.com)
11937
11938 * cp-class.c (finish_struct): Fix typo in setting
11939 cant_synth_asn_ref.
11940
11941 * cp-tree.h (TYPE_NESTED_NAME): New macro, does
11942 DECL_NESTED_TYPENAME (TYPE_NAME (NODE)).
11943
11944 * cp-lex.c (default_copy_constructor_body): Change
11945 DECL_NAME (TYPE_NAME (btype)) to TYPE_NESTED_NAME (btype).
11946 (default_assign_ref_body): Ditto.
11947 (default_copy_constructor_body): Call operator= explicitly for
11948 base classes that have no constructor.
11949
11950Thu Dec 2 10:47:15 1993 Michael Tiemann (tiemann@blues.cygnus.com)
11951
11952 * cp-call.c (build_method_call): If the instance variable is
11953 converted to error_mark_node when we're trying to convert it to the
11954 base type of a method we're looking up, return error_mark_node.
11955
11956Thu Dec 2 10:41:16 1993 Torbjorn Granlund (tege@cygnus.com)
11957
11958 * cp-typeck.c (build_binary_op_nodefault): In *_DIV_EXPR *_MOD_EXPR
11959 cases, tests for unsigned operands by peeking inside a NOP_EXPR.
11960
11961Wed Dec 1 13:33:34 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
11962
11963 * cp-call.c (compute_conversion_costs_ansi): Use the size of struct
11964 harshness_code, not the size of short, for clearing out the
11965 ansi_harshness.
11966
11967 * cp-call.c (print_candidates): New function.
11968 (build_method_call): When we had some candidates, but didn't get a
11969 usable match, don't report that we got an error with the first
11970 candidate. Instead, say there were no matches, and list the
11971 candidates with print_candidates. In the second pass, make sure we
11972 clear out ever_seen, so we can accurately count the number of
11973 functions that qualified.
11974
11975Wed Dec 1 09:53:59 1993 Torbjorn Granlund (tege@cygnus.com)
11976
11977 * cp-typeck.c (build_binary_op_nodefault): Shorten for *_MOD_EXPR
11978 only if op1 is known to be != -1.
11979 (build_binary_op_nodefault): Handle *_DIV_EXPR likewise.
11980
11981Tue Nov 30 14:07:26 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
11982
11983 * cp-method.c (hack_identifier): If the field itself is private, and
11984 not from a private base class, say so.
11985
11986Mon Nov 29 03:00:56 1993 Jason Merrill (jason@deneb.cygnus.com)
11987
11988 * cp-decl.c (grokdeclarator): Always warn on initialization of
11989 const member.
11990
11991Wed Nov 24 00:49:35 1993 Jason Merrill (jason@deneb.cygnus.com)
11992
11993 * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly.
11994 (finish_base_struct): Set cant_synth_asn_ref properly.
11995
11996 * cp-lex.c (cons_up_default_function): Add section for operator=.
11997 (default_assign_ref_body): New function, mostly cribbed from
11998 default_copy_constructor_body.
11999
12000 * cp-class.c (base_info): Add members cant_synth_copy_ctor,
12001 cant_synth_asn_ref, no_const_asn_ref.
12002 (finish_base_struct): Update no_const_asn_ref, note that you should
12003 update cant_synth_*, propagate TYPE_GETS_ASSIGN_REF.
12004 (finish_struct): Add decls for cant_synth_*, no_const_asn_ref, and
12005 initialize them properly. Set no_const_asn_ref properly. Set
12006 cant_synth_* in some of the situations where they should be set.
12007 Propagate TYPE_GETS_ASSIGN_REF. Use cant_synth_copy_ctor. Add call
12008 to cons_up_default_function for operator=.
12009
6060a796 12010Tue Nov 23 20:24:58 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
12011
12012 * cp-cvt.c (convert_force): Add code to perform casting of pointer
12013 to member function types.
12014 * cp-typeck.c (build_ptrmemfunc): Add FORCE parameter to indicate
12015 when the conversion should be done, regardless.
12016 * cp-tree.h (build_ptrmemfunc): Ditto.
12017 * cp-type2.c (digest_init): Ditto.
12018 * cp-typeck.c (convert_for_assignment): Ditto.
12019
12020Tue Nov 23 18:06:58 1993 Jason Merrill (jason@deneb.cygnus.com)
12021
12022 * cp-error.c (dump_expr): Do the right thing for variables of
12023 reference type.
12024
12025 * cp-decl.c (grok_op_properties): Set TYPE_HAS_ASSIGN_REF
12026 and its kin properly.
12027 (xref_tag): Propagate TYPE_GETS_ASSIGN_REF.
12028
6060a796 12029Tue Nov 23 12:26:13 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
12030
12031 * cp-method.c (build_opfncall): Don't count pointer to member
12032 functions as aggregates here, as we don't want to look up methods in
12033 them. The compiler would core dump if we did, as they don't have
12034 normal names.
12035 * cp-typeck.c (build_indirect_ref): Improve wording on error
12036 message.
12037
12038Mon Nov 22 14:22:23 1993 Jason Merrill (jason@deneb.cygnus.com)
12039
12040 * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn
12041 (since it's supported in other compiler bits).
12042
12043 * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name
12044 argument.
12045
12046 * cp-error.c (dump_function_decl): Don't print return type for
12047 constructors and destructors.
12048
12049 * cp-cvt.c (cp_convert_to_pointer): Import code from
12050 convert_to_pointer so we can return error_mark_node in the case of an
12051 error, and to allow more meaningful error messages.
12052 (build_type_conversion): Don't go through void* when trying
12053 to convert to a pointer type.
12054
12055 * cp-decl.c (grokfndecl): Move call to grok_op_properties back
12056 after grokclassfn so that it's dealing with the right decl.
63718c49 12057 (grok_op_properties): Don't assert !methodp for op new and op delete.
7177d104
MS
12058
12059 * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now
12060 no uses of it in the compiler).
12061
12062 * cp-call.c (build_scoped_method_call): Fix for destructors of simple
12063 types.
12064 (build_method_call): Ditto.
12065
12066Fri Nov 19 12:59:38 1993 Jason Merrill (jason@deneb.cygnus.com)
12067
12068 * cp-tree.c (count_functions): Abstraction function.
12069
12070 * cp-call.c (build_overload_call_real): Deal with new overloading
12071 properly, remove dead code.
12072
12073 * gcc.c (default_compilers): Generate and use .ii files in the
12074 intermediate stage of compiling C++ source.
12075
12076Fri Nov 19 11:26:09 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
12077
12078 * cp-expr.c (cplus_expand_expr): Make call_target a valid memory
12079 address before using it, so it can be later safely compared.
12080
12081Fri Nov 12 15:30:27 1993 Jason Merrill (jason@deneb.cygnus.com)
12082
12083 * cp-pt.c (tsubst): Deal with new overloading.
12084
12085 * cp-typeck.c (fntype_p): is the arg function type?
12086 (comp_target_parms): pedwarn on conversion from (anything) to (...).
12087 (build_x_function_call): Deal with new overloading.
12088
12089 * cp-tree.c (decl_list_length): Deal with new overloading.
12090 (decl_value_member): Like value_member, but for DECL_CHAINs.
12091
12092 * cp-decl.c (duplicate_decls): Deal with new overloading.
12093 (start_decl): Ditto.
12094
12095 * cp-class.c (instantiate_type): Deal with new overloading.
12096
12097 * cp-call.c (convert_harshness_ansi): Deal with new overloading.
12098 (convert_harshness_old): Deal with new overloading.
12099 (build_overload_call_real): Ditto.
12100
12101Mon Nov 8 13:50:49 1993 Jason Merrill (jason@deneb.cygnus.com)
12102
12103 * cp-tree.c (get_unique_fn): New function; returns FUNCTION_DECL
12104 if unambiguous, NULL_TREE otherwise.
12105 (get_first_fn): Returns the first appropriate FUNCTION_DECL.
12106 (is_overloaded_fn): Returns whether or not the passed tree is
12107 a function or list of functions.
12108
12109 * cp-init.c (init_init_processing): use `get_first_fn' to find
12110 the FUNCTION_DEFN for new and delete.
12111
12112 * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut
12113 code size in half (I spit on special cases).
12114
12115Tue Sep 7 20:03:33 1993 Jason Merrill (jason@deneb.cygnus.com)
12116
12117 * cp-decl.c: Allow references and template type parameters as well
This page took 1.346327 seconds and 5 git commands to generate.