1 Wed Sep 14 10:17:27 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
3 * g++.c: Include <sys/errno.h> in case `errno' is a macro
4 as permitted by ANSI C.
6 Thu Sep 22 12:53:03 1994 Per Bothner (bothner@kalessin.cygnus.com)
8 * decl2.c (finish_file): Fix Brendan's fix: Only call
9 register_exception_table if there is a non-empty exception table.
11 Thu Sep 22 12:03:46 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
13 * decl2.c (finish_file): Only do register_exception_table if
14 -fhandle-exceptions is being used.
16 Wed Sep 21 19:01:51 1994 Per Bothner (bothner@kalessin.cygnus.com)
18 * except.c (output_exception_table_entry): Simplify
19 by using assemble_integer.
20 (build_exception_table): Change to return a count.
21 Cleanup to use standard macros, instead of hard-wired
22 sparc asm format. Don't make __EXCEPTION_TABLE__ global.
23 (register_exception_table): New function. Generate call to builtin.
24 * decl2.c (finish_file): Call register_exception_table.
25 * cp-tree.h (build_exception_table): Fix prototype.
27 Wed Sep 21 13:20:42 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
29 * tree.c (break_out_calls): Don't try to duplicate the DECL_INITIAL.
31 * decl2.c (delete_sanity): Give an error at trying to delete a
34 Wed Sep 21 11:47:10 1994 Jason Merrill (jason@deneb.cygnus.com)
36 * lex.c (cons_up_default_function): Mark synthesized destructors
39 * decl.c (duplicate_decls): Ignore redeclarations of wchar_t as
40 something other than __wchar_t, complaining if -pedantic and not in
43 Tue Sep 20 09:43:28 1994 Jason Merrill (jason@deneb.cygnus.com)
45 * decl.c (xref_tag): Set up BINFO_INHERITANCE_CHAIN on base binfos
48 * typeck.c (build_modify_expr): Require complete type after checking
51 * call.c (build_method_call): Print parmtypes when complaining of
54 * typeck.c (build_modify_expr): Handle assignment to array from
57 * decl.c (lookup_name_real): Deal with got_scope == error_mark_node.
59 * call.c (build_method_call): Don't bother with the exact match.
61 Mon Sep 19 00:51:39 1994 Jason Merrill (jason@deneb.cygnus.com)
63 * init.c (expand_aggr_init): If we munge the type of the variable,
64 also munge the type of the initializer.
66 * decl.c (grokdeclarator): Use <= when comparing to RID_LAST_MODIFIER.
67 (init_decl_processing): Push artificial declaration of wchar_t so
68 people don't have to declare it before they can use it.
70 * error.c (cp_line_of): return lineno in lieu of 0.
72 * typeck.c (convert_for_assignment): Handle conversion of pmfs to
74 (build_component_ref): Fold the COMPONENT_REF in case it can be
77 * typeck2.c (store_init_value): Don't pedwarn about non-constant
78 bracketed initializers for automatic variables.
80 Sun Sep 18 10:12:12 1994 Jason Merrill (jason@deneb.cygnus.com)
82 * error.c (dump_decl): Don't say `typedef enum foo foo'.
84 * decl.c (start_decl): Don't set TREE_PUBLIC on template decls just
85 because they're affected by #pragma i/i. We'll deal with that when
86 they get instantiated.
88 * typeck.c (build_unary_op): Clean up cruft in ADDR_EXPR case.
90 * class.c (instantiate_type): Set TREE_CONSTANT on instantiated
91 ADDR_EXPRs if appropriate.
93 * decl.c (build_ptrmemfunc_type): Unset IS_AGGR_TYPE on pmf types.
95 * typeck.c (build_ptrmemfunc): Handle &overloaded_method as an
97 * typeck2.c (digest_init): Ditto.
99 * tree.c (cp_build_type_variant): Like c_build_type_variant, except
100 it uses build_cplus_array_type.
101 * *.c: Use cp_build_type_variant instead of c_build_type_variant.
103 * pt.c (do_type_instantiation): Don't try to instantiate nested
106 Tue Sep 13 10:56:58 1994 Jason Merrill (jason@deneb.cygnus.com)
108 * cvt.c (build_up_reference): Handle preincrement and predecrement
111 Tue Sep 13 09:51:59 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
113 * decl.c (finish_decl): Only lay out the rtl for DECL if it is, in
116 Mon Sep 12 14:40:30 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
118 * decl.c (finish_decl): Lay out the rtl for DECL before doing
119 grok_reference_init, in case it's static.
121 Mon Sep 12 12:45:38 1994 Jason Merrill (jason@deneb.cygnus.com)
123 * class.c (finish_struct): Don't synthesize constructors if the
124 class has a field with the same name as the class. Don't die on
125 classes with no constructors or destructors. Don't die if the head
126 and tail of the class are in different files.
128 * decl.c (grokdeclarator): Don't treat a function pointer field
129 with the same name as the class as a constructor.
131 Fri Sep 9 13:17:00 1994 Jason Merrill (jason@deneb.cygnus.com)
133 * typeck.c (build_c_cast): Pull constant values out of their
136 * decl.c (duplicate_decls): Only propagate DECL_CHAIN in
137 FUNCTION_DECLs and TEMPLATE_DECLs.
139 Thu Sep 8 10:07:48 1994 Jason Merrill (jason@deneb.cygnus.com)
141 * decl.c (duplicate_decls): Propagate DECL_CHAIN in all DECLs that
144 * pt.c (unify): REALs and INTEGERs only unify with their own genus.
145 (instantiate_member_templates): Don't muck with DECL_EXTERNAL and
146 TREE_PUBLIC unless -fexternal-templates.
148 Wed Sep 7 13:17:10 1994 Jason Merrill (jason@deneb.cygnus.com)
150 * pt.c (do_type_instantiation): Call instantiate_member_templates.
151 Deal with specializations.
152 (tsubst): Don't stick the mangled name in DECL_NAME for function
153 instantiations. Don't push them, either.
155 * decl2.c (grokfield): Move code for generating the
156 DECL_ASSEMBLER_NAME for static members from here.
157 * method.c (build_static_name): To here.
158 * decl.c (grokvardecl): Call build_static_name.
159 (duplicate_decls): Keep old DECL_ASSEMBLER_NAME.
161 Mon Sep 5 12:49:18 1994 Jason Merrill (jason@deneb.cygnus.com)
163 * call.c (build_method_call): if -Wsynth, warn when selecting
164 synthesized op= over user-supplied one cfront would select.
165 * decl2.c (lang_decode_option): Handle -Wsynth.
167 Fri Sep 2 15:11:59 1994 Jason Merrill (jason@deneb.cygnus.com)
169 * decl.c (finish_enum): Overhaul to fix several bugs.
170 (start_enum): Disable useless code.
172 Thu Sep 1 16:04:54 1994 Jason Merrill (jason@deneb.cygnus.com)
174 * typeck.c (c_expand_return): Warn about returning a reference to a
176 (convert_arguments): Increment argument counter when using default
179 Wed Aug 31 14:29:22 1994 Jason Merrill (jason@deneb.cygnus.com)
181 * decl.c (finish_decl): If the type of decl is error_mark_node,
182 don't bother trying to do anything.
184 * typeck.c (convert_for_initialization): If the rhs contains a
185 constructor call, pretend the lhs type needs to be constructed.
187 * init.c (expand_default_init): If we stick the object inside the
188 initializer, mark the initializer used.
190 Tue Aug 30 13:50:18 1994 Jason Merrill (jason@deneb.cygnus.com)
192 * method.c (build_assign_ref): return *this;
193 (build_assign_ref): Fix base assignment order.
194 (build_copy_constructor): Fix member init order.
196 Mon Aug 29 13:54:39 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
198 * g++.c (main): Remember to clear out SAW_SPECLANG after we see
201 Sat Aug 27 09:36:03 1994 Jason Merrill (jason@deneb.cygnus.com)
203 * method.c (build_copy_constructor): Also copy virtual bases.
205 Fri Aug 26 17:05:15 1994 Jason Merrill (jason@deneb.cygnus.com)
207 * lex.c (do_pending_inlines): Clear out pending_inlines before doing
208 any synthesis. Also first set deja_vu on all pending_inlines.
210 * method.c (build_assign_ref): Use build_member_call to invoke base
211 operator=, rather than build_modify_expr. And use
212 build_reference_type instead of TYPE_REFERENCE_TO.
213 (build_copy_constructor): Use TYPE_NESTED_NAME to identify the
216 * decl2.c (grokfield): Don't complain about undefined local class
219 * class.c (finish_struct): Don't try to synthesize methods here.
220 * lex.c (do_pending_inlines): Instead, synthesize them here.
221 (init_lex): Initialize synth_obstack.
222 (cons_up_default_function): Stick synthesis request on
225 Fri Aug 26 12:24:14 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
227 * call.c (build_method_call) [PCC_STATIC_STRUCT_RETURN]: Also
228 accept an RTL_EXPR in what we're about to use for the instance,
229 since anything which would end up with pcc_struct_return set
230 inside cplus_expand_expr.
232 * cp-tree.h (cons_up_default_function): Note change of prototype.
234 Thu Aug 25 23:05:30 1994 Gerald Baumgartner (gb@cs.purdue.edu)
236 * class.c (finish_struct): Undid change from Aug 21 testing
237 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
238 * parse.y (left_curly): Ditto, undid change from Aug 21.
239 * decl.c (xref_tag): Undid change from Aug 21, set
240 CLASSTYPE_INTERFACE correctly, and added comments.
242 Thu Aug 25 00:36:31 1994 Jason Merrill (jason@deneb.cygnus.com)
244 Rework approach to synthesized methods; don't go through the parser
246 * class.c (finish_struct): Use new synthesis approach.
247 * lex.c (cons_up_default_function): Now just creates declaration,
249 (largest_union_member): #if 0 out.
250 (default_assign_ref_body): Ditto.
251 (default_copy_constructor_body): Ditto.
252 * method.c (build_default_constructor): New function to synthesize X().
253 (build_copy_constructor): Synthesize X(X&).
254 (build_assign_ref): Synthesize X::operator=(X&).
255 (build_dtor): Synthesize ~X().
257 * error.c (cp_line_of): If we're dealing with an artificial
258 TYPE_DECL, look at the type instead.
260 Wed Aug 24 11:11:50 1994 Jason Merrill (jason@deneb.cygnus.com)
262 * init.c (sort_member_init): Check warn_reorder.
263 * decl2.c (lang_decode_option): Handle -W{no-,}reorder.
265 * cp-tree.h (CLASSTYPE_SOURCE_LINE): New macro.
266 * error.c (cp_line_of): Use CLASSTYPE_SOURCE_LINE for aggregates.
267 * class.c (finish_struct): Set CLASSTYPE_SOURCE_LINE.
269 Tue Aug 23 09:28:35 1994 Mike Stump (mrs@cygnus.com)
271 * error.c (dump_decl): Improve wording, so that error messages
272 dont't read template<, class foo>...
274 Mon Aug 22 15:30:51 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
276 * parse.y (label_colon): Also match a TYPENAME as a label name,
277 since they may have declared a class by that name but have also
278 tried to have a local label under the same name.
280 * pt.c (coerce_template_parms): Call cp_error, not cp_error_at,
281 for the message so they know at what point it was instantiated.
283 Sun Aug 21 23:07:35 1994 Gerald Baumgartner (gb@cs.purdue.edu)
285 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
286 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures up to left_curly time.
287 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
288 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures down to left_curly time.
289 * parse.y (left_curly): New final resting place for setting
290 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING for signatures.
292 * class.c (finish_struct): Don't test for function/field name
293 conflicts in signatures, since all the fields are compiler-constructed.
295 Fri Aug 19 14:04:47 1994 Kung Hsu (kung@mexican.cygnus.com)
297 * method.c (build_overload_nested_name): in qualified name
298 mangling, the template with value instantiation will have numeric
299 at end and may mixed with the name length of next nested level.
300 Add a '_' in between.
301 * method.c (build_overload_name): ditto.
302 * method.c (build_overload_identifier): ditto.
304 Thu Aug 18 16:24:43 1994 Mike Stump (mrs@cygnus.com)
306 * error.c (dump_decl): Handle NULL args.
308 Thu Aug 18 12:48:09 1994 Mike Stump (mrs@cygnus.com)
310 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
311 CLASSTYPE_VTABLE_NEEDS_WRITING up to left_curly time.
312 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
313 CLASSTYPE_VTABLE_NEEDS_WRITING down to left_curly time.
314 * parse.y (left_curly): New final resting place for setting
315 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
317 Thu Aug 11 11:32:42 1994 H.J. Lu (hjl@nynexst.com)
319 * g++.c (main): Only decrement "added" and set "library" to
320 NULL when "library" != NULL.
322 Sat Aug 13 00:14:52 1994 Jason Merrill (jason@deneb.cygnus.com)
324 * decl.c (grokdeclarator): Don't set TREE_PUBLIC on a function decl
325 just because its class has a known interface.
326 (decls_match): Deal with new format of template parms.
328 * lex.c (cons_up_default_function): Don't play with TREE_PUBLIC and
331 Fri Aug 12 01:55:15 1994 Jason Merrill (jason@deneb.cygnus.com)
333 * decl.c (pushtag): SET_DECL_ARTIFICIAL on gratuitous typedefs.
334 (xref_defn_tag): Ditto.
335 (pushdecl): Only allow artificial typedefs to be shadowed.
337 * init.c (emit_base_init): Pass the right binfos to
340 * class.c (delete_duplicate_fields_1): Make it work right.
341 (finish_struct): Catch function/field name conflict.
343 * decl2.c (check_classfn): Pass the function to cp_error, not just
346 * init.c (sort_member_init): Warn when order of member initializers
347 does not match order of member declarations.
348 (emit_base_init): Call expand_aggr_init_1 with LOOKUP_PROTECT.
350 * error.c (dump_expr): Handle lists of functions.
352 * decl.c (start_function): #pragma interface only affects functions
353 that would otherwise be static.
354 (finish_decl): Don't warn about an unused variable if it has both
355 constructor and destructor, since the 'resource allocation is
356 initialization' idiom is relatively common.
358 * typeck.c (comp_target_types): Don't handle TEMPLATE_TYPE_PARMs.
359 (comp_target_parms): Ditto.
360 (compparms): Never consider default parms.
361 (common_base_type): Don't choose a virtual baseclass if there is a
362 more derived class in common.
363 (build_conditional_expr): If pedantic, pedwarn about conversion to
364 common base in conditional expr.
366 * class.c (instantiate_type): Handle template instantiation better.
368 * typeck.c (convert_arguments): Don't try to get tricky and convert
369 to int directly when PROMOTE_PROTOTYPES is set, as it breaks
370 user-defined conversions.
372 * lex.c (check_for_missing_semicolon): Also give error at end of
375 * call.c (build_method_call): Don't promote arrays to pointers here.
377 * typeck.c (convert_arguments): Don't require the actual parameter
378 to be of a complete type if the formal parameter is a reference.
380 Thu Aug 11 15:21:40 1994 Jason Merrill (jason@deneb.cygnus.com)
382 * decl.c (grokdeclarator): Soften 'static' on member function error
385 * init.c (build_new): Don't automatically save rval.
386 (build_offset_ref): Do field lookup with proper basetype_path.
388 Thu Aug 11 12:46:54 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
390 * errfn.c (cp_silent): Declare to mark when we should avoid
391 emitting warnings and errors.
392 (cp_error): Check it.
393 (cp_warning): Likewise.
394 (cp_pedwarn): Likewise.
395 (cp_compiler_error): Likewise.
396 (cp_error_at): Likewise.
397 (cp_warning_at): Likewise.
398 (cp_pedwarn_at): Likewise.
399 * call.c (compute_conversion_costs): Set CP_SILENT when we start
400 out, and make sure we turn it off before we leave.
402 Thu Aug 11 00:02:54 1994 Jason Merrill (jason@deneb.cygnus.com)
404 * decl2.c (grok_array_decl): Try computing *(A+B) if neither
405 argument is obviously an array.
407 Wed Aug 10 15:32:04 1994 Jason Merrill (jason@deneb.cygnus.com)
409 * typeck.c (c_expand_start_case): Do cleanups here.
411 * parse.y (xcond): Do bool conversion here, too.
412 (simple_stmt, SWITCH case): Don't do cleanups here.
414 * decl.c (duplicate_decls): Don't treat builtins that have been
415 explicitly declared specially.
417 Tue Aug 9 01:16:09 1994 Jason Merrill (jason@deneb.cygnus.com)
419 * tree.c (make_deep_copy): Support copying pointer, reference,
420 function, array, offset and method types.
422 * decl.c (init_decl_processing): Mark exit and abort as
423 BUILT_IN_NONANSI so that duplicate_decls is kinder about
425 (duplicate_decls): Don't give two errors for redeclaring a C
426 function with the same parms but a different return type.
428 * parse.y (paren_cond_or_null): Do cleanup and bool conversion here.
429 (condition): Instead of here.
430 (simple_stmt, SWITCH case): Also do cleanup here.
432 * decl2.c (finish_anon_union): Only break out FIELD_DECLs.
434 * call.c (build_method_call): Don't throw away the side effects of
435 the object in a call to a non-existent constructor.
436 * parse.y (primary): Ditto.
438 * method.c (build_decl_overload): Oop.
440 * decl2.c (lang_decode_option): Deal with flag_no_nonansi_builtin,
441 warn about uselessness of specifying -fansi-overloading.
443 * method.c (build_decl_overload): Treat any non-member new with one
444 parameter as __builtin_new.
446 * decl.c (init_decl_processing): Setup built-in meanings of exit,
449 Mon Aug 8 15:03:30 1994 Jason Merrill (jason@deneb.cygnus.com)
451 * error.c (dump_readonly_or_volatile): Put a space between const and
452 volatile if both apply.
454 * init.c (perform_member_init): Clean up after this initialization.
455 (emit_base_init): Clean up after each base init, not after all have
457 (expand_aggr_vbase_init_1): Clean up after this init.
459 Sun Aug 7 14:55:05 1994 Jason Merrill (jason@deneb.cygnus.com)
461 * call.c (build_method_call): Deal with destroying references.
463 * parse.y (condition): Do bool_truthvalue_conversion here.
464 (paren_expr_or_null): And here.
465 (simple_if): Not here.
466 (simple_stmt): Or here.
468 Sat Aug 6 22:29:45 1994 Jason Merrill (jason@deneb.cygnus.com)
470 * parse.y (paren_expr_or_null): Wrap the expression in a
474 Sat Aug 6 19:46:37 1994 Rohan Lenard (rjl@easams.com.au)
476 * call.c (build_scoped_method_call): Fix error message when
477 destructor call refers to a nonexistent type.
479 Sat Apr 16 22:43:30 1993 Gerald Baumgartner (gb@cs.purdue.edu)
481 * lex.h (rid): Deleted RID_RAISES, it's never used.
482 Moved RID_PUBLIC, RID_PRIVATE, RID_PROTECTED, RID_EXCEPTION,
483 RID_TEMPLATE and RID_SIGNATURE to the end of the enumeration,
484 they don't need to be touched in `grokdeclarator.'
485 (RID_LAST_MODIFIER): Defined macro to be RID_MUTABLE.
487 * decl.c (grokdeclarator): Use RID_LAST_MODIFIER instead of
488 RID_MAX as loop limit for finding declaration specifiers.
490 Sat Apr 3 21:59:07 1993 Gerald Baumgartner (gb@cs.purdue.edu)
492 * lex.c (debug_yytranslate): Moved to parse.y since it needs to
493 access `yytname,' which is static in parse.c.
495 Fri Apr 2 23:36:57 1993 Gerald Baumgarnter (gb@cs.purdue.edu)
497 * cp-tree.h (GNU_xref_ref): Fixed typo in extern declaration, it
498 was `GNU_xref_def' instead of `GNU_xref_ref.'
500 Fri Aug 5 14:20:16 1994 Jason Merrill (jason@deneb.cygnus.com)
502 * pt.c (do_function_instantiation): Don't set TREE_PUBLIC and
503 DECL_EXTERNAL on 'extern' instantiations; wait until EOF to do that.
504 (do_type_instantiation): Ditto.
506 * decl2.c (import_export_inline): Decides at EOF what an inline's
508 (finish_file): Call it.
510 * decl.c (start_function): Don't rely on the settings of TREE_PUBLIC
511 and DECL_EXTERNAL from do_*_instantiation. Only set
512 DECL_DEFER_OUTPUT on inlines whose linkage might actually change.
513 (finish_function): Use DECL_DEFER_OUTPUT to decide which inlines to
514 mark for later consideration, rather than DECL_FUNCTION_MEMBER_P.
516 Fri Aug 5 01:12:20 1994 Mike Stump (mrs@cygnus.com)
518 * class.c (get_class_offset_1, get_class_offset): New routine to
519 find the offset of the class where a virtual function is defined,
520 from the complete type.
521 * class.c (modify_one_vtable, fixup_vtable_deltas): Use
522 get_class_offset instead of virtual_offset as get_class_offset will
523 always provide the right answer.
524 * tree.c (virtual_offset): Remove. It only ever worked some of the
527 Tue Aug 2 12:44:21 1994 Jason Merrill (jason@deneb.cygnus.com)
529 * call.c (build_method_call): Put back unary_complex_lvalue call
530 that I thought was redundant.
532 * typeck.c (c_expand_return): Fix a case I missed before.
534 Sun Jul 31 17:54:02 1994 Jason Merrill (jason@deneb.cygnus.com)
536 * pt.c (unify): Strip cv-quals from template type arguments (when
537 'const T*' is matched to 'const char*', that does not mean that T is
540 Fri Jul 29 01:03:06 1994 Jason Merrill (jason@deneb.cygnus.com)
542 * pt.c (do_type_instantiation): Instantiate nested TAGS, not
543 typedefs. Third time's the charm?
545 * parse.y (template_parm): Support default template parms.
546 * pt.c (process_template_parm): Ditto.
547 (end_template_parm_list): Ditto.
548 (coerce_template_parms): Ditto.
549 (mangle_class_name_for_template): Ditto.
550 (push_template_decls): Ditto.
552 * method.c (build_overload_identifier): Ditto.
553 * error.c (dump_decl): Ditto.
555 Wed Jul 27 17:47:00 1994 Jason Merrill (jason@deneb.cygnus.com)
557 * pt.c (do_type_instantiation): Only instantiate nested *classes*.
559 Tue Jul 26 13:22:40 1994 Jason Merrill (jason@deneb.cygnus.com)
561 * search.c (note_debug_info_needed): Also emit debugging information
562 for the types of fields.
564 Mon Jul 25 00:34:44 1994 Jason Merrill (jason@deneb.cygnus.com)
566 * pt.c (lookup_template_class): Pass 'template' to
567 coerce_template_parms instead of 'in_decl', since it's a more
570 * typeck.c (c_expand_return): Make sure any cleanups for the return
572 (build_c_cast): Use CONVERT_EXPR for conversion to void.
574 * pt.c (do_type_instantiation): Also instantiate nested types.
576 * typeck.c (convert_for_assignment): Don't die when comparing
577 pointers with different levels of indirection.
579 * decl.c (grokdeclarator): The sub-call to grokdeclarator for
580 class-local typedefs sets DECL_ARGUMENTS, so we need to clear it
583 * decl2.c (finish_anon_union): Don't die if the union has no
586 * decl.c (grokdeclarator): Undo changes to declspecs when we're done
587 so that 'typedef int foo, bar;' will work.
589 * decl2.c (finish_file): Don't call expand_aggr_init for
592 Mon Jul 25 00:03:10 1994 Teemu Torma (tot@trema.fi)
594 * decl.c (finish_function): We can't inline constructors and
595 destructors under some conditions with -fpic, but don't unset
598 Mon Jul 25 00:03:10 1994 Jason Merrill (jason@deneb.cygnus.com)
600 * typeck.c (build_object_ref): Make sure 'datum' is a valid object.
602 Sun Jul 24 14:19:31 1994 Jason Merrill (jason@deneb.cygnus.com)
604 * class.c (finish_struct): Don't set DECL_FIELD_BITPOS on
606 (finish_struct_methods): Use copy_assignment_arg_p.
608 * cvt.c (cp_convert): If expr is an OFFSET_REF, resolve it instead
611 * typeck.c (build_binary_op_nodefault): Don't set result_type if we
612 don't know how to compare the operands.
614 * decl.c (grokdeclarator): Avoid seg fault when someone uses '__op'
615 as a declarator-id in their program. Like the Linux headers do.
618 * tree.c (lvalue_p): Treat calls to functions returning objects by
619 value as lvalues again.
621 * typeck.c (build_component_addr): Use convert_force to convert the
622 pointer in case the component type is also a private base class.
624 * search.c (get_matching_virtual): Fix bogus warning of overloaded
627 * pt.c (overload_template_name): Set DECL_ARTIFICIAL on the created
628 TYPE_DECL to fix bogus shadowing warnings.
630 Fri Jul 22 01:15:32 1994 Jason Merrill (jason@deneb.cygnus.com)
632 * init.c (expand_aggr_init_1): const and volatile mismatches do not
633 prevent a TARGET_EXPR from initializing an object directly.
635 Tue Jul 19 17:55:37 1994 Jason Merrill (jason@deneb.cygnus.com)
637 * cvt.c (build_up_reference): Allow building up references to
638 `this', don't warn about making references to artificial variables
641 * tree.c (lvalue_p): `this' is not an lvalue.
643 * call.c (build_method_call): Accept using a typedef name (or
644 template type parameter) for explicit destructor calls.
646 Wed Jul 13 03:57:54 1994 Jason Merrill (jason@deneb.cygnus.com)
648 * method.c (hack_identifier): Put back old code so lists of
649 non-functions will be handled properly.
651 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): #if 0 out; this macro is now
652 defined in the language-independent tree.h.
654 * tree.c (count_functions): Avoid bogus warning when compiling this
657 Mon Jul 11 18:37:20 1994 Jason Merrill (jason@deneb.cygnus.com)
659 * decl.c (grok_reference_init): Always save the initializer of a
662 Fri Jul 8 17:41:46 1994 Mike Stump (mrs@cygnus.com)
664 * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside
665 CLEANUP_POINT_EXPRs so that the stack slots can be reused.
668 Fri Jul 8 12:59:38 1994 Jason Merrill (jason@deneb.cygnus.com)
670 * method.c (hack_identifier): Fix for new overloading.
672 * typeck.c (build_binary_op_nodefault): Don't mess with division by
675 Fri Jul 8 13:20:28 1994 Gerald Baumgartner (gb@cs.purdue.edu)
677 * decl2.c (finish_file): Only call walk_sigtables, if
678 flag_handle_signatures is turned on, don't waste time otherwise.
680 Fri Jul 8 02:27:41 1994 Jason Merrill (jason@deneb.cygnus.com)
682 * decl.c (push_overloaded_decl): Don't create overloads of one when
683 shadowing a class type.
684 * typeck.c (build_x_function_call): Complain about overloads of one.
686 * decl.c (grokdeclarator): Don't try to treat a char* as a tree.
687 (grokdeclarator): Fix setting of TREE_STATIC.
688 (start_decl): Clear DECL_IN_AGGR_P after calling duplicate_decls.
690 Thu Jul 7 22:20:46 1994 Gerald Baumgartner (gb@andros.cygnus.com)
692 * cp-tree.h (walk_sigtables): Created extern declaration.
693 * decl2.c (walk_sigtables): Created function, patterned after
694 walk_vtables, even though we only need it to write out sigtables.
695 (finish_sigtable_vardecl): Created function.
696 (finish_vtable_vardecl): Changed 0 to NULL_PTR.
697 (finish_file): Call walk_sigtables.
699 * sig.c (build_signature_table_constructor): Mark class member
700 function pointed to from signature table entry as addressable.
702 Thu Jul 7 13:39:37 1994 Jason Merrill (jason@deneb.cygnus.com)
704 * decl.c (start_decl): Check new decl of static member variable
705 against the declaration in the class here.
706 (grokvardecl): Instead of here.
708 * class.c (prepare_fresh_vtable): Call import_export_vtable if not
710 (build_vtable): Ditto.
712 * decl2.c (import_export_vtable): Move logic for deciding the
713 interface of a template class from here.
714 (import_export_template): To here.
715 (finish_vtable_vardecl): Call import_export_template before
716 import_export_vtable.
718 Wed Jul 6 20:25:48 1994 Mike Stump (mrs@cygnus.com)
720 * except.c (init_exception_processing): Setup interim_eh_hook to
721 call lang_interim_eh.
722 * except.c (do_unwind): Propagate throw object value across
724 * except.c (saved_throw_value): Used to hold the value of the object
725 being thrown. It is always a reference to the real value.
726 * except.c (expand_start_catch_block): Add handling for the
727 value of the exception object.
728 * except.c (expand_start_catch_block): Add handler for the handler,
729 so that throws inside the handler go to the outer block.
730 * except.c (expand_end_catch_block): Ditto.
731 * parse.y (handler_args): Use parm instead, as the other doesn't yet
732 handle references correctly.
734 Wed Jul 6 17:55:32 1994 Per Bothner (bothner@kalessin.cygnus.com)
736 * decl2.c (mark_vtable_entries): If -ftable-thunks, set the
737 vtable entry properly to abort.
739 Tue Jul 5 14:07:54 1994 Jason Merrill (jason@deneb.cygnus.com)
741 * typeck.c (build_binary_op_nodefault): Downgrade division by zero
744 * call.c (build_overload_call_real): Handle fnname being a list of
746 * typeck.c (build_x_function_call): Pass list of functions to
747 build_overload_call, not just the name.
748 * tree.c (count_functions): Complain when called for invalid
751 * decl.c (grokdeclarator): Fix settings of TREE_STATIC, TREE_PUBLIC
752 and DECL_EXTERNAL on static members and initialized const members.
753 * decl2.c (grokfield): Reflect this change.
755 Fri Jul 1 09:35:51 1994 Jason Merrill (jason@deneb.cygnus.com)
757 * parse.y (init): ANSI C++ does not forbid { }.
759 Thu Jun 30 00:35:22 1994 Jason Merrill (jason@deneb.cygnus.com)
761 * decl2.c (lang_decode_option): Set warn_nonvdtor along with -Wall.
762 warn_nonvdtor defaults to off.
764 * class.c (instantiate_type): Use comptypes rather than relying on
767 * decl.c (start_function): Set DECL_DEFER_OUTPUT on all inlines that
770 * tree.c (build_cplus_new): Never build WITH_CLEANUP_EXPRs.
772 * decl.c (grok_reference_init): Deal with ADDR_EXPRs of TARGET_EXPRs.
774 * cvt.c (cp_convert): Pass 0 to with_cleanup_p arg of
777 Wed Jun 29 22:31:09 1994 Jason Merrill (jason@deneb.cygnus.com)
779 * decl2.c (finish_file): Maybe consider static inlines multiple
780 times, in case they reference each other.
782 Tue Jun 28 11:58:38 1994 Gerald Baumgartner (gb@cs.purdue.edu)
784 * class.c (finish_struct): Don't `cons_up_default_function's
786 (finish_struct): Handle an empty method_vec correctly.
788 * decl.c (grokdeclarator): Don't warn about a signature being
789 empty in a signature pointer declaration if we only saw a
790 forward declaration of the signature. Changed `warning's into
793 * sig.c (build_sigtable): Don't die if a null signature table
794 constructor is returned.
795 (build_signature_pointer_constructor): If the signature table
796 constructor is null, the _sptr field is set to a null pointer
797 and cast to the appropriate type. Make copies of all null
798 pointers so that the type null_pointer_node doesn't get changed.
799 (build_signature_table_constructor): Added comments.
801 * sig.c (build_signature_pointer_constructor): Complain if we
802 try to assign to/initialize a signature pointer/reference of
803 an undefined signature.
805 Mon Jun 27 14:05:16 1994 Gerald Baumgartner (gb@cs.purdue.edu)
807 * typeck2.c (store_init_value): Don't be pedantic about
808 non-constant initializers of signature tables/pointers/references.
810 Fri Jun 24 16:49:41 1994 Gerald Baumgartner (gb@cs.purdue.edu)
812 * decl.c (grokdeclarator): If we are grokking an opaque typedef
813 in a signature, don't complain about it begin static.
815 Wed Jun 29 16:44:45 1994 Mike Stump (mrs@cygnus.com)
817 Fixes a problem of the this pointer being wrong in virtual calls to
818 methods that are not overridden in more derived classes.
820 * class.c (fixup_vtable_delta): New routine. It will fixup the
821 delta entries in vtables, wheever they need updating.
822 * class.c (finish_struct): Call the new routine for all virtual
823 bases, as they can have different offsets, than those used in base
824 classes that we derive our vtable from.
826 Tue Jun 28 23:49:28 1994 Jason Merrill (jason@deneb.cygnus.com)
828 * typeck.c (build_binary_op): Use the types before default
829 conversions in the error message.
831 * *.c: Use c_build_type_variant instead of build_type_variant where
832 the type might be an array.
834 * call.c (build_method_call): Call build_type_variant and
835 build_reference_type in the right order.
836 * decl.c (record_builtin_type): Ditto.
838 Wed Jun 29 16:58:53 1994 Jason Merrill (jason@deneb.cygnus.com)
840 * call.c (build_method_call): Call build_type_variant and
841 build_reference_type in the right order.
842 * decl.c (record_builtin_type): Ditto.
844 Tue Jun 28 23:49:28 1994 Jason Merrill (jason@deneb.cygnus.com)
846 * typeck.c (build_binary_op): Use the types before default
847 conversions in the error message.
849 * *.c: Use c_build_type_variant instead of build_type_variant where
850 the type might be an array.
852 Sat Jun 25 11:50:54 1994 Jason Merrill (jason@deneb.cygnus.com)
854 * cvt.c (convert_to_reference): Try UDC's before doing the
855 reinterpret_cast thang, though.
857 Fri Jun 24 01:24:01 1994 Jason Merrill (jason@deneb.cygnus.com)
859 * typeck.c (c_expand_return): Don't USE the return value location
860 after we've expanded the jump.
862 * decl2.c (finish_file): Make sure DECL_SAVED_INSNS is not 0 before
863 trying to write out an inline.
865 * cvt.c (build_up_reference): Also do address adjustment when the
867 (convert_to_reference): Try UDCs only after built-in conversions.
868 (build_type_conversion_1): Don't play games with the argument to the
870 (build_type_conversion): #if 0 out code for binding to reference.
872 Thu Jun 23 00:22:28 1994 Jason Merrill (jason@deneb.cygnus.com)
874 * decl2.c (finish_file): Use TREE_SYMBOL_REFERENCED to decide
875 whether to emit inlines.
877 * decl.c (grokdeclarator): Set explicit_int for decls that just
878 specify, say, 'long'.
880 * init.c (do_friend): Do overload C functions (or call pushdecl,
883 Wed Jun 22 13:40:49 1994 Jason Merrill (jason@deneb.cygnus.com)
885 * cvt.c (build_up_reference): Don't call readonly_error.
886 (convert_to_reference): Propagate const and volatile from expr to
889 * tree.c (lvalue_p): Random CALL_EXPRs are not lvalues.
891 * cvt.c (build_up_reference): Break out WITH_CLEANUP_EXPR when
892 creating a temporary.
893 (convert_to_reference): Lose excessive and incorrect trickiness.
894 (cp_convert): Call build_cplus_new with with_cleanup_p set.
896 * typeck2.c (build_functional_cast): Ditto.
898 Tue Jun 21 17:38:38 1994 Jason Merrill (jason@deneb.cygnus.com)
900 * decl.c (grokdeclarator): signed, unsigned, long and short all
903 * decl.c (grokdeclarator): Allow "this is a type" syntax.
904 (grok_reference_init): Simplify and fix.
906 Sun Jun 19 17:08:48 1994 Jason Merrill (jason@deneb.cygnus.com)
908 * decl.c (grokdeclarator): pedwarn about a typedef that specifies no
911 Sat Jun 18 04:16:50 1994 Jason Merrill (jason@deneb.cygnus.com)
913 * decl.c (start_function): Move TREE_PUBLIC and DECL_EXTERNAL
914 tinkering to after call to pushdecl.
916 Fri Jun 17 14:48:28 1994 Jason Merrill (jason@deneb.cygnus.com)
918 * call.c (build_method_call): Handle destructors for non-aggregate
921 Thu Jun 16 16:48:05 1994 Jason Merrill (jason@deneb.cygnus.com)
923 * call.c (build_method_call): Make sure that the name given for the
924 destructor matches the constructor_name of the instance.
926 * pt.c (do_function_instantiation): A non-extern instantiation
927 overrides a later extern one.
928 (do_type_instantiation): Ditto.
930 Wed Jun 15 19:34:54 1994 Jason Merrill (jason@deneb.cygnus.com)
932 * init.c (expand_aggr_init): Use TYPE_MAIN_VARIANT to get the
933 unqualified array type.
935 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Tests whether NODE is a
936 CONSTRUCTOR with no elements.
938 * decl.c (various): Lose empty_init_node.
939 (finish_decl): Use EMPTY_CONSTRUCTOR_P, do the empty CONSTRUCTOR
940 thing depending on the value of DECL_COMMON instead of
941 flag_conserve_space, do the empty CONSTRUCTOR thing for types that
942 don't have constructors, don't treat a real empty CONSTRUCTOR
945 * typeck2.c (process_init_constructor): Don't treat empty_init_node
948 Wed Jun 15 19:05:25 1994 Mike Stump (mrs@cygnus.com)
950 * class.c (override_one_vtable): Don't forget to merge in an old
951 overrider when we wanted to reuse a vtable, but couldn't.
953 Wed Jun 15 15:03:16 1994 Jason Merrill (jason@deneb.cygnus.com)
955 * decl.c (start_decl): Put statics in common again.
957 * decl.c (grokdeclarator): Return NULL_TREE for an error rather than
958 setting the type to error_mark_node.
960 * typeck.c (build_modify_expr): Build up a COMPOUND_EXPR for enum
961 bitfield assignments.
963 Tue Jun 14 12:23:38 1994 Jason Merrill (jason@deneb.cygnus.com)
965 * decl.c (grok_op_properties): Const objects can be passed by value.
967 Mon Jun 13 03:10:59 1994 Jason Merrill (jason@deneb.cygnus.com)
969 * decl2.c (import_export_vtable): Force implicit instantiations to
970 be interface_only when -fno-implicit-templates.
972 * decl.c (duplicate_decls): Redeclaring a class template name is an
975 * pt.c (end_template_decl): Call GNU_xref_decl for class templates.
976 * xref.c (GNU_xref_decl): Support templates.
978 Sat Jun 11 17:09:05 1994 Jason Merrill (jason@deneb.cygnus.com)
980 * decl.c (grok_op_properties): Split out checking for whether this
981 function should suppress the default assignment operator.
982 * decl2.c (grok_function_init): Ditto.
983 (copy_assignment_arg_p): New function do do just that.
984 Now considers virtual assignment operators that take a base as an
985 argument to count as copy assignment operators.
987 * search.c (dfs_debug_mark): Lose checks for DWARF_DEBUG and
988 TREE_ASM_WRITTEN, as they are redundant.
990 * pt.c (end_template_decl): Don't try to set DECL_CLASS_CONTEXT on a
991 decl that has no LANG_SPECIFIC part.
992 (do_type_instantiation): Force the debugging information for this
995 * decl.c (start_decl): Clear up uses of various types of templates
996 (say sorry for static data members, rather than "invalid template").
997 (expand_static_init): Fix initialization of static data members of
1000 Fri Jun 10 00:41:19 1994 Jason Merrill (jason@deneb.cygnus.com)
1002 * decl.c (grokdeclarator): Set DECL_CONTEXT on static data members.
1004 * g++.c (main): Use -xc++-cpp-output for .i files.
1006 * pt.c (tsubst): Give meaningful error about declaring template for
1007 a copy constructor which was not declared in the class template.
1008 (do_type_instantiation): Explicit instantiation before the class
1009 template is an error.
1010 (instantiate_template): Don't die if tsubst returns error_mark_node.
1012 Thu Jun 9 19:04:59 1994 Jason Merrill (jason@deneb.cygnus.com)
1014 Don't synthesize the copy assignment operator if the one in a base
1015 class is pure virtual.
1016 * cp-tree.h (TYPE_HAS_ABSTRACT_ASSIGN_REF): New macro to indicate
1017 whether the type has a pure virtual copy assignment operator.
1018 * class.c (finish_base_struct): Don't generate the copy assignment
1019 operator if a base class has a pure virtual one.
1020 * decl.c (grok_op_properties): Add disabled code to set
1021 TYPE_HAS_ABSTRACT_ASSIGN_REF with comment pointing to where it is
1023 * decl2.c (grok_function_init): Set TYPE_HAS_ABSTRACT_ASSIGN_REF.
1025 * decl2.c (import_export_vtable): Always treat template
1026 instantiations as if write_virtuals >= 2, and treat implicit
1027 instantiations as external if -fno-implicit-templates.
1028 (finish_file): Output all pending inlines if
1029 flag_keep_inline_functions.
1031 Wed Jun 8 20:48:02 1994 Mike Stump (mrs@cygnus.com)
1033 * tree.c (layout_vbasetypes): Align virtual base classes inside
1034 complete objects, so that we don't core dump on machines such as
1035 SPARCs when we access members that require larger than normal
1036 alignments, such as a double. Also, we bump up the total alignment
1037 on the complete type, as necessary.
1039 Wed Jun 8 16:18:14 1994 Jason Merrill (jason@deneb.cygnus.com)
1041 * gxxint.texi (Free Store): New section with code for examining
1043 (Limitations of g++): Remove operator delete entry, since it is no
1044 longer accurate. Fix access control entry.
1046 * typeck.c (build_unary_op): Pedwarn about taking the address of or
1047 incrementing a cast to non-reference type.
1048 (build_modify_expr): Use convert instead of convert_force again.
1050 * search.c (get_base_distance): Use IS_AGGR_TYPE_CODE to check for
1051 class type, not == RECORD_TYPE.
1053 * decl.c (grokdeclarator): Cope with grokfndecl returning NULL_TREE.
1055 * typeck2.c (report_case_error): #if 0 out.
1056 * lex.c (real_yylex): Lose RANGE.
1059 Tue Jun 7 18:17:35 1994 Jason Merrill (jason@deneb.cygnus.com)
1061 * parse.y (simple_stmt, case ranges): Use ELLIPSIS instead of RANGE.
1063 Mon Jun 6 19:39:57 1994 Jason Merrill (jason@deneb.cygnus.com)
1065 * typeck.c (build_c_cast): Don't shortcut conversions to the same
1066 type. Don't replace consts with their values here, since that's now
1069 * cvt.c (cp_convert): When converting to bool, take
1070 integer_zero_node to false_node and all other INTEGER_CSTs to
1072 (build_type_conversion): Don't complain about multiple conversions
1073 to float if we're not really converting.
1075 Fri Jun 3 02:10:56 1994 Jason Merrill (jason@deneb.cygnus.com)
1077 Implement 'extern template class A<int>;' syntax for suppressing
1078 specific implicit instantiations.
1079 * cp-tree.h: Update prototypes for do_*_instantiation.
1080 * pt.c (do_pending_expansions): Don't compile 'extern' explicit
1082 (do_function_instantiation): Set DECL_EXTERNAL on 'extern' explicit
1084 (do_type_instantiation): Ditto.
1085 * parse.y (explicit_instantiation): Support 'extern template class
1087 * decl.c (start_function): Don't modify the settings of TREE_PUBLIC
1088 and DECL_EXTERNAL on explicit instantiations.
1090 * cvt.c (cp_convert): Replace constants with their values before
1092 (cp_convert): Consistently use 'e' instead of 'expr'.
1094 Thu Jun 2 03:53:30 1994 Jason Merrill (jason@deneb.cygnus.com)
1096 * typeck2.c (build_x_arrow): Resolve OFFSET_REFs first.
1098 Wed Jun 1 18:57:35 1994 Jason Merrill (jason@deneb.cygnus.com)
1100 * typeck2.c (digest_init): Handle initializing a pmf with an
1102 * typeck.c (build_ptrmemfunc): Handle overloaded methods.
1104 * decl.c (pushtag): Use build_decl to make TYPE_DECLs.
1105 (xref_defn_tag): Ditto.
1106 * pt.c (process_template_parm): Ditto.
1107 (lookup_template_class): Ditto.
1108 (push_template_decls): Ditto.
1109 (instantiate_class_template): Ditto.
1110 (create_nested_upt): Ditto.
1111 * class.c (finish_struct): Don't try to set DECL_CLASS_CONTEXT on
1114 * typeck.c (convert_arguments): Make sure type is not NULL before
1115 checking its TREE_CODE.
1117 Wed Jun 1 17:40:39 1994 Mike Stump (mrs@cygnus.com)
1119 * class.c (get_derived_offset): New routine.
1120 * class.c (finish_base_struct): Make sure we set BINFO_VTABLE and
1121 BINFO_VIRTUALS when we choose a new base class to inherit from.
1122 * class.c (modify_one_vtable): Use get_derived_offset to get the
1123 offset to the most base class subobject that we derived this binfo
1125 * class.c (finish_struct): Move code to calculate the
1126 DECL_FIELD_BITPOS of the vfield up, as we need might need it for
1127 new calls to get_derived_offset in modify_one_vtable.
1129 Wed Jun 1 16:50:59 1994 Jason Merrill (jason@deneb.cygnus.com)
1131 * init.c (build_member_call): Use build_pointer_type instead of
1134 Wed Jun 1 11:11:15 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
1136 * decl.c (grokdeclarator): Make sure we have a DNAME set before we
1137 try to use it in an error.
1139 Wed Jun 1 09:48:49 1994 Mike Stump (mrs@cygnus.com)
1141 * typeck.c (convert_arguments, convert_for_initialization): Don't
1142 strip NOP_EXPRs, when we are converting to a reference.
1144 Wed Jun 1 01:11:38 1994 Jason Merrill (jason@deneb.cygnus.com)
1146 * typeck.c (build_modify_expr): Don't dereference references when
1149 * decl2.c (grokfield): Don't check for grokdeclarator returning
1150 error_mark_node any more.
1152 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
1153 (start_method): Return void_type_node instead of error_mark_node.
1155 * typeck.c (build_modify_expr): Resolve offset refs earlier.
1157 Tue May 31 16:06:58 1994 Jason Merrill (jason@deneb.cygnus.com)
1159 * call.c (build_method_call): Resolve OFFSET_REFs in the object.
1161 * typeck.c (build_modify_expr): Dereference references before trying
1164 * call.c (build_method_call): Don't confuse type conversion
1165 operators with constructors.
1166 * typeck2.c (build_functional_cast): Just call build_c_cast if there
1167 was only one parameter.
1168 * method.c (build_typename_overload): Don't set
1169 IDENTIFIER_GLOBAL_VALUE on these identifiers.
1170 * decl.c (grok_op_properties): Warn about defining a type conversion
1171 operator that converts to a base class (or reference to it).
1172 * cvt.c (cp_convert): Don't try to use a type conversion operator
1173 when converting to a base class.
1174 (build_type_conversion_1): Don't call constructor_name_full on an
1176 * cp-tree.h (DERIVED_FROM_P): Should be self-explanatory.
1178 * decl.c (start_decl): Don't complain that error_mark_node is an
1180 (finish_decl): Check for type == error_mark_node.
1182 Mon May 30 23:38:55 1994 Jason Merrill (jason@deneb.cygnus.com)
1184 * decl.c (start_function): Set DECL_DEFER_OUTPUT on implicit
1185 instantiations and inline members.
1187 * spew.c (yylex): Set looking_for_template if the next token is a '<'.
1189 * lex.h: Declare looking_for_template.
1191 * decl.c (lookup_name_real): Use looking_for_template to arbitrate
1192 between type and template interpretations of an identifier.
1194 Sat May 28 04:07:40 1994 Jason Merrill (jason@deneb.cygnus.com)
1196 * pt.c (instantiate_template): Zero out p if we found a
1199 * decl.c (grokdeclarator): Elucidate warning.
1200 (grokdeclarator): If pedantic AND -ansi, complain about long long.
1202 Make explicit instantiation work reasonably. It is now appropriate
1203 to deprecate the use of -fexternal-templates.
1204 * pt.c (instantiate_template): Set DECL_TEMPLATE_SPECIALIZATION or
1205 DECL_IMPLICIT_INSTANTIATION on fndecl as appropriate.
1206 (end_template_instantiation): Reflect changes in USE_TEMPLATE
1208 (do_pending_expansions): if (!flag_implicit_templates) DECIDE(0);
1209 (do_function_instantiation): Don't set EXPLICIT_INST if
1210 flag_external_templates is set. Do set TREE_PUBLIC and DECL_EXTERN
1211 appropriately otherwise.
1212 (do_type_instantiation): Set interface info for class. Set
1213 TREE_PUBLIC and DECL_EXTERN for methods. Do none of this if
1214 flag_external_templates is set.
1215 * parse.y: Reflect changes in USE_TEMPLATE semantics.
1216 * decl2.c: New flag flag_implicit_templates determines whether or
1217 not implicit instantiations get emitted. This flag currently
1218 defaults to true, and must be true for -fexternal-templates to work.
1219 (finish_file): Consider flag_implement_inlines when
1220 setting DECL_EXTERNAL. Consider flag_implicit_templates when
1221 deciding whether or not to emit a static copy.
1222 * decl.c (start_function): Set TREE_PUBLIC and DECL_EXTERNAL
1223 properly for template instantiations.
1224 (start_method): Set DECL_IMPLICIT_INSTANTIATION on methods of a
1226 * cp-tree.h (CLASSTYPE_USE_TEMPLATE): Change semantics.
1227 (DECL_USE_TEMPLATE): Parallel macro for FUNCTION and VAR_DECLs.
1228 (various others): Accessor macros for the above.
1230 Fri May 27 13:57:40 1994 Jason Merrill (jason@deneb.cygnus.com)
1232 * typeck.c (build_binary_op_nodefault): Division by constant zero is
1235 Fri May 27 13:50:15 1994 Mike Stump (mrs@cygnus.com)
1237 * class.c (override_one_vtable): Don't modify things we don't own.
1239 Fri May 27 01:42:58 1994 Jason Merrill (jason@deneb.cygnus.com)
1241 * decl.c (finish_decl): Don't postpone processing the initializer of
1242 a decl with DECL_EXTERNAL set, and do call rest_of_compilation for a
1243 PUBLIC const at toplevel.
1244 (grokdeclarator): pedwarn about initializing non-const or
1245 non-integral statics in the class body.
1247 * decl.c (pushtag): Don't try to set DECL_CLASS_CONTEXT on a
1250 * call.c (convert_harshness): Dereference reference on rhs before
1251 proceeding, properly grok passing const things to non-const
1254 * typeck.c (build_unary_op): Soften error about taking the address
1255 of main() to a pedwarn.
1257 * lex.c (default_copy_constructor_body): Unambiguously specify base
1258 classes (i.e. A((const class ::A&)_ctor_arg) ).
1259 (default_assign_ref_body): Ditto.
1261 Thu May 26 13:13:55 1994 Gerald Baumgartner (gb@mexican.cygnus.com)
1263 * decl2.c (grokfield): Don't complain about local signature
1264 method declaration without definition.
1266 * call.c (convert_harshness): If `type' is a signature pointer
1267 and `parmtype' is a pointer to a signature, just return 0. We
1268 don't really convert in this case; it's a result of making the
1269 `this' parameter of a signature method a signature pointer.
1271 * call.c (build_method_call): Distinguish calling the default copy
1272 constructor of a signature pointer/reference from a signature
1273 member function call.
1275 Thu May 26 12:56:25 1994 Jason Merrill (jason@deneb.cygnus.com)
1277 * decl2.c (grokfield): Don't set TREE_PUBLIC on member function
1280 * decl.c (duplicate_decls): A previous function declaration as
1281 static overrides a subsequent non-static definition.
1282 (grokdeclarator): Don't set TREE_PUBLIC on inline method
1285 Wed May 25 14:36:38 1994 Jason Merrill (jason@deneb.cygnus.com)
1287 * decl.c (grokdeclarator): Handle initialization of static const
1289 (finish_decl): Ditto.
1291 * decl2.c (grokfield): Allow initialization of static const members
1294 * decl2.c (grokfield): Deal with grokdeclarator returning
1297 * decl.c (grok_ctor_properties): Return 0 for A(A) constructor.
1298 (grokfndecl): Check the return value of grok_ctor_properties.
1299 (start_method): Ditto.
1301 * parse.y (absdcl): Expand type_quals inline.
1303 Tue May 24 19:10:32 1994 Jason Merrill (jason@deneb.cygnus.com)
1305 * decl.c (pushtag): Use IS_AGGR_TYPE rather than checking for a
1308 Tue May 24 18:09:16 1994 Per Bothner (bothner@kalessin.cygnus.com)
1310 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
1311 always use "__vt_%s".
1312 * decl2.c (finish_vtable_vardecl): Don't consider abstract virtuals
1313 when looking for a "sentinal" method (to decide on emitting vtables).
1314 * decl2.c (finish_file): Scan all decls for thunks that need
1316 * decl2.c (finish_vtable_vardecl): Don't bother calling emit_thunk.
1317 * method.c (make_thunk): Use a more meaningful label. If there
1318 exists a matching top-level THUNK_DECL re-use it; otherwise
1319 create a new THUNK_DECL (and declare it).
1320 * method.c (emit_thunk): Make thunk external/public depending
1321 on the underlying method.
1323 Tue May 24 00:22:04 1994 Jason Merrill (jason@deneb.cygnus.com)
1325 * pt.c (tsubst): Use lookup_name_nonclass to find guiding decls, not
1328 * call.c (build_overload_call_real): Don't immediately pick a
1329 function which matches perfectly.
1331 * decl.c (grokdeclarator): Use c_build_type_variant for arrays.
1332 (grokdeclarator): Warn about, and throw away, cv-quals attached to a
1333 reference (like 'int &const j').
1335 * typeck.c (convert_arguments): Don't mess with i for methods.
1336 * call.c (build_method_call): Pass the function decl to
1339 * typeck.c (comp_ptr_ttypes_real): New function. Implements the
1340 checking for which multi-level pointer conversions are allowed.
1341 (comp_target_types): Call it.
1342 (convert_for_assignment): Check const parity on the ultimate target
1343 type, too. And make those warnings pedwarns.
1345 Mon May 23 14:11:24 1994 Jason Merrill (jason@deneb.cygnus.com)
1347 * error.c (dump_char): Use TARGET_* for character constants.
1349 Mon May 23 13:03:03 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
1351 * tree.c (debug_no_list_hash): Make static.
1353 * decl.c (decls_match): Say the types don't match if newdecl ends up
1354 with a null type, after we've checked if olddecl does.
1355 (pushdecl): Check if the decls themselves match before looking for
1356 an extern redeclared as static, to avoid inappropriate and incorrect
1359 Fri May 20 14:04:34 1994 Jason Merrill (jason@deneb.cygnus.com)
1361 * decl.c (grokdeclarator): Make warning about duplicate short, etc.
1364 * typeck.c (build_c_cast): Casting to function or method type is an
1367 * class.c (finish_struct): Make warning for anonymous class with no
1368 instances a pedwarn.
1370 * Makefile.in (stamp-parse): Expect a s/r conflict.
1372 * typeck.c (build_modify_expr): pedwarn about using a non-lvalue
1375 Thu May 19 12:08:48 1994 Jason Merrill (jason@deneb.cygnus.com)
1377 * cvt.c (type_promotes_to): Make sure bool promotes to int rather
1378 than unsigned on platforms where sizeof(char)==sizeof(int).
1380 Wed May 18 14:27:06 1994 Jason Merrill (jason@deneb.cygnus.com)
1382 * typeck.c (build_c_cast): Tack on a NOP_EXPR when casting to
1384 (build_modify_expr): Don't strip NOP_EXPRs, and don't get tricky
1385 and treat them as lvalues.
1387 * decl.c (shadow_tag): Do complain about forward declarations of
1388 enums and empty declarations.
1389 * parse.y: Don't complain about forward declarations of enums and
1392 * typeck.c (convert_for_assignment): Complain about changing
1393 the signedness of a pointer's target type.
1395 * parse.y (stmt): Move duplicated code for checking case values from
1397 * decl2.c (check_cp_case_value): To here. And add a call to
1398 constant_expression_warning.
1400 * typeck.c (convert_for_assignment): Don't complain about assigning
1401 a negative value to bool.
1403 * decl.c (init_decl_processing): Make bool unsigned.
1405 * class.c (finish_struct): Allow bool bitfields.
1407 Wed May 18 12:35:27 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1409 * Make-lang.in (c++.install-man): Get g++.1 from $(srcdir)/cp.
1411 Wed May 18 03:28:35 1994 Jason Merrill (jason@deneb.cygnus.com)
1413 * cvt.c (build_type_conversion): Lose special handling of
1416 * search.c (dfs_pushdecls): Improve shadowing warning.
1418 Tue May 17 13:34:46 1994 Jason Merrill (jason@deneb.cygnus.com)
1420 * init.c (build_delete): Throw away const and volatile on `this'.
1422 * decl.c (finish_enum): Put the constants in TYPE_VALUES again,
1423 rather than the enumerators.
1424 (pushtag): s/cdecl/c_decl/g
1426 Mon May 16 23:04:01 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
1428 * cp/typeck.c (common_type): Attribute merging.
1429 (comp_types): Utilise COMP_TYPE_ATTRIBUTES macro.
1431 * cp/parse.y: Revamp attribute parsing.
1433 Mon May 16 01:40:34 1994 Jason Merrill (jason@deneb.cygnus.com)
1435 * decl.c (shadow_tag): Also check for inappropriate use of auto and
1438 * method.c (build_overload_name): Clarify that the illegal case is a
1439 pointer or reference to array of unknown bound.
1441 * error.c (dump_type_prefix): Print references to arrays properly.
1443 * typeck.c (various): Be more helpful in pointer
1444 comparison diagnostics.
1446 * tree.c (lvalue_p): MODIFY_EXPRs are lvalues again. Isn't this
1449 * parse.y: Also catch an error after valid stmts.
1451 * search.c (dfs_init_vbase_pointers): Don't abort because `this' is
1454 * typeck.c (convert_for_initialization): If call to
1455 convert_to_reference generated a diagnostic, print out the parm
1456 number and function decl if any.
1458 * errfn.c (cp_thing): Check atarg1 to determine whether or not we're
1459 specifying a line, not atarg.
1461 * tree.c (build_cplus_method_type): Always make `this' const.
1463 * decl2.c (grokclassfn): If -fthis-is-variable and this function is
1464 a constructor or destructor, make `this' non-const.
1466 * typeck.c (build_modify_expr): Don't warn specially about
1467 assignment to `this' here anymore, since it will be caught by the
1470 * various: Disallow specific GNU extensions (variable-size arrays,
1471 etc.) when flag_ansi is set, not necessarily when pedantic is set,
1472 so that people can compile with -pedantic-errors for tighter const
1473 checking and such without losing desirable extensions.
1475 * typeck2.c (build_functional_cast): Call build_method_call with
1477 (process_init_constructor): Only process FIELD_DECLs.
1479 * decl.c (finish_decl): Also force static consts with no explicit
1480 initializer that need constructing into the data segment.
1482 * init.c (build_delete): Undo last patch, as it interferes with
1485 Sat May 14 01:59:31 1994 Jason Merrill (jason@deneb.cygnus.com)
1487 * call.c, class.h, cp-tree.h, cvt.c, decl2.c: Lose old overloading
1490 * init.c (build_delete): pedwarn about using plain delete to delete
1493 Fri May 13 16:45:07 1994 Jason Merrill (jason@deneb.cygnus.com)
1495 * typeck.c (comp_target_types): Be more helpful in contravariance
1496 warnings, and make them pedwarns.
1498 * decl.c (grokdeclarator): Use decl_context to decide whether or not
1499 this is an access declaration.
1501 * class.c (finish_struct_bits): Set TYPE_HAS_INT_CONVERSION if it
1502 has a conversion to enum or bool, too.
1504 Fri May 13 16:31:27 1994 Mike Stump (mrs@cygnus.com)
1506 * method.c (emit_thunk): Make declaration for
1507 current_call_is_indirect local (needed for hppa).
1509 Fri May 13 16:16:37 1994 Jason Merrill (jason@deneb.cygnus.com)
1511 * pt.c (uses_template_parms): Grok BOOLEAN_TYPE.
1514 Fri May 13 16:23:32 1994 Mike Stump (mrs@cygnus.com)
1516 * pt.c (tsubst): If there is already a function for this expansion,
1518 * pt.c (instantiate_template): Ditto.
1520 Fri May 13 10:30:42 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
1522 * parse.y (implicitly_scoped_stmt, simple_stmt case): Use
1523 kept_level_p for MARK_ENDS argument to expand_end_bindings, to avoid
1524 generating debug info for unemitted symbols on some systems.
1526 * cp-tree.h (build_static_cast, build_reinterpret_cast,
1527 build_const_cast): Add declarations.
1529 Fri May 13 09:50:31 1994 Mike Stump (mrs@cygnus.com)
1531 * search.c (expand_indirect_vtbls_init): Fix breakage from Apr 27
1532 fix. We now try get_binfo, and if that doesn't find what we want,
1533 we go back to the old method, which still sometimes fails.
1535 Fri May 13 01:43:18 1994 Jason Merrill (jason@deneb.cygnus.com)
1537 * parse.y (initdcl): Call cplus_decl_attributes on the right
1539 * decl2.c (cplus_decl_attributes): Don't call decl_attributes for
1542 * typeck.c (build_binary_op_nodefault): Change result_type for
1543 comparison ops to bool.
1544 (build_binary_op): Convert args of && and || to bool.
1545 * cvt.c (build_default_binary_type_conversion): Convert args of &&
1547 (build_default_unary_type_conversion): Convert arg of ! to bool.
1548 (type_promotes_to): bool promotes to int.
1550 Fri May 13 01:43:18 1994 Mike Stump (mrs@cygnus.com)
1552 Implement the new builtin `bool' type.
1553 * typeck.c (build_binary_op_nodefault): Convert args of && and || to
1555 (build_unary_op): Convert arg of ! to bool.
1556 * parse.y: Know true and false. Use bool_truthvalue_conversion.
1557 * method.c (build_overload_value): Know bool.
1558 (build_overload_name): Ditto.
1559 * lex.c (init_lex): Set up RID_BOOL.
1560 * gxx.gperf: Add bool, true, false.
1561 * error.c (*): Know bool.
1562 * decl.c (init_decl_processing): Set up bool, true, false.
1563 * cvt.c (cp_convert): Handle conversion to bool.
1564 (build_type_conversion): Ditto.
1565 * *.c: Accept bool where integers and enums are accepted (use
1566 INTEGRAL_CODE_P macro).
1568 Thu May 12 19:13:54 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk)
1570 * g++.c: Use #ifdef for __MSDOS__, not #if.
1572 Thu May 12 18:05:18 1994 Mike Stump (mrs@cygnus.com)
1574 * decl2.c (lang_f_options): Handle -fshort-temps. -fshort-temps
1575 gives old behavior , and destroys temporaries earlier. Default
1576 behavior now conforms to the ANSI working paper.
1578 Thu May 12 14:45:35 1994 Jason Merrill (jason@deneb.cygnus.com)
1580 * typeck.c (build_modify_expr): Understand MODIFY_EXPR as an lvalue.
1581 Use convert_force to convert the result of a recursive call when we
1582 are dealing with a NOP_EXPR. Don't automatically wrap MODIFY_EXPRs
1583 in COMPOUND_EXPRs any more.
1584 (various): Lose pedantic_lvalue_warning.
1585 (unary_complex_lvalue): Understand MODIFY_EXPR.
1587 * cvt.c (convert_to_reference): Allow DECL to be error_mark_node if
1588 we don't know what we're initializing.
1590 Wed May 11 01:59:36 1994 Jason Merrill (jason@deneb.cygnus.com)
1592 * cvt.c (convert_to_reference): Modify to use convtype parameter.
1593 Only create temporaries when initializing a reference, not when
1595 (cp_convert): New main function.
1596 (convert): Call cp_convert.
1597 * cvt.c, decl.c, typeck.c: Fix calls to convert_to_reference.
1598 * cp-tree.h (CONV_*): New constants used by conversion code for
1599 selecting conversions to perform.
1601 * tree.c (lvalue_p): MODIFY_EXPRs are no longer lvalues.
1603 * typeck.c (build_{static,reinterpret,const_cast): Stubs that just
1605 * parse.y: Add {static,reinterpret,const}_cast.
1608 * typeck.c (common_type): Allow methods with basetypes of different
1610 (comptypes): Deal with UPTs.
1611 (build_modify_expr): Wrap all MODIFY_EXPRs in a COMPOUND_EXPR.
1613 * pt.c (end_template_decl): Check for multiple definitions of member
1616 * call.c (build_method_call): Complain about calling an abstract
1617 virtual from a constructor.
1619 * typeck.c (pointer_int_sum): Check for the integer operand being 0
1620 after checking the validity of the pointer operand.
1622 * typeck2.c (digest_init): Pedwarn about string initializer being
1625 Tue May 10 12:10:28 1994 Jason Merrill (jason@deneb.cygnus.com)
1627 * decl.c (push_overloaded_decl): Only throw away a builtin if the
1628 decl in question is the artificial one.
1630 * parse.y (simple_stmt, switch): Use implicitly_scoped_stmt because
1631 expand_{start,end}_case cannot happen in the middle of a block.
1633 * cvt.c (build_type_conversion_1): Use convert again.
1635 Tue May 10 11:52:04 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
1637 * typeck2.c (digest_init): Make sure we check for signed and
1638 unsigned chars as well when warning about string initializers.
1640 * init.c (emit_base_init): Check if there's a DECL_NAME on the
1641 member before trying to do an initialization for it.
1643 Tue May 10 11:34:37 1994 Mike Stump (mrs@cygnus.com)
1645 * except.c: Don't do anything useful when cross compiling.
1647 Tue May 10 03:04:13 1994 Jason Merrill (jason@deneb.cygnus.com)
1649 * decl.c (duplicate_decls): Fix up handling of builtins yet again.
1650 (push_overloaded_decl): Ditto.
1652 * cvt.c (convert): Don't look for void type conversion.
1654 Mon May 9 18:05:41 1994 Jason Merrill (jason@deneb.cygnus.com)
1656 * init.c (do_friend): Only do a pushdecl for friends, not
1659 Mon May 9 13:36:34 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
1661 * decl.c (lookup_name_current_level): Put empty statement after
1662 the label OUT to make the code valid C.
1664 Mon May 9 12:20:57 1994 Jason Merrill (jason@deneb.cygnus.com)
1666 * typeck.c (build_binary_op_nodefault): Only complain about
1667 comparing void * and a function pointer if void * is smaller.
1669 Sun May 8 01:29:13 1994 Jason Merrill (jason@deneb.cygnus.com)
1671 * decl.c (lookup_name_current_level): Move through temporary binding
1674 * parse.y (already_scoped_stmt): Revive.
1675 (simple_stmt): Use it again.
1677 * decl.c (poplevel): Always call poplevel recursively if we're
1678 dealing with a temporary binding level.
1680 Sat May 7 10:52:28 1994 Mike Stump (mrs@cygnus.com)
1682 * decl.c (finish_decl): Make sure we run cleanups for initial values
1683 of decls. Cures memory leak.
1684 * decl.c (expand_static_init): Ditto for static variables.
1685 * decl2.c (finish_file): Ditto for globals.
1687 Sat May 7 03:57:44 1994 Jason Merrill (jason@deneb.cygnus.com)
1689 * typeck.c (commonparms): Don't complain about redefining default
1692 * decl.c (duplicate_decls): Don't complain twice about conflicting
1694 (decls_match): Don't look at default args.
1695 (redeclaration_error_message): Complain about redefining default
1698 * call.c (build_overload_call_real): Also deal with guiding
1699 declarations coming BEFORE the template decl.
1701 * pt.c (unify): Allow different parms to have different
1703 (unify): Allow trivial conversions on non-template parms.
1705 Fri May 6 03:53:23 1994 Jason Merrill (jason@deneb.cygnus.com)
1707 * pt.c (tsubst): Support OFFSET_TYPEs.
1710 * decl2.c (finish_decl_parsing): Call push_nested_class with a type.
1712 * init.c (build_offset_ref): Fix error message.
1713 * search.c (lookup_field): Ditto.
1715 * call.c (build_scoped_method_call): Pass binfo to
1717 * typeck.c (build_object_ref): Ditto.
1719 * typeck2.c (binfo_or_else): Don't return a _TYPE.
1721 * class.c (finish_struct): Don't complain about re-use of inherited
1722 names or shadowing of type decls.
1723 * decl.c (pushdecl_class_level): Ditto.
1725 * decl.c (finish_enum): Set the type of all the enums.
1727 * class.c (finish_struct): Don't get confused by access decls.
1729 * cp-tree.h (TYPE_MAIN_DECL): New macro to get the _DECL for a
1730 _TYPE. You can stop using TYPE_NAME for that now.
1732 * parse.y: Lose doing_explicit (check $0 instead).
1733 * gxx.gperf: 'template' now has a RID.
1734 * lex.h (rid): Ditto.
1735 * lex.c (init_lex): Set up the RID for 'template'.
1737 * parse.y (type_specifier_seq): typed_typespecs or
1738 nonempty_type_quals. Use it.
1739 (handler_args): Fix bogus syntax.
1740 (raise_identifier{,s}, optional_identifier): Lose.
1741 * except.c (expand_start_catch_block): Use grokdeclarator to parse
1743 (init_exception_processing): The second argument to
1744 __throw_type_match is ptr_type_node.
1746 Fri May 6 07:18:54 1994 Chip Salzenberg (chip@fin)
1748 [ change propagated from c-decl.c of snapshot 940429 ]
1749 * cp/decl.c (finish_decl): Setting asmspec_tree should not
1750 zero out the old RTL.
1752 Fri May 6 01:25:38 1994 Mike Stump (mrs@cygnus.com)
1754 Add alpha exception handling support to the compiler.
1755 Quick and dirty backend in except.c.
1757 * cp/*: Remove most remnants of old exception handling support.
1758 * decl.c (finish_function): Call expand_exception_blocks to put
1759 the exception hanlding blocks at the end of the function.
1760 * dec.c (hack_incomplete_structures): Make sure expand_decl_cleanup
1761 comes after expand_decl_init.
1762 * except.c: Reimplementation.
1763 * expr.c (cplus_expand_expr): Handle THROW_EXPRs.
1764 * lex.c (init_lex): Always have catch, try and throw be reserved
1765 words, so that we may always parse exception handling.
1766 * parse.y: Cleanup to support new interface into exception handling.
1767 * tree.def (THROW_EXPR): Add.
1769 Thu May 5 17:35:37 1994 Jason Merrill (jason@deneb.cygnus.com)
1771 * parse.y (simple_stmt, for loops): Use implicitly_scoped_stmt.
1772 (various): Lose .kindof_pushlevel and partially_scoped_stmt.
1774 Thu May 5 16:17:27 1994 Kung Hsu (kung@mexican.cygnus.com)
1776 * parse.y (already_scoped_stmt): move expand_end_binding() to
1777 fix the unmatched LBB/LBE in stabs.
1779 Thu May 5 14:36:17 1994 Jason Merrill (jason@deneb.cygnus.com)
1781 * decl.c (set_nested_typename): Set TREE_MANGLED on the new
1783 (pushdecl): Check TREE_MANGLED.
1785 * cp-tree.h (TREE_MANGLED): This identifier is a
1786 DECL_NESTED_TYPENAME (named to allow for future use to denote
1787 mangled function names as well).
1789 Implement inconsistency checking specified in [class.scope0].
1790 * decl.c (lookup_name_real): Don't set ICV here after all.
1791 (finish_enum): Also set the type of the enumerators themselves.
1792 (build_enumerator): Put the CONST_DECL in the list instead of its
1794 (pushdecl_class_level): Check inconsistent use of a name in the
1796 * class.c (finish_struct): Check inconsistent use of a name in the
1797 class body. Don't set DECL_CONTEXT on types here anymore.
1798 * parse.y (qualified_type_name): Note that the identifier has now
1799 been used (as a type) in the class body.
1800 * lex.c (do_identifier): Note that the identifier has now been used
1801 (as a constant) in the class body.
1802 * error.c (dump_decl): Print type and enum decls better.
1804 Thu May 5 09:35:35 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
1806 * typeck.c (build_modify_expr): Warn about assignment to `this'.
1808 Wed May 4 15:55:49 1994 Jason Merrill (jason@deneb.cygnus.com)
1810 * init.c (build_delete): Use the global operator delete when
1813 * decl.c (lookup_name_real): If we find the type we're looking in a
1814 base class while defining a class, set IDENTIFIER_CLASS_VALUE for
1817 * class.c (finish_struct): Remove a couple of dependencies on
1820 * decl.c (pushtag): Classes do nest in extern "C" blocks.
1821 (pushdecl): Only set DECL_NESTED_TYPENAME on the canonical one for
1823 (pushtag): Remove another dependency on the language linkage.
1825 * lex.c (cons_up_default_function): Don't set DECL_CLASS_CONTEXT to
1826 a const-qualified type.
1828 * decl.c (push_overloaded_decl): Throw away built-in decls here.
1829 (duplicate_decls): Instead of here.
1831 Wed May 4 15:27:40 1994 Per Bothner (bothner@kalessin.cygnus.com)
1833 * typeck.c (get_member_function_from_ptrfunc): Do The Right
1834 Thing (I hope) if we're using thunks.
1836 Wed May 4 13:52:38 1994 Jason Merrill (jason@deneb.cygnus.com)
1838 * parse.y (specialization): aggr template_type_name ';'.
1839 (named_class_head_sans_basetype): Use it.
1840 (explicit_instantiation): Ditto.
1843 * cvt.c (build_type_conversion_1): Use convert_for_initialization,
1844 rather than convert, to do conversions after the UDC.
1846 * cp-tree.h (SHARED_MEMBER_P): This member is shared between all
1847 instances of the class.
1849 * search.c (lookup_field): If the entity found by two routes is the
1850 same, it's not ambiguous.
1852 Wed May 4 12:10:00 1994 Per Bothner (bothner@kalessin.cygnus.com)
1854 * decl.c (lookup_name_real): Check for a NULL TREE_VALUE,
1855 to prevent the compiler from crashing ...
1857 Wed May 4 11:19:45 1994 Jason Merrill (jason@deneb.cygnus.com)
1859 * call.c (build_method_call): If we don't have an object, check
1860 basetype_path to figure out where to look up the function.
1862 * typeck.c (convert_for_initialization): Pass TYPE_BINFO (type) to
1863 build_method_call in case exp is NULL_TREE.
1865 Tue May 3 16:02:53 1994 Per Bothner (bothner@kalessin.cygnus.com)
1867 Give a vtable entries a unique named type, for the sake of gdb.
1868 * class.c (build_vtable_entry): The addres of a thunk now has
1869 type vtable_entry_type, not ptr_type_node.
1870 * method.c (make_thunk): Fix type of THUNK_DECL.
1871 * class.c (add_virtual_function, override_one_vtable): Use
1872 vfunc_ptr_type_node, instead of ptr_type_node.
1873 * cp-tree.h (vfunc_ptr_type_node): New macro.
1874 * decl.c (init_decl_processing): Make vtable_entry_type
1875 be a unique type of pointer to a unique function type.
1877 Tue May 3 09:20:44 1994 Jason Merrill (jason@deneb.cygnus.com)
1879 * parse.y (do_explicit): Sets doing_explicit to 1.
1880 (explicit_instantiation): Use do_explicit rather than TEMPLATE
1881 directly, add "do_explicit error" rule.
1882 (datadef): Set doing_explicit to 0 after an explicit instantiation.
1883 (tmpl.2): Don't instantiate if we see a ';' unless we're doing an
1884 explicit instantiation.
1885 (named_class_head_sans_basetype): Remove aggr template_type_name
1888 Mon May 2 23:17:21 1994 Jason Merrill (jason@deneb.cygnus.com)
1890 * search.c (lookup_nested_tag): Lose.
1892 * decl2.c (grokfield): Set DECL_CONTEXT on TYPE_DECLs.
1893 (lookup_name_nonclass): Lose.
1895 * decl.c (poplevel_class): Add force parameter.
1896 (lookup_name_real): Fix handling of explicit scoping which specifies
1897 a class currently being defined. Add 'nonclass' argument.
1898 (lookup_name, lookup_name_nonclass): Shells for lookup_name_real.
1900 * class.c (finish_struct): Don't unset IDENTIFIER_CLASS_VALUEs here.
1901 (popclass): Force clearing of IDENTIFIER_CLASS_VALUEs if we're being
1902 called from finish_struct.
1904 Mon May 2 19:06:21 1994 Per Bothner (bothner@kalessin.cygnus.com)
1906 * decl.c (init_decl_processing), cp-tree.h: Removed memptr_type.
1907 (It seeems redundant, given build_ptrmemfunc_type.)
1908 * typeck.c (get_member_function_from_ptrfunc), gc.c (build_headof,
1909 build_classof): Use vtable_entry_type instead of memptr_type.
1910 * method.c (emit_thunk): Call poplevel with functionbody==0
1911 to prevent DECL_INITIAL being set to a BLOCK.
1913 Mon May 2 15:02:11 1994 Jason Merrill (jason@deneb.cygnus.com)
1915 * parse.y (named_class_head_sans_basetype): Add "aggr
1916 template_type_name ';'" rule for forward declaration of
1919 Mon May 2 15:02:11 1994 Jason Merrill (jason@deneb.cygnus.com)
1921 * class.c (instantiate_type): Deal with pmf's.
1923 * Make-lang.in (cc1plus): Don't depend on OBJS or BC_OBJS, since
1926 * Makefile.in (../cc1plus): Depend on OBJDEPS.
1927 (OBJDEPS): Dependency version of OBJS.
1929 Mon May 2 12:51:31 1994 Kung Hsu (kung@mexican.cygnus.com)
1931 * search.c (dfs_debug_mark): unmark TYPE_DECL_SUPPRESS_DEBUG, not
1934 Fri Apr 29 12:29:56 1994 Jason Merrill (jason@deneb.cygnus.com)
1936 * class.c (finish_struct): Clear out memory of local tags. And
1939 * decl2.c (grokclassfn): Don't set DECL_CONTEXT to a cv-qualified
1941 * search.c (get_matching_virtual): Be more helpful in error message.
1943 * *: Use DECL_ARTIFICIAL (renamed from DECL_SYNTHESIZED).
1945 * lex.c (default_assign_ref_body): Expect TYPE_NESTED_NAME to work.
1946 (default_copy_constructor_body): Ditto.
1948 * class.c (finish_struct): Don't gratuitously create multiple decls
1951 Thu Apr 28 23:39:38 1994 Jason Merrill (jason@deneb.cygnus.com)
1953 Avoid clobbering the arg types of other functions when reverting
1954 static member functions.
1955 * decl.c (revert_static_member_fn): Rearrange arguments, don't
1956 require values for 'fn' and 'argtypes', add warning to comment
1958 (decls_match): Rearrange arguments in call to rsmf.
1959 (grok_op_properties): Don't pass values for fn and argtypes.
1960 * pt.c (instantiate_template): Don't pass values for fn and argtypes.
1962 Thu Apr 28 16:29:11 1994 Doug Evans (dje@canuck.cygnus.com)
1964 * Make-lang.in (cc1plus): Depend on stamp-objlist.
1965 * Makefile.in (BC_OBJS): Delete.
1966 (OBJS): Cat ../stamp-objlist to get language independent files.
1967 Include ../c-common.o.
1968 (../cc1plus): Delete reference to BC_OBJS.
1970 Thu Apr 28 02:12:08 1994 Jason Merrill (jason@deneb.cygnus.com)
1972 * search.c (compute_access): No really, deal with static members
1973 properly. Would I lie to you?
1975 Implement lexical hiding of function declarations.
1976 * pt.c (tsubst): Use lookup_name to look for function decls to guide
1978 * method.c (build_opfncall): Use lookup_name_nonclass to look for
1979 non-member functions.
1980 * init.c (do_friend): Use lookup_name_nonclass to look for
1982 * error.c (ident_fndecl): Use lookup_name to look for functions.
1983 * decl2.c (lookup_name_nonclass): New function, skips over
1985 * decl.c (struct binding_level): Lose overloads_shadowed field.
1986 (poplevel): Don't deal with overloads_shadowed.
1987 (push_overloaded_decl): Do lexical hiding for functions.
1988 * class.c (instantiate_type): Don't check non-members if we have
1989 members with the same name.
1990 * call.c (build_method_call): Use lookup_name_nonclass instead of
1991 IDENTIFIER_GLOBAL_VALUE to check for non-member functions.
1992 (build_overload_call_real): Ditto.
1994 * decl.c (duplicate_decls): Check for ambiguous overloads here.
1995 (push_overloaded_decl): Instead of here.
1997 * decl.c (pushdecl): Back out Chip's last change.
1999 * decl.c (grok_op_properties): operators cannot be static members.
2001 * cp-tree.h (DECL_SYNTHESIZED): DECL_SOURCE_LINE == 0
2002 (SET_DECL_SYNTHESIZED): DECL_SOURCE_LINE = 0
2003 * lex.c (cons_up_default_function): Use SET_DECL_SYNTHESIZED.
2005 * method.c (do_inline_function_hair): Don't put friends of local
2006 classes into global scope, either.
2008 * typeck2.c (build_functional_cast): Don't look for a function call
2011 Thu Apr 28 15:19:46 1994 Mike Stump (mrs@cygnus.com)
2013 * cp-tree.h: disable use of backend EH.
2015 Wed Apr 27 21:01:24 1994 Doug Evans (dje@canuck.cygnus.com)
2017 * Make-lang.in (c++.distdir): mkdir tmp/cp first.
2018 * Makefile.in (INCLUDES): Move definition to same place as
2021 (OLDAR_FLAGS): Delete.
2026 (SUBDIR_USE_ALLOCA): Don't use ALLOCA if compiling with gcc.
2028 Wed Apr 27 19:10:04 1994 Kung Hsu (kung@mexican.cygnus.com)
2030 * decl.c (xref_tag): not to use strstr(), it's not available on
2033 Wed Apr 27 18:10:12 1994 Jason Merrill (jason@deneb.cygnus.com)
2035 * class.c (finish_struct): Resolve yet another class/pmf confusion.
2037 * call.c (build_overload_call_real): Don't take the single-function
2038 shortcut if we're dealing with an overloaded operator.
2040 Wed Apr 27 17:35:37 1994 Mike Stump (mrs@cygnus.com)
2042 * search.c (get_base_distance): Search the virtual base class
2043 binfos, incase someone wants to convert to a real virtual base
2045 * search.c (expand_indirect_vtbls_init): Use convert_pointer_to_real
2046 instead of convert_pointer_to, as it now will work.
2048 Wed Apr 27 15:36:49 1994 Jason Merrill (jason@deneb.cygnus.com)
2050 * cvt.c (convert_to_reference): Don't complain about casting away
2053 * typeck.c (build_unary_op): References are too lvalues.
2055 Wed Apr 27 13:58:05 1994 Mike Stump (mrs@cygnus.com)
2057 * class.c (override_one_vtable): We have to prepare_fresh_vtable
2058 before we modify it, not after, also, we cannot reuse an old vtable,
2059 once we commit to a new vtable. Implement ambiguous overrides in
2060 virtual bases as abstract. Hack until we make the class
2063 Wed Apr 27 01:17:08 1994 Jason Merrill (jason@deneb.cygnus.com)
2065 * parse.y (unary_expr): Expand new_placement[opt] and
2066 new_initializer[opt] inline.
2068 * search.c (lookup_fnfields): Don't throw away the inheritance
2069 information here, either.
2070 (compute_access): Handle static members properly.
2072 * init.c (build_member_call): Always set basetype_path, and pass it
2075 * search.c (lookup_field): Deal properly with the case where
2076 xbasetype is a chain of binfos; don't throw away the inheritance
2078 (compute_access): protected_ok always starts out at 0.
2080 * init.c (resolve_offset_ref): Don't cast `this' to the base type
2081 until we've got our basetype_path.
2083 * cp-tree.h (IS_OVERLOAD_TYPE): aggregate or enum.
2085 * cvt.c (build_up_reference): Use build_pointer_type rather than
2088 * call.c (convert_harshness_ansi): Call type_promotes_to for reals
2091 * cvt.c (type_promotes_to): Retain const and volatile, add
2092 float->double promotion.
2094 * decl.c (grokdeclarator): Don't bash references to arrays into
2095 references to pointers in function parms. Use type_promotes_to.
2097 Tue Apr 26 23:44:36 1994 Mike Stump (mrs@cygnus.com)
2099 Finish off Apr 19th work.
2101 * class.c (finish_struct_bits): Rename has_abstract_virtuals to
2102 might_have_abstract_virtuals.
2103 * class.c (strictly_overrides, override_one_vtable,
2104 merge_overrides): New routines to handle virtual base overrides.
2105 * class.c (finish_struct): Call merge_overrides to handle overrides
2108 Tue Apr 26 12:45:53 1994 Jason Merrill (jason@deneb.cygnus.com)
2110 * typeck.c (build_function_call): Call build_function_call_real with
2113 * *: Don't deal with TYPE_EXPRs.
2115 * tree.c (lvalue_p): If the type of the expression is a reference,
2118 * cvt.c (convert_to_reference): Complain about passing const
2119 lvalues to non-const references.
2120 (convert_from_reference): Don't arbitrarily throw away const and
2121 volatile on the target type.
2123 * parse.y: Simplify and fix rules for `new'.
2125 * decl.c (grok_op_properties): operator void is illegal.
2127 Mon Apr 25 02:36:28 1994 Jason Merrill (jason@deneb.cygnus.com)
2129 * parse.y (components): Anonymous bitfields can still have declspecs.
2131 * decl.c (pushdecl): Postpone handling of function templates like we
2134 * search.c (expand_indirect_vtbls_init): Fix infinite loop when
2135 convert_pointer_to fails.
2137 * call.c (compute_conversion_costs_ansi): A user-defined conversion
2138 by itself is better than that UDC followed by standard conversions.
2139 Don't treat integers and reals specially.
2141 * cp-tree.h: Declare flag_ansi.
2143 * typeck.c (c_expand_return): pedwarn on return in void function
2144 even if the expression is of type void.
2145 (build_c_cast): Don't do as much checking for casts to void.
2146 (build_modify_expr): pedwarn about array assignment if this code
2147 wasn't generated by the compiler.
2149 * tree.c (lvalue_p): A comma expression is an lvalue if its second
2152 * typeck.c (default_conversion): Move code for promoting enums and
2154 * cvt.c (type_promotes_to): To here.
2155 * call.c (convert_harshness_ansi): Use type_promotes_to. Also fix
2156 promotion semantics for reals.
2158 Sun Apr 24 16:52:51 1994 Doug Evans (dje@canuck.cygnus.com)
2160 * Make-lang.in (c++.install-common): Check for g++-cross.
2161 * Makefile.in: Remove Cygnus cruft.
2162 (config.status): Delete.
2164 (TREE_H): Use complete pathname, some native makes have minimal
2166 (*.o): Use complete pathname to headers in parent dir.
2167 (doc, info, dvi): Delete.
2169 Sun Apr 24 16:52:51 1994 Doug Evans (dje@canuck.cygnus.com)
2171 * Make-lang.in (c++.install-common): Check for g++-cross.
2172 * Makefile.in: Remove Cygnus cruft.
2173 (config.status): Delete.
2175 (TREE_H): Use complete pathname, some native makes have minimal
2177 (*.o): Use complete pathname to headers in parent dir.
2178 (doc, info, dvi): Delete.
2180 Sun Apr 24 00:47:49 1994 Jason Merrill (jason@deneb.cygnus.com)
2182 * decl.c (pushdecl): Avoid redundant warning on redeclaring function
2183 with different return type.
2184 (decls_match): Compare return types strictly.
2186 Fri Apr 22 12:55:42 1994 Jason Merrill (jason@deneb.cygnus.com)
2188 * cvt.c (build_type_conversion): Do try to convert through other
2189 pointers. This will fail if the class defines multiple pointer
2192 * error.c (dump_type_prefix): Print out pointers to arrays properly.
2193 (dump_type_suffix): Ditto. (was 'int *[]', now 'int (*)[]')
2195 * typeck.c (build_unary_op): Disallow ++/-- on pointers to
2198 * decl.c (duplicate_decls): Check mismatched TREE_CODES after
2199 checking for shadowing a builtin. If we're redeclaring a builtin
2200 function, bash the old decl to avoid an ambiguous overload.
2202 * cvt.c (convert_to_reference): Don't force arrays to decay here.
2204 * tree.c (lvalue_p): A MODIFY_EXPR is an lvalue.
2206 * decl.c (duplicate_decls): Don't assume that the decls will have
2209 Mon Apr 18 11:35:32 1994 Chip Salzenberg (chip@fin.uucp)
2211 [ cp/* changes propagated from c-* changes in 940318 snapshot ]
2212 * c-decl.c (pushdecl): Warn if type mismatch with another external decl
2215 Fri Apr 22 06:38:56 1994 Chip Salzenberg (chip@fin.uucp)
2217 * cp/typeck2.c (signature_error): Use cp_error for "%T".
2219 Mon Apr 18 11:59:59 1994 Chip Salzenberg (chip@fin.uucp)
2221 [ cp/* changes propagated from c-* changes in 940415 snapshot ]
2222 * cp/decl.c (duplicate_decls, pushdecl, builtin_function):
2223 Use DECL_FUNCTION_CODE instead of DECL_SET_FUNCTION_CODE.
2225 Mon Apr 18 11:55:18 1994 Chip Salzenberg (chip@fin.uucp)
2227 [ cp/* changes propagated from c-* changes in 940409 snapshot ]
2228 * cp/decl.c (duplicate_decls): Put new type in same obstack as
2229 old ones, or permanent if old ones in different obstacks.
2231 Mon Apr 18 11:48:49 1994 Chip Salzenberg (chip@fin.uucp)
2233 [ cp/* changes propagated from c-* changes in 940401 snapshot ]
2234 * cp/parse.y (attrib): Handle string args as expressions,
2235 merging the two rules. `mode' attribute now takes a string arg.
2236 Delete the rule for an identifier as arg.
2238 Mon Apr 18 11:24:00 1994 Chip Salzenberg (chip@fin.uucp)
2240 [ cp/* changes propagated from c-* changes in 940312 snapshot ]
2241 * cp/typeck.c (pointer_int_sum): Multiplication should be done signed.
2242 (pointer_diff): Likewise the division.
2244 Sun Mar 6 19:43:39 1994 Chip Salzenberg (chip@fin.uucp)
2246 [ cp/* changes propagated from c-* changes in 940304 snapshot ]
2247 * cp/decl.c (finish_decl): Issue warning for large objects,
2250 Sat Feb 19 22:20:32 1994 Chip Salzenberg (chip@fin.uucp)
2252 [ cp/* changes propagated from c-* changes in 940218 snapshot ]
2253 * cp/parse.y (attrib): Handle attribute ((section ("string"))).
2254 * cp/decl.c (duplicate_decls): Merge section name into new decl.
2256 Tue Feb 8 09:49:17 1994 Chip Salzenberg (chip@fin.uucp)
2258 [ cp/* changes propagated from c-* changes in 940206 snapshot ]
2259 * cp/typeck.c (signed_or_unsigned_type): Check for any
2260 INTEGRAL_TYPE_P not just INTEGER_TYPE.
2262 Mon Dec 6 13:35:31 1993 Norbert Kiesel (norbert@i3.INformatik.rwth-aachen.DE)
2264 * cp/decl.c (finish_enum): Start from 0 when determining precision
2267 Fri Dec 3 17:07:58 1993 Ralph Campbell (ralphc@pyramid.COM)
2269 * cp/parse.y (unary_expr): Look at $1 for tree_code rather than
2272 Wed Nov 17 19:22:09 1993 Chip Salzenberg (chip@fin.uucp)
2274 * cp/typeck.c (build_binary_op_nodefault): Propagate code
2275 from C front-end to optimize unsigned short division.
2276 (build_conditional_expr): Fix bug in "1 ? 42 : (void *) 8".
2278 Wed Nov 17 19:17:18 1993 Chip Salzenberg (chip@fin.uucp)
2280 * cp/call.c (convert_harshness_ansi): Given an (e.g.) char
2281 constant, prefer 'const char &' to 'int'.
2283 Wed Feb 3 13:11:48 1993 Chip Salzenberg (chip@fin.uucp)
2285 * cp/class.c (finish_struct_methods): Handle multiple
2286 constructors in fn_fields list.
2288 Fri Apr 22 12:48:10 1994 Kung Hsu (kung@mexican.cygnus.com)
2290 * class.c (finish_struct): use TYPE_DECL_SUPPRESS_DEBUG to flag
2291 types not to be dumped in stabs, like types in #pragma interface.
2292 * decl.c (init_decl_processing): use TYPE_DECL_SUPPRESS_DEBUG to
2295 Fri Apr 22 03:27:26 1994 Doug Evans (dje@cygnus.com)
2297 * Language directory reorganization.
2298 See parent makefile.
2300 Fri Apr 22 03:27:26 1994 Doug Evans (dje@cygnus.com)
2302 * Language directory reorganization.
2303 See parent makefile.
2305 Thu Apr 21 18:27:57 1994 Per Bothner (bothner@kalessin.cygnus.com)
2307 * cp-tree.h (THUNK_DELTA): It is normally negative, so
2308 use signed .i variant of frame_size rather than unsigned .u.
2309 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
2310 use "VT" rather than "vt" due to binary incompatibility.
2311 * class.c (get_vtable_name): Use strlen of VTABLE_NAME_FORMAT,
2312 rather than sizeof, since it is now an expression.
2313 * class.c (modify_one_vtable): Modify to skip initial element
2314 containing a count of the vtable.
2316 Thu Apr 21 00:09:02 1994 Jason Merrill (jason@deneb.cygnus.com)
2318 * lex.c (check_newline): Force interface_unknown on main input file.
2320 * pt.c (do_pending_expansions): Always emit functions that have been
2321 explicitly instantiated.
2322 (do_function_instantiation): Set DECL_EXPLICITLY_INSTANTIATED.
2323 (do_type_instantiation): Set CLASSTYPE_VTABLE_NEEDS_WRITING and
2324 DECL_EXPLICITLY_INSTANTIATED on all my methods.
2325 * parse.y (explicit_instantiation): Call do_type_instantiation for
2327 * decl2.c (finish_vtable_vardecl): Call import_export_vtable.
2328 * decl.c (start_function): Don't set DECL_EXTERNAL on a function
2329 that has been explicitly instantiated.
2330 * cp-tree.h (DECL_EXPLICITLY_INSTANTIATED): Alias for
2332 * class.c: Move import_export_vtable to decl2.c, and comment out all
2335 Wed Apr 20 16:51:06 1994 Jason Merrill (jason@deneb.cygnus.com)
2337 * lex.c (process_next_inline): Don't muck with DECL_INLINE.
2338 (do_pending_inlines): Ditto.
2340 Tue Apr 19 22:25:41 1994 Mike Stump (mrs@cygnus.com)
2342 Reimplement vtable building, and most vtable pointer setting.
2343 Allows for earier maintenance, easier understandability, and most
2344 importantly, correct semantics.
2346 * class.c (build_vtable): Removed unneeded
2347 SET_BINFO_VTABLE_PATH_MARKED.
2348 * class.c (prepare_fresh_vtable): Ditto. Added argument.
2349 * class.c (modify_vtable_entry): General cleanup.
2350 * class.c (related_vslot, is_normal, modify_other_vtable_entries,
2351 modify_vtable_entries): Removed.
2352 * class.c (add_virtual_function): General cleanup.
2353 * class.c (finish_base_struct): Setup BINFO_VTABLE and
2354 BINFO_VIRTUALS as early as we can, so that modify_all_vtables can
2356 * class.c (finish_vtbls): New routine, mostly from
2357 unmark_finished_struct.
2358 * class.c (overrides): New routine.
2359 * class.c (modify_one_vtable): New routine, mostly from
2360 modify_other_vtable_entries and modify_vtable_entries.
2361 * class.c (modify_all_direct_vtables, modify_all_indirect_vtables,
2362 modify_all_vtables): New routines.
2363 * class.c (finish_struct): Added arguemnt to prepare_fresh_vtable
2364 call. General cleanup on how pending_hard_virtuals are handled.
2365 General cleanup on modifying vtables. Use finish_vtbls, instead of
2366 unmark_finished_struct.
2367 * cp-tree.h (init_vtbl_ptrs, expand_direct_vtbls_init,
2368 get_first_matching_virtual, get_matching_virtual,
2369 expand_vbase_vtables_init, expand_indirect_vtbls_init): Update.
2370 * cvt.c (convert_pointer_to_real): cleanup error message.
2371 * decl.c (grokfndecl): General cleanup.
2372 * decl.c (finish_function): Change init_vtbl_ptrs call to
2373 expand_direct_vtbls_init. Change expand_vbase_vtables_init call to
2374 expand_indirect_vtbls_init.
2375 * init.c (expand_virtual_init): Remove unneeded argument.
2376 * init.c (init_vtbl_ptrs): Rename to expand_direct_vtbls_init, added
2377 two arguments to make more general. Made more general. Now can be
2378 used for vtable pointer initialization from virtual bases.
2379 * init.c (emit_base_init): Change expand_vbase_vtables_init call to
2380 expand_indirect_vtbls_init. Change init_vtbl_ptrs call to
2381 expand_direct_vtbls_init.
2382 * init.c (expand_virtual_init): General cleanup.
2383 * init.c (expand_default_init): Change expand_vbase_vtables_init
2384 call to expand_indirect_vtbls_init.
2385 * init.c (expand_recursive_init_1): Change expand_vbase_vtables_init
2386 call to expand_indirect_vtbls_init.
2387 * init.c (expand_recursive_init): Change expand_vbase_vtables_init
2388 call to expand_indirect_vtbls_init.
2389 * search.c (get_first_matching_virtual): Rename to
2390 get_matching_virtual. General cleanup and remove setting of
2391 DECL_CONTEXT. That is now done in a cleaner way in
2392 modify_vtable_entry and add_virtual_function.
2393 * search.c (expand_vbase_vtables_init): Rename to
2394 expand_indirect_vtbls_init. General cleanup. Use
2395 expand_direct_vtbls_init to do hard work. Ensures that _all_ vtable
2396 pointers from virtual bases are set up.
2397 * search.c (bfs_unmark_finished_struct, unmark_finished_struct):
2400 * *.[chy]: Remove support for VTABLE_USES_MASK.
2402 Tue Apr 19 12:51:59 1994 Jason Merrill (jason@deneb.cygnus.com)
2404 * cvt.c (convert_to_reference): Use NOP_EXPRs to switch between
2405 reference and pointer types instead of bashing the types directly.
2407 * call.c (build_overload_call_real): Use the TREE_CODE to determine
2408 whether the function is overloaded or not, rather than
2410 * *: Remove all uses of TREE_OVERLOADED.
2412 * decl.c (grokdeclarator): Only complain about initializing const
2413 fields when -ansi or -pedantic.
2415 Tue Apr 19 12:42:42 1994 Doug Evans (dje@canuck.cygnus.com)
2417 * cp-tree.h (THUNK_DELTA): frame_size is now a union.
2419 Mon Apr 18 00:17:13 1994 Jason Merrill (jason@deneb.cygnus.com)
2421 Do overloading on a block-by-block basis, not function-by-function.
2422 * decl.c: Lose overloads_to_forget.
2423 (struct binding_level): Add overloads_shadowed field.
2424 (poplevel): Restore overloads_shadowed.
2425 (push_overloaded_decl): Use overloads_shadowed instead of
2426 overloads_to_forget.
2427 (finish_function): Don't look at overloads_to_forget.
2429 Copy enum_overflow logic from c-decl.c.
2430 * decl.c (start_enum): Initialize enum_overflow.
2431 (build_enumerator): Use enum_overflow. Also use current_scope().
2433 * search.c (current_scope): Move Brendan's comment from
2434 build_enumerator here.
2436 * typeck.c (convert_for_assignment): Change warnings to pedwarns for
2437 discarding const/volatile.
2439 Sat Apr 16 01:18:21 1994 Jason Merrill (jason@deneb.cygnus.com)
2441 * typeck.c (comp_target_parms): Accept TEMPLATE_TYPE_PARMs on the rhs.
2442 (comp_target_types): Ditto.
2444 * decl.c (lookup_name): Don't unset got_scope here.
2446 * spew.c (yylex): Only replace yylval with the TYPE_NESTED_NAME if
2447 got_scope != NULL_TREE.
2449 Fri Apr 15 16:36:33 1994 Jason Merrill (jason@deneb.cygnus.com)
2451 Horrible kludge to prevent templates from being instantiated by
2453 * parse.y (template_instantiate_once): Unset TYPE_BEING_DEFINED
2454 before we get to left_curly.
2455 * pt.c (instantiate_class_template): Set TYPE_BEING_DEFINED.
2457 * error.c (dump_decl): If it's a typedef, print out the name of the
2458 decl, not just the underlying type.
2460 * decl.c (pushdecl): If the old duplicate decl was a TYPE_DECL,
2461 update the IDENTIFIER_TYPE_VALUE of its name.
2463 * decl2.c (finish_file): When processing the initializer for a
2464 static member, pretend that the dummy function is a member of the
2467 Fri Apr 15 15:56:35 1994 Kung Hsu (kung@mexican.cygnus.com)
2469 * class.c (build_vtable_entry): revert Apr 4 change.
2470 * decl2.c (mark_vtable_entries): replace pure virtual function
2473 Fri Apr 15 13:49:33 1994 Jason Merrill (jason@deneb.cygnus.com)
2475 * typeck.c (build_conditional_expr): Pedwarn on pointer/integer
2476 mismatch, and don't pedwarn on 0/function pointer mismatch.
2478 * typeck2.c (digest_init): Lose code for special handling of unions.
2479 (process_init_constructor): Since they're handled just fine here.
2480 Pedwarn on excess elements.
2482 * decl2.c (grokfield): Complain about local class method declaration
2485 Fri Apr 15 13:19:40 1994 Per Bothner (bothner@kalessin.cygnus.com)
2487 * method.c (emit_thunk): Add extern declaration for
2488 current_call_is_indirect (needed for hppa).
2490 Thu Apr 14 16:12:31 1994 Jason Merrill (jason@deneb.cygnus.com)
2492 Improve local class support; allow classes in different blocks to
2494 * decl.c (pushtag): Support local classes better.
2495 (pushdecl_nonclass_level): New function for pushing mangled decls of
2496 nested types into the appropriate scope.
2497 (xref_defn_tag): Use pushdecl_nonclass_level instead of
2499 (grokfndecl): Don't mess with IDENTIFIER_GLOBAL_VALUE for local
2501 * method.c (do_inline_function_hair): Ditto.
2503 * class.c (finish_struct): It is legal for a class with no
2504 constructors to have nonstatic const and reference members.
2506 Thu Apr 14 07:15:11 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
2508 * decl.c (push_overloaded_decl): Avoid giving errors about
2509 built-ins, since duplicate_decls will have given warnings/errors
2512 Thu Apr 14 03:45:12 1994 Jason Merrill (jason@deneb.cygnus.com)
2514 * cvt.c (convert_to_reference): Warn about casting pointer type to
2515 reference type when this is probably not what they wanted.
2517 Wed Apr 13 13:12:35 1994 Per Bothner (bothner@kalessin.cygnus.com)
2519 * decl.c (finish_decl): Don't mindlessly set TREE_USED for
2520 static consts any more (toplev.c has now been modified to
2521 not emit warnings if they are unused).
2523 Wed Apr 13 00:22:35 1994 Jason Merrill (jason@deneb.cygnus.com)
2525 * decl.c (grok_op_properties): If op new/delete get here with
2526 METHOD_TYPEs, do a revert_static_member_fn.
2528 * cp-tree.h (IDENTIFIER_CLASS_TYPE_VALUE): Lose.
2529 * init.c (is_aggr_typedef): Don't look at
2530 IDENTIFIER_CLASS_TYPE_VALUE.
2531 (get_aggr_from_typedef): Ditto.
2532 (get_type_value): Ditto.
2533 * call.c (build_scoped_method_call): Don't rely on overloaded
2534 template names having IDENTIFIER_CLASS_VALUE set.
2536 * parse.y (component_decl_1, fn.def2): Revert rules for
2538 (component_decl_1, fn.def2): Use $1 instead of $$, since $$ is being
2541 * decl.c (start_function): Only warn about `void main()' if pedantic
2542 || warn_return_type.
2544 Tue Apr 12 02:14:17 1994 Jason Merrill (jason@deneb.cygnus.com)
2546 Clean up overloading of the template name.
2547 * class.c (pushclass): overload the template name whenever pushing
2548 into the scope of a template class, not just if it is
2550 (popclass): Correspondingly.
2551 * search.c (push_class_decls): Don't overload_template_name.
2552 * pt.c (overload_template_name): Don't set IDENTIFIER_LOCAL_VALUE or
2553 DECL_CONTEXT on things.
2554 * parse.y (left_curly): Don't overload_template_name.
2555 * class.c (finish_struct): Don't undo_template_name_overload.
2557 * method.c (build_opfncall): Only pass one argument to global op
2560 * call.c (build_method_call): Use TYPE_VEC_DELETE_TAKES_SIZE to
2561 decide how many arguments to use for vec delete.
2563 * decl.c (grok_op_properties): Be consistent in modifying
2565 (grokdeclarator): Only complain about function decls with no return
2566 type if we're being pedantic.
2568 Mon Apr 11 00:10:53 1994 Jason Merrill (jason@deneb.cygnus.com)
2570 Add support for operator new [] and operator delete [].
2572 * tree.def: Add VEC_NEW_EXPR and VEC_DELETE_EXPR.
2573 * ptree.c (print_lang_type): Indicate vec new/delete.
2574 * parse.y: Support vec new/delete.
2575 * method.c (build_decl_overload): Deal with vec new/delete.
2576 (build_opfncall): Ditto.
2577 * lex.c (init_lex): Set up values of ansi_opname and opname_tab for
2578 vec new/delete. vec new uses "__vn", and vec delete uses "__vd".
2579 * init.c (init_init_processing): Set up BIVN and BIVD.
2580 (do_friend): Don't clean up after mistaken setting of TREE_GETS_NEW,
2581 since it doesn't happen any more.
2582 (build_new): Support vec new. Always call something.
2583 (build_x_delete): Support vec delete.
2584 (build_vec_delete): Lose dtor_dummy argument, add use_global_delete,
2585 and pass it to build_x_delete.
2586 * decl2.c (delete_sanity): Don't change behavior by whether or not
2587 the type has a destructor. Pass use_global_delete to
2589 (coerce_delete_type): Make sure that the type returned has a first
2590 argument of ptr_type_node.
2591 * decl.c (init_decl_processing): Also declare the global vec
2593 (grokdeclarator): Also force vec new/delete to be static.
2594 (grok_op_properties): Note presence of vec new/delete, and play with
2595 their args. If vec delete takes the optional size_t argument, set
2596 TYPE_VEC_DELETE_TAKES_SIZE.
2597 * cp-tree.h (TYPE_GETS_{REG,VEC}_DELETE): New macros to simplify
2598 checking for one delete or the other.
2599 (lang_type): gets_new and gets_delete are now two bits long. The
2600 low bit is for the non-array version. Lose gets_placed_new.
2601 (TYPE_VEC_DELETE_TAKES_SIZE): New macro indicating that the vec
2602 delete defined by this class wants to know how much space it is
2604 (TYPE_VEC_NEW_USES_COOKIE): New macro to indicate when vec new must
2605 add a header containing the number of elements in the vector; i.e.
2606 when the elements need to be destroyed or vec delete wants to know
2608 * class.c (finish_struct_methods): Also check for overloading vec
2610 * call.c (build_method_call): Also delete second argument for vec
2613 * decl.c (grokdeclarator): Correct complaints again.
2614 (grokdeclarator): Fix segfault on null declarator.
2615 (decls_match): Also accept redeclaration with no arguments if both
2616 declarations were in C context. Bash TREE_TYPE (newdecl) here.
2617 (duplicate_decls): Instead of here.
2619 * parse.y (nested_name_specifier_1): Lose rules for dealing with
2620 syntax errors nicely, since they break parsing of 'const i;'.
2622 * decl.c (lookup_name): if (got_scope == current_class_type)
2623 val = IDENTIFIER_CLASS_VALUE (name).
2625 * search.c (lookup_nested_tag): Look in enclosing classes, too.
2627 * spew.c (yylex): Only look one character ahead when checking for a
2630 * lex.c (check_newline): Read first nonwhite char before
2631 incrementing lineno.
2633 * decl.c (grokdeclarator): Don't claim that typedefs are variables
2636 * parse.y: Divide up uses of unqualified_id into
2637 notype_unqualified_id and unqualified_id, so that TYPENAME can be
2638 used as an identifier after an object.
2640 * class.c (push_nested_class): Don't push into non-class scope.
2642 * decl.c (grokdeclarator): If an identifier could be a type
2643 conversion operator, but has no associated type, it's not a type
2644 conversion operator.
2646 * pt.c (unify): Check for equality of constants better.
2648 * decl.c (grokdeclarator): Don't complain about access decls.
2650 Sun Apr 10 02:39:55 1994 Jason Merrill (jason@deneb.cygnus.com)
2652 * decl.c (grokdeclarator): pedwarn about data definitions without
2655 * parse.y (datadef): Don't pedwarn about decls without types here,
2656 since that is valid for functions.
2657 (fn.def2, component_decl): Support constructors with declmods again.
2658 (nomods_initdecls): For decls without any mods, so that we don't try
2659 to get declspecs from some arbitrary $0.
2661 * search.c (lookup_field): Use cp_error.
2663 * parse.y (nested_name_specifier_1): Don't check aggr/non-aggr type
2664 here; it breaks destructors for non-aggr types.
2666 * decl.c (lookup_name): Only look for TYPE_DECLs in base classes of
2667 a type being defined, like the comment says.
2668 If got_scope is not an aggregate, just return NULL_TREE.
2670 * pt.c (create_nested_upt): Kung's code for creating types nested
2671 within uninstantiated templates now lives here (it used to live in
2672 hack_more_ids). It needs to be expanded.
2674 * parse.y: Stop calling see_typename so much.
2676 * decl.c (lookup_name): Deal with TTPs and UPTs.
2678 * lex.c (real_yylex): Don't set looking_for_typename just because we
2680 (dont_see_typename): #if 0 out.
2682 * spew.c (yylex): Increment looking_for_typename if the next
2683 character is SCOPE, rather than setting it to 1; this way, the value
2684 from seeing an aggr specifier will not be lost. This kinda relies
2685 on looking_for_typename never being < 0, which is now true.
2687 * parse.y (nested_name_specifier_1): Accept TEMPLATE_TYPE_PARMs,
2689 (named_class_head_sans_basetype): Accept template types, too. Oops.
2691 Fri Apr 8 16:39:35 1994 Jason Merrill (jason@deneb.cygnus.com)
2693 * decl2.c (reparse_decl_as_expr1): Handle SCOPE_REFs.
2695 * parse.y: Lose START_DECLARATOR.
2697 * search.c (lookup_nested_tag): New function to scan CLASSTYPE_TAGS
2700 * parse.y: Simplify fn.def2 and component_decl. Support 'enum
2701 A::foo' syntax. Catch invalid scopes better.
2703 * parse.y, lex.c: lose TYPENAME_COLON.
2705 * decl2.c (groktypefield): #if 0 out.
2707 * decl.c (lookup_name): If the type denoted by got_scope is
2708 currently being defined, look in CLASSTYPE_TAGS rather than FIELDS.
2710 * class.c (push_nested_class): Don't try to push into
2713 Fri Apr 8 07:26:36 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
2715 * Makefile.in (stamp-parse): Update count of conflicts to 33.
2717 Thu Apr 7 17:47:53 1994 Jason Merrill (jason@deneb.cygnus.com)
2719 A saner implementation of nested types that treats template types
2720 no differently from non-template types. There are still some
2721 shortcomings of our system; most notably, it is difficult to look
2722 for a nested type that is hidden by another name, because of the way
2723 we keep track of hidden types. But this shouldn't be a problem for
2724 just about anyone. Perhaps lookup_field should be fixed up a bit.
2726 * spew.c: Moved handling of nested types/scoping from the lexer
2727 into the parser. Removed variable template_type_seen_before_scope.
2728 Removed functions frob_identifier, hack_more_ids, and various cruft
2729 that was #if 0'd out in the past, reducing the size of the file from
2730 1146 lines to 450 lines. We can't quite do away with spew.c yet,
2731 though; we still need it for do_aggr () and checking for SCOPE after
2732 the current identifier. And setting lastiddecl.
2734 * parse.y: Moved handling of nested types/scoping from the lexer
2735 into the parser, using a new global variable `got_scope'. Reduced
2736 the number of states by 53. Implemented all uses of explicit global
2737 scope. Removed terminals SCOPED_TYPENAME and SCOPED_NAME. Removed
2738 nonterminals tmpl.1, scoped_base_class, id_scope, typename_scope,
2739 scoped_typename. Added nonterminals nested_type,
2740 qualified_type_name, complete_type_name, qualified_id, ptr_to_mem,
2741 nested_name_specifier, global_scope, overqualified_id, type_name.
2742 Changed many others. Added 9 new reduce/reduce conflicts, which are
2743 nested type parallels of 9 that were already in the grammar for
2744 non-nested types. Eight of the now 33 conflicts should be removed
2745 in the process of resolving the late binding between variable and
2748 * gxxint.texi (Parser): Update.
2750 * cp-tree.h (IS_AGGR_TYPE_CODE): Add UNINSTANTIATED_P_TYPE.
2752 * lex.h: Add decl for got_scope.
2754 * lex.c (see_typename): Claim to be the lexer when calling
2757 * decl.c (lookup_name): When called from the lexer, look at
2758 got_scope and looking_at_typename; otherwise don't.
2760 Thu Apr 7 22:05:47 1994 Mike Stump (mrs@cygnus.com)
2762 31th Cygnus<->FSF merge.
2764 Thu Apr 7 17:47:53 1994 Jason Merrill (jason@deneb.cygnus.com)
2766 * decl2.c (mark_vtable_entries): Call this to mark all the
2767 entries in the vtable addressable.
2768 (finish_decl_parsing): Handle SCOPE_REFs.
2770 * decl.c (decls_match): Always call compparms with strict == 1.
2771 Handle the special case of C function redecl here.
2772 (duplicate_decls): Only keep the old type if the new decl takes no
2775 * typeck.c (compparms): Also allow t1 to be ... if strict == 0.
2777 Thu Apr 7 16:17:50 1994 Mike Stump (mrs@cygnus.com)
2779 * class.c (build_vtable_entry): Fix breakage introduced Apr 5
2782 Wed Apr 6 16:05:10 1994 Per Bothner (bothner@kalessin.cygnus.com)
2784 * init.c (build_virtual_init), search.c (build_vbase_vtables_init),
2785 ch-tree.h: Every place these functions were called, the result was
2786 immediately passed to expand_expr_stmt. Reduce redundancy by
2787 calling expand_expr_init *inside* these functions. These
2788 makes for a simpler interface, and we don't have to build
2789 compound expressions. Hence, rename these function to:
2790 expand_virtual_init and expand_vbase_vtables_init respectively.
2791 * init.c, decl.c: Change callers of these functions.
2792 * init.c, cp-tree.h (expand_virtual_init): Make static.
2794 * decl2.c (finish_file): Check TREE_PUBLIC||TREE_ADDRESSABLE
2795 rather than DECL_SAVED_INSNS before emitting inlines.
2797 Wed Apr 6 13:06:39 1994 Jason Merrill (jason@deneb.cygnus.com)
2799 * spew.c (init_spew): #if 0 out stuff used by arbitrate_lookup.
2801 * decl.c (duplicate_decls): If this is a new declaration of an
2802 extern "C" function, keep the type (for the argtypes).
2803 (redeclaration_error_message): Don't check DECL_LANGUAGE here.
2804 (decls_match): Call compparms with a value of strict dependent on
2805 the value of strict_prototypes for DECL_LANGUAGE (oldecl).
2807 * typeck.c (compparms): ... is only equivalent to non-promoting
2808 parms if we're not being strict.
2810 * parse.y (empty_parms): Don't check flag_ansi || pedantic here.
2812 * decl.c (init_decl_processing): if (flag_ansi || pedantic)
2813 strict_prototypes_lang_c = strict_prototypes_lang_cplusplus;
2815 * decl2.c (grok_function_init): Don't set DECL_INITIAL on pure
2818 Tue Apr 5 17:48:41 1994 Per Bothner (bothner@kalessin.cygnus.com)
2820 Support for implementing vtables with thunks.
2821 * tree.def (THUNK_DECL): New TREE_CODE.
2822 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY), tree.c
2823 (fnaddr_from_vtable_entry): Handle flag_vtable_thunks case.
2824 * cp-tree.h (memptr_type): New variable.
2825 * class.c (build_vtable_entry): Build thunk if necessary.
2826 * class.c (build_vfn_ref): If using thunks, don't need
2827 to add delta field from vtable (there is none!).
2828 * decl.c: Add memptr_type as well as vtable_entry_type.
2829 If using thunks, the latter is just ptr_type_node.
2830 * gc.c, typeck.c: Use memptr_typeChange, not vtable_entry_type.
2831 * decl2.c (finish_vtable_vardecl): Handle thunks.
2832 * expr.c (cplus_expand_expr): Support THUNK_DECL.
2834 * decl.c (grokdeclarator): Set DECL_THIS_EXTERN if "extern".
2835 * decl.c (start_function): Set current_extern_inline based on
2836 DECL_THIS_EXTERN, not TREE_PUBLIC.
2837 * decl.c (finish_function): Call mark_inline_for_output if needed,
2839 Improve intelligence about when to emit inlines.
2840 * cp-tree.h (lang_decl_flags): New field saved_inline.
2841 * cp-tree.h (DECL_SAVED_INLINE): New macro.
2842 * class.c (add_virtual_function): Don't set TREE_ADDRESSABLE.
2843 * decl.h, decl.c (pending_addressable_inlines): Removed.
2844 * decl2.c (pending_addressable_inlines): Renamed to saved_inlines.
2845 * decl2.c (mark_inline_for_output): Do nothing if
2846 DECL_SAVED_INLINE; otherwise set it (and add to saved_inlines list).
2847 * decl2.c (finish_vtable_vardecl): SET_CLASSTYPE_INTERFACE_KNOWN
2848 and set CLASSTYPE_INTERFACE_ONLY if there is a non-inline virtual.
2849 * decl2.c (finish_file): Writing out inlines later, so we can
2850 also handle the ones needed for vtbales.
2851 * decl2.c (write_vtable_entries, finish_vtable_typedecl): Removed.
2853 * cp-tree.h, class.c, decl2.c, search.c: Remove -fvtable-hack
2854 and flag_vtable_hack. Use -fvtable-thunks and flag_vtable_thunks
2855 instead. (The rationale is that these optimizations both break binary
2856 compatibility, but should become the default in a future release.)
2858 Wed Apr 6 10:53:56 1994 Mike Stump (mrs@cygnus.com)
2860 * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT
2861 of a fndecl, as we might not be from that vfield.
2863 Tue Apr 5 17:43:35 1994 Kung Hsu (kung@mexican.cygnus.com)
2865 * class.c (add_virtual_function): fix bug for pure virtual, so
2866 that DECL_VINDEX of the dummy decl copied won't be error.
2867 (see also Apr 4 change)
2869 Tue Apr 5 17:23:45 1994 Per Bothner (bothner@kalessin.cygnus.com)
2871 * typeck.c (c_expand_return): Before checking that we're not
2872 returning the address of a local, make sure it's a VAR_DECL.
2873 (And don't worry about it being a TREE_LIST.)
2875 Tue Apr 5 13:26:42 1994 Jason Merrill (jason@deneb.cygnus.com)
2877 * parse.y (YYDEBUG): Always define.
2878 * lex.c (YYDEBUG): Ditto.
2880 Mon Apr 4 11:28:17 1994 Kung Hsu (kung@mexican.cygnus.com)
2882 * class.c (finish_struct): backup out the change below, put the
2883 new change for the same purpose. The change below breaks code.
2885 * class.c (finish_struct): if pure virtual, copy node and make
2886 RTL point to abort, then put in virtual table.
2887 * decl2.c (grok_function_iit): reinstate Mar 31 change.
2889 Sat Apr 2 03:12:58 1994 Jason Merrill (jason@deneb.cygnus.com)
2891 * init.c (build_new): pedwarn about newing const and volatile
2894 * tree.c (get_identifier_list): Only do the special handling
2895 thing if we're dealing with the main variant of the record type.
2897 * cvt.c (convert_to_reference): When converting between
2898 compatible reference types, use the pointer conversion machinery.
2899 Don't just blindly overwrite the old type.
2901 Fri Apr 1 17:14:42 1994 Jason Merrill (jason@deneb.cygnus.com)
2903 * call.c (build_method_call): When looking at global functions,
2904 be sure to use instance_ptr for the first argument, not some version
2905 of it that has been cast to a base class. Also do this before
2906 comparing candidates.
2908 Thu Mar 31 19:50:35 1994 Jason Merrill (jason@deneb.cygnus.com)
2910 * call.c (build_method_call): Constructors can be called for
2913 Thu Mar 31 16:20:16 1994 Kung Hsu (kung@mexican.cygnus.com)
2915 * decl2.c (grok_func_init): do not abort as rtl for pur virtual
2916 fucntions. They can be defined somewhere else.
2918 Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
2920 * decl.c (init_decl_processing): Declare __builtin_return_address
2921 and __builtin_frame_address for C++ as well.
2923 Thu Mar 31 12:35:49 1994 Mike Stump (mrs@cygnus.com)
2925 * typeck2.c (store_init_value): Integral constant variables are
2926 always constant, even when doing -fpic.
2928 Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
2930 * decl.c (redeclaration_error_message): Pass the types to
2933 Wed Mar 30 21:29:25 1994 Mike Stump (mrs@cygnus.com)
2935 Cures incorrect errors about pure virtuals in a class, when they
2936 have been overridden in a derived class.
2938 * search.c (get_abstract_virtuals): Reimplement.
2939 * search.c (get_abstract_virtuals_1): New routine.
2941 Wed Mar 30 14:10:04 1994 Jason Merrill (jason@deneb.cygnus.com)
2943 * pt.c (push_template_decls): Make the pushed level pseudo
2946 * parse.y (extdefs): Don't pop everything if the current binding
2947 level is pseudo_global.
2949 * decl.c (pop_everything): Stop on reaching a pseudo-global
2952 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Change to more reliable test.
2954 * decl.c (duplicate_decls): Only copy DECL_SOURCE_{FILE_LINE} if
2955 the old decl actually had an initializer.
2957 * {various}: Clean up gcc -W complaints.
2959 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Currently defined to be
2960 (DECL_CONTEXT (NODE) != NULL_TREE).
2962 * parse.y (lang_extdef): Call pop_everything if necessary.
2964 * decl.c (pop_everything): New function for popping binding
2965 levels left over after a syntax error.
2966 (pushdecl): Use DECL_FUNCTION_MEMBER_P to decide whether or not
2967 a function is a member.
2969 Wed Mar 30 14:20:50 1994 Mike Stump (mrs@cygnus.com)
2971 Cures calling a more base base class function, when a more derived
2972 base class member should be called in some MI situations.
2974 * search.c (make_binfo): Use more the more specialized base
2975 binfos from the binfo given as the second argument to make_binfo,
2976 instead of the unspecialized ones from the TYPE_BINFO.
2977 * class.c (finish_base_struct): Ditto, update callers.
2978 * search.c (dfs_get_vbase_types): Ditto.
2979 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Ditto.
2980 * decl.c (xref_tag): Use NULL_TREE instead of 0.
2981 * lex.c (make_lang_type): Ditto.
2983 Wed Mar 30 14:10:04 1994 Jason Merrill (jason@deneb.cygnus.com)
2985 * decl.c (pushdecl): If pushing a C-linkage function, only do a
2986 push_overloaded_decl.
2987 (duplicate_decls): Standard overloading does not shadow built-ins.
2989 Tue Mar 29 00:54:18 1994 Jason Merrill (jason@deneb.cygnus.com)
2991 * pt.c (end_template_decl): Don't call push_overloaded_decl.
2993 * init.c (do_friend): Don't call push_overloaded_decl.
2995 * decl.c (pushdecl): Call push_overloaded_decl for functions and
2997 (duplicate_decls): functions and function templates are not
2998 duplicates, but don't complain about calling this function to
3000 (push_overloaded_decl): Don't deal with linkage. Call
3002 (redeclaration_error_message): Deal with linkage.
3004 * decl.c (start_function): If push_overloaded_decl returns an
3005 older version of the function, deal with it.
3007 * decl.c (start_function): Be sure only to push_overloaded_decl
3010 * decl.c (grokfndecl): Put back clearing of DECL_CHAIN for
3012 (start_function): Lose broken and redundant code for checking old
3015 * init.c (add_friend): Give line numbers of both friend decls
3016 when warning about re-friending.
3018 * pt.c (tsubst): Use comptypes rather than == to compare the
3019 types of the method as declared and as defined, since default
3020 parameters may be different.
3022 * call.c (build_method_call): Use brendan's candidate printing
3025 * decl.c (start_method): Methods defined in the class body are
3026 inline whether or not it's a template class.
3028 Mon Mar 28 16:39:26 1994 Jason Merrill (jason@deneb.cygnus.com)
3030 * parse.y (initdcl0): Add "extern" to current_declspecs if
3031 have_extern_spec && ! used_extern_spcec.
3033 * tree.c (really_overloaded_fn): A fn with more than one
3036 * pt.c (end_template_decl): Use really_overloaded_fn.
3038 * decl.c (duplicate_decls): When smashing a decl into a previous
3039 definition, keep the old file and line.
3040 Don't deal with overloaded functions.
3041 Lose old code for checking arg types of functions.
3042 Check for overloaded C functions.
3043 (pushdecl): Deal with overloaded functions.
3044 (start_decl): Expect pushdecl to return an appropriate function decl.
3045 (start_function): Ditto.
3046 (push_overloaded_decl): Don't check for overloaded C functions.
3048 * *.c: Stop using DECL_OVERLOADED, it being archaic.
3049 TREE_OVERLOADED should probably go, too.
3051 Mon Mar 28 14:00:45 1994 Ron Guilmette (rfg@netcom.com)
3053 * typeck.c (comp_target_types): Call comp_target_parms with
3056 Sun Mar 27 00:07:45 1994 Jason Merrill (jason@deneb.cygnus.com)
3058 * parse.y (empty_parms): Don't parse () as (...) in extern "C"
3059 sections if we're compiling with -ansi or -pedantic.
3061 * decl.c (decls_match): Don't treat (int) and (int&) as matching.
3063 * decl2.c (grokfield): Don't pedwarn twice about initializing
3066 * decl.c (push_overloaded_decl): Warn about shadowing
3068 (redeclaration_error_message): Don't allow 'int a; int a;'
3070 * cvt.c (build_up_reference): Only check for valid upcast if
3071 LOOKUP_PROTECT is set, not just any flag.
3073 Fri Mar 25 01:22:31 1994 Jason Merrill (jason@deneb.cygnus.com)
3075 * lex.c (check_newline): When we see a #pragma implementation,
3076 also set it for the main input file.
3078 * init.c (build_new): Convert array size argument to size_t.
3080 * parse.y (primary): If we're doing a parenthesized type-id, call
3081 groktypename before passing it to build_new.
3083 * call.c (build_method_call): Deal properly with const and
3084 volatile for instances of reference type.
3086 * decl.c (store_return_init): Change 'if (pedantic) error' to 'if
3087 (pedantic) pedwarn'.
3089 * decl.c (grokdeclarator): Don't complain about putting `static'
3090 and `inline' on template function decls.
3092 Thu Mar 24 23:18:19 1994 Jason Merrill (jason@deneb.cygnus.com)
3094 * call.c (build_method_call): Preserve const & volatile on
3097 Thu Mar 24 16:21:52 1994 Mike Stump (mrs@cygnus.com)
3099 * init.c (build_new, build_vec_delete): Use global new and delete
3101 * decl2.c (delete_sanity): Ditto.
3103 Thu Mar 24 02:10:46 1994 Jason Merrill (jason@deneb.cygnus.com)
3105 * cvt.c (convert_to_reference): If i is an lvalue,
3106 (int &)i -> *(int*)&i, as per 5.2.8p9 of the latest WP.
3107 (convert_force): Call convert_to_reference with LOOKUP_COMPLAIN.
3109 Wed Mar 23 17:45:37 1994 Jason Merrill (jason@deneb.cygnus.com)
3111 * decl.c (duplicate_decls): Also propagate DECL_TEMPLATE_MEMBERS
3112 and DECL_TEMPLATE_INSTANTIATIONS.
3114 * init.c (build_new): Handle array typedefs properly.
3116 Wed Mar 23 18:23:33 1994 Mike Stump (mrs@cygnus.com)
3118 30th Cygnus<->FSF merge.
3120 Wed Mar 23 00:46:24 1994 Mike Stump (mrs@cygnus.com)
3122 * class.c (modify_vtable_entries): Avoid running off the end of the
3123 virtuals list when processing a virtual destructor.
3124 * class.c (get_vtable_entry): Ditto.
3126 Wed Mar 23 00:23:59 1994 Jason Merrill (jason@deneb.cygnus.com)
3128 * decl.c (duplicate_decls): If two template decls don't match,
3131 Tue Mar 22 23:49:41 1994 Jason Merrill (jason@deneb.cygnus.com)
3133 * typeck.c (convert_for_assignment): Don't pedwarn about
3134 converting function pointer to void *.
3136 Tue Mar 22 22:23:19 1994 Mike Stump (mrs@cygnus.com)
3138 Major revamp of pointer to member functions. Cures major
3139 nonfunctionality when used in casts, and MI situations.
3141 * cvt.c (convert_force): Update call site of build_ptrmemfunc.
3142 * typeck.c (convert_for_assignment): Ditto.
3143 * typeck2.c (digest_init): Ditto.
3144 * typeck2.c (process_init_constructor): Simplify by moving code into
3146 * typeck2.c (digest_init): Do default_conversions on init value, if
3147 we are processing pointer to member functions.
3148 * class.c (get_vfield_offset): Now non-static. Convert bit offset
3150 * cp-tree.h (get_vfield_offset): Ditto.
3151 * typeck.c (get_member_function_from_ptrfunc): Convert down to right
3152 instance, before fetching vtable pointer.
3153 * typeck.c (get_delta_difference): New routine.
3154 * typeck.c (build_ptrmemfunc): Revamp to handle casting better, also
3155 get vtable pointer out of right subobject.
3157 Tue Mar 22 17:56:48 1994 Mike Stump (mrs@cygnus.com)
3159 * search.c (get_binfo): Return NULL instead of aborting, when
3160 passed a UNION_TYPE.
3162 Tue Mar 22 12:44:54 1994 Jason Merrill (jason@deneb.cygnus.com)
3164 These patches implement handling of redefinition/redeclaration of
3167 * typeck.c (comptypes): Simplify. All TEMPLATE_TYPE_PARMs are
3168 considered compatible.
3170 * parse.y (template_def): Pass defn argument to end_template_decl.
3172 * pt.c (end_template_decl): Add defn argument. Check for
3173 redefinition. Simplify.
3175 * error.c (OB_UNPUT): New macro, to remove mistakes.
3176 (aggr_variety): Subroutine of dump_aggr_type.
3178 * decl.c (decls_match): Support templates.
3179 (duplicate_decls): No longer static. Don't try to lay out template
3181 (pushdecl): Simplify.
3183 * cp-tree.h (DECL_TEMPLATE_MEMBERS): Use DECL_SIZE instead of
3186 Mon Mar 21 11:46:55 1994 Jason Merrill (jason@deneb.cygnus.com)
3188 * error.c (dump_decl): Support class template decls.
3189 (dump_type): Don't adorn template type parms.
3191 * decl.c (duplicate_decls): Save DECL_TEMPLATE_INFO from old decl
3192 if it was a definition.
3193 (redeclaration_error_message): Do the cp_error thang, and reject
3194 redefinition of templates.
3196 Mon Mar 21 19:36:06 1994 Per Bothner (bothner@kalessin.cygnus.com)
3198 * decl.c (grokdeclarator): Set TREE_PUBLIC for METHOD_TYPE
3199 in FIELD context, when appropriate. Also,
3200 CLASSTYPE_INTERFACE_ONLY is irrelevant to setting TREE_PUBLIC.
3201 Also, simplify check for bogus return specifiers.
3203 Mon Mar 21 11:46:55 1994 Jason Merrill (jason@deneb.cygnus.com)
3205 * parse.y (after_type_declarator1): Expand type_quals.
3206 (notype_declarator1): Ditto.
3209 Sat Mar 19 01:05:17 1994 Jason Merrill (jason@deneb.cygnus.com)
3211 * decl.c (grokdeclarator): Treat class-local typedefs like static
3212 members; i.e. 'typedef int f();' means that f is a function type,
3215 * parse.y (decl): Change direct_* back to *.
3216 (type_id): Change direct_abstract_declarator to absdcl.
3217 (direct_declarator, direct_initdecls, direct_initdcl0): Remove again.
3219 Fri Mar 18 12:47:59 1994 Jason Merrill (jason@deneb.cygnus.com)
3221 These two patches fix crashes on instantiating a template inside a
3222 function with C linkage or containing labels.
3224 * class.c (current_lang_stacksize): No longer static.
3226 * decl.c (struct saved_scope): Add lang_base, lang_stack,
3227 lang_name, lang_stacksize, and named_labels.
3228 (push_to_top_level): Save them.
3229 (pop_from_top_level): Restore them.
3231 * gxxint.texi (Parser): Update.
3233 These two patches finish moving the task of expr/declarator
3234 ambiguity resolution from the lexer to the parser, and add one more
3235 r/r conflict. START_DECLARATOR can now be nuked.
3237 * parse.y (decl): Add "direct_" in typespec X rules.
3238 (direct_declarator): New nonterminal for
3239 direct_after_type_declarator and direct_notype_declarator.
3240 (direct_initdecls): Like initdecls, but uses direct_initdcl0.
3241 (direct_initdcl0): Like initdcl0, but uses direct_declarator.
3242 (named_parm): Add typespec direct_declarator rule.
3244 * spew.c (yylex): #if 0 out START_DECLARATOR insertion.
3246 These two patches disable some excessive cleverness on the part of
3247 g++; a non-class declaration always hides a class declaration in the
3248 same scope, and g++ was trying to unhide it depending on the
3249 enclosing expression.
3251 * spew.c (arbitrate_lookup): #if 0 out.
3253 * decl.c (lookup_name): Never call arbitrate_lookup.
3255 * parse.y (complex_notype_declarator1): Add '*'
3256 complex_notype_declarator1 and '&' complex_notype_declarator1 rules.
3258 * parse.y (complex_direct_notype_declarator): Restore id_scope
3259 see_typename TYPENAME rule, remove all other rules beginning with
3261 (notype_unqualified_id): Add '~' see_typename IDENTIFIER rule.
3263 Thu Mar 17 17:30:01 1994 Jason Merrill (jason@deneb.cygnus.com)
3265 These changes fix the compiler's handling of the functional cast/
3266 object declaration ambiguities in section 6.8 of the ARM. They also
3267 add 11 reduce/reduce conflicts. Sigh.
3269 * parse.y: Add precedence decls for OPERATOR and '~'.
3270 (notype_unqualified_id): New nonterminal, encompasses all of the
3271 ANSI unqualified-id nonterminal except TYPENAMEs.
3272 (expr_or_declarator): New nonterminal to delay parsing of code like
3274 (primary): Use notype_unqualified_id.
3275 (decl): Add typespec initdecls ';' and typespec declarator ';'
3277 (initdcl0): Deal with the above.
3278 (complex_notype_declarator1): A notype_declarator that is not also
3279 an expr_or_declarator.
3280 (complex_direct_notype_declarator): A direct_notype_declarator that
3281 doesn't conflict with expr_or_declarator. Use
3282 notype_unqualified_id. Remove id_scope see_typename TYPENAME rule.
3283 (functional_cast): New nonterminal, for the three functional cast
3284 rules. So that they can be moved after
3285 complex_direct_notype_declarator.
3286 (see_typename): Don't accept type_quals any more.
3288 * decl2.c (reparse_decl_as_expr): New function to deal with parse
3289 nodes for code like `int (*a)++;'.
3290 (reparse_decl_as_expr1): Recursive subroutine of the above.
3291 (finish_decl_parsing): New function to deal with parse nodes for
3292 code like `int (*a);'. See the difference?
3294 Thu Mar 17 12:16:10 1994 Mike Stump (mrs@cygnus.com)
3296 These changes break binary compatibility in code with classes
3297 that use virtual bases.
3299 * search.c (dfs_get_vbase_types): Simplify and correct to make
3300 sure virtual bases are initialized in dfs ordering.
3301 * search.c (get_vbase_types): Simplify and make readable.
3303 Thu Mar 17 12:01:10 1994 Jason Merrill (jason@deneb.cygnus.com)
3305 * parse.y: s/ typename / type_id /g
3307 Wed Mar 16 17:42:52 1994 Kung Hsu (kung@mexican.cygnus.com)
3309 * parse.y (typespec): add SCOPE TYPENAME for global scoped
3312 * decl.c (complete_array_type): fix a bug that in -pendantic
3313 mode even there's no initializer, it will continue to build
3316 Wed Mar 16 17:43:07 1994 Jason Merrill (jason@deneb.cygnus.com)
3318 * parse.y (direct_notype_declarator): Add PTYPENAME rule, remove
3319 all of the scoped PTYPENAME rules.
3321 Wed Mar 16 16:39:02 1994 Mike Stump (mrs@cygnus.com)
3323 * init.c (build_offset_ref): The value of A::typedef_name is
3324 always the TYPE_DECL, and never an error.
3326 Tue Mar 15 20:02:35 1994 Jason Merrill (jason@deneb.cygnus.com)
3328 * search.c (get_base_distance_recursive): Two binfos can only
3329 represent the same object if they are both via_virtual.
3331 * class.c (finish_base_struct): Check vbases for ambiguity, too.
3333 * search.c (get_vbase_types): Accept binfo argument, too.
3335 Tue Mar 15 19:22:05 1994 Kung Hsu (kung@mexican.cygnus.com)
3337 * decl.c (complete_array_type): complete TYPE_DOMAIN of the
3338 initializer also, because back-end requires it.
3340 Tue Mar 15 15:33:31 1994 Jason Merrill (jason@deneb.cygnus.com)
3342 * error.c (dump_expr): Support member functions (which show up as
3345 Mon Mar 14 16:24:36 1994 Mike Stump (mrs@cygnus.com)
3347 * init.c (build_new): Set the return type of multidimensional
3350 Fri Mar 11 15:35:39 1994 Kung Hsu (kung@mexican.cygnus.com)
3352 * call.c (build_method_call): if basetype not equal to type
3353 of the instance, use the type of the instance in building
3356 Thu Mar 10 17:07:10 1994 Kung Hsu (kung@mexican.cygnus.com)
3358 * parse.y (direct_notype_declarator): add push_nested_type for
3359 'template_type SCOPED_NAME' rule.
3361 Tue Mar 8 00:19:58 1994 Jason Merrill (jason@deneb.cygnus.com)
3363 * parse.y (parm): Add typed_declspec1 {absdcl, epsilon} rules.
3365 Sat Mar 5 04:47:48 1994 Jason Merrill (jason@deneb.cygnus.com)
3367 * parse.y (regcast_or_absdcl): New nonterminal to implement late
3368 reduction of constructs like `int ((int)(int)(int))'.
3369 (cast_expr): Use it.
3370 (sub_cast_expr): Everything that can come after a cast.
3371 (typed_declspecs1): typed_declspecs that are not typed_typespecs.
3372 (direct_after_type_declarator): Lose PAREN_STAR_PAREN rule.
3373 (direct_abstract_declarator): Replace '(' parmlist ')' rule with
3374 '(' complex_parmlist ')' and regcast_or_absdcl.
3376 (complex_parmlist): Parmlists that are not also typenames.
3377 (parms_comma): Enabler.
3378 (named_parm): A parm that is not also a typename. Use declarator
3379 rather than dont_see_typename abs_or_notype_decl. Expand
3380 typed_declspecs inline.
3381 (abs_or_notype_decl): Lose.
3382 (dont_see_typename): Comment out.
3383 (bad_parm): Break out abs_or_notype_decl into two rules.
3385 Fri Mar 4 18:22:39 1994 Jason Merrill (jason@deneb.cygnus.com)
3387 * decl2.c (reparse_decl_as_casts): New function to change parse
3388 nodes for `(int)(int)(int)' from "function taking int and returning
3389 function taking int and returning function taking int" to "... cast
3390 to int, cast to int, cast to int".
3392 * decl2.c (reparse_decl_as_expr): Recursive function to change
3393 parse nodes for `A()()' from "function returning function returning
3394 A" to "A().operator()".
3396 * parse.y (primary): Replace `typespec LEFT_RIGHT' rule with
3397 `typespec fcast_or_absdcl' rule.
3398 (fcast_or_absdcl): New nonterminal to implement late reduction of
3399 constructs like `A()()()()'.
3400 (typename): Replace `typespec absdcl1' rule with
3401 `typespec direct_abstract_declarator' rule.
3402 (direct_abstract_declarator): Replace `LEFT_RIGHT type_quals' rule
3403 with `fcast_or_absdcl type_quals' rule.
3405 Fri Mar 4 16:18:03 1994 Mike Stump (mrs@cygnus.com)
3407 * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it
3408 matches Section 5.5.
3410 Fri Mar 4 14:01:59 1994 Jason Merrill (jason@deneb.cygnus.com)
3412 * error.c (dump_type_prefix): Don't print basetype twice for
3415 Fri Mar 4 13:24:33 1994 Mike Stump (mrs@cygnus.com)
3417 * typeck.c (convert_arguments): Handle setHandler(A::handlerFn)
3418 so that it is like setHandler(&A::handlerFn). Cures an `invalid
3419 lvalue in unary `&''.
3421 Fri Mar 4 11:15:59 1994 Jason Merrill (jason@deneb.cygnus.com)
3423 * gxxint.texi (Copying Objects): New section discussing default
3424 op= problems with virtual inheritance.
3426 * decl2.c (grokoptypename): Just does grokdeclarator and
3427 build_typename_overload, since the parser can't call grokdeclarator
3430 * method.c (build_typename_overload): Set IDENTIFIER_GLOBAL_VALUE
3431 and TREE_TYPE on generated identifiers.
3433 * decl.c (grokdeclarator): Don't deal with TYPE_EXPRs anymore.
3435 * parse.y (parm): Convert `const char *' to `__opPCc' here.
3437 * error.c (dump_decl): Say sorry rather than my_friendly_aborting
3438 if we can't figure out what to do.
3439 (dump_type*): Ditto.
3441 * typeck2.c (build_m_component_ref): 'component' is an expr, not
3442 a decl. Also move the IS_AGGR_TYPE check after the stripping of
3445 Fri Mar 4 04:46:05 1994 Mike Stump (mrs@cygnus.com)
3447 * call.c (build_method_call): Handle b->setHandler(A::handlerFn)
3448 so that it is like b->setHandler(&A::handlerFn). Cures an `invalid
3449 lvalue in unary `&''.
3451 Thu Mar 3 12:38:15 1994 Jason Merrill (jason@deneb.cygnus.com)
3453 * parse.y: Add precedence specification for START_DECLARATOR.
3454 (type_quals): Move before primary.
3455 (typename): Move before typed_declspecs, add 'typespec absdcl1' rule.
3457 * decl2.c (grokoptypename): Lose.
3459 * decl.c (grokdeclarator): Parse TYPE_EXPRs in the initial scan,
3460 rather than waiting until later.
3462 Wed Mar 2 14:12:23 1994 Jason Merrill (jason@deneb.cygnus.com)
3464 * parse.y (unary_expr): Use 'typename' in 'new' rules, rather
3465 than expanding it inline.
3466 (typename): Expand empty option of (former) absdcl inline.
3467 (abs_or_notype_decl): Ditto.
3468 (absdcl): Lose empty rule.
3469 (conversion_declarator): New nonterminal for 'typename' of 'operator
3471 (operator_name): Use it instead of absdcl.
3473 * parse.y: Add precedence declarations for SCOPED_TYPENAME,
3475 (typed_declspecs): Accept typed_typespecs, rather than typespec
3476 directly. Add rules with reserved_typespecquals.
3477 (reserved_declspecs): Don't accept typespecqual_reserved at the
3478 beginning of the list. The typed_declspecs rule will deal with this
3480 (declmods): Accept nonempty_type_quals, rather than TYPE_QUAL
3483 * parse.y (direct_notype_declarator,
3484 direct_after_type_declarator, direct_abstract_declarator): Split up
3485 the declarator1 nonterminals to match the draft standard and avoid
3487 (new_type_id, new_declarator, direct_new_declarator,
3488 new_member_declarator): New nonterminals to implement the subset of
3489 'typename' allowed in new expressions.
3490 (unary_expr): Use new_type_id instead of typename.
3491 (after_type_declarator1, absdcl1): Fix semantics of member pointers.
3492 (abs_member_declarator, after_type_member_declarator): Lose.
3494 * parse.y (absdcl1): Don't require parens around
3495 abs_member_declarator.
3496 (abs_member_declarator): Lose see_typename from rules.
3497 (after_type_member_declarator): Ditto.
3499 * tree.c (get_identifier_list): New function, containing code
3500 previously duplicated in get_decl_list and list_hash_lookup_or_cons.
3501 (get_decl_list): Use it.
3502 (list_hash_lookup_or_cons): Ditto.
3504 * parse.y (typed_declspecs, declmods): It's not necessary to hash
3505 the declspecs on class_obstack, so don't. This way typed_typespecs
3506 can reduce to typed_declspecs.
3508 Wed Mar 2 14:29:18 1994 Jason Merrill (jason@cygnus.com)
3510 * cvt.c (build_up_reference): If we aren't checking visibility,
3511 also allow base->derived conversions.
3513 Mon Feb 28 15:14:29 1994 Per Bothner (bothner@kalessin.cygnus.com)
3515 * typeck.c (build_c_cast): Remove bogus hack when converting
3516 to a reference type.
3518 * cp-tree.h (lang_decl::vbase_init_list, DECL_VBASE_INIT_LIST):
3520 (lang_stype::methods, lang_decl::next_method): New fields.
3521 (CLASSTYPE_METHODS, DECL_NEXT_METHOD): New macros.
3522 * decl.c (duplicate_decls): Preserve DECL_NEXT_METHOD.
3524 * cp-tree.h, decl2.c (flag_vtable_hack): New flag.
3525 * decl2.c (finish_vtable_vardecl): If flag_vtable_hack,
3526 and !CLASSTYPE_INTERFACE_KNOWN, try to use the presence of
3527 a non-inline virtual function to control emitting of vtables.
3528 * class.c (finish_struct): Build CLASSTYPE_METHODS list.
3529 * search.c (build_vbase_vtables_init): Don't assemble_external
3530 (yet) if flag_vtable_hack.
3531 * class.c (build_vfn_ref): Ditto.
3533 Mon Feb 28 14:54:13 1994 Jason Merrill (jason@deneb.cygnus.com)
3535 * parse.y (component_decl): Don't include "typed_declspecs
3536 declarator ';'" speedup, since it breaks enums.
3538 Fri Feb 25 15:43:44 1994 Per Bothner (bothner@kalessin.cygnus.com)
3540 * class.c (finish_struct): Minor optimization for building
3543 Fri Feb 25 15:23:42 1994 Jason Merrill (jason@deneb.cygnus.com)
3545 * decl.c (start_function): Fix detection of function overloading.
3547 Thu Feb 24 22:26:19 1994 Mike Stump (mrs@cygnus.com)
3549 * lex.c (check_newline): #pragma interface can take a string
3550 argument, just like #pragma implementation. #pragma implementation
3551 checks for garbage on the line, line #pragma interface does. Main
3552 input files do not auto implement like named files, #pragma
3553 implementation must be used explicitly.
3555 Thu Feb 24 17:09:01 1994 Jason Merrill (jason@deneb.cygnus.com)
3557 * parse.y (components): Handle list of one again.
3558 (notype_components): Ditto.
3559 (after_type_declarator1): Take maybe_raises out again.
3561 * gxxint.texi (Parser): Document additional r/r conflict.
3563 Wed Feb 23 14:42:55 1994 Jason Merrill (jason@deneb.cygnus.com)
3565 * gxxint.texi (Parser): Add node.
3567 * Makefile.in (stamp-parse): Update expected conflict count.
3569 * parse.y (various): Replace "declmods declarator" with "declmods
3570 notype_declarator". The comment saying that "declmods declarator ';'"
3571 corresponds to "int i;" was wrong; it corresponds to "const i;".
3572 (component_decl): Add "typed_declspecs declarator ';'" rule; this
3573 *does* correspond to "int i;". Change "declmods components" to
3574 "declmods notype_components".
3575 (components): Don't deal with a list of one anymore.
3576 (notype_components): New nonterminal, corresponds to notype_declarator.
3577 ({after_,no}type_component_decl{,0}): More new nonterminals.
3578 ({after_,no}type_declarator): Fold in START_DECLARATOR token.
3579 Eliminates four reduce/reduce conflicts.
3581 (expr): Depend on nontrivial_exprlist instead of nonnull_exprlist.
3582 (nontrivial_exprlist): New nonterminal: A list of at least two
3584 (nonnull_exprlist): Depend on nontrival_exprlist.
3585 Eliminates four reduce/reduce conflicts.
3587 (named_class_head): Move intermediate code block into separate
3588 nonterminal so that we can stick %prec EMPTY on it.
3590 Add more %prec EMPTY's to eliminate remaining shift/reduce
3593 (after_type_declarator): Add maybe_raises to fndecl rules.
3594 (after_type_declarator_no_typename): Remove.
3597 Document remaining reduce/reduce conflicts.
3599 Tue Feb 22 12:10:32 1994 Jason Merrill (jason@deneb.cygnus.com)
3601 * search.c (get_base_distance): Only bash BINFO_INHERITANCE_CHAIN
3602 (TYPE_BINFO (type)) if we care about the path.
3604 * tree.c (lvalue_p): A COND_EXPR is an lvalue if both of the
3607 Mon Feb 21 19:59:40 1994 Mike Stump (mrs@cygnus.com)
3609 * Makefile.in (mostlyclean): lex.c is a source file, don't
3612 Sat Feb 19 01:27:14 1994 Jason Merrill (jason@deneb.cygnus.com)
3614 * parse.y: Eliminate 20 shift/reduce conflicts.
3616 Fri Feb 18 11:49:42 1994 Jason Merrill (jason@deneb.cygnus.com)
3618 * pt.c (type_unification): Add subr argument; if set, it means
3619 that we are calling ourselves recursively, so a partial match is OK.
3620 (unify): Support pointers to methods and functions.
3621 (tsubst): Support method pointers.
3622 * decl.c (build_ptrmemfunc_type): No longer static, so that
3623 tsubst can get at it.
3625 * init.c (is_aggr_typedef): Pretend template type parms are
3627 * decl2.c (build_push_scope): If cname refers to a template type
3628 parm, just grin and nod.
3630 * call.c (build_overload_call_real): Pass subr argument to
3632 * pt.c (do_function_instantiation): Ditto.
3633 * class.c (instantiate_type): Ditto.
3635 * search.c (get_base_distance): If BINFO is a binfo, use it and
3636 don't mess with its BINFO_INHERITANCE_CHAIN.
3638 * cvt.c (convert_to_reference): Fix temporary generation.
3639 If ambiguous, return error_mark_node.
3641 * init.c (build_new): Put back some necessary code.
3643 Thu Feb 17 15:39:47 1994 Jason Merrill (jason@deneb.cygnus.com)
3645 * init.c (build_new): Deal with array types properly.
3647 * search.c (get_binfo): Become a shell for get_base_distance.
3648 (get_binfo_recursive): Lose.
3649 (get_base_distance_recursive): Find the path to the via_virtual base
3650 that provides the most access.
3651 (get_base_distance): Ditto.
3653 * parse.y (explicit_instantiation): Syntax is 'template class
3654 A<int>', not 'template A<int>'.
3656 * typeck.c (convert_for_initialization): Remove bogus warning.
3658 * parse.y (datadef): Revert patch of Oct 27.
3660 Thu Feb 17 15:12:29 1994 Per Bothner (bothner@kalessin.cygnus.com)
3662 * class.c (build_vfn_ref): Cast delta field to ptrdiff_type_node,
3663 rather than integer_type_node. Does wonders for the Alpha.
3665 Thu Feb 17 13:36:21 1994 Jason Merrill (jason@deneb.cygnus.com)
3667 * decl.c (build_ptrmemfunc_type): Make sure that the pmf type
3668 goes onto the same obstack as its target type.
3670 Wed Feb 16 00:34:46 1994 Jason Merrill (jason@deneb.cygnus.com)
3672 * cvt.c (convert_to_reference): If converting via constructor
3673 on local level, go back to build_cplus_new approach.
3675 * tree.c (build_cplus_new): If with_cleanup_p, set cleanup slot
3676 to error_mark_node to prevent expand_expr from building a cleanup
3679 * lex.c (default_assign_ref_body): Return *this from the memcpy
3682 * decl.c (grok_reference_init): Just return if called with
3683 error_mark_node, don't worry about initializing non-const reference
3686 * cvt.c (convert_to_reference): Do the right thing for
3687 non-aggregate reference conversions, pedwarn when generating a
3688 non-const reference to a temporary.
3690 * class.c (finish_struct): TYPE_HAS_COMPLEX_{INIT,ASSIGN}_REF and
3691 TYPE_NEEDS_CONSTRUCTING all depend on TYPE_USES_VIRTUAL_BASECLASSES
3694 Tue Feb 15 19:47:19 1994 Jason Merrill (jason@deneb.cygnus.com)
3696 * decl.c (grok_reference_init): Pawn off a lot of the work on
3697 convert_to_reference. Generally do the right thing.
3699 * cvt.c (convert_to_reference): Conform to the initial comment;
3700 i.e. don't create temps if decl != error_mark_node. Handle
3701 cleanups better for temps that do get created. Don't pretend
3702 that we can use an 'A' to initialize a 'const double &' just by
3703 tacking on a NOP_EXPR. Support LOOKUP_SPECULATIVELY.
3705 * call.c (build_method_call): Set TREE_HAS_CONSTRUCTOR on
3708 Mon Feb 14 14:50:17 1994 Jason Merrill (jason@deneb.cygnus.com)
3710 * decl.c (grok_reference_init): Make a temporary for initializing
3711 const reference from constant expression.
3713 Mon Feb 14 11:31:31 1994 Per Bothner (bothner@kalessin.cygnus.com)
3715 * cp-tree.h, decl.c (set_identifier_local_value): Deleted function.
3716 * decl.c (pushdecl): Define decl in correct binding_level
3717 (which isn't always the inner_binding_level).
3719 * cvt.c (build_up_reference): Don't ever call expand_aggr_init.
3720 It's ugly, and I don't think it's the right thing to do.
3722 * cp-tree.h, class.c, decl.c, decl2.c, sp/search.c:
3723 Remove NEW_CLASS_SCOPING, assuming it is always 1.
3724 * decl.c (pop_decl_level): Removed; manually inlined.
3726 Sun Feb 13 19:04:56 1994 Jason Merrill (jason@deneb.cygnus.com)
3728 * class.h (candidate): Add basetypes field.
3730 * call.c (build_method_call): Do access checking after choosing a
3731 function, not before.
3733 * Makefile.in (cvt.o, call.o, method.o): Depend on class.h.
3734 (mostlyclean): Remove ../cc1plus.
3736 Fri Feb 11 11:52:26 1994 Jason Merrill (jason@deneb.cygnus.com)
3738 * class.c (finish_struct): Don't allow adjusting access to a field
3739 of a base class if a local field has the same name.
3741 * error.c (dump_type_prefix): Output basetype for METHOD_TYPEs.
3743 hu Jan 13 17:55:51 EST 1994 Gnanasekaran Swaminathan (gs4t@virginia.edu)
3745 * cp-tree.h (DESTRUCTOR_NAME_P): do not confuse AUTO_TEMP names
3746 with destructor names when either NO_DOLLAR_IN_LABEL or
3747 NO_DOT_IN_LABEL are not defined.
3749 Now `template <class T, T f(T&), const T*> class A {...}' works.
3751 * pt.c (grok_template_type): substitute template parm types
3752 with actual types in complex type as well.
3753 (coerce_template_parms): update the grok_template_type ()
3756 * pt.c (tsubst): Traverse method list using DECL_CHAIN.
3758 * decl.c (grok_op_properties): Allow operator++/-- to have
3761 * typeck2.c (store_init_value): Don't abort when called to
3762 initialize a type that needs constructing with a CONSTRUCTOR.
3764 * init.c (expand_aggr_init_1, CONSTRUCTOR case): If
3765 store_init_value fails, build and expand an INIT_EXPR. If
3766 store_init_value succeeds, call expand_decl_init.
3768 Fri Feb 11 02:49:23 1994 Mike Stump (mrs@cygnus.com)
3770 * class.c (build_vbase_path): Use complete_type_p instead of
3771 resolves_to_fixed_type_p to determine if the virtual bases are in
3772 their right place for the type of expr. Cures problem of thinking a
3773 virtual base class is one place, when it is in fact someplace else.
3775 Fri Feb 11 00:26:46 1994 Mike Stump (mrs@cygnus.com)
3777 * init.c (resolve_offset_ref): Make sure we first convert to
3778 intermediate type, if given, when dealing with members off `this'.
3779 Solves an incorrrect `type `foo' is not a base type for type
3780 `multiple'' when it is infact, a base type.
3782 Thu Feb 10 21:49:35 1994 Mike Stump (mrs@cygnus.com)
3784 * class.c (modify_other_vtable_entries): Use get_binfo, instead
3785 of binfo_value. Solves problem with compiler giving a `base class
3786 `B' ambiguous in binfo_value (compiler error)' on complex MI
3787 herarchies, when a virtual function is first defied in a virtual
3790 Thu Feb 10 17:19:32 1994 Mike Stump (mrs@cygnus.com)
3792 * class.c (build_vbase_path): Don't complain about ambiguous
3793 intermediate conversion when converting down to a virtual base
3794 class, even if they might seem to be ambiguous.
3796 Thu Feb 10 12:18:26 1994 Jason Merrill (jason@deneb.cygnus.com)
3798 * typeck2.c (build_functional_cast): #if 0 out constructor
3799 inheritance code, improve error messages.
3801 * class.c (finish_base_struct): Complain about base with only
3802 non-default constructors in derived class with no constructors.
3804 * decl.c (grokdeclarator): Fix detection of virtual new/delete.
3806 Wed Feb 9 22:02:32 1994 Mike Stump (mrs@cygnus.com)
3808 * search.c (build_mi_virtuals, add_mi_virtuals,
3809 report_ambiguous_mi_virtuals): Removed unneeded code.
3810 * class.c (finish_struct_bits): Ditto.
3812 Wed Feb 9 11:27:17 1994 Jason Merrill (jason@deneb.cygnus.com)
3814 * pt.c (end_template_instantiation): Push decl before
3817 * typeck2.c (build_m_component_ref): Make sure datum is of
3820 * init.c (get_type_value): New function, returns
3821 IDENTIFIER_TYPE_VALUE or IDENTIFIER_CLASS_TYPE_VALUE or NULL_TREE.
3823 * call.c (build_method_call): Don't die on call to destructor for
3826 * decl.c (grokdeclarator): Complain about virtual op new and op
3827 delete, make static virtuals unvirtual instead of unstatic.
3829 * typeck.c (build_c_cast): Also call default_conversion on
3832 * decl.c (grokdeclarator): Don't complain about anonymous
3835 * parse.y (simple_stmt, for loops): Move the continue point after
3838 * class.c (finish_struct): Fix setting of
3839 TYPE_HAS_COMPLEX_INIT_REF.
3841 Tue Feb 8 13:21:40 1994 Jason Merrill (jason@deneb.cygnus.com)
3843 * init.c (build_new): Deal with `new double (1)'.
3845 * class.c (finish_struct): TYPE_HAS_COMPLEX_*_REF are supersets of
3846 TYPE_HAS_REAL_*_REF, but TYPE_HAS_COMPLEX_INIT_REF is independent of
3847 TYPE_NEEDS_CONSTRUCTING.
3849 * decl.c (duplicate_decls): Propagate access decls.
3851 * typeck2.c (process_init_constructor): Accept empty_init_node
3852 for initializing unions.
3854 * class.c, lex.c, cp-tree.h: Use
3855 TYPE_HAS_COMPLEX_ASSIGN_REF where TYPE_HAS_REAL_ASSIGN_REF was used
3856 before, use TYPE_HAS_COMPLEX_INIT_REF for TYPE_NEEDS_CONSTRUCTING in
3859 * decl.c (finish_decl): Don't complain about uninitialized const
3860 if it was initialized before.
3862 Mon Feb 7 18:12:34 1994 Jason Merrill (jason@deneb.cygnus.com)
3864 * lex.c (default_assign_ref_body): Don't deal with vbases for
3867 * decl.c (finish_decl): Fix reversed logic for objects and other
3868 things that need to be constructed but have no initializer.
3870 * class.c (finish_struct): Don't set TYPE_HAS_* flags that are
3871 set by grok_op_properties or finish_decl.
3873 * decl.c: Don't warn about extern redeclared inline unless
3874 -Wextern-inline is given.
3875 * decl2.c (lang_decode_option): Ditto.
3878 Mon Feb 7 17:29:24 1994 Per Bothner (bothner@kalessin.cygnus.com)
3880 * decl.c (pushdecl_with_scope): Fix thinko. Add forward
3883 * decl.c (pushdecl_with_scope): New function.
3884 * decl.c (pushdecl_top_level): Use new function.
3885 * decl.c (pushtag): Initialize newdecl.
3886 * decl.c (pushtag): Push new type decl into correct scope.
3888 Mon Feb 7 14:42:03 1994 Jason Merrill (jason@deneb.cygnus.com)
3890 * call.c, cvt.c, init.c, search.c, cp-tree.h:
3891 Eradicate LOOKUP_PROTECTED_OK.
3893 Mon Feb 7 13:57:19 1994 Per Bothner (bothner@kalessin.cygnus.com)
3895 * decl.c (pushtag, xref_tag), cp-tree.h: Add extra parameter
3896 'globalize' to signify implicit declarations.
3897 * decl.c (globalize_nested_type, maybe_globalize_type): Removed.
3898 * decl.c (set_identifier_type_value_with_scope): New function.
3899 * decl.c (set_identifier_local_value): Simplify.
3900 * spew.c (yylex, do_addr): Modify to return a _DEFN if a
3901 forward declaration (followed by ';' and not preceded by 'friend').
3902 * class.c, decl.c, except.c, init.c, parse.y,
3903 pt.c, search.c: Add new argument to calls to xref_tag and
3906 Mon Feb 7 00:22:59 1994 Jason Merrill (jason@deneb.cygnus.com)
3908 * cp-tree.h (ACCESSIBLY_UNIQUELY_DERIVED_P): New macro, means what
3909 ACCESSIBLY_DERIVED_FROM_P meant before.
3910 (ACCESSIBLY_DERIVED_FROM_P): Now disregards ambiguity.
3912 * cvt.c (build_up_reference): Call get_binfo with PROTECT == 1.
3914 * search.c (get_base_distance_recursive): Members and friends of
3915 a class X can implicitly convert an X* to a pointer to a private or
3916 protected immediate base class of X.
3917 (get_binfo_recursive): Ditto.
3918 (get_base_distance): Ignore ambiguity if PROTECT < 0.
3919 (get_binfo): Lose multiple values of PROTECT.
3920 (compute_access): Protected is OK if the start of the
3921 search is an accessible base class of current_class_type.
3923 * method.c (build_opfncall): Do check access on operator new here.
3925 * decl.c (finish_function): Don't check access on operator new
3928 Sun Feb 6 14:06:58 1994 Jason Merrill (jason@deneb.cygnus.com)
3930 * decl.c (xref_tag): The base of a derived struct is NOT always
3933 * pt.c (do_explicit_instantiation): New function, called from
3934 parser to do explicit function instantiation.
3935 (type_unification): Allow the args list to be terminated with
3937 (do_pending_expansions): Look at i->interface for non-member
3940 * parse.y (datadef): Move explicit_instantiation here.
3941 (structsp): From here.
3942 (datadef): Complain about `int;'.
3944 Sun Feb 6 12:33:18 1994 Per Bothner (bothner@kalessin.cygnus.com)
3946 * pt.c (end_template_instantiation), cp-tree.h: Remove unused
3947 second parameter, and simplify first from a TREE_LIST where
3948 we only care about its TREE_VALUE to just the value (an IDENTIFIER).
3949 * pt.c (instantiate_member_templates): Simplify argument list
3950 from a TREE_LIST to just an IDENTIFIER.
3951 * lex.c (yyprint): PRE_PARSED_CLASS_DECL is now just an IDENTIFIER.
3952 * parse.y (template_instantiate_once): Simplify accordingly.
3953 * decl.c (inner_binding_level): New. Use various places to
3956 Sun Feb 6 02:49:37 1994 Jason Merrill (jason@deneb.cygnus.com)
3958 * typeck2.c (build_functional_cast): int() -> int(0).
3960 Sat Feb 5 00:53:21 1994 Jason Merrill (jason@deneb.cygnus.com)
3962 * class.c (finish_struct): Don't do a bitwise copy for op= if the
3963 class has a virtual function table.
3965 * typeck.c (convert_for_initialization): Restore warnings about
3966 not using defined op=. Should really be my_friendly_aborts, I
3969 Fri Feb 4 14:21:00 1994 Jason Merrill (jason@deneb.cygnus.com)
3971 * class.c (finish_struct): Tidy up conditions for doing bitwise
3974 * decl.c (build_default_constructor): #if 0 out.
3976 * *: Eradicate TYPE_GETS_{ASSIGNMENT,ASSIGN_REF,CONST_ASSIGN_REF,
3977 CONST_INIT_REF}, TYPE_HAS_REAL_CONSTRUCTOR.
3979 * decl.c (grokdeclarator): Don't return void_type_node for
3980 friends being defined here.
3982 * init.c (perform_member_init): Only do the init if it's useful.
3984 * lex.c (default_copy_constructor_body): If we don't need to do
3985 memberwise init, just call __builtin_memcpy.
3986 (default_assign_ref_body): Ditto.
3988 * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0.
3990 Fri Feb 4 13:02:56 1994 Mike Stump (mrs@cygnus.com)
3992 * lex.c (reinit_parse_for_method, cons_up_default_function):
3993 Don't give warn_if_unknown_interface warning when it came from a
3995 * pt.c (end_template_decl, instantiate_template): Ditto.
3996 * decl.c (start_decl): Ditto.
3998 Fri Feb 4 00:41:21 1994 Jason Merrill (jason@deneb.cygnus.com)
4000 * decl.c (grokdeclarator): Don't try to set TYPE_WAS_ANONYMOUS on
4003 * decl2.c (constructor_name_full): Use IS_AGGR_TYPE_CODE instead of
4004 IS_AGGR_TYPE, since we don't know it's a type.
4006 Thu Feb 3 11:36:46 1994 Jason Merrill (jason@deneb.cygnus.com)
4008 * decl.c (grokdeclarator): Don't complain about anonymous unions.
4010 * cp-tree.h (TYPE_WAS_ANONYMOUS): This struct was originally
4011 anonymous, but had a name given to it by a typedef.
4013 * decl.c (grokdeclarator): When renaming an anonymous struct, set
4016 * decl2.c (constructor_name_full): Use TYPE_WAS_ANONYMOUS.
4018 * cp-tree.h (DECL_UNDEFINED_FRIENDS): #if 0 out.
4020 * init.c (xref_friend): Don't set up DECL_UNDEFINED_FRIENDS.
4021 (embrace_waiting_friends): Don't use DECL_UNDEFINED_FRIENDS.
4023 * decl.c (grokdeclarator): Set TYPE_NESTED_NAME properly on nested
4024 anonymous structs that get typedef'd.
4026 * decl.c (grokdeclarator): Always return void_type_node for
4029 * error.c (dump_function_decl): Don't use DECL_CLASS_CONTEXT for
4031 (dump_function_decl): Don't print out default args for
4032 a function used in an expression.
4034 * decl.c (grokdeclarator): Give error on abstract declarator used
4035 in an invalid context (i.e. `void (*)();').
4037 * error.c (cp_line_of): Support _TYPE nodes.
4038 (cp_file_of): Ditto.
4040 * cvt.c (build_up_reference): Don't abort if passed a SAVE_EXPR;
4041 it can happen for the RHS of an assignment stmt where the LHS is
4044 * init.c (expand_aggr_init_1): Deal with bracketed initializer
4047 * class.c (finish_struct): Deal with enumerators and typedefs
4050 Wed Feb 2 11:30:22 1994 Jason Merrill (jason@deneb.cygnus.com)
4052 * class.c (finish_struct): Tidy up loop over fields.
4054 * errfn.c (cp_thing): Don't advance twice after a format.
4056 * class.c (finish_struct): Complain about needing a constructor
4057 if a member has only non-default constructors, and don't try to
4058 generate a default constructor.
4060 * decl.c (finish_decl): Also do the constructor thing if
4061 TYPE_NEEDS_CONSTRUCTING is set (for arrays).
4063 * search.c (unuse_fields): New function: mark all fields in this
4065 (dfs_unuse_fields): Helper function.
4067 * class.c (pushclass): If the new class is the same as the old
4068 class, still unuse the fields.
4069 (unuse_fields): Move to search.c.
4071 * decl.c (grok_op_properties): Add friendp argument.
4072 (grokfndecl): Pass it.
4073 (start_method): Ditto.
4075 * decl2.c (delete_sanity): Add use_global_delete parameter to catch
4078 * parse.y (unary_expr): Pass new parameter to delete_sanity.
4080 * lex.c (default_copy_constructor_body): Don't choke if the union
4082 (default_assign_ref_body): Ditto.
4084 * call.c (compute_conversion_costs_ansi): Do the right thing for
4087 * decl.c (push_to_top_level): Optimize.
4089 * decl.c (start_function): Look for the lexical scope of a friend
4090 in DECL_CLASS_CONTEXT.
4092 * init.c (do_friend): Set DECL_CLASS_CONTEXT on global friends.
4094 Tue Feb 1 15:59:24 1994 Jason Merrill (jason@deneb.cygnus.com)
4096 * cp-tree.h (TREE_GETS_PLACED_NEW): New macro.
4098 * init.c (init_init_processing): Don't assign BIN/BID to the
4099 IDENTIFIER_GLOBAL_VALUEs of their respective operators.
4100 (build_new): Check TREE_GETS_PLACED_NEW.
4102 * decl.c (grok_op_properties): Don't set TREE_GETS_NEW for a decl of
4103 op new with placement, set TREE_GETS_PLACED_NEW.
4105 * cp-tree.h (ANON_UNION_P): New macro. Applies to decls.
4107 * class.c (finish_struct): Don't treat anonymous unions like
4108 other aggregate members. Do synthesize methods for unions without
4109 a name, since they may or may not be "anonymous unions".
4111 * decl2.c (grok_x_components): Wipe out memory of synthesized methods
4112 in anonymous unions.
4114 * lex.c (default_copy_constructor_body): Support unions.
4115 (default_assign_ref_body): Ditto.
4117 Mon Jan 31 12:07:30 1994 Jason Merrill (jason@deneb.cygnus.com)
4119 * cp-tree.h: Fix documentation of LOOKUP_GLOBAL, add prototypes.
4121 * error.c (args_as_string): New function (%A), like type_as_string
4122 except NULL_TREE -> "..."
4124 * call.c (build_overload_call_real): Fix for new overloading.
4126 * decl.c (grok_op_properties): Set all of the TYPE_OVERLOADS_* flags
4129 * parse.y (operator_name): Instead of here.
4131 * typeck2.c (build_functional_cast): Treat a TREE_LIST as a list
4134 * call.c (build_overload_call_real): Support LOOKUP_SPECULATIVELY.
4136 * method.c (build_opfncall): Don't need to massage return value
4137 any more, call build_overload_call with all flags.
4139 * typeck.c (build_x_binary_op): Put back speculative call to
4141 (build_x_unary_op): Ditto.
4142 (build_x_conditional_expr): Ditto.
4144 Mon Jan 31 10:00:30 1994 Mike Stump (mrs@cygnus.com)
4146 * cvt.c (build_type_conversion_1): Change call to pedwarn into
4147 warning, and conditionalize upon warn_cast_qual.
4149 Fri Jan 28 11:48:15 1994 Jason Merrill (jason@deneb.cygnus.com)
4151 * search.c (lookup_field): If xbasetype is a binfo, copy it to
4152 avoid clobbering its inheritance info.
4154 * call.c (build_method_call): Don't overwrite basetype_path with
4155 TYPE_BINFO (inst_ptr_basetype) if they have the same type.
4157 * search.c (compute_access): Fix handling of protected inheritance
4158 and friendship with the enclosing class.
4160 * typeck2.c (store_init_value): Allow passing of TREE_CHAIN for
4161 initialization of arbitrary variable.
4163 * typeck2.c (build_functional_cast): Only try calling a method if
4166 * decl.c (grokdeclarator): Move handling of constructor syntax
4167 initialization into first loop for generality.
4168 (parmlist_is_random): Lose.
4170 * lex.c (cons_up_default_function): Set TREE_PARMLIST on arguments
4171 to default function.
4173 Thu Jan 27 19:26:51 1994 Jason Merrill (jason@deneb.cygnus.com)
4175 * decl.c (grokparms): Abort if we get called with something we don't
4178 Thu Jan 27 17:37:25 1994 Mike Stump (mrs@cygnus.com)
4180 * call.c (build_overload_call_real): Change argument complain to
4181 flags to match style of rest of code. Pass it down to
4182 build_function_call_real as necessary.
4183 * call.c (build_overload_call, build_overload_call_maybe): Change
4184 argument complain to flags to match style of rest of code.
4185 * cp-tree.h (build_function_call_real): Added fourth flags
4187 * cvt.c (convert_to_reference): Only give warning messages, if
4188 LOOKUP_COMPLAIN is set.
4189 * typeck.c (build_x_function_call): Change simple complain
4190 argument to build_overload_call_maybe and build_overload_call, to
4191 LOOKUP_COMPLAIN to match style of rest of code.
4192 * typeck2.c (build_functional_cast): Ditto.
4193 * typeck.c (build_function_call_real): Add flags, so that we can
4194 not complain, if we don't want to complain. Complain about
4195 arguments, if we are complaining, otherwise don't.
4196 * typeck.c (build_function_call, build_function_call_maybe):
4197 Stick in flags argument.
4198 * typeck.c (build_x_binary_op, build_x_unary_op,
4199 build_x_conditional_expr, build_x_compound_expr): Follow style of
4200 build_x_indirect_ref, as it is more correct and more common.
4202 Thu Jan 27 14:36:20 1994 Jason Merrill (jason@deneb.cygnus.com)
4204 * call.c (build_method_call): Don't check for being called with
4207 * decl2.c (finish_file): Don't play with DECL_CLASS_CONTEXT for the
4208 static initializer function.
4210 * init.c (build_member_call): Use convert_force here, too.
4212 * search.c (compute_access): Only treat static members specially
4213 if they are referenced directly.
4215 Wed Jan 26 18:28:14 1994 Jason Merrill (jason@deneb.cygnus.com)
4217 * gxxint.texi (Access Control): New node.
4219 * search.c (current_scope): New function; returns whichever of
4220 current_class_type and current_function_decl is the most nested.
4221 (compute_access): Total overhaul to make it clearer and more
4222 correct. Don't use the cache for now; in the only situation where
4223 it was used before, it gained nothing. This frees up three of the
4224 DECL_LANG_FLAGs for possible other use!
4226 * cp-tree.h: #if 0 out DECL_PUBLIC & friends.
4228 * typeck.c (build_component_ref_1): Don't check DECL_PUBLIC.
4230 * call.c (build_method_call): Use convert_force to cast `this' --
4231 rely on the access checking for the method itself.
4233 * init.c (is_friend): Do the nesting thing, handle types. I am
4235 (is_friend_type): Become a shell for is_friend.
4236 (add_friend): Never stick in ctype.
4237 Why are the friendship functions in init.c, anyway?
4239 Wed Jan 26 17:50:00 1994 Mike Stump (mrs@cygnus.com)
4241 * cvt.c (build_type_conversion_1): Don't conditionalize call to
4242 pedwarn upon pedantic.
4244 Wed Jan 26 17:20:46 1994 Mike Stump (mrs@cygnus.com)
4246 * cvt.c (convert_to_reference): Add 8.4.3 checking so that one
4247 gets a warning if one tries to initialize a non-const & from a
4249 * cvt.c (convert_to_reference): Use %P format for argument
4250 numbers in warnings.
4252 Wed Jan 26 14:35:06 1994 Mike Stump (mrs@cygnus.com)
4254 * init.c (build_delete): Follow style in call.c to construct the
4255 virtual call to the desctructor, as that code is right. Fixes a
4256 problem of the compiler saying a pointer conversion is ambiguous.
4258 Wed Jan 26 11:28:14 1994 Jason Merrill (jason@deneb.cygnus.com)
4260 * cp-tree.h (VTABLE_NAME_P): Change other occurrence of
4261 VTABLE_NAME_FORMAT to VTABLE_NAME.
4263 * *: s/visibility/access/g
4265 Tue Jan 25 18:39:12 1994 Jason Merrill (jason@deneb.cygnus.com)
4267 * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR.
4269 Tue Jan 25 13:54:29 1994 Mike Stump (mrs@cygnus.com)
4271 * init.c (build_delete): Back out Jan 17th & 18th pacthes, as
4274 Tue Jan 25 13:11:45 1994 Jason Merrill (jason@deneb.cygnus.com)
4276 * decl.c (duplicate_decls): Fix pointer arithmetic.
4278 Mon Jan 24 15:50:06 1994 Chip Salzenberg (chip@fin.uucp)
4280 [ cp-* changes propagated from c-* changes in 940114 snapshot ]
4281 * cp-parse.y (maybe_attribute): Allow multiple __attribute__
4282 clauses on a declaration.
4284 Mon Jan 24 17:06:23 1994 Jason Merrill (jason@deneb.cygnus.com)
4286 * class.c (finish_struct): Do synthesize methods for anon
4287 structs, just not unions.
4289 Mon Jan 24 13:50:13 1994 Kung Hsu (kung@mexican.cygnus.com)
4291 * decl.c (xref_tag): handle anonymous nested type.
4292 * decl.c (globalize_nested_type): add no globalize bit check.
4293 * spew.c (hack_more_ids) : templated nested decl not push top
4296 * parse.y : get rid of 'goto do_components'. It is much better
4299 * decl.c (is_anon_name): get rid of the function and use the
4300 macro ANON_AGGRNAME_P.
4303 Fri Jan 21 14:06:02 1994 Jason Merrill (jason@deneb.cygnus.com)
4305 * class.c (finish_struct): Don't synthesize any methods for
4306 anonymous structs/unions.
4308 * typeck.c (build_modify_expr): Don't treat pmf's as class objects.
4310 Thu Jan 20 18:56:46 1994 Jason Merrill (jason@deneb.cygnus.com)
4312 * method.c (build_opfncall): Call build_indirect_ref on
4313 synthesized instance for operator delete.
4315 * pt.c (type_unification): Don't abort if called with a list of
4318 * class.c (instantiate_type): Deal with function templates.
4320 Thu Jan 20 16:55:35 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
4322 * Makefile.in (CC): Default to cc not gcc.
4324 Thu Jan 20 13:47:54 1994 Jason Merrill (jason@deneb.cygnus.com)
4326 * typeck.c (build_modify_expr): Call constructor if appropriate.
4328 * decl.c (push_to_top_level): Clear out class-level bindings cache.
4330 Wed Jan 19 13:51:22 1994 Jason Merrill (jason@deneb.cygnus.com)
4332 * call.c (resolve_scope_to_name): Work recursively (previously only
4333 looked down one level).
4335 * lex.c (do_pending_inlines): If we're still dealing with the last
4336 batch of inlines, don't start working on a new one.
4338 * Makefile.in (stamp-parse): Update conflict count.
4341 * parse.y (explicit_instantiation): New rule; implements
4342 'template A<int>' syntax (though not 'template foo(int)' yet).
4343 (structsp): Add explicit_instantiation.
4345 Tue Jan 18 13:53:05 1994 Jason Merrill (jason@deneb.cygnus.com)
4347 * class.c (finish_struct, etc.): Simplify decision to synthesize
4350 * call.c, class.c, cp-tree.h, decl.c, init.c,
4351 ptree.c, search.c, typeck.c, typeck2.c: Nuke
4352 TYPE_NEEDS_CONSTRUCTOR (change all calls to TYPE_NEEDS_CONSTRUCTING).
4353 * init.c (expand_aggr_init_1): Don't try non-constructor methods
4354 of initializing objects.
4355 (build_new): Don't try other methods if the constructor lookup fails.
4357 * class.c (finish_base_struct): Set cant_have_default_ctor and
4358 cant_synth_copy_ctor properly.
4359 (finish_struct): Ditto.
4361 Mon Jan 17 13:58:18 1994 Jason Merrill (jason@deneb.cygnus.com)
4363 * typeck.c (build_modify_expr_1): #if 0 out again.
4364 (build_modify_expr): #if 0 out memberwise init code again.
4366 * lex.c (default_copy_constructor_body): Be const-correct.
4367 (default_assign_ref_body): Ditto.
4369 * init.c (perform_member_init): Use TYPE_HAS_CONSTRUCTOR to decide
4370 whether or not to use it, rather than TYPE_NEEDS_CONSTRUCTING.
4371 (expand_aggr_init): Disable silent conversion from initializer list
4372 to list of args for a constructor.
4374 * class.c (base_info): Lose needs_default_ctor.
4375 (finish_base_struct): Ditto.
4376 (finish_struct): Ditto.
4378 * decl.c (init_decl_processing): Don't turn off flag_default_inline
4379 just because flag_no_inline is on.
4380 (finish_decl): Use TYPE_HAS_CONSTRUCTOR to decide to use
4383 * class.c (finish_struct): Synthesize default ctor whenever
4386 * Makefile.in (TAGS): Don't try to run etags on cp-parse.y.
4388 Sat Jan 15 18:34:33 1994 Mike Stump (mrs@cygnus.com)
4390 * Makefile.in, configure: Handle the C++ front-end in a
4392 * cp-*: Move C++ front-end to cp/*.
4394 Fri Jan 14 14:09:37 1994 Jason Merrill (jason@deneb.cygnus.com)
4396 * cp-typeck.c (build_function_call_real): Modify to match other
4397 instances of taking the address of the function.
4399 * cp-class.c (finish_struct): Set TYPE_HAS_REAL_CONSTRUCTOR to 1 if
4400 there are non-synthesized constructors.
4401 Only set TYPE_NEEDS_CONSTRUCTOR if TYPE_HAS_REAL_CONSTRUCTOR.
4402 Always generate copy constructor if possible.
4404 * cp-tree.h (lang_type): Add has_real_constructor bitfield.
4405 (TYPE_HAS_REAL_CONSTRUCTOR): Define.
4407 * cp-lex.c (default_copy_constructor_body): Use init syntax
4410 * cp-type2.c (store_init_value): Only give error for initializer list
4411 if TYPE_HAS_REAL_CONSTRUCTOR.
4413 Thu Jan 13 15:38:29 1994 Jason Merrill (jason@deneb.cygnus.com)
4415 * cp-tree.h (DECL_SYNTHESIZED): Add defn.
4416 (lang_decl): Add synthesized bitfield to decl_flags.
4418 * cp-lex.c (cons_up_default_function): Use DECL_SYNTHESIZED to mark
4419 artificial methods, rather than a line # of 0.
4421 Fri Jan 14 18:25:29 1994 Kung Hsu (kung@mexican.cygnus.com)
4423 * cp-decl (xref_tag): fix a bug in conflict type.
4424 * cp-parse.y : add SCOPED_NAME for uninstantiated template nested
4426 * cp-spew.c (yylex) : generated SCOPED_NAME token.
4427 * cp-lex.c (yyprint): handle SCOPED_NAME.
4429 Fri Jan 14 17:00:29 1994 Mike Stump (mrs@cygnus.com)
4431 * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is
4434 Thu Jan 13 14:00:35 1994 Kung Hsu (kung@mexican.cygnus.com)
4436 * cp-decl2.c (grok_x_components): fix a bug that enum type does not
4439 Thu Jan 13 11:39:34 1994 Mike Stump (mrs@cygnus.com)
4441 Ensure that all vtable pointers are initialized with all the right
4444 * cp-class.c (is_normal): Changed to reflect new meaning of
4445 CLASSTYPE_VFIELD_PARENT.
4446 * cp-class.c (maybe_fixup_vptrs): Use of
4447 CLASSTYPE_NEEDS_VIRTUAL_REINIT here is misguided. Use
4448 BINFO_MODIFIED instead.
4449 * cp-class.c (finish_struct): Changed to reflect new meaning of
4450 CLASSTYPE_VFIELD_PARENT.
4451 * cp-decl.c (get_binfo_from_vfield): Removed, unneeded now.
4452 * cp-decl.c (finish_function): Use init_vtbl_ptrs, instead of open
4454 * cp-init.c (init_vfields): Changed name to init_vtbl_ptrs, and
4456 * cp-init.c (emit_base_init): Use new name init_vtbl_ptrs.
4457 * cp-tree.h (vfield_parent): Changed to integer.
4458 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Changed docs to reflect new
4460 * cp-tree.h (init_vtbl_ptrs): Added init_vtbl_ptrs.
4462 Wed Jan 12 18:24:16 1994 Kung Hsu (kung@mexican.cygnus.com)
4464 * cp-decl.c (xref_tag): re-implement globalize nested type.
4465 * cp-decl2.c (grok_x_components): ditto.
4466 * cp-parse.y: ditto.
4467 * cp-tree.h (lang_type): add no_globalize bit in type_flags.
4469 Wed Jan 12 14:08:09 1994 Jason Merrill (jason@deneb.cygnus.com)
4471 * cp-decl.c (grokdeclarator): Don't set TREE_PUBLIC on friend
4472 decls with a definition attached.
4474 * cp-typeck.c (build_modify_expr): Undo previous change in the case
4477 Tue Jan 11 19:33:03 1994 Jason Merrill (jason@deneb.cygnus.com)
4479 * cp-typeck.c (build_modify_expr): Replace code for generating
4480 assignment semantics for classes with an error.
4481 (build_modify_expr_1): #if 0 out.
4483 * cp-decl.c (pushdecl): Patch bogus design of pushdecl
4484 behavior for overloaded functions (it doesn't push anything).
4486 * cp-class.c (finish_struct): When generating default op=,
4487 set TYPE_HAS_ASSIGNMENT.
4489 Mon Jan 10 18:48:06 1994 Mike Stump (mrs@cygnus.com)
4491 * cp-cvt.c (convert): Make {double, clashing enum} -> enum
4493 * cp-typeck.c (convert_for_assignment): Simplify.
4494 * cp-decl2.c (warn_enum_clash): Removed.
4495 * invoke.texi (-Wenum-clash): Removed.
4496 * toplev.c (-Wenum-clash): Removed.
4498 Mon Jan 10 17:48:37 1994 Kung Hsu (kung@mexican.cygnus.com)
4500 * cp-decl.c (finish_decl): fix incorrect popclass call.
4502 * cp-decl.c (is_anon_name): new function, check whether the name
4503 is anonymous name generated by compiler.
4504 * cp-decl.c (grokdeclarator): allow nested SCOPE_REF
4505 * cp-spew.c (hack_more_ids): handle nested type in template.
4506 * cp-parse.y : handle nested type reference in uninstantiated
4508 * cp-call.c (build_method_call): handle uninstantiated template
4510 * cp-pt.c (search_nested_type_in_tmpl): new function, search nested
4512 * cp-pt.c (lookup_nested_type_by_name): new function, lookup nested
4514 * cp-pt.c (tsubst): handle nested type search by name.
4516 Mon Jan 10 14:32:18 1994 Jason Merrill (jason@deneb.cygnus.com)
4518 * cp-init.c (build_member_call): Propagate qualifiers to new type.
4520 * cp-call.c (build_method_call): Count functions the new way.
4522 Fri Jan 7 19:03:26 1994 Jason Merrill (jason@deneb.cygnus.com)
4524 * cp-decl.c (pushtag): Set DECL_ASSEMBLER_NAME for nested classes,
4527 Tue Jan 4 16:45:51 1994 Kung Hsu (kung@cirdan.cygnus.com)
4529 * cp-parse.y: change to handle whether to globalize nested class.
4530 * cp-decl.c(xref_tag, maybe_globalize_type): Ditto.
4532 Mon Jan 3 22:22:32 1994 Gerald Baumgartner (gb@cygnus.com)
4534 * Makefile.in cp-call.c cp-class.c cp-cvt.c cp-decl.c cp-decl2.c
4535 cp-error.c cp-init.c cp-lex.c cp-lex.h cp-method.c cp-parse.y
4536 cp-spew.c cp-tree.c cp-tree.h cp-type2.c cp-typeck.c cp-xref.c
4537 gplus.gperf toplev.c: Incorporated C++ signature extension.
4538 * cp-sig.c: New file, contains most of signature processing.
4539 * cp-hash.h: Regenerated from gplus.gperf.
4541 * gcc.1 g++.1: Added explanation for the `-fhandle-signatures'
4542 and `-fno-handle-signatures' command line flags.
4544 * gcc.texi: Changed the last-modification date.
4545 * invoke.texi: Added `-fhandle-signatures' in the list of
4546 C++ language options. Added explanation for this option.
4548 Tue Dec 28 21:10:03 1993 Mike Stump (mrs@cygnus.com)
4550 * cp-init.c (expand_vec_init): Remove comptypes test, as it is too
4553 Tue Dec 28 13:42:22 1993 Mike Stump (mrs@cygnus.com)
4555 * cp-pt.c (do_pending_expansions): Decide to expand a template
4556 member function, based upon it's class type, not the class type of
4557 the first place it was declared.
4559 Tue Dec 28 05:42:31 1993 Mike Stump (mrs@cygnus.com)
4561 * cp-class.c (is_normal): New routine, use to determine when the
4562 given binfo is the normal one. (The one that should have the simple
4564 * cp-class.c (modify_other_vtable_entries): Use DECL_ASSEMBLER_NAME
4565 to check if two fndecls are `the same'. Sometimes this routine can
4566 modify the main vtable, and normal should be 1, in that case, so use
4567 is_normal() to determine if this is the main vtable for the class.
4568 Don't recurse down virtual bases, as they are shared, and we take
4569 care of them elsewhere.
4570 * cp-class.c (modify_vtable_entries): If we have already updated the
4571 vtable with the new virtual, don't do it again.
4572 * cp-class.c (finish_struct): Set CLASSTYPE_VFIELD_PARENT as
4573 appropriate. Do virtual function overriding in virtual bases, after
4574 normal overriding, so that the base function list in DECL_VINDEX is
4575 not overridden, before we have a chance to run through the list.
4576 Use DECL_ASSEMBLER_NAME to check if two fndecls are `the same'.
4577 Make sure we pass the right address into modify_vtable_entries.
4578 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): New field to indicate which
4579 binfo is the one that has the vtable that we based our vtable on.
4581 Fri Dec 24 09:40:52 1993 Michael Tiemann (tiemann@blues.cygnus.com)
4583 * cp-typeck.c (c_expand_start_case): Use default_conversion to
4584 convert expression from reference type if necessary.
4586 Wed Dec 22 17:58:43 1993 Jason Merrill (jason@deneb.cygnus.com)
4588 * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before
4589 trying to read its TREE_VALUE.
4591 * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here.
4592 (finish_struct): Instead of here.
4594 Tue Dec 21 14:34:25 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4596 * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't
4597 have TYPE_PTRMEMFUNC_P set before we try to build its
4598 CLASSTYPE_ID_AS_LIST.
4599 (get_decl_list): Likewise, when trying to read it.
4601 * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined.
4602 (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT.
4604 Mon Dec 20 13:35:03 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4606 * cp-typeck.c (rationalize_conditional_expr): New function.
4607 (unary_complex_lvalue): Use it.
4608 (build_modify_expr): Use it, since trying to do an ADDR_EXPR of it
4609 with build_unary_op won't cut it. Don't wrap the COND_EXPR with a
4612 * cp-decl2.c (explicit_warn_return_type): Deleted variable.
4613 (lang_decode_option): Set warn_return_type, not explicit_*, for
4614 -Wreturn-type and -Wall. This is what rest_of_compilation uses to
4615 decide if it should go into jump_optimize or not.
4616 * cp-tree.h (explicit_warn_return_type): Deleted.
4617 * cp-decl.c (grokdeclarator): Use warn_return_type, not explicit_*.
4618 (finish_function): Also complain about no return in a non-void fn if
4619 we're being pedantic (don't rely on use of -Wreturn-type).
4621 Fri Dec 17 15:45:46 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4623 * cp-decl.c (grokdeclarator): Forbid declaration of a function as
4624 static if it's being done inside another function.
4626 * cp-search.c (compute_visibility): Check for friendship both ways.
4628 Fri Dec 17 14:28:25 1993 Jason Merrill (jason@deneb.cygnus.com)
4630 * cp-cvt.c (build_default_binary_type_conversion): Make error
4631 messages more helpful.
4633 * cp-error.c (op_as_string): New function, returns "operator =="
4634 given EQ_EXPR or suchlike.
4636 Fri Dec 17 13:28:11 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4638 * cp-call.c (print_n_candidates): New function.
4639 (build_overload_call_real): Use it when we complain about a call
4642 Fri Dec 17 12:41:17 1993 Jason Merrill (jason@deneb.cygnus.com)
4644 * cp-call.c (build_method_call): Fix checking for static call
4647 * cp-method.c (build_opfncall): Call build_indirect_ref on argument
4650 * cp-init.c (build_new): Don't mess with rval when building
4653 Thu Dec 16 16:48:05 1993 Kung Hsu (kung@cirdan.cygnus.com)
4655 * cp-lex.c (default_assign_ref_body): add check when TYPE_NESTED_
4656 NAME(type) may not be exist. It's not a problem for old compiler.
4658 Thu Dec 16 14:46:06 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4660 * cp-tree.h (CLASSTYPE_ALTERS_VISIBILITIES_P): Delete macro, it's
4661 never used for anything.
4662 (struct lang_type, member type_flags): Delete field
4663 `alters_visibility', and up `dummy' by 1.
4664 * cp-class.c (finish_base_struct): Delete code that copies the
4665 setting of CLASSTYPE_ALTERS_VISIBILITIES_P.
4666 (finish_struct): Delete code that sets it.
4668 Thu Dec 16 14:44:39 1993 Jason Merrill (jason@deneb.cygnus.com)
4670 * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to
4671 build_method_call that I messed up before.
4673 * cp-search.c (get_base_distance): If protect > 1, allow immediate
4676 * cp-class.c (finish_base_struct): Set cant_synth_* correctly.
4677 (finish_struct): Ditto. Well, nigh-correctly; it won't deal
4678 properly with the case where a class contains an object of an
4679 ambiguous base class which has a protected op=. Should be fixed
4680 when the access control code gets overhauled.
4681 (finish_struct_methods): Set TYPE_HAS_NONPUBLIC_* correctly.
4683 Thu Dec 16 12:17:06 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4685 * cp-lex.c (real_yylex): Turn the code back on that deals with
4686 __FUNCTION__ and __PRETTY_FUNCTION__. Don't use lookup_name, to
4687 avoid the ambiguity problems that led to it being turned off in the
4690 * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P
4691 to see if something is a method.
4693 Wed Dec 15 18:35:58 1993 Mike Stump (mrs@cygnus.com)
4695 * cp-typeck.c (build_modify_expr): Avoid error messages on small
4697 * cp-typeck.c (convert_for_assignment): Add missing argument to
4698 cp_warning and cp_pedwarn calls.
4700 Wed Dec 15 18:25:32 1993 Jason Merrill (jason@deneb.cygnus.com)
4702 * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base
4703 initializers; it's just anachronistic.
4705 * cp-decl.c (finish_decl): Don't require external-linkage arrays
4706 to have a complete type at declaration time when pedantic.
4708 Tue Dec 14 11:37:23 1993 Jason Merrill (jason@deneb.cygnus.com)
4710 * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set.
4712 * cp-call.c (build_method_call): Don't dereference pointer given
4715 * cp-decl.c (finish_function): Don't pass pointer to
4717 (finish_function): Ditto.
4719 * cp-typeck.c (build_x_function_call): Ditto.
4721 * cp-method.c (build_component_type_expr): Ditto.
4723 * cp-init.c (build_member_call): Ditto.
4726 Mon Dec 13 18:04:33 1993 Kung Hsu (kung@cirdan.cygnus.com)
4728 * cp-decl.c (xref_tag): fix regression created by changes made
4730 * cp-decl.c (xref_defn_tag): fix parallel nested class problem.
4732 Fri Dec 10 12:40:25 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4734 * cp-call.c (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print
4735 out the final evaluation of the function, so we can see if ELLIPSIS,
4736 USER, and EVIL were set at the end.
4738 * cp-call.c (convert_harshness_ansi): When the parm isn't an lvalue,
4739 only go for setting TRIVIAL_CODE if we are dealing with types that
4742 Thu Dec 9 18:27:22 1993 Mike Stump (mrs@cygnus.com)
4744 * cp-decl.c (flag_huge_objects): New flag to allow large objects.
4745 * toplev.c (lang_options): Ditto.
4746 * cp-decl2.c (flag_huge_objects, lang_f_options): Ditto.
4747 * cp-decl.c (delta_type_node): New type for delta entries.
4748 * cp-tree.h (delta_type_node): Ditto.
4749 * cp-decl.c (init_decl_processing): Setup delta_type_node.
4750 * cp-decl.c (init_decl_processing, build_ptrmemfunc_type): Use
4751 delta_type_node instead of short_integer_type_node.
4752 * cp-class.c (build_vtable_entry): Ditto.
4754 Thu Dec 9 16:19:05 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4756 * cp-tree.h (OPERATOR_TYPENAME_P): Define outside of
4757 NO_{DOLLAR,DOT} macro checks, so it always gets defined.
4758 (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL.
4760 Wed Dec 8 17:38:06 1993 Mike Stump (mrs@cygnus.com)
4762 * cp-decl.c (finish_decl): Make sure things that can go into
4763 "common", do go into common, if -fcommon is given.
4765 Wed Dec 8 13:01:54 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4767 * cp-call.c (print_harshness) [DEBUG_MATCHING]: New function.
4768 (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print out
4769 argument matching diagnostics to make instantly clear what the
4772 * cp-call.c (convert_harshness_ansi): If the parm isn't an lvalue,
4773 then check to see if the penalty was increased due to
4774 signed/unsigned mismatch, and use a TRIVIAL_CODE if it wasn't.
4776 Tue Dec 7 18:29:14 1993 Kung Hsu (kung@cirdan.cygnus.com)
4778 * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution
4781 Tue Dec 7 16:09:34 1993 Jason Merrill (jason@deneb.cygnus.com)
4783 * cp-class.c (finish_struct): Before synthesizing methods, if no
4784 methods have yet been declared then set nonprivate_method. Don't
4785 set non_private method after synthesizing a method.
4787 * cp-lex.c (extract_interface_info): If flag_alt_external_templates
4788 is set, tie emitted code to the location of template instantiation,
4789 rather than definition.
4791 * cp-tree.h: Declare flag_alt_external_templates.
4793 * cp-decl2.c (lang_decode_option): Support -falt-external-templates.
4795 * toplev.c (lang_options): Ditto.
4797 Mon Oct 4 12:50:02 1993 Chip Salzenberg (chip@fin.uucp)
4799 [changes propagated from 930810 snapshot]
4800 * cp-decl.c (init_decl_processing): Make long long available for use
4801 as SIZE_TYPE and PTRDIFF_TYPE.
4802 (finish_decl): Allow file-scope static incomplete array.
4803 (grokdeclarator): Don't pass on const and volatile fron function
4804 value type to function type.
4805 Warn here for volatile fn returning non-void type.
4806 * cp-parse.y (attrib): Accept attributes `volatile' with alias
4807 `noreturn', and `const'.
4808 * cp-typeck.c (default_conversion): Don't lose const and volatile.
4809 (build_binary_op_nodefault): Generate pedantic warning for comparison
4810 of complete pointer type with incomplete pointer type.
4811 (build_c_cast): Be careful that null pointer constant be INTEGER_CST.
4813 Tue Dec 7 10:46:48 1993 Jason Merrill (jason@deneb.cygnus.com)
4815 * cp-init.c (expand_vec_init): When creating a temporary for copying
4816 arrays, use the type of the source, not the target.
4818 * cp-cvt.c (convert): Pass an argument for errtype to
4819 convert_to_reference.
4821 * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with
4822 methods, -> and `this'.
4824 Mon Dec 6 17:12:33 1993 Jason Merrill (jason@deneb.cygnus.com)
4826 * cp-error.c (parm_as_string): New function; returns `this' or arg
4827 number. Corresponds to %P.
4828 (dump_expr): Deal with method calls.
4830 * cp-cvt.c (convert_to_reference): Stop using warn_for_assignment.
4831 * cp-typeck.c (convert_for_assignment): Ditto.
4832 (warn_for_assignment): Lose.
4834 Mon Dec 6 11:33:35 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4836 * cp-call.c (ideal_candidate_ansi): Delete code that was never
4837 doing anything useful. Instead, sort once, and DO NOT wipe
4838 out any codes with EVIL_CODE, since that's what we use as a
4839 marker for the end of the list of candidates.
4841 * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN.
4843 Mon Dec 6 12:49:17 1993 Jason Merrill (jason@deneb.cygnus.com)
4845 * cp-init.c (get_aggr_from_typedef): New function, like
4846 is_aggr_typedef but returns the _TYPE.
4848 * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name.
4850 Sun Dec 5 18:12:48 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4852 * cp-lex.c (readescape): Pedwarn when a hex escape is out of range.
4854 Thu Nov 25 23:50:19 1993 Chip Salzenberg (chip@fin.uucp)
4856 Delay language context change until beginning of next decl.
4858 * cp-lex.h (c_header_level): Removed.
4859 (pending_lang_change): Declared.
4860 * cp-lex.c (c_header_level): Renamed from in_c_header, made static.
4861 (pending_lang_change): Defined.
4862 (check_newline): Rework code that recognizes line number and
4863 filename changes. Instead of pushing and popping lang context,
4864 increment and decrement pending_lang_change.
4865 (do_pending_lang_change): Push and pop lang context according
4866 to value of pending_lang_change.
4867 * cp-parse.y (extdefs): Use lang_extdef instead of extdef.
4868 (extdef): Same as extdef, but call do_pending_lang_change() first.
4870 Mon Nov 15 15:39:15 1993 Chip Salzenberg (chip@fin.uucp)
4872 * cp-typeck.c (build_binary_op_nodefault): Warn for ordered
4873 compare of ptr with 0 only if pedantic in both cases.
4875 Thu Nov 25 13:31:37 1993 Chip Salzenberg (chip@fin.uucp)
4877 Reinstate the below patch, which got lost in the Cygnus merge:
4878 Tue Nov 23 13:59:24 1993 Hallvard B Furuseth (hbf@durin.uio.no)
4879 * cp-parse.y (maybe_type_qual): Don't fail to set $$.
4881 Wed Nov 17 19:03:30 1993 Chip Salzenberg (chip@fin.uucp)
4883 * cp-parse.y (attrib): Allow "ident(ident)" like the C front end.
4885 Fri Oct 22 20:43:37 1993 Paul Eggert (eggert@twinsun.com)
4887 * cp-lex.c (real_yylex): Diagnose floating point constants
4890 Wed Nov 17 19:10:37 1993 Chip Salzenberg (chip@fin.uucp)
4892 * cp-type2.c (build_functional_cast): ARM page 16: When a class
4893 and an object, function or enumerator are declared in the same
4894 scope with the same name, the class name is hidden.
4896 Wed Nov 17 19:07:18 1993 Chip Salzenberg (chip@fin.uucp)
4898 * cp-call.c (convert_harshness_ansi): Distinguish float, double,
4899 and long double from each other when overloading.
4900 (compute_conversion_costs_{ansi,old}, build_method_call,
4901 build_overlay_call_real, convert_to_aggr): Always set and
4902 always use H_LEN member of candidate structure.
4904 Mon Oct 11 23:10:53 1993 Chip Salzenberg (chip@fin.uucp)
4906 * cp-decl.c (duplicate_decls): Note redeclarations of library
4907 functions, and generate distinct warnings for them.
4909 Mon Oct 4 12:26:49 1993 Chip Salzenberg (chip@fin.uucp)
4911 Support format warnings in G++.
4913 * cp-tree.h: Protect against multiple inclusion.
4914 Declare all public functions in c-common.c (copy from c-tree.h).
4915 (STDIO_PROTO): Define.
4916 (warn_format): Declare.
4917 (record_format_info): Remove declaration.
4918 * cp-decl.c (init_decl_processing): Call init_function_format_info.
4919 * cp-decl2.c (lang_decode_option): Make "-Wall" include warn_format.
4920 * cp-typeck.c (build_function_call_real): Call check_function_format.
4921 (record_format_info): Remove -- obsolete stub.
4923 Sat Jul 24 12:04:29 1993 Chip Salzenberg (chip@fin.uucp)
4925 * cp-decl.c (duplicate_decls): Don't warn for non-extern var decl
4926 following an extern one (for -Wredundant-decls).
4927 * cp-parse.y (primary): In statement expression case, if compstmt
4928 returns something other than a BLOCK, return it unchanged.
4930 Thu Dec 2 20:44:58 1993 Chip Salzenberg (chip@fin.uucp)
4932 * cp-decl.c (warn_extern_redeclared_static): New function made
4933 from code extracted from pushdecl.
4934 (duplicate_decls, pushdecl): Call new function.
4935 (lookup_name_current_level): Allow for IDENTIFIER_GLOBAL_VALUE
4936 to be a TREE_LIST when function is declared in 'extern "C" {}'.
4938 Fri Dec 3 16:01:10 1993 Jason Merrill (jason@deneb.cygnus.com)
4940 * cp-class.c (duplicate_tag_error): Use cp_error.
4941 (finish_base_struct): Check for ambiguity with direct base, and don't
4942 generate op= or copy ctor if it exists.
4944 Fri Dec 3 15:32:34 1993 Kung Hsu (kung@cirdan.cygnus.com)
4946 * cp-init.c (expand_member_init): when initializer name is null,
4947 don't try to build it now because emit_base_init will handle it.
4949 Fri Dec 3 12:28:59 1993 Jason Merrill (jason@deneb.cygnus.com)
4951 * cp-lex.c (init_lex): Initialize input_filename to "<internal>" for
4952 code such as ExceptionHandler::operator=.
4954 Fri Dec 3 10:32:08 1993 Jason Merrill (jason@deneb.cygnus.com)
4956 * cp-decl.c (grokdeclarator): Don't try to print out dname when
4957 complaining about arrays of references if decl_context==TYPENAME,
4958 since it will be null.
4960 * cp-decl2.c: Default to flag_ansi_overloading.
4962 Thu Dec 2 18:05:56 1993 Kung Hsu (kung@cirdan.cygnus.com)
4964 * cp-call.c (build_method_call): use binfo from instance if it's
4965 different from binfo (basetype_path) passed from above.
4967 Thu Dec 2 12:48:36 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4969 Wed Nov 17 19:14:29 1993 Chip Salzenberg (chip@fin.uucp)
4971 cp-error.c (dump_expr): Use unsigned chars to output a
4972 TREE_REAL_CST in hex.
4974 Thu Dec 2 11:05:48 1993 Jason Merrill (jason@deneb.cygnus.com)
4976 * cp-class.c (finish_struct): Fix typo in setting
4979 * cp-tree.h (TYPE_NESTED_NAME): New macro, does
4980 DECL_NESTED_TYPENAME (TYPE_NAME (NODE)).
4982 * cp-lex.c (default_copy_constructor_body): Change
4983 DECL_NAME (TYPE_NAME (btype)) to TYPE_NESTED_NAME (btype).
4984 (default_assign_ref_body): Ditto.
4985 (default_copy_constructor_body): Call operator= explicitly for
4986 base classes that have no constructor.
4988 Thu Dec 2 10:47:15 1993 Michael Tiemann (tiemann@blues.cygnus.com)
4990 * cp-call.c (build_method_call): If the instance variable is
4991 converted to error_mark_node when we're trying to convert it to the
4992 base type of a method we're looking up, return error_mark_node.
4994 Thu Dec 2 10:41:16 1993 Torbjorn Granlund (tege@cygnus.com)
4996 * cp-typeck.c (build_binary_op_nodefault): In *_DIV_EXPR *_MOD_EXPR
4997 cases, tests for unsigned operands by peeking inside a NOP_EXPR.
4999 Wed Dec 1 13:33:34 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
5001 * cp-call.c (compute_conversion_costs_ansi): Use the size of struct
5002 harshness_code, not the size of short, for clearing out the
5005 * cp-call.c (print_candidates): New function.
5006 (build_method_call): When we had some candidates, but didn't get a
5007 usable match, don't report that we got an error with the first
5008 candidate. Instead, say there were no matches, and list the
5009 candidates with print_candidates. In the second pass, make sure we
5010 clear out ever_seen, so we can accurately count the number of
5011 functions that qualified.
5013 Wed Dec 1 09:53:59 1993 Torbjorn Granlund (tege@cygnus.com)
5015 * cp-typeck.c (build_binary_op_nodefault): Shorten for *_MOD_EXPR
5016 only if op1 is known to be != -1.
5017 (build_binary_op_nodefault): Handle *_DIV_EXPR likewise.
5019 Tue Nov 30 14:07:26 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
5021 * cp-method.c (hack_identifier): If the field itself is private, and
5022 not from a private base class, say so.
5024 Mon Nov 29 03:00:56 1993 Jason Merrill (jason@deneb.cygnus.com)
5026 * cp-decl.c (grokdeclarator): Always warn on initialization of
5029 Wed Nov 24 00:49:35 1993 Jason Merrill (jason@deneb.cygnus.com)
5031 * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly.
5032 (finish_base_struct): Set cant_synth_asn_ref properly.
5034 * cp-lex.c (cons_up_default_function): Add section for operator=.
5035 (default_assign_ref_body): New function, mostly cribbed from
5036 default_copy_constructor_body.
5038 * cp-class.c (base_info): Add members cant_synth_copy_ctor,
5039 cant_synth_asn_ref, no_const_asn_ref.
5040 (finish_base_struct): Update no_const_asn_ref, note that you should
5041 update cant_synth_*, propagate TYPE_GETS_ASSIGN_REF.
5042 (finish_struct): Add decls for cant_synth_*, no_const_asn_ref, and
5043 initialize them properly. Set no_const_asn_ref properly. Set
5044 cant_synth_* in some of the situations where they should be set.
5045 Propagate TYPE_GETS_ASSIGN_REF. Use cant_synth_copy_ctor. Add call
5046 to cons_up_default_function for operator=.
5048 Tue Nov 23 20:24:58 1993 Mike Stump (mrs@cygnus.com)
5050 * cp-cvt.c (convert_force): Add code to perform casting of pointer
5051 to member function types.
5052 * cp-typeck.c (build_ptrmemfunc): Add FORCE parameter to indicate
5053 when the conversion should be done, regardless.
5054 * cp-tree.h (build_ptrmemfunc): Ditto.
5055 * cp-type2.c (digest_init): Ditto.
5056 * cp-typeck.c (convert_for_assignment): Ditto.
5058 Tue Nov 23 18:06:58 1993 Jason Merrill (jason@deneb.cygnus.com)
5060 * cp-error.c (dump_expr): Do the right thing for variables of
5063 * cp-decl.c (grok_op_properties): Set TYPE_HAS_ASSIGN_REF
5064 and its kin properly.
5065 (xref_tag): Propagate TYPE_GETS_ASSIGN_REF.
5067 Tue Nov 23 12:26:13 1993 Mike Stump (mrs@cygnus.com)
5069 * cp-method.c (build_opfncall): Don't count pointer to member
5070 functions as aggregates here, as we don't want to look up methods in
5071 them. The compiler would core dump if we did, as they don't have
5073 * cp-typeck.c (build_indirect_ref): Improve wording on error
5076 Mon Nov 22 14:22:23 1993 Jason Merrill (jason@deneb.cygnus.com)
5078 * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn
5079 (since it's supported in other compiler bits).
5081 * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name
5084 * cp-error.c (dump_function_decl): Don't print return type for
5085 constructors and destructors.
5087 * cp-cvt.c (cp_convert_to_pointer): Import code from
5088 convert_to_pointer so we can return error_mark_node in the case of an
5089 error, and to allow more meaningful error messages.
5090 (build_type_conversion): Don't go through void* when trying
5091 to convert to a pointer type.
5093 * cp-decl.c (grokfndecl): Move call to grok_op_properties back
5094 after grokclassfn so that it's dealing with the right decl.
5095 (grok_op_properties): Don't assert !methodp for op new and op delete.
5097 * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now
5098 no uses of it in the compiler).
5100 * cp-call.c (build_scoped_method_call): Fix for destructors of simple
5102 (build_method_call): Ditto.
5104 Fri Nov 19 12:59:38 1993 Jason Merrill (jason@deneb.cygnus.com)
5106 * cp-tree.c (count_functions): Abstraction function.
5108 * cp-call.c (build_overload_call_real): Deal with new overloading
5109 properly, remove dead code.
5111 * gcc.c (default_compilers): Generate and use .ii files in the
5112 intermediate stage of compiling C++ source.
5114 Fri Nov 19 11:26:09 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
5116 * cp-expr.c (cplus_expand_expr): Make call_target a valid memory
5117 address before using it, so it can be later safely compared.
5119 Fri Nov 12 15:30:27 1993 Jason Merrill (jason@deneb.cygnus.com)
5121 * cp-pt.c (tsubst): Deal with new overloading.
5123 * cp-typeck.c (fntype_p): is the arg function type?
5124 (comp_target_parms): pedwarn on conversion from (anything) to (...).
5125 (build_x_function_call): Deal with new overloading.
5127 * cp-tree.c (decl_list_length): Deal with new overloading.
5128 (decl_value_member): Like value_member, but for DECL_CHAINs.
5130 * cp-decl.c (duplicate_decls): Deal with new overloading.
5131 (start_decl): Ditto.
5133 * cp-class.c (instantiate_type): Deal with new overloading.
5135 * cp-call.c (convert_harshness_ansi): Deal with new overloading.
5136 (convert_harshness_old): Deal with new overloading.
5137 (build_overload_call_real): Ditto.
5139 Mon Nov 8 13:50:49 1993 Jason Merrill (jason@deneb.cygnus.com)
5141 * cp-tree.c (get_unique_fn): New function; returns FUNCTION_DECL
5142 if unambiguous, NULL_TREE otherwise.
5143 (get_first_fn): Returns the first appropriate FUNCTION_DECL.
5144 (is_overloaded_fn): Returns whether or not the passed tree is
5145 a function or list of functions.
5147 * cp-init.c (init_init_processing): use `get_first_fn' to find
5148 the FUNCTION_DEFN for new and delete.
5150 * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut
5151 code size in half (I spit on special cases).
5153 Tue Sep 7 20:03:33 1993 Jason Merrill (jason@deneb.cygnus.com)
5155 * cp-decl.c: Allow references and template type parameters as well
5158 eval: (auto-fill-mode)