]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
merge
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
da20811c
JM
1Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2
3 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
4
5 * cp-tree.h (report_type_mismatch): Add prototype.
6 * call.c (build_overload_call_real): Remove erroneous fourth
7 argument to report_type_mismatch.
8 (build_user_type_conversion_1): Remove erroneous second arg to
9 tourney.
10 (build_new_function_call): Likewise.
11 (build_object_call): Likewise.
12 (build_new_op): Likewise.
13 (build_new_method_call): Likewise.
14
15Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16
17 * error.c (dump_decl): Don't bother processing a function with no
18 DECL_LANG_SPECIFIC.
19
20 * method.c (emit_thunk): Call init_function_start in the macro case.
21
22Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
23
24 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
25 defined and used to set flag_vtable_thunks.
26
27Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
28
29 * parse.y: Don't clear the inlines from their obstack until they've
30 all been processed.
31
32 * decl.c (duplicate_decls): Don't complain about exception
33 specification mismatch if flag_exceptions is off.
34
35Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
36
37 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
38
39Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
40
41 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
42 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
43 Include <stdio.h> before include files that formerly used STDIO_PROTO.
44
45 * decl.c, g++spec.c, lex.c, method.c, repo.c:
46 Include "config.h" first, as per autoconf manual.
47
48Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
49
50 * decl.c (duplicate_decls): Tweak wording.
51 * lex.c (do_pending_defargs): Don't die if we see a default arg
52 that isn't a DEFAULT_ARG.
53 * error.c (dump_expr): Handle DEFAULT_ARG.
54
55 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
56 * lang-options.h: Add -fhandle-exceptions.
57
58 * class.c (build_vtable): vtables are artificial.
59 (prepare_fresh_vtable): Likewise.
60
61Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
62
63 * cvt.c (ocp_convert): After converting to the target type, set
64 LOOKUP_NO_CONVERSION.
65
66 * call.c (joust): Warn about potentially confusing promotion rules
67 with -Wsign-promo.
68 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
69
70Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
71
72 * exception.cc: Declare __terminate_func with noreturn attribute.
73
8dff1027
MS
74Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
75
76 * parse.y: Break out eat_saved_input, handle errors.
da20811c 77 (function_try_block): Use compstmt instead of compstmt_or_error.
8dff1027
MS
78
79Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
80
81 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
82
83Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
84
85 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
86 existence of cc1plus check whether $(LANGUAGES) contains C++.
87
88Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
89
90 * method.c (do_build_copy_constructor): When copying an anonymous
91 union member loop around to handle nested anonymous unions. Use
92 the offset of the member relative to the outer structure, not the
93 union.
94
86e6f22f
JM
95Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
96
97 * call.c (resolve_args): New fn.
98 (build_new_function_call): Use it.
99 (build_object_call): Likewise.
100 (build_new_method_call): Likewise.
101
102Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
103
104 * call.c (build_over_call): tsubst all default parms from templates.
105
42976354
BK
106Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
107
108 * decl.c (struct cp_function): Add static_labelno.
109 (push_cp_function_context): Save it.
110 (pop_cp_function_context): Restore it.
111
112Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
113
114 * typeck.c (build_component_ref_1): Convert from reference.
115
116Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
117
118 * parse.y (current_declspecs, prefix_attributes): Initialize to
119 NULL_TREE.
120
121 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
122 before we try to force it to be a TREE_LIST.
123 (decl): Make sure $1.t is non-nil.
124
125Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
126
127 * pt.c (uses_template_parms): Handle template first-parse codes.
128
129 * decl.c (cp_finish_decl): Only warn about user-defined statics.
130
131Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
132
133 * pt.c (unify): Handle BOOLEAN_TYPE.
134
135 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
136 * pt.c (tsubst): Don't set it.
137 * call.c (build_over_call): Use uses_template_parms.
138
139Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
140
141 * method.c (build_overload_nested_name): Use static_labelno
142 instead of var_labelno.
143 (build_qualified_name): New fn.
144 (build_overload_name): Split out from here.
145 (build_static_name): Use build_qualified_name.
146 * decl.c (cp_finish_decl): Statics in extern inline functions
147 have comdat linkage.
148 (start_function): Initialize static_labelno.
149
150Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
151
152 * class.c (finish_struct_methods): add check of warn_ctor_dtor_privacy
153 before "all member functions in class [] are private"
154
155Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
156
157 * lex.c (do_scoped_id): convert_from_reference.
158 * init.c (build_offset_ref): Likewise.
159
160Wed Jul 16 15:57:42 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
161
162 * parse.y (empty_parms): Only use VOID_LIST_NODE for the PARMS if
163 we're in a C++ struct/class, not if we're doing `extern "C"'.
164
165Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
166
167 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
168
169Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
170
171 * typeck.c (get_member_function_from_ptrfunc): Promote index
172 before saving it.
173
174Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
175
176 * tree.c (layout_basetypes): Move non-virtual destructor warning.
177 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
178
179Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
180
181 * decl.c (grokdeclarator): Call add_defarg_fn for the function
182 type, too.
183 * lex.c (add_defarg_fn): Adjust.
184 (do_pending_defargs): Adjust. Don't skip the first parm.
185
186Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
187
188 * decl.c (build_enumerator): Global enumerators are also readonly.
189
190 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
191 (build_dynamic_cast): Call it and convert_from_reference.
192
193 * lex.c (add_defarg_fn): New fn.
194 (snarf_defarg): Don't add to defarg_types.
195 (do_pending_defargs): Lose defarg_types. All fns we process now
196 have defargs.
197 * decl.c (grokfndecl): Call add_defarg_fn.
198
199 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
200 * cp-tree.def: Add DEFAULT_ARG.
201 * spew.c (yylex): Call snarf_defarg as appropriate.
202 * parse.y: New tokens DEFARG and DEFARG_MARKER.
203 (defarg_again, pending_defargs, defarg, defarg1): New rules.
204 (structsp): Use pending_defargs.
205 (parms, full_parm): Use defarg.
206 * lex.c (init_lex): Initialize inline_text_firstobj.
207 (do_pending_inlines): Never pass the obstack to feed_input.
208 (process_next_inline): Call end_input instead of restore_pending_input.
209 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
210 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
211 * input.c (end_input): New fn.
212 (sub_getch): At the end of some fed input, just keep returning EOF
213 until someone calls end_input.
214 Remove 'obstack' field from struct input_source.
215 * decl.c (grokparms): Handle DEFAULT_ARG.
216 (replace_defarg): New fn.
217 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
218
219Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
220
221 * call.c (implicit_conversion): If nothing else works, try binding
222 an rvalue to a reference.
223
224Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
225
226 * decl.c (init_decl_processing): fix Jun 30 patch -- move
227 ifndef for Cygwin32 to include SIGSEGV.
228
7834ab39
MS
229Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
230
231 * class.c (finish_struct_1): Only complain about pointers without
232 copy stuff if there are any constructors.
233
234 * rtti.c (build_dynamic_cast): Call complete_type on the types.
235
236 * decl.c (grokfndecl): If the function we chose doesn't actually
237 match, die.
238
239 * decl2.c (grokclassfn): Don't specify 'const int' for the
240 artificial destructor parm.
241
242 * pt.c (type_unification): If we are called recursively, nothing
243 decays.
244
245Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
246
42976354
BK
247 * decl.c (init_decl_processing): Stop trying to catch signals
248 other than SIGABRT since the Cygwin32 library doesn't support
249 them correctly yet. This fixes a situation in which g++ causes
250 a hang on SIGSEGVs and other such signals in our Win32-hosted
251 tools.
7834ab39
MS
252
253Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
254
255 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
256
257Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
258
259 * typeck2.c (store_init_value): Always return the value if our
260 type needs constructing.
261
262 * method.c (hack_identifier): Convert class statics from
263 reference, too.
264
265Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
266
267 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
268
b88c08b6
MS
269Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
270
271 * typeck.c (c_expand_return): Make sure we clean up temporaries at
272 the end of return x;
273
274Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
275
276 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
277
6633d636
MS
278Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
279
280 * except.c (expand_builtin_throw): Add support
281 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
282
283Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
284
285 * repo.c (extract_string): Null-terminate.
286
287 * cp-tree.h (TI_SPEC_INFO): New macro.
288 (CLASSTYPE_TI_SPEC_INFO): New macro.
289 * pt.c (push_template_decl): Correctly determine # of template parms
290 for partial specs.
291
292 * call.c (compare_ics): Really fix 'this' conversions.
293
294 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
295 non-template fn.
296
297 * pt.c (push_template_decl): Complain about mismatch in # of
298 template parms between a class template and a member template.
299
300Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
301
302 * method.c (synthesize_method): You can't call
303 function_cannot_inline_p after finish_function.
304 * decl.c (finish_function): Turn on flag_inline_functions and turn
305 off DECL_INLINE before handing a synthesized method to the
306 backend.
307
308Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
309
310 * method.c (synthesize_method): Remove July 30 change to never set
311 DECL_INLINE if at_eof.
312
313Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
314
315 * xref.c (GNU_xref_member): Ensure that the node has a
316 decl_lang_specific part before checking DECL_FRIEND_P.
317
318Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
319
320 * pt.c (instantiate_class_template): Diagnose non-class types used
321 as bases.
322
323Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
324
325 * typeck.c (build_conditional_expr): Use convert_for_initialization
326 instead of convert_and_check.
327
328Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
329
330 * parse.y (typespec): Don't pedwarn for typeof.
331
332Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
333
334 * repo.c (finish_repo): Only check changes if we would write a
335 repo file.
336
337 * call.c (compare_ics): Fix handling of 'this' conversions.
338
339 * pt.c (do_decl_instantiation): Support static data too. Rename
340 from do_function_instantiation.
341 * cp-tree.h: Adjust.
342 * parse.y: Adjust.
343
344 * repo.c (extract_string): New fn.
345 (get_base_filename): Use it.
346 (init_repo): Compare old args with current args.
347
348Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
349
350 * Makefile.in, Make-lang.in: Protect C-ls with a comment
351 character, idea from Paul Eggert <eggert@twinsun.com>.
352
353Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
354
355 * typeck.c (c_expand_return): Be more persistent in looking for
356 returned temps.
357
358 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
359 pointer to reference.
360
361 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
362
363Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
364
365 * init.c (build_member_call, build_offset_ref):
366 Use do_scoped_id instead of do_identifier.
367
368 * cvt.c (convert): Remove bogosity.
369
370Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
371
372 * cvt.c (build_up_reference): Do checks of ARGTYPE and
373 TARGET_TYPE before trying to use get_binfo.
374
375Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
376
377 * cvt.c (build_up_reference): Call get_binfo to get access control.
378
379 * decl2.c (import_export_decl): If we don't support weaks, leave
380 statics undefined.
381
382Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
383
384 * except.c (expand_builtin_throw): Add support for machines that
385 cannot access globals after throw's epilogue when
386 -fno-sjlj-exceptions is used.
387
388Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
389
390 * parse.y: 'std::' becomes '::'.
391 * lex.c (real_yylex): Remove 'namespace' warning.
392 * init.c (build_member_call): Ignore 'std::'.
393 (build_offset_ref): Likewise.
394 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
395 (do_toplevel_using_decl): Ignore 'using std::whatever'.
396 * decl.c (push_namespace): Just sorry.
397 (pop_namespace): Nop.
398 (init_decl_processing): Declare std namespace.
399
013bc8af
MS
400Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
401
402 * search.c (push_class_decls): A name which ambiguously refers to
403 several instantiations of the same template just refers to the
404 template.
405
406Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
407
408 * decl.c (build_enumerator): fix problem with unsigned long
409 enumerated values being smashed to ints, causing overflow
410 when computing next enumerated value. (for enum values around
411 MAX_VAL).
412
413Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
414
415 * typeck.c (build_component_ref): Only call mark_used on a decl.
416
417Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
418
419 * typeck.c (build_c_cast): Make the check for a ptr to function
420 more specific before possible default_conversion call.
421
e00737d2
MS
422Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
423
424 * except.c (expand_exception_blocks): Simplify and fix and make
425 sure we don't end a region in a sequence, as expand_end_bindings
426 doesn't like it.
427
428Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
429
430 * except.c (init_exception_processing): Mark terminate as not
431 returning so that the optimizer can optimize better.
432
37c46b43
MS
433Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
434
435 * cvt.c (convert): Don't do any extra work, if we can avoid it
436 easily.
437
438Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
439
440 * *.[chy]: Change cp_convert to ocp_convert, change convert to
441 cp_convert. convert is now reserved for the backend, and doesn't
442 have the semantics a frontend person should ever want.
443
444Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
445
446 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
447 Lose -traditional support.
448
449Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
450
451 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
452
453 * parse.y (self_reference): Do it for templates, too.
454 * class.c (pushclass): Don't overload_template_name; the alias
455 generated by build_self_reference serves the same purpose.
456
457 * tree.c (list_hash): Make static, take more args.
458 (list_hash_lookup): Likewise.
459 (list_hash_add): Make static.
460 (list_hash_canon): Lose.
461 (hash_tree_cons): Only build a new node if one isn't already in the
462 hashtable.
463 (hash_tree_chain): Use hash_tree_cons.
464 * cp-tree.h: Adjust.
465 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
466 of calling lookup_name.
467
468Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
469
470 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
471 doesn't refer to the CONST_DECLs.
472
473Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
474
475 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
476 is bigger.
477 (expand_class_desc): Convert the last argument to a sizetype.
478
479Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
480
481 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
482 __real__): Add reswords.
483 * hash.h: Regenerate.
484 * lex.h (rid): Add RID_COMPLEX.
485 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
486 * lex.c (init_lex): Add building of RID_COMPLEX. Unset reserved
487 word "complex" if -fno-gnu-keywords.
488 (real_yylex): General cleanup in line with what c-lex.c also has,
489 sans the cruft for traditional; add handling of SPEC_IMAG, complex
490 types, and imaginary numeric constants.
491 * parse.y (REALPART, IMAGPART): Add tokens.
492 (unary_expr): Add REALPART and IMAGPART rules.
493 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
494 * decl.c (complex_{integer,float,double,long}_type_node): Define
495 types.
496 (init_decl_processing): Set up the types.
497 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
498 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
499 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
500 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
501 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
502 COMPLEX_TYPE case.
503 * method.c (build_overload_name): Add handling of the different
504 COMPLEX_TYPEs, prefixing them with `J'.
505 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
506 as a template parm.
507 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
508 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
509 (mapcar): Handle COMPLEX_CST.
510 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
511 (common_type): Add code for complex types.
512 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
513 (convert_for_assignment): Likewise.
514 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
515
516Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
517
518 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
519 tsubst_expr, as it might try to do overload resolution.
520
b87692e5
MS
521Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
522
523 * pt.c (instantiate_class_template): Oops.
524
525Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
526
527 * cp-tree.def: Add TAG_DEFN.
528 * pt.c (tsubst_enum): New fn.
529 (instantiate_class_template): Use it.
530 (tsubst_expr): Support TAG_DEFN.
531 (tsubst): Support local enums.
532 (tsubst_copy): Likewise.
533 * decl.c (finish_enum): Likewise.
534 (start_enum): If this is a local enum, switch to permanent_obstack.
535
536Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
537
538 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
539 (finish_function): Put the base init code for constructors just
540 after the parm cleanup insns.
541 (struct cp_function): Add last_parm_cleanup_insn.
542 (push_cp_function_context): Likewise.
543 (pop_cp_function_context): Likewise.
544
545Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
546
547 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
548
549Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
550
551 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
552 for THUNK_FNDECL before we switch to temporary allocation.
553
beb53fb8
JM
554Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
555
556 * call.c (build_new_op): Handle null arg2 for ?:.
557
eb448459
MS
558Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
559
560 * except.c (expand_exception_blocks): Ensure that we flow through
37c46b43
MS
561 the end of the exception region for the exception specification.
562 Move exception region for the exception specification in, so that
563 it doesn't protect the parm cleanup. Remove some obsolete code.
564 * decl.c (store_parm_decls): Likewise.
eb448459
MS
565 (finish_function): Likewise.
566
567Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
568
569 * init.c (build_new): Fix nothrow handling.
570
571Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
572
573 * init.c (emit_base_init): Don't warn about the initialization
574 list for an artificial member.
575
576Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
577
578 * expr.c (do_case): Handle !START case for the error msg.
579
580Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
581
582 * decl2.c, lang-options.h: New option -Weffc++.
583 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
584 to -Weffc++.
585
586 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
37c46b43 587 to MULTIPLE_SYMBOL_SPACES.
eb448459
MS
588
589Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
590
591 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
592
593 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
594
595 * typeck.c (c_expand_return): Don't complain about returning void
596 to void in an artificial function.
597 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
598 don't set DECL_RESULT, set DECL_ARTIFICIAL.
599 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
600
eb66be0e
MS
601Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
602
603 * init.c (init_decl_processing): Add supoprt for setjmp/longjmp based
604 exception handling.
605 * except.c (init_exception_processing): Likewise.
606 (expand_end_catch_block): Likewise.
607 (expand_exception_blocks): Likewise.
608 (expand_throw): Likewise.
609 * exception.cc (__default_terminate): Likewise.
610
611 * init.c (perform_member_init): Use new method of expr level
37c46b43 612 cleanups, instead of cleanups_this_call and friends.
eb66be0e
MS
613 (emit_base_init): Likewise.
614 (expand_aggr_vbase_init_1): Likewise.
615 (expand_vec_init): Likewise.
616 * decl.c (cp_finish_decl): Likewise.
617 (expand_static_init): Likewise.
618 (store_parm_decls): Likewise.
619 (cplus_expand_expr_stmt): Likewise.
620 * decl2.c (finish_file): Likewise.
621
622 * Make-lang.in (exception.o): Ok to compile with -O now.
623
624 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
625 we know it will be done later by the backend.
626
627 * decl2.c (lang_f_options): Remove support for short temps.
628 * lang-options.h: Likewise.
629
630Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
631
632 * tree.c (varargs_function_p): New fn.
633 * method.c (emit_thunk): Replace broken generic code with code to
37c46b43 634 generate a heavyweight thunk function.
eb66be0e
MS
635
636Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
637
638 * pt.c (process_template_parm): pedwarn about floating-point parms.
639
640 * decl.c (grokdeclarator): inline no longer implies static.
641
642 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
643
644Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
645
646 * class.c (check_for_override): The signature of an overriding
37c46b43 647 function is not changed.
eb66be0e
MS
648
649 * call.c (build_over_call): Move setting of conv into the loop.
da20811c
JM
650 Note: this change, along with the related changes of the 18th thru
651 the 20th of April, fix an infinite loop problem in conversions.
eb66be0e
MS
652
653Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
654
655 * call.c (build_user_type_conversion_1): Really ignore rvalue
37c46b43 656 conversions when looking for a REFERENCE_TYPE.
eb66be0e
MS
657
658 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
659 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
660 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
661 (build_unary_op): Likewise.
662 * call.c (build_over_call): See through a CONVERT_EXPR around the
37c46b43 663 ADDR_EXPR for on a temporary.
eb66be0e 664 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
37c46b43 665 the ADDR_EXPR for a local variable.
eb66be0e
MS
666
667Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
668
669 * call.c (build_user_type_conversion_1): If we're trying to
37c46b43 670 convert to a REFERENCE_TYPE, only consider lvalue conversions.
eb66be0e
MS
671 (build_new_function_call): Print candidates.
672 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
673 (reference_binding): Binding a temporary of a reference-related type
674 is BAD.
675
676Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
677
678 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
679 * tinfo2.cc (type_info::before): Likewise.
680
681Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
682
683 * call.c (implicit_conversion): Oops.
684
685Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
686
687 * call.c (implicit_conversion): Try to find a reference conversion
37c46b43 688 before binding a const reference to a temporary.
eb66be0e
MS
689
690Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
691
692 * exception.cc (__default_unexpected): Call terminate by default,
693 so that if the user overrides terminate, the correct function will
694 be called.
695
bd6dd845
MS
696Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
697
698 * parse.y (left_curly): Avoid trying to use any fields of
eb66be0e 699 error_mark_node, as there aren't any.
bd6dd845
MS
700
701Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
702
703 * lex.c (do_identifier): Avoid breaking on overloaded methods
704 as default arguments.
705
706Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
707
eb66be0e 708 * call.c (add_template_candidate): Initialize the variable "dummy".
bd6dd845
MS
709
710Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
711
712 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
713 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
714
715Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
716
717 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
718 (debug_binfo): Delete decl, not needed.
719
720 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
721 promotes_to_aggr_type): Delete fns.
722 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
723 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
724 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
725
726 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
727
728 * friend.c (is_friend_type): Delete fn.
729 * cp-tree.h (is_friend_type): Delete decl.
730
731 * decl.c (original_result_rtx, double_ftype_double,
732 double_ftype_double_double, int_ftype_int, long_ftype_long,
733 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
734 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
735
736 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
737 fwd decls.
738 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
739
740 * decl.c (pushdecl_nonclass_level): #if 0, unused.
741 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
742
743 * lex.c (reinit_lang_specific): #if 0, unused.
744 * cp-tree.h (reinit_lang_specific): #if 0 decl.
745
746 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
747 * cp-tree.h (revert_static_member_fn): Delete decl.
748
749 * class.c (root_lang_context_p): Delete fn.
750 * cp-tree.h (root_lang_context_p): Delete decl.
751
752 * decl.c (set_current_level_tags_transparency): #if 0, unused.
753 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
754
755 * lex.c (set_vardecl_interface_info): Make static.
756 * cp-tree.h (set_vardecl_interface_info): Delete decl.
757
758 * call.c (find_scoped_type): Make static.
759 * cp-tree.h (find_scoped_type): Delete decl.
760
761 * search.c (convert_pointer_to_vbase): Make static.
762 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
763
764 * decl.c (const_ptr_type_node): Likewise.
765 * cp-tree.h (const_ptr_type_node): Delete decl.
766
767 * typeck.c (common_base_type): Make static.
768 * cp-tree.h (common_base_types): Delete erroneous decl.
769
770 * pt.c (classtype_mangled_name): Make static.
771 * cp-tree.h (classtype_mangled_name): Delete decl.
772
773 * lex.c (check_newline): Make static.
774 * cp-tree.h (check_newline): Delete decl.
775
776 * typeck.c (build_x_array_ref): Delete fn, same idea as
777 grok_array_decl.
778 * cp-tree.h (build_x_array_ref): Delete decl.
779
780 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
781 copy_lang_decl.
782 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
783
784 * class.c (build_vtable_entry): Make static.
785 * cp-tree.h (build_vtable_entry): Delete decl.
786
787 * class.c (build_vbase_pointer): Make static.
788 * cp-tree.h (build_vbase_pointer): Delete decl.
789
790 * sig.c (build_sptr_ref): Add forward decl and make static.
791 * cp-tree.h (build_sptr_ref): Delete decl.
792
793 * call.c (build_new_method_call): Add forward decl and make static.
794 * cp-tree.h (build_new_method_call): Delete decl.
795
796 * call.c (build_object_call): Make static.
797 * class.c (check_for_override, complete_type_p, mark_overriders):
798 Likewise.
799 * decl.c (cp_function_chain): Likewise.
800 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
801 Likewise.
802 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
803 Likewise.
804 * tree.c (build_cplus_array_type_1): Likewise.
805 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
806 (comp_target_parms): Likewise.
807
808 * init.c (build_builtin_call): Make static.
809 * cp-tree.h (build_builtin_call): Delete decl.
810
811 * typeck.c (binary_op_error): Delete decl.
812 * cp-tree.h (binary_op_error): Likewise.
813
814Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
815
816 * call.c (build_method_call): Compare against error_mark_node
817 directly, rather than the ERROR_MARK tree code.
818 * cvt.c (cp_convert): Likewise.
819 * decl.c (print_binding_level): Likewise.
820 (duplicate_decls): Likewise.
821 (grokdeclarator): Likewise.
822 (grokdeclarator): Likewise.
823 * init.c (expand_aggr_init_1): Likewise.
824 (decl_constant_value): Likewise.
825 * method.c (build_opfncall): Likewise.
826 (hack_identifier): Likewise.
827 * typeck.c (build_modify_expr): Likewise.
828
829 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
830
831Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
832
833 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
834
835 * pt.c (coerce_template_parms): Add new error message.
836
837 * method.c (build_overload_value): Implement name mangling for
838 floating-point template arguments.
839
840 * method.c (build_overload_int, icat, dicat): Fix mangling of template
841 arguments whose absolute value doesn't fit in a signed word.
842
843Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
844
845 * friend.c: New file; put all of the friend stuff in here.
846 * init.c: Instead of here.
847 * Makefile.in (CXX_OBJS): Add friend.o.
848 (friend.o): Add dependencies.
849 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
850
851Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
852
853 * call.c (build_scoped_method_call): Complain if the scope isn't a
eb66be0e 854 base.
bd6dd845
MS
855
856Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
857
858 * parse.y (left_curly): Don't crash on erroneous type.
859
860 * init.c (build_delete): Fix type of ref.
861
862Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
863
864 * search.c (get_vbase_1): Renamed from get_vbase.
865 (get_vbase): Wrapper, now non-static.
866 (convert_pointer_to_vbase): Now static.
867
868 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
869 * init.c (build_delete): Pass one.
870 (build_partial_cleanup_for): Use build_scoped_method_call.
871 * decl.c (finish_function): Pass a binfo.
872
873Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
874
875 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
876
877 * typeck.c (build_c_cast): Lose other reference to flag.
878
879 * call.c (build_field_call): Don't look for [cd]tor_identifier.
880 * decl2.c (delete_sanity): Remove meaningless use of
eb66be0e 881 LOOKUP_HAS_IN_CHARGE.
bd6dd845 882 * decl.c (finish_function): Use build_scoped_method_call instead
eb66be0e 883 of build_delete for running vbase dtors.
bd6dd845 884 * init.c (build_delete): Call overload resolution code instead of
eb66be0e 885 duplicating it badly.
bd6dd845 886
2ba25f50
MS
887Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
888
889 * call.c (build_over_call): Call mark_used before trying to elide
890 the call.
891
892 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
893
894Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
895
896 * typeck.c (build_modify_expr): Always pedwarn for a cast to
897 non-reference used as an lvalue.
898
899Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
900
901 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
902
903Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
904
905 * parse.y (handler): Fix template typo.
906
907Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
908
909 * error.c (lang_decl_name): New fn.
910 * tree.c (lang_printable_name): Use it.
911
912Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
913
914 * g++spec.c: Include config.h so that we can catch bzero #defines
915 from the config file.
916
e9f32eb5
MS
917Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
918
919 * new1.cc: Include a declaration for malloc, to avoid warning, and
eb66be0e
MS
920 avoid lossing on systems that require one (ones that define malloc
921 in xm.h).
e9f32eb5
MS
922
923Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
924
925 * decl2.c (max_tinst_depth): New variable.
926 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
927 option.
928 * pt.c (max_tinst_depth): Variable moved.
929 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
930 as legal.
931
932Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
933
934 * decl.c (xref_basetypes): Allow a base class that depends on
eb66be0e 935 template parms to be incomplete.
e9f32eb5
MS
936
937 * decl2.c (build_expr_from_tree): Support typeid(type).
938 * rtti.c (get_typeid): Support templates.
939 (expand_si_desc, expand_class_desc): Fix string length.
940 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
941
312e7d50
JM
942Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
943
944 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
945
946 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
947
948Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
949
950 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
eb66be0e
MS
951 smashes together template and non-template decls of the same
952 signature.
312e7d50 953
824b9a4c
MS
954Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
955
824b9a4c
MS
956 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
957
958Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
959
960 * decl.c (duplicate_decls): Next route, pedwarn about different
961 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
962
963Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
964
965 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
966 (struct lang_type): Delete has_default_implementation member.
967 Increase dummy to 21.
968 * decl.c (start_method): Delete usage.
969
970 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
971 store_after_parms, start_decl_1, auto_function): Add decls.
972 (get_arglist_len_in_bytes, declare_implicit_exception,
973 have_exceptions_p, make_type_decl, typedecl_for_tag,
974 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
975 build_component_type_expr, cplus_exception_name,
976 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
977 * call.c (build_this): Make static.
978 (is_complete): Likewise.
979 (implicit_conversion): Likewise.
980 (reference_binding): Likewise.
981 (standard_conversion): Likewise.
982 (strip_top_quals): Likewise.
983 (non_reference): Likewise.
984 (build_conv): Likewise.
985 (user_harshness): Likewise.
986 (rank_for_ideal): Likewise.
987 * decl.c (start_decl_1): Delete forward decl.
988 (push_decl_level): Make static.
989 (resume_binding_level): Make static.
990 (namespace_bindings_p): Make static.
991 (declare_namespace_level): Make static.
992 (lookup_name_real): Make static.
993 (duplicate_decls): Make static. Take register off NEWDECL and
994 OLDDECL parm decls.
995 * decl2.c (get_sentry): Make static.
996 (temp_name_p): Delete fn.
997 * except.c (auto_function): Delete decl.
998 * lex.c (handle_{cp,sysv}_pragma): Make static.
999 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
1000 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
1001 * pt.c (tsubst_expr_values): Make static.
1002 * rtti.c (combine_strings): Delete decl.
1003
1004Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
1005
1006 * pt.c (push_template_decl): Handle getting a typedef.
1007
1008 * call.c (build_new_function_call): Complain about void arg.
1009
1010Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
1011
1012 * decl.c (duplicate_decls): Give pedwarn of different exceptions
1013 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
1014
1015Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
1016
1017 * except.c (expand_throw): Don't expand the cleanup tree here,
eb66be0e
MS
1018 since we are not going to write the rtl out. Fixes problem with
1019 -g -O on SPARC.
824b9a4c
MS
1020
1021Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
1022
1023 * Make-lang.in: Add $(exeext) as necessary.
1024
1025Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
1026
1027 * parse.y (handler_seq): Must have at least one catch clause.
1028
1029Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
1030
1031 * call.c (add_builtin_candidate): Restore ?: hack.
1032
1033 * decl.c (grok_op_properties): More warnings.
1034
1035Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
1036
1037 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
1038 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
1039
1040 * decl.c (duplicate_decls): Scale back to a warning, and only do
1041 'em if -pedantic.
1042
1043Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
1044
1045 * decl.c (duplicate_decls): pedwarn mismatched exception
eb66be0e 1046 specifications.
824b9a4c
MS
1047
1048Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
1049
1050 * call.c (build_new_method_call): Don't display the invisible
eb66be0e 1051 argument for controlling virtual bases.
824b9a4c
MS
1052
1053Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
1054
1055 * new: Add nothrow new and delete, bad_alloc and throw specifications
1056 for delete.
1057 * decl.c (init_decl_processing): Add throw specification for delete.
1058 * new.cc (nothrow): Define.
1059 * lex.c (real_yylex): Removing warning that throw and friends are
1060 keywords.
1061 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
1062 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
1063 * Make-lang.in: Add new{1,2}.{cc,o}.
1064
1065Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
1066
1067 * lex.c (cons_up_default_function): Fix return type of synth op=.
1068
1069 * init.c (emit_base_init): Add warnings for uninitialized members
eb66be0e 1070 and bases.
824b9a4c
MS
1071
1072 * decl.c (xref_basetypes): Add warning for non-polymorphic type
eb66be0e 1073 with destructor used as base type.
824b9a4c
MS
1074
1075 * decl.c (grok_op_properties): Add warning for op= returning void.
1076 * typeck.c (c_expand_return): Add warning for op= returning anything
1077 other than *this.
1078
1079 * class.c (finish_struct_1): Add warning for class with pointers
eb66be0e 1080 but not copy ctor or copy op=.
824b9a4c
MS
1081
1082 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
1083 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
1084 (instantiate_template): If -fexternal-templates, add this
eb66be0e 1085 instantiation to pending_templates.
824b9a4c
MS
1086
1087 * decl2.c (copy_assignment_arg_p): Disable old hack to support
eb66be0e 1088 Booch components.
824b9a4c
MS
1089
1090Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
1091
1092 * cvt.c (cp_convert): Pedwarn enum to pointer conversions.
1093
de22184b
MS
1094Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
1095
1096 * call.c (standard_conversion): Handle getting references. Tack
eb66be0e 1097 on RVALUE_CONV here. Do it for non-class types, too.
de22184b
MS
1098 (reference_binding): Pass references to standard_conversion.
1099 (implicit_conversion): Likewise.
1100 (add_builtin_candidate): Disable one ?: kludge.
1101 (convert_like): Handle RVALUE_CONVs for non-class types.
1102 (joust): Disable the other ?: kludge.
1103
1104Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
1105
1106 * decl.c (init_decl_processing): Add code to build up common
1107 function types beforehand, to avoid creation then removal of
1108 things already in the hash table.
1109
1110Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
1111
1112 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
eb66be0e 1113 the arguments.
de22184b
MS
1114
1115 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
eb66be0e 1116 current_template_parms.
de22184b
MS
1117
1118Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
1119
1120 * search.c (lookup_field): Don't return a function, check want_type.
1121
1122Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
1123
1124 * init.c (build_new): Make sure PLACEMENT has a type.
1125
1126Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
1127
1128 * init.c (build_new): Support new (nothrow).
1129
1130Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
1131
1132 * pt.c (instantiate_decl): Also do push_to_top_level before setting
1133 up DECL_INITIAL.
1134
1135 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
1136 * pt.c (tsubst): Defer instantiation of default args.
1137 * call.c (build_over_call): Until here.
1138
1139Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
1140
1141 * search.c (lookup_field): Make sure we have an
1142 IDENTIFIER_CLASS_VALUE before we try to return it.
1143
1144Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
1145
1146 * call.c (build_method_call): Delete unused var PARM.
1147 (build_overload_call_real): Likewise.
1148 (build_object_call): Delete unused var P.
1149 (build_new_op): Likewise.
1150 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
1151 var definitions, which are never used.
1152 (shadow_tag): Delete unused var FN.
1153 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
1154 * init.c (build_new): Delete unused var ALLOC_TEMP.
1155 * method.c (hack_identifier): Delete unused var CONTEXT.
1156 (do_build_copy_constructor): Delete unused var NAME.
1157 (synthesize_method): Delete unused var BASE.
1158 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
1159 * rtti.c (build_headof): Delete unused var VPTR.
1160 (get_typeid): Delete unused var T.
1161 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
1162 and ORIG_OP2.
1163 (build_ptrmemfunc): Delete unused vars U and NINDEX.
1164 * typeck2.c (build_functional_cast): Delete unused var BINFO.
1165
1166Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
1167
1168 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
1169 things in a type being defined.
1170 * decl.c (finish_enum): Reverse the values so that they are in
1171 the correct order.
1172
1173 * pt.c (instantiate_class_template): Don't initialize
eb66be0e 1174 BINFO_BASETYPES until the vector is filled out.
de22184b
MS
1175 (unify): Don't abort on conflicting bindings, just fail.
1176 (instantiate_decl): Do push_tinst_level before any tsubsting.
1177
1178 * method.c (build_overload_value): Handle getting a
eb66be0e 1179 TEMPLATE_CONST_PARM for a pointer.
de22184b
MS
1180
1181Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
1182
1183 * init.c (expand_member_init): Don't give 'not a base' error for
eb66be0e 1184 templates.
de22184b
MS
1185
1186 * pt.c (instantiate_decl): Call import_export_decl later.
1187
1188 * pt.c (instantiate_class_template): Return a value.
1189
1190 * parse.y (extension): New rule for __extension__.
1191 (extdef, unary_expr, decl, component_decl): Use it.
1192
1193Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
1194
1195 * class.c (base_binfo): Remove unused base_has_virtual member.
1196 (finish_base_struct): Likewise.
1197 (finish_struct_1): Likewise.
1198
1199Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
1200
1201 * search.c (expand_upcast_fixups): Fix bogus code generation
1202 problem where the generated code uses the wrong index into the
1203 runtime built vtable on the stack. Old code could clobber random
1204 stack values.
1205
1206Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
1207
1208 * init.c (perform_member_init): Make sure the partial EH cleanups
eb66be0e 1209 live on the function_obstack.
de22184b 1210
f7da6097
MS
1211Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
1212
1213 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
1214 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
1215
1216Tue Dec 24 10:24:03 1996 Jeffrey A Law (law@cygnus.com)
1217
1218 * decl.c (grokvardecl): Avoid ANSI style initialization.
1219
1220Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
1221
1222 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
1223
1224Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
1225
1226 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
1227
1bf2b2d2
BK
1228Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1229
1230 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
1231 arguments we compare against. Start the count of I at 1, not 0,
1232 since argv[0] is still the command.
1233
f7da6097
MS
1234Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
1235
1236 * lang-specs.h: Accept .cp as an C++ extension.
1237
d2e5ee5c
MS
1238Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1239
1240 * cp-tree.h (ptr_reasonably_similar): Add decl.
1241
1242Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1243
1244 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
1245 pointer. New local SPECBITS with the parm's value.
1246 (grokdeclarator): Pass &specbits down.
1247
1248 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
1249 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
1250
1251 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
1252 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
1253
1254 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
1255 not an error_mark_node.
1256
1257Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
1258
1259 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
1260 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
1261
1262Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
1263
1264 * decl.c (grokdeclarator): When giving an anonymous struct a name,
1265 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
1266 not affected).
1267
1268 * typeck2.c (build_m_component_ref): If component is a pointer
1269 to data member, resolve the OFFSET_REF now.
1270
1271 * call.c (convert_like): Don't go into infinite recursion.
1272
1273 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
1274
1275 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
1276 * tree.c (layout_basetypes): And on the vbase ptr.
1277
1278Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
1279
1280 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
1281 CHAR_TYPE_SIZE so bool is always the same size as another type.
1282
1283 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
1284
1285Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
1286
1287 * decl2.c (grok_x_components): Remove synthesized methods from
eb66be0e
MS
1288 TYPE_METHODS of an anonymous union, complain about member
1289 functions.
d2e5ee5c
MS
1290 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
1291 anonymous unions.
1292 (finish_function): Just clear the DECL_RTL of our arguments.
1293
1294Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
1295
1296 * decl2.c (finish_file): Emit DWARF debugging info for static data
1297 members.
1298
1299 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
1300
1301Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
1302
1303 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
eb66be0e 1304 IDENTIFIER_NODE.
d2e5ee5c
MS
1305
1306Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1307
1308 * Make-lang.in (g++-cross$(exeext)): Fix typo.
1309
1310Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1311
1312 Make the g++ driver now be a standalone program, rather than one
1313 that tries to run the gcc driver after munging up the options.
1314 * Make-lang.in (g++.c, g++spec.o): New rules.
1315 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
1316 added.
1317 (g++$(exeext)): New rule, based on xgcc rule.
1318 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
1319 * g++spec.c: New file.
1320 * g++.c: Removed file.
1321
1322Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
1323
1324 * cvt.c (build_up_reference): Arrange for any temporary values
1325 that have been keep in registers until now to be put into memory.
1326
faf5394a 1327Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9a3b49ac 1328
faf5394a
MS
1329 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
1330 that make -j3 bootstrap works better.
9a3b49ac 1331
faf5394a
MS
1332Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
1333
1334 * decl.c (pushtag): Do pushdecl for anon tags.
1335
1336Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
1337
1338 * typeck.c (c_expand_return): Fix logic.
1339 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
1340
faf5394a
MS
1341Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
1342
1343 * g++.c (main): Make sure arglist has a final NULL entry. Add
eb66be0e
MS
1344 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
1345 stdin/stdout of the invoked program are redirected to
1346 nowheresville.
faf5394a
MS
1347
1348Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
1349
1350 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
1351
1352Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
1353
1354 * init.c (resolve_offset_ref): Handle obj.vfn better.
1355 * typeck.c (build_component_ref): Set TREE_TYPE on result from
1356 build_vfn_ref.
1357
1358Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
1359
1360 * typeck.c (convert_for_assignment): Also handle anachronistic
1361 implicit conversions from (::*)() to cv void*.
1362 * cvt.c (cp_convert_to_pointer): Likewise.
1363
1364Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
1365
1366 * lex.c (handle_cp_pragma): Fix bogus warning.
1367
1368Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
1369
1370 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
eb66be0e 1371 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
faf5394a
MS
1372
1373Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
1374
1375 * class.c (finish_struct_1): Support DWARF2_DEBUG.
1376 * search.c (dfs_debug_mark): Likewise.
1377 * decl2.c (finish_vtable_vardecl): Likewise.
1378 * decl.c (pushtag, finish_enum): Likewise.
1379 * lex.c (check_newline): Use debug_* instead of calling *out
eb66be0e 1380 functions directly.
faf5394a
MS
1381
1382Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1383
1384 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
1385 on some picky hosts.
1386
1387Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
1388
1389 * class.c (finish_struct_1): A class has a non-trivial copy
eb66be0e 1390 constructor if it has virtual functions.
faf5394a
MS
1391
1392 * cvt.c (cp_convert): Always call a constructor.
1393
1394 * call.c (reference_binding): Still tack on a REF_BIND
eb66be0e 1395 for bad conversions.
faf5394a
MS
1396 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
1397
1398 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
1399 (c_expand_return): Likewise.
1400 * typeck2.c (digest_init): Likewise for { }.
1401 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
1402 * cvt.c (cp_convert): Handle failure better.
1403
1404Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1405
1406 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
1407 of GCC be path-relative.
1408
1409Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1410
1411 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
1412 it does need choose-temp.o and pexecute.o.
1413
1414Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1415
1416 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
1417 that we still use it.
1418 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
1419
1420Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
1421
1422 * init.c (expand_default_init): Avoid calling constructors to
1423 initialize reference temps.
1424
1425 * cvt.c (convert_to_reference): Fix.
1426
1427Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
1428
1429 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
1430 (convert_to_reference): Likewise.
1431 * typeck.c (convert_for_initialization): Likewise.
1432 * init.c (expand_default_init): Likewise.
1433 (expand_aggr_init_1): Likewise.
1434 * cp-tree.h (CONV_NONCONVERTING): Lose.
1435 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
1436 * *.c: Adjust.
1437 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
1438
1439Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
1440
1441 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
1442
1443Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
1444
1445 * init.c (expand_aggr_init_1): Don't crash on non-constructor
1446 TARGET_EXPR.
1447
1448Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1449
1450 * g++.c: Include gansidecl.h.
1451 (VPROTO, PVPROTO, VA_START): Delete.
1452 (choose_temp_base_try, choose_temp_base, perror_exec,
1453 run_dos) [__MSDOS__]: Delete fns.
1454 (pfatal_with_name): Delete fn.
1455 (temp_filename): Declare like in gcc.c.
1456 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
1457 (error_count, signal_count): Define.
1458 (error): Delete both definitions.
1459 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
1460 (pfatal_pexecute): Add fn from gcc.c.
1461 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
1462 code to use the pexecute stuff also used by gcc.c.
1463 (MIN_FATAL_STATUS): Define.
1464 * Make-lang.in (g++): Add dependency on and linking with
1465 choose-temp.o and pexecute.o.
1466
1467 * cp-tree.h: Include gansidecl.h.
1468 (STDIO_PROTO): Delete #undef/#define.
1469 * cvt.c (NULL): Delete #undef/#define.
1470 * expr.c (NULL): Likewise.
1471 * init.c (NULL): Likewise.
1472 * rtti.c (NULL): Likewise.
1473 * xref.c (NULL): Likewise.
1474
1475 * cp-tree.h (build_user_type_conversion): Add prototype.
1476 * call.c (build_user_type_conversion): Delete prototype. Correct
1477 decl of FLAGS arg to be an int.
1478 * cvt.c (build_user_type_conversion): Likewise.
1479
1480Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
1481
1482 * cp-tree.def: Add TRY_BLOCK and HANDLER.
1483 * except.c (expand_start_catch_block): Support templates.
1484 * parse.y (try_block, handler_seq): Likewise.
1485 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
9a3b49ac
MS
1486
1487Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
1488
1489 * pt.c (current_template_args): New fn.
1490 (push_template_decl): Use it.
1491 * decl.c (grokdeclarator): Use it.
1492
1493 * decl2.c (build_expr_from_tree): Dereference ref vars.
1494
1495 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
1496 the decl-specifier-seq.
1497
1498 * decl.c (grok_op_properties): Don't force the type of a conversion
1499 op to be complete. Don't warn about converting to the same type
1500 for template instantiations.
1501
1502 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
1503 methods.
1504
1505Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
1506
1507 * typeck.c (get_delta_difference): Remove previous bogusness.
1508 Don't give errors if force is set.
1509
1510Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
1511
1512 * decl2.c (finish_file): Don't emit debug info.
d2e5ee5c 1513 * decl.c (pushdecl): Lose obsolete code.
9a3b49ac 1514 (grokdeclarator): Still do the long long thing after complaining.
d2e5ee5c
MS
1515 * search.c (note_debug_info_needed): Don't do anything if we're in a
1516 template.
9a3b49ac 1517 * method.c (synthesize_method): For non-local classes,
eb66be0e 1518 push_to_top_level first.
9a3b49ac
MS
1519
1520Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
1521
1522 * typeck.c (get_delta_difference): Add no_error parameter.
1523 (build_ptrmemfunc): Call get_delta_difference with no_error set;
eb66be0e
MS
1524 we don't want error messages when converting unrelated
1525 pointer-to-member functions.
9a3b49ac
MS
1526
1527Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
1528
1529 * error.c (dump_expr): Improve the wording on error messages that
1530 involve pointer to member functions.
1531
1532Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
1533
1534 * cvt.c (cp_convert_to_pointer): Move code for conversions from
eb66be0e 1535 (::*)() to void* or (*)() up a bit, so that we can convert from
9a3b49ac
MS
1536 METHOD_TYPEs as well.
1537
1538Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
1539
1540 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
1541 There are no 'member' types.
1542 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
1543 (build_x_typeid): Handle errors.
1544
1545Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
1546
1547 * typeck.c (convert_for_assignment): Handle anachronistic implicit
1548 conversions from (::*)() to void* or (*)().
1549 * cvt.c (cp_convert_to_pointer): Likewise.
1550 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
1551 conversions from here.
1552 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
1553 * lang-options.h: Likewise.
1554 * decl2.c (warn_pmf2ptr): Define.
1555 * cp-tree.h: Declare it.
1556 * typeck2.c (digest_init): Allow pmfs down into
1557 convert_for_initialization.
1558
1559Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
1560
1561 * typeck.c (c_expand_return): Fix for returning overloaded fn.
1562
1563Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
1564
1565 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
1566 * decl.c (grok_reference_init): Pass DIRECT_BIND.
1567 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
eb66be0e 1568 DIRECT_BIND.
9a3b49ac
MS
1569 * call.c (convert_like): Don't pass INDIRECT_BIND.
1570 * typeck.c (convert_arguments): Likewise.
1571 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
1572
1573Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
1574
1575 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
eb66be0e 1576 similar code in build_up_ref.
9a3b49ac
MS
1577 * cvt.c (build_up_reference): Drastically simplify.
1578
691c003d
MS
1579Mon Oct 28 12:45:05 1996 Jeffrey A Law (law@cygnus.com)
1580
1581 * typeck.c (signed_or_unsigned_type): If the given type already
1582 as the correct signedness, then just return it.
1583
eb66be0e
MS
1584 * typeck.c ({un,}signed_type): If can't do anything, call
1585 signed_or_unsigned_type.
691c003d
MS
1586
1587Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
1588
1589 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
1590 current_class_type is NULL.
1591
1592Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
1593
1594 * class.c (finish_struct_1): Avoid empty structs by adding a field
eb66be0e 1595 so layout_type gets the mode right.
691c003d
MS
1596
1597 * typeck.c (c_expand_return): Drastically simplify.
1598
1599Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
1600
1601 * typeck.c (decay_conversion): Handle overloaded methods.
1602
1603Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
1604
1605 * call.c (build_over_call): A TARGET_EXPR has side-effects.
1606
f49422da
MS
1607Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
1608
1609 * cvt.c (convert_to_pointer_force): Add code to support pointer to
eb66be0e 1610 member function to pointer to function conversions.
f49422da 1611 * init.c (resolve_offset_ref): Add code to allow faked up objects,
eb66be0e
MS
1612 ignoring them if they are not used, and giving an error, if they
1613 are needed.
f49422da 1614 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
eb66be0e
MS
1615 code, and so that we can give an error, if we needed an object,
1616 and one was not provided.
f49422da 1617 (build_c_cast): Don't call default_conversion when we want to
eb66be0e 1618 convert to pointer to function from a METHOD_TYPE.
f49422da
MS
1619
1620Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
1621
1622 * Make-lang.in (cplib2.ready): Fix logic.
1623
1624 * decl.c (shadow_tag): Only complain about non-artificial function
eb66be0e 1625 members.
f49422da
MS
1626
1627 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
1628
1629Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
1630
1631 * expr.c (cplus_expand_expr): Pre-tweak call_target like
eb66be0e 1632 expand_inline_function would.
f49422da
MS
1633
1634 * pt.c (mark_decl_instantiated): If extern_p, call
eb66be0e 1635 mark_inline_for_output.
f49422da 1636
3d4683cb
MS
1637Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
1638
1639 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
1640 pmd conversions.
1641
1642 * typeck.c (get_delta_difference): Fix wording, as we can be used
1643 for pointer to data members.
1644
1645Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
1646
1647 * pt.c (tsubst): If the function decl isn't a member of this
eb66be0e
MS
1648 template, return a copy of the decl (including copying the
1649 lang-specific part) so we don't hose ourselves later.
3d4683cb
MS
1650
1651Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
1652
1653 * class.c (finish_struct): Remove DWARF-specific tag handling.
1654 * decl.c (pushtag): Likewise.
1655 (finish_function): Always clear DECL_ARGUMENTS on function decls with
1656 no saved RTX.
1657 * decl2.c (finish_file): Emit DWARF debugging info for static data
1658 members.
1659
1660Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
1661
1662 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
1663 isn't the same as the new one before we whack it.
1664
1665Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
1666
1667 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
eb66be0e
MS
1668 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
1669 warn_traditional and warn_strict_prototypes; remove ancient
1670 'overload' code; remove references to flag_traditional.
3d4683cb 1671
5156628f
MS
1672Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
1673
1674 * input.c (sub_getch): Handle 8-bit characters in string literals.
1675
1676Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
1677
1678 * tree.c (mapcar): Handle CONSTRUCTORs.
1679 (copy_to_permanent): Handle expression_obstack properly.
1680
1681 * Make-lang.in (cplib2.txt): Also depend on the headers.
1682
1683 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
eb66be0e 1684 INT_TYPE_SIZE.
5156628f
MS
1685 (expand_class_desc): Use USItype for offset field.
1686 * tinfo.h (struct __class_type_info): Likewise.
1687
1688 * method.c (build_overload_int): TYPE_PRECISION should be applied
eb66be0e 1689 to types.
5156628f
MS
1690
1691Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
1692
1693 * call.c (build_new_op): A COND_EXPR involving void must be a
1694 builtin.
1695
1696Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1697
1698 * typeck.c (build_x_component_ref): New fn.
1699 (build_object_ref): Use it.
1700 * parse.y (primary): Use it.
1701 * decl2.c (build_expr_from_tree): Use it.
1702 * cp-tree.h: Declare it.
1703
1704 * decl.c (start_decl): variable-sized arrays cannot be initialized.
1705 * error.c (dump_type_suffix): Handle variable arrays.
1706
1707Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1708
1709 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
1710
1711Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
1712
1713 * decl.c (lookup_name_real): Don't try to look up anything in a
eb66be0e 1714 TYPENAME_TYPE.
5156628f
MS
1715
1716 * tinfo2.cc (__throw_type_match_rtti): Oops.
1717
1718Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1719
1720 * Make-lang.in (exception.o): Use -fno-PIC for now.
1721
1722Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
1723
1724 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
eb66be0e 1725 calling them.
5156628f
MS
1726 (get_tinfo_fn_dynamic): Extracted from build_typeid.
1727 * tinfo2.cc (__dynamic_cast): Adjust.
1728
1729 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
1730 (build_x_typeid): Likewise.
1731
1732 * parse.y: Call build_x_typeid instead of build_typeid.
1733 * cp-tree.def: Add TYPEID_EXPR.
1734 * pt.c (tsubst_copy): Handle typeid.
1735 * decl2.c (build_expr_from_tree): Likewise.
1736 * rtti.c (build_x_typeid): Throw bad_typeid from here.
1737 (build_typeid): Not here.
1738 * cp-tree.h: Declare build_x_typeid.
1739
1740Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
1741
1742 * call.c (convert_like): Pull out constant values.
1743
1744 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
1745
1746Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1747
1748 * decl.c (init_decl_processing): Create short int types before
1749 creating size_t in case a machine description needs to use
1750 unsigned short for size_t.
1751
1752Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
1753
1754 * Make-lang.in (exception.o): Turn off pic.
1755
1756 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
1757 type, multi-level ptr conversions.
1758
1759 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
1760 (throw_bad_cast): Use it.
1761 (throw_bad_typeid): New fn.
1762 (build_typeid): Throw bad_typeid as needed.
1763 Use build_call.
1764 (synthesize_tinfo_fn): Handle functions and arrays before checking
1765 for cv-quals.
1766
1767 * Remove .h from standard C++ headers, add new.h, move into inc
eb66be0e 1768 subdirectory.
5156628f
MS
1769
1770 * exception*: Remove pointer from object, constructors. Add
eb66be0e
MS
1771 default exception::what that uses type_info::name. Add
1772 __throw_bad_typeid.
5156628f
MS
1773
1774 * init.c (build_new): Don't add a cookie to new (void *) T[2].
1775
1776Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
1777
1778 * Make-lang.in: Building C++ code depends on cc1plus.
1779
1780Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1781
1782 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
1783 a HOST_WIDE_INT, not a tree.
1784
1785Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
1786
1787 * exception.cc: Don't include <stdlib.h>.
1788
1789 * Make-lang.in (c++.clean): Remove cplib2.*.
1790
1791Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
1792
1793 * parse.y (component_decl_1, component_costructor_declarator case):
1794 Pass attributes/prefix_attributes in tree list.
1795
1796Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
1797
1798 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
1799
1800Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
1801
1802 * lex.c (do_identifier): Don't do deferred lookup in a template
eb66be0e 1803 header.
5156628f
MS
1804
1805 * typeck2.c (store_init_value): Oops.
1806
1807 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
1808 New files for C++ lang-support library.
1809 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
1810 (CXX_LIB2FUNCS): Define.
1811 And rules for building the C++ lang-support code.
1812 * config-lang.in (headers): Define.
1813 (lib2funcs): Define.
1814
1815Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
1816
1817 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
1818 digest_init.
1819 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
1820 * typeck2.c (store_init_value): Check for initializing pmf with { }
1821 here.
1822 (process_init_constructor): Not here.
1823
1824Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
1825
1826 * pt.c (begin_template_parm_list): Increment
eb66be0e 1827 processing_template_decl here.
5156628f
MS
1828 (end_template_parm_list): Not here.
1829 (process_template_parm): No need to add 1 to it now.
1830 * *.c: Use processing_template_decl instead of current_template_parms
1831 to check for being in a template.
1832
1833 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
1834 (tsubst_copy): Handle CONSTRUCTOR.
1835 (instantiate_decl): Set up context properly for variables.
1836 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
1837 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
1838
1839Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1840
1841 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
1842
7fcdf4c2
MS
1843Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
1844
1845 * method.c (make_thunk): Call comdat_linkage before setting the
eb66be0e 1846 TREE_CODE.
7fcdf4c2
MS
1847
1848 * decl2.c (comdat_linkage): Use make_decl_one_only.
1849 (import_export_decl): Likewise.
1850 * decl.c (init_decl_processing): Check supports_one_only instead of
1851 SUPPORTS_WEAK.
1852
1853Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
1854
1855 * decl2.c (grokfield): Tighten checking for access decls.
1856
1857 * decl.c (make_typename_type): Resolve references to
eb66be0e 1858 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
7fcdf4c2 1859 (lookup_name_real): Types that depend on a template parameter get
eb66be0e 1860 an implicit 'typename' unless they're in the current scope.
7fcdf4c2 1861 (start_decl_1): We don't care about incomplete types that depend
eb66be0e 1862 on a template parm.
7fcdf4c2 1863 (grokdeclarator): Resolve 'typename's in the type specifier that
eb66be0e 1864 refer to members of the current scope.
7fcdf4c2
MS
1865
1866 * call.c (build_over_call): Remove 'inline called before
eb66be0e 1867 definition' diagnostic.
7fcdf4c2
MS
1868 (build_method_call): Likewise.
1869 * decl.c (duplicate_decls): Downgrade 'used before declared
eb66be0e 1870 inline' to a warning, only with -Winline.
7fcdf4c2
MS
1871
1872Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
1873
1874 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
1875
c11b6f21
MS
1876Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
1877
1878 * call.c (build_method_call): When calling a signature
1879 default implementation, as in other cases, let instance_ptr simply
1880 be instance.
1881
1882Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
1883
1884 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
1885
1886Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
1887
1888 * except.c (expand_start_catch_block): Add a pushlevel so that -g
eb66be0e 1889 works on hppa and SPARC.
c11b6f21
MS
1890
1891Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1892
1893 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
1894
1895Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
1896
1897 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
1898 before testing whether it's a signature.
1899
1900Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
1901
1902 * call.c (build_new_method_call): Don't complain about signature
1903 pointers and references not being an aggr type.
1904 (build_this): If a signature pointer or reference was passed in,
1905 just return it.
1906 (build_new_method_call): If instance is a signature pointer, set
1907 basetype to the signature type of instance.
1908 * sig.c (build_signature_method_call): Deleted basetype and
1909 instance parameters, they can be found as the DECL_CONTEXT of
1910 function and as the first argument passed in.
1911 * cp-tree.h: Changed declaration of build_signature_method_call.
1912 * call.c (build_method_call): Deleted first two arguments in call
1913 of build_signature_method_call.
1914 (build_over_call): Added call to build_signature_method_call.
1915
1916Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
1917
1918 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
eb66be0e 1919 target_expr.
c11b6f21
MS
1920
1921Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1922
1923 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
1924
9ffa2541
BM
1925Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
1926
1927 * except.c (expand_start_try_stmts): Move to except.c in the backend.
1928 (expand_end_try_stmts): Remove.
1929
1930 * init.c (perform_member_init): Use add_partial_entry () instead
1931 of directly manipulating lists.
1932 (emit_base_init): Ditto.
1933
c11b6f21
MS
1934Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
1935
1936 * except.c (expand_exception_blocks): Always make sure USE and
eb66be0e
MS
1937 CLOBBER insns that came at the end still do, the backend relies
1938 upon this.
c11b6f21
MS
1939
1940Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
1941
1942 * call.c (build_over_call): We can only use a TARGET_EXPR of the
eb66be0e 1943 right type.
c11b6f21
MS
1944
1945Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
1946
1947 * cvt.c (convert_to_reference): Revert last change, don't complain
eb66be0e 1948 about temp without target decl.
c11b6f21
MS
1949
1950Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
1951
1952 * decl.c (grokdeclarator): Don't core dump when void() is given.
1953
1954Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
1955
1956 * decl.c (copy_args_p): Don't crash.
1957
1958Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
1959
1960 * pt.c (tsubst): And support template args inside the exception
eb66be0e 1961 specification.
c11b6f21
MS
1962
1963 * pt.c (tsubst): Add support for exception specifications in
eb66be0e 1964 template functions.
c11b6f21
MS
1965
1966Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
1967
1968 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
eb66be0e 1969 fields now.
c11b6f21
MS
1970 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
1971 (start_function): Likewise.
1972 (start_method): Likewise.
1973 (grokfield): Likewise.
1974 (make_call_declarator): Add throw spec parameter.
1975 (set_quals_and_spec): Add routine.
1976 * lex.c (set_quals_and_spec): Likewise.
1977 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
1978 * decl.c (shadow_tag): Eliminate the throw spec parameter to
eb66be0e 1979 grokdeclarator.
c11b6f21
MS
1980 (groktypename): Likewise.
1981 (start_decl): Eliminate the throw spec parameter. Eliminate the
eb66be0e
MS
1982 throw spec parameter to grokdeclarator. Eliminate the throw spec
1983 field in DECL_STMT.
c11b6f21
MS
1984 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
1985 (grokfndecl): Remove useless set of raises.
1986 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
eb66be0e
MS
1987 the throw spec parameter to start_decl. Pull the throw spec out
1988 of the call declarator.
c11b6f21
MS
1989 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
1990 (start_function): Eliminate the throw spec parameter. Eliminate
eb66be0e 1991 the throw spec parameter to grokdeclarator.
c11b6f21
MS
1992 (start_method): Likewise.
1993 * decl2.c (grokfield): Likewise.
1994 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
1995 (grokoptypename): Likewise.
1996 (finish_file): Eliminate the throw spec parameter to
eb66be0e 1997 start_function. Add throw spec to make_call_declarator.
c11b6f21 1998 * except.c (init_exception_processing): Add throw spec to
eb66be0e
MS
1999 make_call_declarator. Eliminate the throw spec parameter to
2000 start_decl.
c11b6f21 2001 (expand_start_catch_block): Eliminate the throw spec parameter to
eb66be0e 2002 grokdeclarator.
c11b6f21
MS
2003 (expand_builtin_throw): Add throw spec to make_call_declarator.
2004 Eliminate the throw spec parameter to start_function.
2005 (start_anon_func): Likewise.
2006 * lex.c (make_call_declarator): Add throw spec parameter.
2007 (set_quals_and_spec): New routine.
2008 (cons_up_default_function): Add throw spec to make_call_declarator.
2009 Eliminate the throw spec parameter to grokfield.
2010 * method.c (synthesize_method): Eliminate the throw spec parameter
eb66be0e 2011 to start_function.
c11b6f21 2012 * pt.c (process_template_parm): Eliminate the throw spec parameter
eb66be0e 2013 to grokdeclarator.
c11b6f21
MS
2014 (tsubst): Add throw spec to make_call_declarator.
2015 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
2016 (do_function_instantiation): Eliminate the throw spec parameter to
eb66be0e
MS
2017 grokdeclarator. Eliminate the throw spec parameter to
2018 start_function.
c11b6f21 2019 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
eb66be0e 2020 to start_function.
c11b6f21
MS
2021 * parse.y (datadef): Remove non-winning optimization.
2022 (decl): Likewise.
2023 (fndef): Remove ambiguous error productions uncovered by grammer
eb66be0e 2024 fixing.
c11b6f21
MS
2025 (constructor_declarator): Add exception_specification_opt here.
2026 (component_constructor_declarator): Likewise.
2027 (direct_after_type_declarator): Likewise.
2028 (complex_direct_notype_declarator): Likewise.
2029 (direct_abstract_declarator): Likewise.
2030 (fn.def1): Remove exception_specification_opt.
2031 (fn.def2): Likewise.
2032 (condition): Likewise.
2033 (initdcl0): Likewise.
2034 (initdcl): Likewise.
2035 (notype_initdcl0): Likewise.
2036 (nomods_initdcl0): Likewise.
2037 (component_decl_1): Likewise.
2038 (component_declarator): Likewise.
2039 (after_type_component_declarator0): Likewise.
2040 (after_type_component_declarator): Likewise.
2041 (notype_component_declarator): Likewise.
2042
2043Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
2044
2045 * call.c (build_over_call): Also use an INIT_EXPR when
eb66be0e 2046 initializing anything from an rvalue.
c11b6f21
MS
2047
2048 * call.c (build_over_call): Call stabilize_reference when building
eb66be0e 2049 an INIT_EXPR instead of calling the copy ctor.
c11b6f21
MS
2050
2051 * call.c (joust): Extend the previous change to all comparisons.
2052
2053 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
2054 NO_LINKAGE_HEURISTICS.
2055
2056 * decl2.c (finish_file): Emit any statics that weren't already.
2057
2058 * typeck.c (build_static_cast): Implement.
2059 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
2060 * decl.c (grokparms): Use can_convert_arg instead of
eb66be0e 2061 implicit_conversion directly.
c11b6f21
MS
2062 (copy_args_p): New fn.
2063 * cvt.c (convert_to_reference): Don't complain about temp with
eb66be0e 2064 static_cast.
c11b6f21
MS
2065 (build_up_reference): Handle TARGET_EXPRs.
2066 * call.c (build_over_call): Elide unnecessary temps.
2067 (can_convert*): Use new overloading code.
2068
2069Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
2070
2071 * call.c: Move TYPE_PTR*_MACROS ...
2072 * cp-tree.h: To here.
2073 * typeck.c (build_reinterpret_cast): Implement.
2074
2075 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
eb66be0e 2076 ptr_complete_ob.
c11b6f21
MS
2077 (joust): If we're comparing a function to a builtin and the worst
2078 conversion for the builtin is worse than the worst conversion for the
2079 function, take the function.
2080
2081 * typeck.c (build_const_cast): Implement.
2082 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
2083 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
2084
2085Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
2086
2087 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
eb66be0e
MS
2088 too early. Make sure we explode if exprtype turns out to be a
2089 NULL_TREE when it shouldn't be.
c11b6f21
MS
2090
2091Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
2092
2093 * cp-tree.h: New routine make_call_declarator.
2094 * lex.c (make_call_declarator): Define it.
2095 * except.c (init_exception_processing): Use it.
2096 (expand_builtin_throw): Likewise.
2097 (start_anon_func): Likewise.
2098 * decl2.c (finish_file): Likewise.
2099 * lex.c (cons_up_default_function): Likewise.
2100 * parse.y: Likewise.
2101 * pt.c (tsubst): Likewise.
2102
2103Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
2104
2105 * decl2.c (groktypefield): Remove unused code.
2106
2107Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
2108
2109 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
2110 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
2111 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
2112 nonempty_cv_qualifiers.
2113 * hash.h: Rebuild.
2114
2115 * lex.c (make_pointer_declarator): Change type_quals into
eb66be0e 2116 cv_qualifiers.
c11b6f21
MS
2117 (make_reference_declarator): Likewise.
2118
d11ad92e
MS
2119Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
2120
2121 * decl.c (start_function): Only check interface_* for templates
eb66be0e 2122 with flag_alt_external_templates.
d11ad92e
MS
2123
2124 * call.c (build_new_op): Check for comparison of different enum types.
2125 (build_over_call): Fix arg # output.
2126
2127 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
2128
2129Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
2130
2131 * call.c (build_new_op): Check for erroneous args.
2132
2133 * call.c (build_new_method_call): Add missing args to cp_error.
2134
2135 * tree.c (error_type): Dont print reference-to-array.
2136
2137 * typeck.c (convert_for_assignment): Don't say contravariance for
eb66be0e 2138 removing const.
d11ad92e
MS
2139
2140Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
2141
2142 * call.c (build_over_call): Diagnose bad convs for `this'.
2143
2144 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
2145 on _ctor_arg.
2146
2147 * call.c (convert_like): Handle bad convs.
2148 (build_over_call): Handle bad convs better.
2149
2150 * decl2.c: -fansi-overloading is now the default.
2151
2152 * call.c (build_new_method_call): Check for erroneous args.
2153
2154 * pt.c (instantiate_class_template): Propagate
eb66be0e 2155 TYPE_USES_MULTIPLE_INHERITANCE.
d11ad92e
MS
2156
2157Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
2158
2159 * call.c (enforce_access): Add static to routine.
2160
2161Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
2162
2163 * call.c (build_user_type_conversion_1): Fix bad handling.
2164 (compare_ics): Likewise.
2165
2166Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
2167
2168 * call.c (standard_conversion): Oops.
2169
2170Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
2171
2172 * g++.c: Update test for win32 (&& ! cygwin32).
2173
2174Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
2175
2176 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
2177 (ptr_reasonably_similar): New fn.
2178 * call.c (BAD_RANK): New rank.
2179 (ICS_BAD_FLAG): New macro.
2180 (standard_conversion): Handle almost-right pointer conversions.
2181 (reference_binding): Handle bad rvalue bindings.
2182 (add_*_candidate): Stuff.
2183 (build_over_call): Pass bad conversions to convert_for_initialization.
2184 (compare_ics): Handle bad convs.
2185 (joust): Likewise.
2186
2187Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
2188
2189 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
2190 integer_type_node when computing pointer offsets.
2191
2192Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
2193
2194 * tree.c (lvalue_type): New fn.
2195 (error_type): New fn.
2196 * call.c (op_error): Use error_type.
2197 (add_conv_candidate): Use lvalue_type.
2198 (add_builtin_candidates): Likewise.
2199 * error.c (args_as_string): Use error_type.
2200
2201Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
2202
2203 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
2204 (tsubst): Not here.
2205
2206 * decl.c (init_decl_processing): With -ansi, __null's type is the
2207 signed integral type with the same number of bits as a pointer.
2208 Introduce a new variable null_node for it.
2209 * cp-tree.h: Adjust.
2210 * call.c (null_ptr_cst_p): Adjust.
2211
2212Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
2213
2214 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
eb66be0e 2215 optimize.
d11ad92e
MS
2216
2217Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
2218
2219 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
eb66be0e 2220 fns of classes without virtual functions.
d11ad92e
MS
2221
2222 * call.c (add_function_candidate): Handle `this' specially.
2223 (compare_ics): Likewise.
2224
2225Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
2226
2227 * typeck.c (build_conditional_expr): Fix handling of __null.
2228
2229 * decl2.c (comdat_linkage): New fn.
2230 (import_export_vtable): Use it.
2231 (import_export_decl): Use it.
2232 * method.c (make_thunk): Use it.
2233
73aad9b9
JM
2234Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
2235
2236 * pt.c (end_template_decl): If we don't actually have parms, return.
2237 * parse.y (template_header): Accept 'template <>'.
2238
2239 * errfn.c: Allow 5 args.
2240
2241Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
2242
2243 * tree.c (make_temp_vec): New fn.
2244 * pt.c (push_template_decl): Handle partial specs.
d11ad92e 2245 (instantiate_class_template): Likewise.
73aad9b9
JM
2246 (more_specialized): Use get_bindings.
2247 (more_specialized_class): New fn.
2248 (get_class_bindings): New fn.
2249 (most_specialized_class): New fn.
2250 (do_function_instantiation): List candidates for ambiguous case.
2251 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
2252 (shadow_tag): Call push_template_decl for partial specializations.
d11ad92e 2253 * parse.y: Likewise.
73aad9b9 2254 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
eb66be0e 2255 DECL_TEMPLATE_MEMBERS.
73aad9b9
JM
2256 * call.c (print_z_candidates): Reduce duplication.
2257
2258Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
2259
2260 * decl2.c (lang_decode_option): Allow -fansi-overloading.
2261
2262Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
2263
2264 * pt.c (get_bindings): New fn.
d11ad92e 2265 (most_specialized): Likewise.
73aad9b9
JM
2266 (do_function_instantiation): Use them.
2267 (add_maybe_template): New fn.
2268 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
2269 * call.c (build_new_op): Handle guiding decls.
d11ad92e
MS
2270 (build_new_function_call): Likewise.
2271 * decl2.c (finish_file): Likewise.
73aad9b9
JM
2272
2273 * decl2.c (mark_used): Do synthesis here.
2274 * call.c (build_method_call): Not here.
2275 (build_over_call): Or here.
2276 * typeck.c (build_function_call_real): Or here.
2277 * tree.c (bot_manip): Call mark_used on functions used in default
eb66be0e 2278 args.
73aad9b9 2279
2eee5e3a
MM
2280Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2281
2282 * decl2.c (import_export_vtable): Delete code that disabled vtable
eb66be0e 2283 heuristic on systems with ASM_OUTPUT_EXTERNAL.
2eee5e3a 2284
c73964b2
MS
2285Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
2286
2287 * typeck.c (build_x_function_call): Handle static call context
2288 better.
2289
2290 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
eb66be0e 2291 the function, not its outer block.
c73964b2
MS
2292
2293 * call.c (build_field_call): Pass fields on to build_opfncall
eb66be0e 2294 regardless of TYPE_OVERLOADS_CALL_EXPR.
c73964b2
MS
2295 (build_method_call): Pass on to build_new_method_call sooner.
2296
2297 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
2298 gives us.
2299 * class.c (instantiate_type): Don't put a POINTER_TYPE to
eb66be0e 2300 METHOD_TYPE on an expression. Also make a copy of rhs instead of
c73964b2
MS
2301 modifying it.
2302
2303Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
2304
2305 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
2306 (add_builtin_candidate): Don't take enums for ++.
2307 (build_new_method_call): Handle non-aggregates and field calls.
2308 Move new overloading code from...
2309 * cvt.c: Here.
2310
2311 * decl.c (grokparms): Don't check default args in templates.
2312
2313Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
2314
2315 * cvt.c (build_new_op): Fix args to build_unary_op.
2316 (add_builtin_candidates): Don't call type_promotes_to on float.
2317
2318 * decl.c (grokparms): Check the type of the default arg.
2319
2320 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
2321 returning NULL_TREE.
2322
2323 * typeck.c (build_x_binary_op): Avoid doing extra work.
d11ad92e
MS
2324 (build_x_unary_op): Likewise.
2325 (build_x_conditional_expr): Likewise.
c73964b2
MS
2326 * cvt.c (build_over_call): Return.
2327 (add_builtin_candidate): Fix MEMBER_REF.
d11ad92e 2328 (build_new_op): Likewise.
c73964b2
MS
2329
2330Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
2331
2332 * method.c (build_overload_name): Put bug fix into code but leave
eb66be0e
MS
2333 disabled for now so we can be bug compatible with older releases
2334 that do repeats incorrectly. In the future, we can enable it.
c73964b2
MS
2335
2336Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
2337
2338 * cvt.c (convert_like): Don't call build_cplus_new twice.
2339
2340 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
2341 Control new overloading code with -fansi-overloading.
2342
2343Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
2344
2345 * cvt.c (build_over_call): Call build_cplus_new.
d11ad92e
MS
2346 * call.c (build_method_call): Likewise.
2347 * typeck.c (build_function_call_real): Likewise.
c73964b2
MS
2348 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
2349 the COND_EXPR in a TARGET_EXPR so they use the same slot.
2350
2351 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
2352 recursive calls.
2353 * typeck.c (complete_type): Propagate
eb66be0e 2354 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
c73964b2
MS
2355
2356Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
2357
2358 * cvt.c (joust): More ?: kludging. Sigh.
2359 (build_over_call): Don't try to synthesize global fns.
2360
2361 * search.c (lookup_conversions): Use binfo marking.
2362
2363Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
2364
2365 * search.c (build_mi_matrix): Use the correct value of cid
2366 when determining the new mi_size.
2367
2368Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
2369
2370 * cvt.c (add_builtin_candidates): Do consider type conversion ops
2371 for the first parms of += et al.
2372 (strip_top_quals): New fn.
2373 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
d11ad92e 2374 (implicit_conversion): Likewise.
c73964b2
MS
2375 (add_builtin_candidates): Be careful about arrays.
2376 (build_new_method_call): Handle vtable optimization.
2377
2378Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
2379
2380 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
2381 * cvt.c (reference_binding): Use it.
2382 (implicit_conversion): Use it.
2383 (add_builtin_candidate, COND_EXPR): Use it.
2384
2385 * cvt.c (build_new_function_call): Check for error args.
2386
2387 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
2388
2389 * gxx.gperf: Add __null.
2390 * hash.h: Regenerate.
2391 * lex.h: Add RID_NULL.
2392 * lex.c (init_lex): Create null_pointer_node here, stick it in
eb66be0e 2393 RID_NULL.
c73964b2
MS
2394 * decl.c (init_decl_processing): Still set its type here.
2395 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
d11ad92e 2396 (convert_to_pointer_force): Likewise.
c73964b2
MS
2397 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
2398 if (! pedantic).
2399 * call.c (convert_harshness): Use null_ptr_cst_p.
d11ad92e 2400 * typeck.c (convert_for_assignment): Likewise. Don't produce
c73964b2
MS
2401 null_pointer_node.
2402
2403 * error.c (args_as_string): Handle lists of actual args, too.
2404 * cvt.c (null_ptr_cst): Support (void*)0 for now.
2405 (build_user_type_conversion_1): Improve diagnostics.
2406 (build_new_function_call): Likewise.
2407 (build_object_call): Likewise.
2408 (build_new_method_call): Likewise. Move call before def diagnostic...
2409 (build_over_call): Here.
2410
2411 * cvt.c (build_new_method_call): Don't complain about no match if
eb66be0e 2412 LOOKUP_SPECULATIVELY.
c73964b2
MS
2413 (build_over_call): Fix 'this' for virtual fn.
2414 (build_new_method_call): Add diagnostic.
2415
2416Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2417
2418 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
eb66be0e 2419 constructors to be passed in.
c73964b2
MS
2420 (build_over_call): Likewise.
2421 (build_user_type_conversion_1): Pass them in.
2422 (convert_like): Likewise.
2423 (build_object_call): Handle overloaded conversions.
2424 (build_over_call): Pass the right args to build_vfn_ref.
2425 (standard_conversion): Fix pmf convs.
2426 (joust): Handle comparing statics and non-statics.
2427 (build_new_method_call): New fn.
2428 * call.c (build_method_call): Call it if NEW_OVER.
2429
2430Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
2431
2432 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
eb66be0e 2433 %D instead.
c73964b2
MS
2434
2435Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
2436
2437 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
eb66be0e
MS
2438 instead of just maybe_build_cleanup so that we deallocate the
2439 thrown object.
c73964b2
MS
2440
2441Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2442
2443 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
2444 * cp-tree.h (finish_prevtable_vardecl): Add decl.
2445
14548a19
MS
2446Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
2447
c73964b2 2448 * pt.c (instantiate_class_template): Call complete_type. Also, if
eb66be0e
MS
2449 we're at the end of the file and we just instantiated a template
2450 class with a vtable, call finish_prevtable_vardecl.
c73964b2 2451
14548a19 2452 * error.c (dump_decl): Don't explode (or explode more gracefully
eb66be0e 2453 as appropriate) if the object being dumped has a null type.
d11ad92e 2454 (dump_expr): Likewise.
14548a19
MS
2455
2456 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
eb66be0e
MS
2457 by counting the number of nodes that we'll need before allocating
2458 the array.
14548a19
MS
2459 (lookup_fnfields): Fix comment.
2460 (breadth_first_search): Fix comment.
2461
2462Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
2463
2464 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
eb66be0e 2465 TYPE_ALIGN.
14548a19
MS
2466 * class.c (finish_struct): Call cplus_decl_attributes here.
2467 (finish_struct_1): Not here.
2468 * cp-tree.h: Adjust.
2469
2470 * pt.c (type_unification): New parameter STRICT.
2471 (unify): If STRICT, don't allow cv addition or base deduction.
2472 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
2473
2474Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
2475
2476 * search.c (get_template_base{_recursive}): New fns.
2477 * pt.c (more_specialized): New fn.
2478 (do_function_instantiation): Use it.
2479 (unify): Handle base deduction.
2480 * cvt.c (joust): Use more_specialized.
2481 Don't arbitrarily choose between non-builtin candidates.
2482 (build_over_call): Call require_complete_type.
2483
2484 * decl.c (start_function): Statics are static even in a #pragma
eb66be0e 2485 interface file.
14548a19
MS
2486
2487 * decl2.c (import_export_vtable): Disable vtable heuristic on
eb66be0e 2488 systems with ASM_OUTPUT_EXTERNAL.
14548a19
MS
2489
2490 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
2491 (standard_conversion): No std conv to enum type.
2492
2493 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
2494 for ptm's.
2495
2496 * cvt.c (reference_binding): Bind directly to a base subobject of
eb66be0e 2497 a class rvalue.
14548a19
MS
2498
2499 * cvt.c (build_new_op): Enforce access control.
2500
2501Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
2502
2503 * typeck2.c (process_init_constructor): When scanning the
2504 union for a named field, skip things that aren't FIELD_DECLs.
2505
2506 * method.c (synthesize_method): Don't scan fndecl's rtl if
2507 we're at the end of the file; just assume the function can't
2508 be inlined.
2509
2510Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
2511
2512 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
eb66be0e 2513 it failed.
14548a19
MS
2514
2515 * cvt.c (build_user_type_conversion_1): Handle overloaded
eb66be0e 2516 conversion ops.
14548a19
MS
2517
2518 * cvt.c (add_builtin_candidates): Don't consider type conversion
eb66be0e 2519 operators for the first parameter of operator=.
14548a19
MS
2520
2521Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
2522
2523 * typeck.c (complete_type): Only call layout_type if we're not
eb66be0e 2524 expanding a template.
14548a19
MS
2525
2526Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
2527
2528 * cvt.c (compare_ics): Oops.
2529
2530 * cvt.c (op_error): Oops.
2531
2532 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
2533 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
2534 (build_conv): Use them.
2535 (implicit_conversion): Use them.
2536 (convert_like): Handle them.
2537 (build_new_op): Handle builtin COND_EXPR again.
2538 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
2539 in lists of types for COND_EXPR.
2540 (add_builtin_candidate): Add enum candidates for COND_EXPR.
2541
2542Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
2543
2544 * typeck.c (build_modify_expr): Always attempt to build a call to
eb66be0e 2545 the assignment operator, even if we're using a default one.
14548a19
MS
2546 (convert_for_initialization): Call complete_type.
2547
2548Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
2549
2550 * cvt.c (reference_binding): A REF_BIND gets the reference type.
2551 (implicit_conversion): Likewise.
2552 (convert_like): Likewise.
2553 (compare_ics): Likewise.
2554 (compare_qual): Likewise.
2555 (print_z_candidates): Handle no candidates.
2556 (build_new_op): Don't handle builtin COND_EXPR for now.
2557
2558Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
2559
2560 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
2561
2562Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
2563
2564 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
2565
2566 * cvt.c (build_builtin_candidate): Oops.
2567 (build_new_op): Oops.
2568
2569 * method.c (build_opfncall): Pass COND_EXPR on.
2570 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
2571 (add_builtin_candidate{,s}): Likewise.
2572 (add_builtin_candidates): Likewise.
2573 (print_z_candidates, op_error, build_new_op): Likewise.
2574 (type_decays_to): New fn.
2575 * lex.c (init_lex): Just say ?: for COND_EXPR.
2576
2577Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2578
2579 * typeck.c (complete_type): Call layout_type rather than building
eb66be0e 2580 a new array type.
14548a19
MS
2581
2582 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
eb66be0e 2583 only use ptrdiff_t.
14548a19
MS
2584
2585Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
2586
2587 * cvt.c: Always compile the new overloading code (but don't use it).
2588 (implicit_conversion): Add a BASE_CONV when converting to
eb66be0e 2589 the same class type.
14548a19
MS
2590 (convert_like): Handle BASE_CONV.
2591
2592Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
2593
2594 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
2595 (add_builtin_candidate): Likewise.
2596
2597 NEW_OVER changes:
2598 * typeck.c (build_x_function_call): Try an operator function
eb66be0e 2599 whenever we call an object of class type.
14548a19
MS
2600 * method.c (build_opfncall): Pass CALL_EXPRs through.
2601 * cvt.c (implicit_conversion): Do const-ref case first.
2602 (add_conv_candidate, build_object_call, op_error): New fns.
2603 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
2604 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
2605 builtin candidates.
2606 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
2607 Fall back on preincrement handling. Use op_error.
2608 Handle warn_synth.
2609 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
2610 an error_mark_node.
2611 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
2612 properly.
2613
2614Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
2615
2616 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
2617
2618Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
2619
2620 * typeck.c (build_component_ref_1): Use build_component_ref
2621 instead of open coding it here.
2622
2623Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
2624
2625 * g++.c (main): Don't link with -lg++.
2626
2627 NEW_OVER changes:
2628 * cvt.c (convert_to_reference): Don't use convert_from_refeence on
eb66be0e 2629 result of build_type_conversion.
14548a19
MS
2630 (cp_convert): Only call build_method_call for ctors if
2631 build_type_conversion failed.
2632 (ptr_complete_ob): New function.
2633 (TYPE_PTR{,OB,MEM}_P): New macros.
2634 ({add,build}_builtin_candidate{,s}): New functions.
2635 (print_z_candidates): Handle builtins.
2636 (build_user_type_conversion_1): Don't use conversion fns for
2637 converting to a base type.
2638 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
2639 (build_user_type_conversion): Use convert_from_reference.
2640 (build_new_op): New function.
2641 (build_over_call): Fix handling of methods.
2642 (compare_ics): Handle AMBIG_CONV properly.
2643 * typeck2.c: Increment abort count.
2644 * method.c (build_opfncall): Forward most requests to build_new_op.
2645 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
2646
2647Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2648
2649 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
2650 invalid second argument to dump_expr_list.
2651
594740f3
MS
2652Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
2653
2654 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
2655
2656Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
2657
2658 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
2659 ASSEMBLE_EXTERNAL.
2660
2661Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
2662
2663 * typeck2.c (process_init_constructor): New pedwarn for using { }
2664 to initialize a pointer to member function.
2665 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
2666 we can avoid the new error.
2667
2668Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
2669
2670 * typeck.c (build_ptrmemfunc1): New function to hide details of
2671 pointer to member functions better.
2672
2673Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
2674
2675 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
2676 methods into the actual method, as we know the implied object is
2677 not used.
2678
2679Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2680
2681 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
2682 inside a system header.
2683
2684Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
2685
2686 * call.c (build_method_call): Call complete_type on the
2687 instance type.
2688
2689Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
2690
2691 * typeck.c (build_component_ref): Always build up an OFFSET_REF
2692 for obj_ptr->func so that we can know which object to use in a
2693 method call.
2694
2695Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
2696
2697 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
2698 around things. Also improve maintainability.
2699
2700Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
2701
2702 * decl.c (grokdeclarator): Check for overflow when evaluating an
eb66be0e 2703 array dimension.
594740f3
MS
2704
2705Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
2706
2707 * cvt.c (cp_convert): Don't check for ambiguity with constructor
eb66be0e 2708 if NEW_OVER.
594740f3
MS
2709
2710 * typeck.c (build_x_function_call): Pass function overload
eb66be0e 2711 questions to new overloading code if NEW_OVER.
594740f3 2712 * init.c (expand_aggr_init_1): Only check for type conversion ops
eb66be0e
MS
2713 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
2714 Don't check for ambiguity with constructor if NEW_OVER.
594740f3 2715 * cvt.c (convert_to_reference): Dereference the result of a type
eb66be0e 2716 conversion operator.
594740f3
MS
2717 (build_conv): Propagate ICS_USER_FLAG.
2718 (implicit_conversion): Call instantiate_type.
2719 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
2720 (add_function_candidate): Fix cv-quals on argtype.
2721 (print_z_candidates): New function.
2722 (build_new_function_call): Call it.
2723 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
2724 consider non-converting constructors.
2725 Call print_z_candidates.
2726 Return an AMBIG_CONV for an ambiguous conversion.
2727 (build_user_type_conversion): Handle AMBIG_CONV.
2728 (convert_like): Fix test for building TARGET_EXPR.
2729 Call instantiate_type.
2730 Handle AMBIG_CONV and LVALUE_CONV.
2731 (build_over_call): Handle 0 args and ellipsis.
2732 * cp-tree.def: Add AMBIG_CONV.
2733
e92cc029
MS
2734Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
2735
2736 * decl.c (lookup_name_real): If we find mem in obj when parsing
eb66be0e 2737 `obj->mem', make sure we return the right value.
e92cc029
MS
2738
2739Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
2740
2741 * search.c (get_base_distance): Call complete_type.
2742
2743Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
2744
2745 * decl.c (store_bindings): Make static.
2746
2747Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
2748
2749 * init.c (expand_aggr_init_1): Don't check type conversions if
eb66be0e 2750 NEW_OVER.
e92cc029
MS
2751
2752 * cvt.c (z_candidate): Put back template field.
2753 (add_function_candidate): Set it.
2754 (add_template_candidate): Likewise.
2755 (joust): Use it.
2756 (compare_qual): Handle references and pointers to members.
2757 (compare_ics): Handle reference bindings.
2758
2759 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
2760
2761Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
2762
2763 * call.c (compute_conversion_costs): Call complete_type.
2764
2765 * tree.c (vec_binfo_member): Use comptypes instead of comparing
eb66be0e 2766 pointers, so we can handle template parameters.
e92cc029
MS
2767
2768Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
2769
2770 * cvt.c (cp_convert_to_pointer): We have to call complete_type
2771 here; let's make it explicit instead of a side effect of an
2772 error check.
2773
2774Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
2775
2776 * cvt.c (z_candidate): Remove template field.
2777 (reference_binding): Handle binding to temporary.
2778 (implicit_conversion): Likewise.
2779 (add_function_candidate): Handle artificial constructor parms.
2780 Handle functions with too few parms.
2781 (add_template_candidate): New function.
2782 (build_user_type_conversion_1): Handle constructors.
2783 (convert_like): Likewise.
2784 (build_over_call): Likewise.
2785 (build_new_function_call): Support templates.
2786 (compare_ics): Fix reference, inheritance handling.
2787
2788Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
2789
2790 * decl.c: Add signed_size_zero_node.
2791 (init_decl_processing): Build it.
2792 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
eb66be0e 2793 when we're trying to make a negative delta.
e92cc029
MS
2794
2795Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2796
2797 Stop doing this damn index==strchr variable name confusion.
2798 * class.c (add_virtual_function): Change local var INDEX to be
2799 named IDX.
2800 (add_method): Likewise.
2801 * lex.c (print_parse_statistics): Likewise.
2802 * search.c (make_memoized_table_entry): Likewise.
2803 (lookup_fnfields_here): Likewise.
2804 (lookup_field): Likewise.
2805 (lookup_fnfields): Likewise.
2806 (get_baselinks): Likewise.
2807 * sig.c (build_signature_table_constructor): Likewise.
2808 (build_signature_method_call): Likewise.
2809 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
2810 (get_member_function_from_ptrfunc): Likewise.
2811 (build_ptrmemfunc): Change local var INDEX to be IDX.
2812 (c_expand_start_case): Likewise.
2813
2814Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
2815
2816 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
eb66be0e 2817 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
e92cc029 2818 (convert_to_reference): Use build_type_conversion to convert to
eb66be0e 2819 the reference type directly.
e92cc029
MS
2820 (standard_conversion): Fix void* case, non-conversions.
2821 (reference_binding): Fix expr == 0 case, non-conversions.
2822 (convert_like): Support REF_BIND.
2823 (compare_qual): Split out from compare_ics.
2824 (compare_ics): Use it, handle icses with only a qual_conv.
2825
2826 * init.c (expand_vec_init): Don't crash if decl is NULL.
2827
2828Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
2829
2830 * mpw-config.in: New file, configury for Mac MPW.
2831 * mpw-make.sed: New file, makefile editing for MPW.
2832
2833Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
2834
2835 * pt.c (instantiate_class_template): Call repo_template_used.
2836
2837 * search.c (lookup_conversions): Only lookup conversions in
eb66be0e 2838 complete types.
e92cc029
MS
2839
2840Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2841
2842 * cp-tree.def: Renamed from tree.def, to avoid confusion with
2843 gcc's tree.def.
2844 * cp-tree.h, lex.c: Include cp-tree.def.
2845 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
2846
2847Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
2848
2849 * init.c (build_vec_delete_1): Call complete_type.
2850
2851Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
2852
2853 * except.c (start_anon_func): Make sure anonymous functions are
eb66be0e 2854 never external.
e92cc029
MS
2855
2856Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
2857
2858 * decl.c (finish_function): If function_depth > 1, set nested.
2859
2860 * decl2.c (grokbitfield): Revert Bob's change.
2861 * class.c (finish_struct_1): Fix handling of named bitfield widths.
2862
2863Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
2864
2865 * pt.c (add_pending_template): Handle types.
2866 (lookup_template_class): With -fexternal-templates, just add the class
2867 to pending_templates instead of instantiating it now.
2868 * decl2.c (finish_file): Handle types in pending_templates.
2869
2870Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
2871
2872 * decl2.c (grokbitfield): Handle constant decls appropriately.
eb66be0e
MS
2873 Give an appropriate error message now instead of spewing core
2874 later.
e92cc029
MS
2875
2876Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
2877
2878 * decl2.c: Don't turn on thunks by default for now.
2879
2880Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
2881
2882 * typeck.c (complete_type): Handle error_mark_node.
2883 (common_type, OFFSET_TYPE): Handle template_type_parms.
2884
2885Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
2886
2887 * pt.c (instantiate_decl): If at_eof, call import_export_decl
eb66be0e 2888 regardless of DECL_INLINE.
e92cc029
MS
2889
2890 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
2891
2892 * class.c (finish_struct_bits): Copy TYPE_SIZE.
2893
2894 * rtti.c (build_dynamic_cast): Support templates.
2895 * tree.def: Support DYNAMIC_CAST_EXPR.
2896 * pt.c (tsubst_copy): Likewise.
2897 * decl2.c (build_expr_from_tree): Likewise.
2898
2899Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
2900
2901 * typeck.c (build_static_cast): Support templates.
2902 (build_const_cast): Likewise.
2903 * tree.def: Support CONST/STATIC_CAST_EXPR.
2904 * pt.c (tsubst_copy): Likewise.
2905 * decl2.c (build_expr_from_tree): Likewise.
2906
2907Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
2908
2909 * decl2.c (finish_vtable_vardecl): Don't trust
eb66be0e 2910 TREE_SYMBOL_REFERENCED for vtables of local classes.
e92cc029
MS
2911
2912Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
2913
2914 * pt.c (tsubst_copy): Handle operator T.
2915
2916Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2917
2918 * init.c (build_delete): Move creation of PARMS inside test of
2919 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
2920
2921Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
2922
2923 * typeck.c (build_conditional_expr): Don't assume that
2924 the arguments to ?: are always pointers or records.
2925
2926Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
2927
2928 * decl2.c (import_export_decl): Still emit static/weak/comdat
eb66be0e 2929 copies of inline template functions with -fno-implicit-templates.
e92cc029
MS
2930
2931Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
2932
2933 * init.c (build_delete): Determine the complete basetype
2934 path to the destructor we're calling.
2935
2936Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
2937
2938 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
eb66be0e
MS
2939 initialize the enum, because we really and truly don't know where
2940 it came from.
e92cc029 2941 (start_enum): Don't copy integer_zero_node because
eb66be0e 2942 build_enumerator will do it.
e92cc029
MS
2943
2944Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2945
2946 * decl.c (finish_function): Do access control on base destructors.
2947
2948 * pt.c (tsubst, case FUNCTION_DECL): Set up
eb66be0e
MS
2949 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
2950 hose us.
e92cc029
MS
2951
2952Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
2953
2954 * cvt.c (build_up_reference): If we have already extended the
eb66be0e 2955 lifetime of the temporary, don't try it again.
e92cc029
MS
2956 * typeck.c (c_expand_return): Don't try and convert the return
2957 value twice when we want a reference, once is enough.
2958
a0128b67
MS
2959Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
2960
2961 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
eb66be0e 2962 LOOKUP_ONLYCONVERTING at all for now.
a0128b67
MS
2963
2964 * search.c (add_conversions): Put the conversion function in
eb66be0e 2965 TREE_VALUE, the basetype in TREE_PURPOSE.
a0128b67
MS
2966 * cvt.c (build_type_conversion): Adjust.
2967 * cvt.c (build_expr_type_conversion): Adjust.
2968 * call.c (user_harshness): Adjust.
2969
2970Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
2971
2972 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
eb66be0e 2973 backend's benefit.
a0128b67 2974
14548a19
MS
2975Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
2976
2977 * except.c (expand_start_catch_block): Add a dummy region, if we
2978 get an error, so that we can avoid core dumping later.
2979
a0128b67
MS
2980Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
2981
2982 * cp-tree.h (OFFSET_REF): Remove.
2983 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
2984 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
d11ad92e
MS
2985 * init.c (expand_aggr_init_1): Likewise.
2986 (build_new): Likewise.
2987 * typeck.c (expand_target_expr): Likewise.
a0128b67
MS
2988
2989Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
2990
2991 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
eb66be0e 2992 TARGET_EXPR.
a0128b67 2993
e349ee73
MS
2994Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
2995
2996 * cvt.c (build_up_reference): Redo how and when temporaries are
2997 created.
2998 * decl.c (grok_reference_init): Don't try and be smart about
2999 running cleanups.
3000
3001Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
3002
3003 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
3004 (TARGET_EXPR...), now that it has 4 arguments.
d11ad92e 3005 * tree.c (build_cplus_new): Likewise.
e349ee73
MS
3006
3007Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
3008
3009 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
3010
3011 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
3012 * decl.c (struct saved_scope): Remove named_labels,
3013 {base,member}_init_list.
3014 (maybe_push_to_top_level): Don't set them. Call
3015 push_cp_function_context if appropriate.
3016 (pop_from_top_level): Likewise.
3017
3018 * method.c (do_build_assign_ref): Remove obsolete check of
3019 TYPE_HAS_ASSIGN_REF (basetype).
3020
3021 * decl.c (grokfndecl): Diagnose user definition of
eb66be0e 3022 implicitly-declared methods.
e349ee73
MS
3023
3024Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
3025
3026 * method.c (do_build_copy_constructor): Add code to give
eb66be0e
MS
3027 meaningful error messages instead of crashing.
3028 (do_build_assign_ref): Don't synthesize assignment operators for
3029 classes containing reference or const members.
e349ee73
MS
3030
3031 * class.c (struct base_info): Remove cant_synth_copy_ctor
3032 and cant_synth_asn_ref.
3033 (finish_base_struct): Remove the code that tries to conditionalize
eb66be0e
MS
3034 synthesis of copy constructors & assignment operators based on
3035 access permissions. Instead, let it fail when it tries to
3036 synthesize the copy constructor. This will give meaningful error
3037 messages instead of silently generating code to perform a bitcopy.
e349ee73
MS
3038
3039Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
3040
3041 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
eb66be0e 3042 determining types for constant values.
e349ee73
MS
3043
3044 * decl.c (struct named_label_list): Use instead of stuffing
3045 random items into a TREE_LIST node.
3046 (named_label_uses): Use the new struct.
d11ad92e
MS
3047 (poplevel): Likewise.
3048 (lookup_label): Likewise.
e349ee73 3049 (define_label): Add an error message to tell the user the line
eb66be0e
MS
3050 where the goto is located in addition to the destination of the
3051 goto.
e349ee73
MS
3052 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
3053 named_label_uses.
d11ad92e 3054 (finish_function): Likewise.
e349ee73
MS
3055
3056 (start_decl): Complain about defining a static data member
3057 in a different type from which it was declared.
3058
3059Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
3060
3061 * cvt.c (build_expr_type_conversion): Adjust.
3062
3063Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
3064
3065 * call.c (build_method_call): Always convert 'this' to the
eb66be0e 3066 appropriate type.
e349ee73
MS
3067
3068 * search.c (add_conversions): Put the conversion function in
eb66be0e 3069 TREE_VALUE, the type in TREE_PURPOSE.
e349ee73
MS
3070 * cvt.c (build_type_conversion): Adjust.
3071 * call.c (user_harshness): Adjust.
3072
3073 * method.c (emit_thunk): Call temporary_allocation and
eb66be0e 3074 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
e349ee73
MS
3075
3076 * tree.c (build_cplus_array_type): Handle tweaking of
eb66be0e 3077 TYPE_MAIN_VARIANT here.
e349ee73
MS
3078 * typeck.c (common_type): Not here.
3079
3080 * typeck.c (complete_type): Only try to complete an array type if
eb66be0e 3081 it has a domain.
e349ee73
MS
3082
3083Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
3084
3085 * decl.c (grokvardecl): Call complete_type.
3086 (grokdeclarator): Call complete_type for PARM_DECLs.
3087
3088Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
3089
3090 * pt.c (instantiate_class_template): Re-set
eb66be0e 3091 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
e349ee73
MS
3092
3093Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
3094
3095 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
3096 smart enough to do it right.
d11ad92e 3097 * tree.c (cp_expand_decl_cleanup): Likewise.
e349ee73
MS
3098 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
3099 cp_expand_decl_cleanup.
d11ad92e
MS
3100 (store_parm_decls): Likewise.
3101 (hack_incomplete_structures): Likewise.
3102 * except.c (push_eh_cleanup): Likewise.
e349ee73
MS
3103
3104Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
3105
3106 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
3107 frontend to the backend where it belongs.
d11ad92e
MS
3108 * tree.c (unsave_expr): Likewise.
3109 (unsave_expr_now): Likewise.
3110 * tree.def (UNSAVE_EXPR): Likewise.
3111 * cp-tree.h (unsave_expr): Likewise.
3112 (unsave_expr_now): Likewise.
e349ee73
MS
3113
3114Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
3115
3116 * init.c (emit_base_init): Make sure the partial EH cleanups live
3117 on the function_obstack.
3118
ce122a86
MS
3119Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
3120
3121 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
3122 when checking for pointer types.
3123
3124Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
3125
3126 * pt.c (instantiate_class_template): Remove obsolete check for
eb66be0e 3127 access declarations.
ce122a86
MS
3128
3129Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
3130
3131 * call.c (build_overload_call): Simplify calls to
3132 build_overload_call by removing last parameter.
d11ad92e
MS
3133 (build_method_call): Likewise.
3134 * cp-tree.h: Likewise.
3135 * method.c (build_opfncall): Likewise.
3136 * typeck.c (build_x_function_call): Likewise.
ce122a86
MS
3137
3138Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
3139
3140 * call.c (default_parm_conversions): Factor out common code.
3141 (build_method_call): Use it.
3142 (build_overload_call_real): Use it.
3143
4ac14744
MS
3144Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
3145
3146 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
3147 but pedwarn as the code is bogus.
d11ad92e 3148 * typeck.c (decay_conversion): Likewise.
4ac14744
MS
3149 (build_function_call_real): Use build_addr_func instead of
3150 default_conversion. Don't allow pointer-to-method functions down
3151 here.
3152 (build_unary_op): Use real pointer-to-member functions instead of
3153 fake ones.
3154 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
3155 (convert_for_assignment): Removed some obsolete code.
3156 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
3157 build_x_function_call instead of current_class_ptr. Only call
3158 digest_init once on an initializer, we do this just checking
3159 TREE_TYPE.
3160 (build_expr_from_tree): Pass current_class_ref to
3161 build_x_function_call instead of current_class_ptr.
d11ad92e
MS
3162 * init.c (build_member_call): Likewise.
3163 * pase.y: Likewise.
4ac14744
MS
3164 * error.c (dump_expr): Handle OFFSET_REFs better.
3165 * pt.c (unify): Handle pointer-to-member functions better.
3166 * decl.c (finish_function): Clear out current_class_ref just like
3167 we do for current_class_ptr.
3168
3169 * typeck.c (get_delta_difference): Handle virtual bases better.
3170
3171Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
3172
3173 * sig.c (build_signature_table_constructor): Use the delta for
3174 the original basetype for this virtual function with thunks.
3175 (build_signature_method_call): We still need to adjust 'this'
3176 with thunks.
3177
3178Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
3179
3180 * call.c (build_addr_func): New routine. Used to get the `real'
3181 address of a function or a method. Needed to avoid getting a
3182 pointer-to-member function.
3183 (build_call): New routine to build CALL_EXPRs.
3184 (build_method_call): Use it.
d11ad92e
MS
3185 * cvt.c (convert_to_aggr): Likewise.
3186 * typeck.c (build_function_call_real): Likewise.
4ac14744
MS
3187 * sig.c (build_signature_table_constructor): Use build_addr_func.
3188 * cp-tree.h (build_call, build_addr_func): Declare them.
3189
3190Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
3191
3192 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
3193 * parse.y: Remove uses of LOOKUP_AGGR.
3194
3195Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
3196
3197 * *.[chy]: Rename current_class_decl to current_class_ptr, and
3198 C_C_D to current_class_ref.
3199
3200Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
3201
3202 * call.c (convert_harshness): Tighten up pointer conversions.
3203
3204Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
3205
3206 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
3207 (finish_file): Likewise.
3208
3209Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
3210
3211 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
3212
3213 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
eb66be0e 3214 code.
4ac14744
MS
3215
3216Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
3217
3218 * decl2.c: Turn on thunks by default where supported.
3219
4dabb379
MS
3220Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
3221
3222 * cp-tree.h (build_overload_call_maybe): Removed.
3223 * call.c (build_overload_call_real): Invert meaning of last arg to
3224 be require_complete.
d11ad92e 3225 (build_overload_call): Likewise.
4dabb379
MS
3226 * typeck.c (build_x_function_call): Use build_overload_call_real
3227 instead of build_overload_call_maybe.
3228
a50f0918
MS
3229Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
3230
3231 * decl2.c (finish_file): Don't try to emit functions that haven't
eb66be0e 3232 been compiled.
a50f0918
MS
3233
3234Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
3235
3236 * decl2.c (finish_vtable_vardecl): Oops.
3237
3238 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
eb66be0e 3239 Also store the bindings from previous_class_values.
a50f0918
MS
3240 (pop_from_top_level): Restore them.
3241
3242Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
3243
3244 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
eb66be0e 3245 symbol has been referenced.
a50f0918
MS
3246 (finish_file): Re-join synthesis/vtable loop with inline emission
3247 loop, disable inlining when an inline is output.
3248
3249Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
3250
3251 * except.c (init_exception_processing): Setup saved_in_catch.
3252 (push_eh_cleanup): Reset __eh_in_catch.
3253 (expand_start_catch_block): Set __eh_in_catch.
3254
3255Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
3256
3257 * except.c (push_eh_cleanup): Add tracking for whether or not we
3258 have an active exception object.
3259 (expand_builtin_throw): Use it to make sure a rethrow without an
3260 exception object is caught.
3261
3262Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
3263
3264 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
eb66be0e 3265 cache.
a50f0918 3266
809c8c30
JM
3267Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
3268
3269 * decl2.c (finish_file): Also use sentries for vars with
eb66be0e
MS
3270 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
3271 created).
809c8c30
JM
3272
3273 * lex.c (handle_cp_pragma): Disable #pragma
eb66be0e 3274 interface/implementation if SUPPORTS_ONE_ONLY > 1.
809c8c30
JM
3275
3276Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
3277
3278 * method.c (emit_thunk): Wrap default case in
eb66be0e 3279 temporary/permanent_allocation.
809c8c30
JM
3280
3281 * method.c (make_thunk): Use DECL_ONE_ONLY.
3282 (emit_thunk): Call assemble_end_function.
3283
46b02c6d
MS
3284Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
3285
3286 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
d11ad92e 3287 (import_export_decl): Likewise.
46b02c6d
MS
3288 (finish_prevtable_vardecl): Disable vtable hack if
3289 SUPPORTS_ONE_ONLY > 1.
3290
3291Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
3292
3293 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
3294 PREDECREMENT_EXPRs take two arguments, not one.
3295
3296Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
3297
3298 * class.c (build_vtable_entry): Don't build thunks for abstract
eb66be0e 3299 virtuals.
46b02c6d
MS
3300
3301 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
eb66be0e 3302 frontend.
46b02c6d
MS
3303
3304Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
3305
3306 * class.c (set_rtti_entry): Use size_zero_node.
d11ad92e 3307 (build_vtable): Likewise.
46b02c6d
MS
3308
3309Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
3310
3311 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
d11ad92e 3312 (prepare_fresh_vtable): Likewise.
46b02c6d
MS
3313
3314Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
3315
3316 * method.c (emit_thunk): Call mark_used on the target function.
3317
3318 * call.c (build_method_call): Don't warn about pending templates.
3319
c7690c68
JM
3320Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
3321
3322 * decl2.c (finish_file): Fix list walking logic.
3323
46b02c6d
MS
3324 * typeck2.c (check_for_new_type): Only warn if -pedantic.
3325
3326Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
3327
3328 * class.c (finish_struct_1): Remove old code for
3329 dont_allow_type_definitions.
d11ad92e 3330 * cp-tree.h: Likewise.
46b02c6d
MS
3331 * spew.c: Make sure cp-tree.h is included before parse.h, so the
3332 definition of flagged_type_tree is found before it is used.
d11ad92e 3333 * lex.c: Likewise.
46b02c6d 3334 * parse.y: Added the ftype member to the type union, and changed a
eb66be0e 3335 number of rules to use it instead of ttype. Added calls to
46b02c6d
MS
3336 check_for_new_type() as appropriate.
3337 * typeck2.c (check_for_new_type): New function for checking
3338 if a newly defined type appears in the specified tree.
3339 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
3340 for check_for_new_type().
3341
67d743fe
MS
3342Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
3343
c7690c68
JM
3344 * decl2.c (finish_file): Only use a sentry if the decl is public.
3345
67d743fe
MS
3346 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
3347 don't pass LOOKUP_ONLYCONVERTING.
3348
3349Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
3350
3351 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
3352 properly keeps track of const and volatile type modifiers.
3353
3354Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
3355
3356 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
3357 * pt.c (comp_template_args): Use it.
3358
3359 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
3360 assemble_external for artificial function decls.
3361
3362 * decl.c (cp_finish_decl): Oops.
3363
3364Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
3365
3366 * decl2.c (import_export_decl): Put static data member templates
eb66be0e
MS
3367 into common storage, or make them weak, depending on whether they
3368 are dynamically or statically initialized.
67d743fe
MS
3369 (get_sentry): New function.
3370 (finish_file): Do import_export_decl for static data members before
3371 building the init/fini functions. Don't init/fini a variable that's
3372 EXTERNAL. Use a sentry for variables in common. Fix mismatching
3373 push/pop_temp_slots.
3374 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
eb66be0e 3375 expand_static_init thang.
67d743fe
MS
3376 * method.c (get_id_2): New function.
3377
3378Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
3379
3380 * parse.y (empty_parms): Make sure we use C++-style prototypes
eb66be0e 3381 when we're declaring member functions.
67d743fe
MS
3382
3383Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
3384
3385 * Makefile.in (CONFLICTS): 16 s/r conflicts.
3386 * parse.y (self_template_type): New nonterminal.
3387
a80e4195
MS
3388Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
3389
3390 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
eb66be0e 3391 name.
a80e4195
MS
3392 * parse.y (base_class.1): Allow 'typename foo::bar'.
3393
3394 * lex.c (check_newline): Remove #pragma code that plays with the
eb66be0e
MS
3395 input stream, since we now deal with tokens. Clear nextchar when
3396 we're done.
a80e4195
MS
3397 (handle_cp_pragma): Use real_yylex.
3398 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
3399 in one place.
3400
3401 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
3402
3403 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
3404
3405Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
3406
3407 * parse.y: New token SELFNAME for potential constructor.
3408 * spew.c (yylex): Handle it.
3409 * lex.c (identifier_type): Produce it.
3410
3411 * parse.y (complete_type_name): In :: case, don't push class binding.
d11ad92e 3412 (complex_type_name): Likewise.
a80e4195
MS
3413
3414Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
3415
3416 * typeck.c (build_reinterpret_cast): Handle pointer to member
eb66be0e 3417 functions.
a80e4195
MS
3418
3419Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
f72bbc37
BK
3420
3421 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
eb66be0e 3422 pragmas.
f72bbc37 3423 (check_newline): Put the vtable/unit/implementation/interface pragma
eb66be0e 3424 code into handle_cp_pragma, replacing it with a call.
f72bbc37 3425 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
eb66be0e 3426 args. Get the next token after handling the pragma token.
a80e4195
MS
3427
3428Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
3429
3430 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
d11ad92e 3431 (convert_to_pointer_force): Likewise.
a80e4195
MS
3432
3433 * init.c (build_new): Fix array new without -fcheck-new.
3434
3435Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
3436
3437 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
3438 tree.c: Lose TYPE_NESTED_NAME.
3439
3440 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
3441 as identifiers.
3442
3443 * tree.def: Add VEC_INIT_EXPR.
3444 * expr.c (cplus_expand_expr): Handle it.
3445 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
eb66be0e 3446 the extra file-scope symbol nastiness.
a80e4195
MS
3447
3448Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
3449
3450 * method.c (make_thunk): Thunks are static.
3451 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
3452
3453 * decl2.c (mark_vtable_entries): Emit thunks as needed.
3454 (finish_file): Don't emit them here.
3455
3456Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
3457
3458 * rtti.c (build_dynamic_cast): Handle null pointers.
3459 (ifnonnull): New function.
f72bbc37 3460
6b5fbb55
MS
3461Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
3462
a80e4195 3463 * call.c (build_method_call): Remember the original basetype we
eb66be0e
MS
3464 were called with. Give an error message instead of trying
3465 (incorrectly) to call a non-static member function through a
3466 non-inherited class.
a80e4195 3467
6b5fbb55
MS
3468 * search.c (expand_upcast_fixups): Mark the new fixup as
3469 DECL_ARTIFICIAL.
3470
3471Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
3472
3473 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
3474
3475 * class.c (set_rtti_entry): Fix for thunks.
3476
3477 * decl2.c (import_export_decl): Still emit typeinfo fns for
3478 cv-variants of builtin types.
3479
3480 * rtti.c (expand_class_desc): Set up base_info_type_node here.
3481 (init_rtti_processing): Instead of here.
3482
3483Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
3484
3485 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
3486 (build_typeid): Only complain about taking dynamic typeid without
3487 -frtti.
3488
3489 * decl2.c: flag_rtti defaults to 1.
3490
3491 * rtti.c (get_tinfo_var): The general class case is now smaller.
3492 (init_rtti_processing): Pack the latter three fields of base_info
3493 into 32 bits.
3494
3495Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
3496
3497 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
3498
3499Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
3500
3501 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
3502 (push_memoized_context): Split out code to undefer pop_type_level to
3503 (clear_memoized_cache): here.
3504 (pop_memoized_context): We can only handle one layer of deferral of
3505 pop_type_level so clear the cache, if there was a previous level.
3506
3507Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
3508
3509 * rtti.c (init_rtti_processing): Build up base_info_type_node.
3510 (expand_class_desc): Use one pointer to an array of base_info
3511 structs, passed using a CONSTRUCTOR.
3512
3513Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
3514
3515 * class.c (build_vbase_path): Remove block extern for
3516 flag_assume_nonnull_objects here.
3517 (build_vfn_ref): Split out functionality into build_vtbl_ref.
3518 (build_vtbl_ref): New routine.
3519 (build_vtable): Set up rtti info here.
3520 (add_virtual_function): Note in CLASSTYPE_RTTI the best
3521 place where we can get the rtti pointers from to avoid having to
3522 search around for a place.
d11ad92e
MS
3523 (finish_base_struct): Likewise.
3524 (finish_struct_1): Likewise. Never create totally new vtables
3525 with totally new vtable pointers for rtti. Disable code to layout
3526 vtable pointers better until we want to break binary
3527 compatibility.
6b5fbb55
MS
3528 * rtti.c (build_headof_sub): New routine to convert down to a
3529 sub-object that has an rtti pointer in the vtable.
3530 (build_headof): Use it. Also, use build_vtbl_ref now to be more
3531 maintainable.
3532 (build_dynamic_cast): Make sure we have saved it, if we need to.
3533 * search.c (dfs_init_vbase_pointers): Disable code that deals with
3534 a more efficient vtable layout, enable later.
3535 * call.c (flag_assume_nonnull_objects): Moved declaration to
3536 * cp-tree.h: here. Declare build_vtbl_ref.
3537 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
3538 function calls that want a tree.
3539
3540Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
3541
3542 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
eb66be0e 3543 other X subobjects in the most derived type. Ack.
6b5fbb55
MS
3544
3545 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
eb66be0e 3546 get_typeid will do it for us.
6b5fbb55
MS
3547 (get_typeid_1): Break out call-building for expand_*_desc to use.
3548 (get_typeid): Call it.
d11ad92e 3549 (expand_*_desc): Likewise.
6b5fbb55 3550 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
eb66be0e 3551 and void *.
6b5fbb55
MS
3552 (init_decl_processing): Lose builtin_type_tdescs lossage.
3553 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
3554
3555Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
3556
3557 * pt.c (tsubst): When calling set_nested_typename, use
eb66be0e
MS
3558 TYPE_NESTED_NAME (current_class_type) instead of
3559 current_class_name.
6b5fbb55 3560
d11ad92e
MS
3561 * decl.c (pushdecl): Likewise.
3562 (pushdecl_class_level): Likewise.
6b5fbb55
MS
3563 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
3564 set_nested_typename.
3565
3566Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
3567
3568 * rtti.c (synthesize_tinfo_fn): Handle arrays.
3569
3570 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
3571
3572Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
3573
3574 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
3575 (init_rtti_processing): Lose bad_cast_type.
3576 (build_dynamic_cast): Use throw_bad_cast.
3577
3578 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
3579
3580 * decl2.c (finish_file): Don't synthesize artificial functions
eb66be0e 3581 that are external and not inline.
6b5fbb55
MS
3582
3583 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
3584
3585 * decl2.c (finish_file): Handle having new inlines added to
eb66be0e 3586 saved_inlines by synthesis.
6b5fbb55
MS
3587
3588 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
3589
3590Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
3591
3592 RTTI rewrite to initialize nodes as needed, not require that
3593 users #include <typeinfo>, complete functionality and reduce wasted
3594 space.
3595 * rtti.c (init_rtti_processing): New fn.
3596 (build_typeid): The vtable entry is now a function.
3597 (get_tinfo_var): New fn.
d11ad92e 3598 (get_tinfo_fn): Likewise.
6b5fbb55
MS
3599 (get_typeid): Use it.
3600 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
3601 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
3602 points __rtti_*.
3603 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
3604 (synthesize_tinfo_fn): New fn.
3605 * method.c (build_t_desc_overload): Lose.
3606 (build_overload_with_type): More generic.
3607 * decl.c (init_decl_processing): Call init_rtti_processing.
3608 * class.c (set_rtti_entry): Use get_tinfo_fn.
3609 * decl2.c (mark_vtable_entries): Mark the rtti function.
3610 (finish_prevtable_vardecl): Don't build_t_desc.
3611 (import_export_decl): Handle tinfo functions.
d11ad92e 3612 (finish_file): Likewise.
6b5fbb55
MS
3613 * typeck.c (inline_conversion): New fn.
3614 (build_function_call_real): Use it.
3615 * cp-tree.h: Add decls.
3616
3617 * method.c (hack_identifier): Also convert component_refs from
eb66be0e 3618 references.
6b5fbb55
MS
3619
3620 * lex.c (cons_up_default_function): Use the type, not the name, in
eb66be0e 3621 declspecs.
6b5fbb55
MS
3622
3623 * decl2.c (import_export_vtable): Fix weak vtables.
3624
3625Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
3626
3627 * search.c (get_base_distance_recursive): Fix access checks for
eb66be0e 3628 protected bases.
6b5fbb55
MS
3629
3630Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3631
3632 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
3633 cp-tree.h.
3634 (convert_harshness): Add prototypes wrapped by PROTO.
3635 * decl2.c (grok_function_init): Likewise.
3636 (do_toplevel_using_decl): Change to void return type.
3637 * class.c (build_vtable_entry): Remove decl of make_thunk.
3638 (merge_overrides): Fix order of arg definitions.
3639 (finish_vtbls): Likewise.
3640 (fixup_vtable_deltas): Likewise.
3641 (modify_all_direct_vtables): Likewise.
3642 (modify_all_indirect_vtables): Likewise.
3643 * search.c (get_base_distance_recursive): Likewise.
3644 (get_abstract_virtuals_1): Likewise.
3645 (fixup_virtual_upcast_offsets): Likewise.
3646 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
3647 * init.c (perform_member_init): Fix order of arg definitions.
3648 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
3649 * cp-tree.h (make_thunk): Add decl.
3650 (overload_template_name, push_template_decl): Add decls.
3651 (do_toplevel_using_decl): Change to void return type.
3652 (vec_binfo_member): Add decl.
3653
cdf5b885
MS
3654Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3655
3656 * typeck.c (mark_addressable, convert_for_assignment,
3657 convert_for_initialization, pointer_int_sum, pointer_diff,
3658 unary_complex_lvalue): Add prototypes wrapped by PROTO.
3659 (convert_sequence): #if 0 fn decl, since definition also is.
3660
3661Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
3662
3663 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
3664 cast to pointer types for type searching.
3665
3666Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3667
3668 * typeck.c (get_delta_difference): Use cp_error, not error, in the
3669 case where BINFO == 0.
3670
3671Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
3672
3673 * call.c (build_method_call): Fix wording of error messages so
3674 constructors come out right.
3675
3676Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
3677
3678 * decl.c (push_overloaded_decl): Don't warn about hidden
3679 constructors when both the type and the function are declared
3680 in a system header file.
3681
c91a56d2
MS
3682Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
3683
3684 * class.c (finish_struct_1): Propagate the TYPE_PACKED
3685 flag for the type to the type's fields.
3686
3687Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3688
3689 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
3690
3691Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
3692
3693 * class.c (base_info, finish_base_struct): Replace
3694 needs_virtual_dtor with base_has_virtual.
3695
3696 (finish_struct_1): Remove the old code that tried to make default
eb66be0e
MS
3697 destructors virtual. Use base_has_virtual when checking if we need
3698 to add a vtable entry for the rtti code.
c91a56d2
MS
3699
3700Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
3701
3702 * pt.c (push_template_decl): Complain about template decl with
eb66be0e 3703 inappropriate declaration.
c91a56d2
MS
3704
3705Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
3706
3707 * typeck.c (build_x_unary_op): Remove bogus check for taking
3708 the address of a member function.
3709
3710Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
3711
3712 * parse.y (constructor_declarator): Only push the class if
3713 we are not already in the class.
3714
3715Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
6752b7d4
JL
3716
3717 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
3718 Add additional argument to INIT_CUMULATIVE_ARGS.
3719
c91a56d2
MS
3720Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
3721
3722 * decl.c (shadow_tag): Fix error about anon union with methods.
3723
3724 * parse.y (self_reference): Only generate a self-reference if this
eb66be0e 3725 is a non-template class.
c91a56d2
MS
3726 (opt.component_decl_list): Only use it if it was generated.
3727
3728 * parse.y (component_decl_1): Use constructor_declarator.
d11ad92e
MS
3729 (fn.def2): Likewise.
3730 (notype_component_declarator0): Likewise.
c91a56d2
MS
3731
3732Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
3733
3734 * typeck.c (build_x_unary_op): Add checks for taking the address
3735 of a TARGET_EXPR or of a member function, and give appropriate
3736 warnings.
3737
3738Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
3739
3740 * pt.c (process_template_parm): Allow template type parms to be
eb66be0e 3741 used as types for template const parms.
c91a56d2
MS
3742
3743Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
3744
3745 * init.c (expand_vec_init): Ensure the eh cleanups are on the
3746 function_obstack.
3747
3748Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
3749
3750 * decl.c (lookup_name_real): Be even more picky about the
eb66be0e 3751 ambiguous lookup warning.
c91a56d2
MS
3752 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
3753 * parse.y (constructor_declarator): Rather than here.
3754
3755 * parse.y (constructor_declarator): New nonterminal.
3756 (fn.def1): Use it.
d11ad92e 3757 (explicit_instantiation): Likewise.
c91a56d2
MS
3758
3759Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
3760
3761 Add implicit declaration of class name at class scope.
3762 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
3763 * parse.y (self_reference): New nonterminal.
3764 (opt.component_decl_list): Use it.
3765 (fn.def1): Add nested_name_specifier type_name cases.
3766 * class.c (build_self_reference): New function.
3767 (finish_struct): Handle access_default later, move self-reference
3768 decl to the end.
3769 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
3770 * cp-tree.h: Adjust.
3771
3772 * pt.c (do_function_instantiation): Separate handling of member
eb66be0e 3773 functions and non-member functions properly.
c91a56d2
MS
3774
3775Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
3776
3777 * pt.c (process_template_parm): Improve error for 'volatile class K'.
3778
3779 * class.c (finish_struct_1): Check the right slot for destructors.
3780
3781 * decl.c (start_enum): Complain about enum templates.
3782
3783Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
3784
3785 * init.c (resolve_offset_ref): Offset pointers to member data by one.
d11ad92e 3786 * typeck.c (unary_complex_lvalue): Likewise.
c91a56d2
MS
3787
3788Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
3789
3790 * typeck.c (c_expand_return): Check for a returned local
3791 array name, similar to the check for an ADDR_EXPR.
3792
3793Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
3794
3795 * decl.c (cp_finish_decl): Don't build cleanups for static
eb66be0e 3796 variables here.
c91a56d2
MS
3797
3798Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
3799
3800 * typeck.c (build_modify_expr): Fix error messages to be more
3801 accurate.
3802 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
3803 assignment operators.
d11ad92e 3804 * error.c (assop_as_string): Likewise. Add support for `%Q' for
c91a56d2
MS
3805 assignment operators.
3806
909e536a
MS
3807Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
3808
c91a56d2 3809 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
eb66be0e
MS
3810 give an error if initialized. Pedwarn about nested type with the
3811 same name as its enclosing class.
c91a56d2 3812
909e536a
MS
3813 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
3814
3815 * typeck.c (require_complete_type): Be sure to instantiate the
eb66be0e 3816 MAIN_VARIANT of the type.
909e536a
MS
3817
3818 * decl2.c (finish_file): Instantiate pending templates before
eb66be0e 3819 processing static constructors and destructors.
909e536a
MS
3820
3821 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
eb66be0e 3822 unless at_eof.
909e536a
MS
3823
3824Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
3825
3826 * decl2.c (delete_sanity): If error_mark_node is passed
3827 in as an expression, quit while we're ahead.
3828
3829 * decl.c (grokdeclarator): Give an error message if `friend'
3830 is combined with any storage class specifiers.
3831
fc378698
MS
3832Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
3833
3834 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
eb66be0e 3835 definition of nonexistent nested type.
fc378698
MS
3836
3837 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
eb66be0e 3838 not to say 'typedef'.
fc378698
MS
3839
3840Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3841
3842 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
3843 * search.c (dfs_walk, dfs_init_vbase_pointers,
3844 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
3845 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
3846
3847Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
3848
3849 * except.c (build_throw): Support minimal parse.
3850 * pt.c (tsubst_copy): Support THROW_EXPR.
d11ad92e 3851 * decl2.c (build_expr_from_tree): Likewise.
fc378698
MS
3852
3853 * pt.c (mangle_class_name_for_template): Always allocate
eb66be0e 3854 scratch_firstobj.
fc378698
MS
3855
3856Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
3857
3858 * cvt.c (cp_convert_to_pointer): Give an appropriate error
3859 when trying to cast from an incomplete type.
3860
3861Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
3862
3863 * pt.c (instantiate_class_template): Don't bother setting up
eb66be0e
MS
3864 CLASSTYPE_TAGS explicitly, as the nested types will add
3865 themselves.
fc378698
MS
3866
3867Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
3868
3869 * decl.c (shadow_tag): Remove old error check for usage of
3870 an enum without a previous declaration.
3871 (xref_tag): Add error message about usage of enums without a
3872 previous declaration.
3873
3874Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
3875
3876 * lex.c (do_identifier): Only do name consistency check if we're
eb66be0e 3877 parsing.
fc378698
MS
3878
3879 * pt.c (push_template_decl): Don't crash if we get a member defn
3880 that doesn't match.
3881
3882 * decl.c (xref_tag_from_type): New function to do an xref without
eb66be0e 3883 always having to figure out code_type_node.
fc378698
MS
3884 * cp-tree.h: Declare it.
3885 * pt.c (instantiate_class_template): Use it for friend classes.
eb66be0e 3886 (lookup_template_class): Use it.
fc378698
MS
3887
3888 * typeck2.c (build_functional_cast): Pull out a single parm before
eb66be0e 3889 passing it to build_c_cast.
fc378698
MS
3890
3891Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
3892
3893 * expr.c (do_case): Give an error message if a pointer is
3894 given as a case value.
3895
3896Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
3897
3898 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
eb66be0e 3899 an overload list.
fc378698
MS
3900
3901 * lex.c (cons_up_default_function): Really, now, interface hackery
eb66be0e 3902 does not apply to synthesized methods.
fc378698
MS
3903
3904Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
3905
3906 * call.c (build_method_call): Ctors and dtors now have special names
3907 with respect to lookups.
d11ad92e
MS
3908 * class.c (add_method): Likewise.
3909 (grow_method): Likewise.
3910 (finish_struct_methods): Likewise.
3911 (warn_hidden): Likewise.
3912 (finish_struct_1): Likewise.
3913 * cvt.c (convert_to_reference): Likewise.
3914 (convert_to_aggr): Likewise.
3915 (cp_convert): Likewise.
3916 * decl2.c (check_classfn): Likewise.
3917 * init.c (expand_member_init): Likewise.
3918 (expand_default_init): Likewise.
3919 (expand_aggr_init_1): Likewise.
3920 (build_offset_ref): Likewise.
3921 (build_new): Likewise.
3922 (build_delete): Likewise.
3923 * lex.c (do_inline_function_hair): Likewise.
3924 * search.c (lookup_field_1): Likewise.
3925 (lookup_fnfields_here): Likewise.
3926 (lookup_field): Likewise.
3927 (lookup_fnfields): Likewise.
3928 (get_virtual_destructor): Likewise.
3929 (dfs_debug_mark): Likewise.
3930 (dfs_pushdecls): Likewise.
3931 (dfs_compress_decls): Likewise.
3932 * tree.c (layout_basetypes): Likewise.
3933 * typeck.c (build_component_ref): Likewise.
3934 (build_x_function_call): Likewise.
3935 (build_modify_expr): Likewise.
3936 (convert_for_initialization): Likewise.
3937 (build_functional_cast): Likewise.
3938 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
fc378698
MS
3939 (CTOR_NAME): New.
3940 (DTOR_NAME): New.
3941 * decl.c (ctor_identifier): New.
3942 (dtor_identifier): New.
3943 (init_decl_processing): Set them.
3944
3945Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
3946
3947 * typeck.c (build_component_ref): Don't get confused by fields whose
3948 context has no type name, like pointer to member functions.
3949
3950Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
3951
3952 * decl.c (grokdeclarator): Handle typedef without declarator.
3953
3954 * pt.c (tsubst): Handle SCOPE_REF in declarator.
3955
3956 * parse.y (bad_parm): Catch another case of missing `typename'.
3957
3958 * lex.c (yyprint): Handle TYPE_DECLs.
3959
3960 * decl.c (start_function): Don't try to be clever.
3961
3962 * lex.c: Lose compiler_error_with_decl.
3963 * typeck2.c: Lose error_with_aggr_type.
3964 (incomplete_type_error): Use cp_* instead of old functions.
d11ad92e
MS
3965 (readonly_error): Likewise.
3966 * typeck.c (convert_arguments): Likewise.
3967 * search.c (lookup_nested_field): Likewise.
3968 * method.c (make_thunk): Likewise.
3969 * decl.c (grokparms): Likewise.
fc378698
MS
3970 * cp-tree.h: Update.
3971
3972 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
eb66be0e 3973 and value.
fc378698
MS
3974
3975Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
3976
3977 * method.c (build_opfncall): When deleting a pointer to an
3978 array, build a new pointer to the tree past any ARRAY_TYPE
3979 nodes.
3980
3981Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3982
3983 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
3984
3985Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
3986
3987 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
eb66be0e 3988 and ! DECL_INLINE.
fc378698
MS
3989
3990 * decl.c (finish_function): Don't set nested based on
eb66be0e 3991 hack_decl_function_context.
fc378698 3992 * parse.y (function_try_block): Check for nested function.
d11ad92e 3993 (pending_inlines): Likewise.
fc378698
MS
3994
3995 * decl2.c (build_expr_from_tree): If a unary op already has a
eb66be0e 3996 type, just return it.
fc378698
MS
3997
3998 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
3999
4000 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
4001 (finish_file): Check the return value of walk_vtables.
4002 (finish_prevtable_vardecl): Return int.
d11ad92e
MS
4003 (finish_vtable_vardecl): Likewise.
4004 (prune_vtable_vardecl): Likewise.
4005 * lex.c (set_vardecl_interface_info): Likewise.
fc378698
MS
4006 * cp-tree.h: Adjust return types.
4007
4008 * class.c (delete_duplicate_fields_1): Don't complain about
eb66be0e 4009 duplicate nested types if they're the same type.
fc378698
MS
4010 (finish_struct): Remove check for duplicate.
4011 * decl2.c (grokfield): Don't check for typedef of anonymous type.
4012
4013Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
4014
4015 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
4016
4017 * decl.c (grokdeclarator): Lose special handling of class-level
eb66be0e
MS
4018 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
4019 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
fc378698
MS
4020
4021 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
4022
4023 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
4024
4025 * search.c (compute_access): Fix handling of anonymous union
eb66be0e 4026 members.
fc378698 4027 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
eb66be0e 4028 from anonymous unions to their members.
fc378698
MS
4029
4030 * typeck.c (build_x_function_call): For static member functions,
eb66be0e 4031 hand off to build_member_call.
fc378698
MS
4032
4033Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
4034
4035 * typeck.c (build_component_ref): Handle OFFSET_REFs.
4036
4037 * init.c (expand_vec_init): Fix init == 0 case.
4038
4039Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
4040
4041 * init.c (build_new): Pedwarn about init and array new.
4042 (expand_vec_init): Handle lists, use convert_for_initialization
4043
4044 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
eb66be0e 4045 when converting to an aggregate type.
fc378698
MS
4046 * cvt.c (cp_convert): Pass it through.
4047
4048 * typeck.c (build_conditional_expr): Handle user-defined
eb66be0e 4049 conversions to slightly different types.
fc378698
MS
4050
4051 * decl.c (grokdeclarator): Force an array type in a parm to be
eb66be0e 4052 permanent.
fc378698
MS
4053
4054 * decl2.c (do_using_directive): Sorry.
d11ad92e 4055 (do_namespace_alias): Likewise.
fc378698
MS
4056 * lex.c (real_yylex): Warn about using the `namespace' keyword.
4057
4058Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
4059
4060 * parse.y (datadef): Move call to note_list_got_semicolon up.
4061
934c6b13
MS
4062Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
4063
4064 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
4065
4066Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
4067
4068 * decl.c (cp_finish_decl): The exception regions have to be
4069 nested, not overlapping. We start the exception region for a
4070 decl, after it has been fully built, and all temporaries for it
4071 have been cleaned up.
4072
4073Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
4074
4075 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
4076
e76a2646
MS
4077Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
4078
4079 * tree.def: Add RETURN_INIT.
4080 * pt.c (instantiate_decl): Handle RETURN_INIT.
4081 * decl.c (store_return_init): Handle minimal_parse_mode.
4082
4083 * tree.c (cp_build_type_variant): Just return an error_mark_node.
4084 * decl.c (make_typename_type): Don't try to get the file and line
eb66be0e 4085 of an identifier.
e76a2646
MS
4086 * typeck.c (comptypes): Handle TYPENAME_TYPE.
4087
4088Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
4089
4090 * decl.c (poplevel): Make sure we clear out and restore old local
4091 non-VAR_DECL values by default when they go out of scope.
4092
4093Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
4094
4095 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
eb66be0e 4096 referring to addresses of variables and functions.
e76a2646
MS
4097
4098 * error.c (dump_expr): Support SIZEOF_EXPR.
4099
4100 * init.c (do_friend): Use the return value of check_classfn.
4101
4102 * typeck.c (convert_arguments): Call complete_type.
4103
4104 * method.c (hack_identifier): After giving an error, set value to
eb66be0e 4105 error_mark_node.
e76a2646
MS
4106
4107Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
4108
4109 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
eb66be0e 4110 lossage for local classes.
e76a2646
MS
4111 * cp-tree.h: Declare it.
4112 * decl.c (lookup_name_real): Evil, painful hack for local classes.
4113 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
4114 Use hack_decl_function_context.
4115 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
4116 (start_function): Use hack_decl_function_context.
d11ad92e
MS
4117 (finish_function): Likewise.
4118 * method.c (synthesize_method): Likewise.
4119 * lex.c (process_next_inline): Likewise.
4120 (do_pending_inlines): Likewise.
e76a2646 4121 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
eb66be0e 4122 done with it.
e76a2646
MS
4123
4124Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
4125
4126 * sig.c (build_signature_pointer_or_reference_type): Align
4127 signature pointers/references on 8-byte boundaries so they can be
4128 grabbed 2 words at a time on a Sparc.
4129
4130Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
4131
4132 * method.c (hack_identifier): Requiring a static chain is now a
eb66be0e 4133 hard error.
e76a2646 4134 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
eb66be0e 4135 functions.
e76a2646
MS
4136
4137Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
4138
4139 * init.c (build_offset_ref): Call complete_type.
4140
4141 * decl.c (pop_from_top_level): Always pop previous_class_type.
4142
4143 * parse.y: Handle multiple decls in a for-init-statement.
d11ad92e 4144 * pt.c (tsubst_expr): Likewise.
e76a2646
MS
4145
4146 * pt.c (tsubst): Use tsubst_expr for the second operand of an
eb66be0e 4147 ARRAY_REF.
e76a2646
MS
4148
4149 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
4150 (poplevel_class): Set it here.
4151 (pop_from_top_level): Pop it here if we're returning to class scope.
4152 * class.c (pushclass): Don't set it here.
4153
4154 * decl.c (maybe_push_to_top_level): Save current_template_parms,
eb66be0e 4155 and clear it if !pseudo.
e76a2646
MS
4156 (pop_from_top_level): Restore it.
4157
4158 * decl2.c (finish_file): Push the dummy each time we walk the list
eb66be0e 4159 of vtables.
e76a2646
MS
4160
4161 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
eb66be0e 4162 something for CAST_EXPR.
e76a2646
MS
4163
4164Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
4165
4166 * cvt.c (cp_convert): Warn about implicit conversion of the
4167 address of a function to bool, as it is always true.
4168
4169Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
4170
4171 * typeck.c (c_expand_return): Fix warning for local externs returned.
4172
4173Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
4174
4175 * tree.c (mapcar): Propagate const and volatile properly.
4176
4177 * typeck.c (complete_type): Be sure to instantiate the
eb66be0e 4178 MAIN_VARIANT of the type.
e76a2646
MS
4179
4180 * method.c (synthesize_method): Class interface hackery does not
4181 apply to synthesized methods.
4182
4183Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
4184
4185 * pt.c (comp_template_args): Use comptypes rather than just
eb66be0e 4186 checking for TEMPLATE_TYPE_PARM equivalence.
e76a2646
MS
4187
4188 * typeck.c (build_x_function_call): Call complete_type before
eb66be0e 4189 checking TYPE_OVERLOADS_CALL_EXPR.
e76a2646 4190
7ea63af7
MH
4191Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
4192
4193 * g++.c (main): Check also for new define ALT_LIBM.
4194
ec255269
MS
4195Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
4196
4197 * pt.c (instantiate_class_template): If we don't have a pattern
eb66be0e 4198 yet, that's OK.
ec255269
MS
4199 (coerce_template_parms): If we see a local class, bail.
4200
4201 * decl.c (grok_reference_init): Make sure there's a type before
eb66be0e 4202 checking its code.
ec255269
MS
4203
4204 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
d11ad92e 4205 (push_template_decl): Likewise.
ec255269
MS
4206
4207 * parse.y (named_class_head): Set
eb66be0e 4208 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
ec255269
MS
4209
4210 * decl.c (xref_tag): Diagnose redeclaration of template
eb66be0e 4211 type-parameter name.
ec255269
MS
4212
4213 * error.c (dump_type): Handle anonymous template type parms.
4214
4215 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
eb66be0e 4216 TYPE_STUB_DECL.
d11ad92e 4217 (coerce_template_parms): Likewise.
ec255269
MS
4218
4219Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
4220
4221 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
4222 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
4223
4224Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
4225
4226 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
eb66be0e 4227 before trying to get its STUB_DECL.
d11ad92e 4228 (coerce_template_parms): Likewise.
ec255269
MS
4229
4230 * parse.y (template_type_parm): If they didn't use 'class',
eb66be0e 4231 pretend they did after giving an error.
ec255269
MS
4232
4233 * pt.c (coerce_template_parms): Diagnose use of local class.
4234
4235 * decl.c (grok_reference_init): Use instantiate_type.
4236
4237 * error.c (dump_expr): Handle TEMPLATE_DECLs.
4238
4239 * parse.y (named_class_head): Diagnose mismatching types and tags.
4240
4241 * decl.c (pushdecl): Type decls and class templates clash with
eb66be0e 4242 artificial type decls, not hide them.
ec255269
MS
4243
4244 * decl.c (redeclaration_error_message): Diagnose redefinition of
eb66be0e 4245 templates properly.
ec255269
MS
4246 (duplicate_decls): Diagnose disallowed overloads for template
4247 functions, too.
4248
4249 * decl.c (start_decl): Call complete_type before checking for a
eb66be0e 4250 destructor.
ec255269
MS
4251
4252 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
4253
4254 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
4255
5566b478
MS
4256Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
4257
ec255269 4258 * decl.c (grok_op_properties): Don't check for operator++(int) in
eb66be0e 4259 a template.
ec255269
MS
4260
4261 * tree.c (perm_manip): Return a copy of variable and function
eb66be0e 4262 decls with external linkage.
ec255269
MS
4263
4264 * tree.def: Change some of the min tree codes to type "1".
4265 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
4266 * method.c (build_overload_int): Emit something arbitrary for
eb66be0e 4267 anything but an INTEGER_CST if we're in a template.
ec255269
MS
4268
4269 * decl.c (cp_finish_decl): Call complete_type before deciding
eb66be0e 4270 whether or not to lay out the decl.
ec255269 4271
5566b478
MS
4272 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
4273
4274Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
4275
4276 * typeck2.c (build_x_arrow): Call complete_type.
4277
4278 * pt.c (add_pending_template): Broken out.
eb66be0e
MS
4279 (lookup_template_class): If -fexternal-templates, call it for all
4280 the methods of implemented types.
5566b478
MS
4281 (instantiate_class_template): Instead of instantiating them here.
4282 (instantiate_decl): Handle -fexternal-templates earlier.
4283
4284Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4285
4286 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
4287 memoized lookup stuff inside GATHER_STATISTICS.
4288
4289Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
4290
4291 * decl.c (start_decl): Complain about array of incomplete type
4292 here.
4293 (grokdeclarator): Not here.
4294
4295 * parse.y (template_parm): Expand full_parm inline so we can set
eb66be0e 4296 the rule's precedence.
5566b478
MS
4297
4298 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
4299 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
4300 * decl2.c (grokbitfield): Don't check for integer constant here.
4301 * class.c (finish_struct_1): Check here.
4302
4303 * decl.c (define_label): Make the min decl go on permanent_obstack.
4304
4305 * pt.c (unify): Don't handle CONST_DECLs.
4306 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
d11ad92e 4307 (tsubst_copy): Likewise.
5566b478
MS
4308
4309 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
eb66be0e 4310 CONST_DECL for a template parm.
5566b478
MS
4311
4312Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
4313
4314 * decl.c (grokdeclarator): Complain about array of incomplete type
4315 here.
4316 (start_decl_1): Not here.
4317
4318 * pt.c (tsubst): Handle pointer-to-function declarators.
4319
4320 * method.c (hack_identifier): If pedantic, diagnose local class
eb66be0e 4321 methods that require a static chain.
5566b478
MS
4322
4323 * decl.c (grok_op_properties): No longer static.
4324 * cp-tree.h: Declare it.
4325 * pt.c (tsubst): Call it for operators.
4326 Use tsubst_copy for TREE_VECs.
4327
4328 * parse.y (template_arg): The expr has precedence like '>'.
4329
4330Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
4331
4332 * pt.c (coerce_template_parms): Don't coerce an expression using
eb66be0e 4333 template parms.
5566b478
MS
4334 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
4335 (tsubst): Don't use build_index_2_type if the max_value uses template
4336 parms.
4337 * method.c (build_overload_int): Emit something arbitrary for an
eb66be0e 4338 expression using template parms.
5566b478
MS
4339
4340 * parse.y (template_close_bracket): New non-terminal to catch use
eb66be0e 4341 of '>>' instead of '> >' in template class names.
5566b478
MS
4342 (template_type): Use it.
4343 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
4344
4345 * tree.def: Add CAST_EXPR.
4346 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
eb66be0e 4347 CONVERT_EXPR for minimal_parse_mode.
d11ad92e
MS
4348 * typeck.c (build_c_cast): Likewise.
4349 * pt.c (tsubst_copy): Likewise.
4350 * decl2.c (build_expr_from_tree): Likewise.
4351 * error.c (dump_expr): Likewise.
5566b478
MS
4352
4353Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4354
4355 * except.c (SetTerminate, SetUnexpected): Put back global vars.
4356 (init_exception_processing): Put back decl/init of
4357 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
4358 fns from libstdc++.
4359
4360 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
4361 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
4362 Delete unused fns.
4363 * cp-tree.h (declare_uninstantiated_type_level,
4364 uninstantiated_type_level_p): Delete prototypes.
4365
4366Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
4367
4368 * pt.c (tsubst_expr): Add default return.
4369
4370Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4371
4372 * error.c (fndecl_as_string): Delete unused arg CNAME.
4373 * sig.c (build_signature_table_constructor,
4374 build_signature_method_call): Fix calls.
4375
4376 * class.c (the_null_vtable_entry): Delete var definition.
4377 (init_class_processing): Delete tree the_null_vtable_entry init.
4378 * decl.c (no_print_{functions, builtins}): Declare as static.
4379 (__tp_desc_type_node): #if 0 var definition.
4380 (init_type_desc): #if 0 init of __tp_desc_type_node.
4381 (vb_off_identifier): Move var decl into init_decl_processing.
4382 (current_function_assigns_this): Declare as static.
4383 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
4384 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
4385 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
4386 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
4387 * init.c (BI_header_type, BI_header_size): Declare as static.
4388 * pt.c (template_classes): Delete unused var.
4389 (add_pending_template): Delete decl for non-existent fn.
4390 (lookup_template_class): Delete vars CODE and TAG_CODE.
4391 (instantiate_template): Delete unused var TARGS.
4392 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
4393 Delete decls.
4394 (__tp_desc_type_node): #if 0 var decl.
4395 (fndecl_as_string): Fix prototype.
4396
4397Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
4398
4399 * tree.def: Add GOTO_STMT.
4400 * pt.c (tsubst_expr): Support goto and labels.
4401 * decl.c (define_label): Support minimal parsing.
d11ad92e 4402 * parse.y (simple_stmt): Likewise.
5566b478
MS
4403
4404Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4405
4406 * xref.c (GNU_xref_member): Only define/set var I if
4407 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
4408 used.
4409 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
4410 (GNU_xref_end): Fix call.
4411 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
4412 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
4413
4414 * tree.c (build_exception_variant): Delete unused vars I, A, T,
4415 T2, and CNAME.
4416 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
4417 (mapcar): Delete unused var CODE.
4418 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
4419 (break_out_cleanups): Fix call.
4420 (bot_manip): Likewise.
4421 * call.c (build_method_call): Likewise.
4422 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
4423 Likewise.
4424 * typeck.c (unary_complex_lvalue, build_modify_expr,
4425 convert_for_initialization): Likewise.
4426 * typeck2.c (build_functional_cast): Likewise.
4427 * cp-tree.h (build_cplus_new): Fix prototype.
4428
4429 * repo.c (open_repo_file): Delete unused var Q.
4430 (repo_compile_flags, repo_template_declared,
4431 repo_template_defined, repo_class_defined, repo_inline_used,
4432 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
4433 (repo_get_id, repo_vtable_used): Declare as static.
4434 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
4435 prototypes.
4436
4437Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
4438
4439 * parse.y (pending_inlines): Add function_try_block case.
4440
4441 * pt.c (unify): Fix for template const parms.
4442
4443Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4444
4445 * lex.c (extract_interface_info): Delete forward decl.
4446 (default_copy_constructor_body, default_assign_ref_body): Delete
4447 decls for non-existent functions.
4448 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
4449 (init_lex): Delete setting them.
4450 (cons_up_default_function): Delete unused vars FUNC_BUF,
4451 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
4452 #if 0'd synth code.
4453 (toplevel, expression_obstack): Delete unused extern decls.
4454 (tree_node_kind): Delete unused enum.
4455 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
4456 GATHER_STATISTICS.
4457 (tree_node_kind_names): Delete unused extern decl.
4458 (synth_obstack): Delete unused var.
4459 (init_lex): Don't set it.
4460 (init_parse): Add decl before use.
4461 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
4462 (current_unit_{name, language}): Delete unused vars.
4463 (check_newline): Don't bother setting them, just accept the #pragma.
4464 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
4465 (current_unit_{name, language}): Delete decls.
4466
4467 * search.c: Wrap all of the memoized functions, macros, and
4468 variables inside #ifdef GATHER_STATISTICS.
4469 (lookup_field, lookup_fnfields): Likewise.
4470 (init_search_processing): Likewise.
4471 (reinit_search_statistics): Wrap whole function.
4472 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
4473
4474 * decl.c (finish_function): Only call pop_memoized_context if
4475 GATHER_STATISTICS is defined.
4476 (start_function): Likewise for push_memoized_context.
4477 * class.c (pushclass, popclass): Likewise.
4478
4479 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
4480 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
4481
4482 * cvt.c (cp_convert): Delete unused local var FORM.
4483 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
4484 prototypes.
4485
4486Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
4487
4488 * pt.c (do_poplevel): Oops; really return what we get from
eb66be0e 4489 poplevel this time.
5566b478
MS
4490
4491Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4492
4493 * cp-tree.h (is_aggr_type): Add prototype.
4494
4495 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
4496 * method.c ({push,pop}_cp_function_context): Delete decls.
4497 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
4498 (SetUnexpected, SetTerminate): Delete unused vars.
4499 (init_exception_processing): Don't set SetUnexpected or
4500 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
4501 (output_exception_table_entry): Delete unused array LABEL.
4502 (expand_internal_throw): Delete unused var PARAMS.
4503 (expand_start_catch_block): Delete unused var CLEANUP.
4504 (emit_exception_table): Delete unused var EH_NODE_DECL.
4505 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
4506 GOTO_UNWIND_AND_THROW. Don't set them.
4507 (end_eh_unwinder): Add top decl.
4508 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
4509 (exception_section, push_rtl_perm, do_function_call,
4510 lang_interim_eh, push_eh_cleanup, eh_outer_context,
4511 expand_end_eh_spec, end_eh_unwinder): Declare as static.
4512 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
4513 throw_used): Likewise.
4514 * cp-tree.h (expand_end_eh_spec): Delete prototype.
4515
4516 * search.c (dfs_mark, dfs_mark_vtable_path,
4517 dfs_unmark_vtable_path, dfs_mark_new_vtable,
4518 dfs_unmark_new_vtable, dfs_clear_search_slot,
4519 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
4520 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
4521 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
4522 functions.
4523 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
4524 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
4525 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
4526 Only define #ifdef GATHER_STATISTICS.
4527 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
4528 is defined.
4529 (vbase_decl): Delete var definition.
4530 (init_search): Delete old decl.
4531 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
4532 never actually used.
4533 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
4534 (get_base_distance_recursive): Delete unused fourth arg
4535 BASETYPE_PATH. Fix call .
4536 (get_base_distance): Fix call.
4537 (push_class_decls): Delete unused var ID.
4538 (make_memoized_table_entry): Declare as static.
4539 (breadth_first_search): Declare as static.
4540 (tree_has_any_destructor_p): Declare as static.
4541 (pop_class_decls): Delete unused arg pop_class_decls.
4542 * class.c (popclass): Fix call to pop_class_decls.
4543 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
4544 tree_has_any_destructor_p): Delete prototypes.
4545
4546 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
4547 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
4548 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
4549 (build_user_desc): Delete unused var T.
4550 (build_class_desc): Delete unused vars T and OFF.
4551 (build_t_desc): Delete unused var NAME_STRING.
4552 (build_headof): Make static.
4553 (get_bad_cast_node): Likewise.
4554 (get_def_to_follow): Likewise.
4555 * cp-tree.h (init_type_desc): Add prototype.
4556 (build_headof): Remove prototype.
4557
4558Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
4559
4560 * pt.c (tsubst): Only look for matching decls at file scope for
eb66be0e 4561 non-member functions.
5566b478
MS
4562
4563 * call.c (build_scoped_method_call): Handle scoped destructor
eb66be0e 4564 calls in templates.
5566b478
MS
4565
4566 * decl.c (*_top_level): Also save previous_class_values.
4567
4568 * pt.c (tsubst_expr): Support do {} while loops.
d11ad92e
MS
4569 * parse.y (simple_stmt): Likewise.
4570 * tree.def: Likewise.
5566b478
MS
4571
4572 * method.c (build_overload_identifier): For a class nested in a
eb66be0e
MS
4573 template class, don't mangle in the template parms from our
4574 context.
5566b478
MS
4575
4576 * lex.c, cp-tree.h: Remove support for template instantiations in
eb66be0e 4577 the pending_inlines code.
5566b478
MS
4578 * pt.c: Remove dead functions and unused arguments.
4579 (uses_template_parms): TYPENAME_TYPEs always use template parms.
4580 * parse.y: Stop passing anything to end_template_decl.
4581 * tree.c (print_lang_statistics): Only print tinst info #ifdef
eb66be0e 4582 GATHER_STATISTICS.
5566b478
MS
4583
4584Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4585
4586 * init.c (expand_recursive_init{,_1}): Delete decls.
4587 (sort_member_init): Delete unused var INIT.
4588 (emit_base_init): Delete unused var X.
4589 (build_offset_ref): Delete unused var CNAME.
4590 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
4591 (emit_base_init): Delete unused local var BASE. Delete extern
4592 decl of IN_CHARGE_IDENTIFIER.
4593 (build_delete): Delete unused local var VIRTUAL_SIZE.
4594
4595 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
4596 (build_delete): Fix call.
4597 * decl2.c (delete_sanity): Likewise.
4598 * cp-tree.h (build_vec_delete): Update prototype.
4599
4600 * typeck.c (common_base_type): Delete unused var TMP.
4601 (build_binary_op): Delete local var ARGS_SAVE.
4602 (build_array_ref): Delete unused var ITYPE.
4603 (c_expand_return): Delete unused var USE_TEMP.
4604
4605 * typeck.c (compexcepttypes): Delete unused arg STRICT.
4606 (comptypes): Fix calls.
4607 * decl.c (duplicate_decls): Likewise.
4608 * cp-tree.h (compexcepttypes): Delete extra arg.
4609
4610 * decl2.c (check_classfn): Delete unused second arg CNAME.
4611 * decl.c (start_decl, grokfndecl): Fix calls.
4612 * init.c (do_friend): Likewise.
4613 * cp-tree.h (check_classfn): Update prototype.
4614
4615 * cp-tree.h (signature_error, import_export_vtable,
4616 append_signature_fields, id_in_current_class, mark_used,
4617 copy_assignment_arg_p): Add decls.
4618 * decl2.c (mark_used): Delete decl.
4619
4620 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
4621
4622 * class.c (get_vtable_entry): Diable unused function.
4623 (doing_hard_virtuals): Delete unused static global var.
4624 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
4625 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
4626 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
4627 (modify_one_vtable): Delete unused var OLD_RTTI.
4628 (finish_struct_anon): Delete unused vars OFFSET and X.
4629 (finish_struct_bits): Delete unused var METHOD_VEC.
4630 (get_basefndecls): Delete unused var PURPOSE. Delete unused
4631 for-scope local variable METHODS.
4632
4633 * call.c (user_harshness): Delete unused/unneeded arg PARM.
4634 (ideal_candidate): Delete unused args BASETYPE and PARMS.
4635 (build_method_call): Delete unused args passed into ideal_candidate.
4636 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
4637 * cp-tree.h (synthesize_method): Add decl.
4638
4639 * decl.c (note_level_for_for): Give void return type.
4640 (pushdecl_nonclass_level): Likewise.
4641 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
4642 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
4643 (suspend_binding_level): Delete unused var LEVEL.
4644 (duplicate_decls): Delete unused var CTYPE.
4645 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
4646 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
4647 PTR_ENDLINK.
4648 (grokdeclarator): Delete unused var C.
4649 (grokdeclarator): Delete unused var SIZE_VARIES.
4650 (grokparms): Delete unused var SAW_VOID.
4651 (start_function): Delete unused var OLDDECL.
4652 (cplus_expand_expr_stmt): Delete unused var
4653 REMOVE_IMPLICIT_IMMEDIATELY.
4654
4655 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
4656
4657 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
4658
4659Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
4660
4661 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
d11ad92e 4662 (build_min_nt): Likewise.
5566b478
MS
4663 * pt.c (do_pushlevel): Emit line note.
4664 (do_poplevel): Return what we get from poplevel.
4665 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
4666 * parse.y: Use do_pushlevel and do_poplevel.
4667 * cp-tree.h: Declare do_poplevel.
4668
4669 * cp-tree.h: Declare at_eof.
4670 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
4671 * decl2.c (import_export_decl): Renamed from import_export_inline.
4672 (finish_file): Call it to do interface handling for statics.
4673 * pt.c (tsubst_copy): Call mark_used on variables and functions
eb66be0e 4674 used here.
5566b478
MS
4675
4676 * decl2.c (finish_file): Don't emit statics we can't generate.
4677 * pt.c (instantiate_decl): Don't set interface on instantiations
eb66be0e 4678 we can't generate.
5566b478
MS
4679
4680 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
4681 * tree.c (print_lang_statistics): Print max template depth.
4682 * pt.c (push_tinst_level): Dump entire instantiation context.
4683 (instantiate_class_template): Use it and pop_tinst_level.
d11ad92e 4684 (instantiate_decl): Likewise.
5566b478
MS
4685
4686 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
eb66be0e 4687 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
5566b478
MS
4688
4689Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
4690
4691 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
eb66be0e
MS
4692 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
4693 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
4694 the new template implementation.
5566b478
MS
4695
4696Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4697
4698 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
4699
cffa8729
MS
4700Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
4701
4702 * decl.c (cp_finish_decl): Delay emitting the debug information for
4703 a typedef that has been installed as the canonical typedef, if the
4704 type has not yet been defined.
4705
4706Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
4707
4708 * decl2.c (grokfield): Still call pop_nested_class for access decls.
4709
4710Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4711
4712 * decl.c (lookup_label): Call label_rtx.
4713
4714 * decl.c (make_binding_level): New function.
4715 (pushlevel, pushlevel_class): Call it instead of explicit
4716 duplicate calls to xmalloc.
4717
4718 * decl.c (init_decl_processing): Delete useless build_pointer_type
4719 call.
4720
4721 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
4722 (sizet_ftype_string): Delete variable.
4723 (init_decl_processing): Add built-in functions fabsf, fabsl,
4724 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
4725 variable strlen_ftype, used for strlen.
4726
4727Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
4728
4729 * decl.c (push_to_top_level): Start from current_binding_level
eb66be0e
MS
4730 again for now; the stl hacks depend on g++ being broken in this
4731 way, and it'll be fixed in the template rewrite.
cffa8729
MS
4732
4733 * tree.def: Add USING_DECL.
4734 * decl2.c (do_class_using_decl): Implement.
4735 (grokfield): Pass access decls off to do_class_using_decl instead of
4736 grokdeclarator.
4737 * error.c (dump_decl): Handle USING_DECLs.
4738 * decl.c (grokdeclarator): Remove code for handling access decls.
4739 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
eb66be0e 4740 as access decls for now.
cffa8729
MS
4741 (finish_struct): Don't check USING_DECLs for other uses of the name.
4742
4743 * search.c (get_matching_virtual): Use cp_error_at.
4744
4745Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4746
4747 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
4748 match c-typeck.c.
4749 (self_promoting_args_p): Move the check that TYPE is non-nil
4750 before trying to look at its main variant.
4751 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
4752
4753 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
4754 Delete macros.
4755 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
4756 (do_friend): Delete call to xref_friend.
4757 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
4758
4759 * typeck.c (convert_sequence): #if 0 unused function.
4760
4761 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
4762 be in decl_in_memory_p.
4763 (decl_in_memory_p): Delete decl.
4764 * expr.c (decl_in_memory_p): Delete fn.
4765 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
4766
4767 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
4768
4769Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
4770
4771 * class.c (finish_struct_1): Check for a pure-specifier on a
eb66be0e 4772 non-virtual function here.
cffa8729
MS
4773
4774 * decl2.c (grok_function_init): Don't check whether the function
eb66be0e 4775 is virtual here.
cffa8729
MS
4776 (grokfield): Don't call check_for_override here.
4777
4778 * decl.c (push_to_top_level): Start from inner_binding_level,
eb66be0e 4779 check class_shadowed in class levels.
cffa8729
MS
4780
4781Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
4782
4783 * decl.c (resume_level): Ignore things that don't have names, instead
4784 of core dumping.
4785
4786Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4787
4788 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
4789
4790Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
4791
4792 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
eb66be0e 4793 synthesized dtor.
cffa8729
MS
4794
4795 * parse.y (complete_type_name): Bind global_scope earlier.
d11ad92e 4796 (complex_type_name): Likewise.
cffa8729
MS
4797 (qualified_type_name): Remove.
4798
2ee887f2
MS
4799Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
4800
4801 * decl.c (grokfndecl): Move code that looks for virtuals in base
eb66be0e 4802 classes...
cffa8729 4803 * class.c (check_for_override): ... to a new function.
2ee887f2
MS
4804 (finish_struct_1): Call it.
4805
4806 * cp-tree.h: Declare warn_sign_compare.
4807
4808 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
eb66be0e
MS
4809 rather than extra_warnings to decide whether to warn about
4810 comparison of signed and unsigned.
2ee887f2
MS
4811
4812 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
eb66be0e 4813 implies -Wsign-compare. -Wall doesn't imply -W.
2ee887f2
MS
4814
4815Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
4816
4817 * typeck.c (build_component_ref): Fix to handle anon unions in base
4818 classes as well.
4819
4820Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4821
4822 * class.c (resolves_to_fixed_type_p): Delete code dealing with
4823 a WITH_CLEANUP_EXPR, since we don't generate them any more.
4824 * cvt.c (build_up_reference): Likewise.
4825 * decl.c (grok_reference_init): Likewise.
4826 (cp_finish_decl): Likewise.
4827 * error.c (dump_expr): Likewise.
4828 * tree.c (real_lvalue_p): Likewise.
4829 (lvalue_p): Likewise.
4830 (build_cplus_new): Likewise.
4831 (unsave_expr_now): Likewise.
4832 * typeck.c (unary_complex_lvalue, build_modify_expr,
4833 c_expand_return): Likewise.
4834
4835Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4836
4837 Make the C++ front-end pay attention to attributes for structures.
4838 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
4839 finish_struct_1.
eb66be0e 4840 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
2ee887f2
MS
4841 Take out old round_up_size use and setting the DECL_ALIGN possibly
4842 using it. Take out setting of TYPE_ALIGN to round_up_size, which
4843 can override what the attribute set.
4844 * cp-tree.h (finish_struct): Update prototype.
4845 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
4846 attributes to finish_struct.
4847 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
4848 value down into finish_struct.
4849 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
4850
4851Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
4852
4853 * decl.c (poplevel): Re-word dead for local handling.
4854 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
4855 (cp_finish_decl): If is_for_scope, check for duplicates so
4856 we can disable is_for_scope. Otherwise, preserve_temp_slots.
4857
4858 * lex.c (do_identifier): Use global binding in preference of
4859 dead for local variable.
4860
4861Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
4862
4863 * init.c (initializing_context): Handle anon union changes, the
4864 context where fields of anon unions can be initialized now has to be
4865 found by walking up the TYPE_CONTEXT chain.
4866
4867Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
4868
4869 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
4870 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
4871 (obscure_complex_init): If bss is supported, always set
4872 DECL_INITIAL to error_mark_node.
4873
4874Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4875
4876 * init.c (is_friend): Make sure there's a context before we see if
4877 it's an aggr type.
4878
4879Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
4880
4881 * init.c (is_friend): Classes are not friendly with nested classes.
4882
4883Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
4884
4885 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
4886 and record its result.
4887
9e9ff709
MS
4888Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
4889
4890 * class.c (finish_struct_anon): Switch around code to not move anon
4891 union elements around, nor mess up their contexts, nor offsets,
4892 instead we now build up the right number of COMPONENT_REFs for all
4893 the anon unions that may be present at build_component_ref time.
4894 * typeck.c (lookup_anon_field): New routine to handle field lookup
4895 on fields without names. We find them, based upon their unique type
4896 instead.
4897 * typeck.c (build_component_ref): Allow FIELD_DECL components.
4898 Handle finding components in anonymous unions, and ensure that a
4899 COMPONENT_REF is built for each level as necessary.
4900
4901Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
4902
4903 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
4904 code that ensures that copy ctors are used if appropriate.
4905
4906Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4907
4908 * init.c (build_vec_delete): Only give an error if base isn't an
4909 error_mark_node.
4910
4911Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
4912
4913 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
4914 (yylex): If we see `new', keep slurping.
4915
4916Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
4917
4918 * class.c (finish_struct_1): Move code for handling anon unions...
4919 (finish_struct_anon): to here. Fixup so that we do the offset
4920 calculations right, and so that the fields are physically moved to
4921 the containers's chain.
4922
4923Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4924
4925 * decl.c (grokdeclarator): Avoid trying to get an operand off an
4926 identifier node.
4927
4928Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
4929
4930 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
4931 POINTER_SIZE to agree with expr.c.
4932
4933Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
4934
4935 * search.c (lookup_field): Don't report ambiguities if protect is 0,
4936 instead return NULL_TREE.
4937
4938Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
4939
4940 * class.c (finish_struct_1): Call warn_hidden if we want warnings
4941 about overloaded virtual functions.
4942 (warn_hidden): New routine to warn of virtual functions that are
4943 hidden by other virtual functions, that are not overridden.
4944 (get_basefndecls): New routine, used by warn_hidden.
4945 (mark_overriders): New routine, used by warn_hidden.
4946 * search.c (get_matching_virtual): Remove old warning that just
4947 isn't very useful.
4948
4949Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4950
4951 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
4952
4953 * typeck.c (null_ptr_cst_p): Delete unused fn.
4954 (build_function_call_maybe): Delete unused fn.
4955
4956 * expr.c (extract_init): #if 0 the code after unconditional return 0
4957 for now.
4958
4959 Delete old cadillac code.
4960 * edsel.c: Remove file.
4961 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
4962 * Makefile.in (CXX_OBJS): Delete edsel.o.
4963 (edsel.o): Delete rule.
4964 * cp-tree.h (flag_cadillac): Delete var decl.
4965 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
4966 * decl2.c (flag_cadillac): Delete var definition.
4967 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
4968 (grokfield): Delete code depending on flag_cadillac.
4969 (finish_anon_union): Likewise.
4970 * class.c (finish_struct_1): Likewise.
4971 (pushclass): Likewise.
4972 (popclass): Likewise.
4973 (push_lang_context): Likewise.
4974 (pop_lang_context): Likewise.
4975 * decl.c (init_decl_processing): Likewise.
4976 (start_decl): Likewise.
4977 (cp_finish_decl): Likewise.
4978 (xref_tag): Likewise.
4979 (finish_enum): Likewise.
4980 (start_function): Likewise.
4981 (finish_function): Likewise.
4982 (finish_stmt): Likewise.
4983 * lex.c (lang_init): Likewise.
4984 (check_newline): Likewise.
4985
4986 * lex.c (do_pending_inlines): Delete synthesized method kludge.
4987
4988 Delete defunct, ancient garbage collection implementation.
4989 * rtti.c: New file with the RTTI stuff from gc.c.
4990 * gc.c: Removed file (moved the remaining stuff into rtti.c).
4991 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
4992 (rtti.o): New rule, replacing gc.o.
4993 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
4994 * cp-tree.h: Delete gc-related fn decls.
4995 (DECL_GC_OFFSET): Delete macro.
4996 (flag_gc): Delete extern decl.
4997 * decl.c (current_function_obstack_index): Delete var decl.
4998 (current_function_obstack_usage): Delete var decl.
4999 (start_function): Delete clearing of current_function_obstack_index
5000 and current_function_obstack_usage.
5001 (init_decl_processing): Delete code relying on -fgc.
5002 Delete call to init_gc_processing.
5003 (cp_finish_decl): Delete calls to build_static_gc_entry and
5004 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
5005 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
5006 and to expand_expr of a __gc_main call.
5007 (maybe_gc_cleanup): Delete var decl.
5008 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
5009 * decl2.c (flag_gc): Delete var decl.
5010 (lang_f_options): Delete offering of -fgc.
5011 (lang_decode_option): Delete -fgc and -fno-gc handling.
5012 (get_temp_regvar): Delete gc code.
5013 * init.c (build_new): Delete gc code.
5014 * lex.c (init_lex): Delete checking of flag_gc.
5015
5016 * typeck.c (convert_arguments): Delete gc code.
5017 (build_component_addr): Delete -fgc warning.
5018 (build_modify_expr): Delete gc code.
5019
5020 * decl2.c (build_push_scope): Delete fn.
5021 * cp-tree.h (build_push_scope): Delete decl.
5022
5023 * search.c (clear_search_slots): Delete fn.
5024 * cp-tree.h (clear_search_slots): Delete decl.
5025
5026 * search.c (tree_needs_constructor_p): Delete fn.
5027 * cp-tree.h (tree_needs_constructor_p): Delete decl.
5028
5029 * tree.c (id_cmp): Delete fn.
5030
5031 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
5032 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
5033
5034 * tree.c (decl_value_member): Delete fn.
5035 * cp-tree.h (decl_value_member): Delete decl.
5036
5037 * tree.c (list_hash_lookup_or_cons): Delete fn.
5038 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
5039
5040 * method.c (cplus_exception_name): Delete fn.
5041 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
5042
5043 * spew.c (shift_tokens): Delete fn.
5044
5045Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
5046
5047 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
5048 to cp_finish_decl.
d11ad92e 5049 * parse.y: Likewise.
9e9ff709
MS
5050
5051Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5052
5053 * tree.c (build_cplus_staticfn_type): Delete function definition;
5054 never used.
5055 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
5056
5057 * tree.c (virtual_member): Delete function definition; never used.
5058 * cp-tree.h (virtual_member): Delete decl.
5059
45537677
MS
5060Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
5061
5062 * typeck.c (build_component_ref): Handle getting vbase pointers
5063 out of complex multiple inheritance better.
5064
5065Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
5066
5067 * typeck.c (build_object_ref): Make sure we use the real type, not
5068 any reference type.
5069
5070Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
5071
5072 * tree.c (build_exception_variant): Don't create new types if we
5073 don't have to, also build new types on the right obstack.
5074
5075Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
5076
5077 * decl.c (store_bindings): Split out from push_to_top_level.
9e9ff709
MS
5078 (push_to_top_level): Call it for b->type_shadowed on class binding
5079 levels.
45537677
MS
5080
5081Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
5082
5083 * search.c (expand_upcast_fixups): Fix so that offsets stored in
5084 vbase_offsets are always right. Fixes a problem where virtual base
5085 upcasting and downcasting could be wrong during conversions on this
5086 during virtual function dispatch at ctor/dtor time when dynamic
5087 vtable fixups for deltas are needed. This only sounds easier than
5088 it is. :-)
5089 (fixup_virtual_upcast_offsets): Change to reflect new calling
5090 convention for expand_upcast_fixups.
5091
5092Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5093
5094 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
5095 check that it's usable as the bitfield width.
5096
5097Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5098
5099 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
5100 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
5101 only ever used for functions in it.
5102
5103Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
5104
5105 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
d11ad92e 5106 (nested_type): Likewise.
45537677
MS
5107 (nested_name_specifier): Use lastiddecl.
5108
5109 * decl.c (grokdeclarator): Adjust accordingly.
d11ad92e
MS
5110 * init.c (expand_member_init): Likewise.
5111 * parse.y (base_class): Likewise.
5112 * typeck2.c (build_functional_cast): Likewise.
45537677
MS
5113
5114 * typeck2.c (build_functional_cast): Fill in name after we've
5115 checked for non-aggr type.
5116
be99da77
MS
5117Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
5118
5119 * decl2.c (warn_pointer_arith): Default to on.
5120
5121Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
5122
5123 * lex.c (is_rid): New function.
5124 * decl.c (grokdeclarator): Diagnose reserved words used as
5125 declarator-ids.
5126
5127Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
5128
5129 * tree.c (get_decl_list): Don't lose cv-quals.
5130
5131 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
5132 typespecs used as declarator-ids.
5133
5134Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
5135
5136 * decl.c (poplevel): When poping a level, don't give a warning for
5137 any subblocks that already exist.
5138
5139Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
5140
5141 * typeck.c (build_object_ref): Finish what I started.
5142
5143 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
5144
5145 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
5146
5147 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
9e9ff709 5148 scope.
be99da77
MS
5149
5150Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
5151
5152 * decl.c (xref_tag): Handle passing a type in directly.
5153
5154 * parse.y (qualified_type_name): Pull out the type.
d11ad92e 5155 (nested_type): Likewise.
be99da77
MS
5156 Take types directly instead of as identifiers.
5157 * call.c (build_scoped_method_call): Take types directly instead of
9e9ff709 5158 as identifiers.
d11ad92e
MS
5159 * decl.c (xref_basetypes): Likewise.
5160 * init.c (expand_member_init): Likewise.
5161 (build_member_call): Likewise.
5162 (build_offset_ref): Likewise.
5163 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
5164 * method.c (do_build_assign_ref): Likewise.
be99da77
MS
5165 * decl.c (grokdeclarator): Handle a type appearing as the
5166 declarator-id for constructors.
5167 * method.c (do_build_copy_constructor): current_base_init_list now
5168 uses the types directly, not their names.
d11ad92e
MS
5169 * init.c (sort_base_init): Likewise.
5170 (expand_member_init): Likewise.
be99da77 5171 * init.c (is_aggr_type): New function, like is_aggr_typedef.
be99da77 5172
d11ad92e 5173Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
be99da77
MS
5174
5175 * tree.c (layout_basetypes): Call build_lang_field_decl instead
5176 of build_lang_decl if first arg is a FIELD_DECL.
be99da77
MS
5177
5178Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5179
5180 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
5181 non-empty.
5182 * except.c (expand_start_catch_block): Set TREE_USED to avoid
5183 warnings about the catch handler.
5184
5185Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
5186
5187 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
9e9ff709 5188 expand_target_expr.
be99da77
MS
5189
5190Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5191
5192 Fix access control to use trees rather than integers.
5193 * class.c (access_{default, public, protected, private,
5194 default_virtual, public_virtual, private_virtual}_node): Add
5195 definitions.
5196 (init_class_processing): Do creation of those nodes.
5197 * cp-tree.h (access_type): Delete enum decl.
5198 (access_{default, public, protected, private, default_virtual,
5199 public_virtual, private_virtual}_node): Add decls.
5200 (compute_access): Change return type.
5201 * search.c (compute_access): Have tree return type, instead of enum.
5202 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
5203 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
5204 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
5205 * parse.y (VISSPEC): Make ttype rather than itype.
5206 (base_class_access_list): Likewise.
5207 * *.[cy]: Change all refs of `access_public' to `access_public_node',
5208 etc.
5209 * call.c (build_method_call): Make ACCESS be a tree.
5210 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
5211 * cvt.c (convert_to_aggr): Likewise.
5212 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
5213 Likewise.
5214 * method.c (hack_identifier): Likewise.
5215 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
5216
5217Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
5218
5219 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
5220 frontend, and make it more consistent with respect to
5221 warn_pointer_arith.
5222
5223Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
5224
5225 * decl.c (pushdecl): Check for duplicate parameter names.
5226
5227Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
5228
5229 * decl.c (expand_static_init): Call assemble_external for atexit.
5230
5231Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
5232
5233 * except.c (do_unwind): Remove some generated dead code.
5234 (eh_outer_context): New routine, factor out some common code from
5235 expand_builtin_throw and end_eh_unwinder. Add code to do return
5236 address masking for the PA.
5237 (expand_builtin_throw): Use eh_outer_context instead of open coding
5238 it here.
d11ad92e 5239 (end_eh_unwinder): Likewise.
be99da77
MS
5240
5241Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
5242
5243 * except.c (expand_throw): Call assemble_external for __empty, if we
5244 use it.
5245
21451173
MS
5246Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
5247
5248 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
5249 NORMAL_RETURN_ADDR_OFFSET.
d11ad92e 5250 (end_eh_unwinder): Likewise.
21451173
MS
5251
5252Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
5253
5254 * gc.c (build_dynamic_cast): Make sure we don't cast away const
5255 when dealing with references, and make sure we handle dynamic
5256 casting to a cv qualified reference.
5257
5258Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
5259
5260 * except.c (struct eh_context): New structure top hold eh context
5261 information.
5262 (push_eh_context): New routine.
d11ad92e 5263 (pop_eh_context): Likewise.
21451173 5264 * decl.c (push_cp_function_context): Use them.
d11ad92e 5265 (pop_cp_function_context): Likewise.
21451173
MS
5266
5267Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
5268
5269 * decl2.c (finish_file): Also prune uninteresting functions in the
5270 inline emission loop.
5271
d11ad92e 5272Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
21451173
MS
5273
5274 * sig.c (build_signature_table_constructor): Mark functions
5275 in the signature as referenced.
5276
5277Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
5278
5279 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
5280 the inline emission stuff.
5281
72b7eeff
MS
5282Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
5283
5284 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
9e9ff709 5285 weak symbols.
72b7eeff
MS
5286 * lang-options.h: Add -f{no-,}weak.
5287 * decl.c (init_decl_processing): If the target does not support weak
5288 symbols, don't use them.
5289 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
5290
5291Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
5292
5293 * init.c (expand_member_init): warning for base init after members.
5294
72b7eeff
MS
5295Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
5296
5297 * cvt.c (build_expr_type_conversion): Don't convert to a reference
5298 type.
5299
5300Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
5301
5302 * method.c (report_type_mismatch): Improve wording for volatile
5303 mismatches.
5304
5305Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
5306
5307 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
9e9ff709 5308 expand_assignment, as the later doesn't handle things that have
72b7eeff
MS
5309 copy constructors well. The compiler would do bitwise copying,
5310 instead of ctor calling in some cases.
5311
5312Wed Dec 13 17:05:54 PST 1995 Paul Eggert <eggert@twinsun.com>
5313
5314 * g++.c (my_strerror): Return "cannot access" if errno is 0.
5315 (pfatal_with_name, perror_exec): Don't assume that
5316 the returned value from my_strerror contains no '%'s.
5317 (concat): Remove.
5318 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
5319
5320Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
5321
5322 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
5323 TYPE_METHODS/TREE_CHAIN mean what they used to.
5324 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
5325 instead of TYPE_METHODS.
5326 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
d11ad92e 5327 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
72b7eeff
MS
5328 * cp-tree.h (CLASSTYPE_METHODS): Lose.
5329 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
5330 TYPE_METHODS.
5331 (struct lang_decl): Lose next_method field.
5332 (DECL_NEXT_METHOD): Lose.
5333 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
5334 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
5335 anymore.
5336 (finish_struct_methods): Don't mess with the TREE_CHAINs in
5337 fn_fields.
5338
5339 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
5340 vector.
5341
5342 * call.c (build_method_call): Synthesize here even when not inlining.
d11ad92e 5343 * typeck.c (build_function_call_real): Likewise.
72b7eeff
MS
5344
5345Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
5346
5347 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
5348 == DBX_DEBUG, call dbxout_start_new_source_file and
5349 dbxout_resume_previous_source_file when appropriate.
5350
5351Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
5352
5353 * except.c (start_anon_func): Push to the top level.
5354 (end_anon_func): Pop from the top level.
5355
5356Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
5357
5358 * cp-tree.h (build_cleanup): New routine to build cleanups.
5359 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
5360 call at ctor time and use atexit to run it later.
5361 * decl2.c (build_cleanup): New routine, taken from finish_file.
5362 (finish_file): Use build_cleanup instead, and don't put function
5363 local statics in global dtor list.
5364
5365Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
5366
5367 * except.c (expand_throw): Ensure that we have cleanups, if we try
5368 and expand cleanups.
5369
5370Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
5371
5372 * except.c (expand_throw): Add logic to manage dynamic cleanups for
5373 the EH object.
5374 (expand_end_catch_block): Use the magic of expand_goto, instead of
5375 emit_jump so that we get the cleanup for any catch clause parameter
5376 and the cleanup for the exception object. Update to reflect label
5377 changes.
5378 (push_eh_cleanup): New routine to register a cleanup for an
5379 exception object.
9e9ff709 5380 (empty_fndecl): Used to default cleanup actions to
72b7eeff
MS
5381 nothing.
5382 (init_exception_processing): Setup empty_fndecl. Setup
5383 saved_cleanup.
5384 (expand_start_catch_block): Update to reflect label changes. Call
5385 push_eh_object to register the cleanup for the EH object.
5386 (start_anon_func): New routine to start building lambda expressions
5387 from trees.
5388 (end_anon_func): New routine to end them.
5389 (struct labelNode): Change so that we can use tree labels, or rtx
5390 labels.
5391 (saved_cleanup): Object to check for dynamic cleanups for the
5392 exception handling object.
5393 (push_label_entry): Change so that we can use tree labels, or rtx
5394 labels.
d11ad92e
MS
5395 (pop_label_entry): Likewise.
5396 (top_label_entry): Likewise.
72b7eeff
MS
5397 (expand_start_all_catch): Use tree label instead of rtx label, so
5398 that we can get the magic of expand_goto.
5399 (expand_end_all_catch): Update to reflect label changes.
5400
5401 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
5402 use UNSAVE_EXPRs.
5403 typeck.c (get_member_function_from_ptrfunc): Remove remnants of
5404 building_cleanup logic, as we now use UNSAVE_EXPRs.
5405 * cp-tree.h (unsave_expr): Declare it.
5406 * decl.c (building_cleanup): Remove.
5407 (maybe_build_cleanup): Remove building_cleanup logic, and use
5408 UNSAVE_EXPR instead.
5409
5410Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
5411
5412 * gc.c (build_t_desc): Update error message to say <typeinfo>.
5413
5414Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5415
5416 * decl.c (pushdecl): Only warn about shadowing a local variable if
5417 warn_shadow is true.
5418
5419Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
5420
5421 * typeck.c (build_binary_op_nodefault): Added warning about
5422 comparisons between different enum types with -Wall, unless
5423 -fenum-int-equiv set.
5424
5425Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
5426
5427 * class.c (finish_struct_1): Skip down to the inner type in
5428 multidimensional arrays. Ensures ctors will be made for types that
5429 need constructing.
5430
5431Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
5432
5433 * decl.c (last_dtor_insn): New to track the last compiler generated
5434 insn in a dtor.
5435 (store_parm_decls): Set it.
5436 (finish_function): Use it to see if the dtor is empty. Avoid doing
5437 vtable setup all the time, if we can.
5438 (struct cp_function): Add last_dtor_insn.
5439 (push_cp_function_context): Save it.
5440 (pop_cp_function_context): Restore it.
5441
5442Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
5443
5444 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
9e9ff709 5445 warnings.
72b7eeff
MS
5446
5447Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
5448
5449 * typeck.c (expand_target_expr): Make sure targets get put into the
5450 current temp_slot_level, so that the free_temp_slots call will reuse
5451 them.
5452
5453Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
5454
5455 * class.c (finish_struct_1): Delay delta fixups for virtual bases
5456 until after we have done the hard virtuals, to avoid a bogus `every
5457 virtual function must have a unique final overrider' for virtual
5458 functions that are only overridden by hard virtuals.
5459
5460Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
5461
5462 * pt.c (do_function_instantiation): Don't try to find a file-scope
9e9ff709 5463 template for a member function.
72b7eeff
MS
5464
5465Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
5466
5467 * g++.c (main): Add handling of -nodefaultlibs.
5468
5469Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
5470
5471 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
5472 distinguish between direct bindings of reference variables, and
5473 indirect bindings of reference variables.
5474 * cvt.c (build_up_reference): Use it.
5475 * typeck.c (convert_arguments): Use it to indicate this is an
5476 indirect binding.
5477 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
5478 as they are unused.
d11ad92e
MS
5479 (expand_static_init): Likewise.
5480 (cplus_expand_expr_stmt): Likewise.
5481 * decl2.c (finish_file): Likewise.
5482 * init.c (perform_member_init): Likewise.
5483 (emit_base_init): Likewise.
5484 (expand_aggr_vbase_init_1): Likewise.
72b7eeff 5485
72b7eeff
MS
5486Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5487
5488 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
5489 get a DECL_LANG_SPECIFIC node.
5490 * cp-tree.h (lang_decl_flags): Add new member `level'.
5491 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
5492 decl_flags level member.
5493
5494Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5495
5496 * call.c (build_method_call): Make sure instance has a
5497 TYPE_LANG_SPECIFIC node before we dive into it.
5498
d11ad92e 5499Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
72b7eeff
MS
5500
5501 * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
5502
5503Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
5504
5505 * decl.c (duplicate_decls): When smashing decls, smash staticness in
5506 the usual way.
5507
5508Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
5509
5510 * decl.c (poplevel): Handle the merging of subblocks of cleanups
5511 when finishing blocks that have already been created (usually due to
5512 the fixup goto code). Fixes bad debugging information.
5513
5514Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
5515
5516 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
5517 that's not a list of overloaded functions.
5518
5519Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5520
5521 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
5522 before trying to use DECL_ABSTRACT_VIRTUAL_P.
5523
5524Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
5525
5526 * decl2.c (mark_used): New function for hooking into setting of
5527 TREE_USED on decls.
5528 * call.c (build_method_call): Use it.
d11ad92e
MS
5529 * class.c (instantiate_type): Likewise.
5530 * init.c (build_offset_ref): Likewise. Don't call assemble_external
72b7eeff 5531 for all like-named functions.
d11ad92e 5532 * method.c (hack_identifier): Likewise.
72b7eeff
MS
5533 (emit_thunk): Don't call assemble_external.
5534 (make_thunk): Create thunk as a FUNCTION_DECL so that it
5535 gets the right mode and ENCODE_SECTION_INFO works.
5536
5537 * parse.y: Use mark_used. Pass operator names to do_identifier.
5538 * lex.c (do_identifier): Handle operator names.
5539
5540 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
5541
72b7eeff
MS
5542Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5543
5544 * errfn.c: Include stdio.h.
5545 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
5546
5547Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
5548
5549 * typeck2.c (digest_init): Always convert initializers to the
5550 right type.
5551
5552Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
5553
5554 * init.c (member_init_ok_or_else): Don't allow member initializers
5555 for indirect members, as it is invalid.
5556
5557Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5558
5559 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
5560
5561Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
5562
5563 * parse.y (for.init.statement): Catch compound statements inside for
5564 initializations, if we're being pedantic.
5565
5566Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
5567
5568 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
5569 looking for.
5570
5571Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
5572
5573 * error.c (dump_expr): Don't core dump when a boolean expression is
5574 used as a default argument.
5575
5576Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
5577
5578 * class.c (finish_struct_bits): Check aggregate_value_p instead of
9e9ff709 5579 RETURN_IN_MEMORY.
72b7eeff
MS
5580
5581Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
5582
5583 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
5584 BLKmode type that would otherwise be returned in registers.
5585
5586Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5587
5588 * g++.c (WITHLIBC): New macro.
5589 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
5590 saw_libc and pass it at the end if it was set.
5591
5592Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5593
5594 * parse.y (fn.def1): Call split_specs_attrs in
5595 declmods notype_declarator case.
5596
21451173 5597Sun Nov 26 14:47:42 1995 Richard Kenner <kenner@mole.gnu.ai.mit.edu>
1b898c06
MS
5598
5599 * Version 2.7.2 released.
5600
5601Mon Nov 20 14:05:00 1995 Mike Stump <mrs@cygnus.com>
5602
5603 * g++.c (pfatal_with_name): Add missing third argument to concat.
5604
e7843f33
MS
5605Thu Oct 26 13:59:54 1995 Mike Stump <mrs@cygnus.com>
5606
5607 * init.c (expand_aggr_init): Handle cv qualifiers on the object's
5608 type.
5609
21451173 5610Sat Nov 11 08:25:55 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
07674418
MS
5611
5612 * Version 2.7.1 released.
5613
5614Thu Nov 2 17:02:47 1995 Jason Merrill <jason@yorick.cygnus.com>
5615
5616 * call.c (convert_harshness): Handle references to arrays.
5617
5618Fri Oct 27 14:20:21 1995 Jason Merrill <jason@yorick.cygnus.com>
5619
5620 * typeck.c (comp_target_types): Check multi-level pointer
5621 conversions in both directions.
5622
5623Tue Oct 17 21:39:05 1995 Jason Merrill <jason@yorick.cygnus.com>
5624
5625 * parse.y (explicit_instantiation): Fix 'extern template' with no
5626 return type.
5627
5628Mon Oct 16 14:35:20 1995 Jason Merrill <jason@yorick.cygnus.com>
5629
5630 * parse.y (explicit_instantiation): Support automatic instantiation
5631 of constructors.
5632 (named_class_head_*): Support out-of-class definition of nested
5633 types.
5634
f30432d7
MS
5635Wed Oct 11 12:20:56 1995 Mike Stump <mrs@cygnus.com>
5636
5637 * search.c (envelope_add_decl): New routine. Fix so that
5638 methods are hidden in the same way that other members are.
5639 (dfs_pushdecls): Cleanup and move functionality out of line,
5640 into envelope_add_decl.
5641
5642Tue Oct 10 15:46:01 1995 Mike Stump <mrs@cygnus.com>
5643
5644 * typeck.c (mark_addressable): Only call assemble_external if we
5645 have started the output file.
5646
5647Tue Oct 10 11:27:18 1995 Jason Merrill <jason@yorick.cygnus.com>
5648
5649 * decl.c (start_function): Fix earlier cv-quals change.
5650
5651Mon Oct 9 23:53:05 1995 Mike Stump <mrs@cygnus.com>
5652
5653 * parse.y (complex_direct_notype_declarator): Only push the class if
5654 we are not already in the class.
5655
5656Mon Oct 9 11:22:03 1995 Doug Evans <dje@canuck.cygnus.com>
5657
5658 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
5659 Update olddecl's attributes too.
5660 (grokdeclarator): #if 0 out call to build_decl_attribute_variant.
5661 * typeck.c (common_type): Call merge_machine_type_attributes.
5662
5663Fri Oct 6 14:44:27 1995 Mike Stump <mrs@cygnus.com>
5664
5665 * typeck.c (mark_addressable): Add missing call to
5666 assemble_external.
5667
f30432d7
MS
5668Wed Oct 4 15:06:39 1995 Mike Stump <mrs@cygnus.com>
5669
5670 * decl.c (store_parm_decls): Make sure the unwinder start comes
5671 before the exception specification start.
5672 * except.c (expand_exception_blocks): Make sure the unwinder end
5673 comes after the terminate protected catch clause region and after
5674 the end of the exception specification region.
5675
5676Wed Oct 4 12:47:02 1995 Jason Merrill <jason@yorick.cygnus.com>
5677
5678 * lex.c (real_yylex): Fix identifier case for linemode.
5679 (handle_sysv_pragma): Don't abort when we see a pragma we don't
5680 recognize.
5681
5682Tue Oct 3 14:09:46 1995 Mike Stump <mrs@cygnus.com>
5683
5684 * decl.c (store_parm_decls): Add a call to start_eh_unwinder.
5685 * except.c (init_exception_processing): __throw doesn't take any
5686 arguments.
d11ad92e 5687 (expand_builtin_throw): Likewise. Always use Pmode, instead of SImode
f30432d7
MS
5688 for all pointers. Use expand_builtin_return_addr to unwind the
5689 first level off the stack.
5690 (do_unwind): Always use Pmode, instead of SImode for all pointers.
5691 (expand_exception_blocks): Add a call to end_eh_unwinder.
5692 (start_eh_unwinder, end_eh_unwinder): New routines to build machine
5693 independent stack unwinders for function/method calls.
5694
5695Mon Oct 2 17:20:42 1995 Mike Stump <mrs@cygnus.com>
5696
5697 * tree.c (unsave_expr_now): Make sure we process the argument list
5698 of any called functions. Fixes incorrect code generation for
5699 cleanups.
5700
5701Mon Oct 2 13:04:16 1995 Mike Stump <mrs@cygnus.com>
5702
5703 * typeck.c (get_member_function_from_ptrfunc): Save function if it
5704 needs it. Cures core dump on things like (this->*(f()))().
5705
5706Sat Sep 23 22:51:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5707
5708 * decl.c (start_function): Conform to gcc cv-quals convention (no
5709 expression has a cv-qualified type) in RESULT_DECLs.
d11ad92e 5710 * method.c (make_thunk): Likewise.
f30432d7
MS
5711
5712Fri Sep 22 10:21:13 1995 Mike Stump <mrs@cygnus.com>
5713
5714 * decl.c (pushtag): Add in the namespace name for the tag.
5715
5716Thu Sep 21 13:11:13 1995 Mike Stump <mrs@cygnus.com>
5717
5718 * parse.y (maybe_base_class_list, base_class_list, base_class,
5719 base_class_access_list): Make sure we see the typenames for base
5720 classes.
5721 * lex.c (see_typename): Instead of failing to see a typename when
5722 there is no next token, perfer a typename, and get the next token.
5723
5724Wed Sep 20 12:35:27 1995 Michael Meissner <meissner@cygnus.com>
5725
5726 * decl.c (init_decl_processing): Add __builtin_expect.
5727
5728Tue Sep 19 16:48:11 1995 Mike Stump <mrs@cygnus.com>
5729
5730 * cvt.c (cp_convert_to_pointer): Don't allow leftover conversions to
5731 or from pointer to member functions, they must all be handled before
5732 this point.
5733
5734Fri Sep 15 17:14:47 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5735
5736 * init.c (resolve_offset_ref): Fix wording of non-static member
5737 being referenced as a static.
5738
5739Fri Sep 15 12:39:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5740
5741 * typeck.c (build_indirect_ref): Only bash pointer if we actually
5742 call build_expr_type_conversion.
5743
5744Thu Sep 14 18:24:56 1995 Jason Merrill <jason@deneb.cygnus.com>
5745
5746 * cvt.c (build_expr_type_conversion): Handle conversion from
5747 reference.
5748 * typeck.c (build_indirect_ref): Avoid infinite recursion.
5749
5750Thu Sep 14 17:23:28 1995 Mike Stump <mrs@cygnus.com>
5751
5752 * decl.c (expand_start_early_try_stmts): New routine to start a try
5753 block at the start of the function, for function-try-blocks.
5754 * cp-tree.h (expand_start_early_try_stmts): Declare it.
5755 * parse.y (function_try_block): Use it, instead of doing it here, as
5756 we don't want to include rtl.h here, as that conflicts with RETURN
5757 in the parser.
5758
5759Wed Sep 13 18:32:24 1995 Mike Stump <mrs@cygnus.com>
5760
5761 * lex.c (reinit_parse_for_block): Support saving inline
5762 function-try-blocks, uses peekyylex.
5763 * parse.y (eat_saved_input): New rule, permit the parser to see that
5764 END_OF_SAVED_INPUT is ok, as it can see this when parsing the
5765 handlers of a function-try-block.
5766 (fndef): Use it.
5767 (component_decl): Make sure TRY and RETURN can come after fn.def2.
5768 * spew.c (peekyylex): New routine to peek at what will come next.
5769
cf54380f
JM
5770Wed Sep 13 16:52:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5771
f30432d7 5772 * typeck.c (comptypes): Tighten up comparisons of template type
9e9ff709 5773 parms.
f30432d7 5774
cf54380f
JM
5775 * decl.c (duplicate_decls): Turn off whining about virtual functions
5776 redeclared inline for now.
5777
f30432d7
MS
5778Wed Sep 13 11:13:40 1995 Mike Stump <mrs@cygnus.com>
5779
5780 * decl.c (store_in_parms): New routine to put things before we
5781 put base inits.
5782 * cp-tree.h (store_in_parms): Declare it.
5783 * decl.c (store_parm_decls): Use it to makr sure the starting of the
5784 eh spec comes before base inits.
5785 (finish_function): Use sequences instead of the obsolete
5786 reorder_insns.
5787 * parse.y (fndef): Enhance readability and maintainability. Update
5788 to include function_try_block syntax.
5789 (function_try_block): Add.
5790
5791Tue Sep 12 17:43:07 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5792
5793 * call.c (convert_harshness): Use comptypes, not ==, to check if
5794 TYPE and PARMTYPE are equivalent on a function type.
5795
d11ad92e 5796Tue Sep 12 17:31:33 1995 Douglas Rupp <drupp@cs.washington.edu>
2453e8d1
DR
5797
5798 * Make-lang.in (cc1plus) : Removed unnecessary $(exeext).
5799
f30432d7
MS
5800Mon Sep 11 23:24:07 1995 Mike Stump <mrs@cygnus.com>
5801
5802 * except.c (expand_throw): Never allocate storage for thrown pointer
5803 to objects.
5804
5805Mon Sep 11 19:36:45 1995 Mike Stump <mrs@cygnus.com>
5806
5807 * except.c (expand_start_catch_block): Pointers to objects come
5808 back from catch matching already dereferenced, don't dereference
5809 again.
5810
5811Mon Sep 11 15:46:28 1995 Mike Stump <mrs@cygnus.com>
5812
5813 * except.c (expand_throw): Only decay the throw expression, don't do
5814 any default conversions. This is so that one can throw and catch
5815 characters, and not have them match integers.
5816
5817Mon Sep 11 13:46:45 1995 Mike Stump <mrs@cygnus.com>
5818
5819 * error.c (dump_aggr_type): Deal with anonymous unions that don't
5820 have a TYPE_NAME.
5821
38267a70
BK
5822Fri Sep 8 20:40:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5823
5824 * lex.c (handle_sysv_pragma): Deal with getting a comma from yylex.
5825
f30432d7
MS
5826Fri Sep 8 15:51:41 1995 Mike Stump <mrs@cygnus.com>
5827
5828 * except.c (expand_end_eh_spec): Handle empty EH specifications.
5829
5830Fri Sep 8 15:27:22 1995 Mike Stump <mrs@cygnus.com>
5831
5832 * cp-tree.h (expand_start_eh_spec): Declare new routine.
d11ad92e 5833 (expand_end_eh_spec): Likewise.
f30432d7
MS
5834 * decl.c (store_parm_decls): Call expand_start_eh_spec to process
5835 exception specifications.
5836 * except.c (expand_leftover_cleanups): Remove unused parameter.
d11ad92e
MS
5837 (expand_end_catch_block): Likewise.
5838 (expand_exception_blocks): Likewise.
f30432d7
MS
5839 (expand_start_eh_spec): New routine to mark the start of an
5840 exception specification region.
5841 (expand_end_eh_spec): New routine to mark the end of an exception
5842 specification region.
5843 (expand_exception_blocks): Call expand_end_eh_spec to process
5844 exception specifications.
5845
b37d04bc
PB
5846Fri Sep 8 14:40:48 1995 Per Bothner <bothner@kalessin.cygnus.com>
5847
5848 * lex.c (do_identifier): Use global binding in preference of
5849 dead for local variable.
5850
f30432d7
MS
5851Wed Sep 6 19:32:59 1995 Mike Stump <mrs@cygnus.com>
5852
5853 * cp-tree.h (build_exception_variant): Remove used first argument.
d11ad92e
MS
5854 * decl.c (duplicate_decls): Likewise.
5855 (grokfndecl): Likewise.
5856 (revert_static_member_fn): Likewise.
5857 * decl2.c (grok_method_quals): Likewise.
5858 * tree.c (build_exception_variant): Likewise.
5859 * typeck.c (common_type): Likewise.
f30432d7
MS
5860 * decl2.c (grokclassfn): After changing the type, call
5861 build_exception_variant, if necessary.
5862
5863Tue Sep 5 15:56:27 1995 Mike Stump <mrs@cygnus.com>
5864
5865 * except.c (expand_throw): Run cleanups for the throw expression.
5866
d11ad92e 5867Wed Aug 30 15:24:38 1995 Stephen L. Favor <sfavor@tigger.intecom.com>
f30432d7
MS
5868
5869 * except.c (expand_builtin_throw): Moved gen_label_rtx calls beyond
5870 the store_parm_decls call which does initialization in the emit_*
5871 code concerning label numbering.
5872
5873Thu Aug 31 09:01:07 1995 Mike Stump <mrs@cygnus.com>
5874
5875 * except.c (expand_internal_throw): Let the frontend be responsible
5876 for managing all frontend EH parameters, the backend routine only
5877 needs to deal with backend values. type and value are no longer
5878 passed to __throw.
d11ad92e
MS
5879 (init_exception_processing): Likewise.
5880 (expand_start_all_catch): Likewise.
5881 (expand_end_all_catch): Likewise.
5882 (expand_leftover_cleanups): Likewise.
5883 (expand_end_catch_block): Likewise.
5884 (expand_builtin_throw): Likewise.
5885 (expand_throw): Likewise.
f30432d7
MS
5886
5887Tue Aug 29 15:04:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5888
5889 * cp-tree.h (DECL_REAL_CONTEXT): Give the real declaration context
5890 for a decl.
5891 * decl.c (cp_finish_decl): Use it.
5892
5893Tue Aug 29 10:30:27 1995 Mike Stump <mrs@cygnus.com>
5894
5895 * except.c (expand_internal_throw): Oops, almost forgot type and
5896 value are now trees.
5897
5898Mon Aug 28 17:57:45 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5899
5900 Fix the attribute handling to make sure they get noted before we
5901 create the function's RTL, in case they can affect that.
5902 * decl.c (grokfndecl): New arg ATTRLIST. Run
5903 cplus_decl_attributes before creating the decl's rtl.
5904 (grokdeclarator): New arg ATTRLIST, passed down into grokfndecl.
5905 (shadow_tag, groktypename, start_decl, start_method): Pass a
5906 NULL_TREE to grokdeclarator's new last arg.
5907 * decl2.c (grokfield): New arg ATTRLIST, passed into grokdeclarator.
5908 (grokbitfield, grokoptypename): Pass a NULL_TREE to
5909 grokdeclarator's new last arg.
5910 * except.c (expand_start_catch_block): Likewise.
5911 * pt.c (process_template_parm, end_template_decl,
5912 do_function_instantiation): Likewise.
5913 * cp-tree.h (grokfield): Add arg.
5914 (grokdeclarator): Move the prototype from here...
5915 * decl.h: ...to here.
5916 * lex.c (cons_up_default_function): Pass NULL_TREE to grokfield
5917 ATTRLIST argument.
5918 * parse.y: Create a list for the grokfield arg where appropriate,
5919 and pass it down instead of calling cplus_decl_attributes.
5920
5921Mon Aug 28 15:07:24 1995 Mike Stump <mrs@cygnus.com>
5922
5923 * except.c: Always allow turning on exception handling. Allow cross
5924 compilations to use EH.
5925
5926Thu Aug 24 17:39:24 1995 Mike Stump <mrs@cygnus.com>
5927
5928 * except.c (saved_pc, saved_throw_type, saved_throw_value): Use
5929 trees, instead of rtxs, and don't depend on using special machine
5930 dependent registers.
d11ad92e
MS
5931 (expand_internal_throw): Likewise.
5932 (init_exception_processing): Likewise.
5933 (expand_start_all_catch): Likewise.
5934 (expand_end_all_catch): Likewise.
5935 (expand_start_catch_block): Likewise.
5936 (expand_leftover_cleanups): Likewise.
5937 (expand_end_catch_block): Likewise.
5938 (expand_builtin_throw): Likewise.
5939 (expand_throw): Likewise.
f30432d7
MS
5940
5941Wed Aug 23 17:25:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5942
5943 * cvt.c (build_expr_type_conversion): Handle conversions to
5944 reference types.
5945
5946Wed Aug 23 15:33:59 1995 Mike Stump <mrs@cygnus.com>
5947
5948 * except.c (do_unwind): Work around backend bug with -fpic.
5949
fb409a19
PB
5950Tue Aug 22 17:20:07 1995 Per Bothner <bothner@kalessin.cygnus.com>
5951
5952 * decl2.c (flag_new_for_scope): Add a new mode that follows ANSI
5953 for-scoping, but supports (and warns about) old programs.
5954 Make the new mode (with value 1) the default.
5955 (lang_f_options): The on-value for flag_new_for_scope is now 2.
5956 * cp-tree.h (DECL_DEAD_FOR_LOCAL, DECL_ERROR_REPORTED): New macros
5957 (DECL_SHADOWED_FOR_VAR): Likewise.
5958 * decl.c (struct binding_level): New fields dead_vars_from_for
5959 and is_for_scope.
5960 (note_level_for_for): New function.
5961 (poplevel): Special processing if is_for_scope.
5962 (pushdecl): Warn if for-scope variable shadows local.
5963 * lex.c (do_identifier): Handle old (non-ANSI) for scoping,
5964 and warn if conflicts.
5965 * parse.y (FOR): Call note_level_for_for.
5966
f30432d7
MS
5967Mon Aug 21 10:28:31 1995 Jason Merrill <jason@deneb.cygnus.com>
5968
5969 * decl2.c (import_export_inline): Class interface hackery does not
5970 apply to synthesized methods.
5971
5972Sun Aug 20 16:29:00 1995 Mike Stump <mrs@cygnus.com>
5973
5974 * search.c (virtual_context): Find the right context more often.
5975 Solves a `recoverable compiler error, fixups for virtual function'
5976 problem.
5977
5978Sun Aug 20 13:53:24 1995 Mike Stump <mrs@cygnus.com>
5979
5980 * except.c (expand_start_all_catch): Ensure that we always transfer
5981 control to the right EH handler, by rethrowing the end label on the
5982 region, instead of hoping we are nested and falling through.
d11ad92e 5983 (expand_leftover_cleanups): Likewise.
f30432d7
MS
5984 (end_protect): Since we now rethrow the end label, put a
5985 nop after it, so that outer regions are recognized.
5986 * init.c (build_vec_delete_1): New routine to handle most of vector
5987 deleting, all code moved here from build_vec_delete.
5988 (build_array_eh_cleanup): Use build_vec_delete_1 to do all the real
5989 work.
5990 (expand_vec_init): If the array needs partial destructing, setup an
5991 EH region to handle it.
5992 (build_vec_delete): Move lots of code to build_vec_delete_1, use
5993 build_vec_delete_1 to do the grunt work.
5994
5995Sat Aug 19 14:25:33 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5996
5997 Handle decl attributes properly for function definitions without
5998 previous attribute-loaded declarations.
5999 * decl.c (start_function): New arg ATTRS. Add a call to
6000 cplus_decl_attributes with it before we create the RTL.
6001 * cp-tree.h (start_function): Update prototype.
6002 * parse.y (fn.def1): Pass ATTRS into start_function instead of
6003 trying to call cplus_decl_attributes too late. Pass a NULL_TREE
6004 for other use.
6005 * decl2.c (finish_file): Pass NULL_TREE as fourth arg to
6006 start_function.
6007 * method.c (synthesize_method): Likewise.
6008 * except.c (expand_builtin_throw): Likewise for start on __throw.
6009
6010Sat Aug 19 13:36:08 1995 Mike Stump <mrs@cygnus.com>
6011
6012 * class.c (set_rtti_entry): Turn on -fvtable-thunk -frtti support.
6013 This changes -fvtable-thunks vtable layout, so a recompile will be
6014 necessary, if you use -fvtable-thunks.
6015 (get_vtable_entry): Use n, instead of i to be consistent with the
6016 rest of the compiler.
d11ad92e 6017 (get_vtable_entry_n): Likewise.
f30432d7
MS
6018 (add_virtual_function): Add a slot for the tdesc, if -fvtable-thunks
6019 are being used.
d11ad92e 6020 (finish_struct_1): Likewise.
f30432d7
MS
6021 (skip_rtti_stuff): New routine to collapse similar code from many
6022 different parts of the compiler. I think I got them all.
6023 (modify_one_vtable): Use it.
d11ad92e
MS
6024 (fixup_vtable_deltas1): Likewise.
6025 (override_one_vtable): Likewise.
6026 * decl2.c (mark_vtable_entries): Likewise.
6027 * tree.c (debug_binfo): Likewise.
6028 * search.c (expand_upcast_fixups): Likewise.
6029 (get_abstract_virtuals_1): Likewise. Use virtuals, instead of tmp to
f30432d7 6030 consistent with the rest of the compiler.
d11ad92e 6031 (get_abstract_virtuals): Likewise.
f30432d7
MS
6032 * cp-tree.h (skip_rtti_stuff): New routine, declare it.
6033 * gc.c (build_headof): Support -fvtable-thunk and -frtti together.
d11ad92e 6034 (build_typeid): Likewise.
f30432d7
MS
6035 (build_classof): Remove old style way of doing rtti. Remove support
6036 for `classof' and `headof'.
d11ad92e
MS
6037 * gxx.gperf: Likewise.
6038 * hash.h: Likewise.
6039 * parse.y: Likewise.
f30432d7
MS
6040
6041Fri Aug 18 17:31:58 1995 Jason Merrill <jason@deneb.cygnus.com>
6042
6043 * decl.c (start_function): Clear ctor_label and dtor_label.
6044
6045 * class.c (finish_struct_1): Fix handling of access decls.
6046
6047Tue Aug 15 19:21:54 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6048
6049 * class.c (finish_struct): Only do minimal processing here, so it
6050 can be used for class template definitions, as well.
6051 (finish_struct_1): New function with the rest of the code.
6052
6053Tue Aug 15 09:46:16 1995 Mike Stump <mrs@cygnus.com>
6054
6055 * class.c (prepare_fresh_vtable): On second though, always build the
6056 offset (see Aug 10 change), unless -fvtable-thunks is given. It
6057 does this by calling the new routine set_rtti_entry.
d11ad92e 6058 (finish_struct): Likewise.
f30432d7
MS
6059 (set_rtti_entry): New routine to update the rtti information at the
6060 start of the vtable.
6061
6062Mon Aug 14 12:21:22 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6063
6064 * error.c (dump_decl, case IDENTIFIER_NODE): Only work on a dtor
6065 if it's declared in the C++ language spec.
6066 (dump_function_decl): Likewise.
6067 (dump_function_name): Likewise.
6068 (ident_fndecl): Make sure we got something back from lookup_name.
6069 * decl.c (start_function): Likewise.
6070
6071Fri Aug 11 16:52:15 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6072
6073 * call.c (build_method_call): Don't call build_new when calling a
6074 constructor without an instance.
6075
6076Thu Aug 10 20:00:17 1995 Mike Stump <mrs@cygnus.com>
6077
6078 * class.c (prepare_fresh_vtable): Always build the offset to the
6079 complete object, as it doesn't cost much. This allows dynamic_cast
6080 to void * to work when -frtti isn't given.
d11ad92e 6081 (finish_struct): Likewise.
f30432d7
MS
6082
6083Thu Aug 10 16:31:28 1995 Mike Stump <mrs@cygnus.com>
6084
6085 * except.c (build_eh_type): Split out some functionality to new
6086 routine named build_eh_type_type.
6087 (build_eh_type_type): New routine.
6088 (expand_start_catch_block): Use build_eh_type_type, as we never want
6089 the dynamic type of the catch parameter, just the static type.
6090 Fixes core dumps when -frtti is used and one catchs pointers to
6091 classes.
6092
6093Thu Aug 10 14:55:29 1995 Mike Stump <mrs@cygnus.com>
6094
6095 * except.c (expand_builtin_throw): Since we now use normal calling
6096 conventions for __throw, we have to remove the first layer off the
6097 stack, so that the next context we search for handlers is the outer
6098 context instead of the context that had the call to __throw, if we
6099 don't immediately find the desired context.
6100
6101Tue Aug 8 17:44:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6102
6103 * tree.c (cp_expand_decl_cleanup): Returns int, not tree.
6104 * cp-tree.h: Update.
6105
6106 * parse.y (template_type_parm): Add support for `typename'.
6107
6108Tue Aug 8 12:06:31 1995 Mike Stump <mrs@cygnus.com>
6109
6110 * except.c (expand_internal_throw): New internal routine to throw a
6111 value.
6112 (expand_end_all_catch, expand_leftover_cleanups): All throwers
6113 changed to use `expand_internal_throw' instead of jumping to throw
6114 label.
d11ad92e 6115 (expand_end_catch_block, expand_throw): Likewise.
f30432d7
MS
6116 (throw_label): Removed.
6117 (expand_builtin_throw): Changed so that EH parameters are passed by
6118 normal function call conventions. Completes Aug 4th work.
6119
6120Fri Aug 4 17:17:08 1995 Mike Stump <mrs@cygnus.com>
6121
6122 * cp-tree.h (expand_builtin_throw): Declare it.
6123 * decl2.c (finish_file): Call expand_builtin_throw.
6124 * except.c (make_first_label): Remove.
6125 (init_exception_processing): Don't use a LABEL_REF for throw_label,
6126 instead use a SYMBOL_REF, this is so that we don't use LABEL_REFs in
6127 other functions that don't really appear in those functions. This
6128 solves a problem where cc1plus consumed exponential amounts of
6129 memory when -Wall was used.
6130 (expand_end_all_catch, expand_leftover_cleanups,
6131 expand_end_catch_block, expand_throw): Change all uses of
6132 throw_label to match new style.
6133 (do_unwind): Rename parameter to inner_throw_label, as it is now
6134 different from throw_label. Also, assume that our caller will wrap
6135 the passed label with a LABEL_REF, if needed.
6136 (expand_builtin_throw): Make external, change so that the generated
6137 throw is now a real function.
6138 (expand_exception_blocks): Never generate throw code inside another
6139 function.
6140
6141Fri Aug 4 12:20:02 1995 Mike Stump <mrs@cygnus.com>
6142
6143 * decl.c (grokdeclarator): Move checking of mutable const objects
6144 and mutable static objects down, as we might decide during parsing
6145 to unset staticp or constp (for example, when const is part of the
6146 object being pointed to).
6147
6148Thu Aug 3 17:13:43 1995 Mike Stump <mrs@cygnus.com>
6149
6150 * except.c (output_exception_table_entry): Enhance portability to
6151 weird machines.
d11ad92e 6152 (emit_exception_table): Likewise.
f30432d7
MS
6153
6154Thu Aug 3 16:41:38 1995 Mike Stump <mrs@cygnus.com>
6155
6156 * typeck.c (build_ptrmemfunc): Handle casting of pointer to
6157 non-virtual member functions.
6158
6159Wed Aug 2 11:58:25 1995 Mike Stump <mrs@cygnus.com>
6160
6161 * gc.c (build_typeid): Strip cv qualifiers so that const T&, T&, T
6162 and const T all match.
6163
6164Wed Aug 2 11:25:33 1995 Mike Stump <mrs@cygnus.com>
6165
6166 * except.c (build_eh_type): Strip cv qualifiers so that const T&,
6167 T&, T and const T all match.
6168
6169Tue Aug 1 14:20:16 1995 Mike Stump <mrs@cygnus.com>
6170
6171 * except.c: Fix up comments, cleanup code and eliminate exceptNode,
6172 exceptStack, exceptstack, push_except_stmts, pop_except_stmts,
6173 new_except_stack, push_last_insn, pop_last_insn, insn_save_node and
6174 InsnSave. Also, numerous speed improvements, and correctness
6175 improvements. Double faulting in all situations should now be
6176 handled correctly.
6177 (expand_start_all_catch): Instead of having many terminate protected
6178 regions, just have one.
6179 (expand_start_catch_block): No longer have to protect
6180 false_label_rtx, as it isn't used for EH region marking.
6181 (expand_end_catch_block): Expand out EH cleanups here by using
6182 expand_leftover_cleanups.
6183 (expand_end_all_catch): Use sequences instead of playing with insn
6184 links directly.
d11ad92e 6185 (expand_exception_blocks): Likewise. Also protect all catch clauses
f30432d7
MS
6186 with one terminate region.
6187
6188Mon Jul 31 13:24:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6189
6190 * method.c (report_type_mismatch): Don't talk about an object
6191 parameter for non-methods.
6192
6193Sun Jul 30 13:13:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6194
6195 * class.c (finish_struct): Catch private and protected members of
6196 anonymous unions here.
6197 * decl2.c (finish_anon_union): And here.
6198 * parse.y: Instead of here.
6199
6200 * errfn.c (ARGSLIST): Support passing four args.
6201 * error.c (cv_as_string): New function.
6202 (cp_printers): Add it.
6203 * call.c (build_method_call): Report 'const' at end of pseudo-decl.
6204
6205 * method.c (report_type_mismatch): Deal with a bad_arg of 0.
6206
6207 * init.c (expand_aggr_init): Handle volatile objects, too.
6208
6209Sat Jul 29 13:42:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6210
6211 * decl.c (struct binding_level): Keep list of incomplete decls.
6212 (print_binding_level): Use list_length to count them.
6213 (pushdecl): Build up the list.
6214 (hack_incomplete_structures): Walk it and prune completed decls.
6215
6216Fri Jul 28 15:26:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6217
6218 * typeck.c (comp_target_types): Don't check const and volatile for
6219 function types.
d11ad92e 6220 (comp_ptr_ttypes_real): Likewise.
f30432d7
MS
6221
6222Thu Jul 27 15:40:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6223
6224 * typeck.c (comp_target_types): Fix.
6225
6226Thu Jul 27 15:10:48 1995 Mike Stump <mrs@cygnus.com>
6227
6228 * cp-tree.h (unsave_expr_now, build_unsave_expr,
6229 cp_expand_decl_cleanup): Declare new routines.
6230 * decl.c (cp_finish_decl, store_parm_decls,
6231 hack_incomplete_structures): Change all cals from
6232 expand_decl_cleanup to cp_expand_decl_cleanup.
d11ad92e 6233 * gc.c (protect_value_from_gc): Likewise.
f30432d7
MS
6234 * expr.c (cplus_expand_expr): Handle UNSAVE_EXPRs.
6235 * tree.c (unsave_expr): New routine to build an UNSAVE_EXPR.
6236 (unsave_expr_now): Backend routine used by tree expander.
6237 (cp_expand_decl_cleanup): Wrap second argument in an UNSAVE_EXPR to
6238 work around a limitation in the backend. The backend uses the
6239 cleanups multiple times, on disjoint control flows, so we cannot
6240 pass unsaved SAVE_EXPRs to the backend.
6241 * tree.def (UNSAVE_EXPR): New tree code.
6242 * typeck.c (c_expand_return): Move goto/return code up inside
6243 conditional, as we don't always want to do this, we only want to do
6244 this when we don't otherwise finish with this control flow.
6245
6246Thu Jul 27 10:38:43 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6247
6248 * parse.y (typespec): Only complain about typeof if we're not
6249 getting it from a system header.
6250
6251Thu Jul 27 10:26:23 1995 Doug Evans <dje@canuck.cygnus.com>
6252
6253 Clean up prefix attribute handling.
6254 * parse.y (reserved_declspecs): Link prefix attributes with declspecs.
6255 (declmods): Likewise.
6256 (all rules that reference typed_declspecs and declmods): Call
6257 split_specs_attrs or strip_attrs to separate declspecs and attrs.
6258 (lang_extdef): Delete resetting of prefix_attributes.
6259 (template_def, notype_declarator rule): Use NULL_TREE for
6260 prefix_attributes.
6261 (condition): Use NULL_TREE for prefix_attributes.
6262 (setattrs): Deleted.
6263 (nomods_initdcl0): Set prefix_attributes to NULL_TREE.
6264 (component_decl): Delete resetting of prefix_attributes.
6265 (component_decl_1, notype_components rule): Use NULL_TREE for
6266 prefix_attributes.
6267 (simple_stmt): Delete resetting of prefix_attributes.
6268
6269Mon Jul 24 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6270
6271 * call.c (convert_harshness): Deal with reference conversions before
6272 others. Actually do array->pointer decay. Call comp_target_types
6273 with pointer types rather than their targets.
6274
6275 * typeck.c (comp_target_types): Avoid assigning D const * to B *.
6276
6277Mon Jul 24 08:54:46 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6278
6279 * pt.c (to_be_restored): Move decl to global scope.
6280
6281Sat Jul 22 12:22:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6282
6283 * decl.c (start_decl): Put back clearing of DECL_IN_AGGR_P.
6284
6285Fri Jul 21 17:09:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6286
6287 * decl.c (grokdeclarator): Downgrade error about 'extern int A::i'
6288 to pedwarn.
6289
6290 * pt.c (instantiate_template): Also avoid instantiation if the
6291 function has already been declared to be a specialization.
6292
6293 * decl2.c (check_classfn): Ignore cname argument, and return the
6294 matching function.
6295
6296 * decl.c (start_decl): Handle declarations of member functions
6297 outside of the class (i.e. specialization declarations).
6298
6299Thu Jul 20 10:34:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6300
6301 * class.c (finish_struct): Don't mess with the type of bitfields.
6302
6303 * various.c: s/TYPE_POINTER_TO/build_pointer_type/.
6304
6305Thu Jul 20 01:43:10 1995 Mike Stump <mrs@cygnus.com>
6306
6307 * init.c (expand_aggr_init): Assume LOOKUP_ONLYCONVERTING if init
6308 is not a parameter list (TREE_LIST).
6309 (expand_default_init): If LOOKUP_ONLYCONVERTING is set, then set
6310 LOOKUP_NO_CONVERSION so that we don't allow two-level conversions,
6311 but don't set it otherwise.
6312
6313Wed Jul 19 20:32:01 1995 Mike Stump <mrs@cygnus.com>
6314
6315 * init.c (expand_default_init): Don't allow two-level conversions
6316 during construction.
6317
6318Wed Jul 19 18:06:37 1995 Mike Stump <mrs@cygnus.com>
6319
6320 * gc.c (build_headof): The type of dyncasting to a pointer to cv
6321 void, should be pointer to cv void.
6322
6323Wed Jul 19 17:25:43 1995 Mike Stump <mrs@cygnus.com>
6324
6325 * gc.c (build_dynamic_cast): Allow casting in const.
6326
6327Wed Jul 19 16:34:27 1995 Mike Stump <mrs@cygnus.com>
6328
6329 * typeck.c (build_const_cast): If we are passed error_mark_node,
6330 return it.
6331
6332Wed Jul 19 15:24:48 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6333
6334 * class.c (push_nested_class): Make sure TYPE is non-nil.
6335
6336 * cvt.c (type_promotes_to): Watch for error_mark_node on the
6337 incoming TYPE.
6338
6339Wed Jul 19 13:23:12 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
f65f5f62
GB
6340
6341 * cp-tree.h (SIGTABLE_VT_OFF_NAME): Renamed from SIGTABLE_OFFSET_NAME.
6342 (SIGTABLE_VB_OFF_NAME): New macro.
6343 (vt_off_identifier): Renamed from offset_identifier.
6344 (vb_off_identifier): Added extern declaration.
6345
6346 * decl.c (vt_off_identifier): Renamed from offset identifier.
6347 (vb_off_identifier): New variable to hold the identifier for the
6348 sigtable field vb_off.
6349 (init_decl_processing): Initialize vb_off_identifier.
6350 Renamed vt_off_identifier from offset_identifier.
6351 * sig.c (build_signature_method_call): Renamed offset_identifier and
6352 local variable offset to vt_off_identifer and vt_off, respecitively.
6353 * sig.c (build_signature_table_constructor): Renamed offset to vt_off.
6354
6355 * decl.c (init_decl_processing): Add vb_off field to
6356 sigtable_entry_type. Reorder fields so that pfn gets properly
6357 aligned at a 64 bit boundary on the Alpha.
6358 * sig.c (build_signature_table_constructor): Build the constructor
6359 according to the new layout. Set the vb_off field to -1 for now.
6360
6361 * decl.c (init_decl_processing): Align sigtable_entry_type on word
6362 boundaries instead of double word boundaries to save space.
6363
f30432d7
MS
6364Tue Jul 18 16:58:37 1995 Mike Stump <mrs@cygnus.com>
6365
6366 * cvt.c (cp_convert): Always call build_cplus_new for a ctor.
6367
6368Tue Jul 18 14:24:53 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6369
6370 * parse.y (opt.component_decl_list): Only forbid private/protected
6371 in anonymous unions. We need to make this know when the type is
6372 defined for an object, to not give the error.
6373
6374Mon Jul 17 14:22:44 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6375
6376 * parse.y (opt.component_decl_list): Don't allow access control
6377 as private or protected for union members.
6378
6379Sun Jul 16 14:01:00 1995 Jim Wilson <wilson@chestnut.cygnus.com>
6380
6381 * lex.c (check_newline): For 'p' case, move goto skipline line to
6382 before end brace for 'pragma'.
6383
6384Fri Jul 7 13:55:58 1995 Mike Stump <mrs@cygnus.com>
6385
6386 * g++.1: Tiny updates.
6387
6388Fri Jul 7 13:05:20 1995 Mike Stump <mrs@cygnus.com>
6389
6390 * decl.c (cp_finish_decl): Only destruct local static variables if
6391 they are constructed, and only construct the first time control
6392 passes completely through its declaration (if not initialized with a
6393 constant-expression).
d11ad92e 6394 (expand_static_init): Likewise.
f30432d7
MS
6395
6396Wed Jul 5 14:05:04 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6397
6398 * typeck.c (comptypes, case OFFSET_REF): If either offset basetype
6399 is a TEMPLATE_TYPE_PARM, give a match.
6400
f30432d7
MS
6401Fri Jun 30 15:42:57 1995 Mike Stump <mrs@cygnus.com>
6402
6403 * method.c (build_overload_value): Handle encoding of null pointer
6404 constants (or any pointer with a constant numeric value) for
6405 templates.
6406
42783eab
BK
6407Fri Jun 30 13:45:51 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6408
6409 * call.c (convert_harshness): Add QUAL_CODE when we're faced with
6410 const vs non-const for void conversions.
6411
f30432d7
MS
6412Fri Jun 30 10:19:52 1995 Mike Stump <mrs@cygnus.com>
6413
6414 * except.c (expand_start_all_catch): Fix problem with finding an
6415 outer nested try block when there is no code to separate it from an
6416 inner try block.
6417
6418Fri Jun 30 02:22:26 1995 Mike Stump <mrs@cygnus.com>
6419
6420 * search.c (dfs_pushdecls): Consume 2 or 3 orders of magnitude less
6421 memory please when virtual bases are used.
6422
6423Thu Jun 29 19:03:47 1995 Mike Stump <mrs@cygnus.com>
6424
6425 * class.c (build_vbase_path): Avoid testing things that cannot be
6426 null to see if they are null.
6427 * cvt.c (convert_pointer_to_vbase): Remove code that doesn't work.
6428 * decl.c (finish_function): Pass a type into the new
6429 convert_pointer_to_vbase instead of a binfo.
6430 * search.c (convert_pointer_to_vbase): Rewritten to use get_vbase
6431 and convert_pointer_to_real.
6432 (expand_indirect_vtbls_init): Use convert_pointer_to_vbase instead
6433 of the more cryptic call to get_vbase.
6434
e18923b4 6435Thu Jun 29 09:35:05 1995 Mike Stump <mrs@cygnus.com>
535c9c21
MS
6436
6437 * decl.c (BOOL_TYPE_SIZE): Fix broken SLOW_BYTE_ACCESS check.
6438
f30432d7
MS
6439Thu Jun 29 03:43:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6440
6441 * pt.c (instantiate_template): Don't strip 'this' twice.
6442
6443 * pt.c (coerce_template_parms): Allow null pointer constants.
6444
6445 * decl.c (revert_static_member_fn): But only if DECL_ARGUMENTS is
6446 set.
6447
f30432d7
MS
6448Wed Jun 28 18:39:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6449
6450 * decl.c (revert_static_member_fn): Also remove 'this' from
6451 DECL_ARGUMENTS.
6452 * decl2.c (check_classfn): Don't revert this function until we get a
6453 match.
6454
6455Wed Jun 28 14:07:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6456
6457 * parse.y (component_decl): Clear PREFIX_ATTRIBUTES here.
6458
6459Wed Jun 28 11:05:13 1995 Mike Stump <mrs@cygnus.com>
6460
6461 * decl2.c (finish_file): Handle global vector news.
6462 * init.c (build_new): Encode vector news so that later we will know
6463 how many elements there are.
6464
e18923b4 6465Mon Jun 26 13:38:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
415bfbd0
JM
6466
6467 * expr.c (cplus_expand_expr): Don't mess with temp slots.
6468
f30432d7
MS
6469 * decl2.c (warn_if_unknown_interface): Don't crash if tinst_for_decl
6470 returns null.
6471
6472 * decl2.c (check_classfn): Use revert_static_member_fn.
6473 * decl.c (revert_static_member_fn): Diagnose static member functions
6474 declared const or volatile.
6475
6476 * decl2.c (grokfield): Check for missing default args here, too.
6477 (check_default_args): Function to do the checking.
6478 * decl.c (pushdecl): Use it.
6479
6480 * decl.c (pushdecl): Don't warn about shadowing a member of `this'
6481 if there is no `this'.
6482
6483Sun Jun 25 11:34:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6484
6485 * call.c (build_method_call): Downgrade 'called before definition'
6486 to a warning, as it ought to go away after Monterey.
6487
6488Sat Jun 24 14:18:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6489
6490 * pt.c (coerce_template_parms): Don't do extra checking on pointer
6491 to member arguments.
6492
6493 * class.c (finish_struct): const and reference members don't prevent
6494 a class from being an aggregate.
6495
6496 * class.c (finish_struct): Signatures are always aggregates.
6497
f7d9d4a8
JM
6498Fri Jun 23 17:20:29 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6499
f30432d7
MS
6500 * decl2.c (check_classfn): Improve error message.
6501
6502 * pt.c (tsubst): Handle PROMOTE_PROTOTYPES.
f7d9d4a8 6503
f7522313
JM
6504Thu Jun 22 01:50:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6505
f30432d7 6506 * typeck.c (comptypes): Don't ignore method quals.
f7522313 6507
f30432d7
MS
6508 * class.c (finish_struct): Non-abstract virtuals are always USED.
6509
6510 * decl.c (build_ptrmemfunc_type): The underlying union type isn't
6511 IS_AGGR_TYPE, either.
6512 * class.c (finish_struct): Use CLASSTYPE_NON_AGGREGATE instead.
d11ad92e 6513 * cp-tree.h: Likewise.
f30432d7
MS
6514
6515 * cp-tree.h (lang_type): Add aggregate.
6516 (CLASSTYPE_AGGREGATE): New macro.
d11ad92e 6517 (TYPE_NON_AGGREGATE_CLASS): Likewise.
f30432d7
MS
6518 * class.c (finish_struct): Determine whether a class is an
6519 aggregate.
6520 * decl.c (cp_finish_decl): Check TYPE_NON_AGGREGATE_CLASS instead of
6521 TYPE_NEEDS_CONSTRUCTING.
6522 * typeck2.c (digest_init): Check TYPE_NON_AGGREGATE_CLASS for
6523 subobjects, too.
6524
6525 * pt.c (tsubst, PARM_TYPE): Propagate DECL_ARTIFICIAL.
d8f1d487
RK
6526
6527 * decl.c (start_function): For pre-parsed functions, layout all of
6528 the parm decls again.
6529 (grokvardecl): TREE_PUBLIC depends on DECL_THIS_EXTERN, not
6530 DECL_EXTERNAL.
6531
f30432d7
MS
6532 * pt.c (coerce_template_parms): Improve checking for invalid
6533 template parms.
6534
6535Wed Jun 21 12:01:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
6536
6537 * decl.c (grokdeclarator): Forbid declaration of a static member
6538 with the same name as its enclosing class.
6539
d8f1d487
RK
6540Mon Jun 19 10:28:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6541
6542 * decl.c (finish_function): Clear current_class_decl.
6543
6544 * typeck.c (build_conditional_expr): Use convert (boolean_type_node
6545 instead of truthvalue_conversion.
6546
6547 * class.c (finish_struct): A data member with the same name as the
6548 class doesn't suppress constructors.
6549
d11ad92e 6550Fri Jun 16 18:11:39 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
d8f1d487
RK
6551
6552 * decl.c (start_function): If current_class_decl is a signature
6553 pointer, don't dereference it but set C_C_D to current_class_decl.
6554
6555Fri Jun 16 17:06:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6556
6557 * decl.c (duplicate_decls): Complain about virtual functions
6558 redeclared to be inline.
6559
6560Fri Jun 16 13:20:38 1995 Mike Stump <mrs@cygnus.com>
6561
6562 * decl.c (get_unique_name): New routine to name unnamed namespaces.
6563 (push_namespace): Use get_unique_name for naming unnamed namespaces.
6564
d3c89e1f
JM
6565Thu Jun 15 15:00:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6566
d8f1d487 6567 * parse.y: Call cplus_decl_attributes with prefix_attributes where
f30432d7 6568 appropriate.
d8f1d487
RK
6569
6570Wed Jun 14 19:24:49 1995 Mike Stump <mrs@cygnus.com>
6571
6572 * search.c (get_vbase): New routine to switch hierarchies from the
6573 CLASSTYPE_VBASECLASSES to the normal one.
6574 (expand_indirect_vtbls_init): Use get_vbase to figure out how we
6575 want to convert to a vbase pointer.
6576
6577Mon Jun 12 17:50:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6578
6579 * pt.c (instantiate_class_template): Add the new instantiation to
f30432d7 6580 template_classes.
d8f1d487
RK
6581 (do_pending_expansions): Call instantiate_member_templates on all of
6582 the classes in template_classes.
6583
6584Mon Jun 12 12:36:59 1995 Mike Stump <mrs@cygnus.com>
6585
6586 * decl.c (complete_array_type): Fill in the TYPE_DOMAIN of our
6587 TYPE_MAIN_VARIANT if it is not filled in.
6588 * init.c (build_delete): If the TYPE_DOMAIN is not set, give an
6589 error instead of core dumping.
6590
6591Mon Jun 12 10:41:40 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6592
6593 * call.c (can_convert): Also check for distance > 0.
d11ad92e
MS
6594 (can_convert_arg): Likewise.
6595 (user_harshness): Likewise.
d8f1d487
RK
6596
6597Fri Jun 9 19:17:21 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6598
6599 * g++.c (MATH_LIBRARY): Provide default.
6600 (main): Always link with the math library if we link with libstdc++.
6601
6602 * decl.c (start_function): Complain about redefinition of a function
6603 even when the pending_inline version is compiled after the other
6604 version.
6605
6606Thu Jun 8 15:44:38 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6607
6608 * gc.c (build_dynamic_cast): Build up a reference to a parameter of
6609 aggregate type.
6610
d11ad92e 6611Wed Jun 7 15:31:57 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
d8f1d487
RK
6612
6613 * init.c (build_vec_delete): Resolve an offset ref before we try to
6614 use it.
6615
6616Wed Jun 7 14:19:32 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6617
6618 * typeck.c (build_modify_expr): If the class lacks a constructor or
6619 assignment operator, return error_mark_node.
6620 (common_type): Use build_cplus_array_type.
6621
6622Tue Jun 6 09:41:27 1995 Mike Stump <mrs@cygnus.com>
6623
6624 * class.c (dont_allow_type_definitions): New variable set when types
6625 cannot be defined.
6626 (finish_struct): Use it.
6627 * cp-tree.h (dont_allow_type_definitions): Define it.
6628 * parse.y (primary, handler_seq): Set it.
6629
6630Mon Jun 5 18:49:38 1995 Mike Stump <mrs@cygnus.com>
6631
6632 * method.c (build_opfncall): Use DECL_CHAIN, not TREE_CHAIN for
6633 results from lookup_fnfields. Always give warning/error on bad
6634 code.
6635
d11ad92e 6636Mon Jun 5 11:39:37 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
d8f1d487
RK
6637
6638 * init.c (member_init_ok_or_else): Don't allow initialization of
6639 an ancestor's member from within a constructor.
6640
d11ad92e 6641Mon Jun 5 11:20:34 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
d8f1d487
RK
6642
6643 * sig.c (build_signature_table_constructor): Use DECL_CONTEXT
6644 instead of DECL_CLASS_CONTEXT for calculating the vfield offset so
6645 abstract virtual functions are handled correctly.
6646
6647 * sig.c (build_signature_table_constructor): Store the correct
6648 delta in signature table entries. It does not yet work for
6649 classes with virtual base classes as implementations of signatures.
6650 (build_signature_method_call): Add the delta to the object_ptr
6651 before generating the function call.
6652
6653 * call.c (build_method_call): Make instance_ptr the signature
6654 pointer itself instead of dereferencing the optr.
6655 * sig.c (build_signature_method_call): Dereference the optr for the
6656 direct and virtual calls.
6657
6658 * sig.c (build_signature_table_constructor): Make the tag for
6659 default implementations -1 instead of 2.
6660 (build_signature_method_call): Change the generated conditional
6661 expression correspondingly.
6662
6663 * sig.c (build_signature_pointer_constructor): Deleted the sorry
6664 message that said we can't handle multiple inheritance for
6665 implementations of signatures
6666 (build_signature_method_call): Use the offset from the sigtable
6667 entry instead of the vptr field from the signature pointer for
6668 building a virtual function call.
6669
6670 * class.c (build_vfn_ref): Deleted signature specific code, we don't
6671 call this function anymore from build_signature_method_call.
6672
6673 * cp-tree.h (SIGNATURE_VPTR_NAME): Deleted. We use the right vptr
6674 field in the object now instead of in the signature pointer/ref.
6675 (build_vptr_ref): Deleted extern declaration.
6676 * sig.c (build_vptr_ref): Deleted.
6677 (build_signature_pointer_or_reference_type): Deleted construction of
6678 the vptr field.
6679 (build_signature_pointer_constructor): Deleted initialization of/
6680 assignment to the vptr field.
6681
6682 * sig.c (build_signature_table_constructor): Convert the signature
6683 table entry fields to their correct types.
6684
6685 * sig.c (build_signature_table_constructor): Don't call digest_init
6686 for the fields of a sigtable entry, it's wasted time.
6687
6688 * sig.c (build_signature_table_constructor): Correctly set the
6689 offset and index fields of a sigtable entry. Build the constructor
6690 the way digest_init does, digest_init can't handle initializing an
6691 anonymous union inside a struct.
6692 (build_signature_method_call): Use the index field instead of the
6693 delta field to get the vtable index.
6694
6695 * decl.c (init_decl_processing): Fix number of fields for building
6696 sigtable_entry_type.
6697
6698 * cp-tree.h (tag_identifier, offset_identifier): Added extern decls.
6699 (SIGTABLE_CODE_NAME): Renamed to SIGTABLE_TAG_NAME.
6700 (SIGTABLE_PFN_NAME): Deleted, we'll use VTABLE_PFN_NAME instead.
6701 * decl.c (tag_identifier, offset_identifier): New variables to
6702 hold the identifiers for the sigtable fields tag and offset.
6703 (init_decl_processing): Initialize these variables.
6704 (init_decl_processing): Use these variables to build the
6705 sigtable_entry_type structure. Rename the code and offset fields
6706 to tag and delta, respectively; add offset and index fields. Changed
6707 types of fields from short_integer_type_node to delta_type_node.
6708 * sig.c (build_signature_table_constructor): Rename code and offset
6709 to tag and delta, respectively.
d11ad92e 6710 (build_signature_method_call): Likewise. Use above variables.
d8f1d487 6711
d8f1d487
RK
6712Thu Jun 1 17:03:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6713
6714 * decl.c (lookup_name_real): Don't try to look anything up in an
6715 erroneous object.
6716
6717Fri Jun 2 10:30:14 1995 Mike Stump <mrs@cygnus.com>
6718
6719 * method.c (build_overload_int): New routine. Break out
6720 functionality from build_overload_value so we can reuse it.
6721 (build_overload_value): Handle pointer to member functions as value
6722 parameters for templates.
6723 (build_overload_identifier): Since template parameters are shared
6724 among all instantiations, we have to substitute in the real types
6725 in TREE_TYPE (parm).
d11ad92e
MS
6726 pt.c (coerce_template_parms): Likewise.
6727 (push_template_decls): Likewise.
d8f1d487
RK
6728 (grok_template_type): Deleted as template parameters are shared
6729 among all instantiations.
6730
6731Wed May 31 19:10:32 1995 Mike Stump <mrs@cygnus.com>
6732
6733 * decl.c (grokdeclarator): Always give errors on constant overflow
6734 for array indices.
6735
6736Wed May 31 11:39:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6737
6738 * typeck.c (commonparms): Don't abort if simple_cst_equal returns < 0.
6739 (build_c_cast): Don't tack on a NON_LVALUE_EXPR when casting to
6740 reference type.
6741 (build_indirect_ref): Fix check for *&.
6742
72b7eeff
MS
6743Fri Jun 16 06:54:03 1995 Mike Stump <mrs@cygnus.com>
6744
6745 * Version 2.7.0 released.
6746
d11ad92e 6747Fri Jun 16 15:07:29 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
72b7eeff
MS
6748
6749 * Make-lang.in (DEMANGLER_PROG): Add LIBS.
6750
6751Thu Jun 15 15:00:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6752
6753 * decl.c (define_function): Don't set DECL_INTERFACE_KNOWN.
6754
6755Wed Jun 7 20:00:31 1995 Mike Stump <mrs@cygnus.com>
6756
6757 * *.[chy]: Change all callers of finish_decl to cp_finish_decl.
6758 * decl.c (finish_decl): New routine to handle call backs from the
6759 mid end (declare_hidden_char_array).
6760
6761Wed Jun 7 19:02:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6762
6763 * decl.c (start_function): Handle setting C_C_D here.
6764 (set_C_C_D): Removed.
6765 (struct saved_scope): Remove class_decl.
6766 (push_to_top_level): Don't save current_class_decl.
6767 (pop_from_top_level): Don't restore current_class_decl or C_C_D.
6768 (struct cp_function): Add C_C_D.
6769 (push_cp_function_context): Save C_C_D.
6770 (pop_cp_function_context): Restore C_C_D.
6771
6772Fri Jun 2 11:05:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6773
6774 * decl.c (set_C_C_D): New function. suspend_momentary before
6775 building C_C_D.
6776 (pop_from_top_level): Call it.
d11ad92e
MS
6777 (start_function): Likewise.
6778 (pop_cp_function_context): Likewise.
72b7eeff
MS
6779
6780 * class.c, cp-tree.h, decl.c, decl2.c, parse.y: Lose all references
6781 to current_vtable_decl, CLASSTYPE_INST_VAR and CLASSTYPE_VTBL_PTR.
6782
6783 * decl.c (push_cp_function_context): Save current_class_decl.
6784 (pop_cp_function_context): Restore current_class_decl and set C_C_D.
6785 (pop_from_top_level): Don't use CLASSTYPE_INST_VAR to set C_C_D.
d11ad92e 6786 (start_function): Likewise.
72b7eeff
MS
6787
6788 * class.c (popclass): Don't mess with current_class_decl,
6789 current_vtable_decl, or C_C_D.
6790
6791Mon May 29 12:45:10 1995 Paul Eggert <eggert@twinsun.com>
6792
6793 * Make-lang.in (c++.mostlyclean): Remove $(DEMANGLER_PROG).
6794
d11ad92e 6795Wed May 24 15:55:18 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
b796119f
RK
6796
6797 * decl.c (duplicate_decls): Check simple_cst_equal result against 0.
6798 * decl2.c (finish_anon_union): Likewise.
6799 * method.c (largest_union_member): Likewise.
6800
d11ad92e 6801Wed May 24 14:41:11 1995 H.J. Lu <hjl@nynexst.com>
103894f1
L
6802
6803 * Make-lang.in (cxxmain.o): Replace single quotes with backslashes.
6804
d11ad92e 6805Mon May 22 17:38:48 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
fbb47000
RK
6806
6807 * Make-lang.in (g++, g++-cross, cc1plus, DEMANGLER_PROG):
6808 Use $@ instead of output name so works even if have .exe.
6809 (cxxmain.o): Use cp if ln -s fails.
6810 (c++.install-man): Use $(exeext) in executable names.
6811 (c++.mostlyclean, stage[1-4]): Use $(objext) in object file names.
6812 * Makefile.in (../cc1plus): Use $(exeext) in name of executable.
6813
878cd289
MS
6814Wed May 24 01:39:03 1995 Jason Merrill <jason@deneb.cygnus.com>
6815
6816 * call.c (build_method_call): parms can be null, duh.
6817
6818Tue May 23 01:32:09 1995 Jason Merrill <jason@deneb.cygnus.com>
6819
6820 * call.c (build_method_call): If convert_arguments failed, just bail.
6821
6822Fri May 19 10:31:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6823
6824 * cvt.c (convert_force): Pass LOOKUP_NORMAL to cp_convert.
6825
6826 * tree.c (copy_to_permanent): Oops.
6827
d11ad92e 6828Fri May 19 10:01:07 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
878cd289
MS
6829
6830 * cp-tree.h (break_out_target_exprs): Add decl.
6831
6832Thu May 18 13:02:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6833
6834 * decl.c (start_function): Move *all* interface handling stuff after
6835 the pushdecl.
6836
6837 * tree.c (mapcar): Renamed from make_deep_copy and generalized.
6838 (perm_manip): Return t if permanent, otherwise 0.
6839 (copy_to_permanent): Use them.
6840 (bot_manip): Helper for break_out_target_exprs.
6841 (break_out_target_exprs): New function. Uses mapcar.
6842
6843 * typeck.c (convert_arguments): Use it.
6844
6845 * method.c (hack_identifier): Use convert_from_reference to
6846 dereference a reference.
6847
6848Wed May 17 17:54:54 1995 Mike Stump <mrs@cygnus.com>
6849
6850 * call.c (convert_harshness): Move reference bashing before pointer
6851 to member bashing.
6852
6853Wed May 17 16:57:53 1995 Mike Stump <mrs@cygnus.com>
6854
6855 * cvt.c (convert_to_reference): Only complain, if complaints are
6856 wanted.
d11ad92e
MS
6857 * typeck.c (build_function_call_real): Likewise. If
6858 LOOKUP_SPECULATIVELY is set and something won't work, return
6859 NULL_TREE.
6860 * cvt.c (cp_convert): Likewise. Pass flags down to build_method_call.
878cd289 6861 (convert): Pass LOOKUP_NORMAL to cp_convert.
d11ad92e 6862 * typeck.c (convert_for_assignment): Likewise.
878cd289 6863 (convert_force): Pass LOOKUP_COMPLAIN to cp_convert.
d8f1d487 6864 (convert_arguments): Get out early if we get an error_mark_node.
878cd289
MS
6865 (convert_for_initialization): Use cp_convert instead of convert so
6866 that we can pass flags down.
6867 * cp-tree.h (LOOKUP_SPECULATIVELY): Added documentation.
6868
c19a8067
JM
6869Wed May 17 01:43:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6870
878cd289
MS
6871 * typeck2.c (store_init_value): Don't take the MAIN_VARIANT of the
6872 decl type.
6873
c19a8067
JM
6874 * class.c (finish_struct): Don't complain about a class with no
6875 user-defined constructors but with a member that has no default
6876 constructor, as this is OK for aggregates.
6877
6878 * expr.c (cplus_expand_expr, NEW_EXPR): If this is an explicit
6879 constructor call, mark slot addressable.
6880
d11ad92e 6881Tue May 16 18:37:51 1995 Douglas Rupp <drupp@cs.washington.edu>
eacd15bc
DR
6882
6883 * g++.c: Changed WINNT to _WIN32.
6884
a9aedbc2
MS
6885Tue May 16 12:40:16 1995 Jason Merrill <jason@lisa.cygnus.com>
6886
6887 * lex.c (handle_sysv_pragma): Don't use token_buffer.
6888
6889Tue May 16 12:05:26 1995 Mike Stump <mrs@cygnus.com>
6890
6891 * call.c (resolve_scope_to_name): Add initial semantic support for
6892 namespaces.
d11ad92e
MS
6893 * class.c (finish_struct): Likewise.
6894 * cp-tree.h (NAMESPACE_LEVEL): Likewise.
6895 * cvt.c (build_up_reference, convert_to_reference): Likewise.
6896 * decl.c (binding_level::namespace_p, suspend_binding_level): Likewise.
6897 (resume_binding_level, toplevel_bindings_p): Likewise
6898 (namespace_bindings_p, declare_namespace_level): Likewise.
6899 (resume_level, push_namespace, pop_namespace): Likewise.
6900 (pop_everything, pushtag, duplicate_decls, pushdecl): Likewise.
6901 (implicitly_declare, lookup_namespace_name): Likewise.
6902 (lookup_name_real, start_decl, make_temporary_for_reference): Likewise.
6903 (obscure_complex_init, finish_decl, expand_static_init): Likewise.
6904 (grokvardecl, grokdeclarator, parmlist_is_exprlist): Likewise.
6905 (store_parm_decls, hack_incomplete_structures): Likewise.
6906 * decl2.c (get_temp_name, finish_anon_union): Likewise.
6907 (current_namespace, push_namespace, pop_namespace): Likewise.
6908 (do_namespace_alias, do_toplevel_using_decl): Likewise.
6909 (do_class_using_decl): Likewise.
6910 * error.c (dump_decl): Likewise.
6911 * init.c (build_member_call, build_offset_ref): Likewise.
6912 * lex.c (identifier_type): Likewise.
6913 * parse.y (lang_extdef, using_decl, extdef): Likewise.
6914 (component_decl_1, nested_name_specifier_1): Likewise.
6915 * spew.c (yylex): Likewise.
6916 * tree.def (NAMESPACE_DECL): Likewise.
a9aedbc2
MS
6917
6918Tue May 16 11:55:35 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6919
6920 * decl.c (push_overloaded_decl): Return the new decl even if it
6921 can't be pushed.
6922
6923Tue May 16 11:00:37 1995 Jason Merrill <jason@lisa.cygnus.com>
6924
6925 * typeck.c (decay_conversion): Split out from default_conversion.
6926 (default_conversion): Call it.
d11ad92e 6927 (build_binary_op): Likewise.
a9aedbc2
MS
6928 (build_binary_op_nodefault): Use decay_conversion for truth ops.
6929
6930Mon May 15 12:47:56 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6931
6932 * decl.c (warn_extern_redeclared_static): This is a pedwarn.
6933 (duplicate_decls): Always use the old decl's linkage info. Don't
6934 play with linkage of consts.
6935 (pushdecl): Don't play with linkage of consts.
6936 (redeclaration_error_message): Don't complain about an old public
6937 decl and a new non-public decl here.
6938 (grokvardecl): Handle linkage of consts here.
6939 (grokdeclarator): An 'extern inline' is public. Pass constp to
6940 grokvardecl.
6941 (start_function): Wait until after the pushdecl to do some linkage
6942 stuff.
6943
6944 * decl2.c (import_export_vtable): Make duplicates weak rather than
6945 static if supported.
d11ad92e
MS
6946 (import_export_inline): Likewise.
6947 * pt.c (do_pending_expansions): Likewise.
a9aedbc2
MS
6948
6949 * class.c (build_vbase_path): flag_assume_nonnull_objects only
6950 affects reference conversion.
6951
6952 * init.c (emit_base_init): Build up an RTL_EXPR and add it to
f30432d7 6953 rtl_expr_chain.
a9aedbc2
MS
6954 * decl.c, decl2.c: s/base_init_insns/base_init_expr/.
6955
7154457b
PE
6956Tue May 16 07:06:28 1995 Paul Eggert <eggert@twinsun.com>
6957
6958 * method.c (numeric_output_need_bar): Renamed from misspelling.
6959
45ca9d09
RK
6960 * typeck.c (build_ptrmemfunc): Fix misspellings in messages.
6961
7ab7b006
RK
6962Sun May 14 10:26:22 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6963
6964 * lang-options.h, lang-specs.h: New files.
6965
fd378c9d
JM
6966Thu May 11 00:31:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6967
6968 * typeck.c (default_conversion): Don't check for BLKmode before
6969 pulling out the decl_constant_value.
6970
6971 * decl.c (start_function): Clear named_labels and shadowed_labels.
6972
6973 * typeck.c (build_function_call_real): Also synthesize methods here.
6974
6975Wed May 10 00:55:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6976
6977 * decl2.c (finish_file): Synthesize exported methods before the
6978 reconsider loop.
6979
6980 * parse.y: Move declaration of flag_new_for_scope to file scope.
6981
863adfc0
MS
6982Tue May 9 19:10:33 1995 Mike Stump <mrs@cygnus.com>
6983
6984 * decl2.c: Add flag_new_for_scope for new -ffor-scope flag.
6985 * parse.y (FOR): Conditionalize the pushing and poping of scope for
6986 the for-init-statement upon the new flag_new_for_scope.
6987 * parse.y (try_block): Simplify and use compstmt.
6988
6989Mon May 8 12:41:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6990
6991 * decl.c (define_function): Mark function decl artificial.
6992
6993Sun May 7 00:51:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6994
6995 * parse.y (simple_stmt, FOR): Put back push/pop for condition scope.
6996
6997 * decl2.c (grokclassfn): DECLs don't have cv-qualified types.
d11ad92e 6998 * tree.c (build_cplus_method_type): Likewise.
863adfc0
MS
6999
7000 * cp-tree.h (SET_DECL_ARTIFICIAL): Just set DECL_ARTIFICIAL to 1.
7001
7002 * typeck.c (build_function_call_real): If convert_arguments failed,
7003 just bail.
7004 (convert_arguments): If one of the arguments is error_mark_node,
7005 just bail.
7006
7007Sat May 6 02:39:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7008
7009 * decl.c (duplicate_decls): Don't check DECL_NOT_REALLY_EXTERN for
7010 decls that don't include it.
7011
7012Fri May 5 14:23:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7013
7014 * decl.c (duplicate_decls): Decls that have DECL_INTERFACE_KNOWN or
7015 DECL_NOT_REALLY_EXTERN set aren't extern decls.
7016
7017 * typeck.c (build_indirect_ref): Don't call default_conversion for a
7018 parameter of reference_type.
7019 * cvt.c (convert_from_reference): Just use build_indirect_ref.
7020
7021 * pt.c (do_type_instantiation): Only instantiate member functions
7022 that actually come from templates.
7023
7024Fri May 5 09:46:05 1995 Mike Stump <mrs@cygnus.com>
7025
7026 * parse.y: Generalized cleanup of poplevels, and compound statements
7027 and compound statements in try blocks. Rewritten `for' rule so that
7028 the scope of variables declared in the for clause is shortened to
7029 span just to the end of the statement, instead of the whole
7030 containing block.
7031
7032Fri May 5 00:37:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7033
7034 * call.c (convert_harshness): Handle pointers to members better.
7035
7036Thu May 4 16:00:26 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7037
7038 * decl2.c (delete_sanity): Do access control here.
7039 * init.c (build_delete): Instead of here.
7040
7041 * Make-lang.in: Build c++filt.
7042
7043Wed May 3 02:59:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7044
7045 * decl2.c (cplus_decl_attributes): If we just modified a TYPE_DECL,
7046 update our IDENTIFIER_TYPE_VALUE.
7047
a5894242
MS
7048Fri Apr 28 07:58:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7049
7050 * lex.c (cons_up_default_function): Fix linkage of #pragma
7051 implemented functions.
7052
7053Thu Apr 27 16:56:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7054
7055 * method.c (build_overload_name): Simplify and fix repeated type
7056 folding.
7057
7058 * decl.c (grokdeclarator): Prohibit pointers to void or reference
f30432d7 7059 members.
a5894242
MS
7060
7061Thu Apr 27 09:49:07 1995 Mike Stump <mrs@cygnus.com>
7062
7063 * typeck2.c (process_init_constructor): Make sure initializers are
7064 fully digested.
7065
7066Thu Apr 27 01:11:55 1995 Jason Merrill <jason@python.cygnus.com>
7067
7068 * lex.c (cons_up_default_function): Always defer synthesis.
7069
7070Thu Apr 27 00:20:37 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7071
7072 * decl2.c (mark_inline_for_output): Don't play with pending_inline
7073 stuff.
7074
7075Wed Apr 26 17:48:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7076
7077 * call.c (user_harshness): New function; like build_type_conversion,
7078 but doesn't actually build anything.
7079 (compute_conversion_costs): Use it instead of build_type_conversion.
7080
7081Wed Apr 26 17:11:25 1995 Jason Merrill <jason@deneb.cygnus.com>
7082
7083 * typeck.c (build_function_call_real): Improve error message for
7084 calling a non-function.
7085
7086 * method.c (hack_identifier): Lose check for calling a data member.
7087
7088Wed Apr 26 16:59:13 1995 Mike Stump <mrs@cygnus.com>
7089
7090 * typeck2.c (build_functional_cast): Remove very old cruft.
7091 Seems like good code is generated without it.
7092
7093Wed Apr 26 00:47:16 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7094
7095 * method.c (do_build_assign_ref): Fix handling of anonymous unions.
d11ad92e 7096 (do_build_copy_constructor): Likewise.
a5894242
MS
7097
7098 * parse.y (simple_stmt, SWITCH): Call {push,pop}_switch.
7099
7100 * decl.c (push_switch): New function.
d11ad92e 7101 (pop_switch): Likewise.
a5894242
MS
7102 (define_case_label): Check for jumping over initialization.
7103
7104 * call.c (build_method_call): Check for an inline function being
7105 called before its definition has been seen.
d11ad92e 7106 * typeck.c (build_function_call_real): Likewise.
a5894242
MS
7107
7108 * decl.c (duplicate_decls): Check for a function being redeclared
7109 inline after its address has been taken.
7110
7111 * typeck.c (build_conditional_expr): Handle related class lvalues.
7112
7113Tue Apr 25 13:20:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7114
7115 * pt.c (do_pending_expansions): Don't expand unused templates.
7116
7117 * parse.y (component_decl): Accept a lone semicolon.
7118
7119Tue Apr 25 00:25:56 1995 Jason Merrill <jason@rtl.cygnus.com>
7120
7121 * call.c (build_method_call): Don't allow an RTL_EXPR to serve as the
7122 object parameter anymore.
7123
7124 * expr.c (cplus_expand_expr): Don't create RTL_EXPRs with no insns.
7125
7126Mon Apr 24 12:35:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7127
7128 * parse.y (simple_stmt, decl case): Clear prefix_attributes.
d11ad92e 7129 (lang_extdef): Likewise.
a5894242
MS
7130
7131 * parse.y (maybe_parmlist): New rule for use in declarators where
7132 this could either be a list of expressions or parameters. Calls
7133 suspend_momentary before deciding which.
7134 (direct_after_type_declarator): Use it.
7135 (complex_direct_notype_declarator): Use it.
7136
7137 * pt.c (tsubst): Propagate attributes const and noreturn.
7138
7139 * typeck.c (build_modify_expr): If warn_synth, call build_opfncall
7140 before doing the default thing.
7141
2db70b29
DE
7142Thu Apr 27 21:49:36 1995 Doug Evans <dje@cygnus.com>
7143
7144 * typeck.c (common_type): Call lookup_attribute instead of
7145 value_member.
7146
d11ad92e 7147Tue Apr 25 18:07:43 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
91887f0b
RK
7148
7149 * Make-lang.in: Change "realclean" to "maintainer-clean".
7150
e8abc66f
MS
7151Sun Apr 23 12:32:38 1995 Mike Stump <mrs@cygnus.com>
7152
7153 * decl2.c (finish_file): Fix broken linked list handling.
7154
7155Fri Apr 21 18:08:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7156
7157 * class.c (finish_base_struct): Don't set TYPE_HAS_COMPLEX_*_REF
7158 as often.
d11ad92e 7159 (finish_struct): Likewise.
e8abc66f
MS
7160
7161 * various: Use TYPE_HAS_TRIVIAL_* instead of TYPE_HAS_COMPLEX_*.
7162
7163 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): New macro.
7164 (TYPE_HAS_TRIVIAL_ASSIGN_REF): New macro.
7165
7166Fri Apr 21 15:52:22 1995 Jason Merrill <jason@python.cygnus.com>
7167
7168 * typeck.c (c_expand_return): Only expand a returned TARGET_EXPR if
7169 it is of the same type as the return value.
7170
7171Fri Apr 21 03:01:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7172
7173 * decl2.c (finish_file): Reconsider if synthesizing a method wrote
7174 out its assembly.
7175
7176 * typeck.c (convert_for_initialization): Don't call a trivial copy
7177 constructor.
7178
7179 * typeck2.c (store_init_value): Only abort if the type has a
7180 non-trivial copy constructor.
7181
7182 * typeck.c (c_expand_return): If we're returning in a register and
7183 the return value is a TARGET_EXPR, expand it. Only do
7184 expand_aggr_init if we're returning in memory.
7185 (expand_target_expr): Function to expand a TARGET_EXPR.
7186 (build_modify_expr): Use it.
7187
7188 * tree.c (build_cplus_new): Layout the slot.
7189
7190 * expr.c (cplus_expand_expr): Use expand_call to expand the call
7191 under a NEW_EXPR, so the target is not discarded.
7192
7193Thu Apr 20 14:59:31 1995 Mike Stump <mrs@cygnus.com>
7194
7195 * gc.c (build_dynamic_cast): Tighten error checking.
7196
7197Thu Apr 20 11:23:54 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7198
7199 * expr.c (cplus_expand_expr): Only abort if the returned target is
7200 different from what we expected if the type has a non-trivial copy
7201 constructor.
7202
7203 * decl2.c (cplus_decl_attributes): Attributes applied to a template
7204 really apply to the template's result.
7205
7206 * tree.c (lvalue_p): Check IS_AGGR_TYPE instead of TREE_ADDRESSABLE
7207 to decide whether to consider a CALL_EXPR an lvalue.
7208
7209 * class.c (finish_struct_bits): Only set TREE_ADDRESSABLE if the
7210 type has a non-trivial copy constructor.
7211
7212 * decl.c (start_function): If interface_known, unset
7213 DECL_NOT_REALLY_EXTERN on the function.
7214
7215Wed Apr 19 16:53:13 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7216
7217 * pt.c (do_function_instantiation): Handle explicit instantiation of
7218 member functions.
7219 (do_type_instantiation): Handle 'inline template class foo<int>',
7220 meaning just spit out the vtable.
7221
7222 * lex.c (cons_up_default_function): Set DECL_NOT_REALLY_EXTERN on
7223 the consed functions.
7224
7225 * decl2.c (import_export_inline): Set DECL_INTERFACE_KNOWN.
7226
d11ad92e 7227Wed Apr 19 16:28:17 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
e8abc66f
MS
7228
7229 * call.c, class.c, decl2.c, gc.c, init.c, parse.y, pt.c, search.c,
7230 typeck.c: Include output.h.
7231
d11ad92e 7232Wed Apr 19 14:57:21 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
e8abc66f
MS
7233
7234 * call.c (build_method_call): Allow a signature member functions to
7235 be called from a default implementation.
7236
7237Wed Apr 19 10:21:17 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7238
7239 * repo.c (finish_repo): Remember what directory we are in.
7240
7241 * search.c (expand_upcast_fixups): Don't mess with abort_fndecl.
7242
7243 * repo.c: Use obstacks instead of fixed-size buffers. Don't spit
7244 out the second copy of the symbol name. Don't remember COLLECT_GCC.
7245
43f2999d
MS
7246Wed Apr 19 02:32:40 1995 Mike Stump <mrs@cygnus.com>
7247
7248 * search.c (virtual_context): New function to get the virtual
7249 context of a function.
7250 (expand_upcast_fixups): New function to generate runtime vtables.
d11ad92e 7251 (fixup_virtual_upcast_offsets): Likewise.
43f2999d
MS
7252 (expand_indirect_vtbls_init): Use fixup_virtual_upcast_offsets to
7253 ensure that the this offsets for upcasts from virtual bases into
7254 other virtual bases or non-virtual bases are correct at construction
7255 time and destruction time.
7256 * class.c (fixup_vtable_deltas): Modify to fixup all offsets in all
7257 vtables in all virtual bases, instead of just one vtable in each
7258 virtual base.
d11ad92e 7259 (fixup_vtable_deltas1): Likewise.
43f2999d 7260
d11ad92e 7261Tue Apr 18 03:57:35 1995 Michael Meissner <meissner@cygnus.com>
44a8d0b3
MS
7262
7263 * Makefile.in (lex.o): Add dependency on c-pragma.h.
7264
7265 * lex.c (handle_sysv_pragma): Use NULL_PTR and NULL_TREE as
7266 appropriate, instead of 0.
7267
7268Mon Apr 17 12:28:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7269
7270 * decl.c (pushdecl): Use decls_match, not duplicate_decls, for
7271 comparing local and global decls.
7272
7273Fri Apr 14 01:46:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7274
7275 * typeck.c (convert_arguments): Only prohibit passing to ... of
7276 types with non-trivial copy constructors.
7277
7278 * repo.c (repo_template_used): Don't try to mess with no id.
7279
7280Fri Apr 14 23:32:50 1995 Per Bothner <bothner@rtl.cygnus.com>
7281
7282 * decl.c (duplicate_decls): Use cp_warning_at for redundant-decls.
7283
d11ad92e 7284Thu Apr 13 15:37:42 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
44a8d0b3
MS
7285
7286 * cp-tree.h (current_tinst_level): Delete declaration, since it's
7287 static inside pt.c.
7288
7289 * typeck.c (build_modify_expr): Catch incompatible array assignment.
7290
7291 * parse.y (attribute_list, attrib): Rewrite actions to feed the
7292 right stuff to decl_attributes.
7293
7294Thu Apr 13 11:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7295
7296 * search.c (dfs_debug_mark): Check for magic virtual like
7297 import_export_vtable.
7298
7299 * typeck.c (build_binary_op_nodefault): Don't call cp_pedwarn with
7300 four args.
7301
7302Wed Apr 12 12:02:57 1995 Jason Merrill <jason@deneb.cygnus.com>
7303
7304 * decl2.c (finish_file): Move prevtable pass before needs_messing_up
7305 decision.
7306
7307Tue Apr 11 11:20:27 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7308
7309 * decl.c (finish_decl): If we're writing out a static data member of
7310 a class, we want the debug info for that class.
7311
7312 * gc.c (build_t_desc): Check linkage of a class properly.
7313
7314 * class.c (finish_struct): Set the 'headof' offset for the main
7315 vtable properly.
7316 (prepare_fresh_vtable): Fix typeinfo pointer here.
7317 (modify_one_vtable): Instead of here.
7318
7319Mon Apr 10 12:15:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7320
7321 * repo.c (repo_get_id): New function to return the interesting
7322 identifier for a repo entity.
7323 (repo_template_used): Use it.
7324 (repo_template_instantiated): Mark the id as chosen.
7325 (init_repo): Record whether or not the id was chosen.
7326 (finish_repo): Note if an id was newly chosen.
7327
7328 * pt.c (do_function_instantiation): Call repo_template_instantiated.
d11ad92e 7329 (do_type_instantiation): Likewise. Don't diagnose multiple
44a8d0b3
MS
7330 instantiation.
7331
7332 * decl2.c (finish_file): Use DECL_NOT_REALLY_EXTERN when deciding
7333 whether or not to synthesize a method.
7334
7335 Undo these changes:
7336 * class.c (finish_vtbls): build more vtables if flag_rtti is on.
7337 * class.c (modify_all_direct_vtables): ditto.
7338 * init.c (expand_direct_vtbls_init): expand more vtables if
7339 flag_rtti is on.
7340
79ff2c6c
MS
7341Sat Apr 8 17:45:41 1995 Mike Stump <mrs@cygnus.com>
7342
7343 * gc.c (build_headof): Use ptrdiff_type_node instead of
7344 integer_type_node on pointer arithmetic.
7345
7346Sat Apr 8 11:57:04 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7347
7348 * typeck.c (build_modify_expr): Undo previous change.
7349
7350Thu Apr 6 01:23:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7351
7352 * Makefile.in (compiler): Remove ../cc1plus before rebuilding it.
7353
7354 * repo.c (get_base_filename): Put the .rpo file in the directory
7355 with the object file, not the source.
7356
7357 * typeck.c (build_conditional_expr): Handle pmf's better.
7358
7359 * repo.c (finish_repo): Also use ASM_OUTPUT_LABELREF to print out
7360 the name of the symbol.
7361
7362Wed Apr 5 15:24:12 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7363
7364 * repo.c (open_repo_file): Make repo filename DOS-compliant.
7365 (*): Also write a new repo file if some previously-used
7366 templates are no longer used. Only remember the identifier.
7367
7368 * lex.c (cons_up_default_function): If this function belongs to a
7369 template class, call repo_template_used for it.
7370
7371 * repo.c (repo_template_used): Using a class means using its vtable,
7372 if any.
d11ad92e 7373 (finish_repo): Likewise.
79ff2c6c
MS
7374
7375 * typeck.c (build_modify_expr): Only wrap TARGET_EXPRs in RTL_EXPRs
7376 if the type has a complex copy constructor.
7377
7378 * decl2.c (lang_decode_option): -frepo implies
7379 -fno-implicit-templates.
7380
7381 * decl.c (start_function): Clear current_{base,member}_init_list.
7382
7383 * lex.c (init_lex): Also unset *_eq if ! flag_operator_names.
7384
7385Tue Apr 4 16:11:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7386
7387 * decl.c (struct cp_function): Add {base,member}_init_list.
7388 (push_cp_function_context): Save current_{base,member}_init_list.
7389 (pop_cp_function_context): Restore them.
7390
b19b4a78
MS
7391Mon Apr 3 16:55:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7392
7393 * repo.c (get_base_filename): Take filename parm, fix logic bug.
7394
7395 * typeck.c (build_compound_expr): Do not warn about a compound expr
7396 in which the first expression has no side effects.
7397 (build_x_compound_expr): Warn here instead.
7398 (build_conditional_expr): Don't warn about a conditional expression
7399 between an enum and the type it promotes to.
7400
7401 * init.c (build_new): Handle initialization of arrays of builtins
7402 properly.
7403
d11ad92e 7404Mon Apr 3 15:08:04 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b19b4a78
MS
7405
7406 * repo.c: Include config.h to get definitions of bcopy and rindex
7407 on systems that don't have them (e.g., SVR4).
7408
7409Mon Apr 3 14:41:55 1995 Mike Stump <mrs@cygnus.com>
7410
7411 * decl2.c (finish_table): Pass NULL_TREE instead of init to
7412 finish_decl so that it won't try and do error checking on the
7413 initializer.
7414
7415Mon Apr 3 10:45:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7416
7417 * repo.c (get_base_filename): Analyze COLLECT_GCC_OPTIONS to
7418 determine whether this compile used -c -o.
7419 (open_repo_file): Use get_base_filename. Remove the extension.
7420 (finish_repo): Spit out the values of main_input_filename,
7421 COLLECT_GCC and COLLECT_GCC_OPTIONS.
7422
7423 * parse.y (structsp): Add TYPENAME_KEYWORD complex_type_name.
7424
faae18ab
MS
7425Sun Apr 2 23:43:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7426
7427 * search.c (compute_access): Don't try to do access control on
7428 nested types.
7429
7430Fri Mar 31 10:14:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7431
7432 * repo.c: New file to handle things repo.
7433
7434 * pt.c (instantiate_template): Call repo_template_used if the
7435 definition is accessible.
7436 (mark_function_instantiated): Split out from
7437 do_function_instantiation.
7438 (mark_class_instantiated): Split out from do_type_instantiation.
7439
7440 * parse.y (template_instantiate_once): Call repo_template_used.
7441
7442 * lex.c (lang_init): Call init_repo.
7443
7444 * decl2.c: Handle flag_use_repository.
7445 (finish_file): Call finish_repo.
7446
7447 * decl.c (start_method): Call repo_template_used if this is a
7448 template method.
7449
7450 * Makefile.in (CXX_OBJS): Add repo.o.
7451 (repo.o): Add dependencies.
7452
7453 * Make-lang.in (CXX_SRCS): Add repo.c.
7454
7455 * decl.c (start_function): If DECL_INTERFACE_KNOWN and
7456 DECL_NOT_REALLY_EXTERN are both set, unset DECL_EXTERNAL.
7457
7458 * typeck.c (build_binary_op_nodefault): Identify the invalid operand
7459 types used.
7460
7461 * decl.c (duplicate_decls): Propagate DECL_NOT_REALLY_EXTERN.
7462
7463Thu Mar 30 17:54:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7464
7465 * typeck.c (build_binary_op_nodefault): Tidy up use of build_type
7466 and result_type. When checking for comparison between signed
7467 and unsigned, use result_type rather than the (possibly shortened)
7468 type of op0. Also, don't warn about equality comparison of a
7469 signed operand to an unsigned constant that fits in the signed
7470 type.
7471
7472 * method.c (do_build_copy_constructor): Reverse
7473 current_base_init_list after we've built it up.
7474
7475Thu Mar 30 14:35:18 1995 Mike Stump <mrs@cygnus.com>
7476
7477 * except.c (build_throw): Never warn about the value of throw not
7478 being used.
7479
7480Thu Mar 30 13:16:54 1995 Mike Stump <mrs@cygnus.com>
7481
7482 * except.c (expand_start_catch_block): Check for bad catch parameter
7483 declarations.
7484
7485Thu Mar 30 13:06:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7486
7487 * decl.c (finish_function): Only set DECL_NOT_REALLY_EXTERN if
7488 DECL_EXTERNAL is not already set.
7489
7490Thu Mar 30 11:26:24 1995 Mike Stump <mrs@cygnus.com>
7491
7492 * method.c (emit_thunk): Let poplevel know that the last level is
7493 for a function so it can create a BLOCK_NODE and set DECL_INITIAL.
7494
7495Thu Mar 30 11:15:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7496
7497 * decl2.c (import_export_inline): Don't set DECL_NOT_REALLY_EXTERN
7498 here.
7499
7500 * decl.c (grokdeclarator): OK, don't abort if we see a decl with
7501 METHOD_TYPE.
7502 (finish_function): Set DECL_EXTERNAL and DECL_NOT_REALLY_EXTERN on
7503 all deferred inlines.
7504
7505Wed Mar 29 19:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7506
7507 * cp-tree.h (DECL_THIS_INLINE): New macro.
7508 (DECL_NOT_REALLY_EXTERN): New macro.
7509 (DECL_THIS_STATIC): New macro.
7510
7511 * decl.c: Lose all references to current_extern_inline. Break
7512 inline semantics into DECL_INLINE for actual inlining and
7513 DECL_THIS_INLINE for the linkage wierdness. Use DECL_THIS_STATIC.
7514 * decl2.c: Use DECL_NOT_REALLY_EXTERN to indicate that we want to
7515 emit an inline here. Associated changes.
d11ad92e
MS
7516 * lex.c: Likewise.
7517 * pt.c: Likewise.
7518 * typeck.c: Likewise.
faae18ab
MS
7519
7520 * call.c (build_method_call): Don't bother trying to handle inlines
7521 specially.
d11ad92e 7522 * cvt.c (convert_to_aggr): Likewise.
faae18ab
MS
7523
7524 * pt.c (do_function_instantiation): Handle instantiation of
7525 public inlines, too.
7526
7527Wed Mar 29 16:04:25 1995 Mike Stump <mrs@cygnus.com>
7528
7529 * except.c (init_exception_processing): Change the interface for
7530 __throw_type_match and add decl for new rtti matching routine
7531 __throw_type_match_rtti.
7532 (build_eh_type): New routine to build a run time descriptor for the
7533 expression given.
7534 (expand_start_catch_block): Update to use new calling convention for
7535 the matcher.
7536 (expand_throw): Update to use build_eh_type.
7537
08fb8ad0
WL
7538Mon Mar 27 07:14:33 1995 Warner Losh <imp@village.org>
7539
7540 * g++.c: Removed __NetBSD__ from conditional.
7541 Declare strerror if HAVE_STRERROR is defined; otherwise
7542 declare sys_errlist and sys_nerr.
7543 (my_strerror): New function.
7544
71851aaa
MS
7545Tue Mar 28 14:16:35 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7546
7547 * search.c (get_binfo): Don't try to be so clever.
7548
7549 * tree.c (copy_to_permanent): Also suspend_momentary().
7550
7551 * cvt.c (cp_convert_to_pointer): Hand off to convert_fn_pointer even
7552 if the types are the same.
7553
7554 * decl.c (start_function): Handle extern inlines more like C++ says
f30432d7 7555 we should.
71851aaa
MS
7556
7557 * init.c (build_member_call): Hand constructor calls off to
7558 build_functional_cast.
7559
7560 * typeck2.c (build_functional_cast): Use DECL_NESTED_TYPENAME to get
7561 the name of the type.
7562
d11ad92e 7563Tue Mar 28 13:13:56 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
71851aaa
MS
7564
7565 * decl.c (grokdeclarator): Check for the decl returned by
7566 grokfndecl to be null before using build_decl_attribute_variant.
7567
d11ad92e 7568Mon Mar 27 18:04:41 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
71851aaa
MS
7569
7570 * init.c (build_new): Use build_pointer_type instead of
7571 TYPE_POINTER_TO.
7572
7215f9a0
MS
7573Fri Mar 24 12:11:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7574
71851aaa
MS
7575 * typeck.c (build_conditional_expr): Handle pmfs.
7576 (convert_for_assignment): Fix pmf support.
7577
7578 * cvt.c (convert_fn_ptr): Support !flag_vtable_thunks.
7579 (cp_convert_to_pointer): Handle pmfs.
7580 (cp_convert): Pass pmfs to cp_convert_to_pointer.
7581
7582 * typeck.c (common_type): Handle inheritance for pmfs.
7583
7584 * typeck2.c (build_m_component_ref): Do access control.
7585
7586 * typeck.c (comp_target_types): Check for conversion to void *
7587 before checking trickier conversions.
7588
7215f9a0
MS
7589 * decl.c (duplicate_decls): Propagate DECL_ABSTRACT_VIRTUAL_P.
7590
7591 * pt.c (push_tinst_level): Complain if template instantiation depth
7592 is greater than max_tinst_depth.
7593
7594 * typeck.c (common_type): Assume that we can call common_type to
7595 unify the target type of a pointer.
7596
7597Thu Mar 23 00:48:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7598
7599 * decl2.c (finish_file): Don't synthesize methods at
7600 finish_vtable_prevardecl time. Do synthesize methods that are not
7601 used, but are public and not external.
7602
7603 * cvt.c (build_type_conversion): Only give an error if for_sure.
7604
7605 * typeck.c (comp_target_types): Only support pointer conversions if
7606 nptrs > 0.
7607
d11ad92e 7608Wed Mar 22 19:30:15 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
7215f9a0
MS
7609
7610 * init.c (build_new): Catch use of an initializer list where it
7611 shouldn't be.
7612
7613Wed Mar 22 16:21:07 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7614
7615 * init.c (build_new): Wrap alloc_expr in an RTL_EXPR if nelts is
7616 non-constant.
7617
7618 * decl2.c: temp_name_counter is now public.
7619
7620 * decl.c (struct cp_function): Add temp_name_counter field.
7621 (push_cp_function_context): Save it.
7622 (pop_cp_function_context): Restore it.
7623
7624 * typeck.c (common_type): Handle unifying function types, and unify
7625 unmatched things to void* with a compiler_error, rather than
7626 silently like before.
7627
28cbf42c
MS
7628Wed Mar 22 15:10:34 1995 Mike Stump <mrs@cygnus.com>
7629
7630 * decl2.c (finish_prevtable_vardecl, finish_vtable_vardecl): Revert
7631 Brendan's last change and fix latent problem that causes TD entries
7632 to not come out when the things that need them has yet to be
7633 expanded.
7634
7635Wed Mar 22 15:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7636
7637 * typeck.c (build_binary_op_nodefault, comparison ops): Update type0
7638 and type1, since we might have changed op0 or op1.
7639
7640Wed Mar 22 13:33:45 1995 Jason Merrill <jason@python.cygnus.com>
7641
7642 * typeck.c (common_type): Don't mess up templates.
7643
7644Wed Mar 22 04:56:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7645
7646 * typeck.c (common_type): Handle ptms properly. Also handle
7647 T* -> void*.
7648 (build_binary_op_nodefault): New variable build_type controls what
7649 type is given to the expression when it is created. Set this to
7650 boolean_type_node for comparison ops instead of using result_type.
7651 (comp_target_types): Allow T * -> void *.
7652
7653 * cvt.c (cp_convert_to_pointer): Do access control when converting
7654 ptms, too.
7655
d11ad92e 7656Tue Mar 21 17:25:06 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
7657
7658 * parse.y (extern_lang_string): Catch use of linkage specs that
7659 aren't all naming the same language.
7660
7661 * class.c (finish_struct): Delete accidental duplicate code.
7662
7663Tue Mar 21 14:00:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7664
7665 * typeck.c (build_binary_op_nodefault): Disable pedwarns about
7666 comparing functions and incomplete types.
7667
7668 * decl.c (finish_function): Only unset current_function_decl if
7669 !nested.
7670 (duplicate_decls): Last change went too far; we only want to stop
7671 checking for value/reference ambiguity.
7672
7673Tue Mar 21 01:26:39 1995 Mike Stump <mrs@cygnus.com>
7674
7675 * gc.c (build_generic_desc): Zap the DECL_SIZE so that we can lay it
7676 out fresh, as the new type may be larger.
7677
7678Mon Mar 20 19:01:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7679
7680 * expr.c (extract_init): Try to expand the RTL for the
7681 initialization and figure out what it will look like so we can avoid
7682 run-time initialization. Disabled for now.
7683 (extract_scalar_init): Helper for scalar initialization.
7684 (extract_aggr_init): Helper for aggregate initialization.
7685
7686 * decl.c (duplicate_decls): Don't complain about ambiguous
7687 declarations.
7688 (obscure_complex_init): Now returns a tree. Call extract_init if
7689 we're optimizing and this is a toplevel decl.
7690 (finish_decl): Update accordingly.
7691
7692 * lex.c (check_newline): If we're just changing files (not pushing
7693 or popping), update input_file_stack->name.
7694
7695Mon Mar 20 17:55:04 1995 Mike Stump <mrs@cygnus.com>
7696
7697 * pt.c (type_unification): Only TEMPLATE_DECLs are handled right now
7698 in the transitive unification code.
7699
d11ad92e 7700Mon Mar 20 16:07:50 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
7701
7702 * decl.c (shadow_tag): Don't allow inline, virtual, or explicit on
7703 non-functions.
7704 (grokdeclarator): Don't allow friends to be defined in local classes.
7705
7706Sat Mar 18 04:03:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7707
7708 * decl2.c (finish_prevtable_vardecl): Use DECL_DECLARED_STATIC
7709 rather than DECL_SAVED_INSNS to decide whether or not this method
7710 was declared inline.
7711
7712 * method.c (synthesize_method): Turn off DECL_INLINE if
7713 function_cannot_inline_p thinks we're too large.
7714
7715 * typeck.c (build_indirect_ref): Use build_expr_type_conversion.
7716
7717Fri Mar 17 17:47:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7718
7719 * class.c (instantiate_type): Handle pmfs.
7720
7721 * typeck.c (convert_for_assignment): Check types when assigning one
7722 pmf to another.
7723
7724 * decl.c (define_label): Fix logic for printing out the name of the
7725 label in an error message.
7726
7727 * error.c (dump_expr): Support ARRAY_REF.
7728
d11ad92e 7729Fri Mar 17 17:43:02 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
7730
7731 * decl2.c (finish_vtable_vardecl): Call build_t_desc here.
7732 (finish_prevtable_vardecl): Instead of here.
7733
7734Fri Mar 17 14:40:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7735
7736 * decl.c (expand_static_init): Also use expand_aggr_init if the
7737 initializer is a TREE_LIST.
7738 (grokdeclarator): Only pedwarn about extra qualification if -pedantic.
7739
7740 * pt.c (unify): Fix unification of return type.
7741
7742 * expr.c (fixup_result_decl): Use store_expr, rather than
7743 emit_move_insn, to move the return value into the place where
7744 callers will expect it.
7745
7746Thu Mar 16 22:05:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7747
7748 * init.c (build_offset_ref): Call assmble_external on functions.
d11ad92e 7749 * typeck.c (build_component_ref): Likewise.
28cbf42c 7750
d11ad92e 7751Thu Mar 16 20:28:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
7752
7753 * decl.c (struct saved_scope): Add members base_init_list and
7754 member_init_list.
7755 (push_to_top_level): Save current_base_init_list and
7756 current_member_init_list to them.
7757 (pop_from_top_level): Put it back.
7758
7759Thu Mar 16 19:21:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7760
7761 * pt.c (instantiate_template): Call assemble_external.
7762
d11ad92e 7763Thu Mar 16 18:07:54 1995 Brendan Kehoe <brendan@phydeaux.cygnus.com>
28cbf42c
MS
7764
7765 * class.c: Include rtl.h, to get NULL_RTX.
7766 (finish_struct): Also zero out DECL_SAVED_INSNS, to avoid problems
7767 on hosts with different sizes for each part of the union.
7768 * tree.c: Also include rtl.h.
7769 (layout_basetypes): Same change for DECL_SAVED_INSNS.
7770
7771Thu Mar 16 13:57:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7772
7773 * pt.c (unify): Fix array domain unification for 64-bit targets.
7774
7775 * decl2.c (finish_file): Push bizarre type decl before walking the
7776 vtables the first time.
7777 (walk_vtables): OK, don't set prev to vars if the vardecl_fn messed
7778 with TREE_CHAIN (prev).
7779
7780 * init.c (emit_base_init): Use convert_pointer_to_real instead of
7781 convert_pointer_to when converting to a direct base.
7782
7783Wed Mar 15 20:26:29 1995 Mike Stump <mrs@cygnus.com>
7784
7785 * pt.c (type_unification): Handle transitive unification better.
7786
7787Wed Mar 15 13:56:16 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7788
7789 * decl2.c (walk_vtables): Always set prev to vars.
7790 (mark_vtable_entries): Call assemble_external on the vtable entries.
7791
7792 * class.c (finish_struct): Set the vtable's size to NULL_TREE before
f30432d7 7793 calling layout_decl, so that it gets updated properly.
28cbf42c
MS
7794
7795 Finally re-enable dynamic synthesis. This time it works.
7796 * method.c (synthesize_method): Pass decl_function_context (fndecl)
7797 to {push,pop}_cp_function_context.
7798 * decl.c (push_cp_function_context): Now takes a tree argument.
d11ad92e 7799 (pop_cp_function_context): Likewise.
28cbf42c 7800 * call.c (build_method_call): Enable synthesis.
d11ad92e 7801 * lex.c (cons_up_default_function): Likewise.
28cbf42c
MS
7802
7803Tue Mar 14 19:14:19 1995 Doug Evans <dje@chestnut.cygnus.com>
7804
7805 * parse.y (setattrs): Chain onto prefix_attributes rather than
7806 setting it.
7807
d11ad92e 7808Wed Mar 15 13:00:00 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
7809
7810 * decl.c (pushdecl): Check if the type of the VAR_DECL is an
7811 error_mark_node before trying to read TYPE_LANG_SPECIFIC.
7812
d11ad92e 7813Mon Mar 13 21:00:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7814
7815 * decl.c (grokdeclarator, case ARRAY_REF): Wrap the exp with fold,
7816 and convert the size and integer_one_node to the index type.
7817
7818Mon Mar 13 08:01:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7819
7820 * typeck.c (get_member_function_from_ptrfunc): Save the instance
7821 argument, and tack it onto the front of the COND_EXPR to make the
7822 semantics come out right. Grab the instance argument from
7823 '*instance_ptrptr', rather than having it passed in separately.
7824
7825 * various: Change various consed-up comparison operations to have
7826 boolean type. Remove the instance argument in calls to
7827 get_member_function_from_ptrfunc.
7828
7829 * error.c (dump_expr): Dump true and false as "true" and "false".
7830
7831 * decl2.c (finish_file): Also set DECL_STATIC_FUNCTION_P on the
7832 global init function.
7833
7834 * decl.c (finish_function): Only set DECL_EXTERNAL here if the
7835 inline function is public.
7836
7837Sat Mar 11 00:58:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7838
7839 * init.c (is_friend): Be more careful about checking
7840 DECL_CLASS_CONTEXT on non-member functions.
7841
7842 * decl2.c (finish_vtable_vardecl): Don't bother calling
7843 assemble_external here.
7844 (prune_vtable_vardecl): New function that just splices out the
7845 vtable decl from the top-level decls.
7846 (import_export_inline): Unset DECL_EXTERNAL at first.
7847 (finish_file): Don't bother calling assemble_external here. Do
7848 splice out all of the vtables.
7849
7850Fri Mar 10 14:42:29 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7851
7852 * decl.c (finish_function): If we're not emitting the function yet,
7853 call assemble_external for it.
7854
7855 * decl2.c (finish_prevtable_vardecl): Don't call mark_vtable_entries
7856 here.
7857 (finish_vtable_vardecl): Don't do the linkage deduction thing here.
7858 Also don't splice out the current vtable if it is unused.
7859 (finish_file): Move the second walk_vtables and the synthesis check
7860 inside the 'reconsider' loop. Move thunk emission after the
7861 'reconsider' loop.
7862
d11ad92e 7863Thu Mar 9 16:28:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7864
7865 * pt.c (tsubst): Don't bother calling cp_build_type_variant, since it
7866 was passing bogus values for readonly and volatile from the original
7867 template decl, not the resultant type of the tsubst call.
7868
7869 * class.c (duplicate_tag_error): Use cp_error_at to point out the
7870 previous definition of the tag.
7871
7872Thu Mar 9 10:46:17 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7873
7874 * decl.c (start_function): Clear base_init_insns and protect_list.
7875 (struct cp_function): Add base_init_insns field.
7876 (push_cp_function_context): Also save base_init_insns.
7877 (pop_cp_function_context): Also restore base_init_insns.
7878
7879Wed Mar 8 13:31:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7880
7881 * init.c (member_init_ok_or_else): Check for initializing a static
7882 member here.
7883 (emit_base_init): Instead of here.
7884
7885Tue Mar 7 16:03:26 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7886
7887 * call.c (build_method_call): Disable synthesis as needed.
d11ad92e 7888 * lex.c (cons_up_default_function): Likewise.
b7484fbe 7889
d11ad92e 7890Tue Mar 7 10:14:29 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
f6abb50a
BK
7891
7892 * parse.y: New rules to allow attributes in a prefix position.
7893 (prefix_attributes): New variable. Pass it into cplus_decl_attributes.
7894 (setattr): New rule.
7895 (reserved_declspecs, declmods): Catch attributes here.
7896 * decl2.c (cplus_decl_attributes): Add PREFIX_ATTRIBUTES argument.
7897 * decl.c (duplicate_decls): Pass DECL_MACHINE_ATTRIBUTES to
7898 descendent typedef.
7899 (grokdeclarator): Added code to support machine attributes.
7900 * Makefile.in (stamp-parse): Expect 5 shift/reduce failures.
7901
b7484fbe
MS
7902Mon Mar 6 15:07:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7903
7904 * call.c (build_method_call): Don't synthesize methods outside of a
7905 function.
7906
7907 Make base initialization more re-entrant so that synthesis on the
7908 fly will work (and, eventually, template instantation on the fly).
7909 * init.c (sort_member_init): Don't bother with members that can't be
7910 initialized. Reorganize a bit. Don't initialize base members here.
7911 (sort_base_init): New function, like sort_member_init, but for base
7912 classes. Steals some code from emit_base_init.
7913 (emit_base_init): Simplify. Call sort_{member,base}_init before
7914 doing any initialization, so we don't have to save
7915 current_{member,base}_init_list in push_cp_function_context.
7916 (expand_aggr_vbase_init_1): Adjust for sort_base_init.
7917 (expand_aggr_vbase_init): Simplify.
7918 * decl.c (struct cp_function): Add protect_list field.
7919 (push_cp_function_context): Also save protect_list.
7920 (pop_cp_function_context): Also restore protect_list.
7921 * call.c (build_method_call): Enable synthesis at point of call.
d11ad92e 7922 * lex.c (cons_up_default_function): Likewise.
b7484fbe
MS
7923
7924 * parse.y: Turn -ansi checks back into -pedantic checks.
7925
7926 * init.c (build_new): Fix -fcheck-new for array new.
7927
7928Sat Mar 4 15:55:42 1995 Fergus Henderson <fjh@cs.mu.oz.au>
7929
7930 * typeck.c (build_compound_expr): warn if left-hand operand of
7931 comma expression has no side-effects.
7932
7933Fri Mar 3 15:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7934
7935 * parse.y (primary): Change 'object qualified_id *' rules to 'object
7936 overqualified_id *'.
7937
d11ad92e 7938Fri Mar 3 12:48:17 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7939
7940 * parse.y (unary_expr): Catch doing sizeof an overloaded function.
7941 Make the error look the same as the one we issue in c_sizeof.
7942
7943 * typeck.c (build_binary_op_nodefault): Give an error for trying
7944 to compare a pointer-to-member to `void *'.
7945
7946Fri Mar 3 11:28:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7947
7948 * typeck.c (build_unary_op): Handle bool increment with smoke and
7949 mirrors here, rather than in expand_increment where it belongs,
7950 because Kenner doesn't agree with me.
7951
d11ad92e 7952Fri Mar 3 00:08:10 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7953
7954 * decl.c (grokparms): Catch a PARM_DECL being used for a default
7955 argument as well.
7956
d11ad92e 7957Thu Mar 2 20:05:54 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7958
7959 * init.c (build_new): Don't allow new on a function type.
7960
7961 * parse.y (primary): Avoid a crash when seeing if the arg is of
7962 the same type as that given for the typespec in an explicit dtor call.
7963
7964Thu Mar 2 00:49:38 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7965
7966 * decl.c (finish_function): Change test for calling
7967 mark_inline_for_output.
7968
7969Wed Mar 1 11:23:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7970
7971 * typeck.c (build_modify_expr): Complain if
7972 build_default_binary_type_conversion fails.
7973
7974 * init.c (expand_default_init): Handle arguments of unknown type
7975 properly.
7976
7977 * cvt.c (build_expr_type_conversion): Only complain about ambiguity
7978 if 'complain'.
7979 * various: Pass 'complain'.
7980
7981 * typeck.c (comptypes): Be more picky about comparing UPTs.
7982
d11ad92e 7983Wed Mar 1 11:03:41 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7984
7985 * decl.c (grokdeclarator): If declarator is null, say that the
7986 type used has an incomplete type.
7987
7988Wed Mar 1 10:06:20 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7989
7990 * pt.c (instantiate_template): Copy the template arguments to the
7991 permanent_obstack. Also use simple_cst_equal to compare them when
7992 looking for a previous instantiation.
7993
7994 * tree.c (make_deep_copy): Support copying INTEGER_TYPEs (assuming
7995 they are array domain types).
7996
7997Tue Feb 28 23:24:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7998
7999 * cp-tree.h: Define WANT_* constants for passing to
8000 build_expr_type_conversion.
8001 * cvt.c (build_expr_type_conversion): New function to build
8002 conversion to one of a group of suitable types.
8003 (build_default_binary_type_conversion): Use it.
d11ad92e
MS
8004 * decl2.c (grok_array_decl): Likewise.
8005 * typeck.c (build_unary_op): Likewise.
b7484fbe 8006 (build_array_ref): Tidy up a bit.
d11ad92e 8007 (build_binary_op): Likewise.
b7484fbe 8008
d11ad92e 8009Tue Feb 28 19:57:31 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
8010
8011 * decl.c (grokdeclarator): Don't allow decl of an argument as `void'.
8012
8013Tue Feb 28 17:23:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8014
8015 * parse.y (typed_declspecs1): Add 'typespec reserved_typespecquals
8016 reserved_declspecs' rule.
8017
8018 * parse.y (expr_or_declarator): Remove notype_qualified_id rule.
d11ad92e 8019 (direct_notype_declarator): Likewise.
b7484fbe
MS
8020 (complex_direct_notype_declarator): Add notype_qualified_id rule.
8021
8022 * lex.c (real_yylex): Handle :> digraph properly.
8023
d11ad92e 8024Tue Feb 28 12:26:29 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
8025
8026 * decl.c (grokdeclarator): Check if it's a friend, not if it's
8027 non-virtual, that's being initialized. Move the check up to
8028 before FRIENDP would get cleared. Catch an unnamed var/field
8029 being declared void. Say just `field' instead of `structure field'
8030 in the error message. Only go for the operator name if DECLARATOR
8031 is non-null.
8032
8033Tue Feb 28 00:08:01 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8034
8035 * decl.c (start_function): Complain about abstract return type.
8036 (grokdeclarator): Complain about declaring constructors and
8037 destructors to be const or volatile. Complain about declaring
8038 destructors to be static.
8039
8040 * pt.c (uses_template_parms): Handle pmfs.
8041
8042 * decl.c (grokdeclarator): Don't call variable_size for array bounds
8043 that only depend on template constant parameters.
8044
d11ad92e 8045Mon Feb 27 15:38:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
8046
8047 * error.c (dump_decl): Only look to see if it's a vtable if we
8048 actually have a name to check out.
8049
8050Mon Feb 27 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8051
8052 * cvt.c (convert_to_aggr): Lose misleading shortcut.
8053
8054Sun Feb 26 17:27:32 1995 Doug Evans <dje@canuck.cygnus.com>
8055
8056 * decl.c (set_nested_typename): Always set DECL_IGNORED_P,
8057 not just for dwarf.
8058
d11ad92e 8059Sun Feb 26 00:10:18 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
8060
8061 * decl.c (grokdeclarator): Don't allow a static member to be
8062 declared `register'.
8063
8064 * init.c (make_friend_class): Move up to a pedwarn for the warning
8065 about a class declaring friends with itself.
8066
8067 * decl.c (grokdeclarator): You can't do `volatile friend class foo'
8068 or `inline friend class foo'. Only try to make a friend out of
8069 TYPE if we didn't already reset it to integer_type_node.
8070
d11ad92e 8071Sat Feb 25 22:32:03 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
8072
8073 * decl.c (grokdeclarator): Don't allow initialization of a
8074 non-virtual function.
8075
8076 * decl.c (start_function): Do a pedwarn if we're changing `main'
8077 to have an int return type.
8078
8079Sat Feb 25 00:02:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8080
8081 * typeck.c (build_modify_expr): Handle simple assignment from
8082 TARGET_EXPRs by building up an RTL_EXPR to force expansion. Whew.
8083
d11ad92e 8084Fri Feb 24 18:27:14 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
8085
8086 * decl.c (grokdeclarator): Also don't allow virtual outside of a
8087 class decl for a scope method definition performed at global binding.
8088
8089 * init.c (build_offset_ref): Don't allow creation of an OFFSET_REF
8090 of a bitfield.
8091
8092 * decl.c (grokdeclarator): Don't allow a const to be declared mutable.
8093
8094 * typeck.c (build_binary_op): Return an error_mark_node if either
8095 one of the args turned into an error_mark_node when we tried to
8096 use default_conversion.
8097
8098 * typeck.c (build_unary_op): Forbid using postfix -- on a bool.
8099
8100 * decl.c (grokdeclarator): Allow `signed' and `unsigned' to be
8101 used on `__wchar_t'.
8102
8103Fri Feb 24 13:59:53 1995 Mike Stump <mrs@cygnus.com>
8104
8105 * except.c (end_protect_partials): Do it the right way.
8106
8107Wed Feb 22 15:42:56 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8108
8109 * typeck.c (build_binary_op_nodefault): Upgrade warning about
8110 comparing distinct pointer types to pedwarn.
8111
8112 * typeck2.c (digest_init): Cope with extra braces.
8113
8114 * typeck.c (build_binary_op_nodefault): Use tree_int_cst_sgn instead
8115 of INT_CST_LT (..., interger_zero_node).
8116
d11ad92e 8117Wed Feb 22 14:45:52 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
8118
8119 * except.c [!TRY_NEW_EH] (end_protect_partials): Define dummy
8120 function for systems that don't have EH.
8121
8122Tue Feb 21 19:18:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8123
8124 * call.c (can_convert_arg): Like can_convert, but takes an arg as
8125 well.
8126
8127 * pt.c (type_unification): Allow implicit conversions for parameters
8128 that do not depend on template parameters.
8129
d11ad92e 8130Tue Feb 21 18:43:48 1995 Douglas Rupp <drupp@cs.washington.edu>
1b65f56d
DR
8131
8132 * Make-lang.in, config-lang.in: ($exeext): New macro.
8133 * Make-lang.in: Try a "cp" if "ln" fails.
8134 * cp-tree.h (decl_attributes): Added argument.
8135 * decl2.c (cplus_decl_attribute): Add arg to decl_attributes.
8136 * cp/g++.c: Added #ifdefs for sys/file.h and process.h for NT.
8137 Modified spawnvp to have to correct number of arguments for OS/2, NT.
8138
b7484fbe
MS
8139Tue Feb 21 18:36:55 1995 Mike Stump <mrs@cygnus.com>
8140
8141 * decl.c (finish_function): Add calls to end_protect_partials to end
8142 the exception region that protects constructors so that partially
8143 constructed objects can be partially destructed when the constructor
8144 throws an exception.
8145 * init.c (perform_member_init, sort_member_init, emit_base_init):
8146 Added support for partially constructed objects.
8147 * init.c (build_partial_cleanup_for): New routine to do partial
8148 cleanups of a base class.
8149 * decl2.c (finish_file): Move the emitting of the exception table
8150 down, after we emit all code that might have exception regions in
8151 them.
8152 * except.c (end_protect_partials, might_have_exceptions_p): New
8153 routines.
8154 (emit_exception_table): Always output table if called.
8155 * cp-tree.h (protect_list, end_protect_partials,
8156 might_have_exceptions_p, emit_exception_table): Added.
8157
d11ad92e 8158Tue Feb 21 16:05:59 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
8159
8160 * gc.c (build_typeid): Pass a NULL_TREE, not the bogus, unused
8161 address of a local variable.
8162 * class.c (build_vfn_ref): Only try to build the PLUS_EXPR if we
8163 were given a non-null PTR_TO_INSTPTR.
8164
8165Tue Feb 21 01:53:18 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8166
8167 * decl.c (duplicate_decls): Always lay out the merged decl.
8168
8169 * decl2.c (finish_vtable_vardecl): Don't do vtable hack on templates.
d11ad92e 8170 (finish_prevtable_vardecl): Likewise.
59be85d7 8171
b7484fbe
MS
8172 * method.c (synthesize_method): Set interface_{unknown,only}
8173 according to the settings for our class, not the file where it comes
8174 from.
59be85d7 8175
b7484fbe 8176Sat Feb 18 12:26:48 1995 Mike Stump <mrs@cygnus.com>
3a887df4 8177
b7484fbe 8178 * except.c: Handle systems that define __i386__ but not __i386.
3a887df4 8179
e3417fcd
MS
8180Fri Feb 17 15:31:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8181
8182 * decl2.c (reparse_decl_as_expr): Support being called without a
8183 type argument.
8184
8185 * parse.y (primary): Add '(' expr_or_declarator ')'. Adds 4 r/r
8186 conflicts. Sigh.
8187
8188Fri Feb 17 12:02:06 1995 Mike Stump <mrs@cygnus.com>
8189
8190 * parse.y (template_def, fndef, fn.def1, return_init, condition,
8191 initdcl0, initdcl, notype_initdcl0, nomods_initdcl0,
8192 component_decl_1, after_type_component_declarator0,
8193 notype_component_declarator0, after_type_component_declarator,
8194 notype_component_declarator, after_type_component_declarator,
8195 full_parm, maybe_raises, exception_specification_opt): Fix up,
8196 include exception_specification_opt maybeasm maybe_attribute and
8197 maybe_init if missing. Rename maybe_raises to
8198 exception_specification_opt to match draft wording. Use maybe_init
8199 to simplify rules.
8200
8201Fri Feb 17 01:54:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8202
8203 * init.c (build_new): Set TREE_NO_UNUSED_WARNING on COMPOUND_EXPRs
8204 built for news of scalar types.
8205
8206Thu Feb 16 17:48:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8207
8208 * typeck.c (build_binary_op_nodefault): Update code for warning
8209 about signed/unsigned comparisons from C frontend. Realize that the
8210 code in the C frontend is, if anything, even more bogus. Fix it.
8211 (build_binary_op): Undo default_conversion if it wasn't useful.
8212
8213 * typeck.c (build_unary_op, ADDR_EXPR): Lose bogus special case for
8214 PRE*CREMENT_EXPR.
8215
8216 * decl2.c (import_export_vtable): Don't try the vtable hack
8217 if the class doesn't have any real non-inline virtual functions.
8218 (finish_vtable_vardecl): Don't bother trying to find a non-inline
8219 virtual function in a non-polymorphic class.
d11ad92e 8220 (finish_prevtable_vardecl): Likewise.
e3417fcd
MS
8221
8222 * decl2.c (import_export_vtable): Use and set DECL_INTERFACE_KNOWN.
8223
8224 * cp-tree.h (DECL_INTERFACE_KNOWN): Use DECL_LANG_FLAG_5.
8225
8226 * init.c (expand_virtual_init): Always call assemble_external.
8227
8228 * class.c (build_vfn_ref): Always call assemble_external.
8229 (build_vtable): Always call import_export_vtable.
d11ad92e 8230 (prepare_fresh_vtable): Likewise.
e3417fcd
MS
8231 (add_virtual_function): Don't bother setting TREE_ADDRESSABLE.
8232
8ccc31eb
MS
8233Thu Feb 16 03:28:49 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8234
8235 * class.c (finish_struct): Use TYPE_{MIN,MAX}_VALUE to determine
8236 whether an enumerated type fits in a bitfield.
8237
8238Wed Feb 15 15:38:12 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8239
8240 * class.c (grow_method): Update method_vec after growing the class
f30432d7 8241 obstack.
8ccc31eb
MS
8242
8243Wed Feb 15 13:42:59 1995 Mike Stump <mrs@cygnus.com>
8244
8245 * parse.y (handler_seq): Push a level for the catch parameters.
8246
8247Wed Feb 15 12:42:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8248
8249 * init.c (emit_base_init): Update BINFO_INHERITANCE_CHAIN on my
8250 bases, in case they've been clobbered.
8251
8252Wed Feb 15 12:07:29 1995 Mike Stump <mrs@cygnus.com>
8253
8254 * class.c (finish_base_struct): Set up BINFO_INHERITANCE_CHAIN here,
8255 so that one day it will always be valid.
d11ad92e 8256 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Likewise.
8ccc31eb
MS
8257
8258 * cp-tree.h (copy_binfo): Removed, unused.
d11ad92e 8259 * tree.c (copy_binfo): Likewise.
8ccc31eb
MS
8260
8261Wed Feb 15 00:05:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8262
8263 * init.c (build_new): Save the allocation before calling
8264 expand_vec_init on it.
8265
8266 * decl.c (finish_enum): The TYPE_PRECISION of the enum type mush
8267 match the TYPE_PRECISION of the underlying type for constant folding
8268 to work.
8269
8270Tue Feb 14 15:31:25 1995 Mike Stump <mrs@cygnus.com>
8271
8272 * except.c (push_eh_entry, expand_start_all_catch,
8273 expand_leftover_cleanups, expand_end_catch_block): Keep track of
8274 the context in which the exception region occurs.
8275 (build_exception_table): If the region was not output, don't output
8276 the entry in the eh table for it.
8277
8278Tue Feb 14 02:15:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8279
8280 * init.c (expand_default_init): Only use a previous constructor call
8281 if it's a call to our constructor. Does the word "Duh" mean
8282 anything to you?
8283
8284 * decl.c (grokparms): Fine, just don't call
8285 convert_for_initialization at all. OK? Happy now?
8286
8287Mon Feb 13 02:23:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8288
8289 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Make sure that the class
8290 method vector has a second element before returning it.
8291
8292 * decl.c (grokparms): Don't strip REFERENCE_TYPE before calling
8293 convert_for_initialization.
8294
8295Sun Feb 12 03:57:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8296
8297 * typeck.c (build_modify_expr): Compare function name to
8298 constructor_name (current_class_type) instead of current_class_name.
8299
8300 * decl.c (grokparms): Don't do anything with the return value of
8301 convert_for_initialization.
8302
8303 * error.c (dump_decl): Also dump_readonly_or_volatile on the decl.
8304
8305 * decl.c (duplicate_decls): Tweak error message.
8306
8307 * typeck.c (build_const_cast): Implement checking.
8308 (build_reinterpret_cast): Implement some checking.
8309
8310 * cp-tree.h (CONV_FORCE_TEMP): Require a new temporary when
8311 converting to the same aggregate type.
8312 (CONV_STATIC_CAST): Include it.
d11ad92e 8313 (CONV_C_CAST): Likewise.
8ccc31eb
MS
8314 * cvt.c (convert_force): Use CONV_C_CAST instead of CONV_OLD_CONVERT.
8315 (cp_convert): Only force a new temporary if CONV_FORCE_TEMP.
8316
8317Fri Feb 10 16:18:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8318
8319 * typeck.c (build_c_cast): Use non_lvalue to tack something on
f30432d7 8320 where necessary.
8ccc31eb
MS
8321
8322 * decl.c (auto_function): Now a function.
8323 * except.c (init_exception_processing): terminate, unexpected,
8324 set_terminate, and set_unexpected have C++ linkage.
8325
8326 * typeck.c (build_unary_op, TRUTH_NOT_EXPR): Use convert instead of
8327 truthvalue_conversion for converting to bool, as it handles
8328 user-defined conversions properly.
d11ad92e 8329 (condition_conversion): Likewise.
8ccc31eb
MS
8330
8331 * except.c (expand_throw): Don't call convert_to_reference.
8332 Pass the correct parameters to build_new.
8333
8334 * method.c (do_build_assign_ref): Don't use access control when
8335 converting to a base reference here.
8336 (do_build_copy_constructor): Or here.
8337
8338 * init.c (build_new): Unset TREE_READONLY on the dereferenced
8339 pointer before assigning to it.
8340
8341 * decl.c (maybe_build_cleanup): Don't bother stripping const here.
8342
8343 * decl2.c (delete_sanity): You can now delete pointer to const.
8344
8345Fri Feb 10 13:28:38 1995 Jason Merrill <jason@python.cygnus.com>
8346
8347 * decl.c (finish_function): Don't rely on actual parameters being
8348 evaluated left-to-right.
d11ad92e 8349 * except.c (expand_end_catch_block): Likewise.
8ccc31eb
MS
8350
8351Fri Feb 10 00:52:04 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8352
8353 * tree.c (real_lvalue_p): Like lvalue_p, but class temps aren't
8354 considered lvalues.
8355 * cvt.c (convert_to_reference): Use real_lvalue_p instead of
f30432d7 8356 lvalue_p.
8ccc31eb
MS
8357
8358 * cvt.c (build_type_conversion_1): Don't call convert on aggregate
8359 types.
8360 (convert_to_reference): Fix erroneous text substitution.
8361
8362 * typeck2.c (initializer_constant_valid_p): Update from C frontend.
8363 Add new argument to all callers.
8364
8365 * typeck.c (convert_arguments): Check for error_mark_node before
8366 trying to do anything with the actual parameter.
8367
8368 * typeck.c (condition_conversion): Build up a CLEANUP_POINT_EXPR and
8369 fold it.
8370 (bool_truthvalue_conversion): Remove. Fix all callers to call
8371 truthvalue_conversion instead.
8372 (various): Fold CLEANUP_POINT_EXPRs.
8373
8374 * parse.y (conditions): Call condition_conversion rather than
8375 building up a CLEANUP_POINT_EXPR.
8376
8377 * pt.c (end_template_decl): Don't warn_if_unknown_interface here
8378 under -falt-external-templates.
8379
8380Thu Feb 9 05:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8381
8382 * init.c (build_new): Complain about new of const type without
8383 initializer. Other cleanup.
8384
8385 * call.c (compute_conversion_costs): Don't call
8386 build_type_conversion with a reference type; convert to the target
8387 type and check its lvaluetude.
d11ad92e 8388 * cvt.c (convert_to_reference): Likewise.
8ccc31eb
MS
8389
8390 * cvt.c (build_type_conversion_1): There will never be any need to
8391 dereference references here now.
8392
8393Thu Feb 9 00:37:47 1995 Mike Stump <mrs@cygnus.com>
8394
8395 * except.c (expand_builtin_throw): Make sure we only `use' the
8396 value of return_val_rtx.
8397
8398Wed Feb 8 15:45:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8399
8400 * parse.y (structsp): Don't complain about declaring a type being
8401 defined to be a friend.
8402
8403 * decl2.c (warn_if_unknown_interface): Note the template in question
8404 and the point of instantiation, for -falt-external-templates.
8405 * lex.c (reinit_parse_for_method): Pass the decl to
8406 warn_if_unknown_interface.
d11ad92e
MS
8407 * pt.c (instantiate_template): Likewise.
8408 (end_template_decl): Likewise.
8ccc31eb
MS
8409
8410 * decl.c (set_nested_typename): Set IDENTIFIER_TYPE_VALUE on the
8411 nested name again, to make local classes work a bit better.
8412
8413 * typeck.c (build_function_call_real): Dereference reference after
8414 checking for incomplete type.
8415
8416 * init.c (build_new): Accept new of const and volatile types.
8417
8418Wed Feb 8 14:04:16 1995 Jason Merrill <jason@deneb.cygnus.com>
8419
8420 * decl.c (grokdeclarator): Fix error message.
8421
8422Wed Feb 8 03:16:15 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8423
8424 * typeck.c (convert_for_initialization): Do bash arrays when
8425 converting to a reference to non-array.
8426
8427Tue Feb 7 15:50:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8428
8429 * cvt.c (cp_convert): Don't call convert_to_reference, or
8430 automatically dereference references. Do pass reference conversions
8431 to cp_convert_to_pointer.
8432 (cp_convert_to_pointer): Support references.
8433
8434 * call.c (build_method_call): Don't build up a reference to the
8435 parameter here; let build_overload_call handle that.
8436
8437 * typeck.c (build_c_cast): Call convert_to_reference directly if
8438 converting to a reference type.
d11ad92e
MS
8439 * method.c (do_build_copy_constructor): Likewise.
8440 * method.c (do_build_copy_constructor): Likewise.
8441 (do_build_assign_ref): Likewise.
8ccc31eb
MS
8442
8443 * call.c (build_method_call): Dereference a returned reference.
d11ad92e 8444 * typeck.c (build_function_call_real): Likewise.
8ccc31eb
MS
8445
8446 * decl.c (xref_basetypes): Check for unions with basetypes here.
8447 (xref_tag): Instead of here.
8448
8449 * pt.c (process_template_parm): Template type parm decls are
8450 artificial.
8451
8452Mon Feb 6 04:32:09 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8453
8454 * parse.y (typed_declspecs): Add missing semicolon.
8455 (do_xref_defn): Resurrect.
8456 (named_class_head_sans_basetype): Move template specialization
8457 definition cases to named_class_head_sans_basetype_defn.
8458
8459 * decl2.c (grokfield): Call pushdecl_class_level after setting the
8460 TYPE_NAME, not before.
8461
8462Sun Feb 5 02:50:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8463
8464 * call.c (convert_harshness): Don't call sorry here. Don't allow
8465 conversions between function pointer types if pedantic.
8466
8467 * pt.c (overload_template_name): Pass globalize=1 to xref_tag.
8468
8469 * lex.c (cons_up_default_function): Use the full name for the return
8470 type of op=.
8471
8472 * decl.c (set_nested_typename): Don't worry about anonymous types,
8473 as they already have a unique name.
8474 (pushdecl): Remove redundant set_nested_typename
8475 (xref_tag): Split out base handling into xref_basetypes.
8476
8477 * cp-tree.h (TYPE_INCOMPLETE): New macro; TEMPLATE_TYPE_PARMs are
8478 not considered incomplete even though their definition is unknown.
8479
8480 * decl.c (xref_defn_tag): Lose.
8481 (xref_tag): xref_next_defn = ! globalize.
8482 (pushdecl): Don't set DECL_NESTED_TYPENAME on artificial decls. The
8483 ones that should have it set will have it set by pushtag.
d11ad92e 8484 (pushdecl_class_level): Likewise.
8ccc31eb
MS
8485 (pushtag): Tidy up a bit.
8486 (set_nested_typename): Push a decl for the nested typename from
8487 here, rather than from xref_defn_tag.
8488
8489 * parse.y (do_xref): Lose.
8490 (named_class_head): If we see 'class foo:' we know it's a
8491 definition, so don't worry about base lists for non-definitions.
8492
8493 * pt.c (push_template_decls): Template parm decls are artificial.
8494
8495 * decl.c (duplicate_decls): Restore check for qualifier
8496 disagreement for non-functions.
8497 (decls_match): Remove check for qualifier disagreement.
8498
8499Fri Feb 3 14:58:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8500
8501 * decl.c (grok_reference_init): Convert initializer from
f30432d7 8502 reference.
d11ad92e 8503 * typeck.c (convert_for_initialization): Likewise.
8ccc31eb
MS
8504
8505 * decl.c (duplicate_decls): Propagate DECL_NESTED_TYPENAME.
8506
8507 * cvt.c (cp_convert): Don't convert to the same class type by just
8508 tacking on a NOP_EXPR.
8509 (convert_to_reference): Use comp_target_types instead of comptypes
8510 so that we don't allow conversions two levels down.
8511
8512Thu Feb 2 15:07:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8513
8514 * class.c (build_vbase_path): Bash types to make the backend happy.
8515 * cvt.c (build_up_reference): Bash the types bashed by
8516 build_vbase_path to be reference types instead of pointer types.
d11ad92e 8517 (convert_to_reference): Likewise.
8ccc31eb
MS
8518
8519 * typeck.c (build_c_cast): Don't strip NOPs if we're converting to a
8520 reference type.
8521
8522 * parse.y (structsp): Put back error for 'struct B: public A;'.
8523
8524Wed Feb 1 23:02:06 1995 Mike Stump <mrs@cygnus.com>
8525
8526 * except.c: Add support for mips systems that don't define __mips
8527 but do define mips, like Ultrix.
8528
8529Wed Feb 1 22:39:07 1995 Mike Stump <mrs@cygnus.com>
8530
8531 * except.c: Add support for exception handling on the Alpha.
8532
1038f4f9
MS
8533Wed Feb 1 10:12:14 1995 Mike Stump <mrs@cygnus.com>
8534
8535 * decl2.c (finish_file): Fix bug in Jan 31st change.
8536
d11ad92e 8537Tue Jan 31 16:59:15 1995 Gerald Baumgartner <gb@lorenzo.cs.purdue.edu>
1038f4f9
MS
8538
8539 * sig.c (build_signature_pointer_or_reference_type): Don't set
8540 IS_AGGR_TYPE for signature pointers/reference so expand_default_init
8541 doesn't expect to find a copy constructor.
8542 * call.c (build_method_call): Treat signature pointers/reference
8543 as if IS_AGGR_TYPE were set.
8544
d18c083e
MS
8545Tue Jan 31 13:28:56 1995 Mike Stump <mrs@cygnus.com>
8546
8547 * gc.c (get_typeid): Pawn off error messages to build_t_desc.
8548 (build_t_desc): Inform the user here if they try and build
8549 with -frtti and don't include <typeinfo.h>.
8550
8551 * decl2.c (finish_prevtable_vardecl): Support rescanning.
8552 (finish_file): Move finish_prevtable_vardecl up to before the global
8553 initializers are done as tdecls are initialized in the global
8554 initializer. Also Pick up any new tdecls or vtables needed by
8555 synthesized methods.
8556
8557 * class.c (finish_struct): Simplify. We have to do rtti scanning at
8558 end, so we might as well do all of it there.
8559
8560Tue Jan 31 05:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8561
8562 * call.c (build_method_call): Fix -fthis-is-variable for 32-bit
8563 targets, too.
8564
8565Tue Jan 31 00:11:04 1995 Mike Stump <mrs@cygnus.com>
8566
8567 * decl2.c (finish_prevtable_vardecl): New routine, mostly split from
8568 finish_vtable_vardecl. It has the first half functionality from
8569 that routine.
8570 * decl2.c (finish_vtable_vardecl): Update to not include stuff not
8571 in finish_prevtable_vardecl.
8572 * decl2.c (finish_file): Call finish_prevtable_vardecl.
8573 * gc.c (build_generic_desc): Allow it to be called when not at the
8574 global binding layer, but behave as if we were.
8575 (build_t_desc): Rearrange a bit so that it really works and is
8576 easier to follow.
8577 * class.c (finish_struct): Don't decide on tdecls here, as we have
8578 to wait until the end of the file in general to decide whether or
8579 not they come out.
8580
8581Mon Jan 30 01:00:40 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8582
8583 * init.c (build_delete): Check access to operator delete before
8584 calling the destructor.
8585 * method.c (build_opfncall, DELETE_EXPR): build_method is allowed to
8586 return error_mark_node.
8587 * call.c (build_method_call): Use the one-argument op delete even if
8588 it's an error.
8589
8590 * init.c (build_new): Fix -fthis-is-variable support.
d11ad92e 8591 * call.c (build_method_call): Likewise.
d18c083e
MS
8592
8593 * call.c (convert_harshness): Make conversion from a pointer to bool
8594 worse than conversion to another pointer.
8595
8596Sat Jan 28 16:46:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8597
8598 * init.c (build_new): Check new return value if -fcheck-new.
8599
8600 * lex.c (check_newline): Clear end_of_file when we're done, too.
8601
8602Sat Jan 28 10:38:39 1995 Mike Stump <mrs@cygnus.com>
8603
8604 * decl2.c (finish_vtable_vardecl): Make rtti TD tables follow
8605 vtables whereever they go.
8606
8607 * gc.c (build_t_desc): Remove old way of setting it up, as it wasn't
8608 right.
8609
8610Sat Jan 28 09:10:44 1995 Mike Stump <mrs@cygnus.com>
8611
8612 * decl2.c (finish_vtable_vardecl): Now set the
8613 interface/implementation of vtables on the first virtual function,
8614 if one exists, otherwise we use the old method. This is a major win
8615 in terms of cutting down the size of objects and executables in
8616 terms of text space and data space. Now most of the savings that
8617 #pragma interface/implementation gives is automatic in a fair number
8618 of cases.
8619
8620Sat Jan 28 04:57:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8621
8622 * decl.c (grokdeclarator): Discard the template parameters in a
8623 template constructor declaration so that the function is always
8624 named constructor_name (ctype).
8625
8626 * lex.c (check_newline): Use ungetc to put back the character before
8627 calling HANDLE_PRAGMA.
8628
8629Fri Jan 27 17:23:47 1995 Mike Stump <mrs@cygnus.com>
8630
8631 * decl2.c (check_classfn): If the cname is T<int> and fn_name is T,
8632 make sure we still match them.
8633
8634Fri Jan 27 16:32:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8635
8636 * parse.y: Add END_OF_LINE token.
8637
8638 * lex.c (check_newline): Set linemode when we see a # directive, and
8639 unset it when we're done. Turn all 'return's into 'goto skipline'.
8640 Fix all uses of '\n', since we won't see it anymore. Put back the
8641 character we read before checking for a sysv or target pragma.
8642 (real_yylex): If we see an EOF in linemode, return END_OF_LINE.
8643 (handle_sysv_pragma): Don't look at the input stream; quit when we
8644 see an END_OF_LINE token.
8645
8646 * input.c (getch): Return EOF if we're in line mode and at the end
8647 of a line.
8648 (put_back): Don't put back an EOF.
8649
8650Thu Jan 26 19:26:34 1995 Mike Stump <mrs@cygnus.com>
8651
8652 * except.c (expand_throw): Do the newing of the exception object
8653 before we load the type descriptor or the address so that we don't
8654 wipe any of the values out.
8655
8656Thu Jan 26 19:20:00 1995 Mike Stump <mrs@cygnus.com>
8657
8658 * except.c (init_exception_processing): Don't use r12 on the rs6000.
8659
8660Tue Jan 24 16:36:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8661
8662 * decl.c (grokparms): Don't try to build up a reference at this point.
8663
8664 * typeck2.c (build_functional_cast): Don't assume that a NOP_EXPR
8665 will suffice to convert from integer_zero_node.
8666
d11ad92e 8667Wed Jan 25 15:02:09 1995 David S. Miller <davem@nadzieja.rutgers.edu>
b7484fbe
MS
8668
8669 * class.c (instantiate_type): Change error message text.
8670 * typeck2.c (store_init_value): Likewise.
8671
e1cd6e56
MS
8672Mon Jan 23 21:57:14 1995 Mike Stump <mrs@cygnus.com>
8673
8674 * pt.c (tsubst): When we copy a node, don't forget to copy
8675 TREE_CHAIN, we use it later.
8676
8677Mon Jan 23 03:33:47 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8678
8679 * typeck.c (convert_for_assignment): Initialize variable before use.
8680
8681Fri Jan 20 01:17:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8682
8683 * g++.c (main): Link with both libstdc++ and libg++ if called as
8684 something ending with "g++", otherwise only libstdc++. Move -lm to
8685 the end of the line.
8686
8687Thu Jan 19 15:43:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8688
8689 * call.c (build_method_call): Don't mess with 'this' before calling
f30432d7 8690 compute_conversion_costs.
e1cd6e56
MS
8691
8692Wed Jan 18 15:40:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8693
8694 * search.c (get_matching_virtual): Give line number for previous
f30432d7 8695 declaration.
e1cd6e56
MS
8696
8697 * call.c (convert_harshness): Handle conversions to references
8698 better.
8699
8700 * cvt.c (build_up_reference): OK, handle {MIN,MAX}_EXPR *properly*.
8701
8702Wed Jan 18 15:21:38 1995 Mike Stump <mrs@cygnus.com>
8703
8704 * class.c (instantiate_type): Use DECL_CHAIN to walk lists instead,
8705 as the TREE_CHAIN for methods will take us to the next differently
8706 named function, DECL_CHAIN won't.
8707
8708Wed Jan 18 14:26:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8709
8710 * tree.c (lvalue_p): Handle {MIN,MAX}_EXPR.
8711
8712 * decl2.c (lang_decode_option): -Wall implies -Wparentheses.
8713 warn_parentheses defaults to 0.
8714
8715 * decl.c (grokparms): Put back call to require_instantiated_type.
8716
8717Tue Jan 17 19:56:15 1995 Mike Stump <mrs@cygnus.com>
8718
8719 * except.c (exception_section): Use the data section on the rs6000.
8720 Change calling convention for named_section.
8721
8722Wed Jan 17 18:20:57 1994 Fergus Henderson <fjh@munta.cs.mu.oz.au>
8723
f30432d7
MS
8724 * cp-tree.h : Make if (x=0) warn with wall
8725 * parse.y : Make if (x=0) warn with wall
e1cd6e56 8726
255512c1
JM
8727Tue Jan 17 14:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8728
e1cd6e56
MS
8729 * decl.c (BOOL_TYPE_SIZE): BITS_PER_WORD if SLOW_BYTE_ACCESS,
8730 BITS_PER_UNIT otherwise.
8731
8732 * search.c (get_matching_virtual): Don't check the binfo if the
8733 types are the same.
8734
8735 * cvt.c (cp_convert): Just call truthvalue_conversion to convert to
f30432d7 8736 bool.
255512c1
JM
8737
8738Mon Jan 16 13:28:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8739
e1cd6e56
MS
8740 * various: Use boolean_type_node, boolean_true_node,
8741 boolean_false_node.
8742
8743 * search.c (get_matching_virtual): Allow covariant returns that
8744 don't require pointer adjustment.
8745
8746 * typeck.c (build_conditional_expr): Don't call default_conversion
8747 on ifexp.
8748
8749 * cvt.c (build_up_reference): Handle MIN_EXPR and MAX_EXPR.
8750
8751 * decl.c (grokdeclarator): Upgrade warning about &const to pedwarn.
8752
d11ad92e 8753Sun Jan 15 22:17:32 1995 David Binderman <dcb@lovat.fmrco.COM>
e1cd6e56
MS
8754
8755 * pt.c (do_function_instantiation): Free targs once we're done.
255512c1
JM
8756
8757Sun Jan 15 22:17:32 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8758
e1cd6e56
MS
8759 * decl.c (BOOL_TYPE_SIZE): Defaults to BITS_PER_WORD.
8760 (init_decl_processing): Use BOOL_TYPE_SIZE instead of CHAR_TYPE_SIZE
8761 for bool.
8762
8763Sat Jan 14 05:33:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8764
8765 * decl2.c (finish_file): We need to mess up if there are any
8766 variables in the list, not just if there is one with a constructor.
8767
8768Fri Jan 13 14:42:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8769
8770 * decl.c (duplicate_decls): Propagate DECL_STATIC_{CON,DE}STRUCTOR.
8771 (finish_function): Handle DECL_STATIC_{CON,DE}STRUCTOR.
8772 (finish_function): Trust rest_of_compilation.
8773
8774 * decl2.c (finish_file): Also call functions designated as static
8775 constructors/destructors.
8776
8777 * decl.c (grokdeclarator): Allow access decls of operator functions.
8778 (grokparms): Only do convert_for_initialization if the initializer
8779 has a type.
8780 (duplicate_decls): Put back push_obstacks_nochange call.
8781
8782 * lex.c (real_yylex): Downgrade complaint about the escape sequence
8783 being too large from pedwarn to warning.
8784
8785 * decl.c (grokdeclarator): Don't complain about long long in system
8786 headers.
8787
8788 * lex.c (real_yylex): Handle digraphs.
8789
8790Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8791
8792 * decl.c (init_decl_processing): -f{no-,}strict-prototype only
8793 affects C linkage declarations now.
8794
8795 * typeck.c (comp_target_types): Grok simple contravariant conversions.
8796 (common_type): t1 and t2 are interchangeable.
8797
8798 * various: Test return value of comp_target_types differently in
8799 different places; it now returns -1 for a contravariant conversion
8800 (which is fine in symmetric cases).
8801
8802 (common_type): Prefer long double to double even when
8803 they have the same precision.
8804
8805 * decl.c (grokparms): Call convert_for_initialization to check
8806 default arguments.
8807
8808 * init.c (build_new): void_type_node has a size (of 0).
8809
8810 * decl.c (decls_match): Also check for agreement of TREE_READONLY
8811 and TREE_THIS_VOLATILE.
8812 (push_class_level_binding): Properly handle shadowing of
8813 nested tags by fields.
8814
d11ad92e 8815 * search.c (dfs_pushdecls): Likewise.
e1cd6e56
MS
8816
8817 * decl2.c (finish_file): Don't second-guess self-initialization.
8818
8819 * cvt.c (convert_to_reference): Work with expr directly, rather than
8820 a copy.
8821
8822 * decl.c (push_overloaded_decl): Only shadow artificial TYPE_DECLs.
8823
8824 * init.c (add_friend): Downgrade duplicate friend message from
8825 pedwarn to warning.
8826
8827 * decl.c (duplicate_decls): Push obstacks before calling common_type.
8828
8829Thu Jan 12 17:15:21 1995 Michael Ben-Gershon <mybg@cs.huji.ac.il>
8830
8831 * except.c (push_eh_entry): set LABEL_PRESERVE_P flag for
8832 exception table labels.
d11ad92e
MS
8833 (expand_start_all_catch): Likewise.
8834 (expand_leftover_cleanups): Likewise.
8835 (expand_end_catch_block): Likewise.
e1cd6e56
MS
8836 * except.c (make_first_label): new function.
8837 (expand_start_all_catch): add a call to make_first_label() before
8838 using a label as a jump destination.
d11ad92e
MS
8839 (expand_end_all_catch): Likewise.
8840 (expand_leftover_cleanups): Likewise.
8841 (expand_end_catch_block): Likewise.
8842 (expand_builtin_throw): Likewise.
8843 (expand_throw): Likewise.
e1cd6e56
MS
8844 * except.c: Add ARM processor support for exception handling.
8845
8846Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8847
8848 (complete_array_type): Copy code from C frontend.
8849
8850 * lex.c (real_yylex): Don't multiply the length of a wide string
8851 literal by WCHAR_BYTES.
8852
8853 * decl.c (pushdecl): Check for redeclaration of wchar_t here.
8854 (duplicate_decls): Instead of here.
8855 (define_label): Complain about a label named wchar_t.
8856 (grokdeclarator): Complain about declarations of
8857 operator-function-ids as non-functions.
8858
8859 * typeck.c (unary_complex_lvalue): Also wrap prefix -- and ++ in
8860 COMPOUND_EXPRs.
8861 (build_unary_op): Wrap unary plus in a NON_LVALUE_EXPR.
8862
8863 * lex.c (real_yylex): Don't skip whitespace when reading the next
8864 character after ->.
8865
8866Wed Jan 11 16:32:49 1995 Mike Stump <mrs@cygnus.com>
8867
8868 * except.c: Allow cc1plus to be built with native compiler on rs6000.
8869 (expand_start_all_catch): Add assemble_external calls for various
8870 routines we call.
d11ad92e
MS
8871 (expand_leftover_cleanups): Likewise.
8872 (expand_start_catch_block): Likewise.
8873 (do_unwind): Likewise.
8874 (expand_builtin_throw): Likewise.
e1cd6e56
MS
8875
8876Wed Jan 11 01:05:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8877
8878 * decl.c (pushtag): Only look for a previous decl in the current
8879 binding level. Use explicit global scope in DECL_NESTED_TYPENAME.
8880
8881 * gxx.gperf: Add __signature__ and __sigof__ keywords.
8882
8883 * decl2.c (lang_decode_option): -ansi does not set flag_no_asm. It
8884 does set flag_no_gnu_keywords and flag_operator_names.
8885
8886 * lex.c (init_lex): 'overload' is not a keyword unless -traditional.
8887 Unset extension keywords if -fno-gnu-keywords.
8888 Allow operator names ('bitand') if -foperator-names.
8889 Never unset 'asm'; -fno-asm only affects 'typeof'.
8890
8891 * decl.c (lookup_name_real): The got_object special lookup only
8892 applies to types.
8893
8894Tue Jan 10 18:07:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8895
8896 * spew.c (yylex): Also use DECL_NESTED_TYPENAME if got_object is set.
8897
8898 * parse.y (primary): Unset got_object after all rules that use the
f30432d7 8899 'object' nonterminal.
e1cd6e56
MS
8900 (object): Set got_object.
8901
8902 * lex.h: Declare got_object.
8903
8904 * decl.c (lookup_name_real): Also lookup names in the context of an
8905 object specified.
8906
8907Tue Jan 10 14:30:30 1995 Mike Stump <mrs@cygnus.com>
8908
8909 * typeck.c (get_member_function_from_ptrfunc): Use ptrdiff_type_node
8910 for things that have to be added to pointers, not size_type. Cures
8911 problems with pointer to members on Alphas.
d11ad92e
MS
8912 (build_binary_op_nodefault): Likewise.
8913 (get_delta_difference_: Likewise.
8914 (build_ptrmemfunc): Likewise.
e1cd6e56
MS
8915
8916Tue Jan 10 01:49:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8917
8918 * decl.c (pushtag): Stick the new decl in TYPE_NAME before pushing
8919 it.
8920
8921 * typeck.c (build_component_ref): Don't build up a COMPONENT_REF
8922 when dealing with overloaded member functions; just act like
8923 build_offset_ref.
8924 (commonparms): Remove misleading comment.
8925
8926 * decl.c (duplicate_decls): Complain about repeated default
8927 arguments here.
8928 (redeclaration_error_message): Instead of here.
8929 (pushdecl): Complain about missing default arguments here.
8930 (grokparms): Instead of here.
8931 (lookup_name_current_level): Also match on DECL_ASSEMBLER_NAME.
8932 (grok_reference_init): Do not complain about missing initializer if
8933 declared 'extern'.
8934
8935 * search.c (lookup_field): Don't return a TYPE_DECL if there is a
8936 function alternative and want_type is not set.
8937
8938Mon Jan 9 18:16:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8939
8940 * decl.c (pushtag): Don't set TYPE_NAME to an identifier. Do push
8941 the decl when the type has no TYPE_NAME.
8942 (lookup_nested_type): Don't assume that type has TYPE_NAME set.
8943 (lookup_name_real): Call lookup_field with want_type =
8944 prefer_type.
8945
8946 * search.c (lookup_field): Handle want_type properly in the presence
8947 of fields with the same name.
8948
8949 * decl.c (set_nested_typename): Set nested name for file-scope types
8950 to include leading ::.
8951 (pushdecl): Set the nested typename if the decl doesn't have one,
8952 rather than if the type's canonical decl doesn't have one.
8953
e1cd6e56
MS
8954Mon Jan 9 03:44:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8955
8956 * typeck.c (convert_for_assignment): Complain about contravariance
8957 violation here.
8958 (comp_target_types): Instead of here.
8959 (build_unary_op): resolve_offset_ref before checking for a valid
8960 type.
8961
8962 * spew.c (yylex): Decrement looking_for_typename after we see a
8963 _DEFN.
8964
8965 * decl.c (pushdecl): Don't install an artificial TYPE_DECL in
f30432d7 8966 IDENTIFIER_LOCAL_VALUE if we already have a decl with that name.
e1cd6e56
MS
8967
8968 * typeck.c (convert_for_assignment): Converting pointers to bool
8969 does not need a cast.
8970
8971Sun Jan 8 18:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8972
8973 * class.c (instantiate_type): Initialize nsubsts parm.
8974
d11ad92e 8975 * pt.c (do_function_instantiation): Likewise.
e1cd6e56
MS
8976
8977Sat Jan 7 14:37:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8978
8979 * pt.c (tsubst): Use TREE_STATIC instead of DECL_INLINE &&
8980 DECL_SAVED_INSNS to determine whether or not we've seen a definition
8981 of this function.
d11ad92e 8982 (instantiate_template): Likewise.
e1cd6e56
MS
8983
8984 * call.c (convert_harshness): Allow const reference binding when
8985 called from the overloading code, but not when called from
8986 can_convert (since it isn't a conversion).
8987 (convert_harshness): Put back some disabled code.
8988
8989Fri Jan 6 14:10:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8990
8991 * call.c (convert_harshness): There is no implicit conversion from
8992 void* to other pointer types (unless the parameter is (void*)0).
8993 (convert_harshness): Non-lvalues do not convert to reference types.
8994
8995 * class.c (finish_struct_methods): Still set
f30432d7 8996 TYPE_HAS_{INT,REAL}_CONVERSION.
e1cd6e56
MS
8997
8998 * call.c (can_convert): Don't use aggregate initialization.
8999
9000 * cp-tree.h: Declare lookup_conversions.
9001
9002Thu Jan 5 21:08:00 1995 Mike Stump <mrs@cygnus.com>
9003
9004 * parse.y (simple_stmt): Fix duplicate case value error messages to
9005 be more readable.
9006
9007Wed Jan 4 16:44:19 1995 Jason Merrill <jason@phydeaux.cygnus.com>
9008
9009 * cvt.c (build_type_conversion): Total rewrite to use
9010 convert_harshness instead of reproducing conversion logic here. Now
9011 much shorter.
9012
9013 * call.c (convert_harshness): Support conversions to bool.
9014 (can_convert): Checks whether a conversion is less harsh
9015 than USER_CODE, for build_type_conversion.
9016
9017 * search.c (add_conversions): Function for passing to dfs_walk which
9018 adds all the type conversion operators in the current type to a list.
9019 (lookup_conversions): Calls dfs_walk with add_conversions and return
9020 the list.
9021 (dfs_walk): Don't require a qfn.
9022
9023 * cp-tree.h: Lose CLASSTYPE_CONVERSIONS hackery.
9024 (CLASSTYPE_FIRST_CONVERSION): Points to elt 1 of CLASSTYPE_METHOD_VEC.
9025
9026 * class.c (finish_struct_bits): Lose CLASSTYPE_CONVERSIONS hackery.
9027 (grow_method): A separate function for building onto the growing
9028 method vector.
9029 (finish_struct_methods): Use it. Put all type conversion operators
9030 right after the constructors. Perhaps we should sort the methods
f30432d7 9031 alphabetically?
e1cd6e56
MS
9032
9033Mon Jan 2 14:42:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
9034
9035 * call.c (build_method_call): Lose another misleading shortcut.
9036
9037Fri Dec 30 17:57:30 1994 Mike Stump <mrs@cygnus.com>
9038
9039 * gc.c (build_bltn_desc): Handle bool as a built-in type.
9040
9041Fri Dec 30 14:20:21 1994 Mike Stump <mrs@cygnus.com>
9042
9043 * tree.c (layout_vbasetypes): Ensure that we don't loose alignment
9044 on the complete type because of small virtual bases.
255512c1 9045
8145f082
MS
9046Fri Dec 30 12:22:29 1994 Mike Stump <mrs@cygnus.com>
9047
9048 * decl.c (n_incomplete): Bump n_incomplete up to int to match C
9049 front end.
9050 (pushdecl): Also count decls pushed that are of a type being defined
9051 as incomplete things.
9052 * class.c (finish_struct): Move hack_incomplete_structures up to
9053 just after we set it as not being defined, so that the decls we
9054 build for RTTI don't count as incomplete.
9055
9056Thu Dec 29 18:20:57 1994 Mike Stump <mrs@cygnus.com>
9057
9058 * pt.c (tsubst): Fix problem with defining constructors in templated
9059 classes with virtual bases.
9060
9061Wed Dec 28 08:31:00 1994 Mike Stump <mrs@cygnus.com>
9062
9063 * parse.y (TYPEID): Strip top-level cv-qualifiers on typeid
9064 expressions.
d11ad92e 9065 * gc.c (build_typeid): Likewise.
8145f082
MS
9066
9067Thu Dec 22 17:26:33 1994 Mike Stump <mrs@cygnus.com>
9068
9069 * cvt.c (build_up_reference): Fix breakage introduced on Nov 29,
9070 don't assert on complex AGGR inits.
9071
9072Thu Dec 22 14:32:31 1994 Mike Stump <mrs@cygnus.com>
9073
9074 * method.c (build_overload_value): Handle pointer to members as
9075 template arguments.
9076
9077Thu Dec 22 13:09:07 1994 Mike Stump <mrs@cygnus.com>
9078
9079 * typeck.c (unary_complex_lvalue): Don't call sorry if we know how
9080 to do take the address of a data member for a pointer to data
9081 member.
9082
9083Thu Dec 22 10:04:19 1994 Mike Stump <mrs@cygnus.com>
9084
9085 * decl.c (grokdeclarator): Use the typedef name for linkage if the
9086 type doesn't otherwise have a name.
9087
d11ad92e 9088 * decl2.c (grokfield): Likewise.
8145f082
MS
9089
9090 * class.c (finish_struct): Since we reuse the TYPE_DECL for the
9091 DECL_NAME of enums, structs and classes, we have to avoid trying to
9092 put it in the TYPE_FIELDS again.
9093
9094Wed Dec 21 11:07:05 1994 Mike Stump <mrs@cygnus.com>
9095
9096 * decl2.c (check_classfn): Ignore this parameter on static functions
9097 when checking to see if we match.
9098
9099Tue Dec 20 17:47:02 1994 Mike Stump <mrs@cygnus.com>
9100
9101 * typeck.c (unary_complex_lvalue): Handle address of non-left most
9102 pointers to members by calling get_delta_difference.
9103
5edb8b93
MS
9104Mon Dec 19 22:40:53 1994 Mike Stump <mrs@cygnus.com>
9105
9106 * decl2.c (check_classfn): Don't use decls_match yet, as it modifies
9107 static functions to early.
9108
9109Thu Dec 19 22:37:48 1994 Mike Stump <mrs@cygnus.com>
9110
9111 * method.c (make_thunk): Handle encoding of positive thunk offsets.
9112
9113Sat Dec 17 13:29:50 1994 Doug Evans <dje@canuck.cygnus.com>
9114
9115 * Make-lang.in (.PHONY): Tell GNU make C++ and c++ are phony targets.
9116
6060a796
MS
9117Thu Dec 15 16:32:12 1994 Mike Stump <mrs@cygnus.com>
9118
9119 * decl2.c (check_classfn): Use decls_match to check if this has
9120 already been declared, as the DECL_ASSEMBLER_NAME may have been
9121 changed via asm("new_name").
9122 * decl.c (decls_match): Make public.
9123
9124Thu Dec 15 15:17:55 1994 Mike Stump <mrs@cygnus.com>
9125
9126 * *.[chy] (expand_aggr_init) Add fourth argument to handle
9127 distinction between = init and (init) style of initializations.
9128 * *.[chy] (finish_decl): Add fifth argument to to handle
9129 distinction between = init and (init) style of initializations.
9130
9131Tue Dec 13 19:16:05 1994 Mike Stump <mrs@cygnus.com>
9132
9133 Fix some random `explicit' bugs.
9134
9135 * cvt.c (convert_to_reference): Add third parameter to
9136 convert_force.
d11ad92e
MS
9137 (convert_force): Likewise.
9138 * call.c (build_method_call): Likewise.
9139 * decl2.c (setup_vtbl_ptr): Likewise.
9140 * init.c (expand_virtual_init): Likewise.
9141 (build_member_call): Likewise.
9142 (build_delete): Likewise.
9143 (build_vbase_delete): Likewise.
9144 * typeck.c (build_component_addr): Likewise.
9145 (build_c_cast): Likewise.
9146 (build_modify_expr): Likewise.
9147 * cp-tree.h (CONV_NONCONVERTING): Likewise. Add so that we can
6060a796
MS
9148 distinguish the context in which the conversion appears. Add thrid
9149 argument to build_c_cast.
9150 * cvt.c (cp_convert): Pass whether or not we want to consider
9151 non-converting constructors down to build_method_call.
9152 * decl2.c (reparse_absdcl_as_casts): Add third argument to
9153 build_c_cast.
d11ad92e
MS
9154 * gc.c (build_m_desc): Likewise.
9155 * init.c (build_new): Likewise.
9156 * parse.y (expr_no_commas): Likewise.
9157 (primary): Likewise.
9158 * typeck.c (build_x_function_call): Likewise.
9159 (build_static_cast): Likewise.
9160 (build_reinterpret_cast): Likewise.
9161 (build_const_cast): Likewise.
9162 (build_c_cast): Likewise.
9163 (build_ptrmemfunc): Likewise.
9164 * typeck2.c (build_functional_cast): Likewise.
6060a796
MS
9165 * init.c (expand_aggr_init): Added LOOKUP_ONLYCONVERTING to
9166 expand_aggr_init_1 as inits are converted to the destination type.
9167
9168Tue Dec 13 16:18:57 1994 Jason Merrill <jason@phydeaux.cygnus.com>
9169
9170 * Make-lang.in (cc1plus): Depends on c-pragma.o.
9171
9172 * Makefile.in (OBJ{DEP,}S): Add ../c-pragma.o.
9173
9174 * lex.c (check_newline): If the #pragma is not recognized by g++,
9175 try machine-specific ones too.
9176 (handle_sysv_pragma): Copied from c-lex.c.
9177
9178Mon Dec 12 23:53:06 1994 Mike Stump <mrs@cygnus.com>
9179
9180 * except.c (expand_throw): Fix Dec 6th change, build_new likes a
9181 reference better.
9182
9183Mon Dec 12 18:01:00 1994 Jason Merrill <jason@phydeaux.cygnus.com>
9184
9185 * typeck.c (build_binary_op): Lose checks on TYPE_PTRMEMFUNC_P with
9186 IS_AGGR_TYPE, since now they will not both be set on the same type.
9187
9188 * pt.c (do_pending_expansions): Don't clear TREE_PUBLIC on
9189 instantiations controlled by -fexternal-templates.
9190
9191 * decl.c (duplicate_decls): Don't complain about different values of
9192 __attribute__ ((const)) and ((noreturn)).
9193
81cdf787
DE
9194Fri Dec 9 18:17:37 1994 Doug Evans <dje@cygnus.com>
9195
9196 * Makefile.in (BISONFLAGS): Delete --yacc.
9197 (PARSE_H): Depend on $(PARSE_C), for parallel makes.
9198 (PARSE_C): Undo last patch.
9199
be99da77 9200Fri Dec 2 10:44:36 1994 Mike Stump <mrs@cygnus.com>
30ffea6b 9201
3526f730 9202 * Makefile.in (BISONFLAGS): Add --yacc so that output winds up in
30ffea6b
MS
9203 y.tab.c.
9204
6060a796
MS
9205Thu Dec 8 17:39:46 1994 Jason Merrill <jason@phydeaux.cygnus.com>
9206
9207 * decl.c (finish_decl): Don't call obscure_complex_init for decls
9208 of indeterminate size.
9209
9210Wed Dec 7 16:49:22 1994 Jason Merrill <jason@phydeaux.cygnus.com>
9211
9212 * decl.c (obscure_complex_init): Function to tweak the decl to
9213 prevent expand_decl from tring to initialize it.
9214 (finish_decl): Use it rather than writing the same code in three
9215 different places.
9216
9217 * parse.y (bad_parm): Stop trying to support parms without types.
9218
9219Wed Dec 7 12:06:56 1994 Mike Stump <mrs@cygnus.com>
9220
9221 * decl2.c (grokfield): Make asm specs on static member functions
9222 work.
9223
9224Tue Dec 6 15:43:20 1994 Mike Stump <mrs@cygnus.com>
9225
9226 * except.c (expand_throw): Make a copy of the thrown object.
9227
9228Tue Dec 6 14:16:34 1994 Jason Merrill <jason@phydeaux.cygnus.com>
9229
9230 * parse.y: : has lower precedence than =.
9231
9232Tue Dec 6 12:46:17 1994 Mike Stump <mrs@cygnus.com>
9233
9234 * decl.c (pushdecl): Use DECL_NAME of VAR_DECLs to avoid namespace
9235 manglings.
9236 (grokvardecl): Add namespace into variable name.
9237
9238Tue Dec 6 11:26:55 1994 Mike Stump <mrs@cygnus.com>
9239
9240 * decl2.c (current_namespace_id): New routine to transform a simple
9241 name into a name in a namespace.
9242 * decl.c (grokdeclarator): Use it.
9243 * decl2.c (get_namespace_id): Find the name of the current
9244 namespace.
9245 (push_namespace, pop_namespace): Complete out missing
9246 functionality.
9247
9248Mon Dec 5 17:11:51 1994 Jason Merrill <jason@phydeaux.cygnus.com>
9249
9250 * class.c (finish_struct): Don't use LONG_LONG_TYPE_SIZE, as it may
9251 not be defined. Fix warning message for enums and restore warning
9252 for non-enums.
9253
9254 * decl2.c (push_namespace): Dummy function.
d11ad92e
MS
9255 (pop_namespace): Likewise.
9256 (do_namespace_alias): Likewise.
9257 (do_using_decl): Likewise.
9258 (do_using_directive): Likewise.
6060a796
MS
9259
9260 * parse.y: New token NSNAME for namespace names.
9261 (extdef): Add namespace, using definitions.
9262 (using_decl): New rule for using declarations.
9263 (any_id): New rule for identifiers with any degree of scoping.
9264 (identifier): Add NSNAME.
d11ad92e 9265 (notype_identifier): Likewise.
6060a796
MS
9266 (component_decl): Add using_decl.
9267 (nested_name_specifier): Add NSNAME SCOPE.
9268
9269 * typeck.c (convert_for_assignment): Handle conversions between
9270 enums and bool.
9271
9272 * decl.c (duplicate_decls): Only propagate DECL_MAIN_VARIANT on
9273 FUNCTION_DECLs.
9274
9275Mon Dec 5 13:03:16 1994 Mike Stump <mrs@cygnus.com>
9276
9277 * class.c (finish_struct): Give an error if one tries to declare a
9278 bit-field's size greater than a long long, as the backend will dump.
9279 It is not an error to declare an enum bit-field greater than its
9280 precision. Warn if an enum bit-field is too small to hold all
9281 its values.
9282
9283Mon Dec 5 11:41:50 1994 Mike Stump <mrs@cygnus.com>
9284
9285 * typeck.c (convert_for_assignment): Use cp_convert instead of
9286 convert so that we don't get static casts.
9287
9288Sun Dec 4 11:59:01 1994 Mike Stump <mrs@cygnus.com>
9289
9290 * cvt.c (cp_convert): Don't complain about int->enum conversion if
9291 we are doing static casts.
9292
9293Fri Dec 2 18:32:41 1994 Mike Stump <mrs@cygnus.com>
9294
9295 * error.c (dump_expr): Do something more intelligent with SAVE_EXPRs
9296 when dumping expressions in error messages.
9297
9298Fri Dec 2 17:04:27 1994 Mike Stump <mrs@cygnus.com>
9299
9300 * gc.c (build_dynamic_cast): Change interface to libg++, ensure that
f30432d7 9301 the return type is the right type, and make references work.
6060a796
MS
9302
9303Fri Dec 2 16:36:43 1994 Jason Merrill <jason@phydeaux.cygnus.com>
9304
9305 * decl.c (poplevel): Don't be confused by function-scope
9306 declarations of non-nested functions.
9307 (duplicate_decls): Propagate DECL_MAIN_VARIANT.
9308 (pushdecl): Use duplicate_decls to copy info from old decl into new
9309 function-scope one rather than doing it here.
9310
9311 * decl2.c (mark_inline_for_output): Deal with the DECL_MAIN_VARIANT
9312 of this decl, in case this is a function-scope declaration.
9313
9314 * decl.c (finish_enum): Make sure that the type has the right
9315 precision when we call fixup_*_type.
9316
9317Tue Nov 29 19:12:07 1994 Jason Merrill <jason@phydeaux.cygnus.com>
9318
9319 * cvt.c (build_up_reference): Strip superfluous NOP_EXPRs; we do
9320 want to build up references to rvalues if possible.
9321 (cp_convert): Stick on a NOP_EXPR when converting to the same type.
9322
9323Tue Nov 29 11:28:59 1994 Mike Stump <mrs@cygnus.com>
9324
9325 * parse.y (maybe_raises): Handle throw ().
9326 * parse.y (ansi_raise_identifier): grok type-ids in exception
9327 specifications.
9328 * tree.c (build_exception_variant): Use list compare to check if
9329 two exception specifications match.
9330 * decl.c (duplicate_decls, bad_specifiers): Enhance wording on error
9331 messages.
9332 * call.c (build_method_call): Remove TREE_RAISES.
d11ad92e
MS
9333 * cvt.c (convert_to_aggr): Likewise.
9334 * typeck.c (build_function_call_real, convert_arguments): Likewise.
9335 * init.c (expand_aggr_init_1): Likewise.
6060a796
MS
9336
9337Tue Nov 29 09:50:39 1994 Mike Stump <mrs@cygnus.com>
9338
9339 * except.c: Add support for m68k and mips exception handling
9340 support.
9341
9342Tue Nov 29 08:48:33 1994 Mike Stump <mrs@cygnus.com>
9343
9344 * except.c (expand_end_all_catch): Throw into outer context, if we
9345 fall off end of catch handlers.
9346
db5ae43f
MS
9347Mon Nov 28 16:44:41 1994 Mike Stump <mrs@cygnus.com>
9348
9349 * Makefile.in: Make is easier to decide where parse.[ch] will be
9350 built.
9351
af824546
DE
9352Thu Nov 17 20:11:24 1994 Doug Evans <dje@cygnus.com>
9353
9354 * cp/Make-lang.in (CXX_INSTALL_NAME) Use program_transform_name.
9355 (GXX_INSTALL_NAME) Likewise.
9356 (CXX_CROSS_NAME) Use program_transform_cross_name.
9357 (GXX_CROSS_NAME) Likewise.
9358 (c++.install-man): Use program_transform_name on g++.1.
9359 (c++.uninstall): Likewise.
9360
db5ae43f
MS
9361Mon Nov 28 13:53:03 1994 Mike Stump <mrs@cygnus.com>
9362
9363 * parse.y (THROW): Fix precedence of throw expressions.
9364
9365Mon Nov 28 13:15:16 1994 Mike Stump <mrs@cygnus.com>
9366
9367 * typeck.c (build_unary_op): Allow promotions from bool to int on
9368 unary ~.
9369
9370Sun Nov 27 00:16:21 1994 Jason Merrill <jason@phydeaux.cygnus.com>
9371
9372 * method.c (build_overload_name): Use DECL_ASSEMBLER_NAME for
9373 classes when appropriate.
9374 (build_overload_nested_name): When dealing with a function context,
9375 use ASM_FORMAT_PRIVATE_NAME to tweak the name of the function to
9376 avoid conflicts between local classes of the same name.
9377
9378Wed Nov 23 17:59:42 1994 Mike Stump <mrs@cygnus.com>
9379
9380 * gxx.gperf, parse.y, lex.h, hash.h, lex.c (init_lex), delc.c
9381 (duplicate_decls, grokdeclarator), cp-tree.h: Add support for
9382 `explicit'.
9383 * cvt.c (convert_to_reference, cp_convert, build_type_conversion_1,
9384 build_type_conversion): Use LOOKUP_ONLYCONVERTING in
9385 build_method_calls so that non-converting constructors are not used.
9386 * call.c (build_method_call): If we shouldn't use a non-converting
9387 constructor, then don't.
9388
9389Wed Nov 23 14:46:56 1994 Jason Merrill <jason@phydeaux.cygnus.com>
9390
9391 * call.c (build_method_call): Don't try to synthesize methods yet.
9392
9393Tue Nov 22 12:45:21 1994 Jason Merrill <jason@phydeaux.cygnus.com>
ea943e1d 9394
db5ae43f
MS
9395 * pt.c (push_template_decls): Create CONST_DECLs for template
9396 constant parameters, not VAR_DECLs.
9397
d11ad92e 9398Sat Nov 19 15:28:31 1994 Jim Wilson <wilson@chestnut.cygnus.com>
db5ae43f
MS
9399
9400 * typeck.c (build_binary_op_nodefault): Can shorten shift only if
9401 shift count is less than size in bits of arg0.
9402
9403Thu Nov 17 15:30:50 1994 Mike Stump <mrs@cygnus.com>
9404
9405 * gxx.gperf, hash.h, lex.c (init_lex, real_yylex), parse.y: Add new
9406 ANSI keywords and, and_eq, bitand, bitor, explicit, namespace, not,
9407 not_eq, or, or_eq, typename, using, xor, xor_eq to g++. Still need
9408 to add support for explicit, namespace, typename, and using, support
9409 for the rest is already in.
9410
db5ae43f
MS
9411Fri Nov 4 19:04:18 1994 Mike Stump <mrs@cygnus.com>
9412
9413 * gc.c (get_bad_cast_node): New routine to support compile time
9414 throws of bad_cast.
9415 * gc.c (build_dynamic_cast): Support throwing of bad_cast at compile
9416 time.
9417
9418Fri Nov 4 11:12:00 1994 Mike Stump <mrs@cygnus.com>
9419
9420 * except.c: Add hppa support.
9421
9422Fri Nov 4 10:50:50 1994 Mike Stump <mrs@cygnus.com>
9423
9424 * except.c: Add rs6000 support.
9425
9426Thu Nov 3 14:24:23 1994 Mike Stump <mrs@cygnus.com>
9427
9428 * except.c (do_unwind): Add i[34]86 support.
9429
d11ad92e 9430Thu Nov 3 00:10:46 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9431
9432 * pt.c (do_pending_expansions): Unset TREE_PUBLIC on implicit
9433 instantiations.
9434
d11ad92e 9435Wed Nov 2 15:08:24 1994 Kung Hsu <kung@mexican.cygnus.com>
db5ae43f 9436
14548a19 9437 * decl.c (finish_function): Emit types used in method parameters
db5ae43f
MS
9438 into symbol table.
9439
d11ad92e 9440Wed Nov 2 15:05:47 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9441
9442 * pt.c (process_template_parm): Allow pointer to member function
9443 template parameter types.
9444 (uses_template_parms): Handle pointer to member function
9445 CONSTRUCTORs.
9446
9447 * g++.c (main): Cast first argument of bzero to (char *).
9448 Pass -lstdc++ instead of -lg++ unless we are invoked as 'g++'.
9449
d11ad92e 9450Mon Oct 31 14:50:48 1994 Kung Hsu <kung@mexican.cygnus.com>
db5ae43f
MS
9451
9452 * gc.c (build_dynamic_cast): rewrite to make it work.
9453 * class.c (finish_vtbls): build more vtables if flag_rtti is on.
9454 * class.c (modify_all_direct_vtables): ditto.
9455 * init.c (expand_direct_vtbls_init): expand more vtables if
9456 flag_rtti is on.
9457 * decl.c (init_type_desc): add default return.
9458
d11ad92e 9459Tue Oct 25 17:13:09 1994 Kung Hsu <kung@mexican.cygnus.com>
db5ae43f
MS
9460
9461 * tree.c (debug_binfo): get rid of the initial size entry of
9462 vtable.
9463 * cp-tree.h: change flag_dossier to flag rtti, define type
9464 descriptor type nodes.
9465 * decl.c (init_type_desc): new function to initialize type
9466 descriptor type nodes.
9467 * decl.c (record_builtin_type): change flag_dossier to flag_rtti.
9468 * lex.c (init_lex): ditto.
9469 * decl.c : change variable flag_dossier to flag_rtti.
9470 * decl.c (duplicate_decls): get rid initial size entry of vtable.
9471 * decl.c (hack_incomplete_structures): take out assert 164.
9472 * search.c (get_abstract_virtuals_1): ditto.
9473 * search.c (dfs_init_vbase_pointers): change CLASSTYPE_DOSSIER to
9474 CLASSTYPE_RTTI.
9475 * parse.y: ditto.
9476 * class.c (prepare_fresh_vtable): for virtual bases, get right
9477 offset.
9478 * class.c (add_virtual_function): change flag_dossier to
9479 flag_rtti.
9480 * class.c (modify_one_vtable): modify the right rtti entry.
9481 * class.c (override_one_vtable): get rid of size entry.
9482 * class.c (finish_struct): change flag_dossier to flag_rtti, and
9483 build extra vtables, build type descriptors for polymorphic
9484 classes.
9485 * gc.c (build_headof): make headof() works correctly with new
9486 rtti.
9487 * gc.c (build_typeid): make this function work with new rtti.
9488 * gc.c (get_typeid): make this function work with new rtti.
9489 * gc.c (build_bltn_desc): new function for new rtti.
9490 * gc.c (build_user_desc): ditto.
9491 * gc.c (build_class_desc): ditto.
9492 * gc.c (build_ptr_desc): ditto.
9493 * gc.c (build_attr_desc): ditto.
9494 * gc.c (build_func_desc): ditto.
9495 * gc.c (build_ptmf_desc): ditto.
9496 * gc.c (build_ptmd_desc): ditto.
9497 * gc.c (build_t_desc): ditto.
9498 * gc.c : comment out old build_t_desc, build_i_desc, build_m_desc.
9499
d11ad92e 9500Tue Oct 25 13:37:41 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9501
9502 * call.c (convert_harshness): Check for TREE_UNSIGNED differences
9503 after checking for integral conversions.
ea943e1d 9504
72b7eeff
MS
9505Wed Nov 30 19:13:50 1994 Mike Stump <mrs@cygnus.com>
9506
9507 * Version 2.6.3 released.
9508
9509Thu Nov 17 10:56:50 1994 Jason Merrill <jason@phydeaux.cygnus.com>
9510
9511 * typeck2.c (build_m_component_ref): Check the basetype of the
9512 member pointer against the main variant of the object type.
9513
9514Mon Nov 14 14:21:52 1994 Jason Merrill <jason@phydeaux.cygnus.com>
9515
9516 * cvt.c (convert_to_reference): Make sure that the original expr
9517 gets its type back when converting a reference.
9518
9519 * method.c (build_overload_name): Clear numeric_outputed_need_bar here.
9520 (build_decl_overload): Instead of here.
9521
9522Tue Nov 8 17:11:24 1994 Jason Merrill <jason@phydeaux.cygnus.com>
9523
9524 * cvt.c (cp_convert): Don't build a TARGET_EXPR if we're not in a
9525 function.
9526
9527 * typeck.c (convert_for_initialization): Handle initialization from
9528 a TARGET_EXPR.
9529
d11ad92e 9530Sun Nov 6 01:34:24 1994 Jason Merrill <jason@phydeaux.cygnus.com>
72b7eeff
MS
9531
9532 * pt.c (lookup_nested_type_by_name): Fix list-walking logic.
9533 (tsubst): When replacing a TEMPLATE_TYPE_PARM, propagate
9534 TYPE_READONLY and TYPE_VOLATILE from the argument.
9535 (unify): When unifying with a TEMPLATE_TYPE_PARM, remove cv-quals
9536 present in parm from arg.
9537 (type_unification): Strip REFERENCE_TYPE from the argument type.
9538 (unify): Don't strip REFERENCE_TYPE from the argument type.
9539
d11ad92e 9540Sat Nov 5 22:42:15 1994 Greg McGary <gkm@magilla.cichlid.com>
72b7eeff
MS
9541
9542 * pt.c (do_type_instantiation): Check to see if there's a
9543 IDENTIFIER_TEMPLATE on a class before calling
9544 instantiate_member_templates().
9545
9546Sat Nov 12 06:35:42 1994 Mike Stump <mrs@cygnus.com>
9547
9548 * Version 2.6.2 released.
9549
9550Thu Nov 3 18:48:19 1994 Paul Eggert <eggert@twinsun.com>
9551
9552 * Makefile.in (spew.o, lex.o, pt.o):
9553 Depend on $(srcdir)/parse.h, not parse.h.
9554
9555Tue Nov 1 19:19:41 1994 Mike Stump <mrs@cygnus.com>
9556
9557 * Version 2.6.1 released.
9558
d11ad92e 9559Sun Oct 23 13:19:55 1994 Jason Merrill <jason@phydeaux.cygnus.com>
eae89e04 9560
db5ae43f
MS
9561 * decl2.c: Declare flag_access_control.
9562 (struct lang_f_options): Add access-control.
9563 * expr.c (cplus_expand_expr, NEW_EXPR): Unset flag_access_control
9564 for the call to expand_aggr_init to copy the object out of the
9565 pcc_struct_return slot.
9566 * search.c (compute_access): if (!flag_access_control) return
9567 access_public.
eae89e04 9568
d11ad92e 9569Fri Oct 21 00:32:54 1994 Jason Merrill <jason@phydeaux.cygnus.com>
eae89e04 9570
db5ae43f
MS
9571 * lex.c (cons_up_default_function): Don't try to defer method
9572 synthesis now.
9573
9574 * decl.c (init_decl_processing): Use __pure_virtual for abort_fndecl
9575 instead of abort, since the OSF/1 dynamic linker doesn't like to see
9576 relocation entries for abort.
eae89e04 9577
db5ae43f
MS
9578 * tree.c (array_type_nelts_total): Use sizetype, not
9579 integer_type_node.
d11ad92e 9580 (array_type_nelts_top): Likewise.
db5ae43f
MS
9581
9582Thu Oct 20 15:48:27 1994 Mike Stump <mrs@cygnus.com>
9583
9584 * decl.c (grokdeclarator): Added handling for catch parameters
9585 (CATCHPARM).
9586 * except.c (expand_start_catch_block): Use the new CATCHPARM context
9587 instead of NORMAL.
9588 * except.c (expand_throw): Don't let convert_to_reference complain
9589 about what we are doing.
9590
d11ad92e 9591Thu Oct 20 12:55:24 1994 Jim Wilson <wilson@cygnus.com>
db5ae43f
MS
9592
9593 * method.c (emit_thunk): Call instantiate_virtual_regs.
9594
9595Wed Oct 19 14:15:33 1994 Mike Stump <mrs@cygnus.com>
9596
9597 * except.c (expand_exception_blocks): Make sure throw code doesn't
9598 get put in function that won't be output.
eae89e04 9599
d11ad92e 9600Mon Oct 17 18:03:15 1994 Jason Merrill <jason@phydeaux.cygnus.com>
eae89e04 9601
db5ae43f
MS
9602 * decl.c (init_decl_processing): Make alloca a builtin.
9603
d11ad92e 9604Thu Oct 27 21:10:25 1994 Craig Burley <craig@burley>
db5ae43f
MS
9605
9606 * g++.c (main): Only decrement "added" and set "library" to
9607 NULL when "library" != NULL (just like 940829 fix).
eae89e04 9608
c199879d
MS
9609Mon Oct 17 15:56:11 1994 Mike Stump <mrs@cygnus.com>
9610
9611 * except.c (expand_start_catch_block): Make sure the false label
9612 gets onto the permanent obstack, as it is used for the exception
9613 table.
9614
13306d4f
MS
9615Fri Oct 14 18:54:48 1994 Mike Stump <mrs@cygnus.com>
9616
9617 * class.c (modify_one_vtable): Since the DECL_CONTEXT of fndecl can
9618 be set just below, use current_fndecl instead.
9619
d11ad92e 9620Fri Oct 14 15:12:22 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9621
9622 * init.c (expand_aggr_vbase_init_1): Don't call expand_aggr_init_1
9623 with LOOKUP_SPECULATIVELY.
9624 (expand_default_init): Abort if build_method_call returns NULL_TREE.
9625
9626 * typeck.c (build_modify_expr): Don't just build a MODIFY_EXPR if
9627 the rhs is a TARGET_EXPR.
9628
9629 * parse.y (left_curly): Anonymous types are not affected by #pragma
9630 interface/implementation.
9631
9632 * method.c (synthesize_method): Don't call setup_vtbl_ptr for the
9633 default constructor if it isn't needed.
9634
9635 * lex.c (cons_up_default_function): Do synthesize methods for
9636 anonymous types if necessary.
9637
d11ad92e 9638Thu Oct 13 17:44:55 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2f4f907d 9639
db5ae43f 9640 * method.c (build_decl_overload): Set numeric_outputed_need_bar to 0.
2f4f907d 9641
d11ad92e 9642Wed Oct 12 13:27:57 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2f4f907d 9643
db5ae43f
MS
9644 * typeck.c (build_modify_expr): Understand how to copy an aggregate.
9645
d11ad92e 9646 * init.c (expand_default_init): Likewise. Also remove some of the
db5ae43f
MS
9647 crufty code that assumes methods will not be synthesized properly.
9648
9649 * lex.c (cons_up_default_function): If the containing type has no
9650 name, these functions should never need to be called, so just
9651 declare them.
2f4f907d 9652
db5ae43f
MS
9653 * lex.c (real_yylex): Use HOST_BITS_PER_WIDE_INT to determine the
9654 bitmask for lexing character constants.
9655
9656 * call.c (build_method_call): Disable code that tries to do tricky
9657 stuff with a default parameter that is a constructor call, but
9658 actually does other tricky stuff that breaks things.
2f4f907d
JM
9659
9660Wed Oct 12 16:14:01 1994 Benoit Belley <belley@cae.ca>
9661
db5ae43f
MS
9662 * decl.c (finish_enum): Disable code which forces enums to be signed,
9663 since this conflicts with their use as bitfields. type_promotes_to
9664 handles promotion of enums of underlying unsigned types to signed
9665 integer types.
2f4f907d 9666
d11ad92e 9667Wed Oct 12 13:24:03 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2f4f907d 9668
db5ae43f
MS
9669 * cvt.c (type_promotes_to): Also promote enums to long if
9670 appropriate.
2f4f907d 9671
db5ae43f
MS
9672 * typeck.c (default_conversion): Don't expect type_promotes_to to
9673 return a main variant.
2f4f907d 9674
d11ad92e 9675Wed Oct 12 12:19:45 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2f4f907d 9676
db5ae43f
MS
9677 * call.c (build_scoped_method_call): Don't lose side effects in the
9678 object expression when calling a non-existent destructor.
2f4f907d 9679
d11ad92e 9680Fri Sep 2 19:05:21 1994 Rohan Lenard <rjl@iassf.easams.com.au>
2f4f907d 9681
db5ae43f
MS
9682 * call.c (build_scoped_method_call): Remove erroneous error message
9683 when destructor call is written as a scoped call.
2f4f907d 9684
d11ad92e 9685Tue Oct 11 23:48:31 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9686
9687 * various: Cast pointer arguments to bzero and bcopy to char *.
252b87c7 9688
13306d4f
MS
9689Tue Oct 11 19:34:32 1994 Mike Stump <mrs@cygnus.com>
9690
9691 * class.c (get_derived_offset): Added a type parameter to limit how
9692 far up the CLASSTYPE_VFIELD_PARENT chain we search.
9693 * class.c (modify_one_vtable, fixup_vtable_deltas): When forming the
9694 offset to put into the vtable for the this parameter, make sure we
9695 don't offset from a parent of the DECL_CONTEXT of the function.
9696
d11ad92e 9697Tue Oct 11 16:10:52 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9698
9699 * pt.c (do_function_instantiation): Set DECL_EXTERNAL and
9700 TREE_STATIC when setting DECL_INTERFACE_KNOWN.
d11ad92e 9701 (do_type_instantiation): Likewise.
db5ae43f
MS
9702
9703 * lex.c (cons_up_default_function): Set DECL_INTERFACE_KNOWN,
9704 DECL_EXTERNAL and TREE_STATIC as appropriate.
9705
9706 * decl2.c (finish_file): Also synthesize methods that don't have
9707 DECL_EXTERNAL set. Set interface_unknown before doing so.
9708
9709 * decl.c (start_function): If DECL_INTERFACE_KNOWN is set on the
9710 function decl, don't muck with TREE_PUBLIC and DECL_EXTERNAL.
9711
d11ad92e 9712Mon Oct 10 00:56:53 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 9713
db5ae43f
MS
9714 * lex.c (cons_up_default_function): Mark methods in a template class
9715 as template instances. Store the values of interface_unknown and
9716 interface_only for do_pending_inlines.
9717 (do_pending_inlines): Use them.
9718
9719 * decl2.c (finish_file): If we haven't seen a definition of a
9720 function declared static, make the decl non-PUBLIC so compile_file
9721 can give an error.
cba8ba35 9722
d11ad92e 9723Sun Oct 9 02:42:29 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 9724
db5ae43f 9725 * method.c (do_build_copy_constructor): Handle anonymous unions.
d11ad92e 9726 (do_build_assign_ref): Likewise.
db5ae43f
MS
9727 (largest_union_member): Move from lex.c.
9728
d11ad92e 9729Sat Oct 8 14:59:43 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9730
9731 Re-implement g++'s vague linkage independent of TREE_PUBLIC.
9732 * pt.c (instantiate_member_templates): Lose redundant
9733 -fexternal-templates handling.
9734 (tsubst): Set TREE_PUBLIC and DECL_EXTERNAL on new decls. Don't set
9735 TREE_STATIC or DECL_INTERFACE_KNOWN.
9736 (do_pending_expansions): Predicate on DECL_INTERFACE_KNOWN instead
9737 of DECL_EXTERNAL for explicit instantiations.
9738 (do_function_instantiation): Do the new thing.
d11ad92e 9739 (do_type_instantiation): Likewise.
db5ae43f
MS
9740 (instantiate_template): Deal with member templates defined in a .cc
9741 file with -fexternal-templates.
9742 * except.c (expand_exception_blocks): Use DECL_LINKAGE_KNOWN to
9743 decide whether to stick builtin_throw here.
9744 * decl2.c (import_export_inline): Predicate on DECL_INTERFACE_KNOWN
9745 rather than TREE_PUBLIC. Generally fix rules.
9746 (finish_file): Use DECL_INITIAL to determine whether or not a method
9747 has been synthesized, rather than TREE_ASM_WRITTEN.
9748 * decl.c (warn_extern_redeclared_static): Use DECL_PUBLIC instead of
9749 TREE_PUBLIC.
d11ad92e
MS
9750 (pushdecl): Likewise.
9751 (duplicate_decls): Likewise. Deal with DECL_DECLARED_STATIC and
db5ae43f
MS
9752 DECL_INTERFACE_KNOWN.
9753 (redeclaration_error_message): Fix checking for conflicting linkage.
9754 (define_function): Set DECL_INTERFACE_KNOWN.
9755 (grokfndecl): Function decls are PUBLIC until we are sure about
9756 their linkage. Set DECL_DECLARED_STATIC as needed.
9757 (start_function): Deal with linkage. Move pushdecl after linkage
9758 magic.
9759 (finish_function): Don't set TREE_ASM_WRITTEN on discarded inlines.
9760 * cp-tree.h (lang_decl_flags): Add interface_known and
9761 declared_static.
9762 (DECL_INTERFACE_KNOWN): New macro.
9763 (DECL_DECLARED_STATIC): New macro.
9764 (DECL_PUBLIC): New macro.
9765
9766 Clean up bogus use of TREE_PUBLIC.
9767 * class.c (alter_access): Fix mistaken use of TREE_PUBLIC (it
9768 doesn't correspond to TREE_PROTECTED and TREE_PRIVATE).
9769 * init.c (do_friend): Don't arbitrarily set TREE_PUBLIC.
cba8ba35 9770
d11ad92e 9771Wed Oct 5 13:44:41 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 9772
db5ae43f
MS
9773 * call.c (build_overload_call_real): Don't immediately do
9774 array->pointer conversion.
cba8ba35 9775
db5ae43f
MS
9776 * pt.c (type_unification): If not passing to a reference, strip
9777 cv-quals. Also handle array->pointer conversion.
cba8ba35 9778
d11ad92e 9779Tue Oct 4 17:45:37 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 9780
db5ae43f
MS
9781 * decl.c (grokdeclarator): Don't warn about applying const to a
9782 const typedef or template type parameter.
9783
9784 * decl2.c (finish_file): Also synthesize methods after walking the
9785 vtables. Ugly ugly ugly.
cba8ba35 9786
d11ad92e 9787Mon Oct 3 15:02:41 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 9788
db5ae43f
MS
9789 * various: Remove lingering remnants of old exception handling code.
9790
9791 * decl2.c (finish_file): Synthesize methods before walking the
9792 vtables, so that the vtables get emitted as needed.
9793
9794 * decl.c (shadow_tag): Remove obsolete code for pushing tags and
9795 dealing with exceptions.
9796
9797Mon Oct 3 13:05:27 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
9798
9799 * Make-lang.in (g++-cross): Depend upon version.o and $(LIBDEPS).
9800
d11ad92e 9801Mon Oct 3 02:59:28 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9802
9803 * decl2.c (finish_file): Fix inline handling.
cba8ba35 9804
d11ad92e 9805Sun Oct 2 00:21:56 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 9806
db5ae43f
MS
9807 * decl.c (grokdeclarator): Handle redundant scope even better.
9808 ({push,pop}_cp_function_context): Take toplev parameter.
cba8ba35 9809
db5ae43f
MS
9810 * method.c (synthesize_method): Pass toplev parameter to
9811 {push,pop}_cp_function_context depending on decl_function_context
9812 (fndecl).
cba8ba35 9813
db5ae43f
MS
9814 * typeck.c (build_x_unary_op): Unary & on OFFSET_REFs is always the
9815 built-in version.
cba8ba35 9816
db5ae43f
MS
9817 * method.c (synthesize_method): Don't be confused by __in_chrg
9818 parameter.
b3738072 9819
db5ae43f 9820 * class.c (popclass): Set C_C_D like start_function does.
b3738072 9821
db5ae43f 9822 * decl.c (grokdeclarator): Handle redundant scope better.
81613e43 9823
db5ae43f 9824 * parse.y (expr_or_declarator): Add '(' expr_or_declarator ')' rule.
d11ad92e 9825 (direct_notype_declarator): Likewise.
db5ae43f 9826 (complex_direct_notype_declarator): Remove it here.
81613e43 9827
d11ad92e 9828Sat Oct 1 21:42:18 1994 Jason Merrill <jason@deneb.cygnus.com>
44c5421f 9829
db5ae43f
MS
9830 * init.c (resolve_offset_ref): Fix types used in resolving .*
9831 expressions.
9832
d11ad92e 9833Sat Oct 1 15:18:49 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9834
9835 Beginnings of work to synthesize methods only when needed.
9836 * call.c (build_method_call): Synthesize methods as necessary
9837 (currently never necessary).
9838 * class.c (popclass): Don't try to set C_C_D here, as it'll end up
9839 on the wrong obstack.
9840 * decl.c (push_cp_function_context): Mostly copied from
9841 push_c_function_context.
9842 (pop_cp_function_context): Similarly.
9843 (finish_function): Reverse order of poplevel and pop_nested_class so
9844 that current_class_decl is restored properly.
d11ad92e 9845 (start_function): Likewise.
db5ae43f
MS
9846 (finish_function): Add parameter 'nested'. Don't call
9847 permanent_allocation if (nested).
9848 * various: Pass extra parameter to finish_function.
9849 * decl2.c (finish_file): Reorganize end-of-file inline handling,
9850 synthesizing methods as necessary.
9851 * lex.c (cons_up_default_function): Call mark_inline_for_output.
9852 Only synthesize methods immediately if #pragma implementation
9853 (currently disabled).
9854 (do_pending_inlines): Call synthesize_method.
9855 * method.c (synthesize_method): New function; all method synthesis
9856 goes through here. Calls do_build_assign_ref and
9857 do_build_copy_constructor.
9858 (build_default_constructor): Remove.
d11ad92e 9859 (build_dtor): Likewise.
db5ae43f
MS
9860 (build_assign_ref): Rename to do_build_assign_ref and remove stuff
9861 done by synthesize_method.
9862 (build_copy_constructor): Similarly.
44c5421f 9863
eac293a1
MS
9864Thu Sep 29 16:58:52 1994 Mike Stump <mrs@cygnus.com>
9865
9866 * typeck.c (c_expand_return): Use magic so the backend can fixup the
9867 assignment into the return register, so cleanups won't clobber it.
9868
d11ad92e 9869Thu Sep 29 13:08:50 1994 Jason Merrill <jason@deneb.cygnus.com>
eac293a1
MS
9870
9871 * method.c (hack_identifier): Don't call assemble_external for
9872 template decls.
9873
9874 * decl.c (finish_decl): Also end temporary allocation if the decl in
9875 question has a type of error_mark_node.
9876
6060a796 9877Wed Sep 28 21:45:00 1994 Mike Stump <mrs@cygnus.com>
eac293a1
MS
9878
9879 * typeck.c (build_modify_expr): When optimizing ?: on lhs, make sure
9880 that if the ?: was a reference type, that the subparts will be also.
9881
d11ad92e 9882Wed Sep 28 16:14:04 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
eac293a1
MS
9883
9884 * except.c (register_exception_table): Use Pmode, not PTRmode.
9885
d11ad92e 9886Fri Sep 23 13:54:27 1994 Jason Merrill <jason@deneb.cygnus.com>
eac293a1
MS
9887
9888 * lex.c (do_pending_inlines): Do method synthesis after the
9889 pending_inlines have been reversed.
9890
d11ad92e 9891Thu Sep 22 12:53:03 1994 Per Bothner <bothner@kalessin.cygnus.com>
f376e137
MS
9892
9893 * decl2.c (finish_file): Fix Brendan's fix: Only call
9894 register_exception_table if there is a non-empty exception table.
9895
d11ad92e 9896Thu Sep 22 12:03:46 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
9897
9898 * decl2.c (finish_file): Only do register_exception_table if
9899 -fhandle-exceptions is being used.
9900
d11ad92e 9901Wed Sep 21 19:01:51 1994 Per Bothner <bothner@kalessin.cygnus.com>
f376e137
MS
9902
9903 * except.c (output_exception_table_entry): Simplify
9904 by using assemble_integer.
9905 (build_exception_table): Change to return a count.
9906 Cleanup to use standard macros, instead of hard-wired
9907 sparc asm format. Don't make __EXCEPTION_TABLE__ global.
9908 (register_exception_table): New function. Generate call to builtin.
9909 * decl2.c (finish_file): Call register_exception_table.
9910 * cp-tree.h (build_exception_table): Fix prototype.
9911
d11ad92e 9912Wed Sep 21 13:20:42 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
9913
9914 * tree.c (break_out_calls): Don't try to duplicate the DECL_INITIAL.
9915
9916 * decl2.c (delete_sanity): Give an error at trying to delete a
9917 function.
9918
d11ad92e 9919Wed Sep 21 11:47:10 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9920
9921 * lex.c (cons_up_default_function): Mark synthesized destructors
9922 inline.
9923
9924 * decl.c (duplicate_decls): Ignore redeclarations of wchar_t as
9925 something other than __wchar_t, complaining if -pedantic and not in
9926 a system header.
9927
d11ad92e 9928Tue Sep 20 09:43:28 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9929
9930 * decl.c (xref_tag): Set up BINFO_INHERITANCE_CHAIN on base binfos
9931 here.
9932
9933 * typeck.c (build_modify_expr): Require complete type after checking
9934 for error_mark_node.
9935
9936 * call.c (build_method_call): Print parmtypes when complaining of
9937 ambiguous call.
9938
9939 * typeck.c (build_modify_expr): Handle assignment to array from
9940 non-array.
9941
9942 * decl.c (lookup_name_real): Deal with got_scope == error_mark_node.
9943
9944 * call.c (build_method_call): Don't bother with the exact match.
9945
d11ad92e 9946Mon Sep 19 00:51:39 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9947
9948 * init.c (expand_aggr_init): If we munge the type of the variable,
9949 also munge the type of the initializer.
9950
9951 * decl.c (grokdeclarator): Use <= when comparing to RID_LAST_MODIFIER.
9952 (init_decl_processing): Push artificial declaration of wchar_t so
9953 people don't have to declare it before they can use it.
9954
9955 * error.c (cp_line_of): return lineno in lieu of 0.
9956
9957 * typeck.c (convert_for_assignment): Handle conversion of pmfs to
9958 int and bool.
9959 (build_component_ref): Fold the COMPONENT_REF in case it can be
9960 reduced.
9961
9962 * typeck2.c (store_init_value): Don't pedwarn about non-constant
9963 bracketed initializers for automatic variables.
9964
d11ad92e 9965Sun Sep 18 10:12:12 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9966
9967 * error.c (dump_decl): Don't say `typedef enum foo foo'.
9968
9969 * decl.c (start_decl): Don't set TREE_PUBLIC on template decls just
9970 because they're affected by #pragma i/i. We'll deal with that when
9971 they get instantiated.
9972
9973 * typeck.c (build_unary_op): Clean up cruft in ADDR_EXPR case.
9974
9975 * class.c (instantiate_type): Set TREE_CONSTANT on instantiated
9976 ADDR_EXPRs if appropriate.
9977
9978 * decl.c (build_ptrmemfunc_type): Unset IS_AGGR_TYPE on pmf types.
9979
9980 * typeck.c (build_ptrmemfunc): Handle &overloaded_method as an
9981 initializer properly.
d11ad92e 9982 * typeck2.c (digest_init): Likewise.
f376e137
MS
9983
9984 * tree.c (cp_build_type_variant): Like c_build_type_variant, except
9985 it uses build_cplus_array_type.
9986 * *.c: Use cp_build_type_variant instead of c_build_type_variant.
9987
9988 * pt.c (do_type_instantiation): Don't try to instantiate nested
db5ae43f 9989 enums.
f376e137 9990
d11ad92e 9991Tue Sep 13 10:56:58 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9992
9993 * cvt.c (build_up_reference): Handle preincrement and predecrement
db5ae43f 9994 properly.
f376e137 9995
d11ad92e 9996Tue Sep 13 09:51:59 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
9997
9998 * decl.c (finish_decl): Only lay out the rtl for DECL if it is, in
9999 fact, static.
10000
d11ad92e 10001Mon Sep 12 14:40:30 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
10002
10003 * decl.c (finish_decl): Lay out the rtl for DECL before doing
10004 grok_reference_init, in case it's static.
10005
d11ad92e 10006Mon Sep 12 12:45:38 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
10007
10008 * class.c (finish_struct): Don't synthesize constructors if the
10009 class has a field with the same name as the class. Don't die on
10010 classes with no constructors or destructors. Don't die if the head
10011 and tail of the class are in different files.
10012
10013 * decl.c (grokdeclarator): Don't treat a function pointer field
10014 with the same name as the class as a constructor.
10015
d11ad92e 10016Fri Sep 9 13:17:00 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
10017
10018 * typeck.c (build_c_cast): Pull constant values out of their
10019 variables here.
10020
10021 * decl.c (duplicate_decls): Only propagate DECL_CHAIN in
10022 FUNCTION_DECLs and TEMPLATE_DECLs.
10023
d11ad92e 10024Thu Sep 8 10:07:48 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
10025
10026 * decl.c (duplicate_decls): Propagate DECL_CHAIN in all DECLs that
10027 have it.
10028
10029 * pt.c (unify): REALs and INTEGERs only unify with their own genus.
10030 (instantiate_member_templates): Don't muck with DECL_EXTERNAL and
10031 TREE_PUBLIC unless -fexternal-templates.
10032
d11ad92e 10033Wed Sep 7 13:17:10 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
10034
10035 * pt.c (do_type_instantiation): Call instantiate_member_templates.
10036 Deal with specializations.
10037 (tsubst): Don't stick the mangled name in DECL_NAME for function
10038 instantiations. Don't push them, either.
10039
10040 * decl2.c (grokfield): Move code for generating the
10041 DECL_ASSEMBLER_NAME for static members from here.
10042 * method.c (build_static_name): To here.
10043 * decl.c (grokvardecl): Call build_static_name.
10044 (duplicate_decls): Keep old DECL_ASSEMBLER_NAME.
10045
d11ad92e 10046Mon Sep 5 12:49:18 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
10047
10048 * call.c (build_method_call): if -Wsynth, warn when selecting
10049 synthesized op= over user-supplied one cfront would select.
10050 * decl2.c (lang_decode_option): Handle -Wsynth.
10051
d11ad92e 10052Fri Sep 2 15:11:59 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
10053
10054 * decl.c (finish_enum): Overhaul to fix several bugs.
10055 (start_enum): Disable useless code.
10056
d11ad92e 10057Thu Sep 1 16:04:54 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
10058
10059 * typeck.c (c_expand_return): Warn about returning a reference to a
10060 temporary.
10061 (convert_arguments): Increment argument counter when using default
10062 arguments, too.
10063
d11ad92e 10064Wed Aug 31 14:29:22 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
10065
10066 * decl.c (finish_decl): If the type of decl is error_mark_node,
10067 don't bother trying to do anything.
10068
10069 * typeck.c (convert_for_initialization): If the rhs contains a
10070 constructor call, pretend the lhs type needs to be constructed.
10071
10072 * init.c (expand_default_init): If we stick the object inside the
10073 initializer, mark the initializer used.
10074
d11ad92e 10075Tue Aug 30 13:50:18 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
10076
10077 * method.c (build_assign_ref): return *this;
10078 (build_assign_ref): Fix base assignment order.
10079 (build_copy_constructor): Fix member init order.
10080
d11ad92e 10081Mon Aug 29 13:54:39 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
10082
10083 * g++.c (main): Remember to clear out SAW_SPECLANG after we see
10084 its argument.
10085
d11ad92e 10086Sat Aug 27 09:36:03 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
10087
10088 * method.c (build_copy_constructor): Also copy virtual bases.
10089
d11ad92e 10090Fri Aug 26 17:05:15 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
10091
10092 * lex.c (do_pending_inlines): Clear out pending_inlines before doing
10093 any synthesis. Also first set deja_vu on all pending_inlines.
10094
10095 * method.c (build_assign_ref): Use build_member_call to invoke base
10096 operator=, rather than build_modify_expr. And use
10097 build_reference_type instead of TYPE_REFERENCE_TO.
10098 (build_copy_constructor): Use TYPE_NESTED_NAME to identify the
10099 basetype.
10100
10101 * decl2.c (grokfield): Don't complain about undefined local class
10102 methods.
10103
10104 * class.c (finish_struct): Don't try to synthesize methods here.
10105 * lex.c (do_pending_inlines): Instead, synthesize them here.
10106 (init_lex): Initialize synth_obstack.
10107 (cons_up_default_function): Stick synthesis request on
10108 pending_inlines.
10109
d11ad92e 10110Fri Aug 26 12:24:14 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
10111
10112 * call.c (build_method_call) [PCC_STATIC_STRUCT_RETURN]: Also
10113 accept an RTL_EXPR in what we're about to use for the instance,
10114 since anything which would end up with pcc_struct_return set
10115 inside cplus_expand_expr.
10116
10117 * cp-tree.h (cons_up_default_function): Note change of prototype.
10118
d11ad92e 10119Thu Aug 25 23:05:30 1994 Gerald Baumgartner <gb@cs.purdue.edu>
f376e137
MS
10120
10121 * class.c (finish_struct): Undid change from Aug 21 testing
10122 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
d11ad92e 10123 * parse.y (left_curly): Likewise, undid change from Aug 21.
f376e137
MS
10124 * decl.c (xref_tag): Undid change from Aug 21, set
10125 CLASSTYPE_INTERFACE correctly, and added comments.
10126
d11ad92e 10127Thu Aug 25 00:36:31 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
10128
10129 Rework approach to synthesized methods; don't go through the parser
10130 anymore.
10131 * class.c (finish_struct): Use new synthesis approach.
10132 * lex.c (cons_up_default_function): Now just creates declaration,
10133 not code.
10134 (largest_union_member): #if 0 out.
d11ad92e
MS
10135 (default_assign_ref_body): Likewise.
10136 (default_copy_constructor_body): Likewise.
f376e137
MS
10137 * method.c (build_default_constructor): New function to synthesize X().
10138 (build_copy_constructor): Synthesize X(X&).
10139 (build_assign_ref): Synthesize X::operator=(X&).
10140 (build_dtor): Synthesize ~X().
10141
10142 * error.c (cp_line_of): If we're dealing with an artificial
10143 TYPE_DECL, look at the type instead.
10144
d11ad92e 10145Wed Aug 24 11:11:50 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
10146
10147 * init.c (sort_member_init): Check warn_reorder.
10148 * decl2.c (lang_decode_option): Handle -W{no-,}reorder.
10149
10150 * cp-tree.h (CLASSTYPE_SOURCE_LINE): New macro.
10151 * error.c (cp_line_of): Use CLASSTYPE_SOURCE_LINE for aggregates.
10152 * class.c (finish_struct): Set CLASSTYPE_SOURCE_LINE.
10153
6060a796 10154Tue Aug 23 09:28:35 1994 Mike Stump <mrs@cygnus.com>
f376e137
MS
10155
10156 * error.c (dump_decl): Improve wording, so that error messages
10157 dont't read template<, class foo>...
10158
d11ad92e 10159Mon Aug 22 15:30:51 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
10160
10161 * parse.y (label_colon): Also match a TYPENAME as a label name,
10162 since they may have declared a class by that name but have also
10163 tried to have a local label under the same name.
10164
10165 * pt.c (coerce_template_parms): Call cp_error, not cp_error_at,
10166 for the message so they know at what point it was instantiated.
10167
d11ad92e 10168Sun Aug 21 23:07:35 1994 Gerald Baumgartner <gb@cs.purdue.edu>
f376e137
MS
10169
10170 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
10171 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures up to left_curly time.
10172 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
db5ae43f 10173 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures down to left_curly time.
f376e137
MS
10174 * parse.y (left_curly): New final resting place for setting
10175 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING for signatures.
10176
10177 * class.c (finish_struct): Don't test for function/field name
10178 conflicts in signatures, since all the fields are compiler-constructed.
10179
d11ad92e 10180Fri Aug 19 14:04:47 1994 Kung Hsu <kung@mexican.cygnus.com>
f376e137
MS
10181
10182 * method.c (build_overload_nested_name): in qualified name
10183 mangling, the template with value instantiation will have numeric
10184 at end and may mixed with the name length of next nested level.
10185 Add a '_' in between.
10186 * method.c (build_overload_name): ditto.
10187 * method.c (build_overload_identifier): ditto.
10188
6060a796 10189Thu Aug 18 16:24:43 1994 Mike Stump <mrs@cygnus.com>
f376e137
MS
10190
10191 * error.c (dump_decl): Handle NULL args.
10192
db5ae43f
MS
10193Thu Sep 29 16:15:36 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
10194
10195 * g++.c: Rework last change so it's done like collect.c (and
10196 gcc.c).
10197
10198Wed Sep 14 10:17:27 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
10199
10200 * g++.c: Include <sys/errno.h> in case `errno' is a macro
10201 as permitted by ANSI C.
10202
6060a796 10203Thu Aug 18 12:48:09 1994 Mike Stump <mrs@cygnus.com>
00595019
MS
10204
10205 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
10206 CLASSTYPE_VTABLE_NEEDS_WRITING up to left_curly time.
10207 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
db5ae43f 10208 CLASSTYPE_VTABLE_NEEDS_WRITING down to left_curly time.
00595019
MS
10209 * parse.y (left_curly): New final resting place for setting
10210 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
10211
d11ad92e 10212Thu Aug 11 11:32:42 1994 H.J. Lu <hjl@nynexst.com>
00595019
MS
10213
10214 * g++.c (main): Only decrement "added" and set "library" to
10215 NULL when "library" != NULL.
10216
d11ad92e 10217Sat Aug 13 00:14:52 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
10218
10219 * decl.c (grokdeclarator): Don't set TREE_PUBLIC on a function decl
10220 just because its class has a known interface.
10221 (decls_match): Deal with new format of template parms.
10222
10223 * lex.c (cons_up_default_function): Don't play with TREE_PUBLIC and
10224 DECL_EXTERNAL here.
10225
d11ad92e 10226Fri Aug 12 01:55:15 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
10227
10228 * decl.c (pushtag): SET_DECL_ARTIFICIAL on gratuitous typedefs.
d11ad92e 10229 (xref_defn_tag): Likewise.
00595019
MS
10230 (pushdecl): Only allow artificial typedefs to be shadowed.
10231
10232 * init.c (emit_base_init): Pass the right binfos to
10233 expand_aggr_init_1.
10234
10235 * class.c (delete_duplicate_fields_1): Make it work right.
10236 (finish_struct): Catch function/field name conflict.
10237
10238 * decl2.c (check_classfn): Pass the function to cp_error, not just
10239 the name.
10240
10241 * init.c (sort_member_init): Warn when order of member initializers
10242 does not match order of member declarations.
10243 (emit_base_init): Call expand_aggr_init_1 with LOOKUP_PROTECT.
10244
10245 * error.c (dump_expr): Handle lists of functions.
10246
10247 * decl.c (start_function): #pragma interface only affects functions
10248 that would otherwise be static.
10249 (finish_decl): Don't warn about an unused variable if it has both
10250 constructor and destructor, since the 'resource allocation is
10251 initialization' idiom is relatively common.
10252
10253 * typeck.c (comp_target_types): Don't handle TEMPLATE_TYPE_PARMs.
d11ad92e 10254 (comp_target_parms): Likewise.
00595019
MS
10255 (compparms): Never consider default parms.
10256 (common_base_type): Don't choose a virtual baseclass if there is a
10257 more derived class in common.
10258 (build_conditional_expr): If pedantic, pedwarn about conversion to
10259 common base in conditional expr.
10260
10261 * class.c (instantiate_type): Handle template instantiation better.
10262
10263 * typeck.c (convert_arguments): Don't try to get tricky and convert
10264 to int directly when PROMOTE_PROTOTYPES is set, as it breaks
10265 user-defined conversions.
10266
10267 * lex.c (check_for_missing_semicolon): Also give error at end of
10268 file.
10269
10270 * call.c (build_method_call): Don't promote arrays to pointers here.
10271
10272 * typeck.c (convert_arguments): Don't require the actual parameter
10273 to be of a complete type if the formal parameter is a reference.
10274
d11ad92e 10275Thu Aug 11 15:21:40 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
10276
10277 * decl.c (grokdeclarator): Soften 'static' on member function error
10278 to pedwarn.
10279
10280 * init.c (build_new): Don't automatically save rval.
10281 (build_offset_ref): Do field lookup with proper basetype_path.
10282
d11ad92e 10283Thu Aug 11 12:46:54 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
00595019
MS
10284
10285 * errfn.c (cp_silent): Declare to mark when we should avoid
10286 emitting warnings and errors.
10287 (cp_error): Check it.
10288 (cp_warning): Likewise.
10289 (cp_pedwarn): Likewise.
10290 (cp_compiler_error): Likewise.
10291 (cp_error_at): Likewise.
10292 (cp_warning_at): Likewise.
10293 (cp_pedwarn_at): Likewise.
10294 * call.c (compute_conversion_costs): Set CP_SILENT when we start
10295 out, and make sure we turn it off before we leave.
10296
d11ad92e 10297Thu Aug 11 00:02:54 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
10298
10299 * decl2.c (grok_array_decl): Try computing *(A+B) if neither
10300 argument is obviously an array.
10301
d11ad92e 10302Wed Aug 10 15:32:04 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
10303
10304 * typeck.c (c_expand_start_case): Do cleanups here.
10305
10306 * parse.y (xcond): Do bool conversion here, too.
10307 (simple_stmt, SWITCH case): Don't do cleanups here.
10308
10309 * decl.c (duplicate_decls): Don't treat builtins that have been
10310 explicitly declared specially.
10311
d11ad92e 10312Tue Aug 9 01:16:09 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
10313
10314 * tree.c (make_deep_copy): Support copying pointer, reference,
10315 function, array, offset and method types.
10316
10317 * decl.c (init_decl_processing): Mark exit and abort as
10318 BUILT_IN_NONANSI so that duplicate_decls is kinder about
10319 redeclaration.
10320 (duplicate_decls): Don't give two errors for redeclaring a C
10321 function with the same parms but a different return type.
10322
10323 * parse.y (paren_cond_or_null): Do cleanup and bool conversion here.
10324 (condition): Instead of here.
10325 (simple_stmt, SWITCH case): Also do cleanup here.
10326
10327 * decl2.c (finish_anon_union): Only break out FIELD_DECLs.
10328
10329 * call.c (build_method_call): Don't throw away the side effects of
10330 the object in a call to a non-existent constructor.
d11ad92e 10331 * parse.y (primary): Likewise.
00595019
MS
10332
10333 * method.c (build_decl_overload): Oop.
10334
10335 * decl2.c (lang_decode_option): Deal with flag_no_nonansi_builtin,
10336 warn about uselessness of specifying -fansi-overloading.
10337
10338 * method.c (build_decl_overload): Treat any non-member new with one
10339 parameter as __builtin_new.
10340
10341 * decl.c (init_decl_processing): Setup built-in meanings of exit,
10342 _exit and abort.
10343
d11ad92e 10344Mon Aug 8 15:03:30 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
10345
10346 * error.c (dump_readonly_or_volatile): Put a space between const and
10347 volatile if both apply.
10348
10349 * init.c (perform_member_init): Clean up after this initialization.
10350 (emit_base_init): Clean up after each base init, not after all have
10351 been done.
10352 (expand_aggr_vbase_init_1): Clean up after this init.
10353
d11ad92e 10354Sun Aug 7 14:55:05 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
10355
10356 * call.c (build_method_call): Deal with destroying references.
10357
10358 * parse.y (condition): Do bool_truthvalue_conversion here.
10359 (paren_expr_or_null): And here.
10360 (simple_if): Not here.
10361 (simple_stmt): Or here.
10362
d11ad92e 10363Sat Aug 6 22:29:45 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
10364
10365 * parse.y (paren_expr_or_null): Wrap the expression in a
10366 CLEANUP_POINT_EXPR.
d11ad92e 10367 (condition): Likewise.
00595019 10368
d11ad92e 10369Sat Aug 6 19:46:37 1994 Rohan Lenard <rjl@easams.com.au>
00595019
MS
10370
10371 * call.c (build_scoped_method_call): Fix error message when
10372 destructor call refers to a nonexistent type.
10373
d11ad92e 10374Sat Apr 16 22:43:30 1993 Gerald Baumgartner <gb@cs.purdue.edu>
00595019
MS
10375
10376 * lex.h (rid): Deleted RID_RAISES, it's never used.
10377 Moved RID_PUBLIC, RID_PRIVATE, RID_PROTECTED, RID_EXCEPTION,
10378 RID_TEMPLATE and RID_SIGNATURE to the end of the enumeration,
10379 they don't need to be touched in `grokdeclarator.'
10380 (RID_LAST_MODIFIER): Defined macro to be RID_MUTABLE.
10381
10382 * decl.c (grokdeclarator): Use RID_LAST_MODIFIER instead of
10383 RID_MAX as loop limit for finding declaration specifiers.
10384
d11ad92e 10385Sat Apr 3 21:59:07 1993 Gerald Baumgartner <gb@cs.purdue.edu>
00595019
MS
10386
10387 * lex.c (debug_yytranslate): Moved to parse.y since it needs to
10388 access `yytname,' which is static in parse.c.
10389
d11ad92e 10390Fri Apr 2 23:36:57 1993 Gerald Baumgarnter <gb@cs.purdue.edu>
00595019
MS
10391
10392 * cp-tree.h (GNU_xref_ref): Fixed typo in extern declaration, it
10393 was `GNU_xref_def' instead of `GNU_xref_ref.'
10394
d11ad92e 10395Fri Aug 5 14:20:16 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
10396
10397 * pt.c (do_function_instantiation): Don't set TREE_PUBLIC and
10398 DECL_EXTERNAL on 'extern' instantiations; wait until EOF to do that.
d11ad92e 10399 (do_type_instantiation): Likewise.
00595019
MS
10400
10401 * decl2.c (import_export_inline): Decides at EOF what an inline's
10402 linkage should be.
10403 (finish_file): Call it.
10404
10405 * decl.c (start_function): Don't rely on the settings of TREE_PUBLIC
10406 and DECL_EXTERNAL from do_*_instantiation. Only set
10407 DECL_DEFER_OUTPUT on inlines whose linkage might actually change.
10408 (finish_function): Use DECL_DEFER_OUTPUT to decide which inlines to
10409 mark for later consideration, rather than DECL_FUNCTION_MEMBER_P.
10410
6060a796 10411Fri Aug 5 01:12:20 1994 Mike Stump <mrs@cygnus.com>
a292b002
MS
10412
10413 * class.c (get_class_offset_1, get_class_offset): New routine to
10414 find the offset of the class where a virtual function is defined,
10415 from the complete type.
10416 * class.c (modify_one_vtable, fixup_vtable_deltas): Use
10417 get_class_offset instead of virtual_offset as get_class_offset will
10418 always provide the right answer.
10419 * tree.c (virtual_offset): Remove. It only ever worked some of the
10420 time.
10421
d11ad92e 10422Tue Aug 2 12:44:21 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
10423
10424 * call.c (build_method_call): Put back unary_complex_lvalue call
10425 that I thought was redundant.
10426
10427 * typeck.c (c_expand_return): Fix a case I missed before.
10428
d11ad92e 10429Sun Jul 31 17:54:02 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
10430
10431 * pt.c (unify): Strip cv-quals from template type arguments (when
10432 'const T*' is matched to 'const char*', that does not mean that T is
10433 'const char').
10434
d11ad92e 10435Fri Jul 29 01:03:06 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
10436
10437 * pt.c (do_type_instantiation): Instantiate nested TAGS, not
10438 typedefs. Third time's the charm?
10439
10440 * parse.y (template_parm): Support default template parms.
d11ad92e
MS
10441 * pt.c (process_template_parm): Likewise.
10442 (end_template_parm_list): Likewise.
10443 (coerce_template_parms): Likewise.
10444 (mangle_class_name_for_template): Likewise.
10445 (push_template_decls): Likewise.
10446 (unify): Likewise.
10447 * method.c (build_overload_identifier): Likewise.
10448 * error.c (dump_decl): Likewise.
a292b002 10449
d11ad92e 10450Wed Jul 27 17:47:00 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
10451
10452 * pt.c (do_type_instantiation): Only instantiate nested *classes*.
10453
d11ad92e 10454Tue Jul 26 13:22:40 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
10455
10456 * search.c (note_debug_info_needed): Also emit debugging information
10457 for the types of fields.
10458
d11ad92e 10459Mon Jul 25 00:34:44 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
10460
10461 * pt.c (lookup_template_class): Pass 'template' to
10462 coerce_template_parms instead of 'in_decl', since it's a more
10463 meaningful context.
10464
10465 * typeck.c (c_expand_return): Make sure any cleanups for the return
10466 expression get run.
10467 (build_c_cast): Use CONVERT_EXPR for conversion to void.
10468
10469 * pt.c (do_type_instantiation): Also instantiate nested types.
10470
10471 * typeck.c (convert_for_assignment): Don't die when comparing
10472 pointers with different levels of indirection.
10473
10474 * decl.c (grokdeclarator): The sub-call to grokdeclarator for
10475 class-local typedefs sets DECL_ARGUMENTS, so we need to clear it
10476 out.
10477
10478 * decl2.c (finish_anon_union): Don't die if the union has no
10479 members.
10480
10481 * decl.c (grokdeclarator): Undo changes to declspecs when we're done
10482 so that 'typedef int foo, bar;' will work.
10483
10484 * decl2.c (finish_file): Don't call expand_aggr_init for
10485 non-aggregates.
10486
d11ad92e 10487Mon Jul 25 00:03:10 1994 Teemu Torma <tot@trema.fi>
a292b002
MS
10488
10489 * decl.c (finish_function): We can't inline constructors and
10490 destructors under some conditions with -fpic, but don't unset
10491 DECL_INLINE.
10492
d11ad92e 10493Mon Jul 25 00:03:10 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
10494
10495 * typeck.c (build_object_ref): Make sure 'datum' is a valid object.
10496
d11ad92e 10497Sun Jul 24 14:19:31 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
10498
10499 * class.c (finish_struct): Don't set DECL_FIELD_BITPOS on
10500 non-fields.
10501 (finish_struct_methods): Use copy_assignment_arg_p.
10502
10503 * cvt.c (cp_convert): If expr is an OFFSET_REF, resolve it instead
10504 of giving an error.
10505
10506 * typeck.c (build_binary_op_nodefault): Don't set result_type if we
10507 don't know how to compare the operands.
10508
10509 * decl.c (grokdeclarator): Avoid seg fault when someone uses '__op'
10510 as a declarator-id in their program. Like the Linux headers do.
10511 Arrgh.
10512
10513 * tree.c (lvalue_p): Treat calls to functions returning objects by
10514 value as lvalues again.
10515
10516 * typeck.c (build_component_addr): Use convert_force to convert the
10517 pointer in case the component type is also a private base class.
10518
10519 * search.c (get_matching_virtual): Fix bogus warning of overloaded
10520 virtual.
10521
10522 * pt.c (overload_template_name): Set DECL_ARTIFICIAL on the created
10523 TYPE_DECL to fix bogus shadowing warnings.
10524
d11ad92e 10525Fri Jul 22 01:15:32 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
10526
10527 * init.c (expand_aggr_init_1): const and volatile mismatches do not
10528 prevent a TARGET_EXPR from initializing an object directly.
10529
d11ad92e 10530Tue Jul 19 17:55:37 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
10531
10532 * cvt.c (build_up_reference): Allow building up references to
10533 `this', don't warn about making references to artificial variables
10534 (like `this').
10535
10536 * tree.c (lvalue_p): `this' is not an lvalue.
10537
10538 * call.c (build_method_call): Accept using a typedef name (or
10539 template type parameter) for explicit destructor calls.
10540
72b7eeff
MS
10541Thu Jul 14 09:42:23 1994 Mike Stump <mrs@cygnus.com>
10542
10543 * Version 2.6.0 released.
10544
d11ad92e 10545Wed Jul 13 03:57:54 1994 Jason Merrill <jason@deneb.cygnus.com>
cf17cae3 10546
a292b002
MS
10547 * method.c (hack_identifier): Put back old code so lists of
10548 non-functions will be handled properly.
a5ef9010 10549
a292b002
MS
10550 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): #if 0 out; this macro is now
10551 defined in the language-independent tree.h.
cf17cae3 10552
a292b002
MS
10553 * tree.c (count_functions): Avoid bogus warning when compiling this
10554 function.
cf17cae3 10555
d11ad92e 10556Mon Jul 11 18:37:20 1994 Jason Merrill <jason@deneb.cygnus.com>
cf17cae3 10557
a292b002
MS
10558 * decl.c (grok_reference_init): Always save the initializer of a
10559 reference.
cf17cae3 10560
6060a796 10561Fri Jul 8 17:41:46 1994 Mike Stump <mrs@cygnus.com>
5b605f68
MS
10562
10563 * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside
10564 CLEANUP_POINT_EXPRs so that the stack slots can be reused.
63c68bb7 10565 (disabled for now)
5b605f68 10566
d11ad92e 10567Fri Jul 8 12:59:38 1994 Jason Merrill <jason@deneb.cygnus.com>
5b605f68
MS
10568
10569 * method.c (hack_identifier): Fix for new overloading.
10570
10571 * typeck.c (build_binary_op_nodefault): Don't mess with division by
db5ae43f 10572 zero.
5b605f68 10573
d11ad92e 10574Fri Jul 8 13:20:28 1994 Gerald Baumgartner <gb@cs.purdue.edu>
5b605f68
MS
10575
10576 * decl2.c (finish_file): Only call walk_sigtables, if
10577 flag_handle_signatures is turned on, don't waste time otherwise.
10578
d11ad92e 10579Fri Jul 8 02:27:41 1994 Jason Merrill <jason@deneb.cygnus.com>
5b605f68
MS
10580
10581 * decl.c (push_overloaded_decl): Don't create overloads of one when
10582 shadowing a class type.
a292b002 10583 * typeck.c (build_x_function_call): Complain about overloads of one.
5b605f68
MS
10584
10585 * decl.c (grokdeclarator): Don't try to treat a char* as a tree.
10586 (grokdeclarator): Fix setting of TREE_STATIC.
10587 (start_decl): Clear DECL_IN_AGGR_P after calling duplicate_decls.
10588
d11ad92e 10589Thu Jul 7 22:20:46 1994 Gerald Baumgartner <gb@andros.cygnus.com>
311862c8
GB
10590
10591 * cp-tree.h (walk_sigtables): Created extern declaration.
10592 * decl2.c (walk_sigtables): Created function, patterned after
10593 walk_vtables, even though we only need it to write out sigtables.
10594 (finish_sigtable_vardecl): Created function.
10595 (finish_vtable_vardecl): Changed 0 to NULL_PTR.
10596 (finish_file): Call walk_sigtables.
10597
10598 * sig.c (build_signature_table_constructor): Mark class member
10599 function pointed to from signature table entry as addressable.
10600
d11ad92e 10601Thu Jul 7 13:39:37 1994 Jason Merrill <jason@deneb.cygnus.com>
5b605f68
MS
10602
10603 * decl.c (start_decl): Check new decl of static member variable
10604 against the declaration in the class here.
10605 (grokvardecl): Instead of here.
10606
10607 * class.c (prepare_fresh_vtable): Call import_export_vtable if not
10608 -fvtable-thunks.
d11ad92e 10609 (build_vtable): Likewise.
5b605f68
MS
10610
10611 * decl2.c (import_export_vtable): Move logic for deciding the
10612 interface of a template class from here.
10613 (import_export_template): To here.
10614 (finish_vtable_vardecl): Call import_export_template before
10615 import_export_vtable.
10616
6060a796 10617Wed Jul 6 20:25:48 1994 Mike Stump <mrs@cygnus.com>
a3b49ccd
MS
10618
10619 * except.c (init_exception_processing): Setup interim_eh_hook to
10620 call lang_interim_eh.
10621 * except.c (do_unwind): Propagate throw object value across
10622 stack unwinding.
10623 * except.c (saved_throw_value): Used to hold the value of the object
10624 being thrown. It is always a reference to the real value.
10625 * except.c (expand_start_catch_block): Add handling for the
10626 value of the exception object.
10627 * except.c (expand_start_catch_block): Add handler for the handler,
10628 so that throws inside the handler go to the outer block.
d11ad92e 10629 * except.c (expand_end_catch_block): Likewise.
a3b49ccd
MS
10630 * parse.y (handler_args): Use parm instead, as the other doesn't yet
10631 handle references correctly.
10632
d11ad92e 10633Wed Jul 6 17:55:32 1994 Per Bothner <bothner@kalessin.cygnus.com>
a3b49ccd
MS
10634
10635 * decl2.c (mark_vtable_entries): If -ftable-thunks, set the
10636 vtable entry properly to abort.
10637
d11ad92e 10638Tue Jul 5 14:07:54 1994 Jason Merrill <jason@deneb.cygnus.com>
5b605f68
MS
10639
10640 * typeck.c (build_binary_op_nodefault): Downgrade division by zero
10641 errors to warnings.
10642
10643 * call.c (build_overload_call_real): Handle fnname being a list of
10644 functions.
10645 * typeck.c (build_x_function_call): Pass list of functions to
10646 build_overload_call, not just the name.
10647 * tree.c (count_functions): Complain when called for invalid
10648 argument.
10649
10650 * decl.c (grokdeclarator): Fix settings of TREE_STATIC, TREE_PUBLIC
10651 and DECL_EXTERNAL on static members and initialized const members.
10652 * decl2.c (grokfield): Reflect this change.
10653
d11ad92e 10654Fri Jul 1 09:35:51 1994 Jason Merrill <jason@deneb.cygnus.com>
9a0e77ba
JM
10655
10656 * parse.y (init): ANSI C++ does not forbid { }.
10657
d11ad92e 10658Thu Jun 30 00:35:22 1994 Jason Merrill <jason@deneb.cygnus.com>
9a0e77ba
JM
10659
10660 * decl2.c (lang_decode_option): Set warn_nonvdtor along with -Wall.
10661 warn_nonvdtor defaults to off.
10662
10663 * class.c (instantiate_type): Use comptypes rather than relying on
10664 types to satisfy ==.
10665
10666 * decl.c (start_function): Set DECL_DEFER_OUTPUT on all inlines that
10667 might be static.
10668
10669 * tree.c (build_cplus_new): Never build WITH_CLEANUP_EXPRs.
10670
10671 * decl.c (grok_reference_init): Deal with ADDR_EXPRs of TARGET_EXPRs.
10672
10673 * cvt.c (cp_convert): Pass 0 to with_cleanup_p arg of
10674 build_cplus_new.
10675
d11ad92e 10676Wed Jun 29 22:31:09 1994 Jason Merrill <jason@deneb.cygnus.com>
9a0e77ba
JM
10677
10678 * decl2.c (finish_file): Maybe consider static inlines multiple
10679 times, in case they reference each other.
10680
d11ad92e 10681Tue Jun 28 11:58:38 1994 Gerald Baumgartner <gb@cs.purdue.edu>
63718c49
GB
10682
10683 * class.c (finish_struct): Don't `cons_up_default_function's
10684 for signatures.
10685 (finish_struct): Handle an empty method_vec correctly.
10686
10687 * decl.c (grokdeclarator): Don't warn about a signature being
10688 empty in a signature pointer declaration if we only saw a
10689 forward declaration of the signature. Changed `warning's into
10690 `cp_warning's.
10691
10692 * sig.c (build_sigtable): Don't die if a null signature table
10693 constructor is returned.
10694 (build_signature_pointer_constructor): If the signature table
10695 constructor is null, the _sptr field is set to a null pointer
10696 and cast to the appropriate type. Make copies of all null
10697 pointers so that the type null_pointer_node doesn't get changed.
10698 (build_signature_table_constructor): Added comments.
10699
10700 * sig.c (build_signature_pointer_constructor): Complain if we
10701 try to assign to/initialize a signature pointer/reference of
10702 an undefined signature.
10703
d11ad92e 10704Mon Jun 27 14:05:16 1994 Gerald Baumgartner <gb@cs.purdue.edu>
63718c49
GB
10705
10706 * typeck2.c (store_init_value): Don't be pedantic about
10707 non-constant initializers of signature tables/pointers/references.
10708
d11ad92e 10709Fri Jun 24 16:49:41 1994 Gerald Baumgartner <gb@cs.purdue.edu>
63718c49
GB
10710
10711 * decl.c (grokdeclarator): If we are grokking an opaque typedef
10712 in a signature, don't complain about it begin static.
10713
6060a796 10714Wed Jun 29 16:44:45 1994 Mike Stump <mrs@cygnus.com>
21474714
MS
10715
10716 Fixes a problem of the this pointer being wrong in virtual calls to
10717 methods that are not overridden in more derived classes.
10718
10719 * class.c (fixup_vtable_delta): New routine. It will fixup the
10720 delta entries in vtables, wheever they need updating.
10721 * class.c (finish_struct): Call the new routine for all virtual
10722 bases, as they can have different offsets, than those used in base
10723 classes that we derive our vtable from.
10724
d11ad92e 10725Tue Jun 28 23:49:28 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
10726
10727 * typeck.c (build_binary_op): Use the types before default
10728 conversions in the error message.
10729
10730 * *.c: Use c_build_type_variant instead of build_type_variant where
10731 the type might be an array.
10732
10733 * call.c (build_method_call): Call build_type_variant and
10734 build_reference_type in the right order.
d11ad92e 10735 * decl.c (record_builtin_type): Likewise.
21474714 10736
d11ad92e 10737Wed Jun 29 16:58:53 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
10738
10739 * call.c (build_method_call): Call build_type_variant and
10740 build_reference_type in the right order.
d11ad92e 10741 * decl.c (record_builtin_type): Likewise.
21474714 10742
d11ad92e 10743Tue Jun 28 23:49:28 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
10744
10745 * typeck.c (build_binary_op): Use the types before default
10746 conversions in the error message.
10747
10748 * *.c: Use c_build_type_variant instead of build_type_variant where
10749 the type might be an array.
10750
d11ad92e 10751Sat Jun 25 11:50:54 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
10752
10753 * cvt.c (convert_to_reference): Try UDC's before doing the
10754 reinterpret_cast thang, though.
10755
d11ad92e 10756Fri Jun 24 01:24:01 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
10757
10758 * typeck.c (c_expand_return): Don't USE the return value location
10759 after we've expanded the jump.
10760
10761 * decl2.c (finish_file): Make sure DECL_SAVED_INSNS is not 0 before
10762 trying to write out an inline.
10763
10764 * cvt.c (build_up_reference): Also do address adjustment when the
10765 target type uses MI.
10766 (convert_to_reference): Try UDCs only after built-in conversions.
10767 (build_type_conversion_1): Don't play games with the argument to the
10768 method.
10769 (build_type_conversion): #if 0 out code for binding to reference.
10770
d11ad92e 10771Thu Jun 23 00:22:28 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465 10772
21474714
MS
10773 * decl2.c (finish_file): Use TREE_SYMBOL_REFERENCED to decide
10774 whether to emit inlines.
10775
a3203465
MS
10776 * decl.c (grokdeclarator): Set explicit_int for decls that just
10777 specify, say, 'long'.
10778
10779 * init.c (do_friend): Do overload C functions (or call pushdecl,
63718c49 10780 anyaway).
a3203465 10781
d11ad92e 10782Wed Jun 22 13:40:49 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10783
10784 * cvt.c (build_up_reference): Don't call readonly_error.
10785 (convert_to_reference): Propagate const and volatile from expr to
10786 its type.
10787
10788 * tree.c (lvalue_p): Random CALL_EXPRs are not lvalues.
10789
10790 * cvt.c (build_up_reference): Break out WITH_CLEANUP_EXPR when
10791 creating a temporary.
10792 (convert_to_reference): Lose excessive and incorrect trickiness.
10793 (cp_convert): Call build_cplus_new with with_cleanup_p set.
10794
d11ad92e 10795 * typeck2.c (build_functional_cast): Likewise.
a3203465 10796
d11ad92e 10797Tue Jun 21 17:38:38 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10798
10799 * decl.c (grokdeclarator): signed, unsigned, long and short all
10800 imply 'int'.
10801
10802 * decl.c (grokdeclarator): Allow "this is a type" syntax.
10803 (grok_reference_init): Simplify and fix.
10804
d11ad92e 10805Sun Jun 19 17:08:48 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10806
10807 * decl.c (grokdeclarator): pedwarn about a typedef that specifies no
10808 type.
10809
d11ad92e 10810Sat Jun 18 04:16:50 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10811
10812 * decl.c (start_function): Move TREE_PUBLIC and DECL_EXTERNAL
10813 tinkering to after call to pushdecl.
10814
d11ad92e 10815Fri Jun 17 14:48:28 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10816
10817 * call.c (build_method_call): Handle destructors for non-aggregate
10818 types properly.
10819
d11ad92e 10820Thu Jun 16 16:48:05 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10821
10822 * call.c (build_method_call): Make sure that the name given for the
10823 destructor matches the constructor_name of the instance.
10824
10825 * pt.c (do_function_instantiation): A non-extern instantiation
10826 overrides a later extern one.
d11ad92e 10827 (do_type_instantiation): Likewise.
a3203465 10828
d11ad92e 10829Wed Jun 15 19:34:54 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10830
10831 * init.c (expand_aggr_init): Use TYPE_MAIN_VARIANT to get the
10832 unqualified array type.
10833
10834 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Tests whether NODE is a
10835 CONSTRUCTOR with no elements.
10836
10837 * decl.c (various): Lose empty_init_node.
10838 (finish_decl): Use EMPTY_CONSTRUCTOR_P, do the empty CONSTRUCTOR
10839 thing depending on the value of DECL_COMMON instead of
10840 flag_conserve_space, do the empty CONSTRUCTOR thing for types that
10841 don't have constructors, don't treat a real empty CONSTRUCTOR
10842 specially.
10843
10844 * typeck2.c (process_init_constructor): Don't treat empty_init_node
10845 specially.
10846
6060a796 10847Wed Jun 15 19:05:25 1994 Mike Stump <mrs@cygnus.com>
a3203465
MS
10848
10849 * class.c (override_one_vtable): Don't forget to merge in an old
10850 overrider when we wanted to reuse a vtable, but couldn't.
10851
d11ad92e 10852Wed Jun 15 15:03:16 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10853
10854 * decl.c (start_decl): Put statics in common again.
10855
10856 * decl.c (grokdeclarator): Return NULL_TREE for an error rather than
10857 setting the type to error_mark_node.
10858
10859 * typeck.c (build_modify_expr): Build up a COMPOUND_EXPR for enum
10860 bitfield assignments.
10861
d11ad92e 10862Tue Jun 14 12:23:38 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10863
10864 * decl.c (grok_op_properties): Const objects can be passed by value.
10865
d11ad92e 10866Mon Jun 13 03:10:59 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10867
10868 * decl2.c (import_export_vtable): Force implicit instantiations to
10869 be interface_only when -fno-implicit-templates.
10870
10871 * decl.c (duplicate_decls): Redeclaring a class template name is an
10872 error.
10873
10874 * pt.c (end_template_decl): Call GNU_xref_decl for class templates.
10875 * xref.c (GNU_xref_decl): Support templates.
10876
d11ad92e 10877Sat Jun 11 17:09:05 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10878
10879 * decl.c (grok_op_properties): Split out checking for whether this
10880 function should suppress the default assignment operator.
d11ad92e 10881 * decl2.c (grok_function_init): Likewise.
f0e01782
MS
10882 (copy_assignment_arg_p): New function do do just that.
10883 Now considers virtual assignment operators that take a base as an
10884 argument to count as copy assignment operators.
10885
10886 * search.c (dfs_debug_mark): Lose checks for DWARF_DEBUG and
10887 TREE_ASM_WRITTEN, as they are redundant.
10888
10889 * pt.c (end_template_decl): Don't try to set DECL_CLASS_CONTEXT on a
10890 decl that has no LANG_SPECIFIC part.
10891 (do_type_instantiation): Force the debugging information for this
10892 type to be emitted.
10893
10894 * decl.c (start_decl): Clear up uses of various types of templates
10895 (say sorry for static data members, rather than "invalid template").
10896 (expand_static_init): Fix initialization of static data members of
10897 template classes.
10898
d11ad92e 10899Fri Jun 10 00:41:19 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10900
10901 * decl.c (grokdeclarator): Set DECL_CONTEXT on static data members.
10902
10903 * g++.c (main): Use -xc++-cpp-output for .i files.
10904
10905 * pt.c (tsubst): Give meaningful error about declaring template for
10906 a copy constructor which was not declared in the class template.
10907 (do_type_instantiation): Explicit instantiation before the class
10908 template is an error.
10909 (instantiate_template): Don't die if tsubst returns error_mark_node.
10910
d11ad92e 10911Thu Jun 9 19:04:59 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10912
10913 Don't synthesize the copy assignment operator if the one in a base
10914 class is pure virtual.
10915 * cp-tree.h (TYPE_HAS_ABSTRACT_ASSIGN_REF): New macro to indicate
10916 whether the type has a pure virtual copy assignment operator.
10917 * class.c (finish_base_struct): Don't generate the copy assignment
10918 operator if a base class has a pure virtual one.
10919 * decl.c (grok_op_properties): Add disabled code to set
10920 TYPE_HAS_ABSTRACT_ASSIGN_REF with comment pointing to where it is
10921 actually set.
10922 * decl2.c (grok_function_init): Set TYPE_HAS_ABSTRACT_ASSIGN_REF.
10923
10924 * decl2.c (import_export_vtable): Always treat template
10925 instantiations as if write_virtuals >= 2, and treat implicit
10926 instantiations as external if -fno-implicit-templates.
10927 (finish_file): Output all pending inlines if
10928 flag_keep_inline_functions.
10929
6060a796 10930Wed Jun 8 20:48:02 1994 Mike Stump <mrs@cygnus.com>
f0e01782
MS
10931
10932 * tree.c (layout_vbasetypes): Align virtual base classes inside
10933 complete objects, so that we don't core dump on machines such as
10934 SPARCs when we access members that require larger than normal
10935 alignments, such as a double. Also, we bump up the total alignment
10936 on the complete type, as necessary.
10937
d11ad92e 10938Wed Jun 8 16:18:14 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10939
10940 * gxxint.texi (Free Store): New section with code for examining
10941 cookie.
10942 (Limitations of g++): Remove operator delete entry, since it is no
10943 longer accurate. Fix access control entry.
10944
10945 * typeck.c (build_unary_op): Pedwarn about taking the address of or
10946 incrementing a cast to non-reference type.
10947 (build_modify_expr): Use convert instead of convert_force again.
10948
10949 * search.c (get_base_distance): Use IS_AGGR_TYPE_CODE to check for
10950 class type, not == RECORD_TYPE.
10951
10952 * decl.c (grokdeclarator): Cope with grokfndecl returning NULL_TREE.
10953
10954 * typeck2.c (report_case_error): #if 0 out.
10955 * lex.c (real_yylex): Lose RANGE.
d11ad92e 10956 * parse.y: Likewise.
f0e01782 10957
d11ad92e 10958Tue Jun 7 18:17:35 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10959
10960 * parse.y (simple_stmt, case ranges): Use ELLIPSIS instead of RANGE.
10961
d11ad92e 10962Mon Jun 6 19:39:57 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10963
10964 * typeck.c (build_c_cast): Don't shortcut conversions to the same
10965 type. Don't replace consts with their values here, since that's now
10966 done in cp_convert.
10967
10968 * cvt.c (cp_convert): When converting to bool, take
10969 integer_zero_node to false_node and all other INTEGER_CSTs to
10970 true_node.
10971 (build_type_conversion): Don't complain about multiple conversions
10972 to float if we're not really converting.
10973
d11ad92e 10974Fri Jun 3 02:10:56 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927 10975
f0e01782
MS
10976 Implement 'extern template class A<int>;' syntax for suppressing
10977 specific implicit instantiations.
10978 * cp-tree.h: Update prototypes for do_*_instantiation.
10979 * pt.c (do_pending_expansions): Don't compile 'extern' explicit
10980 instantiations.
10981 (do_function_instantiation): Set DECL_EXTERNAL on 'extern' explicit
10982 instantiations.
d11ad92e 10983 (do_type_instantiation): Likewise.
f0e01782
MS
10984 * parse.y (explicit_instantiation): Support 'extern template class
10985 A<int>;' syntax.
10986 * decl.c (start_function): Don't modify the settings of TREE_PUBLIC
10987 and DECL_EXTERNAL on explicit instantiations.
10988
a0a33927
MS
10989 * cvt.c (cp_convert): Replace constants with their values before
10990 converting.
f0e01782 10991 (cp_convert): Consistently use 'e' instead of 'expr'.
a0a33927 10992
d11ad92e 10993Thu Jun 2 03:53:30 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10994
10995 * typeck2.c (build_x_arrow): Resolve OFFSET_REFs first.
10996
d11ad92e 10997Wed Jun 1 18:57:35 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10998
10999 * typeck2.c (digest_init): Handle initializing a pmf with an
11000 overloaded method.
11001 * typeck.c (build_ptrmemfunc): Handle overloaded methods.
11002
11003 * decl.c (pushtag): Use build_decl to make TYPE_DECLs.
d11ad92e
MS
11004 (xref_defn_tag): Likewise.
11005 * pt.c (process_template_parm): Likewise.
11006 (lookup_template_class): Likewise.
11007 (push_template_decls): Likewise.
11008 (instantiate_class_template): Likewise.
11009 (create_nested_upt): Likewise.
a0a33927
MS
11010 * class.c (finish_struct): Don't try to set DECL_CLASS_CONTEXT on
11011 TYPE_DECLs.
11012
11013 * typeck.c (convert_arguments): Make sure type is not NULL before
11014 checking its TREE_CODE.
11015
6060a796 11016Wed Jun 1 17:40:39 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
11017
11018 * class.c (get_derived_offset): New routine.
11019 * class.c (finish_base_struct): Make sure we set BINFO_VTABLE and
11020 BINFO_VIRTUALS when we choose a new base class to inherit from.
11021 * class.c (modify_one_vtable): Use get_derived_offset to get the
11022 offset to the most base class subobject that we derived this binfo
11023 from.
11024 * class.c (finish_struct): Move code to calculate the
11025 DECL_FIELD_BITPOS of the vfield up, as we need might need it for
11026 new calls to get_derived_offset in modify_one_vtable.
11027
d11ad92e 11028Wed Jun 1 16:50:59 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
11029
11030 * init.c (build_member_call): Use build_pointer_type instead of
11031 TYPE_POINTER_TO.
11032
d11ad92e 11033Wed Jun 1 11:11:15 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
a0a33927
MS
11034
11035 * decl.c (grokdeclarator): Make sure we have a DNAME set before we
11036 try to use it in an error.
11037
6060a796 11038Wed Jun 1 09:48:49 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
11039
11040 * typeck.c (convert_arguments, convert_for_initialization): Don't
11041 strip NOP_EXPRs, when we are converting to a reference.
11042
d11ad92e 11043Wed Jun 1 01:11:38 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
11044
11045 * typeck.c (build_modify_expr): Don't dereference references when
11046 initializing them.
11047
11048 * decl2.c (grokfield): Don't check for grokdeclarator returning
11049 error_mark_node any more.
11050
11051 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
11052 (start_method): Return void_type_node instead of error_mark_node.
11053
11054 * typeck.c (build_modify_expr): Resolve offset refs earlier.
11055
d11ad92e 11056Tue May 31 16:06:58 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
11057
11058 * call.c (build_method_call): Resolve OFFSET_REFs in the object.
11059
11060 * typeck.c (build_modify_expr): Dereference references before trying
11061 to assign to them.
11062
11063 * call.c (build_method_call): Don't confuse type conversion
11064 operators with constructors.
11065 * typeck2.c (build_functional_cast): Just call build_c_cast if there
11066 was only one parameter.
11067 * method.c (build_typename_overload): Don't set
11068 IDENTIFIER_GLOBAL_VALUE on these identifiers.
11069 * decl.c (grok_op_properties): Warn about defining a type conversion
11070 operator that converts to a base class (or reference to it).
11071 * cvt.c (cp_convert): Don't try to use a type conversion operator
11072 when converting to a base class.
11073 (build_type_conversion_1): Don't call constructor_name_full on an
11074 identifier.
11075 * cp-tree.h (DERIVED_FROM_P): Should be self-explanatory.
11076
11077 * decl.c (start_decl): Don't complain that error_mark_node is an
11078 incomplete type.
11079 (finish_decl): Check for type == error_mark_node.
11080
d11ad92e 11081Mon May 30 23:38:55 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
11082
11083 * decl.c (start_function): Set DECL_DEFER_OUTPUT on implicit
11084 instantiations and inline members.
11085
11086 * spew.c (yylex): Set looking_for_template if the next token is a '<'.
11087
11088 * lex.h: Declare looking_for_template.
11089
11090 * decl.c (lookup_name_real): Use looking_for_template to arbitrate
11091 between type and template interpretations of an identifier.
11092
d11ad92e 11093Sat May 28 04:07:40 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
11094
11095 * pt.c (instantiate_template): Zero out p if we found a
11096 specialization.
11097
11098 * decl.c (grokdeclarator): Elucidate warning.
11099 (grokdeclarator): If pedantic AND -ansi, complain about long long.
11100
11101 Make explicit instantiation work reasonably. It is now appropriate
11102 to deprecate the use of -fexternal-templates.
11103 * pt.c (instantiate_template): Set DECL_TEMPLATE_SPECIALIZATION or
11104 DECL_IMPLICIT_INSTANTIATION on fndecl as appropriate.
11105 (end_template_instantiation): Reflect changes in USE_TEMPLATE
11106 semantics.
11107 (do_pending_expansions): if (!flag_implicit_templates) DECIDE(0);
11108 (do_function_instantiation): Don't set EXPLICIT_INST if
11109 flag_external_templates is set. Do set TREE_PUBLIC and DECL_EXTERN
11110 appropriately otherwise.
11111 (do_type_instantiation): Set interface info for class. Set
11112 TREE_PUBLIC and DECL_EXTERN for methods. Do none of this if
11113 flag_external_templates is set.
11114 * parse.y: Reflect changes in USE_TEMPLATE semantics.
11115 * decl2.c: New flag flag_implicit_templates determines whether or
11116 not implicit instantiations get emitted. This flag currently
11117 defaults to true, and must be true for -fexternal-templates to work.
11118 (finish_file): Consider flag_implement_inlines when
11119 setting DECL_EXTERNAL. Consider flag_implicit_templates when
11120 deciding whether or not to emit a static copy.
11121 * decl.c (start_function): Set TREE_PUBLIC and DECL_EXTERNAL
11122 properly for template instantiations.
11123 (start_method): Set DECL_IMPLICIT_INSTANTIATION on methods of a
11124 template class.
11125 * cp-tree.h (CLASSTYPE_USE_TEMPLATE): Change semantics.
11126 (DECL_USE_TEMPLATE): Parallel macro for FUNCTION and VAR_DECLs.
11127 (various others): Accessor macros for the above.
11128
d11ad92e 11129Fri May 27 13:57:40 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
11130
11131 * typeck.c (build_binary_op_nodefault): Division by constant zero is
11132 an error.
11133
6060a796 11134Fri May 27 13:50:15 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
11135
11136 * class.c (override_one_vtable): Don't modify things we don't own.
11137
d11ad92e 11138Fri May 27 01:42:58 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
11139
11140 * decl.c (finish_decl): Don't postpone processing the initializer of
11141 a decl with DECL_EXTERNAL set, and do call rest_of_compilation for a
11142 PUBLIC const at toplevel.
11143 (grokdeclarator): pedwarn about initializing non-const or
11144 non-integral statics in the class body.
11145
11146 * decl.c (pushtag): Don't try to set DECL_CLASS_CONTEXT on a
11147 TYPE_DECL.
11148
11149 * call.c (convert_harshness): Dereference reference on rhs before
11150 proceeding, properly grok passing const things to non-const
11151 references.
11152
11153 * typeck.c (build_unary_op): Soften error about taking the address
11154 of main() to a pedwarn.
11155
11156 * lex.c (default_copy_constructor_body): Unambiguously specify base
11157 classes (i.e. A((const class ::A&)_ctor_arg) ).
d11ad92e 11158 (default_assign_ref_body): Likewise.
a0a33927 11159
d11ad92e 11160Thu May 26 13:13:55 1994 Gerald Baumgartner <gb@mexican.cygnus.com>
a0a33927
MS
11161
11162 * decl2.c (grokfield): Don't complain about local signature
11163 method declaration without definition.
11164
11165 * call.c (convert_harshness): If `type' is a signature pointer
11166 and `parmtype' is a pointer to a signature, just return 0. We
11167 don't really convert in this case; it's a result of making the
11168 `this' parameter of a signature method a signature pointer.
11169
11170 * call.c (build_method_call): Distinguish calling the default copy
11171 constructor of a signature pointer/reference from a signature
11172 member function call.
11173
d11ad92e 11174Thu May 26 12:56:25 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
11175
11176 * decl2.c (grokfield): Don't set TREE_PUBLIC on member function
11177 declarations.
11178
11179 * decl.c (duplicate_decls): A previous function declaration as
11180 static overrides a subsequent non-static definition.
11181 (grokdeclarator): Don't set TREE_PUBLIC on inline method
11182 declarations.
11183
d11ad92e 11184Wed May 25 14:36:38 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
11185
11186 * decl.c (grokdeclarator): Handle initialization of static const
11187 members.
d11ad92e 11188 (finish_decl): Likewise.
a0a33927
MS
11189
11190 * decl2.c (grokfield): Allow initialization of static const members
11191 even when pedantic.
11192
11193 * decl2.c (grokfield): Deal with grokdeclarator returning
11194 error_mark_node.
11195
11196 * decl.c (grok_ctor_properties): Return 0 for A(A) constructor.
11197 (grokfndecl): Check the return value of grok_ctor_properties.
d11ad92e 11198 (start_method): Likewise.
a0a33927
MS
11199
11200 * parse.y (absdcl): Expand type_quals inline.
11201
d11ad92e 11202Tue May 24 19:10:32 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
11203
11204 * decl.c (pushtag): Use IS_AGGR_TYPE rather than checking for a
11205 RECORD_TYPE.
11206
d11ad92e 11207Tue May 24 18:09:16 1994 Per Bothner <bothner@kalessin.cygnus.com>
a0a33927
MS
11208
11209 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
11210 always use "__vt_%s".
11211 * decl2.c (finish_vtable_vardecl): Don't consider abstract virtuals
11212 when looking for a "sentinal" method (to decide on emitting vtables).
11213 * decl2.c (finish_file): Scan all decls for thunks that need
11214 to be emitted.
11215 * decl2.c (finish_vtable_vardecl): Don't bother calling emit_thunk.
11216 * method.c (make_thunk): Use a more meaningful label. If there
11217 exists a matching top-level THUNK_DECL re-use it; otherwise
11218 create a new THUNK_DECL (and declare it).
11219 * method.c (emit_thunk): Make thunk external/public depending
11220 on the underlying method.
11221
d11ad92e 11222Tue May 24 00:22:04 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
11223
11224 * pt.c (tsubst): Use lookup_name_nonclass to find guiding decls, not
11225 lookup_name.
11226
11227 * call.c (build_overload_call_real): Don't immediately pick a
11228 function which matches perfectly.
11229
11230 * decl.c (grokdeclarator): Use c_build_type_variant for arrays.
11231 (grokdeclarator): Warn about, and throw away, cv-quals attached to a
11232 reference (like 'int &const j').
11233
11234 * typeck.c (convert_arguments): Don't mess with i for methods.
11235 * call.c (build_method_call): Pass the function decl to
11236 convert_arguments.
11237
11238 * typeck.c (comp_ptr_ttypes_real): New function. Implements the
11239 checking for which multi-level pointer conversions are allowed.
11240 (comp_target_types): Call it.
11241 (convert_for_assignment): Check const parity on the ultimate target
11242 type, too. And make those warnings pedwarns.
11243
d11ad92e 11244Mon May 23 14:11:24 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
11245
11246 * error.c (dump_char): Use TARGET_* for character constants.
11247
d11ad92e 11248Mon May 23 13:03:03 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
a0a33927
MS
11249
11250 * tree.c (debug_no_list_hash): Make static.
11251
11252 * decl.c (decls_match): Say the types don't match if newdecl ends up
11253 with a null type, after we've checked if olddecl does.
11254 (pushdecl): Check if the decls themselves match before looking for
11255 an extern redeclared as static, to avoid inappropriate and incorrect
11256 warnings.
11257
d11ad92e 11258Fri May 20 14:04:34 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
11259
11260 * decl.c (grokdeclarator): Make warning about duplicate short, etc.
11261 a pedwarn.
11262
11263 * typeck.c (build_c_cast): Casting to function or method type is an
11264 error.
11265
11266 * class.c (finish_struct): Make warning for anonymous class with no
11267 instances a pedwarn.
11268
11269 * Makefile.in (stamp-parse): Expect a s/r conflict.
11270
11271 * typeck.c (build_modify_expr): pedwarn about using a non-lvalue
11272 cast as an lvalue.
11273
d11ad92e 11274Thu May 19 12:08:48 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
11275
11276 * cvt.c (type_promotes_to): Make sure bool promotes to int rather
11277 than unsigned on platforms where sizeof(char)==sizeof(int).
11278
d11ad92e 11279Wed May 18 14:27:06 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
11280
11281 * typeck.c (build_c_cast): Tack on a NOP_EXPR when casting to
11282 another variant.
11283 (build_modify_expr): Don't strip NOP_EXPRs, and don't get tricky
11284 and treat them as lvalues.
11285
11286 * decl.c (shadow_tag): Do complain about forward declarations of
11287 enums and empty declarations.
11288 * parse.y: Don't complain about forward declarations of enums and
11289 empty declarations.
11290
11291 * typeck.c (convert_for_assignment): Complain about changing
11292 the signedness of a pointer's target type.
11293
11294 * parse.y (stmt): Move duplicated code for checking case values from
11295 here.
11296 * decl2.c (check_cp_case_value): To here. And add a call to
11297 constant_expression_warning.
11298
11299 * typeck.c (convert_for_assignment): Don't complain about assigning
11300 a negative value to bool.
11301
11302 * decl.c (init_decl_processing): Make bool unsigned.
11303
11304 * class.c (finish_struct): Allow bool bitfields.
11305
d11ad92e 11306Wed May 18 12:35:27 1994 Ian Lance Taylor <ian@tweedledumb.cygnus.com>
2986ae00
MS
11307
11308 * Make-lang.in (c++.install-man): Get g++.1 from $(srcdir)/cp.
11309
d11ad92e 11310Wed May 18 03:28:35 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
11311
11312 * cvt.c (build_type_conversion): Lose special handling of
11313 truthvalues.
11314
11315 * search.c (dfs_pushdecls): Improve shadowing warning.
11316
d11ad92e 11317Tue May 17 13:34:46 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
11318
11319 * init.c (build_delete): Throw away const and volatile on `this'.
11320
11321 * decl.c (finish_enum): Put the constants in TYPE_VALUES again,
11322 rather than the enumerators.
11323 (pushtag): s/cdecl/c_decl/g
11324
d11ad92e 11325Mon May 16 23:04:01 1994 Stephen R. van den Berg <berg@pool.informatik.rwth-aachen.de>
2986ae00 11326
63718c49
GB
11327 * cp/typeck.c (common_type): Attribute merging.
11328 (comp_types): Utilise COMP_TYPE_ATTRIBUTES macro.
2986ae00 11329
63718c49 11330 * cp/parse.y: Revamp attribute parsing.
2986ae00 11331
d11ad92e 11332Mon May 16 01:40:34 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
11333
11334 * decl.c (shadow_tag): Also check for inappropriate use of auto and
11335 register.
11336
11337 * method.c (build_overload_name): Clarify that the illegal case is a
11338 pointer or reference to array of unknown bound.
11339
11340 * error.c (dump_type_prefix): Print references to arrays properly.
11341
11342 * typeck.c (various): Be more helpful in pointer
11343 comparison diagnostics.
11344
11345 * tree.c (lvalue_p): MODIFY_EXPRs are lvalues again. Isn't this
11346 fun?
11347
11348 * parse.y: Also catch an error after valid stmts.
11349
11350 * search.c (dfs_init_vbase_pointers): Don't abort because `this' is
11351 const.
11352
11353 * typeck.c (convert_for_initialization): If call to
11354 convert_to_reference generated a diagnostic, print out the parm
11355 number and function decl if any.
11356
11357 * errfn.c (cp_thing): Check atarg1 to determine whether or not we're
11358 specifying a line, not atarg.
11359
11360 * tree.c (build_cplus_method_type): Always make `this' const.
11361
11362 * decl2.c (grokclassfn): If -fthis-is-variable and this function is
11363 a constructor or destructor, make `this' non-const.
11364
11365 * typeck.c (build_modify_expr): Don't warn specially about
11366 assignment to `this' here anymore, since it will be caught by the
11367 usual machinery.
11368
11369 * various: Disallow specific GNU extensions (variable-size arrays,
11370 etc.) when flag_ansi is set, not necessarily when pedantic is set,
11371 so that people can compile with -pedantic-errors for tighter const
11372 checking and such without losing desirable extensions.
11373
11374 * typeck2.c (build_functional_cast): Call build_method_call with
11375 LOOKUP_PROTECT.
11376 (process_init_constructor): Only process FIELD_DECLs.
11377
11378 * decl.c (finish_decl): Also force static consts with no explicit
11379 initializer that need constructing into the data segment.
11380
11381 * init.c (build_delete): Undo last patch, as it interferes with
11382 automatic cleanups.
11383
d11ad92e 11384Sat May 14 01:59:31 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
11385
11386 * call.c, class.h, cp-tree.h, cvt.c, decl2.c: Lose old overloading
11387 code.
11388
11389 * init.c (build_delete): pedwarn about using plain delete to delete
11390 an array.
11391
d11ad92e 11392Fri May 13 16:45:07 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
11393
11394 * typeck.c (comp_target_types): Be more helpful in contravariance
11395 warnings, and make them pedwarns.
11396
11397 * decl.c (grokdeclarator): Use decl_context to decide whether or not
11398 this is an access declaration.
11399
11400 * class.c (finish_struct_bits): Set TYPE_HAS_INT_CONVERSION if it
11401 has a conversion to enum or bool, too.
11402
6060a796 11403Fri May 13 16:31:27 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
11404
11405 * method.c (emit_thunk): Make declaration for
11406 current_call_is_indirect local (needed for hppa).
11407
d11ad92e 11408Fri May 13 16:16:37 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
11409
11410 * pt.c (uses_template_parms): Grok BOOLEAN_TYPE.
d11ad92e 11411 (tsubst): Likewise.
2986ae00 11412
6060a796 11413Fri May 13 16:23:32 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
11414
11415 * pt.c (tsubst): If there is already a function for this expansion,
11416 use it.
d11ad92e 11417 * pt.c (instantiate_template): Likewise.
2986ae00 11418
d11ad92e 11419Fri May 13 10:30:42 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
2986ae00
MS
11420
11421 * parse.y (implicitly_scoped_stmt, simple_stmt case): Use
11422 kept_level_p for MARK_ENDS argument to expand_end_bindings, to avoid
11423 generating debug info for unemitted symbols on some systems.
11424
11425 * cp-tree.h (build_static_cast, build_reinterpret_cast,
11426 build_const_cast): Add declarations.
11427
6060a796 11428Fri May 13 09:50:31 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
11429
11430 * search.c (expand_indirect_vtbls_init): Fix breakage from Apr 27
11431 fix. We now try get_binfo, and if that doesn't find what we want,
11432 we go back to the old method, which still sometimes fails.
11433
d11ad92e 11434Fri May 13 01:43:18 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
11435
11436 * parse.y (initdcl): Call cplus_decl_attributes on the right
11437 variable.
11438 * decl2.c (cplus_decl_attributes): Don't call decl_attributes for
11439 void_type_node.
11440
11441 * typeck.c (build_binary_op_nodefault): Change result_type for
11442 comparison ops to bool.
11443 (build_binary_op): Convert args of && and || to bool.
11444 * cvt.c (build_default_binary_type_conversion): Convert args of &&
11445 and || to bool.
11446 (build_default_unary_type_conversion): Convert arg of ! to bool.
11447 (type_promotes_to): bool promotes to int.
11448
6060a796 11449Fri May 13 01:43:18 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
11450
11451 Implement the new builtin `bool' type.
11452 * typeck.c (build_binary_op_nodefault): Convert args of && and || to
11453 bool.
11454 (build_unary_op): Convert arg of ! to bool.
11455 * parse.y: Know true and false. Use bool_truthvalue_conversion.
11456 * method.c (build_overload_value): Know bool.
d11ad92e 11457 (build_overload_name): Likewise.
2986ae00
MS
11458 * lex.c (init_lex): Set up RID_BOOL.
11459 * gxx.gperf: Add bool, true, false.
11460 * error.c (*): Know bool.
11461 * decl.c (init_decl_processing): Set up bool, true, false.
11462 * cvt.c (cp_convert): Handle conversion to bool.
d11ad92e 11463 (build_type_conversion): Likewise.
2986ae00
MS
11464 * *.c: Accept bool where integers and enums are accepted (use
11465 INTEGRAL_CODE_P macro).
11466
d11ad92e 11467Thu May 12 19:13:54 1994 Richard Earnshaw <rwe11@cl.cam.ac.uk>
8de7634e
RE
11468
11469 * g++.c: Use #ifdef for __MSDOS__, not #if.
11470
6060a796 11471Thu May 12 18:05:18 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
11472
11473 * decl2.c (lang_f_options): Handle -fshort-temps. -fshort-temps
11474 gives old behavior , and destroys temporaries earlier. Default
11475 behavior now conforms to the ANSI working paper.
11476
d11ad92e 11477Thu May 12 14:45:35 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
11478
11479 * typeck.c (build_modify_expr): Understand MODIFY_EXPR as an lvalue.
11480 Use convert_force to convert the result of a recursive call when we
11481 are dealing with a NOP_EXPR. Don't automatically wrap MODIFY_EXPRs
11482 in COMPOUND_EXPRs any more.
11483 (various): Lose pedantic_lvalue_warning.
11484 (unary_complex_lvalue): Understand MODIFY_EXPR.
11485
11486 * cvt.c (convert_to_reference): Allow DECL to be error_mark_node if
11487 we don't know what we're initializing.
11488
d11ad92e 11489Wed May 11 01:59:36 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
11490
11491 * cvt.c (convert_to_reference): Modify to use convtype parameter.
11492 Only create temporaries when initializing a reference, not when
11493 casting.
11494 (cp_convert): New main function.
11495 (convert): Call cp_convert.
11496 * cvt.c, decl.c, typeck.c: Fix calls to convert_to_reference.
11497 * cp-tree.h (CONV_*): New constants used by conversion code for
11498 selecting conversions to perform.
11499
11500 * tree.c (lvalue_p): MODIFY_EXPRs are no longer lvalues.
11501
11502 * typeck.c (build_{static,reinterpret,const_cast): Stubs that just
11503 call build_c_cast.
11504 * parse.y: Add {static,reinterpret,const}_cast.
d11ad92e 11505 * gxx.gperf: Likewise.
a4443a08
MS
11506
11507 * typeck.c (common_type): Allow methods with basetypes of different
11508 UPTs.
11509 (comptypes): Deal with UPTs.
11510 (build_modify_expr): Wrap all MODIFY_EXPRs in a COMPOUND_EXPR.
11511
11512 * pt.c (end_template_decl): Check for multiple definitions of member
11513 templates.
11514
11515 * call.c (build_method_call): Complain about calling an abstract
11516 virtual from a constructor.
11517
11518 * typeck.c (pointer_int_sum): Check for the integer operand being 0
11519 after checking the validity of the pointer operand.
11520
11521 * typeck2.c (digest_init): Pedwarn about string initializer being
11522 too long.
11523
d11ad92e 11524Tue May 10 12:10:28 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
11525
11526 * decl.c (push_overloaded_decl): Only throw away a builtin if the
11527 decl in question is the artificial one.
11528
11529 * parse.y (simple_stmt, switch): Use implicitly_scoped_stmt because
11530 expand_{start,end}_case cannot happen in the middle of a block.
11531
11532 * cvt.c (build_type_conversion_1): Use convert again.
11533
d11ad92e 11534Tue May 10 11:52:04 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
a4443a08
MS
11535
11536 * typeck2.c (digest_init): Make sure we check for signed and
11537 unsigned chars as well when warning about string initializers.
11538
11539 * init.c (emit_base_init): Check if there's a DECL_NAME on the
11540 member before trying to do an initialization for it.
11541
6060a796 11542Tue May 10 11:34:37 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
11543
11544 * except.c: Don't do anything useful when cross compiling.
11545
d11ad92e 11546Tue May 10 03:04:13 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
11547
11548 * decl.c (duplicate_decls): Fix up handling of builtins yet again.
d11ad92e 11549 (push_overloaded_decl): Likewise.
a4443a08
MS
11550
11551 * cvt.c (convert): Don't look for void type conversion.
11552
d11ad92e 11553Mon May 9 18:05:41 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
11554
11555 * init.c (do_friend): Only do a pushdecl for friends, not
11556 pushdecl_top_level.
11557
d11ad92e 11558Mon May 9 13:36:34 1994 Jim Wilson <wilson@sphagnum.cygnus.com>
a4443a08
MS
11559
11560 * decl.c (lookup_name_current_level): Put empty statement after
11561 the label OUT to make the code valid C.
11562
d11ad92e 11563Mon May 9 12:20:57 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
11564
11565 * typeck.c (build_binary_op_nodefault): Only complain about
11566 comparing void * and a function pointer if void * is smaller.
11567
d11ad92e 11568Sun May 8 01:29:13 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
11569
11570 * decl.c (lookup_name_current_level): Move through temporary binding
11571 levels.
11572
11573 * parse.y (already_scoped_stmt): Revive.
11574 (simple_stmt): Use it again.
11575
11576 * decl.c (poplevel): Always call poplevel recursively if we're
11577 dealing with a temporary binding level.
11578
6060a796 11579Sat May 7 10:52:28 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
11580
11581 * decl.c (finish_decl): Make sure we run cleanups for initial values
11582 of decls. Cures memory leak.
d11ad92e
MS
11583 * decl.c (expand_static_init): Likewise for static variables.
11584 * decl2.c (finish_file): Likewise for globals.
a4443a08 11585
d11ad92e 11586Sat May 7 03:57:44 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
11587
11588 * typeck.c (commonparms): Don't complain about redefining default
11589 args.
11590
11591 * decl.c (duplicate_decls): Don't complain twice about conflicting
11592 function decls.
11593 (decls_match): Don't look at default args.
11594 (redeclaration_error_message): Complain about redefining default
11595 args.
11596
11597 * call.c (build_overload_call_real): Also deal with guiding
11598 declarations coming BEFORE the template decl.
11599
11600 * pt.c (unify): Allow different parms to have different
11601 cv-qualifiers.
11602 (unify): Allow trivial conversions on non-template parms.
11603
d11ad92e 11604Fri May 6 03:53:23 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
11605
11606 * pt.c (tsubst): Support OFFSET_TYPEs.
d11ad92e 11607 (unify): Likewise.
a4443a08
MS
11608
11609 * decl2.c (finish_decl_parsing): Call push_nested_class with a type.
11610
11611 * init.c (build_offset_ref): Fix error message.
d11ad92e 11612 * search.c (lookup_field): Likewise.
a4443a08
MS
11613
11614 * call.c (build_scoped_method_call): Pass binfo to
11615 build_method_call.
d11ad92e 11616 * typeck.c (build_object_ref): Likewise.
a4443a08
MS
11617
11618 * typeck2.c (binfo_or_else): Don't return a _TYPE.
11619
11620 * class.c (finish_struct): Don't complain about re-use of inherited
11621 names or shadowing of type decls.
d11ad92e 11622 * decl.c (pushdecl_class_level): Likewise.
a4443a08
MS
11623
11624 * decl.c (finish_enum): Set the type of all the enums.
11625
11626 * class.c (finish_struct): Don't get confused by access decls.
11627
11628 * cp-tree.h (TYPE_MAIN_DECL): New macro to get the _DECL for a
11629 _TYPE. You can stop using TYPE_NAME for that now.
11630
11631 * parse.y: Lose doing_explicit (check $0 instead).
11632 * gxx.gperf: 'template' now has a RID.
d11ad92e 11633 * lex.h (rid): Likewise.
a4443a08
MS
11634 * lex.c (init_lex): Set up the RID for 'template'.
11635
11636 * parse.y (type_specifier_seq): typed_typespecs or
11637 nonempty_type_quals. Use it.
11638 (handler_args): Fix bogus syntax.
11639 (raise_identifier{,s}, optional_identifier): Lose.
11640 * except.c (expand_start_catch_block): Use grokdeclarator to parse
11641 the catch variable.
11642 (init_exception_processing): The second argument to
11643 __throw_type_match is ptr_type_node.
11644
d11ad92e 11645 Fri May 6 07:18:54 1994 Chip Salzenberg <chip@fin.uucp>
a4443a08
MS
11646
11647 [ change propagated from c-decl.c of snapshot 940429 ]
11648 * cp/decl.c (finish_decl): Setting asmspec_tree should not
11649 zero out the old RTL.
11650
6060a796 11651Fri May 6 01:25:38 1994 Mike Stump <mrs@cygnus.com>
8d2733ca
MS
11652
11653 Add alpha exception handling support to the compiler.
11654 Quick and dirty backend in except.c.
11655
11656 * cp/*: Remove most remnants of old exception handling support.
11657 * decl.c (finish_function): Call expand_exception_blocks to put
11658 the exception hanlding blocks at the end of the function.
11659 * dec.c (hack_incomplete_structures): Make sure expand_decl_cleanup
11660 comes after expand_decl_init.
11661 * except.c: Reimplementation.
11662 * expr.c (cplus_expand_expr): Handle THROW_EXPRs.
11663 * lex.c (init_lex): Always have catch, try and throw be reserved
11664 words, so that we may always parse exception handling.
11665 * parse.y: Cleanup to support new interface into exception handling.
11666 * tree.def (THROW_EXPR): Add.
11667
d11ad92e 11668Thu May 5 17:35:37 1994 Jason Merrill <jason@deneb.cygnus.com>
8d2733ca
MS
11669
11670 * parse.y (simple_stmt, for loops): Use implicitly_scoped_stmt.
11671 (various): Lose .kindof_pushlevel and partially_scoped_stmt.
11672
d11ad92e 11673Thu May 5 16:17:27 1994 Kung Hsu <kung@mexican.cygnus.com>
8d2733ca
MS
11674
11675 * parse.y (already_scoped_stmt): move expand_end_binding() to
11676 fix the unmatched LBB/LBE in stabs.
11677
d11ad92e 11678Thu May 5 14:36:17 1994 Jason Merrill <jason@deneb.cygnus.com>
8d2733ca
MS
11679
11680 * decl.c (set_nested_typename): Set TREE_MANGLED on the new
11681 identifiers.
11682 (pushdecl): Check TREE_MANGLED.
d11ad92e 11683 (xref_tag): Likewise.
8d2733ca
MS
11684 * cp-tree.h (TREE_MANGLED): This identifier is a
11685 DECL_NESTED_TYPENAME (named to allow for future use to denote
11686 mangled function names as well).
11687
11688 Implement inconsistency checking specified in [class.scope0].
11689 * decl.c (lookup_name_real): Don't set ICV here after all.
11690 (finish_enum): Also set the type of the enumerators themselves.
11691 (build_enumerator): Put the CONST_DECL in the list instead of its
11692 initial value.
11693 (pushdecl_class_level): Check inconsistent use of a name in the
11694 class body.
11695 * class.c (finish_struct): Check inconsistent use of a name in the
11696 class body. Don't set DECL_CONTEXT on types here anymore.
11697 * parse.y (qualified_type_name): Note that the identifier has now
11698 been used (as a type) in the class body.
11699 * lex.c (do_identifier): Note that the identifier has now been used
11700 (as a constant) in the class body.
11701 * error.c (dump_decl): Print type and enum decls better.
11702
d11ad92e 11703Thu May 5 09:35:35 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
700f8a87
MS
11704
11705 * typeck.c (build_modify_expr): Warn about assignment to `this'.
11706
d11ad92e 11707Wed May 4 15:55:49 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11708
11709 * init.c (build_delete): Use the global operator delete when
11710 requested.
11711
11712 * decl.c (lookup_name_real): If we find the type we're looking in a
11713 base class while defining a class, set IDENTIFIER_CLASS_VALUE for
11714 the type.
11715
11716 * class.c (finish_struct): Remove a couple of dependencies on
11717 language linkage.
11718
11719 * decl.c (pushtag): Classes do nest in extern "C" blocks.
11720 (pushdecl): Only set DECL_NESTED_TYPENAME on the canonical one for
11721 the type.
11722 (pushtag): Remove another dependency on the language linkage.
11723
11724 * lex.c (cons_up_default_function): Don't set DECL_CLASS_CONTEXT to
11725 a const-qualified type.
11726
11727 * decl.c (push_overloaded_decl): Throw away built-in decls here.
11728 (duplicate_decls): Instead of here.
11729
d11ad92e 11730Wed May 4 15:27:40 1994 Per Bothner <bothner@kalessin.cygnus.com>
700f8a87
MS
11731
11732 * typeck.c (get_member_function_from_ptrfunc): Do The Right
11733 Thing (I hope) if we're using thunks.
11734
d11ad92e 11735Wed May 4 13:52:38 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11736
11737 * parse.y (specialization): aggr template_type_name ';'.
11738 (named_class_head_sans_basetype): Use it.
d11ad92e 11739 (explicit_instantiation): Likewise.
700f8a87
MS
11740 (tmpl.2): Revert.
11741
11742 * cvt.c (build_type_conversion_1): Use convert_for_initialization,
11743 rather than convert, to do conversions after the UDC.
11744
11745 * cp-tree.h (SHARED_MEMBER_P): This member is shared between all
11746 instances of the class.
11747
11748 * search.c (lookup_field): If the entity found by two routes is the
11749 same, it's not ambiguous.
11750
d11ad92e 11751Wed May 4 12:10:00 1994 Per Bothner <bothner@kalessin.cygnus.com>
700f8a87
MS
11752
11753 * decl.c (lookup_name_real): Check for a NULL TREE_VALUE,
11754 to prevent the compiler from crashing ...
11755
d11ad92e 11756Wed May 4 11:19:45 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11757
11758 * call.c (build_method_call): If we don't have an object, check
11759 basetype_path to figure out where to look up the function.
11760
11761 * typeck.c (convert_for_initialization): Pass TYPE_BINFO (type) to
11762 build_method_call in case exp is NULL_TREE.
11763
d11ad92e 11764Tue May 3 16:02:53 1994 Per Bothner <bothner@kalessin.cygnus.com>
700f8a87
MS
11765
11766 Give a vtable entries a unique named type, for the sake of gdb.
11767 * class.c (build_vtable_entry): The addres of a thunk now has
11768 type vtable_entry_type, not ptr_type_node.
11769 * method.c (make_thunk): Fix type of THUNK_DECL.
11770 * class.c (add_virtual_function, override_one_vtable): Use
11771 vfunc_ptr_type_node, instead of ptr_type_node.
11772 * cp-tree.h (vfunc_ptr_type_node): New macro.
11773 * decl.c (init_decl_processing): Make vtable_entry_type
11774 be a unique type of pointer to a unique function type.
11775
d11ad92e 11776Tue May 3 09:20:44 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11777
11778 * parse.y (do_explicit): Sets doing_explicit to 1.
11779 (explicit_instantiation): Use do_explicit rather than TEMPLATE
11780 directly, add "do_explicit error" rule.
11781 (datadef): Set doing_explicit to 0 after an explicit instantiation.
11782 (tmpl.2): Don't instantiate if we see a ';' unless we're doing an
11783 explicit instantiation.
11784 (named_class_head_sans_basetype): Remove aggr template_type_name
11785 ';' again.
11786
d11ad92e 11787Mon May 2 23:17:21 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11788
11789 * search.c (lookup_nested_tag): Lose.
11790
11791 * decl2.c (grokfield): Set DECL_CONTEXT on TYPE_DECLs.
11792 (lookup_name_nonclass): Lose.
11793
11794 * decl.c (poplevel_class): Add force parameter.
11795 (lookup_name_real): Fix handling of explicit scoping which specifies
11796 a class currently being defined. Add 'nonclass' argument.
11797 (lookup_name, lookup_name_nonclass): Shells for lookup_name_real.
11798
11799 * class.c (finish_struct): Don't unset IDENTIFIER_CLASS_VALUEs here.
11800 (popclass): Force clearing of IDENTIFIER_CLASS_VALUEs if we're being
11801 called from finish_struct.
11802
d11ad92e 11803Mon May 2 19:06:21 1994 Per Bothner <bothner@kalessin.cygnus.com>
700f8a87
MS
11804
11805 * decl.c (init_decl_processing), cp-tree.h: Removed memptr_type.
11806 (It seeems redundant, given build_ptrmemfunc_type.)
11807 * typeck.c (get_member_function_from_ptrfunc), gc.c (build_headof,
11808 build_classof): Use vtable_entry_type instead of memptr_type.
11809 * method.c (emit_thunk): Call poplevel with functionbody==0
11810 to prevent DECL_INITIAL being set to a BLOCK.
11811
d11ad92e 11812Mon May 2 15:02:11 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11813
11814 * parse.y (named_class_head_sans_basetype): Add "aggr
11815 template_type_name ';'" rule for forward declaration of
11816 specializations.
11817
d11ad92e 11818Mon May 2 15:02:11 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11819
11820 * class.c (instantiate_type): Deal with pmf's.
bfef964b
JM
11821
11822 * Make-lang.in (cc1plus): Don't depend on OBJS or BC_OBJS, since
11823 stamp-objlist does.
700f8a87 11824
bfef964b
JM
11825 * Makefile.in (../cc1plus): Depend on OBJDEPS.
11826 (OBJDEPS): Dependency version of OBJS.
11827
d11ad92e 11828Mon May 2 12:51:31 1994 Kung Hsu <kung@mexican.cygnus.com>
700f8a87
MS
11829
11830 * search.c (dfs_debug_mark): unmark TYPE_DECL_SUPPRESS_DEBUG, not
11831 DECL_IGNORED_P.
11832
d11ad92e 11833Fri Apr 29 12:29:56 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11834
11835 * class.c (finish_struct): Clear out memory of local tags. And
11836 typedefs.
11837
11838 * decl2.c (grokclassfn): Don't set DECL_CONTEXT to a cv-qualified
11839 type.
11840 * search.c (get_matching_virtual): Be more helpful in error message.
11841
11842 * *: Use DECL_ARTIFICIAL (renamed from DECL_SYNTHESIZED).
11843
11844 * lex.c (default_assign_ref_body): Expect TYPE_NESTED_NAME to work.
d11ad92e 11845 (default_copy_constructor_body): Likewise.
700f8a87
MS
11846
11847 * class.c (finish_struct): Don't gratuitously create multiple decls
11848 for nested classes.
11849
d11ad92e 11850Thu Apr 28 23:39:38 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11851
11852 Avoid clobbering the arg types of other functions when reverting
11853 static member functions.
11854 * decl.c (revert_static_member_fn): Rearrange arguments, don't
11855 require values for 'fn' and 'argtypes', add warning to comment
11856 above.
11857 (decls_match): Rearrange arguments in call to rsmf.
11858 (grok_op_properties): Don't pass values for fn and argtypes.
11859 * pt.c (instantiate_template): Don't pass values for fn and argtypes.
11860
d11ad92e 11861Thu Apr 28 16:29:11 1994 Doug Evans <dje@canuck.cygnus.com>
15fa00e9
DE
11862
11863 * Make-lang.in (cc1plus): Depend on stamp-objlist.
11864 * Makefile.in (BC_OBJS): Delete.
700f8a87
MS
11865 (OBJS): Cat ../stamp-objlist to get language independent files.
11866 Include ../c-common.o.
15fa00e9
DE
11867 (../cc1plus): Delete reference to BC_OBJS.
11868
d11ad92e 11869Thu Apr 28 02:12:08 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11870
11871 * search.c (compute_access): No really, deal with static members
11872 properly. Would I lie to you?
11873
11874 Implement lexical hiding of function declarations.
11875 * pt.c (tsubst): Use lookup_name to look for function decls to guide
11876 instantiation.
11877 * method.c (build_opfncall): Use lookup_name_nonclass to look for
11878 non-member functions.
11879 * init.c (do_friend): Use lookup_name_nonclass to look for
11880 functions.
11881 * error.c (ident_fndecl): Use lookup_name to look for functions.
11882 * decl2.c (lookup_name_nonclass): New function, skips over
11883 CLASS_VALUE.
11884 * decl.c (struct binding_level): Lose overloads_shadowed field.
11885 (poplevel): Don't deal with overloads_shadowed.
11886 (push_overloaded_decl): Do lexical hiding for functions.
11887 * class.c (instantiate_type): Don't check non-members if we have
11888 members with the same name.
11889 * call.c (build_method_call): Use lookup_name_nonclass instead of
11890 IDENTIFIER_GLOBAL_VALUE to check for non-member functions.
d11ad92e 11891 (build_overload_call_real): Likewise.
700f8a87
MS
11892
11893 * decl.c (duplicate_decls): Check for ambiguous overloads here.
11894 (push_overloaded_decl): Instead of here.
11895
11896 * decl.c (pushdecl): Back out Chip's last change.
11897
11898 * decl.c (grok_op_properties): operators cannot be static members.
11899
11900 * cp-tree.h (DECL_SYNTHESIZED): DECL_SOURCE_LINE == 0
11901 (SET_DECL_SYNTHESIZED): DECL_SOURCE_LINE = 0
11902 * lex.c (cons_up_default_function): Use SET_DECL_SYNTHESIZED.
11903
11904 * method.c (do_inline_function_hair): Don't put friends of local
11905 classes into global scope, either.
11906
11907 * typeck2.c (build_functional_cast): Don't look for a function call
11908 interpretation.
11909
6060a796 11910Thu Apr 28 15:19:46 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
11911
11912 * cp-tree.h: disable use of backend EH.
11913
d11ad92e 11914Wed Apr 27 21:01:24 1994 Doug Evans <dje@canuck.cygnus.com>
15fa00e9
DE
11915
11916 * Make-lang.in (c++.distdir): mkdir tmp/cp first.
11917 * Makefile.in (INCLUDES): Move definition to same place as
11918 parent makefile.
11919 (ALLOCA): Define.
11920 (OLDAR_FLAGS): Delete.
11921 (OLDCC): Define.
11922 (DIR): Delete.
11923 (CLIB): Define.
11924 (####site): Delete.
11925 (SUBDIR_USE_ALLOCA): Don't use ALLOCA if compiling with gcc.
11926
d11ad92e 11927Wed Apr 27 19:10:04 1994 Kung Hsu <kung@mexican.cygnus.com>
39211cd5
MS
11928
11929 * decl.c (xref_tag): not to use strstr(), it's not available on
11930 all platforms.
11931
d11ad92e 11932Wed Apr 27 18:10:12 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
11933
11934 * class.c (finish_struct): Resolve yet another class/pmf confusion.
11935
11936 * call.c (build_overload_call_real): Don't take the single-function
11937 shortcut if we're dealing with an overloaded operator.
11938
6060a796 11939Wed Apr 27 17:35:37 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
11940
11941 * search.c (get_base_distance): Search the virtual base class
11942 binfos, incase someone wants to convert to a real virtual base
11943 class.
11944 * search.c (expand_indirect_vtbls_init): Use convert_pointer_to_real
11945 instead of convert_pointer_to, as it now will work.
11946
d11ad92e 11947Wed Apr 27 15:36:49 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
11948
11949 * cvt.c (convert_to_reference): Don't complain about casting away
11950 const and volatile.
11951
11952 * typeck.c (build_unary_op): References are too lvalues.
11953
6060a796 11954Wed Apr 27 13:58:05 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
11955
11956 * class.c (override_one_vtable): We have to prepare_fresh_vtable
11957 before we modify it, not after, also, we cannot reuse an old vtable,
11958 once we commit to a new vtable. Implement ambiguous overrides in
11959 virtual bases as abstract. Hack until we make the class
11960 ill-formed.
11961
d11ad92e 11962Wed Apr 27 01:17:08 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
11963
11964 * parse.y (unary_expr): Expand new_placement[opt] and
11965 new_initializer[opt] inline.
11966
11967 * search.c (lookup_fnfields): Don't throw away the inheritance
11968 information here, either.
11969 (compute_access): Handle static members properly.
11970
11971 * init.c (build_member_call): Always set basetype_path, and pass it
11972 to lookup_fnfields.
11973
11974 * search.c (lookup_field): Deal properly with the case where
11975 xbasetype is a chain of binfos; don't throw away the inheritance
11976 information.
11977 (compute_access): protected_ok always starts out at 0.
11978
11979 * init.c (resolve_offset_ref): Don't cast `this' to the base type
11980 until we've got our basetype_path.
11981
11982 * cp-tree.h (IS_OVERLOAD_TYPE): aggregate or enum.
11983
11984 * cvt.c (build_up_reference): Use build_pointer_type rather than
11985 TYPE_POINTER_TO.
11986
11987 * call.c (convert_harshness_ansi): Call type_promotes_to for reals
11988 as well.
11989
11990 * cvt.c (type_promotes_to): Retain const and volatile, add
11991 float->double promotion.
11992
11993 * decl.c (grokdeclarator): Don't bash references to arrays into
11994 references to pointers in function parms. Use type_promotes_to.
11995
6060a796 11996Tue Apr 26 23:44:36 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
11997
11998 Finish off Apr 19th work.
11999
12000 * class.c (finish_struct_bits): Rename has_abstract_virtuals to
12001 might_have_abstract_virtuals.
12002 * class.c (strictly_overrides, override_one_vtable,
12003 merge_overrides): New routines to handle virtual base overrides.
12004 * class.c (finish_struct): Call merge_overrides to handle overrides
12005 in virtual bases.
12006
d11ad92e 12007Tue Apr 26 12:45:53 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
12008
12009 * typeck.c (build_function_call): Call build_function_call_real with
12010 LOOKUP_NORMAL.
12011
12012 * *: Don't deal with TYPE_EXPRs.
12013
12014 * tree.c (lvalue_p): If the type of the expression is a reference,
12015 it's an lvalue.
12016
12017 * cvt.c (convert_to_reference): Complain about passing const
12018 lvalues to non-const references.
12019 (convert_from_reference): Don't arbitrarily throw away const and
12020 volatile on the target type.
12021
12022 * parse.y: Simplify and fix rules for `new'.
12023
12024 * decl.c (grok_op_properties): operator void is illegal.
12025
d11ad92e 12026Mon Apr 25 02:36:28 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
12027
12028 * parse.y (components): Anonymous bitfields can still have declspecs.
12029
12030 * decl.c (pushdecl): Postpone handling of function templates like we
12031 do C functions.
12032
12033 * search.c (expand_indirect_vtbls_init): Fix infinite loop when
12034 convert_pointer_to fails.
12035
12036 * call.c (compute_conversion_costs_ansi): A user-defined conversion
12037 by itself is better than that UDC followed by standard conversions.
12038 Don't treat integers and reals specially.
12039
12040 * cp-tree.h: Declare flag_ansi.
12041
12042 * typeck.c (c_expand_return): pedwarn on return in void function
12043 even if the expression is of type void.
12044 (build_c_cast): Don't do as much checking for casts to void.
12045 (build_modify_expr): pedwarn about array assignment if this code
12046 wasn't generated by the compiler.
12047
12048 * tree.c (lvalue_p): A comma expression is an lvalue if its second
12049 operand is.
12050
12051 * typeck.c (default_conversion): Move code for promoting enums and
12052 ints from here.
12053 * cvt.c (type_promotes_to): To here.
12054 * call.c (convert_harshness_ansi): Use type_promotes_to. Also fix
12055 promotion semantics for reals.
12056
d11ad92e 12057Sun Apr 24 16:52:51 1994 Doug Evans <dje@canuck.cygnus.com>
15fa00e9
DE
12058
12059 * Make-lang.in (c++.install-common): Check for g++-cross.
12060 * Makefile.in: Remove Cygnus cruft.
12061 (config.status): Delete.
12062 (RTL_H): Define.
12063 (TREE_H): Use complete pathname, some native makes have minimal
12064 VPATH support.
12065 (*.o): Use complete pathname to headers in parent dir.
12066 (doc, info, dvi): Delete.
12067
d11ad92e 12068Sun Apr 24 16:52:51 1994 Doug Evans <dje@canuck.cygnus.com>
700f8a87
MS
12069
12070 * Make-lang.in (c++.install-common): Check for g++-cross.
12071 * Makefile.in: Remove Cygnus cruft.
12072 (config.status): Delete.
12073 (RTL_H): Define.
12074 (TREE_H): Use complete pathname, some native makes have minimal
12075 VPATH support.
12076 (*.o): Use complete pathname to headers in parent dir.
12077 (doc, info, dvi): Delete.
12078
d11ad92e 12079Sun Apr 24 00:47:49 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
12080
12081 * decl.c (pushdecl): Avoid redundant warning on redeclaring function
12082 with different return type.
12083 (decls_match): Compare return types strictly.
12084
d11ad92e 12085Fri Apr 22 12:55:42 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
12086
12087 * cvt.c (build_type_conversion): Do try to convert through other
12088 pointers. This will fail if the class defines multiple pointer
12089 conversions.
12090
12091 * error.c (dump_type_prefix): Print out pointers to arrays properly.
d11ad92e 12092 (dump_type_suffix): Likewise. (was 'int *[]', now 'int (*)[]')
39211cd5
MS
12093
12094 * typeck.c (build_unary_op): Disallow ++/-- on pointers to
12095 incomplete type.
12096
12097 * decl.c (duplicate_decls): Check mismatched TREE_CODES after
12098 checking for shadowing a builtin. If we're redeclaring a builtin
12099 function, bash the old decl to avoid an ambiguous overload.
12100
12101 * cvt.c (convert_to_reference): Don't force arrays to decay here.
12102
12103 * tree.c (lvalue_p): A MODIFY_EXPR is an lvalue.
12104
12105 * decl.c (duplicate_decls): Don't assume that the decls will have
12106 types.
12107
d11ad92e 12108 Mon Apr 18 11:35:32 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
12109
12110 [ cp/* changes propagated from c-* changes in 940318 snapshot ]
12111 * c-decl.c (pushdecl): Warn if type mismatch with another external decl
12112 in a global scope.
12113
d11ad92e 12114 Fri Apr 22 06:38:56 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
12115
12116 * cp/typeck2.c (signature_error): Use cp_error for "%T".
12117
d11ad92e 12118 Mon Apr 18 11:59:59 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
12119
12120 [ cp/* changes propagated from c-* changes in 940415 snapshot ]
12121 * cp/decl.c (duplicate_decls, pushdecl, builtin_function):
12122 Use DECL_FUNCTION_CODE instead of DECL_SET_FUNCTION_CODE.
12123
d11ad92e 12124 Mon Apr 18 11:55:18 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
12125
12126 [ cp/* changes propagated from c-* changes in 940409 snapshot ]
12127 * cp/decl.c (duplicate_decls): Put new type in same obstack as
12128 old ones, or permanent if old ones in different obstacks.
12129
d11ad92e 12130 Mon Apr 18 11:48:49 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
12131
12132 [ cp/* changes propagated from c-* changes in 940401 snapshot ]
12133 * cp/parse.y (attrib): Handle string args as expressions,
12134 merging the two rules. `mode' attribute now takes a string arg.
12135 Delete the rule for an identifier as arg.
12136
d11ad92e 12137 Mon Apr 18 11:24:00 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
12138
12139 [ cp/* changes propagated from c-* changes in 940312 snapshot ]
12140 * cp/typeck.c (pointer_int_sum): Multiplication should be done signed.
12141 (pointer_diff): Likewise the division.
12142
d11ad92e 12143 Sun Mar 6 19:43:39 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
12144
12145 [ cp/* changes propagated from c-* changes in 940304 snapshot ]
12146 * cp/decl.c (finish_decl): Issue warning for large objects,
12147 if requested.
12148
d11ad92e 12149 Sat Feb 19 22:20:32 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
12150
12151 [ cp/* changes propagated from c-* changes in 940218 snapshot ]
12152 * cp/parse.y (attrib): Handle attribute ((section ("string"))).
12153 * cp/decl.c (duplicate_decls): Merge section name into new decl.
12154
d11ad92e 12155 Tue Feb 8 09:49:17 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
12156
12157 [ cp/* changes propagated from c-* changes in 940206 snapshot ]
12158 * cp/typeck.c (signed_or_unsigned_type): Check for any
63718c49 12159 INTEGRAL_TYPE_P not just INTEGER_TYPE.
39211cd5
MS
12160
12161 Mon Dec 6 13:35:31 1993 Norbert Kiesel (norbert@i3.INformatik.rwth-aachen.DE)
12162
12163 * cp/decl.c (finish_enum): Start from 0 when determining precision
12164 for short enums.
12165
12166 Fri Dec 3 17:07:58 1993 Ralph Campbell (ralphc@pyramid.COM)
12167
12168 * cp/parse.y (unary_expr): Look at $1 for tree_code rather than
12169 casting $$.
12170
d11ad92e 12171 Wed Nov 17 19:22:09 1993 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
12172
12173 * cp/typeck.c (build_binary_op_nodefault): Propagate code
12174 from C front-end to optimize unsigned short division.
12175 (build_conditional_expr): Fix bug in "1 ? 42 : (void *) 8".
12176
d11ad92e 12177 Wed Nov 17 19:17:18 1993 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
12178
12179 * cp/call.c (convert_harshness_ansi): Given an (e.g.) char
12180 constant, prefer 'const char &' to 'int'.
12181
d11ad92e 12182 Wed Feb 3 13:11:48 1993 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
12183
12184 * cp/class.c (finish_struct_methods): Handle multiple
12185 constructors in fn_fields list.
12186
d11ad92e 12187Fri Apr 22 12:48:10 1994 Kung Hsu <kung@mexican.cygnus.com>
39211cd5
MS
12188
12189 * class.c (finish_struct): use TYPE_DECL_SUPPRESS_DEBUG to flag
12190 types not to be dumped in stabs, like types in #pragma interface.
12191 * decl.c (init_decl_processing): use TYPE_DECL_SUPPRESS_DEBUG to
12192 mark unknown type.
12193
d11ad92e 12194Fri Apr 22 03:27:26 1994 Doug Evans <dje@cygnus.com>
15fa00e9
DE
12195
12196 * Language directory reorganization.
12197 See parent makefile.
12198
d11ad92e 12199Thu Apr 21 18:27:57 1994 Per Bothner <bothner@kalessin.cygnus.com>
39211cd5
MS
12200
12201 * cp-tree.h (THUNK_DELTA): It is normally negative, so
12202 use signed .i variant of frame_size rather than unsigned .u.
12203 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
12204 use "VT" rather than "vt" due to binary incompatibility.
12205 * class.c (get_vtable_name): Use strlen of VTABLE_NAME_FORMAT,
12206 rather than sizeof, since it is now an expression.
12207 * class.c (modify_one_vtable): Modify to skip initial element
12208 containing a count of the vtable.
12209
d11ad92e 12210Thu Apr 21 00:09:02 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12211
12212 * lex.c (check_newline): Force interface_unknown on main input file.
12213
12214 * pt.c (do_pending_expansions): Always emit functions that have been
12215 explicitly instantiated.
12216 (do_function_instantiation): Set DECL_EXPLICITLY_INSTANTIATED.
12217 (do_type_instantiation): Set CLASSTYPE_VTABLE_NEEDS_WRITING and
12218 DECL_EXPLICITLY_INSTANTIATED on all my methods.
12219 * parse.y (explicit_instantiation): Call do_type_instantiation for
12220 types.
12221 * decl2.c (finish_vtable_vardecl): Call import_export_vtable.
12222 * decl.c (start_function): Don't set DECL_EXTERNAL on a function
12223 that has been explicitly instantiated.
12224 * cp-tree.h (DECL_EXPLICITLY_INSTANTIATED): Alias for
12225 DECL_LANG_FLAG_4.
12226 * class.c: Move import_export_vtable to decl2.c, and comment out all
12227 uses.
12228
d11ad92e 12229Wed Apr 20 16:51:06 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12230
12231 * lex.c (process_next_inline): Don't muck with DECL_INLINE.
d11ad92e 12232 (do_pending_inlines): Likewise.
7177d104 12233
6060a796 12234Tue Apr 19 22:25:41 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12235
12236 Reimplement vtable building, and most vtable pointer setting.
12237 Allows for earier maintenance, easier understandability, and most
12238 importantly, correct semantics.
12239
12240 * class.c (build_vtable): Removed unneeded
12241 SET_BINFO_VTABLE_PATH_MARKED.
d11ad92e 12242 * class.c (prepare_fresh_vtable): Likewise. Added argument.
7177d104
MS
12243 * class.c (modify_vtable_entry): General cleanup.
12244 * class.c (related_vslot, is_normal, modify_other_vtable_entries,
12245 modify_vtable_entries): Removed.
12246 * class.c (add_virtual_function): General cleanup.
12247 * class.c (finish_base_struct): Setup BINFO_VTABLE and
12248 BINFO_VIRTUALS as early as we can, so that modify_all_vtables can
12249 work.
12250 * class.c (finish_vtbls): New routine, mostly from
12251 unmark_finished_struct.
12252 * class.c (overrides): New routine.
12253 * class.c (modify_one_vtable): New routine, mostly from
12254 modify_other_vtable_entries and modify_vtable_entries.
12255 * class.c (modify_all_direct_vtables, modify_all_indirect_vtables,
12256 modify_all_vtables): New routines.
12257 * class.c (finish_struct): Added arguemnt to prepare_fresh_vtable
12258 call. General cleanup on how pending_hard_virtuals are handled.
12259 General cleanup on modifying vtables. Use finish_vtbls, instead of
12260 unmark_finished_struct.
12261 * cp-tree.h (init_vtbl_ptrs, expand_direct_vtbls_init,
12262 get_first_matching_virtual, get_matching_virtual,
12263 expand_vbase_vtables_init, expand_indirect_vtbls_init): Update.
12264 * cvt.c (convert_pointer_to_real): cleanup error message.
12265 * decl.c (grokfndecl): General cleanup.
12266 * decl.c (finish_function): Change init_vtbl_ptrs call to
12267 expand_direct_vtbls_init. Change expand_vbase_vtables_init call to
12268 expand_indirect_vtbls_init.
12269 * init.c (expand_virtual_init): Remove unneeded argument.
12270 * init.c (init_vtbl_ptrs): Rename to expand_direct_vtbls_init, added
12271 two arguments to make more general. Made more general. Now can be
12272 used for vtable pointer initialization from virtual bases.
12273 * init.c (emit_base_init): Change expand_vbase_vtables_init call to
12274 expand_indirect_vtbls_init. Change init_vtbl_ptrs call to
12275 expand_direct_vtbls_init.
12276 * init.c (expand_virtual_init): General cleanup.
12277 * init.c (expand_default_init): Change expand_vbase_vtables_init
12278 call to expand_indirect_vtbls_init.
12279 * init.c (expand_recursive_init_1): Change expand_vbase_vtables_init
12280 call to expand_indirect_vtbls_init.
12281 * init.c (expand_recursive_init): Change expand_vbase_vtables_init
12282 call to expand_indirect_vtbls_init.
12283 * search.c (get_first_matching_virtual): Rename to
12284 get_matching_virtual. General cleanup and remove setting of
12285 DECL_CONTEXT. That is now done in a cleaner way in
12286 modify_vtable_entry and add_virtual_function.
12287 * search.c (expand_vbase_vtables_init): Rename to
12288 expand_indirect_vtbls_init. General cleanup. Use
12289 expand_direct_vtbls_init to do hard work. Ensures that _all_ vtable
12290 pointers from virtual bases are set up.
12291 * search.c (bfs_unmark_finished_struct, unmark_finished_struct):
12292 Removed.
12293
12294 * *.[chy]: Remove support for VTABLE_USES_MASK.
12295
d11ad92e 12296Tue Apr 19 12:51:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12297
12298 * cvt.c (convert_to_reference): Use NOP_EXPRs to switch between
12299 reference and pointer types instead of bashing the types directly.
12300
12301 * call.c (build_overload_call_real): Use the TREE_CODE to determine
12302 whether the function is overloaded or not, rather than
12303 TREE_OVERLOADED.
12304 * *: Remove all uses of TREE_OVERLOADED.
12305
12306 * decl.c (grokdeclarator): Only complain about initializing const
12307 fields when -ansi or -pedantic.
12308
d11ad92e 12309Tue Apr 19 12:42:42 1994 Doug Evans <dje@canuck.cygnus.com>
7177d104
MS
12310
12311 * cp-tree.h (THUNK_DELTA): frame_size is now a union.
12312
d11ad92e 12313Mon Apr 18 00:17:13 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12314
12315 Do overloading on a block-by-block basis, not function-by-function.
12316 * decl.c: Lose overloads_to_forget.
12317 (struct binding_level): Add overloads_shadowed field.
12318 (poplevel): Restore overloads_shadowed.
12319 (push_overloaded_decl): Use overloads_shadowed instead of
12320 overloads_to_forget.
12321 (finish_function): Don't look at overloads_to_forget.
12322
12323 Copy enum_overflow logic from c-decl.c.
12324 * decl.c (start_enum): Initialize enum_overflow.
12325 (build_enumerator): Use enum_overflow. Also use current_scope().
12326
12327 * search.c (current_scope): Move Brendan's comment from
12328 build_enumerator here.
12329
12330 * typeck.c (convert_for_assignment): Change warnings to pedwarns for
12331 discarding const/volatile.
12332
d11ad92e 12333Sat Apr 16 01:18:21 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12334
12335 * typeck.c (comp_target_parms): Accept TEMPLATE_TYPE_PARMs on the rhs.
d11ad92e 12336 (comp_target_types): Likewise.
7177d104
MS
12337
12338 * decl.c (lookup_name): Don't unset got_scope here.
12339
12340 * spew.c (yylex): Only replace yylval with the TYPE_NESTED_NAME if
12341 got_scope != NULL_TREE.
12342
d11ad92e 12343Fri Apr 15 16:36:33 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12344
12345 Horrible kludge to prevent templates from being instantiated by
12346 their base classes.
12347 * parse.y (template_instantiate_once): Unset TYPE_BEING_DEFINED
12348 before we get to left_curly.
12349 * pt.c (instantiate_class_template): Set TYPE_BEING_DEFINED.
12350
12351 * error.c (dump_decl): If it's a typedef, print out the name of the
12352 decl, not just the underlying type.
12353
12354 * decl.c (pushdecl): If the old duplicate decl was a TYPE_DECL,
12355 update the IDENTIFIER_TYPE_VALUE of its name.
12356
12357 * decl2.c (finish_file): When processing the initializer for a
12358 static member, pretend that the dummy function is a member of the
12359 same class.
12360
d11ad92e 12361Fri Apr 15 15:56:35 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104 12362
63718c49
GB
12363 * class.c (build_vtable_entry): revert Apr 4 change.
12364 * decl2.c (mark_vtable_entries): replace pure virtual function
12365 decl with abort's.
7177d104 12366
d11ad92e 12367Fri Apr 15 13:49:33 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12368
12369 * typeck.c (build_conditional_expr): Pedwarn on pointer/integer
12370 mismatch, and don't pedwarn on 0/function pointer mismatch.
12371
12372 * typeck2.c (digest_init): Lose code for special handling of unions.
12373 (process_init_constructor): Since they're handled just fine here.
12374 Pedwarn on excess elements.
12375
12376 * decl2.c (grokfield): Complain about local class method declaration
12377 without definition.
12378
d11ad92e 12379Fri Apr 15 13:19:40 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12380
12381 * method.c (emit_thunk): Add extern declaration for
12382 current_call_is_indirect (needed for hppa).
12383
d11ad92e 12384Thu Apr 14 16:12:31 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12385
12386 Improve local class support; allow classes in different blocks to
12387 have the same name.
12388 * decl.c (pushtag): Support local classes better.
12389 (pushdecl_nonclass_level): New function for pushing mangled decls of
12390 nested types into the appropriate scope.
12391 (xref_defn_tag): Use pushdecl_nonclass_level instead of
12392 pushdecl_top_level.
12393 (grokfndecl): Don't mess with IDENTIFIER_GLOBAL_VALUE for local
12394 class methods.
d11ad92e 12395 * method.c (do_inline_function_hair): Likewise.
7177d104
MS
12396
12397 * class.c (finish_struct): It is legal for a class with no
12398 constructors to have nonstatic const and reference members.
12399
d11ad92e 12400Thu Apr 14 07:15:11 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
12401
12402 * decl.c (push_overloaded_decl): Avoid giving errors about
12403 built-ins, since duplicate_decls will have given warnings/errors
12404 for them.
12405
d11ad92e 12406Thu Apr 14 03:45:12 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12407
12408 * cvt.c (convert_to_reference): Warn about casting pointer type to
12409 reference type when this is probably not what they wanted.
12410
d11ad92e 12411Wed Apr 13 13:12:35 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12412
12413 * decl.c (finish_decl): Don't mindlessly set TREE_USED for
12414 static consts any more (toplev.c has now been modified to
12415 not emit warnings if they are unused).
12416
d11ad92e 12417Wed Apr 13 00:22:35 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12418
12419 * decl.c (grok_op_properties): If op new/delete get here with
12420 METHOD_TYPEs, do a revert_static_member_fn.
12421
12422 * cp-tree.h (IDENTIFIER_CLASS_TYPE_VALUE): Lose.
12423 * init.c (is_aggr_typedef): Don't look at
12424 IDENTIFIER_CLASS_TYPE_VALUE.
d11ad92e
MS
12425 (get_aggr_from_typedef): Likewise.
12426 (get_type_value): Likewise.
7177d104
MS
12427 * call.c (build_scoped_method_call): Don't rely on overloaded
12428 template names having IDENTIFIER_CLASS_VALUE set.
12429
12430 * parse.y (component_decl_1, fn.def2): Revert rules for
12431 constructors.
12432 (component_decl_1, fn.def2): Use $1 instead of $$, since $$ is being
12433 clobbered.
12434
12435 * decl.c (start_function): Only warn about `void main()' if pedantic
12436 || warn_return_type.
12437
d11ad92e 12438Tue Apr 12 02:14:17 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12439
12440 Clean up overloading of the template name.
12441 * class.c (pushclass): overload the template name whenever pushing
12442 into the scope of a template class, not just if it is
12443 uninstantiated.
12444 (popclass): Correspondingly.
12445 * search.c (push_class_decls): Don't overload_template_name.
12446 * pt.c (overload_template_name): Don't set IDENTIFIER_LOCAL_VALUE or
12447 DECL_CONTEXT on things.
12448 * parse.y (left_curly): Don't overload_template_name.
12449 * class.c (finish_struct): Don't undo_template_name_overload.
12450
12451 * method.c (build_opfncall): Only pass one argument to global op
12452 delete.
12453
12454 * call.c (build_method_call): Use TYPE_VEC_DELETE_TAKES_SIZE to
12455 decide how many arguments to use for vec delete.
12456
12457 * decl.c (grok_op_properties): Be consistent in modifying
12458 current_class_type.
12459 (grokdeclarator): Only complain about function decls with no return
12460 type if we're being pedantic.
12461
d11ad92e 12462Mon Apr 11 00:10:53 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12463
12464 Add support for operator new [] and operator delete [].
12465
12466 * tree.def: Add VEC_NEW_EXPR and VEC_DELETE_EXPR.
12467 * ptree.c (print_lang_type): Indicate vec new/delete.
12468 * parse.y: Support vec new/delete.
12469 * method.c (build_decl_overload): Deal with vec new/delete.
d11ad92e 12470 (build_opfncall): Likewise.
7177d104
MS
12471 * lex.c (init_lex): Set up values of ansi_opname and opname_tab for
12472 vec new/delete. vec new uses "__vn", and vec delete uses "__vd".
12473 * init.c (init_init_processing): Set up BIVN and BIVD.
12474 (do_friend): Don't clean up after mistaken setting of TREE_GETS_NEW,
12475 since it doesn't happen any more.
12476 (build_new): Support vec new. Always call something.
12477 (build_x_delete): Support vec delete.
12478 (build_vec_delete): Lose dtor_dummy argument, add use_global_delete,
12479 and pass it to build_x_delete.
12480 * decl2.c (delete_sanity): Don't change behavior by whether or not
12481 the type has a destructor. Pass use_global_delete to
12482 build_vec_delete.
12483 (coerce_delete_type): Make sure that the type returned has a first
12484 argument of ptr_type_node.
12485 * decl.c (init_decl_processing): Also declare the global vec
12486 new/delete.
12487 (grokdeclarator): Also force vec new/delete to be static.
12488 (grok_op_properties): Note presence of vec new/delete, and play with
12489 their args. If vec delete takes the optional size_t argument, set
12490 TYPE_VEC_DELETE_TAKES_SIZE.
12491 * cp-tree.h (TYPE_GETS_{REG,VEC}_DELETE): New macros to simplify
12492 checking for one delete or the other.
12493 (lang_type): gets_new and gets_delete are now two bits long. The
12494 low bit is for the non-array version. Lose gets_placed_new.
12495 (TYPE_VEC_DELETE_TAKES_SIZE): New macro indicating that the vec
12496 delete defined by this class wants to know how much space it is
12497 deleting.
12498 (TYPE_VEC_NEW_USES_COOKIE): New macro to indicate when vec new must
12499 add a header containing the number of elements in the vector; i.e.
12500 when the elements need to be destroyed or vec delete wants to know
12501 the size.
12502 * class.c (finish_struct_methods): Also check for overloading vec
12503 delete.
12504 * call.c (build_method_call): Also delete second argument for vec
12505 delete.
12506
12507 * decl.c (grokdeclarator): Correct complaints again.
12508 (grokdeclarator): Fix segfault on null declarator.
12509 (decls_match): Also accept redeclaration with no arguments if both
12510 declarations were in C context. Bash TREE_TYPE (newdecl) here.
12511 (duplicate_decls): Instead of here.
12512
12513 * parse.y (nested_name_specifier_1): Lose rules for dealing with
12514 syntax errors nicely, since they break parsing of 'const i;'.
12515
12516 * decl.c (lookup_name): if (got_scope == current_class_type)
12517 val = IDENTIFIER_CLASS_VALUE (name).
12518
12519 * search.c (lookup_nested_tag): Look in enclosing classes, too.
12520
12521 * spew.c (yylex): Only look one character ahead when checking for a
12522 SCOPE.
12523
12524 * lex.c (check_newline): Read first nonwhite char before
12525 incrementing lineno.
12526
12527 * decl.c (grokdeclarator): Don't claim that typedefs are variables
12528 in warning.
12529
12530 * parse.y: Divide up uses of unqualified_id into
12531 notype_unqualified_id and unqualified_id, so that TYPENAME can be
12532 used as an identifier after an object.
12533
12534 * class.c (push_nested_class): Don't push into non-class scope.
12535
12536 * decl.c (grokdeclarator): If an identifier could be a type
12537 conversion operator, but has no associated type, it's not a type
12538 conversion operator.
12539
12540 * pt.c (unify): Check for equality of constants better.
12541
12542 * decl.c (grokdeclarator): Don't complain about access decls.
12543
d11ad92e 12544Sun Apr 10 02:39:55 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12545
12546 * decl.c (grokdeclarator): pedwarn about data definitions without
12547 types here.
12548
12549 * parse.y (datadef): Don't pedwarn about decls without types here,
12550 since that is valid for functions.
12551 (fn.def2, component_decl): Support constructors with declmods again.
12552 (nomods_initdecls): For decls without any mods, so that we don't try
12553 to get declspecs from some arbitrary $0.
12554
12555 * search.c (lookup_field): Use cp_error.
12556
12557 * parse.y (nested_name_specifier_1): Don't check aggr/non-aggr type
12558 here; it breaks destructors for non-aggr types.
12559
12560 * decl.c (lookup_name): Only look for TYPE_DECLs in base classes of
12561 a type being defined, like the comment says.
12562 If got_scope is not an aggregate, just return NULL_TREE.
12563
12564 * pt.c (create_nested_upt): Kung's code for creating types nested
12565 within uninstantiated templates now lives here (it used to live in
12566 hack_more_ids). It needs to be expanded.
12567
12568 * parse.y: Stop calling see_typename so much.
12569
12570 * decl.c (lookup_name): Deal with TTPs and UPTs.
12571
12572 * lex.c (real_yylex): Don't set looking_for_typename just because we
12573 saw a 'new'.
12574 (dont_see_typename): #if 0 out.
12575
12576 * spew.c (yylex): Increment looking_for_typename if the next
12577 character is SCOPE, rather than setting it to 1; this way, the value
12578 from seeing an aggr specifier will not be lost. This kinda relies
12579 on looking_for_typename never being < 0, which is now true.
12580
12581 * parse.y (nested_name_specifier_1): Accept TEMPLATE_TYPE_PARMs,
12582 too.
12583 (named_class_head_sans_basetype): Accept template types, too. Oops.
12584
d11ad92e 12585Fri Apr 8 16:39:35 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12586
12587 * decl2.c (reparse_decl_as_expr1): Handle SCOPE_REFs.
12588
12589 * parse.y: Lose START_DECLARATOR.
12590
12591 * search.c (lookup_nested_tag): New function to scan CLASSTYPE_TAGS
12592 for a class.
12593
12594 * parse.y: Simplify fn.def2 and component_decl. Support 'enum
12595 A::foo' syntax. Catch invalid scopes better.
12596
12597 * parse.y, lex.c: lose TYPENAME_COLON.
12598
12599 * decl2.c (groktypefield): #if 0 out.
12600
12601 * decl.c (lookup_name): If the type denoted by got_scope is
12602 currently being defined, look in CLASSTYPE_TAGS rather than FIELDS.
12603
12604 * class.c (push_nested_class): Don't try to push into
12605 error_mark_node.
12606
d11ad92e 12607Fri Apr 8 07:26:36 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
12608
12609 * Makefile.in (stamp-parse): Update count of conflicts to 33.
12610
d11ad92e 12611Thu Apr 7 17:47:53 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12612
12613 A saner implementation of nested types that treats template types
12614 no differently from non-template types. There are still some
12615 shortcomings of our system; most notably, it is difficult to look
12616 for a nested type that is hidden by another name, because of the way
12617 we keep track of hidden types. But this shouldn't be a problem for
12618 just about anyone. Perhaps lookup_field should be fixed up a bit.
12619
12620 * spew.c: Moved handling of nested types/scoping from the lexer
12621 into the parser. Removed variable template_type_seen_before_scope.
12622 Removed functions frob_identifier, hack_more_ids, and various cruft
12623 that was #if 0'd out in the past, reducing the size of the file from
12624 1146 lines to 450 lines. We can't quite do away with spew.c yet,
12625 though; we still need it for do_aggr () and checking for SCOPE after
12626 the current identifier. And setting lastiddecl.
12627
12628 * parse.y: Moved handling of nested types/scoping from the lexer
12629 into the parser, using a new global variable `got_scope'. Reduced
12630 the number of states by 53. Implemented all uses of explicit global
12631 scope. Removed terminals SCOPED_TYPENAME and SCOPED_NAME. Removed
12632 nonterminals tmpl.1, scoped_base_class, id_scope, typename_scope,
12633 scoped_typename. Added nonterminals nested_type,
12634 qualified_type_name, complete_type_name, qualified_id, ptr_to_mem,
12635 nested_name_specifier, global_scope, overqualified_id, type_name.
12636 Changed many others. Added 9 new reduce/reduce conflicts, which are
12637 nested type parallels of 9 that were already in the grammar for
12638 non-nested types. Eight of the now 33 conflicts should be removed
12639 in the process of resolving the late binding between variable and
12640 function decls.
12641
12642 * gxxint.texi (Parser): Update.
12643
12644 * cp-tree.h (IS_AGGR_TYPE_CODE): Add UNINSTANTIATED_P_TYPE.
12645
12646 * lex.h: Add decl for got_scope.
12647
12648 * lex.c (see_typename): Claim to be the lexer when calling
12649 lookup_name.
12650
12651 * decl.c (lookup_name): When called from the lexer, look at
12652 got_scope and looking_at_typename; otherwise don't.
12653
6060a796 12654Thu Apr 7 22:05:47 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12655
12656 31th Cygnus<->FSF merge.
12657
d11ad92e 12658Thu Apr 7 17:47:53 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12659
12660 * decl2.c (mark_vtable_entries): Call this to mark all the
12661 entries in the vtable addressable.
12662 (finish_decl_parsing): Handle SCOPE_REFs.
12663
12664 * decl.c (decls_match): Always call compparms with strict == 1.
12665 Handle the special case of C function redecl here.
12666 (duplicate_decls): Only keep the old type if the new decl takes no
12667 arguments.
12668
12669 * typeck.c (compparms): Also allow t1 to be ... if strict == 0.
12670
6060a796 12671Thu Apr 7 16:17:50 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12672
12673 * class.c (build_vtable_entry): Fix breakage introduced Apr 5
12674 17:48:41.
12675
d11ad92e 12676Wed Apr 6 16:05:10 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12677
12678 * init.c (build_virtual_init), search.c (build_vbase_vtables_init),
12679 ch-tree.h: Every place these functions were called, the result was
12680 immediately passed to expand_expr_stmt. Reduce redundancy by
12681 calling expand_expr_init *inside* these functions. These
12682 makes for a simpler interface, and we don't have to build
12683 compound expressions. Hence, rename these function to:
12684 expand_virtual_init and expand_vbase_vtables_init respectively.
12685 * init.c, decl.c: Change callers of these functions.
12686 * init.c, cp-tree.h (expand_virtual_init): Make static.
12687
12688 * decl2.c (finish_file): Check TREE_PUBLIC||TREE_ADDRESSABLE
12689 rather than DECL_SAVED_INSNS before emitting inlines.
12690
d11ad92e 12691Wed Apr 6 13:06:39 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12692
12693 * spew.c (init_spew): #if 0 out stuff used by arbitrate_lookup.
12694
12695 * decl.c (duplicate_decls): If this is a new declaration of an
12696 extern "C" function, keep the type (for the argtypes).
12697 (redeclaration_error_message): Don't check DECL_LANGUAGE here.
12698 (decls_match): Call compparms with a value of strict dependent on
12699 the value of strict_prototypes for DECL_LANGUAGE (oldecl).
12700
12701 * typeck.c (compparms): ... is only equivalent to non-promoting
12702 parms if we're not being strict.
12703
12704 * parse.y (empty_parms): Don't check flag_ansi || pedantic here.
12705
12706 * decl.c (init_decl_processing): if (flag_ansi || pedantic)
12707 strict_prototypes_lang_c = strict_prototypes_lang_cplusplus;
12708
12709 * decl2.c (grok_function_init): Don't set DECL_INITIAL on pure
12710 virtuals.
12711
d11ad92e 12712Tue Apr 5 17:48:41 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12713
12714 Support for implementing vtables with thunks.
12715 * tree.def (THUNK_DECL): New TREE_CODE.
12716 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY), tree.c
12717 (fnaddr_from_vtable_entry): Handle flag_vtable_thunks case.
12718 * cp-tree.h (memptr_type): New variable.
12719 * class.c (build_vtable_entry): Build thunk if necessary.
12720 * class.c (build_vfn_ref): If using thunks, don't need
12721 to add delta field from vtable (there is none!).
12722 * decl.c: Add memptr_type as well as vtable_entry_type.
12723 If using thunks, the latter is just ptr_type_node.
12724 * gc.c, typeck.c: Use memptr_typeChange, not vtable_entry_type.
12725 * decl2.c (finish_vtable_vardecl): Handle thunks.
12726 * expr.c (cplus_expand_expr): Support THUNK_DECL.
12727
12728 * decl.c (grokdeclarator): Set DECL_THIS_EXTERN if "extern".
12729 * decl.c (start_function): Set current_extern_inline based on
12730 DECL_THIS_EXTERN, not TREE_PUBLIC.
12731 * decl.c (finish_function): Call mark_inline_for_output if needed,
12732
12733 Improve intelligence about when to emit inlines.
12734 * cp-tree.h (lang_decl_flags): New field saved_inline.
12735 * cp-tree.h (DECL_SAVED_INLINE): New macro.
12736 * class.c (add_virtual_function): Don't set TREE_ADDRESSABLE.
12737 * decl.h, decl.c (pending_addressable_inlines): Removed.
12738 * decl2.c (pending_addressable_inlines): Renamed to saved_inlines.
12739 * decl2.c (mark_inline_for_output): Do nothing if
12740 DECL_SAVED_INLINE; otherwise set it (and add to saved_inlines list).
12741 * decl2.c (finish_vtable_vardecl): SET_CLASSTYPE_INTERFACE_KNOWN
12742 and set CLASSTYPE_INTERFACE_ONLY if there is a non-inline virtual.
12743 * decl2.c (finish_file): Writing out inlines later, so we can
12744 also handle the ones needed for vtbales.
12745 * decl2.c (write_vtable_entries, finish_vtable_typedecl): Removed.
12746
12747 * cp-tree.h, class.c, decl2.c, search.c: Remove -fvtable-hack
37c46b43 12748 and flag_vtable_hack. Use -fvtable-thunks and flag_vtable_thunks
7177d104
MS
12749 instead. (The rationale is that these optimizations both break binary
12750 compatibility, but should become the default in a future release.)
12751
6060a796 12752Wed Apr 6 10:53:56 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12753
12754 * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT
12755 of a fndecl, as we might not be from that vfield.
12756
d11ad92e 12757Tue Apr 5 17:43:35 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12758
12759 * class.c (add_virtual_function): fix bug for pure virtual, so
12760 that DECL_VINDEX of the dummy decl copied won't be error.
12761 (see also Apr 4 change)
12762
d11ad92e 12763Tue Apr 5 17:23:45 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12764
12765 * typeck.c (c_expand_return): Before checking that we're not
12766 returning the address of a local, make sure it's a VAR_DECL.
12767 (And don't worry about it being a TREE_LIST.)
12768
d11ad92e 12769Tue Apr 5 13:26:42 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12770
12771 * parse.y (YYDEBUG): Always define.
d11ad92e 12772 * lex.c (YYDEBUG): Likewise.
7177d104 12773
d11ad92e 12774Mon Apr 4 11:28:17 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12775
12776 * class.c (finish_struct): backup out the change below, put the
12777 new change for the same purpose. The change below breaks code.
12778
12779 * class.c (finish_struct): if pure virtual, copy node and make
12780 RTL point to abort, then put in virtual table.
12781 * decl2.c (grok_function_iit): reinstate Mar 31 change.
12782
d11ad92e 12783Sat Apr 2 03:12:58 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12784
12785 * init.c (build_new): pedwarn about newing const and volatile
12786 types.
12787
12788 * tree.c (get_identifier_list): Only do the special handling
12789 thing if we're dealing with the main variant of the record type.
12790
12791 * cvt.c (convert_to_reference): When converting between
12792 compatible reference types, use the pointer conversion machinery.
12793 Don't just blindly overwrite the old type.
12794
d11ad92e 12795Fri Apr 1 17:14:42 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12796
12797 * call.c (build_method_call): When looking at global functions,
12798 be sure to use instance_ptr for the first argument, not some version
12799 of it that has been cast to a base class. Also do this before
12800 comparing candidates.
12801
d11ad92e 12802Thu Mar 31 19:50:35 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12803
12804 * call.c (build_method_call): Constructors can be called for
12805 const objects.
12806
d11ad92e 12807Thu Mar 31 16:20:16 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12808
12809 * decl2.c (grok_func_init): do not abort as rtl for pur virtual
12810 fucntions. They can be defined somewhere else.
12811
12812Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
12813
12814 * decl.c (init_decl_processing): Declare __builtin_return_address
12815 and __builtin_frame_address for C++ as well.
12816
6060a796 12817Thu Mar 31 12:35:49 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12818
12819 * typeck2.c (store_init_value): Integral constant variables are
12820 always constant, even when doing -fpic.
12821
12822Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
12823
12824 * decl.c (redeclaration_error_message): Pass the types to
12825 comptypes.
12826
6060a796 12827Wed Mar 30 21:29:25 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12828
12829 Cures incorrect errors about pure virtuals in a class, when they
12830 have been overridden in a derived class.
12831
12832 * search.c (get_abstract_virtuals): Reimplement.
12833 * search.c (get_abstract_virtuals_1): New routine.
12834
d11ad92e 12835Wed Mar 30 14:10:04 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12836
12837 * pt.c (push_template_decls): Make the pushed level pseudo
12838 global.
12839
12840 * parse.y (extdefs): Don't pop everything if the current binding
12841 level is pseudo_global.
12842
12843 * decl.c (pop_everything): Stop on reaching a pseudo-global
12844 binding level.
12845
12846 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Change to more reliable test.
12847
12848 * decl.c (duplicate_decls): Only copy DECL_SOURCE_{FILE_LINE} if
12849 the old decl actually had an initializer.
12850
12851 * {various}: Clean up gcc -W complaints.
12852
12853 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Currently defined to be
12854 (DECL_CONTEXT (NODE) != NULL_TREE).
12855
12856 * parse.y (lang_extdef): Call pop_everything if necessary.
12857
12858 * decl.c (pop_everything): New function for popping binding
12859 levels left over after a syntax error.
12860 (pushdecl): Use DECL_FUNCTION_MEMBER_P to decide whether or not
12861 a function is a member.
12862
6060a796 12863Wed Mar 30 14:20:50 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12864
12865 Cures calling a more base base class function, when a more derived
12866 base class member should be called in some MI situations.
12867
12868 * search.c (make_binfo): Use more the more specialized base
63718c49
GB
12869 binfos from the binfo given as the second argument to make_binfo,
12870 instead of the unspecialized ones from the TYPE_BINFO.
d11ad92e
MS
12871 * class.c (finish_base_struct): Likewise, update callers.
12872 * search.c (dfs_get_vbase_types): Likewise.
12873 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Likewise.
7177d104 12874 * decl.c (xref_tag): Use NULL_TREE instead of 0.
d11ad92e 12875 * lex.c (make_lang_type): Likewise.
7177d104 12876
d11ad92e 12877Wed Mar 30 14:10:04 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12878
12879 * decl.c (pushdecl): If pushing a C-linkage function, only do a
12880 push_overloaded_decl.
12881 (duplicate_decls): Standard overloading does not shadow built-ins.
12882
d11ad92e 12883Tue Mar 29 00:54:18 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12884
12885 * pt.c (end_template_decl): Don't call push_overloaded_decl.
12886
12887 * init.c (do_friend): Don't call push_overloaded_decl.
12888
12889 * decl.c (pushdecl): Call push_overloaded_decl for functions and
12890 function templates.
12891 (duplicate_decls): functions and function templates are not
12892 duplicates, but don't complain about calling this function to
12893 compare them.
12894 (push_overloaded_decl): Don't deal with linkage. Call
12895 duplicate_decls.
12896 (redeclaration_error_message): Deal with linkage.
12897
12898 * decl.c (start_function): If push_overloaded_decl returns an
12899 older version of the function, deal with it.
12900
12901 * decl.c (start_function): Be sure only to push_overloaded_decl
12902 for non-members.
12903
12904 * decl.c (grokfndecl): Put back clearing of DECL_CHAIN for
12905 methods.
12906 (start_function): Lose broken and redundant code for checking old
12907 decl.
12908
12909 * init.c (add_friend): Give line numbers of both friend decls
12910 when warning about re-friending.
12911
12912 * pt.c (tsubst): Use comptypes rather than == to compare the
12913 types of the method as declared and as defined, since default
12914 parameters may be different.
12915
12916 * call.c (build_method_call): Use brendan's candidate printing
12917 routine.
12918
12919 * decl.c (start_method): Methods defined in the class body are
12920 inline whether or not it's a template class.
12921
d11ad92e 12922Mon Mar 28 16:39:26 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12923
12924 * parse.y (initdcl0): Add "extern" to current_declspecs if
12925 have_extern_spec && ! used_extern_spcec.
12926
12927 * tree.c (really_overloaded_fn): A fn with more than one
12928 overload.
12929
12930 * pt.c (end_template_decl): Use really_overloaded_fn.
12931
12932 * decl.c (duplicate_decls): When smashing a decl into a previous
12933 definition, keep the old file and line.
12934 Don't deal with overloaded functions.
12935 Lose old code for checking arg types of functions.
12936 Check for overloaded C functions.
12937 (pushdecl): Deal with overloaded functions.
12938 (start_decl): Expect pushdecl to return an appropriate function decl.
d11ad92e 12939 (start_function): Likewise.
7177d104
MS
12940 (push_overloaded_decl): Don't check for overloaded C functions.
12941
12942 * *.c: Stop using DECL_OVERLOADED, it being archaic.
12943 TREE_OVERLOADED should probably go, too.
12944
d11ad92e 12945Mon Mar 28 14:00:45 1994 Ron Guilmette <rfg@netcom.com>
7177d104
MS
12946
12947 * typeck.c (comp_target_types): Call comp_target_parms with
12948 strict == 1.
12949
d11ad92e 12950Sun Mar 27 00:07:45 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12951
12952 * parse.y (empty_parms): Don't parse () as (...) in extern "C"
12953 sections if we're compiling with -ansi or -pedantic.
12954
12955 * decl.c (decls_match): Don't treat (int) and (int&) as matching.
12956
12957 * decl2.c (grokfield): Don't pedwarn twice about initializing
12958 field.
12959
12960 * decl.c (push_overloaded_decl): Warn about shadowing
12961 constructor.
12962 (redeclaration_error_message): Don't allow 'int a; int a;'
12963
12964 * cvt.c (build_up_reference): Only check for valid upcast if
12965 LOOKUP_PROTECT is set, not just any flag.
12966
d11ad92e 12967Fri Mar 25 01:22:31 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12968
12969 * lex.c (check_newline): When we see a #pragma implementation,
12970 also set it for the main input file.
12971
12972 * init.c (build_new): Convert array size argument to size_t.
12973
12974 * parse.y (primary): If we're doing a parenthesized type-id, call
12975 groktypename before passing it to build_new.
12976
12977 * call.c (build_method_call): Deal properly with const and
12978 volatile for instances of reference type.
12979
12980 * decl.c (store_return_init): Change 'if (pedantic) error' to 'if
12981 (pedantic) pedwarn'.
12982
12983 * decl.c (grokdeclarator): Don't complain about putting `static'
12984 and `inline' on template function decls.
12985
d11ad92e 12986Thu Mar 24 23:18:19 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12987
12988 * call.c (build_method_call): Preserve const & volatile on
12989 `this'.
12990
6060a796 12991Thu Mar 24 16:21:52 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12992
12993 * init.c (build_new, build_vec_delete): Use global new and delete
12994 for arrays.
d11ad92e 12995 * decl2.c (delete_sanity): Likewise.
7177d104 12996
d11ad92e 12997Thu Mar 24 02:10:46 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12998
12999 * cvt.c (convert_to_reference): If i is an lvalue,
13000 (int &)i -> *(int*)&i, as per 5.2.8p9 of the latest WP.
13001 (convert_force): Call convert_to_reference with LOOKUP_COMPLAIN.
13002
d11ad92e 13003Wed Mar 23 17:45:37 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13004
13005 * decl.c (duplicate_decls): Also propagate DECL_TEMPLATE_MEMBERS
13006 and DECL_TEMPLATE_INSTANTIATIONS.
13007
13008 * init.c (build_new): Handle array typedefs properly.
13009
6060a796 13010Wed Mar 23 18:23:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13011
13012 30th Cygnus<->FSF merge.
13013
6060a796 13014Wed Mar 23 00:46:24 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13015
13016 * class.c (modify_vtable_entries): Avoid running off the end of the
13017 virtuals list when processing a virtual destructor.
d11ad92e 13018 * class.c (get_vtable_entry): Likewise.
7177d104 13019
d11ad92e 13020Wed Mar 23 00:23:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13021
13022 * decl.c (duplicate_decls): If two template decls don't match,
13023 just return 0.
13024
d11ad92e 13025Tue Mar 22 23:49:41 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13026
13027 * typeck.c (convert_for_assignment): Don't pedwarn about
13028 converting function pointer to void *.
13029
6060a796 13030Tue Mar 22 22:23:19 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13031
13032 Major revamp of pointer to member functions. Cures major
13033 nonfunctionality when used in casts, and MI situations.
13034
13035 * cvt.c (convert_force): Update call site of build_ptrmemfunc.
d11ad92e
MS
13036 * typeck.c (convert_for_assignment): Likewise.
13037 * typeck2.c (digest_init): Likewise.
7177d104
MS
13038 * typeck2.c (process_init_constructor): Simplify by moving code into
13039 digest_init.
13040 * typeck2.c (digest_init): Do default_conversions on init value, if
13041 we are processing pointer to member functions.
13042 * class.c (get_vfield_offset): Now non-static. Convert bit offset
13043 into byte offset.
d11ad92e 13044 * cp-tree.h (get_vfield_offset): Likewise.
7177d104
MS
13045 * typeck.c (get_member_function_from_ptrfunc): Convert down to right
13046 instance, before fetching vtable pointer.
13047 * typeck.c (get_delta_difference): New routine.
13048 * typeck.c (build_ptrmemfunc): Revamp to handle casting better, also
13049 get vtable pointer out of right subobject.
13050
6060a796 13051Tue Mar 22 17:56:48 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13052
13053 * search.c (get_binfo): Return NULL instead of aborting, when
13054 passed a UNION_TYPE.
13055
d11ad92e 13056Tue Mar 22 12:44:54 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13057
13058 These patches implement handling of redefinition/redeclaration of
13059 templates.
13060
13061 * typeck.c (comptypes): Simplify. All TEMPLATE_TYPE_PARMs are
13062 considered compatible.
13063
13064 * parse.y (template_def): Pass defn argument to end_template_decl.
13065
13066 * pt.c (end_template_decl): Add defn argument. Check for
13067 redefinition. Simplify.
13068
13069 * error.c (OB_UNPUT): New macro, to remove mistakes.
13070 (aggr_variety): Subroutine of dump_aggr_type.
13071
13072 * decl.c (decls_match): Support templates.
13073 (duplicate_decls): No longer static. Don't try to lay out template
13074 decls.
13075 (pushdecl): Simplify.
13076
13077 * cp-tree.h (DECL_TEMPLATE_MEMBERS): Use DECL_SIZE instead of
13078 DECL_INITIAL.
13079
d11ad92e 13080Mon Mar 21 11:46:55 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13081
13082 * error.c (dump_decl): Support class template decls.
13083 (dump_type): Don't adorn template type parms.
13084
13085 * decl.c (duplicate_decls): Save DECL_TEMPLATE_INFO from old decl
13086 if it was a definition.
13087 (redeclaration_error_message): Do the cp_error thang, and reject
13088 redefinition of templates.
13089
d11ad92e 13090Mon Mar 21 19:36:06 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
13091
13092 * decl.c (grokdeclarator): Set TREE_PUBLIC for METHOD_TYPE
13093 in FIELD context, when appropriate. Also,
13094 CLASSTYPE_INTERFACE_ONLY is irrelevant to setting TREE_PUBLIC.
13095 Also, simplify check for bogus return specifiers.
13096
d11ad92e 13097Mon Mar 21 11:46:55 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13098
13099 * parse.y (after_type_declarator1): Expand type_quals.
d11ad92e
MS
13100 (notype_declarator1): Likewise.
13101 (absdcl1): Likewise.
7177d104 13102
d11ad92e 13103Sat Mar 19 01:05:17 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13104
13105 * decl.c (grokdeclarator): Treat class-local typedefs like static
13106 members; i.e. 'typedef int f();' means that f is a function type,
13107 not a method type.
13108
13109 * parse.y (decl): Change direct_* back to *.
13110 (type_id): Change direct_abstract_declarator to absdcl.
13111 (direct_declarator, direct_initdecls, direct_initdcl0): Remove again.
13112
d11ad92e 13113Fri Mar 18 12:47:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13114
13115 These two patches fix crashes on instantiating a template inside a
13116 function with C linkage or containing labels.
13117
13118 * class.c (current_lang_stacksize): No longer static.
13119
13120 * decl.c (struct saved_scope): Add lang_base, lang_stack,
13121 lang_name, lang_stacksize, and named_labels.
13122 (push_to_top_level): Save them.
13123 (pop_from_top_level): Restore them.
13124
13125 * gxxint.texi (Parser): Update.
13126
13127 These two patches finish moving the task of expr/declarator
13128 ambiguity resolution from the lexer to the parser, and add one more
13129 r/r conflict. START_DECLARATOR can now be nuked.
13130
13131 * parse.y (decl): Add "direct_" in typespec X rules.
13132 (direct_declarator): New nonterminal for
13133 direct_after_type_declarator and direct_notype_declarator.
13134 (direct_initdecls): Like initdecls, but uses direct_initdcl0.
13135 (direct_initdcl0): Like initdcl0, but uses direct_declarator.
13136 (named_parm): Add typespec direct_declarator rule.
13137
13138 * spew.c (yylex): #if 0 out START_DECLARATOR insertion.
13139
13140 These two patches disable some excessive cleverness on the part of
13141 g++; a non-class declaration always hides a class declaration in the
13142 same scope, and g++ was trying to unhide it depending on the
13143 enclosing expression.
13144
13145 * spew.c (arbitrate_lookup): #if 0 out.
13146
13147 * decl.c (lookup_name): Never call arbitrate_lookup.
13148
13149 * parse.y (complex_notype_declarator1): Add '*'
13150 complex_notype_declarator1 and '&' complex_notype_declarator1 rules.
13151
13152 * parse.y (complex_direct_notype_declarator): Restore id_scope
13153 see_typename TYPENAME rule, remove all other rules beginning with
13154 those tokens.
13155 (notype_unqualified_id): Add '~' see_typename IDENTIFIER rule.
13156
d11ad92e 13157Thu Mar 17 17:30:01 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13158
13159 These changes fix the compiler's handling of the functional cast/
13160 object declaration ambiguities in section 6.8 of the ARM. They also
13161 add 11 reduce/reduce conflicts. Sigh.
13162
13163 * parse.y: Add precedence decls for OPERATOR and '~'.
13164 (notype_unqualified_id): New nonterminal, encompasses all of the
13165 ANSI unqualified-id nonterminal except TYPENAMEs.
13166 (expr_or_declarator): New nonterminal to delay parsing of code like
13167 `int (*a)'.
13168 (primary): Use notype_unqualified_id.
13169 (decl): Add typespec initdecls ';' and typespec declarator ';'
13170 rules.
13171 (initdcl0): Deal with the above.
13172 (complex_notype_declarator1): A notype_declarator that is not also
13173 an expr_or_declarator.
13174 (complex_direct_notype_declarator): A direct_notype_declarator that
13175 doesn't conflict with expr_or_declarator. Use
13176 notype_unqualified_id. Remove id_scope see_typename TYPENAME rule.
13177 (functional_cast): New nonterminal, for the three functional cast
13178 rules. So that they can be moved after
13179 complex_direct_notype_declarator.
13180 (see_typename): Don't accept type_quals any more.
13181
13182 * decl2.c (reparse_decl_as_expr): New function to deal with parse
13183 nodes for code like `int (*a)++;'.
13184 (reparse_decl_as_expr1): Recursive subroutine of the above.
13185 (finish_decl_parsing): New function to deal with parse nodes for
13186 code like `int (*a);'. See the difference?
13187
6060a796 13188Thu Mar 17 12:16:10 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13189
13190 These changes break binary compatibility in code with classes
13191 that use virtual bases.
13192
13193 * search.c (dfs_get_vbase_types): Simplify and correct to make
13194 sure virtual bases are initialized in dfs ordering.
13195 * search.c (get_vbase_types): Simplify and make readable.
13196
d11ad92e 13197Thu Mar 17 12:01:10 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13198
13199 * parse.y: s/ typename / type_id /g
13200
d11ad92e 13201Wed Mar 16 17:42:52 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
13202
13203 * parse.y (typespec): add SCOPE TYPENAME for global scoped
13204 type. e.g. ::B x.
13205
13206 * decl.c (complete_array_type): fix a bug that in -pendantic
13207 mode even there's no initializer, it will continue to build
13208 default index.
13209
d11ad92e 13210Wed Mar 16 17:43:07 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13211
13212 * parse.y (direct_notype_declarator): Add PTYPENAME rule, remove
13213 all of the scoped PTYPENAME rules.
13214
6060a796 13215Wed Mar 16 16:39:02 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13216
13217 * init.c (build_offset_ref): The value of A::typedef_name is
13218 always the TYPE_DECL, and never an error.
13219
d11ad92e 13220Tue Mar 15 20:02:35 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13221
13222 * search.c (get_base_distance_recursive): Two binfos can only
13223 represent the same object if they are both via_virtual.
13224
13225 * class.c (finish_base_struct): Check vbases for ambiguity, too.
13226
13227 * search.c (get_vbase_types): Accept binfo argument, too.
13228
d11ad92e 13229Tue Mar 15 19:22:05 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
13230
13231 * decl.c (complete_array_type): complete TYPE_DOMAIN of the
13232 initializer also, because back-end requires it.
13233
d11ad92e 13234Tue Mar 15 15:33:31 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13235
13236 * error.c (dump_expr): Support member functions (which show up as
13237 OFFSET_REFs).
13238
6060a796 13239Mon Mar 14 16:24:36 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13240
13241 * init.c (build_new): Set the return type of multidimensional
13242 news correctly.
13243
d11ad92e 13244Fri Mar 11 15:35:39 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
13245
13246 * call.c (build_method_call): if basetype not equal to type
13247 of the instance, use the type of the instance in building
13248 destructor.
13249
d11ad92e 13250Thu Mar 10 17:07:10 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
13251
13252 * parse.y (direct_notype_declarator): add push_nested_type for
13253 'template_type SCOPED_NAME' rule.
13254
d11ad92e 13255Tue Mar 8 00:19:58 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13256
13257 * parse.y (parm): Add typed_declspec1 {absdcl, epsilon} rules.
13258
d11ad92e 13259Sat Mar 5 04:47:48 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13260
13261 * parse.y (regcast_or_absdcl): New nonterminal to implement late
13262 reduction of constructs like `int ((int)(int)(int))'.
13263 (cast_expr): Use it.
13264 (sub_cast_expr): Everything that can come after a cast.
13265 (typed_declspecs1): typed_declspecs that are not typed_typespecs.
13266 (direct_after_type_declarator): Lose PAREN_STAR_PAREN rule.
13267 (direct_abstract_declarator): Replace '(' parmlist ')' rule with
13268 '(' complex_parmlist ')' and regcast_or_absdcl.
13269 (parmlist): Split
13270 (complex_parmlist): Parmlists that are not also typenames.
13271 (parms_comma): Enabler.
13272 (named_parm): A parm that is not also a typename. Use declarator
13273 rather than dont_see_typename abs_or_notype_decl. Expand
13274 typed_declspecs inline.
13275 (abs_or_notype_decl): Lose.
13276 (dont_see_typename): Comment out.
13277 (bad_parm): Break out abs_or_notype_decl into two rules.
13278
d11ad92e 13279Fri Mar 4 18:22:39 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13280
13281 * decl2.c (reparse_decl_as_casts): New function to change parse
13282 nodes for `(int)(int)(int)' from "function taking int and returning
13283 function taking int and returning function taking int" to "... cast
13284 to int, cast to int, cast to int".
13285
13286 * decl2.c (reparse_decl_as_expr): Recursive function to change
13287 parse nodes for `A()()' from "function returning function returning
13288 A" to "A().operator()".
13289
13290 * parse.y (primary): Replace `typespec LEFT_RIGHT' rule with
13291 `typespec fcast_or_absdcl' rule.
13292 (fcast_or_absdcl): New nonterminal to implement late reduction of
13293 constructs like `A()()()()'.
13294 (typename): Replace `typespec absdcl1' rule with
13295 `typespec direct_abstract_declarator' rule.
13296 (direct_abstract_declarator): Replace `LEFT_RIGHT type_quals' rule
13297 with `fcast_or_absdcl type_quals' rule.
13298
6060a796 13299Fri Mar 4 16:18:03 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13300
13301 * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it
13302 matches Section 5.5.
13303
d11ad92e 13304Fri Mar 4 14:01:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13305
13306 * error.c (dump_type_prefix): Don't print basetype twice for
13307 pmfs.
13308
6060a796 13309Fri Mar 4 13:24:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13310
13311 * typeck.c (convert_arguments): Handle setHandler(A::handlerFn)
13312 so that it is like setHandler(&A::handlerFn). Cures an `invalid
13313 lvalue in unary `&''.
13314
d11ad92e 13315Fri Mar 4 11:15:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13316
13317 * gxxint.texi (Copying Objects): New section discussing default
13318 op= problems with virtual inheritance.
13319
13320 * decl2.c (grokoptypename): Just does grokdeclarator and
13321 build_typename_overload, since the parser can't call grokdeclarator
13322 directly.
13323
13324 * method.c (build_typename_overload): Set IDENTIFIER_GLOBAL_VALUE
13325 and TREE_TYPE on generated identifiers.
13326
13327 * decl.c (grokdeclarator): Don't deal with TYPE_EXPRs anymore.
13328
13329 * parse.y (parm): Convert `const char *' to `__opPCc' here.
13330
13331 * error.c (dump_decl): Say sorry rather than my_friendly_aborting
13332 if we can't figure out what to do.
d11ad92e 13333 (dump_type*): Likewise.
7177d104
MS
13334
13335 * typeck2.c (build_m_component_ref): 'component' is an expr, not
13336 a decl. Also move the IS_AGGR_TYPE check after the stripping of
13337 REFERENCE_TYPE.
13338
6060a796 13339Fri Mar 4 04:46:05 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13340
13341 * call.c (build_method_call): Handle b->setHandler(A::handlerFn)
13342 so that it is like b->setHandler(&A::handlerFn). Cures an `invalid
13343 lvalue in unary `&''.
13344
d11ad92e 13345Thu Mar 3 12:38:15 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13346
13347 * parse.y: Add precedence specification for START_DECLARATOR.
13348 (type_quals): Move before primary.
13349 (typename): Move before typed_declspecs, add 'typespec absdcl1' rule.
13350
13351 * decl2.c (grokoptypename): Lose.
13352
13353 * decl.c (grokdeclarator): Parse TYPE_EXPRs in the initial scan,
13354 rather than waiting until later.
13355
d11ad92e 13356Wed Mar 2 14:12:23 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13357
13358 * parse.y (unary_expr): Use 'typename' in 'new' rules, rather
13359 than expanding it inline.
13360 (typename): Expand empty option of (former) absdcl inline.
d11ad92e 13361 (abs_or_notype_decl): Likewise.
7177d104
MS
13362 (absdcl): Lose empty rule.
13363 (conversion_declarator): New nonterminal for 'typename' of 'operator
13364 typename'.
13365 (operator_name): Use it instead of absdcl.
13366
13367 * parse.y: Add precedence declarations for SCOPED_TYPENAME,
13368 TYPEOF, and SIGOF.
13369 (typed_declspecs): Accept typed_typespecs, rather than typespec
13370 directly. Add rules with reserved_typespecquals.
13371 (reserved_declspecs): Don't accept typespecqual_reserved at the
13372 beginning of the list. The typed_declspecs rule will deal with this
13373 omission.
13374 (declmods): Accept nonempty_type_quals, rather than TYPE_QUAL
13375 directly.
13376
13377 * parse.y (direct_notype_declarator,
13378 direct_after_type_declarator, direct_abstract_declarator): Split up
13379 the declarator1 nonterminals to match the draft standard and avoid
13380 ambiguities.
13381 (new_type_id, new_declarator, direct_new_declarator,
13382 new_member_declarator): New nonterminals to implement the subset of
13383 'typename' allowed in new expressions.
13384 (unary_expr): Use new_type_id instead of typename.
13385 (after_type_declarator1, absdcl1): Fix semantics of member pointers.
13386 (abs_member_declarator, after_type_member_declarator): Lose.
13387
13388 * parse.y (absdcl1): Don't require parens around
13389 abs_member_declarator.
13390 (abs_member_declarator): Lose see_typename from rules.
d11ad92e 13391 (after_type_member_declarator): Likewise.
7177d104
MS
13392
13393 * tree.c (get_identifier_list): New function, containing code
13394 previously duplicated in get_decl_list and list_hash_lookup_or_cons.
13395 (get_decl_list): Use it.
d11ad92e 13396 (list_hash_lookup_or_cons): Likewise.
7177d104
MS
13397
13398 * parse.y (typed_declspecs, declmods): It's not necessary to hash
13399 the declspecs on class_obstack, so don't. This way typed_typespecs
13400 can reduce to typed_declspecs.
13401
d11ad92e 13402Wed Mar 2 14:29:18 1994 Jason Merrill <jason@cygnus.com>
7177d104
MS
13403
13404 * cvt.c (build_up_reference): If we aren't checking visibility,
13405 also allow base->derived conversions.
13406
d11ad92e 13407Mon Feb 28 15:14:29 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
13408
13409 * typeck.c (build_c_cast): Remove bogus hack when converting
13410 to a reference type.
13411
13412 * cp-tree.h (lang_decl::vbase_init_list, DECL_VBASE_INIT_LIST):
13413 Removed, not used.
13414 (lang_stype::methods, lang_decl::next_method): New fields.
13415 (CLASSTYPE_METHODS, DECL_NEXT_METHOD): New macros.
13416 * decl.c (duplicate_decls): Preserve DECL_NEXT_METHOD.
13417
13418 * cp-tree.h, decl2.c (flag_vtable_hack): New flag.
13419 * decl2.c (finish_vtable_vardecl): If flag_vtable_hack,
13420 and !CLASSTYPE_INTERFACE_KNOWN, try to use the presence of
13421 a non-inline virtual function to control emitting of vtables.
13422 * class.c (finish_struct): Build CLASSTYPE_METHODS list.
13423 * search.c (build_vbase_vtables_init): Don't assemble_external
13424 (yet) if flag_vtable_hack.
d11ad92e 13425 * class.c (build_vfn_ref): Likewise.
7177d104 13426
d11ad92e 13427Mon Feb 28 14:54:13 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13428
13429 * parse.y (component_decl): Don't include "typed_declspecs
13430 declarator ';'" speedup, since it breaks enums.
13431
d11ad92e 13432Fri Feb 25 15:43:44 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
13433
13434 * class.c (finish_struct): Minor optimization for building
13435 fn_fields list.
13436
d11ad92e 13437Fri Feb 25 15:23:42 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13438
13439 * decl.c (start_function): Fix detection of function overloading.
13440
6060a796 13441Thu Feb 24 22:26:19 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13442
13443 * lex.c (check_newline): #pragma interface can take a string
13444 argument, just like #pragma implementation. #pragma implementation
13445 checks for garbage on the line, line #pragma interface does. Main
13446 input files do not auto implement like named files, #pragma
13447 implementation must be used explicitly.
13448
d11ad92e 13449Thu Feb 24 17:09:01 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13450
13451 * parse.y (components): Handle list of one again.
d11ad92e 13452 (notype_components): Likewise.
7177d104
MS
13453 (after_type_declarator1): Take maybe_raises out again.
13454
13455 * gxxint.texi (Parser): Document additional r/r conflict.
13456
d11ad92e 13457Wed Feb 23 14:42:55 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13458
13459 * gxxint.texi (Parser): Add node.
13460
13461 * Makefile.in (stamp-parse): Update expected conflict count.
13462
13463 * parse.y (various): Replace "declmods declarator" with "declmods
13464 notype_declarator". The comment saying that "declmods declarator ';'"
13465 corresponds to "int i;" was wrong; it corresponds to "const i;".
13466 (component_decl): Add "typed_declspecs declarator ';'" rule; this
13467 *does* correspond to "int i;". Change "declmods components" to
13468 "declmods notype_components".
13469 (components): Don't deal with a list of one anymore.
13470 (notype_components): New nonterminal, corresponds to notype_declarator.
13471 ({after_,no}type_component_decl{,0}): More new nonterminals.
13472 ({after_,no}type_declarator): Fold in START_DECLARATOR token.
13473 Eliminates four reduce/reduce conflicts.
13474
13475 (expr): Depend on nontrivial_exprlist instead of nonnull_exprlist.
13476 (nontrivial_exprlist): New nonterminal: A list of at least two
13477 expr_no_commas's.
13478 (nonnull_exprlist): Depend on nontrival_exprlist.
13479 Eliminates four reduce/reduce conflicts.
13480
13481 (named_class_head): Move intermediate code block into separate
13482 nonterminal so that we can stick %prec EMPTY on it.
13483
13484 Add more %prec EMPTY's to eliminate remaining shift/reduce
13485 conflicts.
13486
13487 (after_type_declarator): Add maybe_raises to fndecl rules.
13488 (after_type_declarator_no_typename): Remove.
13489 For correctness.
13490
13491 Document remaining reduce/reduce conflicts.
13492
d11ad92e 13493Tue Feb 22 12:10:32 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13494
13495 * search.c (get_base_distance): Only bash BINFO_INHERITANCE_CHAIN
13496 (TYPE_BINFO (type)) if we care about the path.
13497
13498 * tree.c (lvalue_p): A COND_EXPR is an lvalue if both of the
13499 options are.
13500
6060a796 13501Mon Feb 21 19:59:40 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13502
13503 * Makefile.in (mostlyclean): lex.c is a source file, don't
13504 remove.
13505
d11ad92e 13506Sat Feb 19 01:27:14 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13507
13508 * parse.y: Eliminate 20 shift/reduce conflicts.
13509
d11ad92e 13510Fri Feb 18 11:49:42 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13511
13512 * pt.c (type_unification): Add subr argument; if set, it means
13513 that we are calling ourselves recursively, so a partial match is OK.
13514 (unify): Support pointers to methods and functions.
13515 (tsubst): Support method pointers.
13516 * decl.c (build_ptrmemfunc_type): No longer static, so that
13517 tsubst can get at it.
13518
13519 * init.c (is_aggr_typedef): Pretend template type parms are
13520 aggregates.
13521 * decl2.c (build_push_scope): If cname refers to a template type
13522 parm, just grin and nod.
13523
13524 * call.c (build_overload_call_real): Pass subr argument to
13525 type_unification.
d11ad92e
MS
13526 * pt.c (do_function_instantiation): Likewise.
13527 * class.c (instantiate_type): Likewise.
7177d104
MS
13528
13529 * search.c (get_base_distance): If BINFO is a binfo, use it and
13530 don't mess with its BINFO_INHERITANCE_CHAIN.
13531
13532 * cvt.c (convert_to_reference): Fix temporary generation.
13533 If ambiguous, return error_mark_node.
13534
13535 * init.c (build_new): Put back some necessary code.
13536
d11ad92e 13537Thu Feb 17 15:39:47 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13538
13539 * init.c (build_new): Deal with array types properly.
13540
13541 * search.c (get_binfo): Become a shell for get_base_distance.
13542 (get_binfo_recursive): Lose.
13543 (get_base_distance_recursive): Find the path to the via_virtual base
13544 that provides the most access.
d11ad92e 13545 (get_base_distance): Likewise.
7177d104
MS
13546
13547 * parse.y (explicit_instantiation): Syntax is 'template class
13548 A<int>', not 'template A<int>'.
13549
13550 * typeck.c (convert_for_initialization): Remove bogus warning.
13551
13552 * parse.y (datadef): Revert patch of Oct 27.
13553
d11ad92e 13554Thu Feb 17 15:12:29 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
13555
13556 * class.c (build_vfn_ref): Cast delta field to ptrdiff_type_node,
13557 rather than integer_type_node. Does wonders for the Alpha.
13558
d11ad92e 13559Thu Feb 17 13:36:21 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13560
13561 * decl.c (build_ptrmemfunc_type): Make sure that the pmf type
13562 goes onto the same obstack as its target type.
13563
d11ad92e 13564Wed Feb 16 00:34:46 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13565
13566 * cvt.c (convert_to_reference): If converting via constructor
13567 on local level, go back to build_cplus_new approach.
13568
13569 * tree.c (build_cplus_new): If with_cleanup_p, set cleanup slot
13570 to error_mark_node to prevent expand_expr from building a cleanup
13571 for this variable.
13572
13573 * lex.c (default_assign_ref_body): Return *this from the memcpy
13574 version, too.
13575
13576 * decl.c (grok_reference_init): Just return if called with
13577 error_mark_node, don't worry about initializing non-const reference
13578 with temporary.
13579
13580 * cvt.c (convert_to_reference): Do the right thing for
13581 non-aggregate reference conversions, pedwarn when generating a
13582 non-const reference to a temporary.
13583
13584 * class.c (finish_struct): TYPE_HAS_COMPLEX_{INIT,ASSIGN}_REF and
13585 TYPE_NEEDS_CONSTRUCTING all depend on TYPE_USES_VIRTUAL_BASECLASSES
13586 again.
13587
d11ad92e 13588Tue Feb 15 19:47:19 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13589
13590 * decl.c (grok_reference_init): Pawn off a lot of the work on
13591 convert_to_reference. Generally do the right thing.
13592
13593 * cvt.c (convert_to_reference): Conform to the initial comment;
13594 i.e. don't create temps if decl != error_mark_node. Handle
13595 cleanups better for temps that do get created. Don't pretend
13596 that we can use an 'A' to initialize a 'const double &' just by
13597 tacking on a NOP_EXPR. Support LOOKUP_SPECULATIVELY.
13598
13599 * call.c (build_method_call): Set TREE_HAS_CONSTRUCTOR on
13600 constructor calls.
13601
d11ad92e 13602Mon Feb 14 14:50:17 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13603
13604 * decl.c (grok_reference_init): Make a temporary for initializing
13605 const reference from constant expression.
13606
d11ad92e 13607Mon Feb 14 11:31:31 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
13608
13609 * cp-tree.h, decl.c (set_identifier_local_value): Deleted function.
13610 * decl.c (pushdecl): Define decl in correct binding_level
13611 (which isn't always the inner_binding_level).
13612
13613 * cvt.c (build_up_reference): Don't ever call expand_aggr_init.
13614 It's ugly, and I don't think it's the right thing to do.
13615
13616 * cp-tree.h, class.c, decl.c, decl2.c, sp/search.c:
13617 Remove NEW_CLASS_SCOPING, assuming it is always 1.
13618 * decl.c (pop_decl_level): Removed; manually inlined.
13619
d11ad92e 13620Sun Feb 13 19:04:56 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13621
13622 * class.h (candidate): Add basetypes field.
13623
13624 * call.c (build_method_call): Do access checking after choosing a
13625 function, not before.
13626
13627 * Makefile.in (cvt.o, call.o, method.o): Depend on class.h.
13628 (mostlyclean): Remove ../cc1plus.
13629
d11ad92e 13630Fri Feb 11 11:52:26 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13631
13632 * class.c (finish_struct): Don't allow adjusting access to a field
13633 of a base class if a local field has the same name.
13634
13635 * error.c (dump_type_prefix): Output basetype for METHOD_TYPEs.
13636
d11ad92e 13637hu Jan 13 17:55:51 EST 1994 Gnanasekaran Swaminathan <gs4t@virginia.edu>
7177d104 13638
63718c49 13639 * cp-tree.h (DESTRUCTOR_NAME_P): do not confuse AUTO_TEMP names
7177d104
MS
13640 with destructor names when either NO_DOLLAR_IN_LABEL or
13641 NO_DOT_IN_LABEL are not defined.
13642
13643 Now `template <class T, T f(T&), const T*> class A {...}' works.
13644
13645 * pt.c (grok_template_type): substitute template parm types
13646 with actual types in complex type as well.
13647 (coerce_template_parms): update the grok_template_type ()
13648 function call.
13649
13650 * pt.c (tsubst): Traverse method list using DECL_CHAIN.
13651
13652 * decl.c (grok_op_properties): Allow operator++/-- to have
13653 default arguments.
13654
13655 * typeck2.c (store_init_value): Don't abort when called to
13656 initialize a type that needs constructing with a CONSTRUCTOR.
13657
13658 * init.c (expand_aggr_init_1, CONSTRUCTOR case): If
13659 store_init_value fails, build and expand an INIT_EXPR. If
13660 store_init_value succeeds, call expand_decl_init.
13661
6060a796 13662Fri Feb 11 02:49:23 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13663
13664 * class.c (build_vbase_path): Use complete_type_p instead of
13665 resolves_to_fixed_type_p to determine if the virtual bases are in
13666 their right place for the type of expr. Cures problem of thinking a
13667 virtual base class is one place, when it is in fact someplace else.
13668
6060a796 13669Fri Feb 11 00:26:46 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13670
13671 * init.c (resolve_offset_ref): Make sure we first convert to
13672 intermediate type, if given, when dealing with members off `this'.
13673 Solves an incorrrect `type `foo' is not a base type for type
13674 `multiple'' when it is infact, a base type.
13675
6060a796 13676Thu Feb 10 21:49:35 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13677
13678 * class.c (modify_other_vtable_entries): Use get_binfo, instead
13679 of binfo_value. Solves problem with compiler giving a `base class
13680 `B' ambiguous in binfo_value (compiler error)' on complex MI
13681 herarchies, when a virtual function is first defied in a virtual
13682 base class.
13683
6060a796 13684Thu Feb 10 17:19:32 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13685
13686 * class.c (build_vbase_path): Don't complain about ambiguous
13687 intermediate conversion when converting down to a virtual base
13688 class, even if they might seem to be ambiguous.
13689
d11ad92e 13690Thu Feb 10 12:18:26 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13691
13692 * typeck2.c (build_functional_cast): #if 0 out constructor
13693 inheritance code, improve error messages.
13694
13695 * class.c (finish_base_struct): Complain about base with only
13696 non-default constructors in derived class with no constructors.
13697
13698 * decl.c (grokdeclarator): Fix detection of virtual new/delete.
13699
6060a796 13700Wed Feb 9 22:02:32 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13701
13702 * search.c (build_mi_virtuals, add_mi_virtuals,
13703 report_ambiguous_mi_virtuals): Removed unneeded code.
d11ad92e 13704 * class.c (finish_struct_bits): Likewise.
7177d104 13705
d11ad92e 13706Wed Feb 9 11:27:17 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13707
13708 * pt.c (end_template_instantiation): Push decl before
13709 pop_from_top_level.
13710
13711 * typeck2.c (build_m_component_ref): Make sure datum is of
13712 aggregate type.
13713
13714 * init.c (get_type_value): New function, returns
13715 IDENTIFIER_TYPE_VALUE or IDENTIFIER_CLASS_TYPE_VALUE or NULL_TREE.
13716
13717 * call.c (build_method_call): Don't die on call to destructor for
13718 non-type.
13719
13720 * decl.c (grokdeclarator): Complain about virtual op new and op
13721 delete, make static virtuals unvirtual instead of unstatic.
13722
13723 * typeck.c (build_c_cast): Also call default_conversion on
13724 methods.
13725
13726 * decl.c (grokdeclarator): Don't complain about anonymous
13727 bitfields.
13728
13729 * parse.y (simple_stmt, for loops): Move the continue point after
13730 the cleanups.
13731
13732 * class.c (finish_struct): Fix setting of
13733 TYPE_HAS_COMPLEX_INIT_REF.
13734
d11ad92e 13735Tue Feb 8 13:21:40 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13736
13737 * init.c (build_new): Deal with `new double (1)'.
13738
13739 * class.c (finish_struct): TYPE_HAS_COMPLEX_*_REF are supersets of
13740 TYPE_HAS_REAL_*_REF, but TYPE_HAS_COMPLEX_INIT_REF is independent of
13741 TYPE_NEEDS_CONSTRUCTING.
13742
13743 * decl.c (duplicate_decls): Propagate access decls.
13744
13745 * typeck2.c (process_init_constructor): Accept empty_init_node
13746 for initializing unions.
13747
13748 * class.c, lex.c, cp-tree.h: Use
13749 TYPE_HAS_COMPLEX_ASSIGN_REF where TYPE_HAS_REAL_ASSIGN_REF was used
13750 before, use TYPE_HAS_COMPLEX_INIT_REF for TYPE_NEEDS_CONSTRUCTING in
13751 some places.
13752
13753 * decl.c (finish_decl): Don't complain about uninitialized const
13754 if it was initialized before.
13755
d11ad92e 13756Mon Feb 7 18:12:34 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13757
13758 * lex.c (default_assign_ref_body): Don't deal with vbases for
13759 now.
13760
13761 * decl.c (finish_decl): Fix reversed logic for objects and other
13762 things that need to be constructed but have no initializer.
13763
13764 * class.c (finish_struct): Don't set TYPE_HAS_* flags that are
13765 set by grok_op_properties or finish_decl.
13766
13767 * decl.c: Don't warn about extern redeclared inline unless
13768 -Wextern-inline is given.
d11ad92e
MS
13769 * decl2.c (lang_decode_option): Likewise.
13770 * cp-tree.h: Likewise.
7177d104 13771
d11ad92e 13772Mon Feb 7 17:29:24 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
13773
13774 * decl.c (pushdecl_with_scope): Fix thinko. Add forward
13775 declaration.
13776
13777 * decl.c (pushdecl_with_scope): New function.
13778 * decl.c (pushdecl_top_level): Use new function.
13779 * decl.c (pushtag): Initialize newdecl.
13780 * decl.c (pushtag): Push new type decl into correct scope.
13781
d11ad92e 13782Mon Feb 7 14:42:03 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13783
13784 * call.c, cvt.c, init.c, search.c, cp-tree.h:
13785 Eradicate LOOKUP_PROTECTED_OK.
13786
d11ad92e 13787Mon Feb 7 13:57:19 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
13788
13789 * decl.c (pushtag, xref_tag), cp-tree.h: Add extra parameter
13790 'globalize' to signify implicit declarations.
13791 * decl.c (globalize_nested_type, maybe_globalize_type): Removed.
13792 * decl.c (set_identifier_type_value_with_scope): New function.
13793 * decl.c (set_identifier_local_value): Simplify.
13794 * spew.c (yylex, do_addr): Modify to return a _DEFN if a
13795 forward declaration (followed by ';' and not preceded by 'friend').
13796 * class.c, decl.c, except.c, init.c, parse.y,
13797 pt.c, search.c: Add new argument to calls to xref_tag and
13798 pushtag.
13799
d11ad92e 13800Mon Feb 7 00:22:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13801
13802 * cp-tree.h (ACCESSIBLY_UNIQUELY_DERIVED_P): New macro, means what
13803 ACCESSIBLY_DERIVED_FROM_P meant before.
13804 (ACCESSIBLY_DERIVED_FROM_P): Now disregards ambiguity.
13805
13806 * cvt.c (build_up_reference): Call get_binfo with PROTECT == 1.
13807
13808 * search.c (get_base_distance_recursive): Members and friends of
13809 a class X can implicitly convert an X* to a pointer to a private or
13810 protected immediate base class of X.
d11ad92e 13811 (get_binfo_recursive): Likewise.
7177d104
MS
13812 (get_base_distance): Ignore ambiguity if PROTECT < 0.
13813 (get_binfo): Lose multiple values of PROTECT.
13814 (compute_access): Protected is OK if the start of the
13815 search is an accessible base class of current_class_type.
13816
13817 * method.c (build_opfncall): Do check access on operator new here.
13818
13819 * decl.c (finish_function): Don't check access on operator new
13820 here.
13821
d11ad92e 13822Sun Feb 6 14:06:58 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13823
13824 * decl.c (xref_tag): The base of a derived struct is NOT always
13825 public. Duh.
13826
13827 * pt.c (do_explicit_instantiation): New function, called from
13828 parser to do explicit function instantiation.
13829 (type_unification): Allow the args list to be terminated with
13830 void_list_node.
13831 (do_pending_expansions): Look at i->interface for non-member
13832 templates.
13833
13834 * parse.y (datadef): Move explicit_instantiation here.
13835 (structsp): From here.
13836 (datadef): Complain about `int;'.
13837
d11ad92e 13838Sun Feb 6 12:33:18 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
13839
13840 * pt.c (end_template_instantiation), cp-tree.h: Remove unused
13841 second parameter, and simplify first from a TREE_LIST where
13842 we only care about its TREE_VALUE to just the value (an IDENTIFIER).
13843 * pt.c (instantiate_member_templates): Simplify argument list
13844 from a TREE_LIST to just an IDENTIFIER.
13845 * lex.c (yyprint): PRE_PARSED_CLASS_DECL is now just an IDENTIFIER.
13846 * parse.y (template_instantiate_once): Simplify accordingly.
13847 * decl.c (inner_binding_level): New. Use various places to
13848 simplify.
13849
d11ad92e 13850Sun Feb 6 02:49:37 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13851
13852 * typeck2.c (build_functional_cast): int() -> int(0).
13853
d11ad92e 13854Sat Feb 5 00:53:21 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13855
13856 * class.c (finish_struct): Don't do a bitwise copy for op= if the
13857 class has a virtual function table.
13858
13859 * typeck.c (convert_for_initialization): Restore warnings about
13860 not using defined op=. Should really be my_friendly_aborts, I
13861 s'pose.
13862
d11ad92e 13863Fri Feb 4 14:21:00 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13864
13865 * class.c (finish_struct): Tidy up conditions for doing bitwise
13866 copies of objects.
13867
13868 * decl.c (build_default_constructor): #if 0 out.
13869
13870 * *: Eradicate TYPE_GETS_{ASSIGNMENT,ASSIGN_REF,CONST_ASSIGN_REF,
13871 CONST_INIT_REF}, TYPE_HAS_REAL_CONSTRUCTOR.
13872
13873 * decl.c (grokdeclarator): Don't return void_type_node for
13874 friends being defined here.
13875
13876 * init.c (perform_member_init): Only do the init if it's useful.
13877
13878 * lex.c (default_copy_constructor_body): If we don't need to do
13879 memberwise init, just call __builtin_memcpy.
d11ad92e 13880 (default_assign_ref_body): Likewise.
7177d104
MS
13881
13882 * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0.
13883
6060a796 13884Fri Feb 4 13:02:56 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13885
13886 * lex.c (reinit_parse_for_method, cons_up_default_function):
13887 Don't give warn_if_unknown_interface warning when it came from a
13888 system header file.
d11ad92e
MS
13889 * pt.c (end_template_decl, instantiate_template): Likewise.
13890 * decl.c (start_decl): Likewise.
7177d104 13891
d11ad92e 13892Fri Feb 4 00:41:21 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13893
13894 * decl.c (grokdeclarator): Don't try to set TYPE_WAS_ANONYMOUS on
13895 enums.
13896
13897 * decl2.c (constructor_name_full): Use IS_AGGR_TYPE_CODE instead of
13898 IS_AGGR_TYPE, since we don't know it's a type.
13899
d11ad92e 13900Thu Feb 3 11:36:46 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13901
13902 * decl.c (grokdeclarator): Don't complain about anonymous unions.
13903
13904 * cp-tree.h (TYPE_WAS_ANONYMOUS): This struct was originally
13905 anonymous, but had a name given to it by a typedef.
13906
13907 * decl.c (grokdeclarator): When renaming an anonymous struct, set
13908 TYPE_WAS_ANONYMOUS.
13909
13910 * decl2.c (constructor_name_full): Use TYPE_WAS_ANONYMOUS.
13911
13912 * cp-tree.h (DECL_UNDEFINED_FRIENDS): #if 0 out.
13913
13914 * init.c (xref_friend): Don't set up DECL_UNDEFINED_FRIENDS.
13915 (embrace_waiting_friends): Don't use DECL_UNDEFINED_FRIENDS.
13916
13917 * decl.c (grokdeclarator): Set TYPE_NESTED_NAME properly on nested
13918 anonymous structs that get typedef'd.
13919
13920 * decl.c (grokdeclarator): Always return void_type_node for
13921 friends.
13922
13923 * error.c (dump_function_decl): Don't use DECL_CLASS_CONTEXT for
13924 friends.
13925 (dump_function_decl): Don't print out default args for
13926 a function used in an expression.
13927
13928 * decl.c (grokdeclarator): Give error on abstract declarator used
13929 in an invalid context (i.e. `void (*)();').
13930
13931 * error.c (cp_line_of): Support _TYPE nodes.
d11ad92e 13932 (cp_file_of): Likewise.
7177d104
MS
13933
13934 * cvt.c (build_up_reference): Don't abort if passed a SAVE_EXPR;
13935 it can happen for the RHS of an assignment stmt where the LHS is
13936 a COND_EXPR.
13937
13938 * init.c (expand_aggr_init_1): Deal with bracketed initializer
13939 lists properly.
13940
13941 * class.c (finish_struct): Deal with enumerators and typedefs
13942 again.
13943
d11ad92e 13944Wed Feb 2 11:30:22 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13945
13946 * class.c (finish_struct): Tidy up loop over fields.
13947
13948 * errfn.c (cp_thing): Don't advance twice after a format.
13949
13950 * class.c (finish_struct): Complain about needing a constructor
13951 if a member has only non-default constructors, and don't try to
13952 generate a default constructor.
13953
13954 * decl.c (finish_decl): Also do the constructor thing if
13955 TYPE_NEEDS_CONSTRUCTING is set (for arrays).
13956
13957 * search.c (unuse_fields): New function: mark all fields in this
13958 type unused.
13959 (dfs_unuse_fields): Helper function.
13960
13961 * class.c (pushclass): If the new class is the same as the old
13962 class, still unuse the fields.
13963 (unuse_fields): Move to search.c.
13964
13965 * decl.c (grok_op_properties): Add friendp argument.
13966 (grokfndecl): Pass it.
d11ad92e 13967 (start_method): Likewise.
7177d104
MS
13968
13969 * decl2.c (delete_sanity): Add use_global_delete parameter to catch
13970 ::delete calls.
13971
13972 * parse.y (unary_expr): Pass new parameter to delete_sanity.
13973
13974 * lex.c (default_copy_constructor_body): Don't choke if the union
13975 has no fields.
d11ad92e 13976 (default_assign_ref_body): Likewise.
7177d104
MS
13977
13978 * call.c (compute_conversion_costs_ansi): Do the right thing for
13979 ellipsis matches.
13980
13981 * decl.c (push_to_top_level): Optimize.
13982
13983 * decl.c (start_function): Look for the lexical scope of a friend
13984 in DECL_CLASS_CONTEXT.
13985
13986 * init.c (do_friend): Set DECL_CLASS_CONTEXT on global friends.
13987
d11ad92e 13988Tue Feb 1 15:59:24 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13989
13990 * cp-tree.h (TREE_GETS_PLACED_NEW): New macro.
13991
13992 * init.c (init_init_processing): Don't assign BIN/BID to the
13993 IDENTIFIER_GLOBAL_VALUEs of their respective operators.
13994 (build_new): Check TREE_GETS_PLACED_NEW.
13995
13996 * decl.c (grok_op_properties): Don't set TREE_GETS_NEW for a decl of
13997 op new with placement, set TREE_GETS_PLACED_NEW.
13998
13999 * cp-tree.h (ANON_UNION_P): New macro. Applies to decls.
14000
14001 * class.c (finish_struct): Don't treat anonymous unions like
14002 other aggregate members. Do synthesize methods for unions without
14003 a name, since they may or may not be "anonymous unions".
14004
14005 * decl2.c (grok_x_components): Wipe out memory of synthesized methods
14006 in anonymous unions.
14007
14008 * lex.c (default_copy_constructor_body): Support unions.
d11ad92e 14009 (default_assign_ref_body): Likewise.
7177d104 14010
d11ad92e 14011Mon Jan 31 12:07:30 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14012
14013 * cp-tree.h: Fix documentation of LOOKUP_GLOBAL, add prototypes.
14014
14015 * error.c (args_as_string): New function (%A), like type_as_string
14016 except NULL_TREE -> "..."
14017
14018 * call.c (build_overload_call_real): Fix for new overloading.
14019
14020 * decl.c (grok_op_properties): Set all of the TYPE_OVERLOADS_* flags
14021 here.
14022
14023 * parse.y (operator_name): Instead of here.
14024
14025 * typeck2.c (build_functional_cast): Treat a TREE_LIST as a list
14026 of functions.
14027
14028 * call.c (build_overload_call_real): Support LOOKUP_SPECULATIVELY.
14029
14030 * method.c (build_opfncall): Don't need to massage return value
14031 any more, call build_overload_call with all flags.
14032
14033 * typeck.c (build_x_binary_op): Put back speculative call to
14034 build_opfncall.
d11ad92e
MS
14035 (build_x_unary_op): Likewise.
14036 (build_x_conditional_expr): Likewise.
7177d104 14037
6060a796 14038Mon Jan 31 10:00:30 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
14039
14040 * cvt.c (build_type_conversion_1): Change call to pedwarn into
14041 warning, and conditionalize upon warn_cast_qual.
14042
d11ad92e 14043Fri Jan 28 11:48:15 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14044
14045 * search.c (lookup_field): If xbasetype is a binfo, copy it to
14046 avoid clobbering its inheritance info.
14047
14048 * call.c (build_method_call): Don't overwrite basetype_path with
14049 TYPE_BINFO (inst_ptr_basetype) if they have the same type.
14050
14051 * search.c (compute_access): Fix handling of protected inheritance
14052 and friendship with the enclosing class.
14053
14054 * typeck2.c (store_init_value): Allow passing of TREE_CHAIN for
14055 initialization of arbitrary variable.
14056
14057 * typeck2.c (build_functional_cast): Only try calling a method if
14058 one exists.
14059
14060 * decl.c (grokdeclarator): Move handling of constructor syntax
14061 initialization into first loop for generality.
14062 (parmlist_is_random): Lose.
14063
14064 * lex.c (cons_up_default_function): Set TREE_PARMLIST on arguments
14065 to default function.
14066
d11ad92e 14067Thu Jan 27 19:26:51 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14068
14069 * decl.c (grokparms): Abort if we get called with something we don't
14070 expect.
14071
6060a796 14072Thu Jan 27 17:37:25 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
14073
14074 * call.c (build_overload_call_real): Change argument complain to
14075 flags to match style of rest of code. Pass it down to
14076 build_function_call_real as necessary.
14077 * call.c (build_overload_call, build_overload_call_maybe): Change
14078 argument complain to flags to match style of rest of code.
14079 * cp-tree.h (build_function_call_real): Added fourth flags
14080 argument.
14081 * cvt.c (convert_to_reference): Only give warning messages, if
14082 LOOKUP_COMPLAIN is set.
14083 * typeck.c (build_x_function_call): Change simple complain
14084 argument to build_overload_call_maybe and build_overload_call, to
14085 LOOKUP_COMPLAIN to match style of rest of code.
d11ad92e 14086 * typeck2.c (build_functional_cast): Likewise.
7177d104
MS
14087 * typeck.c (build_function_call_real): Add flags, so that we can
14088 not complain, if we don't want to complain. Complain about
14089 arguments, if we are complaining, otherwise don't.
14090 * typeck.c (build_function_call, build_function_call_maybe):
14091 Stick in flags argument.
14092 * typeck.c (build_x_binary_op, build_x_unary_op,
14093 build_x_conditional_expr, build_x_compound_expr): Follow style of
14094 build_x_indirect_ref, as it is more correct and more common.
14095
d11ad92e 14096Thu Jan 27 14:36:20 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14097
14098 * call.c (build_method_call): Don't check for being called with
14099 a pointer.
14100
14101 * decl2.c (finish_file): Don't play with DECL_CLASS_CONTEXT for the
14102 static initializer function.
14103
14104 * init.c (build_member_call): Use convert_force here, too.
14105
14106 * search.c (compute_access): Only treat static members specially
14107 if they are referenced directly.
14108
d11ad92e 14109Wed Jan 26 18:28:14 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14110
14111 * gxxint.texi (Access Control): New node.
14112
14113 * search.c (current_scope): New function; returns whichever of
14114 current_class_type and current_function_decl is the most nested.
14115 (compute_access): Total overhaul to make it clearer and more
14116 correct. Don't use the cache for now; in the only situation where
14117 it was used before, it gained nothing. This frees up three of the
14118 DECL_LANG_FLAGs for possible other use!
14119
14120 * cp-tree.h: #if 0 out DECL_PUBLIC & friends.
14121
14122 * typeck.c (build_component_ref_1): Don't check DECL_PUBLIC.
14123
14124 * call.c (build_method_call): Use convert_force to cast `this' --
14125 rely on the access checking for the method itself.
14126
14127 * init.c (is_friend): Do the nesting thing, handle types. I am
14128 my own friend.
14129 (is_friend_type): Become a shell for is_friend.
14130 (add_friend): Never stick in ctype.
14131 Why are the friendship functions in init.c, anyway?
14132
6060a796 14133Wed Jan 26 17:50:00 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
14134
14135 * cvt.c (build_type_conversion_1): Don't conditionalize call to
14136 pedwarn upon pedantic.
14137
6060a796 14138Wed Jan 26 17:20:46 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
14139
14140 * cvt.c (convert_to_reference): Add 8.4.3 checking so that one
14141 gets a warning if one tries to initialize a non-const & from a
14142 non-lvalue.
14143 * cvt.c (convert_to_reference): Use %P format for argument
14144 numbers in warnings.
14145
6060a796 14146Wed Jan 26 14:35:06 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
14147
14148 * init.c (build_delete): Follow style in call.c to construct the
14149 virtual call to the desctructor, as that code is right. Fixes a
14150 problem of the compiler saying a pointer conversion is ambiguous.
14151
d11ad92e 14152Wed Jan 26 11:28:14 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14153
14154 * cp-tree.h (VTABLE_NAME_P): Change other occurrence of
14155 VTABLE_NAME_FORMAT to VTABLE_NAME.
14156
14157 * *: s/visibility/access/g
14158
d11ad92e 14159Tue Jan 25 18:39:12 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14160
14161 * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR.
14162
6060a796 14163Tue Jan 25 13:54:29 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
14164
14165 * init.c (build_delete): Back out Jan 17th & 18th pacthes, as
14166 they break libg++.
14167
d11ad92e 14168Tue Jan 25 13:11:45 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14169
14170 * decl.c (duplicate_decls): Fix pointer arithmetic.
14171
d11ad92e 14172Mon Jan 24 15:50:06 1994 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14173
14174 [ cp-* changes propagated from c-* changes in 940114 snapshot ]
14175 * cp-parse.y (maybe_attribute): Allow multiple __attribute__
14176 clauses on a declaration.
14177
d11ad92e 14178Mon Jan 24 17:06:23 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14179
14180 * class.c (finish_struct): Do synthesize methods for anon
14181 structs, just not unions.
14182
d11ad92e 14183Mon Jan 24 13:50:13 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
14184
14185 * decl.c (xref_tag): handle anonymous nested type.
14186 * decl.c (globalize_nested_type): add no globalize bit check.
14187 * spew.c (hack_more_ids) : templated nested decl not push top
14188 level.
14189
14190 * parse.y : get rid of 'goto do_components'. It is much better
14191 for debugging.
14192
14193 * decl.c (is_anon_name): get rid of the function and use the
14194 macro ANON_AGGRNAME_P.
14195 * pt.c : ditto.
14196
d11ad92e 14197Fri Jan 21 14:06:02 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14198
14199 * class.c (finish_struct): Don't synthesize any methods for
14200 anonymous structs/unions.
14201
14202 * typeck.c (build_modify_expr): Don't treat pmf's as class objects.
14203
d11ad92e 14204Thu Jan 20 18:56:46 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14205
14206 * method.c (build_opfncall): Call build_indirect_ref on
14207 synthesized instance for operator delete.
14208
14209 * pt.c (type_unification): Don't abort if called with a list of
14210 types in ARGS.
14211
14212 * class.c (instantiate_type): Deal with function templates.
14213
d11ad92e 14214Thu Jan 20 16:55:35 1994 Jim Wilson <wilson@sphagnum.cygnus.com>
7177d104
MS
14215
14216 * Makefile.in (CC): Default to cc not gcc.
14217
d11ad92e 14218Thu Jan 20 13:47:54 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14219
14220 * typeck.c (build_modify_expr): Call constructor if appropriate.
14221
14222 * decl.c (push_to_top_level): Clear out class-level bindings cache.
14223
d11ad92e 14224Wed Jan 19 13:51:22 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14225
14226 * call.c (resolve_scope_to_name): Work recursively (previously only
14227 looked down one level).
14228
14229 * lex.c (do_pending_inlines): If we're still dealing with the last
14230 batch of inlines, don't start working on a new one.
14231
14232 * Makefile.in (stamp-parse): Update conflict count.
14233 (TAGS): Fix.
14234
14235 * parse.y (explicit_instantiation): New rule; implements
14236 'template A<int>' syntax (though not 'template foo(int)' yet).
14237 (structsp): Add explicit_instantiation.
14238
d11ad92e 14239Tue Jan 18 13:53:05 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14240
14241 * class.c (finish_struct, etc.): Simplify decision to synthesize
14242 a destructor.
14243
14244 * call.c, class.c, cp-tree.h, decl.c, init.c,
14245 ptree.c, search.c, typeck.c, typeck2.c: Nuke
14246 TYPE_NEEDS_CONSTRUCTOR (change all calls to TYPE_NEEDS_CONSTRUCTING).
14247 * init.c (expand_aggr_init_1): Don't try non-constructor methods
14248 of initializing objects.
14249 (build_new): Don't try other methods if the constructor lookup fails.
14250
14251 * class.c (finish_base_struct): Set cant_have_default_ctor and
14252 cant_synth_copy_ctor properly.
d11ad92e 14253 (finish_struct): Likewise.
7177d104 14254
d11ad92e 14255Mon Jan 17 13:58:18 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14256
14257 * typeck.c (build_modify_expr_1): #if 0 out again.
14258 (build_modify_expr): #if 0 out memberwise init code again.
14259
14260 * lex.c (default_copy_constructor_body): Be const-correct.
d11ad92e 14261 (default_assign_ref_body): Likewise.
7177d104
MS
14262
14263 * init.c (perform_member_init): Use TYPE_HAS_CONSTRUCTOR to decide
14264 whether or not to use it, rather than TYPE_NEEDS_CONSTRUCTING.
14265 (expand_aggr_init): Disable silent conversion from initializer list
14266 to list of args for a constructor.
14267
14268 * class.c (base_info): Lose needs_default_ctor.
d11ad92e
MS
14269 (finish_base_struct): Likewise.
14270 (finish_struct): Likewise.
7177d104
MS
14271
14272 * decl.c (init_decl_processing): Don't turn off flag_default_inline
14273 just because flag_no_inline is on.
14274 (finish_decl): Use TYPE_HAS_CONSTRUCTOR to decide to use
14275 constructor.
14276
14277 * class.c (finish_struct): Synthesize default ctor whenever
14278 allowed.
14279
14280 * Makefile.in (TAGS): Don't try to run etags on cp-parse.y.
14281
6060a796 14282Sat Jan 15 18:34:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
14283
14284 * Makefile.in, configure: Handle the C++ front-end in a
14285 subdirectory.
14286 * cp-*: Move C++ front-end to cp/*.
14287
d11ad92e 14288Fri Jan 14 14:09:37 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14289
14290 * cp-typeck.c (build_function_call_real): Modify to match other
14291 instances of taking the address of the function.
14292
14293 * cp-class.c (finish_struct): Set TYPE_HAS_REAL_CONSTRUCTOR to 1 if
14294 there are non-synthesized constructors.
14295 Only set TYPE_NEEDS_CONSTRUCTOR if TYPE_HAS_REAL_CONSTRUCTOR.
14296 Always generate copy constructor if possible.
14297
14298 * cp-tree.h (lang_type): Add has_real_constructor bitfield.
14299 (TYPE_HAS_REAL_CONSTRUCTOR): Define.
14300
14301 * cp-lex.c (default_copy_constructor_body): Use init syntax
14302 for all bases.
14303
14304 * cp-type2.c (store_init_value): Only give error for initializer list
14305 if TYPE_HAS_REAL_CONSTRUCTOR.
14306
d11ad92e 14307Thu Jan 13 15:38:29 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14308
14309 * cp-tree.h (DECL_SYNTHESIZED): Add defn.
14310 (lang_decl): Add synthesized bitfield to decl_flags.
14311
14312 * cp-lex.c (cons_up_default_function): Use DECL_SYNTHESIZED to mark
14313 artificial methods, rather than a line # of 0.
14314
d11ad92e 14315Fri Jan 14 18:25:29 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
14316
14317 * cp-decl (xref_tag): fix a bug in conflict type.
14318 * cp-parse.y : add SCOPED_NAME for uninstantiated template nested
14319 type reference.
14320 * cp-spew.c (yylex) : generated SCOPED_NAME token.
14321 * cp-lex.c (yyprint): handle SCOPED_NAME.
14322
6060a796 14323Fri Jan 14 17:00:29 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
14324
14325 * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is
14326 not right.
14327
d11ad92e 14328Thu Jan 13 14:00:35 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
14329
14330 * cp-decl2.c (grok_x_components): fix a bug that enum type does not
14331 have type_flags.
14332
6060a796 14333Thu Jan 13 11:39:34 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
14334
14335 Ensure that all vtable pointers are initialized with all the right
14336 values.
14337
14338 * cp-class.c (is_normal): Changed to reflect new meaning of
14339 CLASSTYPE_VFIELD_PARENT.
14340 * cp-class.c (maybe_fixup_vptrs): Use of
14341 CLASSTYPE_NEEDS_VIRTUAL_REINIT here is misguided. Use
14342 BINFO_MODIFIED instead.
14343 * cp-class.c (finish_struct): Changed to reflect new meaning of
14344 CLASSTYPE_VFIELD_PARENT.
14345 * cp-decl.c (get_binfo_from_vfield): Removed, unneeded now.
14346 * cp-decl.c (finish_function): Use init_vtbl_ptrs, instead of open
14347 coding it here.
14348 * cp-init.c (init_vfields): Changed name to init_vtbl_ptrs, and
14349 re-implement.
14350 * cp-init.c (emit_base_init): Use new name init_vtbl_ptrs.
14351 * cp-tree.h (vfield_parent): Changed to integer.
14352 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Changed docs to reflect new
14353 meaning.
14354 * cp-tree.h (init_vtbl_ptrs): Added init_vtbl_ptrs.
14355
d11ad92e 14356Wed Jan 12 18:24:16 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
14357
14358 * cp-decl.c (xref_tag): re-implement globalize nested type.
14359 * cp-decl2.c (grok_x_components): ditto.
14360 * cp-parse.y: ditto.
14361 * cp-tree.h (lang_type): add no_globalize bit in type_flags.
14362
d11ad92e 14363Wed Jan 12 14:08:09 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14364
14365 * cp-decl.c (grokdeclarator): Don't set TREE_PUBLIC on friend
14366 decls with a definition attached.
14367
14368 * cp-typeck.c (build_modify_expr): Undo previous change in the case
14369 of INIT_EXPRs.
14370
d11ad92e 14371Tue Jan 11 19:33:03 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14372
14373 * cp-typeck.c (build_modify_expr): Replace code for generating
14374 assignment semantics for classes with an error.
14375 (build_modify_expr_1): #if 0 out.
14376
14377 * cp-decl.c (pushdecl): Patch bogus design of pushdecl
14378 behavior for overloaded functions (it doesn't push anything).
14379
14380 * cp-class.c (finish_struct): When generating default op=,
14381 set TYPE_HAS_ASSIGNMENT.
14382
6060a796 14383Mon Jan 10 18:48:06 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
14384
14385 * cp-cvt.c (convert): Make {double, clashing enum} -> enum
14386 invalid.
14387 * cp-typeck.c (convert_for_assignment): Simplify.
14388 * cp-decl2.c (warn_enum_clash): Removed.
14389 * invoke.texi (-Wenum-clash): Removed.
14390 * toplev.c (-Wenum-clash): Removed.
14391
d11ad92e 14392Mon Jan 10 17:48:37 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
14393
14394 * cp-decl.c (finish_decl): fix incorrect popclass call.
14395
14396 * cp-decl.c (is_anon_name): new function, check whether the name
14397 is anonymous name generated by compiler.
14398 * cp-decl.c (grokdeclarator): allow nested SCOPE_REF
14399 * cp-spew.c (hack_more_ids): handle nested type in template.
14400 * cp-parse.y : handle nested type reference in uninstantiated
14401 template.
14402 * cp-call.c (build_method_call): handle uninstantiated template
14403 case.
14404 * cp-pt.c (search_nested_type_in_tmpl): new function, search nested
14405 type in template.
14406 * cp-pt.c (lookup_nested_type_by_name): new function, lookup nested
14407 type by name.
14408 * cp-pt.c (tsubst): handle nested type search by name.
14409
d11ad92e 14410Mon Jan 10 14:32:18 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14411
14412 * cp-init.c (build_member_call): Propagate qualifiers to new type.
14413
14414 * cp-call.c (build_method_call): Count functions the new way.
14415
d11ad92e 14416Fri Jan 7 19:03:26 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14417
14418 * cp-decl.c (pushtag): Set DECL_ASSEMBLER_NAME for nested classes,
14419 too.
14420
d11ad92e 14421Tue Jan 4 16:45:51 1994 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
14422
14423 * cp-parse.y: change to handle whether to globalize nested class.
d11ad92e 14424 * cp-decl.c(xref_tag, maybe_globalize_type): Likewise.
7177d104 14425
d11ad92e 14426Mon Jan 3 22:22:32 1994 Gerald Baumgartner <gb@cygnus.com>
7177d104
MS
14427
14428 * Makefile.in cp-call.c cp-class.c cp-cvt.c cp-decl.c cp-decl2.c
14429 cp-error.c cp-init.c cp-lex.c cp-lex.h cp-method.c cp-parse.y
14430 cp-spew.c cp-tree.c cp-tree.h cp-type2.c cp-typeck.c cp-xref.c
14431 gplus.gperf toplev.c: Incorporated C++ signature extension.
14432 * cp-sig.c: New file, contains most of signature processing.
14433 * cp-hash.h: Regenerated from gplus.gperf.
14434
14435 * gcc.1 g++.1: Added explanation for the `-fhandle-signatures'
14436 and `-fno-handle-signatures' command line flags.
14437
14438 * gcc.texi: Changed the last-modification date.
14439 * invoke.texi: Added `-fhandle-signatures' in the list of
14440 C++ language options. Added explanation for this option.
14441
6060a796 14442Tue Dec 28 21:10:03 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
14443
14444 * cp-init.c (expand_vec_init): Remove comptypes test, as it is too
14445 harsh here.
14446
6060a796 14447Tue Dec 28 13:42:22 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
14448
14449 * cp-pt.c (do_pending_expansions): Decide to expand a template
14450 member function, based upon it's class type, not the class type of
14451 the first place it was declared.
14452
6060a796 14453Tue Dec 28 05:42:31 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
14454
14455 * cp-class.c (is_normal): New routine, use to determine when the
14456 given binfo is the normal one. (The one that should have the simple
14457 vtable name.)
14458 * cp-class.c (modify_other_vtable_entries): Use DECL_ASSEMBLER_NAME
14459 to check if two fndecls are `the same'. Sometimes this routine can
14460 modify the main vtable, and normal should be 1, in that case, so use
14461 is_normal() to determine if this is the main vtable for the class.
14462 Don't recurse down virtual bases, as they are shared, and we take
14463 care of them elsewhere.
14464 * cp-class.c (modify_vtable_entries): If we have already updated the
14465 vtable with the new virtual, don't do it again.
14466 * cp-class.c (finish_struct): Set CLASSTYPE_VFIELD_PARENT as
14467 appropriate. Do virtual function overriding in virtual bases, after
14468 normal overriding, so that the base function list in DECL_VINDEX is
14469 not overridden, before we have a chance to run through the list.
14470 Use DECL_ASSEMBLER_NAME to check if two fndecls are `the same'.
14471 Make sure we pass the right address into modify_vtable_entries.
14472 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): New field to indicate which
14473 binfo is the one that has the vtable that we based our vtable on.
14474
d11ad92e 14475Fri Dec 24 09:40:52 1993 Michael Tiemann <tiemann@blues.cygnus.com>
7177d104
MS
14476
14477 * cp-typeck.c (c_expand_start_case): Use default_conversion to
14478 convert expression from reference type if necessary.
14479
d11ad92e 14480Wed Dec 22 17:58:43 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14481
14482 * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before
14483 trying to read its TREE_VALUE.
14484
14485 * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here.
14486 (finish_struct): Instead of here.
14487
d11ad92e 14488Tue Dec 21 14:34:25 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14489
14490 * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't
14491 have TYPE_PTRMEMFUNC_P set before we try to build its
14492 CLASSTYPE_ID_AS_LIST.
14493 (get_decl_list): Likewise, when trying to read it.
14494
14495 * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined.
14496 (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT.
14497
d11ad92e 14498Mon Dec 20 13:35:03 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14499
14500 * cp-typeck.c (rationalize_conditional_expr): New function.
14501 (unary_complex_lvalue): Use it.
14502 (build_modify_expr): Use it, since trying to do an ADDR_EXPR of it
14503 with build_unary_op won't cut it. Don't wrap the COND_EXPR with a
14504 SAVE_EXPR either.
14505
14506 * cp-decl2.c (explicit_warn_return_type): Deleted variable.
14507 (lang_decode_option): Set warn_return_type, not explicit_*, for
14508 -Wreturn-type and -Wall. This is what rest_of_compilation uses to
14509 decide if it should go into jump_optimize or not.
14510 * cp-tree.h (explicit_warn_return_type): Deleted.
14511 * cp-decl.c (grokdeclarator): Use warn_return_type, not explicit_*.
14512 (finish_function): Also complain about no return in a non-void fn if
14513 we're being pedantic (don't rely on use of -Wreturn-type).
14514
d11ad92e 14515Fri Dec 17 15:45:46 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14516
14517 * cp-decl.c (grokdeclarator): Forbid declaration of a function as
14518 static if it's being done inside another function.
14519
14520 * cp-search.c (compute_visibility): Check for friendship both ways.
14521
d11ad92e 14522Fri Dec 17 14:28:25 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14523
14524 * cp-cvt.c (build_default_binary_type_conversion): Make error
14525 messages more helpful.
14526
14527 * cp-error.c (op_as_string): New function, returns "operator =="
14528 given EQ_EXPR or suchlike.
14529
d11ad92e 14530Fri Dec 17 13:28:11 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14531
14532 * cp-call.c (print_n_candidates): New function.
14533 (build_overload_call_real): Use it when we complain about a call
14534 being ambiguous.
14535
d11ad92e 14536Fri Dec 17 12:41:17 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14537
14538 * cp-call.c (build_method_call): Fix checking for static call
14539 context.
14540
14541 * cp-method.c (build_opfncall): Call build_indirect_ref on argument
14542 to operator new.
14543
14544 * cp-init.c (build_new): Don't mess with rval when building
14545 indirect ref.
14546
d11ad92e 14547Thu Dec 16 16:48:05 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
14548
14549 * cp-lex.c (default_assign_ref_body): add check when TYPE_NESTED_
14550 NAME(type) may not be exist. It's not a problem for old compiler.
14551
d11ad92e 14552Thu Dec 16 14:46:06 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14553
14554 * cp-tree.h (CLASSTYPE_ALTERS_VISIBILITIES_P): Delete macro, it's
14555 never used for anything.
14556 (struct lang_type, member type_flags): Delete field
14557 `alters_visibility', and up `dummy' by 1.
14558 * cp-class.c (finish_base_struct): Delete code that copies the
14559 setting of CLASSTYPE_ALTERS_VISIBILITIES_P.
14560 (finish_struct): Delete code that sets it.
14561
d11ad92e 14562Thu Dec 16 14:44:39 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14563
14564 * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to
14565 build_method_call that I messed up before.
14566
14567 * cp-search.c (get_base_distance): If protect > 1, allow immediate
14568 private base.
14569
14570 * cp-class.c (finish_base_struct): Set cant_synth_* correctly.
d11ad92e 14571 (finish_struct): Likewise. Well, nigh-correctly; it won't deal
7177d104
MS
14572 properly with the case where a class contains an object of an
14573 ambiguous base class which has a protected op=. Should be fixed
14574 when the access control code gets overhauled.
14575 (finish_struct_methods): Set TYPE_HAS_NONPUBLIC_* correctly.
14576
d11ad92e 14577Thu Dec 16 12:17:06 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14578
14579 * cp-lex.c (real_yylex): Turn the code back on that deals with
14580 __FUNCTION__ and __PRETTY_FUNCTION__. Don't use lookup_name, to
14581 avoid the ambiguity problems that led to it being turned off in the
14582 first place.
14583
14584 * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P
14585 to see if something is a method.
14586
6060a796 14587Wed Dec 15 18:35:58 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
14588
14589 * cp-typeck.c (build_modify_expr): Avoid error messages on small
14590 enum bit fields.
14591 * cp-typeck.c (convert_for_assignment): Add missing argument to
14592 cp_warning and cp_pedwarn calls.
14593
d11ad92e 14594Wed Dec 15 18:25:32 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14595
14596 * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base
14597 initializers; it's just anachronistic.
14598
14599 * cp-decl.c (finish_decl): Don't require external-linkage arrays
14600 to have a complete type at declaration time when pedantic.
14601
d11ad92e 14602Tue Dec 14 11:37:23 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14603
14604 * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set.
14605
14606 * cp-call.c (build_method_call): Don't dereference pointer given
14607 as instance.
14608
14609 * cp-decl.c (finish_function): Don't pass pointer to
14610 build_method_call.
d11ad92e 14611 (finish_function): Likewise.
7177d104 14612
d11ad92e 14613 * cp-typeck.c (build_x_function_call): Likewise.
7177d104 14614
d11ad92e 14615 * cp-method.c (build_component_type_expr): Likewise.
7177d104 14616
d11ad92e
MS
14617 * cp-init.c (build_member_call): Likewise.
14618 (build_new): Likewise.
7177d104 14619
d11ad92e 14620Mon Dec 13 18:04:33 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
14621
14622 * cp-decl.c (xref_tag): fix regression created by changes made
14623 in Dec. 7 1993.
14624 * cp-decl.c (xref_defn_tag): fix parallel nested class problem.
14625
d11ad92e 14626Fri Dec 10 12:40:25 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14627
14628 * cp-call.c (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print
14629 out the final evaluation of the function, so we can see if ELLIPSIS,
14630 USER, and EVIL were set at the end.
14631
14632 * cp-call.c (convert_harshness_ansi): When the parm isn't an lvalue,
14633 only go for setting TRIVIAL_CODE if we are dealing with types that
14634 are compatible.
14635
6060a796 14636Thu Dec 9 18:27:22 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
14637
14638 * cp-decl.c (flag_huge_objects): New flag to allow large objects.
d11ad92e
MS
14639 * toplev.c (lang_options): Likewise.
14640 * cp-decl2.c (flag_huge_objects, lang_f_options): Likewise.
7177d104 14641 * cp-decl.c (delta_type_node): New type for delta entries.
d11ad92e 14642 * cp-tree.h (delta_type_node): Likewise.
7177d104
MS
14643 * cp-decl.c (init_decl_processing): Setup delta_type_node.
14644 * cp-decl.c (init_decl_processing, build_ptrmemfunc_type): Use
14645 delta_type_node instead of short_integer_type_node.
d11ad92e 14646 * cp-class.c (build_vtable_entry): Likewise.
7177d104 14647
d11ad92e 14648Thu Dec 9 16:19:05 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14649
14650 * cp-tree.h (OPERATOR_TYPENAME_P): Define outside of
14651 NO_{DOLLAR,DOT} macro checks, so it always gets defined.
14652 (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL.
14653
6060a796 14654Wed Dec 8 17:38:06 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
14655
14656 * cp-decl.c (finish_decl): Make sure things that can go into
14657 "common", do go into common, if -fcommon is given.
14658
d11ad92e 14659Wed Dec 8 13:01:54 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104 14660
63718c49
GB
14661 * cp-call.c (print_harshness) [DEBUG_MATCHING]: New function.
14662 (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print out
14663 argument matching diagnostics to make instantly clear what the
14664 compiler is doing.
7177d104
MS
14665
14666 * cp-call.c (convert_harshness_ansi): If the parm isn't an lvalue,
14667 then check to see if the penalty was increased due to
14668 signed/unsigned mismatch, and use a TRIVIAL_CODE if it wasn't.
14669
d11ad92e 14670Tue Dec 7 18:29:14 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
14671
14672 * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution
14673 problem.
14674
d11ad92e 14675Tue Dec 7 16:09:34 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14676
14677 * cp-class.c (finish_struct): Before synthesizing methods, if no
14678 methods have yet been declared then set nonprivate_method. Don't
14679 set non_private method after synthesizing a method.
14680
14681 * cp-lex.c (extract_interface_info): If flag_alt_external_templates
14682 is set, tie emitted code to the location of template instantiation,
14683 rather than definition.
14684
14685 * cp-tree.h: Declare flag_alt_external_templates.
14686
14687 * cp-decl2.c (lang_decode_option): Support -falt-external-templates.
14688
d11ad92e 14689 * toplev.c (lang_options): Likewise.
7177d104 14690
d11ad92e 14691Mon Oct 4 12:50:02 1993 Chip Salzenberg <chip@fin.uucp>
7177d104 14692
63718c49
GB
14693 [changes propagated from 930810 snapshot]
14694 * cp-decl.c (init_decl_processing): Make long long available for use
14695 as SIZE_TYPE and PTRDIFF_TYPE.
14696 (finish_decl): Allow file-scope static incomplete array.
14697 (grokdeclarator): Don't pass on const and volatile fron function
14698 value type to function type.
14699 Warn here for volatile fn returning non-void type.
14700 * cp-parse.y (attrib): Accept attributes `volatile' with alias
14701 `noreturn', and `const'.
14702 * cp-typeck.c (default_conversion): Don't lose const and volatile.
14703 (build_binary_op_nodefault): Generate pedantic warning for comparison
14704 of complete pointer type with incomplete pointer type.
14705 (build_c_cast): Be careful that null pointer constant be INTEGER_CST.
7177d104 14706
d11ad92e 14707Tue Dec 7 10:46:48 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14708
14709 * cp-init.c (expand_vec_init): When creating a temporary for copying
14710 arrays, use the type of the source, not the target.
14711
14712 * cp-cvt.c (convert): Pass an argument for errtype to
14713 convert_to_reference.
14714
14715 * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with
14716 methods, -> and `this'.
14717
d11ad92e 14718Mon Dec 6 17:12:33 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14719
14720 * cp-error.c (parm_as_string): New function; returns `this' or arg
14721 number. Corresponds to %P.
14722 (dump_expr): Deal with method calls.
14723
14724 * cp-cvt.c (convert_to_reference): Stop using warn_for_assignment.
d11ad92e 14725 * cp-typeck.c (convert_for_assignment): Likewise.
7177d104
MS
14726 (warn_for_assignment): Lose.
14727
d11ad92e 14728Mon Dec 6 11:33:35 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14729
14730 * cp-call.c (ideal_candidate_ansi): Delete code that was never
14731 doing anything useful. Instead, sort once, and DO NOT wipe
14732 out any codes with EVIL_CODE, since that's what we use as a
14733 marker for the end of the list of candidates.
14734
14735 * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN.
14736
d11ad92e 14737Mon Dec 6 12:49:17 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14738
14739 * cp-init.c (get_aggr_from_typedef): New function, like
14740 is_aggr_typedef but returns the _TYPE.
14741
14742 * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name.
14743
d11ad92e 14744Sun Dec 5 18:12:48 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14745
14746 * cp-lex.c (readescape): Pedwarn when a hex escape is out of range.
14747
d11ad92e 14748Thu Nov 25 23:50:19 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14749
14750 Delay language context change until beginning of next decl.
14751
14752 * cp-lex.h (c_header_level): Removed.
14753 (pending_lang_change): Declared.
14754 * cp-lex.c (c_header_level): Renamed from in_c_header, made static.
14755 (pending_lang_change): Defined.
14756 (check_newline): Rework code that recognizes line number and
14757 filename changes. Instead of pushing and popping lang context,
14758 increment and decrement pending_lang_change.
14759 (do_pending_lang_change): Push and pop lang context according
14760 to value of pending_lang_change.
14761 * cp-parse.y (extdefs): Use lang_extdef instead of extdef.
14762 (extdef): Same as extdef, but call do_pending_lang_change() first.
14763
d11ad92e 14764Mon Nov 15 15:39:15 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14765
14766 * cp-typeck.c (build_binary_op_nodefault): Warn for ordered
14767 compare of ptr with 0 only if pedantic in both cases.
14768
d11ad92e 14769Thu Nov 25 13:31:37 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14770
14771 Reinstate the below patch, which got lost in the Cygnus merge:
14772 Tue Nov 23 13:59:24 1993 Hallvard B Furuseth (hbf@durin.uio.no)
14773 * cp-parse.y (maybe_type_qual): Don't fail to set $$.
14774
d11ad92e 14775Wed Nov 17 19:03:30 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14776
14777 * cp-parse.y (attrib): Allow "ident(ident)" like the C front end.
14778
d11ad92e 14779Fri Oct 22 20:43:37 1993 Paul Eggert <eggert@twinsun.com>
7177d104
MS
14780
14781 * cp-lex.c (real_yylex): Diagnose floating point constants
14782 that are too large.
14783
d11ad92e 14784Wed Nov 17 19:10:37 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14785
14786 * cp-type2.c (build_functional_cast): ARM page 16: When a class
14787 and an object, function or enumerator are declared in the same
14788 scope with the same name, the class name is hidden.
14789
d11ad92e 14790Wed Nov 17 19:07:18 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14791
14792 * cp-call.c (convert_harshness_ansi): Distinguish float, double,
14793 and long double from each other when overloading.
14794 (compute_conversion_costs_{ansi,old}, build_method_call,
14795 build_overlay_call_real, convert_to_aggr): Always set and
14796 always use H_LEN member of candidate structure.
14797
d11ad92e 14798Mon Oct 11 23:10:53 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14799
14800 * cp-decl.c (duplicate_decls): Note redeclarations of library
14801 functions, and generate distinct warnings for them.
14802
d11ad92e 14803Mon Oct 4 12:26:49 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14804
14805 Support format warnings in G++.
14806
14807 * cp-tree.h: Protect against multiple inclusion.
14808 Declare all public functions in c-common.c (copy from c-tree.h).
14809 (STDIO_PROTO): Define.
14810 (warn_format): Declare.
14811 (record_format_info): Remove declaration.
14812 * cp-decl.c (init_decl_processing): Call init_function_format_info.
14813 * cp-decl2.c (lang_decode_option): Make "-Wall" include warn_format.
14814 * cp-typeck.c (build_function_call_real): Call check_function_format.
14815 (record_format_info): Remove -- obsolete stub.
14816
d11ad92e 14817Sat Jul 24 12:04:29 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14818
14819 * cp-decl.c (duplicate_decls): Don't warn for non-extern var decl
14820 following an extern one (for -Wredundant-decls).
14821 * cp-parse.y (primary): In statement expression case, if compstmt
14822 returns something other than a BLOCK, return it unchanged.
14823
d11ad92e 14824Thu Dec 2 20:44:58 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14825
14826 * cp-decl.c (warn_extern_redeclared_static): New function made
14827 from code extracted from pushdecl.
14828 (duplicate_decls, pushdecl): Call new function.
14829 (lookup_name_current_level): Allow for IDENTIFIER_GLOBAL_VALUE
14830 to be a TREE_LIST when function is declared in 'extern "C" {}'.
14831
d11ad92e 14832Fri Dec 3 16:01:10 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14833
14834 * cp-class.c (duplicate_tag_error): Use cp_error.
14835 (finish_base_struct): Check for ambiguity with direct base, and don't
14836 generate op= or copy ctor if it exists.
14837
d11ad92e 14838Fri Dec 3 15:32:34 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
14839
14840 * cp-init.c (expand_member_init): when initializer name is null,
14841 don't try to build it now because emit_base_init will handle it.
14842
d11ad92e 14843Fri Dec 3 12:28:59 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14844
14845 * cp-lex.c (init_lex): Initialize input_filename to "<internal>" for
14846 code such as ExceptionHandler::operator=.
14847
d11ad92e 14848Fri Dec 3 10:32:08 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14849
14850 * cp-decl.c (grokdeclarator): Don't try to print out dname when
14851 complaining about arrays of references if decl_context==TYPENAME,
14852 since it will be null.
14853
14854 * cp-decl2.c: Default to flag_ansi_overloading.
14855
d11ad92e 14856Thu Dec 2 18:05:56 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
14857
14858 * cp-call.c (build_method_call): use binfo from instance if it's
14859 different from binfo (basetype_path) passed from above.
14860
d11ad92e 14861Wed Nov 17 19:14:29 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14862
14863 cp-error.c (dump_expr): Use unsigned chars to output a
14864 TREE_REAL_CST in hex.
14865
d11ad92e 14866Thu Dec 2 11:05:48 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14867
14868 * cp-class.c (finish_struct): Fix typo in setting
14869 cant_synth_asn_ref.
14870
14871 * cp-tree.h (TYPE_NESTED_NAME): New macro, does
14872 DECL_NESTED_TYPENAME (TYPE_NAME (NODE)).
14873
14874 * cp-lex.c (default_copy_constructor_body): Change
14875 DECL_NAME (TYPE_NAME (btype)) to TYPE_NESTED_NAME (btype).
d11ad92e 14876 (default_assign_ref_body): Likewise.
7177d104
MS
14877 (default_copy_constructor_body): Call operator= explicitly for
14878 base classes that have no constructor.
14879
d11ad92e 14880Thu Dec 2 10:47:15 1993 Michael Tiemann <tiemann@blues.cygnus.com>
7177d104
MS
14881
14882 * cp-call.c (build_method_call): If the instance variable is
14883 converted to error_mark_node when we're trying to convert it to the
14884 base type of a method we're looking up, return error_mark_node.
14885
d11ad92e 14886Thu Dec 2 10:41:16 1993 Torbjorn Granlund <tege@cygnus.com>
7177d104
MS
14887
14888 * cp-typeck.c (build_binary_op_nodefault): In *_DIV_EXPR *_MOD_EXPR
14889 cases, tests for unsigned operands by peeking inside a NOP_EXPR.
14890
d11ad92e 14891Wed Dec 1 13:33:34 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14892
14893 * cp-call.c (compute_conversion_costs_ansi): Use the size of struct
14894 harshness_code, not the size of short, for clearing out the
14895 ansi_harshness.
14896
14897 * cp-call.c (print_candidates): New function.
14898 (build_method_call): When we had some candidates, but didn't get a
14899 usable match, don't report that we got an error with the first
14900 candidate. Instead, say there were no matches, and list the
14901 candidates with print_candidates. In the second pass, make sure we
14902 clear out ever_seen, so we can accurately count the number of
14903 functions that qualified.
14904
d11ad92e 14905Wed Dec 1 09:53:59 1993 Torbjorn Granlund <tege@cygnus.com>
7177d104
MS
14906
14907 * cp-typeck.c (build_binary_op_nodefault): Shorten for *_MOD_EXPR
14908 only if op1 is known to be != -1.
14909 (build_binary_op_nodefault): Handle *_DIV_EXPR likewise.
14910
d11ad92e 14911Tue Nov 30 14:07:26 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14912
14913 * cp-method.c (hack_identifier): If the field itself is private, and
14914 not from a private base class, say so.
14915
d11ad92e 14916Mon Nov 29 03:00:56 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14917
14918 * cp-decl.c (grokdeclarator): Always warn on initialization of
14919 const member.
14920
d11ad92e 14921Wed Nov 24 00:49:35 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14922
14923 * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly.
14924 (finish_base_struct): Set cant_synth_asn_ref properly.
14925
14926 * cp-lex.c (cons_up_default_function): Add section for operator=.
14927 (default_assign_ref_body): New function, mostly cribbed from
14928 default_copy_constructor_body.
14929
14930 * cp-class.c (base_info): Add members cant_synth_copy_ctor,
14931 cant_synth_asn_ref, no_const_asn_ref.
14932 (finish_base_struct): Update no_const_asn_ref, note that you should
14933 update cant_synth_*, propagate TYPE_GETS_ASSIGN_REF.
14934 (finish_struct): Add decls for cant_synth_*, no_const_asn_ref, and
14935 initialize them properly. Set no_const_asn_ref properly. Set
14936 cant_synth_* in some of the situations where they should be set.
14937 Propagate TYPE_GETS_ASSIGN_REF. Use cant_synth_copy_ctor. Add call
14938 to cons_up_default_function for operator=.
14939
6060a796 14940Tue Nov 23 20:24:58 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
14941
14942 * cp-cvt.c (convert_force): Add code to perform casting of pointer
14943 to member function types.
14944 * cp-typeck.c (build_ptrmemfunc): Add FORCE parameter to indicate
14945 when the conversion should be done, regardless.
d11ad92e
MS
14946 * cp-tree.h (build_ptrmemfunc): Likewise.
14947 * cp-type2.c (digest_init): Likewise.
14948 * cp-typeck.c (convert_for_assignment): Likewise.
7177d104 14949
d11ad92e 14950Tue Nov 23 18:06:58 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14951
14952 * cp-error.c (dump_expr): Do the right thing for variables of
14953 reference type.
14954
14955 * cp-decl.c (grok_op_properties): Set TYPE_HAS_ASSIGN_REF
14956 and its kin properly.
14957 (xref_tag): Propagate TYPE_GETS_ASSIGN_REF.
14958
6060a796 14959Tue Nov 23 12:26:13 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
14960
14961 * cp-method.c (build_opfncall): Don't count pointer to member
14962 functions as aggregates here, as we don't want to look up methods in
14963 them. The compiler would core dump if we did, as they don't have
14964 normal names.
14965 * cp-typeck.c (build_indirect_ref): Improve wording on error
14966 message.
14967
d11ad92e 14968Mon Nov 22 14:22:23 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14969
14970 * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn
14971 (since it's supported in other compiler bits).
14972
14973 * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name
14974 argument.
14975
14976 * cp-error.c (dump_function_decl): Don't print return type for
14977 constructors and destructors.
14978
14979 * cp-cvt.c (cp_convert_to_pointer): Import code from
14980 convert_to_pointer so we can return error_mark_node in the case of an
14981 error, and to allow more meaningful error messages.
14982 (build_type_conversion): Don't go through void* when trying
14983 to convert to a pointer type.
14984
14985 * cp-decl.c (grokfndecl): Move call to grok_op_properties back
14986 after grokclassfn so that it's dealing with the right decl.
63718c49 14987 (grok_op_properties): Don't assert !methodp for op new and op delete.
7177d104
MS
14988
14989 * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now
14990 no uses of it in the compiler).
14991
14992 * cp-call.c (build_scoped_method_call): Fix for destructors of simple
14993 types.
d11ad92e 14994 (build_method_call): Likewise.
7177d104 14995
d11ad92e 14996Fri Nov 19 12:59:38 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14997
14998 * cp-tree.c (count_functions): Abstraction function.
14999
15000 * cp-call.c (build_overload_call_real): Deal with new overloading
15001 properly, remove dead code.
15002
15003 * gcc.c (default_compilers): Generate and use .ii files in the
15004 intermediate stage of compiling C++ source.
15005
d11ad92e 15006Fri Nov 19 11:26:09 1993 Jim Wilson <wilson@sphagnum.cygnus.com>
7177d104
MS
15007
15008 * cp-expr.c (cplus_expand_expr): Make call_target a valid memory
15009 address before using it, so it can be later safely compared.
15010
d11ad92e 15011Fri Nov 12 15:30:27 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
15012
15013 * cp-pt.c (tsubst): Deal with new overloading.
15014
15015 * cp-typeck.c (fntype_p): is the arg function type?
15016 (comp_target_parms): pedwarn on conversion from (anything) to (...).
15017 (build_x_function_call): Deal with new overloading.
15018
15019 * cp-tree.c (decl_list_length): Deal with new overloading.
15020 (decl_value_member): Like value_member, but for DECL_CHAINs.
15021
15022 * cp-decl.c (duplicate_decls): Deal with new overloading.
d11ad92e 15023 (start_decl): Likewise.
7177d104
MS
15024
15025 * cp-class.c (instantiate_type): Deal with new overloading.
15026
15027 * cp-call.c (convert_harshness_ansi): Deal with new overloading.
15028 (convert_harshness_old): Deal with new overloading.
d11ad92e 15029 (build_overload_call_real): Likewise.
7177d104 15030
d11ad92e 15031Mon Nov 8 13:50:49 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
15032
15033 * cp-tree.c (get_unique_fn): New function; returns FUNCTION_DECL
15034 if unambiguous, NULL_TREE otherwise.
15035 (get_first_fn): Returns the first appropriate FUNCTION_DECL.
15036 (is_overloaded_fn): Returns whether or not the passed tree is
15037 a function or list of functions.
15038
15039 * cp-init.c (init_init_processing): use `get_first_fn' to find
15040 the FUNCTION_DEFN for new and delete.
15041
15042 * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut
15043 code size in half (I spit on special cases).
15044
d11ad92e 15045Tue Sep 7 20:03:33 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
15046
15047 * cp-decl.c: Allow references and template type parameters as well
This page took 1.805359 seconds and 5 git commands to generate.