1 Wed Jul 13 03:57:54 1994 Jason Merrill (jason@deneb.cygnus.com)
3 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): #if 0 out; this macro is now
4 defined in the language-independent tree.h.
6 * tree.c (count_functions): Avoid bogus warning when compiling this
9 Mon Jul 11 18:37:20 1994 Jason Merrill (jason@deneb.cygnus.com)
11 * decl.c (grok_reference_init): Always save the initializer of a
14 Fri Jul 8 17:41:46 1994 Mike Stump (mrs@cygnus.com)
16 * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside
17 CLEANUP_POINT_EXPRs so that the stack slots can be reused.
20 Fri Jul 8 12:59:38 1994 Jason Merrill (jason@deneb.cygnus.com)
22 * method.c (hack_identifier): Fix for new overloading.
24 * typeck.c (build_binary_op_nodefault): Don't mess with division by
27 Fri Jul 8 13:20:28 1994 Gerald Baumgartner (gb@cs.purdue.edu)
29 * decl2.c (finish_file): Only call walk_sigtables, if
30 flag_handle_signatures is turned on, don't waste time otherwise.
32 Fri Jul 8 02:27:41 1994 Jason Merrill (jason@deneb.cygnus.com)
34 * decl.c (push_overloaded_decl): Don't create overloads of one when
35 shadowing a class type.
36 * typeck.c (build_x_function_call): Complain about overloads of one
38 * decl.c (grokdeclarator): Don't try to treat a char* as a tree.
39 (grokdeclarator): Fix setting of TREE_STATIC.
40 (start_decl): Clear DECL_IN_AGGR_P after calling duplicate_decls.
42 Thu Jul 7 22:20:46 1994 Gerald Baumgartner (gb@andros.cygnus.com)
44 * cp-tree.h (walk_sigtables): Created extern declaration.
45 * decl2.c (walk_sigtables): Created function, patterned after
46 walk_vtables, even though we only need it to write out sigtables.
47 (finish_sigtable_vardecl): Created function.
48 (finish_vtable_vardecl): Changed 0 to NULL_PTR.
49 (finish_file): Call walk_sigtables.
51 * sig.c (build_signature_table_constructor): Mark class member
52 function pointed to from signature table entry as addressable.
54 Thu Jul 7 13:39:37 1994 Jason Merrill (jason@deneb.cygnus.com)
56 * decl.c (start_decl): Check new decl of static member variable
57 against the declaration in the class here.
58 (grokvardecl): Instead of here.
60 * class.c (prepare_fresh_vtable): Call import_export_vtable if not
62 (build_vtable): Ditto.
64 * decl2.c (import_export_vtable): Move logic for deciding the
65 interface of a template class from here.
66 (import_export_template): To here.
67 (finish_vtable_vardecl): Call import_export_template before
70 Wed Jul 6 20:25:48 1994 Mike Stump (mrs@cygnus.com)
72 * except.c (init_exception_processing): Setup interim_eh_hook to
74 * except.c (do_unwind): Propagate throw object value across
76 * except.c (saved_throw_value): Used to hold the value of the object
77 being thrown. It is always a reference to the real value.
78 * except.c (expand_start_catch_block): Add handling for the
79 value of the exception object.
80 * except.c (expand_start_catch_block): Add handler for the handler,
81 so that throws inside the handler go to the outer block.
82 * except.c (expand_end_catch_block): Ditto.
83 * parse.y (handler_args): Use parm instead, as the other doesn't yet
84 handle references correctly.
86 Wed Jul 6 17:55:32 1994 Per Bothner (bothner@kalessin.cygnus.com)
88 * decl2.c (mark_vtable_entries): If -ftable-thunks, set the
89 vtable entry properly to abort.
91 Tue Jul 5 14:07:54 1994 Jason Merrill (jason@deneb.cygnus.com)
93 * typeck.c (build_binary_op_nodefault): Downgrade division by zero
96 * call.c (build_overload_call_real): Handle fnname being a list of
98 * typeck.c (build_x_function_call): Pass list of functions to
99 build_overload_call, not just the name.
100 * tree.c (count_functions): Complain when called for invalid
103 * decl.c (grokdeclarator): Fix settings of TREE_STATIC, TREE_PUBLIC
104 and DECL_EXTERNAL on static members and initialized const members.
105 * decl2.c (grokfield): Reflect this change.
107 Fri Jul 1 09:35:51 1994 Jason Merrill (jason@deneb.cygnus.com)
109 * parse.y (init): ANSI C++ does not forbid { }.
111 Thu Jun 30 00:35:22 1994 Jason Merrill (jason@deneb.cygnus.com)
113 * decl2.c (lang_decode_option): Set warn_nonvdtor along with -Wall.
114 warn_nonvdtor defaults to off.
116 * class.c (instantiate_type): Use comptypes rather than relying on
119 * decl.c (start_function): Set DECL_DEFER_OUTPUT on all inlines that
122 * tree.c (build_cplus_new): Never build WITH_CLEANUP_EXPRs.
124 * decl.c (grok_reference_init): Deal with ADDR_EXPRs of TARGET_EXPRs.
126 * cvt.c (cp_convert): Pass 0 to with_cleanup_p arg of
129 Wed Jun 29 22:31:09 1994 Jason Merrill (jason@deneb.cygnus.com)
131 * decl2.c (finish_file): Maybe consider static inlines multiple
132 times, in case they reference each other.
134 Tue Jun 28 11:58:38 1994 Gerald Baumgartner (gb@cs.purdue.edu)
136 * class.c (finish_struct): Don't `cons_up_default_function's
138 (finish_struct): Handle an empty method_vec correctly.
140 * decl.c (grokdeclarator): Don't warn about a signature being
141 empty in a signature pointer declaration if we only saw a
142 forward declaration of the signature. Changed `warning's into
145 * sig.c (build_sigtable): Don't die if a null signature table
146 constructor is returned.
147 (build_signature_pointer_constructor): If the signature table
148 constructor is null, the _sptr field is set to a null pointer
149 and cast to the appropriate type. Make copies of all null
150 pointers so that the type null_pointer_node doesn't get changed.
151 (build_signature_table_constructor): Added comments.
153 * sig.c (build_signature_pointer_constructor): Complain if we
154 try to assign to/initialize a signature pointer/reference of
155 an undefined signature.
157 Mon Jun 27 14:05:16 1994 Gerald Baumgartner (gb@cs.purdue.edu)
159 * typeck2.c (store_init_value): Don't be pedantic about
160 non-constant initializers of signature tables/pointers/references.
162 Fri Jun 24 16:49:41 1994 Gerald Baumgartner (gb@cs.purdue.edu)
164 * decl.c (grokdeclarator): If we are grokking an opaque typedef
165 in a signature, don't complain about it begin static.
167 Wed Jun 29 16:44:45 1994 Mike Stump (mrs@cygnus.com)
169 Fixes a problem of the this pointer being wrong in virtual calls to
170 methods that are not overridden in more derived classes.
172 * class.c (fixup_vtable_delta): New routine. It will fixup the
173 delta entries in vtables, wheever they need updating.
174 * class.c (finish_struct): Call the new routine for all virtual
175 bases, as they can have different offsets, than those used in base
176 classes that we derive our vtable from.
178 Tue Jun 28 23:49:28 1994 Jason Merrill (jason@deneb.cygnus.com)
180 * typeck.c (build_binary_op): Use the types before default
181 conversions in the error message.
183 * *.c: Use c_build_type_variant instead of build_type_variant where
184 the type might be an array.
186 * call.c (build_method_call): Call build_type_variant and
187 build_reference_type in the right order.
188 * decl.c (record_builtin_type): Ditto.
190 Wed Jun 29 16:58:53 1994 Jason Merrill (jason@deneb.cygnus.com)
192 * call.c (build_method_call): Call build_type_variant and
193 build_reference_type in the right order.
194 * decl.c (record_builtin_type): Ditto.
196 Tue Jun 28 23:49:28 1994 Jason Merrill (jason@deneb.cygnus.com)
198 * typeck.c (build_binary_op): Use the types before default
199 conversions in the error message.
201 * *.c: Use c_build_type_variant instead of build_type_variant where
202 the type might be an array.
204 Sat Jun 25 11:50:54 1994 Jason Merrill (jason@deneb.cygnus.com)
206 * cvt.c (convert_to_reference): Try UDC's before doing the
207 reinterpret_cast thang, though.
209 Fri Jun 24 01:24:01 1994 Jason Merrill (jason@deneb.cygnus.com)
211 * typeck.c (c_expand_return): Don't USE the return value location
212 after we've expanded the jump.
214 * decl2.c (finish_file): Make sure DECL_SAVED_INSNS is not 0 before
215 trying to write out an inline.
217 * cvt.c (build_up_reference): Also do address adjustment when the
219 (convert_to_reference): Try UDCs only after built-in conversions.
220 (build_type_conversion_1): Don't play games with the argument to the
222 (build_type_conversion): #if 0 out code for binding to reference.
224 Thu Jun 23 00:22:28 1994 Jason Merrill (jason@deneb.cygnus.com)
226 * decl2.c (finish_file): Use TREE_SYMBOL_REFERENCED to decide
227 whether to emit inlines.
229 * decl.c (grokdeclarator): Set explicit_int for decls that just
230 specify, say, 'long'.
232 * init.c (do_friend): Do overload C functions (or call pushdecl,
235 Wed Jun 22 13:40:49 1994 Jason Merrill (jason@deneb.cygnus.com)
237 * cvt.c (build_up_reference): Don't call readonly_error.
238 (convert_to_reference): Propagate const and volatile from expr to
241 * tree.c (lvalue_p): Random CALL_EXPRs are not lvalues.
243 * cvt.c (build_up_reference): Break out WITH_CLEANUP_EXPR when
244 creating a temporary.
245 (convert_to_reference): Lose excessive and incorrect trickiness.
246 (cp_convert): Call build_cplus_new with with_cleanup_p set.
248 * typeck2.c (build_functional_cast): Ditto.
250 Tue Jun 21 17:38:38 1994 Jason Merrill (jason@deneb.cygnus.com)
252 * decl.c (grokdeclarator): signed, unsigned, long and short all
255 * decl.c (grokdeclarator): Allow "this is a type" syntax.
256 (grok_reference_init): Simplify and fix.
258 Sun Jun 19 17:08:48 1994 Jason Merrill (jason@deneb.cygnus.com)
260 * decl.c (grokdeclarator): pedwarn about a typedef that specifies no
263 Sat Jun 18 04:16:50 1994 Jason Merrill (jason@deneb.cygnus.com)
265 * decl.c (start_function): Move TREE_PUBLIC and DECL_EXTERNAL
266 tinkering to after call to pushdecl.
268 Fri Jun 17 14:48:28 1994 Jason Merrill (jason@deneb.cygnus.com)
270 * call.c (build_method_call): Handle destructors for non-aggregate
273 Thu Jun 16 16:48:05 1994 Jason Merrill (jason@deneb.cygnus.com)
275 * call.c (build_method_call): Make sure that the name given for the
276 destructor matches the constructor_name of the instance.
278 * pt.c (do_function_instantiation): A non-extern instantiation
279 overrides a later extern one.
280 (do_type_instantiation): Ditto.
282 Wed Jun 15 19:34:54 1994 Jason Merrill (jason@deneb.cygnus.com)
284 * init.c (expand_aggr_init): Use TYPE_MAIN_VARIANT to get the
285 unqualified array type.
287 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Tests whether NODE is a
288 CONSTRUCTOR with no elements.
290 * decl.c (various): Lose empty_init_node.
291 (finish_decl): Use EMPTY_CONSTRUCTOR_P, do the empty CONSTRUCTOR
292 thing depending on the value of DECL_COMMON instead of
293 flag_conserve_space, do the empty CONSTRUCTOR thing for types that
294 don't have constructors, don't treat a real empty CONSTRUCTOR
297 * typeck2.c (process_init_constructor): Don't treat empty_init_node
300 Wed Jun 15 19:05:25 1994 Mike Stump (mrs@cygnus.com)
302 * class.c (override_one_vtable): Don't forget to merge in an old
303 overrider when we wanted to reuse a vtable, but couldn't.
305 Wed Jun 15 15:03:16 1994 Jason Merrill (jason@deneb.cygnus.com)
307 * decl.c (start_decl): Put statics in common again.
309 * decl.c (grokdeclarator): Return NULL_TREE for an error rather than
310 setting the type to error_mark_node.
312 * typeck.c (build_modify_expr): Build up a COMPOUND_EXPR for enum
313 bitfield assignments.
315 Tue Jun 14 12:23:38 1994 Jason Merrill (jason@deneb.cygnus.com)
317 * decl.c (grok_op_properties): Const objects can be passed by value.
319 Mon Jun 13 03:10:59 1994 Jason Merrill (jason@deneb.cygnus.com)
321 * decl2.c (import_export_vtable): Force implicit instantiations to
322 be interface_only when -fno-implicit-templates.
324 * decl.c (duplicate_decls): Redeclaring a class template name is an
327 * pt.c (end_template_decl): Call GNU_xref_decl for class templates.
328 * xref.c (GNU_xref_decl): Support templates.
330 Sat Jun 11 17:09:05 1994 Jason Merrill (jason@deneb.cygnus.com)
332 * decl.c (grok_op_properties): Split out checking for whether this
333 function should suppress the default assignment operator.
334 * decl2.c (grok_function_init): Ditto.
335 (copy_assignment_arg_p): New function do do just that.
336 Now considers virtual assignment operators that take a base as an
337 argument to count as copy assignment operators.
339 * search.c (dfs_debug_mark): Lose checks for DWARF_DEBUG and
340 TREE_ASM_WRITTEN, as they are redundant.
342 * pt.c (end_template_decl): Don't try to set DECL_CLASS_CONTEXT on a
343 decl that has no LANG_SPECIFIC part.
344 (do_type_instantiation): Force the debugging information for this
347 * decl.c (start_decl): Clear up uses of various types of templates
348 (say sorry for static data members, rather than "invalid template").
349 (expand_static_init): Fix initialization of static data members of
352 Fri Jun 10 00:41:19 1994 Jason Merrill (jason@deneb.cygnus.com)
354 * decl.c (grokdeclarator): Set DECL_CONTEXT on static data members.
356 * g++.c (main): Use -xc++-cpp-output for .i files.
358 * pt.c (tsubst): Give meaningful error about declaring template for
359 a copy constructor which was not declared in the class template.
360 (do_type_instantiation): Explicit instantiation before the class
361 template is an error.
362 (instantiate_template): Don't die if tsubst returns error_mark_node.
364 Thu Jun 9 19:04:59 1994 Jason Merrill (jason@deneb.cygnus.com)
366 Don't synthesize the copy assignment operator if the one in a base
367 class is pure virtual.
368 * cp-tree.h (TYPE_HAS_ABSTRACT_ASSIGN_REF): New macro to indicate
369 whether the type has a pure virtual copy assignment operator.
370 * class.c (finish_base_struct): Don't generate the copy assignment
371 operator if a base class has a pure virtual one.
372 * decl.c (grok_op_properties): Add disabled code to set
373 TYPE_HAS_ABSTRACT_ASSIGN_REF with comment pointing to where it is
375 * decl2.c (grok_function_init): Set TYPE_HAS_ABSTRACT_ASSIGN_REF.
377 * decl2.c (import_export_vtable): Always treat template
378 instantiations as if write_virtuals >= 2, and treat implicit
379 instantiations as external if -fno-implicit-templates.
380 (finish_file): Output all pending inlines if
381 flag_keep_inline_functions.
383 Wed Jun 8 20:48:02 1994 Mike Stump (mrs@cygnus.com)
385 * tree.c (layout_vbasetypes): Align virtual base classes inside
386 complete objects, so that we don't core dump on machines such as
387 SPARCs when we access members that require larger than normal
388 alignments, such as a double. Also, we bump up the total alignment
389 on the complete type, as necessary.
391 Wed Jun 8 16:18:14 1994 Jason Merrill (jason@deneb.cygnus.com)
393 * gxxint.texi (Free Store): New section with code for examining
395 (Limitations of g++): Remove operator delete entry, since it is no
396 longer accurate. Fix access control entry.
398 * typeck.c (build_unary_op): Pedwarn about taking the address of or
399 incrementing a cast to non-reference type.
400 (build_modify_expr): Use convert instead of convert_force again.
402 * search.c (get_base_distance): Use IS_AGGR_TYPE_CODE to check for
403 class type, not == RECORD_TYPE.
405 * decl.c (grokdeclarator): Cope with grokfndecl returning NULL_TREE.
407 * typeck2.c (report_case_error): #if 0 out.
408 * lex.c (real_yylex): Lose RANGE.
411 Tue Jun 7 18:17:35 1994 Jason Merrill (jason@deneb.cygnus.com)
413 * parse.y (simple_stmt, case ranges): Use ELLIPSIS instead of RANGE.
415 Mon Jun 6 19:39:57 1994 Jason Merrill (jason@deneb.cygnus.com)
417 * typeck.c (build_c_cast): Don't shortcut conversions to the same
418 type. Don't replace consts with their values here, since that's now
421 * cvt.c (cp_convert): When converting to bool, take
422 integer_zero_node to false_node and all other INTEGER_CSTs to
424 (build_type_conversion): Don't complain about multiple conversions
425 to float if we're not really converting.
427 Fri Jun 3 02:10:56 1994 Jason Merrill (jason@deneb.cygnus.com)
429 Implement 'extern template class A<int>;' syntax for suppressing
430 specific implicit instantiations.
431 * cp-tree.h: Update prototypes for do_*_instantiation.
432 * pt.c (do_pending_expansions): Don't compile 'extern' explicit
434 (do_function_instantiation): Set DECL_EXTERNAL on 'extern' explicit
436 (do_type_instantiation): Ditto.
437 * parse.y (explicit_instantiation): Support 'extern template class
439 * decl.c (start_function): Don't modify the settings of TREE_PUBLIC
440 and DECL_EXTERNAL on explicit instantiations.
442 * cvt.c (cp_convert): Replace constants with their values before
444 (cp_convert): Consistently use 'e' instead of 'expr'.
446 Thu Jun 2 03:53:30 1994 Jason Merrill (jason@deneb.cygnus.com)
448 * typeck2.c (build_x_arrow): Resolve OFFSET_REFs first.
450 Wed Jun 1 18:57:35 1994 Jason Merrill (jason@deneb.cygnus.com)
452 * typeck2.c (digest_init): Handle initializing a pmf with an
454 * typeck.c (build_ptrmemfunc): Handle overloaded methods.
456 * decl.c (pushtag): Use build_decl to make TYPE_DECLs.
457 (xref_defn_tag): Ditto.
458 * pt.c (process_template_parm): Ditto.
459 (lookup_template_class): Ditto.
460 (push_template_decls): Ditto.
461 (instantiate_class_template): Ditto.
462 (create_nested_upt): Ditto.
463 * class.c (finish_struct): Don't try to set DECL_CLASS_CONTEXT on
466 * typeck.c (convert_arguments): Make sure type is not NULL before
467 checking its TREE_CODE.
469 Wed Jun 1 17:40:39 1994 Mike Stump (mrs@cygnus.com)
471 * class.c (get_derived_offset): New routine.
472 * class.c (finish_base_struct): Make sure we set BINFO_VTABLE and
473 BINFO_VIRTUALS when we choose a new base class to inherit from.
474 * class.c (modify_one_vtable): Use get_derived_offset to get the
475 offset to the most base class subobject that we derived this binfo
477 * class.c (finish_struct): Move code to calculate the
478 DECL_FIELD_BITPOS of the vfield up, as we need might need it for
479 new calls to get_derived_offset in modify_one_vtable.
481 Wed Jun 1 16:50:59 1994 Jason Merrill (jason@deneb.cygnus.com)
483 * init.c (build_member_call): Use build_pointer_type instead of
486 Wed Jun 1 11:11:15 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
488 * decl.c (grokdeclarator): Make sure we have a DNAME set before we
489 try to use it in an error.
491 Wed Jun 1 09:48:49 1994 Mike Stump (mrs@cygnus.com)
493 * typeck.c (convert_arguments, convert_for_initialization): Don't
494 strip NOP_EXPRs, when we are converting to a reference.
496 Wed Jun 1 01:11:38 1994 Jason Merrill (jason@deneb.cygnus.com)
498 * typeck.c (build_modify_expr): Don't dereference references when
501 * decl2.c (grokfield): Don't check for grokdeclarator returning
502 error_mark_node any more.
504 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
505 (start_method): Return void_type_node instead of error_mark_node.
507 * typeck.c (build_modify_expr): Resolve offset refs earlier.
509 Tue May 31 16:06:58 1994 Jason Merrill (jason@deneb.cygnus.com)
511 * call.c (build_method_call): Resolve OFFSET_REFs in the object.
513 * typeck.c (build_modify_expr): Dereference references before trying
516 * call.c (build_method_call): Don't confuse type conversion
517 operators with constructors.
518 * typeck2.c (build_functional_cast): Just call build_c_cast if there
519 was only one parameter.
520 * method.c (build_typename_overload): Don't set
521 IDENTIFIER_GLOBAL_VALUE on these identifiers.
522 * decl.c (grok_op_properties): Warn about defining a type conversion
523 operator that converts to a base class (or reference to it).
524 * cvt.c (cp_convert): Don't try to use a type conversion operator
525 when converting to a base class.
526 (build_type_conversion_1): Don't call constructor_name_full on an
528 * cp-tree.h (DERIVED_FROM_P): Should be self-explanatory.
530 * decl.c (start_decl): Don't complain that error_mark_node is an
532 (finish_decl): Check for type == error_mark_node.
534 Mon May 30 23:38:55 1994 Jason Merrill (jason@deneb.cygnus.com)
536 * decl.c (start_function): Set DECL_DEFER_OUTPUT on implicit
537 instantiations and inline members.
539 * spew.c (yylex): Set looking_for_template if the next token is a '<'.
541 * lex.h: Declare looking_for_template.
543 * decl.c (lookup_name_real): Use looking_for_template to arbitrate
544 between type and template interpretations of an identifier.
546 Sat May 28 04:07:40 1994 Jason Merrill (jason@deneb.cygnus.com)
548 * pt.c (instantiate_template): Zero out p if we found a
551 * decl.c (grokdeclarator): Elucidate warning.
552 (grokdeclarator): If pedantic AND -ansi, complain about long long.
554 Make explicit instantiation work reasonably. It is now appropriate
555 to deprecate the use of -fexternal-templates.
556 * pt.c (instantiate_template): Set DECL_TEMPLATE_SPECIALIZATION or
557 DECL_IMPLICIT_INSTANTIATION on fndecl as appropriate.
558 (end_template_instantiation): Reflect changes in USE_TEMPLATE
560 (do_pending_expansions): if (!flag_implicit_templates) DECIDE(0);
561 (do_function_instantiation): Don't set EXPLICIT_INST if
562 flag_external_templates is set. Do set TREE_PUBLIC and DECL_EXTERN
563 appropriately otherwise.
564 (do_type_instantiation): Set interface info for class. Set
565 TREE_PUBLIC and DECL_EXTERN for methods. Do none of this if
566 flag_external_templates is set.
567 * parse.y: Reflect changes in USE_TEMPLATE semantics.
568 * decl2.c: New flag flag_implicit_templates determines whether or
569 not implicit instantiations get emitted. This flag currently
570 defaults to true, and must be true for -fexternal-templates to work.
571 (finish_file): Consider flag_implement_inlines when
572 setting DECL_EXTERNAL. Consider flag_implicit_templates when
573 deciding whether or not to emit a static copy.
574 * decl.c (start_function): Set TREE_PUBLIC and DECL_EXTERNAL
575 properly for template instantiations.
576 (start_method): Set DECL_IMPLICIT_INSTANTIATION on methods of a
578 * cp-tree.h (CLASSTYPE_USE_TEMPLATE): Change semantics.
579 (DECL_USE_TEMPLATE): Parallel macro for FUNCTION and VAR_DECLs.
580 (various others): Accessor macros for the above.
582 Fri May 27 13:57:40 1994 Jason Merrill (jason@deneb.cygnus.com)
584 * typeck.c (build_binary_op_nodefault): Division by constant zero is
587 Fri May 27 13:50:15 1994 Mike Stump (mrs@cygnus.com)
589 * class.c (override_one_vtable): Don't modify things we don't own.
591 Fri May 27 01:42:58 1994 Jason Merrill (jason@deneb.cygnus.com)
593 * decl.c (finish_decl): Don't postpone processing the initializer of
594 a decl with DECL_EXTERNAL set, and do call rest_of_compilation for a
595 PUBLIC const at toplevel.
596 (grokdeclarator): pedwarn about initializing non-const or
597 non-integral statics in the class body.
599 * decl.c (pushtag): Don't try to set DECL_CLASS_CONTEXT on a
602 * call.c (convert_harshness): Dereference reference on rhs before
603 proceeding, properly grok passing const things to non-const
606 * typeck.c (build_unary_op): Soften error about taking the address
607 of main() to a pedwarn.
609 * lex.c (default_copy_constructor_body): Unambiguously specify base
610 classes (i.e. A((const class ::A&)_ctor_arg) ).
611 (default_assign_ref_body): Ditto.
613 Thu May 26 13:13:55 1994 Gerald Baumgartner (gb@mexican.cygnus.com)
615 * decl2.c (grokfield): Don't complain about local signature
616 method declaration without definition.
618 * call.c (convert_harshness): If `type' is a signature pointer
619 and `parmtype' is a pointer to a signature, just return 0. We
620 don't really convert in this case; it's a result of making the
621 `this' parameter of a signature method a signature pointer.
623 * call.c (build_method_call): Distinguish calling the default copy
624 constructor of a signature pointer/reference from a signature
625 member function call.
627 Thu May 26 12:56:25 1994 Jason Merrill (jason@deneb.cygnus.com)
629 * decl2.c (grokfield): Don't set TREE_PUBLIC on member function
632 * decl.c (duplicate_decls): A previous function declaration as
633 static overrides a subsequent non-static definition.
634 (grokdeclarator): Don't set TREE_PUBLIC on inline method
637 Wed May 25 14:36:38 1994 Jason Merrill (jason@deneb.cygnus.com)
639 * decl.c (grokdeclarator): Handle initialization of static const
641 (finish_decl): Ditto.
643 * decl2.c (grokfield): Allow initialization of static const members
646 * decl2.c (grokfield): Deal with grokdeclarator returning
649 * decl.c (grok_ctor_properties): Return 0 for A(A) constructor.
650 (grokfndecl): Check the return value of grok_ctor_properties.
651 (start_method): Ditto.
653 * parse.y (absdcl): Expand type_quals inline.
655 Tue May 24 19:10:32 1994 Jason Merrill (jason@deneb.cygnus.com)
657 * decl.c (pushtag): Use IS_AGGR_TYPE rather than checking for a
660 Tue May 24 18:09:16 1994 Per Bothner (bothner@kalessin.cygnus.com)
662 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
663 always use "__vt_%s".
664 * decl2.c (finish_vtable_vardecl): Don't consider abstract virtuals
665 when looking for a "sentinal" method (to decide on emitting vtables).
666 * decl2.c (finish_file): Scan all decls for thunks that need
668 * decl2.c (finish_vtable_vardecl): Don't bother calling emit_thunk.
669 * method.c (make_thunk): Use a more meaningful label. If there
670 exists a matching top-level THUNK_DECL re-use it; otherwise
671 create a new THUNK_DECL (and declare it).
672 * method.c (emit_thunk): Make thunk external/public depending
673 on the underlying method.
675 Tue May 24 00:22:04 1994 Jason Merrill (jason@deneb.cygnus.com)
677 * pt.c (tsubst): Use lookup_name_nonclass to find guiding decls, not
680 * call.c (build_overload_call_real): Don't immediately pick a
681 function which matches perfectly.
683 * decl.c (grokdeclarator): Use c_build_type_variant for arrays.
684 (grokdeclarator): Warn about, and throw away, cv-quals attached to a
685 reference (like 'int &const j').
687 * typeck.c (convert_arguments): Don't mess with i for methods.
688 * call.c (build_method_call): Pass the function decl to
691 * typeck.c (comp_ptr_ttypes_real): New function. Implements the
692 checking for which multi-level pointer conversions are allowed.
693 (comp_target_types): Call it.
694 (convert_for_assignment): Check const parity on the ultimate target
695 type, too. And make those warnings pedwarns.
697 Mon May 23 14:11:24 1994 Jason Merrill (jason@deneb.cygnus.com)
699 * error.c (dump_char): Use TARGET_* for character constants.
701 Mon May 23 13:03:03 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
703 * tree.c (debug_no_list_hash): Make static.
705 * decl.c (decls_match): Say the types don't match if newdecl ends up
706 with a null type, after we've checked if olddecl does.
707 (pushdecl): Check if the decls themselves match before looking for
708 an extern redeclared as static, to avoid inappropriate and incorrect
711 Fri May 20 14:04:34 1994 Jason Merrill (jason@deneb.cygnus.com)
713 * decl.c (grokdeclarator): Make warning about duplicate short, etc.
716 * typeck.c (build_c_cast): Casting to function or method type is an
719 * class.c (finish_struct): Make warning for anonymous class with no
722 * Makefile.in (stamp-parse): Expect a s/r conflict.
724 * typeck.c (build_modify_expr): pedwarn about using a non-lvalue
727 Thu May 19 12:08:48 1994 Jason Merrill (jason@deneb.cygnus.com)
729 * cvt.c (type_promotes_to): Make sure bool promotes to int rather
730 than unsigned on platforms where sizeof(char)==sizeof(int).
732 Wed May 18 14:27:06 1994 Jason Merrill (jason@deneb.cygnus.com)
734 * typeck.c (build_c_cast): Tack on a NOP_EXPR when casting to
736 (build_modify_expr): Don't strip NOP_EXPRs, and don't get tricky
737 and treat them as lvalues.
739 * decl.c (shadow_tag): Do complain about forward declarations of
740 enums and empty declarations.
741 * parse.y: Don't complain about forward declarations of enums and
744 * typeck.c (convert_for_assignment): Complain about changing
745 the signedness of a pointer's target type.
747 * parse.y (stmt): Move duplicated code for checking case values from
749 * decl2.c (check_cp_case_value): To here. And add a call to
750 constant_expression_warning.
752 * typeck.c (convert_for_assignment): Don't complain about assigning
753 a negative value to bool.
755 * decl.c (init_decl_processing): Make bool unsigned.
757 * class.c (finish_struct): Allow bool bitfields.
759 Wed May 18 12:35:27 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
761 * Make-lang.in (c++.install-man): Get g++.1 from $(srcdir)/cp.
763 Wed May 18 03:28:35 1994 Jason Merrill (jason@deneb.cygnus.com)
765 * cvt.c (build_type_conversion): Lose special handling of
768 * search.c (dfs_pushdecls): Improve shadowing warning.
770 Tue May 17 13:34:46 1994 Jason Merrill (jason@deneb.cygnus.com)
772 * init.c (build_delete): Throw away const and volatile on `this'.
774 * decl.c (finish_enum): Put the constants in TYPE_VALUES again,
775 rather than the enumerators.
776 (pushtag): s/cdecl/c_decl/g
778 Mon May 16 23:04:01 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
780 * cp/typeck.c (common_type): Attribute merging.
781 (comp_types): Utilise COMP_TYPE_ATTRIBUTES macro.
783 * cp/parse.y: Revamp attribute parsing.
785 Mon May 16 01:40:34 1994 Jason Merrill (jason@deneb.cygnus.com)
787 * decl.c (shadow_tag): Also check for inappropriate use of auto and
790 * method.c (build_overload_name): Clarify that the illegal case is a
791 pointer or reference to array of unknown bound.
793 * error.c (dump_type_prefix): Print references to arrays properly.
795 * typeck.c (various): Be more helpful in pointer
796 comparison diagnostics.
798 * tree.c (lvalue_p): MODIFY_EXPRs are lvalues again. Isn't this
801 * parse.y: Also catch an error after valid stmts.
803 * search.c (dfs_init_vbase_pointers): Don't abort because `this' is
806 * typeck.c (convert_for_initialization): If call to
807 convert_to_reference generated a diagnostic, print out the parm
808 number and function decl if any.
810 * errfn.c (cp_thing): Check atarg1 to determine whether or not we're
811 specifying a line, not atarg.
813 * tree.c (build_cplus_method_type): Always make `this' const.
815 * decl2.c (grokclassfn): If -fthis-is-variable and this function is
816 a constructor or destructor, make `this' non-const.
818 * typeck.c (build_modify_expr): Don't warn specially about
819 assignment to `this' here anymore, since it will be caught by the
822 * various: Disallow specific GNU extensions (variable-size arrays,
823 etc.) when flag_ansi is set, not necessarily when pedantic is set,
824 so that people can compile with -pedantic-errors for tighter const
825 checking and such without losing desirable extensions.
827 * typeck2.c (build_functional_cast): Call build_method_call with
829 (process_init_constructor): Only process FIELD_DECLs.
831 * decl.c (finish_decl): Also force static consts with no explicit
832 initializer that need constructing into the data segment.
834 * init.c (build_delete): Undo last patch, as it interferes with
837 Sat May 14 01:59:31 1994 Jason Merrill (jason@deneb.cygnus.com)
839 * call.c, class.h, cp-tree.h, cvt.c, decl2.c: Lose old overloading
842 * init.c (build_delete): pedwarn about using plain delete to delete
845 Fri May 13 16:45:07 1994 Jason Merrill (jason@deneb.cygnus.com)
847 * typeck.c (comp_target_types): Be more helpful in contravariance
848 warnings, and make them pedwarns.
850 * decl.c (grokdeclarator): Use decl_context to decide whether or not
851 this is an access declaration.
853 * class.c (finish_struct_bits): Set TYPE_HAS_INT_CONVERSION if it
854 has a conversion to enum or bool, too.
856 Fri May 13 16:31:27 1994 Mike Stump (mrs@cygnus.com)
858 * method.c (emit_thunk): Make declaration for
859 current_call_is_indirect local (needed for hppa).
861 Fri May 13 16:16:37 1994 Jason Merrill (jason@deneb.cygnus.com)
863 * pt.c (uses_template_parms): Grok BOOLEAN_TYPE.
866 Fri May 13 16:23:32 1994 Mike Stump (mrs@cygnus.com)
868 * pt.c (tsubst): If there is already a function for this expansion,
870 * pt.c (instantiate_template): Ditto.
872 Fri May 13 10:30:42 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
874 * parse.y (implicitly_scoped_stmt, simple_stmt case): Use
875 kept_level_p for MARK_ENDS argument to expand_end_bindings, to avoid
876 generating debug info for unemitted symbols on some systems.
878 * cp-tree.h (build_static_cast, build_reinterpret_cast,
879 build_const_cast): Add declarations.
881 Fri May 13 09:50:31 1994 Mike Stump (mrs@cygnus.com)
883 * search.c (expand_indirect_vtbls_init): Fix breakage from Apr 27
884 fix. We now try get_binfo, and if that doesn't find what we want,
885 we go back to the old method, which still sometimes fails.
887 Fri May 13 01:43:18 1994 Jason Merrill (jason@deneb.cygnus.com)
889 * parse.y (initdcl): Call cplus_decl_attributes on the right
891 * decl2.c (cplus_decl_attributes): Don't call decl_attributes for
894 * typeck.c (build_binary_op_nodefault): Change result_type for
895 comparison ops to bool.
896 (build_binary_op): Convert args of && and || to bool.
897 * cvt.c (build_default_binary_type_conversion): Convert args of &&
899 (build_default_unary_type_conversion): Convert arg of ! to bool.
900 (type_promotes_to): bool promotes to int.
902 Fri May 13 01:43:18 1994 Mike Stump (mrs@cygnus.com)
904 Implement the new builtin `bool' type.
905 * typeck.c (build_binary_op_nodefault): Convert args of && and || to
907 (build_unary_op): Convert arg of ! to bool.
908 * parse.y: Know true and false. Use bool_truthvalue_conversion.
909 * method.c (build_overload_value): Know bool.
910 (build_overload_name): Ditto.
911 * lex.c (init_lex): Set up RID_BOOL.
912 * gxx.gperf: Add bool, true, false.
913 * error.c (*): Know bool.
914 * decl.c (init_decl_processing): Set up bool, true, false.
915 * cvt.c (cp_convert): Handle conversion to bool.
916 (build_type_conversion): Ditto.
917 * *.c: Accept bool where integers and enums are accepted (use
918 INTEGRAL_CODE_P macro).
920 Thu May 12 19:13:54 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk)
922 * g++.c: Use #ifdef for __MSDOS__, not #if.
924 Thu May 12 18:05:18 1994 Mike Stump (mrs@cygnus.com)
926 * decl2.c (lang_f_options): Handle -fshort-temps. -fshort-temps
927 gives old behavior , and destroys temporaries earlier. Default
928 behavior now conforms to the ANSI working paper.
930 Thu May 12 14:45:35 1994 Jason Merrill (jason@deneb.cygnus.com)
932 * typeck.c (build_modify_expr): Understand MODIFY_EXPR as an lvalue.
933 Use convert_force to convert the result of a recursive call when we
934 are dealing with a NOP_EXPR. Don't automatically wrap MODIFY_EXPRs
935 in COMPOUND_EXPRs any more.
936 (various): Lose pedantic_lvalue_warning.
937 (unary_complex_lvalue): Understand MODIFY_EXPR.
939 * cvt.c (convert_to_reference): Allow DECL to be error_mark_node if
940 we don't know what we're initializing.
942 Wed May 11 01:59:36 1994 Jason Merrill (jason@deneb.cygnus.com)
944 * cvt.c (convert_to_reference): Modify to use convtype parameter.
945 Only create temporaries when initializing a reference, not when
947 (cp_convert): New main function.
948 (convert): Call cp_convert.
949 * cvt.c, decl.c, typeck.c: Fix calls to convert_to_reference.
950 * cp-tree.h (CONV_*): New constants used by conversion code for
951 selecting conversions to perform.
953 * tree.c (lvalue_p): MODIFY_EXPRs are no longer lvalues.
955 * typeck.c (build_{static,reinterpret,const_cast): Stubs that just
957 * parse.y: Add {static,reinterpret,const}_cast.
960 * typeck.c (common_type): Allow methods with basetypes of different
962 (comptypes): Deal with UPTs.
963 (build_modify_expr): Wrap all MODIFY_EXPRs in a COMPOUND_EXPR.
965 * pt.c (end_template_decl): Check for multiple definitions of member
968 * call.c (build_method_call): Complain about calling an abstract
969 virtual from a constructor.
971 * typeck.c (pointer_int_sum): Check for the integer operand being 0
972 after checking the validity of the pointer operand.
974 * typeck2.c (digest_init): Pedwarn about string initializer being
977 Tue May 10 12:10:28 1994 Jason Merrill (jason@deneb.cygnus.com)
979 * decl.c (push_overloaded_decl): Only throw away a builtin if the
980 decl in question is the artificial one.
982 * parse.y (simple_stmt, switch): Use implicitly_scoped_stmt because
983 expand_{start,end}_case cannot happen in the middle of a block.
985 * cvt.c (build_type_conversion_1): Use convert again.
987 Tue May 10 11:52:04 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
989 * typeck2.c (digest_init): Make sure we check for signed and
990 unsigned chars as well when warning about string initializers.
992 * init.c (emit_base_init): Check if there's a DECL_NAME on the
993 member before trying to do an initialization for it.
995 Tue May 10 11:34:37 1994 Mike Stump (mrs@cygnus.com)
997 * except.c: Don't do anything useful when cross compiling.
999 Tue May 10 03:04:13 1994 Jason Merrill (jason@deneb.cygnus.com)
1001 * decl.c (duplicate_decls): Fix up handling of builtins yet again.
1002 (push_overloaded_decl): Ditto.
1004 * cvt.c (convert): Don't look for void type conversion.
1006 Mon May 9 18:05:41 1994 Jason Merrill (jason@deneb.cygnus.com)
1008 * init.c (do_friend): Only do a pushdecl for friends, not
1011 Mon May 9 13:36:34 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
1013 * decl.c (lookup_name_current_level): Put empty statement after
1014 the label OUT to make the code valid C.
1016 Mon May 9 12:20:57 1994 Jason Merrill (jason@deneb.cygnus.com)
1018 * typeck.c (build_binary_op_nodefault): Only complain about
1019 comparing void * and a function pointer if void * is smaller.
1021 Sun May 8 01:29:13 1994 Jason Merrill (jason@deneb.cygnus.com)
1023 * decl.c (lookup_name_current_level): Move through temporary binding
1026 * parse.y (already_scoped_stmt): Revive.
1027 (simple_stmt): Use it again.
1029 * decl.c (poplevel): Always call poplevel recursively if we're
1030 dealing with a temporary binding level.
1032 Sat May 7 10:52:28 1994 Mike Stump (mrs@cygnus.com)
1034 * decl.c (finish_decl): Make sure we run cleanups for initial values
1035 of decls. Cures memory leak.
1036 * decl.c (expand_static_init): Ditto for static variables.
1037 * decl2.c (finish_file): Ditto for globals.
1039 Sat May 7 03:57:44 1994 Jason Merrill (jason@deneb.cygnus.com)
1041 * typeck.c (commonparms): Don't complain about redefining default
1044 * decl.c (duplicate_decls): Don't complain twice about conflicting
1046 (decls_match): Don't look at default args.
1047 (redeclaration_error_message): Complain about redefining default
1050 * call.c (build_overload_call_real): Also deal with guiding
1051 declarations coming BEFORE the template decl.
1053 * pt.c (unify): Allow different parms to have different
1055 (unify): Allow trivial conversions on non-template parms.
1057 Fri May 6 03:53:23 1994 Jason Merrill (jason@deneb.cygnus.com)
1059 * pt.c (tsubst): Support OFFSET_TYPEs.
1062 * decl2.c (finish_decl_parsing): Call push_nested_class with a type.
1064 * init.c (build_offset_ref): Fix error message.
1065 * search.c (lookup_field): Ditto.
1067 * call.c (build_scoped_method_call): Pass binfo to
1069 * typeck.c (build_object_ref): Ditto.
1071 * typeck2.c (binfo_or_else): Don't return a _TYPE.
1073 * class.c (finish_struct): Don't complain about re-use of inherited
1074 names or shadowing of type decls.
1075 * decl.c (pushdecl_class_level): Ditto.
1077 * decl.c (finish_enum): Set the type of all the enums.
1079 * class.c (finish_struct): Don't get confused by access decls.
1081 * cp-tree.h (TYPE_MAIN_DECL): New macro to get the _DECL for a
1082 _TYPE. You can stop using TYPE_NAME for that now.
1084 * parse.y: Lose doing_explicit (check $0 instead).
1085 * gxx.gperf: 'template' now has a RID.
1086 * lex.h (rid): Ditto.
1087 * lex.c (init_lex): Set up the RID for 'template'.
1089 * parse.y (type_specifier_seq): typed_typespecs or
1090 nonempty_type_quals. Use it.
1091 (handler_args): Fix bogus syntax.
1092 (raise_identifier{,s}, optional_identifier): Lose.
1093 * except.c (expand_start_catch_block): Use grokdeclarator to parse
1095 (init_exception_processing): The second argument to
1096 __throw_type_match is ptr_type_node.
1098 Fri May 6 07:18:54 1994 Chip Salzenberg (chip@fin)
1100 [ change propagated from c-decl.c of snapshot 940429 ]
1101 * cp/decl.c (finish_decl): Setting asmspec_tree should not
1102 zero out the old RTL.
1104 Fri May 6 01:25:38 1994 Mike Stump (mrs@cygnus.com)
1106 Add alpha exception handling support to the compiler.
1107 Quick and dirty backend in except.c.
1109 * cp/*: Remove most remnants of old exception handling support.
1110 * decl.c (finish_function): Call expand_exception_blocks to put
1111 the exception hanlding blocks at the end of the function.
1112 * dec.c (hack_incomplete_structures): Make sure expand_decl_cleanup
1113 comes after expand_decl_init.
1114 * except.c: Reimplementation.
1115 * expr.c (cplus_expand_expr): Handle THROW_EXPRs.
1116 * lex.c (init_lex): Always have catch, try and throw be reserved
1117 words, so that we may always parse exception handling.
1118 * parse.y: Cleanup to support new interface into exception handling.
1119 * tree.def (THROW_EXPR): Add.
1121 Thu May 5 17:35:37 1994 Jason Merrill (jason@deneb.cygnus.com)
1123 * parse.y (simple_stmt, for loops): Use implicitly_scoped_stmt.
1124 (various): Lose .kindof_pushlevel and partially_scoped_stmt.
1126 Thu May 5 16:17:27 1994 Kung Hsu (kung@mexican.cygnus.com)
1128 * parse.y (already_scoped_stmt): move expand_end_binding() to
1129 fix the unmatched LBB/LBE in stabs.
1131 Thu May 5 14:36:17 1994 Jason Merrill (jason@deneb.cygnus.com)
1133 * decl.c (set_nested_typename): Set TREE_MANGLED on the new
1135 (pushdecl): Check TREE_MANGLED.
1137 * cp-tree.h (TREE_MANGLED): This identifier is a
1138 DECL_NESTED_TYPENAME (named to allow for future use to denote
1139 mangled function names as well).
1141 Implement inconsistency checking specified in [class.scope0].
1142 * decl.c (lookup_name_real): Don't set ICV here after all.
1143 (finish_enum): Also set the type of the enumerators themselves.
1144 (build_enumerator): Put the CONST_DECL in the list instead of its
1146 (pushdecl_class_level): Check inconsistent use of a name in the
1148 * class.c (finish_struct): Check inconsistent use of a name in the
1149 class body. Don't set DECL_CONTEXT on types here anymore.
1150 * parse.y (qualified_type_name): Note that the identifier has now
1151 been used (as a type) in the class body.
1152 * lex.c (do_identifier): Note that the identifier has now been used
1153 (as a constant) in the class body.
1154 * error.c (dump_decl): Print type and enum decls better.
1156 Thu May 5 09:35:35 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
1158 * typeck.c (build_modify_expr): Warn about assignment to `this'.
1160 Wed May 4 15:55:49 1994 Jason Merrill (jason@deneb.cygnus.com)
1162 * init.c (build_delete): Use the global operator delete when
1165 * decl.c (lookup_name_real): If we find the type we're looking in a
1166 base class while defining a class, set IDENTIFIER_CLASS_VALUE for
1169 * class.c (finish_struct): Remove a couple of dependencies on
1172 * decl.c (pushtag): Classes do nest in extern "C" blocks.
1173 (pushdecl): Only set DECL_NESTED_TYPENAME on the canonical one for
1175 (pushtag): Remove another dependency on the language linkage.
1177 * lex.c (cons_up_default_function): Don't set DECL_CLASS_CONTEXT to
1178 a const-qualified type.
1180 * decl.c (push_overloaded_decl): Throw away built-in decls here.
1181 (duplicate_decls): Instead of here.
1183 Wed May 4 15:27:40 1994 Per Bothner (bothner@kalessin.cygnus.com)
1185 * typeck.c (get_member_function_from_ptrfunc): Do The Right
1186 Thing (I hope) if we're using thunks.
1188 Wed May 4 13:52:38 1994 Jason Merrill (jason@deneb.cygnus.com)
1190 * parse.y (specialization): aggr template_type_name ';'.
1191 (named_class_head_sans_basetype): Use it.
1192 (explicit_instantiation): Ditto.
1195 * cvt.c (build_type_conversion_1): Use convert_for_initialization,
1196 rather than convert, to do conversions after the UDC.
1198 * cp-tree.h (SHARED_MEMBER_P): This member is shared between all
1199 instances of the class.
1201 * search.c (lookup_field): If the entity found by two routes is the
1202 same, it's not ambiguous.
1204 Wed May 4 12:10:00 1994 Per Bothner (bothner@kalessin.cygnus.com)
1206 * decl.c (lookup_name_real): Check for a NULL TREE_VALUE,
1207 to prevent the compiler from crashing ...
1209 Wed May 4 11:19:45 1994 Jason Merrill (jason@deneb.cygnus.com)
1211 * call.c (build_method_call): If we don't have an object, check
1212 basetype_path to figure out where to look up the function.
1214 * typeck.c (convert_for_initialization): Pass TYPE_BINFO (type) to
1215 build_method_call in case exp is NULL_TREE.
1217 Tue May 3 16:02:53 1994 Per Bothner (bothner@kalessin.cygnus.com)
1219 Give a vtable entries a unique named type, for the sake of gdb.
1220 * class.c (build_vtable_entry): The addres of a thunk now has
1221 type vtable_entry_type, not ptr_type_node.
1222 * method.c (make_thunk): Fix type of THUNK_DECL.
1223 * class.c (add_virtual_function, override_one_vtable): Use
1224 vfunc_ptr_type_node, instead of ptr_type_node.
1225 * cp-tree.h (vfunc_ptr_type_node): New macro.
1226 * decl.c (init_decl_processing): Make vtable_entry_type
1227 be a unique type of pointer to a unique function type.
1229 Tue May 3 09:20:44 1994 Jason Merrill (jason@deneb.cygnus.com)
1231 * parse.y (do_explicit): Sets doing_explicit to 1.
1232 (explicit_instantiation): Use do_explicit rather than TEMPLATE
1233 directly, add "do_explicit error" rule.
1234 (datadef): Set doing_explicit to 0 after an explicit instantiation.
1235 (tmpl.2): Don't instantiate if we see a ';' unless we're doing an
1236 explicit instantiation.
1237 (named_class_head_sans_basetype): Remove aggr template_type_name
1240 Mon May 2 23:17:21 1994 Jason Merrill (jason@deneb.cygnus.com)
1242 * search.c (lookup_nested_tag): Lose.
1244 * decl2.c (grokfield): Set DECL_CONTEXT on TYPE_DECLs.
1245 (lookup_name_nonclass): Lose.
1247 * decl.c (poplevel_class): Add force parameter.
1248 (lookup_name_real): Fix handling of explicit scoping which specifies
1249 a class currently being defined. Add 'nonclass' argument.
1250 (lookup_name, lookup_name_nonclass): Shells for lookup_name_real.
1252 * class.c (finish_struct): Don't unset IDENTIFIER_CLASS_VALUEs here.
1253 (popclass): Force clearing of IDENTIFIER_CLASS_VALUEs if we're being
1254 called from finish_struct.
1256 Mon May 2 19:06:21 1994 Per Bothner (bothner@kalessin.cygnus.com)
1258 * decl.c (init_decl_processing), cp-tree.h: Removed memptr_type.
1259 (It seeems redundant, given build_ptrmemfunc_type.)
1260 * typeck.c (get_member_function_from_ptrfunc), gc.c (build_headof,
1261 build_classof): Use vtable_entry_type instead of memptr_type.
1262 * method.c (emit_thunk): Call poplevel with functionbody==0
1263 to prevent DECL_INITIAL being set to a BLOCK.
1265 Mon May 2 15:02:11 1994 Jason Merrill (jason@deneb.cygnus.com)
1267 * parse.y (named_class_head_sans_basetype): Add "aggr
1268 template_type_name ';'" rule for forward declaration of
1271 Mon May 2 15:02:11 1994 Jason Merrill (jason@deneb.cygnus.com)
1273 * class.c (instantiate_type): Deal with pmf's.
1275 * Make-lang.in (cc1plus): Don't depend on OBJS or BC_OBJS, since
1278 * Makefile.in (../cc1plus): Depend on OBJDEPS.
1279 (OBJDEPS): Dependency version of OBJS.
1281 Mon May 2 12:51:31 1994 Kung Hsu (kung@mexican.cygnus.com)
1283 * search.c (dfs_debug_mark): unmark TYPE_DECL_SUPPRESS_DEBUG, not
1286 Fri Apr 29 12:29:56 1994 Jason Merrill (jason@deneb.cygnus.com)
1288 * class.c (finish_struct): Clear out memory of local tags. And
1291 * decl2.c (grokclassfn): Don't set DECL_CONTEXT to a cv-qualified
1293 * search.c (get_matching_virtual): Be more helpful in error message.
1295 * *: Use DECL_ARTIFICIAL (renamed from DECL_SYNTHESIZED).
1297 * lex.c (default_assign_ref_body): Expect TYPE_NESTED_NAME to work.
1298 (default_copy_constructor_body): Ditto.
1300 * class.c (finish_struct): Don't gratuitously create multiple decls
1303 Thu Apr 28 23:39:38 1994 Jason Merrill (jason@deneb.cygnus.com)
1305 Avoid clobbering the arg types of other functions when reverting
1306 static member functions.
1307 * decl.c (revert_static_member_fn): Rearrange arguments, don't
1308 require values for 'fn' and 'argtypes', add warning to comment
1310 (decls_match): Rearrange arguments in call to rsmf.
1311 (grok_op_properties): Don't pass values for fn and argtypes.
1312 * pt.c (instantiate_template): Don't pass values for fn and argtypes.
1314 Thu Apr 28 16:29:11 1994 Doug Evans (dje@canuck.cygnus.com)
1316 * Make-lang.in (cc1plus): Depend on stamp-objlist.
1317 * Makefile.in (BC_OBJS): Delete.
1318 (OBJS): Cat ../stamp-objlist to get language independent files.
1319 Include ../c-common.o.
1320 (../cc1plus): Delete reference to BC_OBJS.
1322 Thu Apr 28 02:12:08 1994 Jason Merrill (jason@deneb.cygnus.com)
1324 * search.c (compute_access): No really, deal with static members
1325 properly. Would I lie to you?
1327 Implement lexical hiding of function declarations.
1328 * pt.c (tsubst): Use lookup_name to look for function decls to guide
1330 * method.c (build_opfncall): Use lookup_name_nonclass to look for
1331 non-member functions.
1332 * init.c (do_friend): Use lookup_name_nonclass to look for
1334 * error.c (ident_fndecl): Use lookup_name to look for functions.
1335 * decl2.c (lookup_name_nonclass): New function, skips over
1337 * decl.c (struct binding_level): Lose overloads_shadowed field.
1338 (poplevel): Don't deal with overloads_shadowed.
1339 (push_overloaded_decl): Do lexical hiding for functions.
1340 * class.c (instantiate_type): Don't check non-members if we have
1341 members with the same name.
1342 * call.c (build_method_call): Use lookup_name_nonclass instead of
1343 IDENTIFIER_GLOBAL_VALUE to check for non-member functions.
1344 (build_overload_call_real): Ditto.
1346 * decl.c (duplicate_decls): Check for ambiguous overloads here.
1347 (push_overloaded_decl): Instead of here.
1349 * decl.c (pushdecl): Back out Chip's last change.
1351 * decl.c (grok_op_properties): operators cannot be static members.
1353 * cp-tree.h (DECL_SYNTHESIZED): DECL_SOURCE_LINE == 0
1354 (SET_DECL_SYNTHESIZED): DECL_SOURCE_LINE = 0
1355 * lex.c (cons_up_default_function): Use SET_DECL_SYNTHESIZED.
1357 * method.c (do_inline_function_hair): Don't put friends of local
1358 classes into global scope, either.
1360 * typeck2.c (build_functional_cast): Don't look for a function call
1363 Thu Apr 28 15:19:46 1994 Mike Stump (mrs@cygnus.com)
1365 * cp-tree.h: disable use of backend EH.
1367 Wed Apr 27 21:01:24 1994 Doug Evans (dje@canuck.cygnus.com)
1369 * Make-lang.in (c++.distdir): mkdir tmp/cp first.
1370 * Makefile.in (INCLUDES): Move definition to same place as
1373 (OLDAR_FLAGS): Delete.
1378 (SUBDIR_USE_ALLOCA): Don't use ALLOCA if compiling with gcc.
1380 Wed Apr 27 19:10:04 1994 Kung Hsu (kung@mexican.cygnus.com)
1382 * decl.c (xref_tag): not to use strstr(), it's not available on
1385 Wed Apr 27 18:10:12 1994 Jason Merrill (jason@deneb.cygnus.com)
1387 * class.c (finish_struct): Resolve yet another class/pmf confusion.
1389 * call.c (build_overload_call_real): Don't take the single-function
1390 shortcut if we're dealing with an overloaded operator.
1392 Wed Apr 27 17:35:37 1994 Mike Stump (mrs@cygnus.com)
1394 * search.c (get_base_distance): Search the virtual base class
1395 binfos, incase someone wants to convert to a real virtual base
1397 * search.c (expand_indirect_vtbls_init): Use convert_pointer_to_real
1398 instead of convert_pointer_to, as it now will work.
1400 Wed Apr 27 15:36:49 1994 Jason Merrill (jason@deneb.cygnus.com)
1402 * cvt.c (convert_to_reference): Don't complain about casting away
1405 * typeck.c (build_unary_op): References are too lvalues.
1407 Wed Apr 27 13:58:05 1994 Mike Stump (mrs@cygnus.com)
1409 * class.c (override_one_vtable): We have to prepare_fresh_vtable
1410 before we modify it, not after, also, we cannot reuse an old vtable,
1411 once we commit to a new vtable. Implement ambiguous overrides in
1412 virtual bases as abstract. Hack until we make the class
1415 Wed Apr 27 01:17:08 1994 Jason Merrill (jason@deneb.cygnus.com)
1417 * parse.y (unary_expr): Expand new_placement[opt] and
1418 new_initializer[opt] inline.
1420 * search.c (lookup_fnfields): Don't throw away the inheritance
1421 information here, either.
1422 (compute_access): Handle static members properly.
1424 * init.c (build_member_call): Always set basetype_path, and pass it
1427 * search.c (lookup_field): Deal properly with the case where
1428 xbasetype is a chain of binfos; don't throw away the inheritance
1430 (compute_access): protected_ok always starts out at 0.
1432 * init.c (resolve_offset_ref): Don't cast `this' to the base type
1433 until we've got our basetype_path.
1435 * cp-tree.h (IS_OVERLOAD_TYPE): aggregate or enum.
1437 * cvt.c (build_up_reference): Use build_pointer_type rather than
1440 * call.c (convert_harshness_ansi): Call type_promotes_to for reals
1443 * cvt.c (type_promotes_to): Retain const and volatile, add
1444 float->double promotion.
1446 * decl.c (grokdeclarator): Don't bash references to arrays into
1447 references to pointers in function parms. Use type_promotes_to.
1449 Tue Apr 26 23:44:36 1994 Mike Stump (mrs@cygnus.com)
1451 Finish off Apr 19th work.
1453 * class.c (finish_struct_bits): Rename has_abstract_virtuals to
1454 might_have_abstract_virtuals.
1455 * class.c (strictly_overrides, override_one_vtable,
1456 merge_overrides): New routines to handle virtual base overrides.
1457 * class.c (finish_struct): Call merge_overrides to handle overrides
1460 Tue Apr 26 12:45:53 1994 Jason Merrill (jason@deneb.cygnus.com)
1462 * typeck.c (build_function_call): Call build_function_call_real with
1465 * *: Don't deal with TYPE_EXPRs.
1467 * tree.c (lvalue_p): If the type of the expression is a reference,
1470 * cvt.c (convert_to_reference): Complain about passing const
1471 lvalues to non-const references.
1472 (convert_from_reference): Don't arbitrarily throw away const and
1473 volatile on the target type.
1475 * parse.y: Simplify and fix rules for `new'.
1477 * decl.c (grok_op_properties): operator void is illegal.
1479 Mon Apr 25 02:36:28 1994 Jason Merrill (jason@deneb.cygnus.com)
1481 * parse.y (components): Anonymous bitfields can still have declspecs.
1483 * decl.c (pushdecl): Postpone handling of function templates like we
1486 * search.c (expand_indirect_vtbls_init): Fix infinite loop when
1487 convert_pointer_to fails.
1489 * call.c (compute_conversion_costs_ansi): A user-defined conversion
1490 by itself is better than that UDC followed by standard conversions.
1491 Don't treat integers and reals specially.
1493 * cp-tree.h: Declare flag_ansi.
1495 * typeck.c (c_expand_return): pedwarn on return in void function
1496 even if the expression is of type void.
1497 (build_c_cast): Don't do as much checking for casts to void.
1498 (build_modify_expr): pedwarn about array assignment if this code
1499 wasn't generated by the compiler.
1501 * tree.c (lvalue_p): A comma expression is an lvalue if its second
1504 * typeck.c (default_conversion): Move code for promoting enums and
1506 * cvt.c (type_promotes_to): To here.
1507 * call.c (convert_harshness_ansi): Use type_promotes_to. Also fix
1508 promotion semantics for reals.
1510 Sun Apr 24 16:52:51 1994 Doug Evans (dje@canuck.cygnus.com)
1512 * Make-lang.in (c++.install-common): Check for g++-cross.
1513 * Makefile.in: Remove Cygnus cruft.
1514 (config.status): Delete.
1516 (TREE_H): Use complete pathname, some native makes have minimal
1518 (*.o): Use complete pathname to headers in parent dir.
1519 (doc, info, dvi): Delete.
1521 Sun Apr 24 16:52:51 1994 Doug Evans (dje@canuck.cygnus.com)
1523 * Make-lang.in (c++.install-common): Check for g++-cross.
1524 * Makefile.in: Remove Cygnus cruft.
1525 (config.status): Delete.
1527 (TREE_H): Use complete pathname, some native makes have minimal
1529 (*.o): Use complete pathname to headers in parent dir.
1530 (doc, info, dvi): Delete.
1532 Sun Apr 24 00:47:49 1994 Jason Merrill (jason@deneb.cygnus.com)
1534 * decl.c (pushdecl): Avoid redundant warning on redeclaring function
1535 with different return type.
1536 (decls_match): Compare return types strictly.
1538 Fri Apr 22 12:55:42 1994 Jason Merrill (jason@deneb.cygnus.com)
1540 * cvt.c (build_type_conversion): Do try to convert through other
1541 pointers. This will fail if the class defines multiple pointer
1544 * error.c (dump_type_prefix): Print out pointers to arrays properly.
1545 (dump_type_suffix): Ditto. (was 'int *[]', now 'int (*)[]')
1547 * typeck.c (build_unary_op): Disallow ++/-- on pointers to
1550 * decl.c (duplicate_decls): Check mismatched TREE_CODES after
1551 checking for shadowing a builtin. If we're redeclaring a builtin
1552 function, bash the old decl to avoid an ambiguous overload.
1554 * cvt.c (convert_to_reference): Don't force arrays to decay here.
1556 * tree.c (lvalue_p): A MODIFY_EXPR is an lvalue.
1558 * decl.c (duplicate_decls): Don't assume that the decls will have
1561 Mon Apr 18 11:35:32 1994 Chip Salzenberg (chip@fin.uucp)
1563 [ cp/* changes propagated from c-* changes in 940318 snapshot ]
1564 * c-decl.c (pushdecl): Warn if type mismatch with another external decl
1567 Fri Apr 22 06:38:56 1994 Chip Salzenberg (chip@fin.uucp)
1569 * cp/typeck2.c (signature_error): Use cp_error for "%T".
1571 Mon Apr 18 11:59:59 1994 Chip Salzenberg (chip@fin.uucp)
1573 [ cp/* changes propagated from c-* changes in 940415 snapshot ]
1574 * cp/decl.c (duplicate_decls, pushdecl, builtin_function):
1575 Use DECL_FUNCTION_CODE instead of DECL_SET_FUNCTION_CODE.
1577 Mon Apr 18 11:55:18 1994 Chip Salzenberg (chip@fin.uucp)
1579 [ cp/* changes propagated from c-* changes in 940409 snapshot ]
1580 * cp/decl.c (duplicate_decls): Put new type in same obstack as
1581 old ones, or permanent if old ones in different obstacks.
1583 Mon Apr 18 11:48:49 1994 Chip Salzenberg (chip@fin.uucp)
1585 [ cp/* changes propagated from c-* changes in 940401 snapshot ]
1586 * cp/parse.y (attrib): Handle string args as expressions,
1587 merging the two rules. `mode' attribute now takes a string arg.
1588 Delete the rule for an identifier as arg.
1590 Mon Apr 18 11:24:00 1994 Chip Salzenberg (chip@fin.uucp)
1592 [ cp/* changes propagated from c-* changes in 940312 snapshot ]
1593 * cp/typeck.c (pointer_int_sum): Multiplication should be done signed.
1594 (pointer_diff): Likewise the division.
1596 Sun Mar 6 19:43:39 1994 Chip Salzenberg (chip@fin.uucp)
1598 [ cp/* changes propagated from c-* changes in 940304 snapshot ]
1599 * cp/decl.c (finish_decl): Issue warning for large objects,
1602 Sat Feb 19 22:20:32 1994 Chip Salzenberg (chip@fin.uucp)
1604 [ cp/* changes propagated from c-* changes in 940218 snapshot ]
1605 * cp/parse.y (attrib): Handle attribute ((section ("string"))).
1606 * cp/decl.c (duplicate_decls): Merge section name into new decl.
1608 Tue Feb 8 09:49:17 1994 Chip Salzenberg (chip@fin.uucp)
1610 [ cp/* changes propagated from c-* changes in 940206 snapshot ]
1611 * cp/typeck.c (signed_or_unsigned_type): Check for any
1612 INTEGRAL_TYPE_P not just INTEGER_TYPE.
1614 Mon Dec 6 13:35:31 1993 Norbert Kiesel (norbert@i3.INformatik.rwth-aachen.DE)
1616 * cp/decl.c (finish_enum): Start from 0 when determining precision
1619 Fri Dec 3 17:07:58 1993 Ralph Campbell (ralphc@pyramid.COM)
1621 * cp/parse.y (unary_expr): Look at $1 for tree_code rather than
1624 Wed Nov 17 19:22:09 1993 Chip Salzenberg (chip@fin.uucp)
1626 * cp/typeck.c (build_binary_op_nodefault): Propagate code
1627 from C front-end to optimize unsigned short division.
1628 (build_conditional_expr): Fix bug in "1 ? 42 : (void *) 8".
1630 Wed Nov 17 19:17:18 1993 Chip Salzenberg (chip@fin.uucp)
1632 * cp/call.c (convert_harshness_ansi): Given an (e.g.) char
1633 constant, prefer 'const char &' to 'int'.
1635 Wed Feb 3 13:11:48 1993 Chip Salzenberg (chip@fin.uucp)
1637 * cp/class.c (finish_struct_methods): Handle multiple
1638 constructors in fn_fields list.
1640 Fri Apr 22 12:48:10 1994 Kung Hsu (kung@mexican.cygnus.com)
1642 * class.c (finish_struct): use TYPE_DECL_SUPPRESS_DEBUG to flag
1643 types not to be dumped in stabs, like types in #pragma interface.
1644 * decl.c (init_decl_processing): use TYPE_DECL_SUPPRESS_DEBUG to
1647 Fri Apr 22 03:27:26 1994 Doug Evans (dje@cygnus.com)
1649 * Language directory reorganization.
1650 See parent makefile.
1652 Fri Apr 22 03:27:26 1994 Doug Evans (dje@cygnus.com)
1654 * Language directory reorganization.
1655 See parent makefile.
1657 Thu Apr 21 18:27:57 1994 Per Bothner (bothner@kalessin.cygnus.com)
1659 * cp-tree.h (THUNK_DELTA): It is normally negative, so
1660 use signed .i variant of frame_size rather than unsigned .u.
1661 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
1662 use "VT" rather than "vt" due to binary incompatibility.
1663 * class.c (get_vtable_name): Use strlen of VTABLE_NAME_FORMAT,
1664 rather than sizeof, since it is now an expression.
1665 * class.c (modify_one_vtable): Modify to skip initial element
1666 containing a count of the vtable.
1668 Thu Apr 21 00:09:02 1994 Jason Merrill (jason@deneb.cygnus.com)
1670 * lex.c (check_newline): Force interface_unknown on main input file.
1672 * pt.c (do_pending_expansions): Always emit functions that have been
1673 explicitly instantiated.
1674 (do_function_instantiation): Set DECL_EXPLICITLY_INSTANTIATED.
1675 (do_type_instantiation): Set CLASSTYPE_VTABLE_NEEDS_WRITING and
1676 DECL_EXPLICITLY_INSTANTIATED on all my methods.
1677 * parse.y (explicit_instantiation): Call do_type_instantiation for
1679 * decl2.c (finish_vtable_vardecl): Call import_export_vtable.
1680 * decl.c (start_function): Don't set DECL_EXTERNAL on a function
1681 that has been explicitly instantiated.
1682 * cp-tree.h (DECL_EXPLICITLY_INSTANTIATED): Alias for
1684 * class.c: Move import_export_vtable to decl2.c, and comment out all
1687 Wed Apr 20 16:51:06 1994 Jason Merrill (jason@deneb.cygnus.com)
1689 * lex.c (process_next_inline): Don't muck with DECL_INLINE.
1690 (do_pending_inlines): Ditto.
1692 Tue Apr 19 22:25:41 1994 Mike Stump (mrs@cygnus.com)
1694 Reimplement vtable building, and most vtable pointer setting.
1695 Allows for earier maintenance, easier understandability, and most
1696 importantly, correct semantics.
1698 * class.c (build_vtable): Removed unneeded
1699 SET_BINFO_VTABLE_PATH_MARKED.
1700 * class.c (prepare_fresh_vtable): Ditto. Added argument.
1701 * class.c (modify_vtable_entry): General cleanup.
1702 * class.c (related_vslot, is_normal, modify_other_vtable_entries,
1703 modify_vtable_entries): Removed.
1704 * class.c (add_virtual_function): General cleanup.
1705 * class.c (finish_base_struct): Setup BINFO_VTABLE and
1706 BINFO_VIRTUALS as early as we can, so that modify_all_vtables can
1708 * class.c (finish_vtbls): New routine, mostly from
1709 unmark_finished_struct.
1710 * class.c (overrides): New routine.
1711 * class.c (modify_one_vtable): New routine, mostly from
1712 modify_other_vtable_entries and modify_vtable_entries.
1713 * class.c (modify_all_direct_vtables, modify_all_indirect_vtables,
1714 modify_all_vtables): New routines.
1715 * class.c (finish_struct): Added arguemnt to prepare_fresh_vtable
1716 call. General cleanup on how pending_hard_virtuals are handled.
1717 General cleanup on modifying vtables. Use finish_vtbls, instead of
1718 unmark_finished_struct.
1719 * cp-tree.h (init_vtbl_ptrs, expand_direct_vtbls_init,
1720 get_first_matching_virtual, get_matching_virtual,
1721 expand_vbase_vtables_init, expand_indirect_vtbls_init): Update.
1722 * cvt.c (convert_pointer_to_real): cleanup error message.
1723 * decl.c (grokfndecl): General cleanup.
1724 * decl.c (finish_function): Change init_vtbl_ptrs call to
1725 expand_direct_vtbls_init. Change expand_vbase_vtables_init call to
1726 expand_indirect_vtbls_init.
1727 * init.c (expand_virtual_init): Remove unneeded argument.
1728 * init.c (init_vtbl_ptrs): Rename to expand_direct_vtbls_init, added
1729 two arguments to make more general. Made more general. Now can be
1730 used for vtable pointer initialization from virtual bases.
1731 * init.c (emit_base_init): Change expand_vbase_vtables_init call to
1732 expand_indirect_vtbls_init. Change init_vtbl_ptrs call to
1733 expand_direct_vtbls_init.
1734 * init.c (expand_virtual_init): General cleanup.
1735 * init.c (expand_default_init): Change expand_vbase_vtables_init
1736 call to expand_indirect_vtbls_init.
1737 * init.c (expand_recursive_init_1): Change expand_vbase_vtables_init
1738 call to expand_indirect_vtbls_init.
1739 * init.c (expand_recursive_init): Change expand_vbase_vtables_init
1740 call to expand_indirect_vtbls_init.
1741 * search.c (get_first_matching_virtual): Rename to
1742 get_matching_virtual. General cleanup and remove setting of
1743 DECL_CONTEXT. That is now done in a cleaner way in
1744 modify_vtable_entry and add_virtual_function.
1745 * search.c (expand_vbase_vtables_init): Rename to
1746 expand_indirect_vtbls_init. General cleanup. Use
1747 expand_direct_vtbls_init to do hard work. Ensures that _all_ vtable
1748 pointers from virtual bases are set up.
1749 * search.c (bfs_unmark_finished_struct, unmark_finished_struct):
1752 * *.[chy]: Remove support for VTABLE_USES_MASK.
1754 Tue Apr 19 12:51:59 1994 Jason Merrill (jason@deneb.cygnus.com)
1756 * cvt.c (convert_to_reference): Use NOP_EXPRs to switch between
1757 reference and pointer types instead of bashing the types directly.
1759 * call.c (build_overload_call_real): Use the TREE_CODE to determine
1760 whether the function is overloaded or not, rather than
1762 * *: Remove all uses of TREE_OVERLOADED.
1764 * decl.c (grokdeclarator): Only complain about initializing const
1765 fields when -ansi or -pedantic.
1767 Tue Apr 19 12:42:42 1994 Doug Evans (dje@canuck.cygnus.com)
1769 * cp-tree.h (THUNK_DELTA): frame_size is now a union.
1771 Mon Apr 18 00:17:13 1994 Jason Merrill (jason@deneb.cygnus.com)
1773 Do overloading on a block-by-block basis, not function-by-function.
1774 * decl.c: Lose overloads_to_forget.
1775 (struct binding_level): Add overloads_shadowed field.
1776 (poplevel): Restore overloads_shadowed.
1777 (push_overloaded_decl): Use overloads_shadowed instead of
1778 overloads_to_forget.
1779 (finish_function): Don't look at overloads_to_forget.
1781 Copy enum_overflow logic from c-decl.c.
1782 * decl.c (start_enum): Initialize enum_overflow.
1783 (build_enumerator): Use enum_overflow. Also use current_scope().
1785 * search.c (current_scope): Move Brendan's comment from
1786 build_enumerator here.
1788 * typeck.c (convert_for_assignment): Change warnings to pedwarns for
1789 discarding const/volatile.
1791 Sat Apr 16 01:18:21 1994 Jason Merrill (jason@deneb.cygnus.com)
1793 * typeck.c (comp_target_parms): Accept TEMPLATE_TYPE_PARMs on the rhs.
1794 (comp_target_types): Ditto.
1796 * decl.c (lookup_name): Don't unset got_scope here.
1798 * spew.c (yylex): Only replace yylval with the TYPE_NESTED_NAME if
1799 got_scope != NULL_TREE.
1801 Fri Apr 15 16:36:33 1994 Jason Merrill (jason@deneb.cygnus.com)
1803 Horrible kludge to prevent templates from being instantiated by
1805 * parse.y (template_instantiate_once): Unset TYPE_BEING_DEFINED
1806 before we get to left_curly.
1807 * pt.c (instantiate_class_template): Set TYPE_BEING_DEFINED.
1809 * error.c (dump_decl): If it's a typedef, print out the name of the
1810 decl, not just the underlying type.
1812 * decl.c (pushdecl): If the old duplicate decl was a TYPE_DECL,
1813 update the IDENTIFIER_TYPE_VALUE of its name.
1815 * decl2.c (finish_file): When processing the initializer for a
1816 static member, pretend that the dummy function is a member of the
1819 Fri Apr 15 15:56:35 1994 Kung Hsu (kung@mexican.cygnus.com)
1821 * class.c (build_vtable_entry): revert Apr 4 change.
1822 * decl2.c (mark_vtable_entries): replace pure virtual function
1825 Fri Apr 15 13:49:33 1994 Jason Merrill (jason@deneb.cygnus.com)
1827 * typeck.c (build_conditional_expr): Pedwarn on pointer/integer
1828 mismatch, and don't pedwarn on 0/function pointer mismatch.
1830 * typeck2.c (digest_init): Lose code for special handling of unions.
1831 (process_init_constructor): Since they're handled just fine here.
1832 Pedwarn on excess elements.
1834 * decl2.c (grokfield): Complain about local class method declaration
1837 Fri Apr 15 13:19:40 1994 Per Bothner (bothner@kalessin.cygnus.com)
1839 * method.c (emit_thunk): Add extern declaration for
1840 current_call_is_indirect (needed for hppa).
1842 Thu Apr 14 16:12:31 1994 Jason Merrill (jason@deneb.cygnus.com)
1844 Improve local class support; allow classes in different blocks to
1846 * decl.c (pushtag): Support local classes better.
1847 (pushdecl_nonclass_level): New function for pushing mangled decls of
1848 nested types into the appropriate scope.
1849 (xref_defn_tag): Use pushdecl_nonclass_level instead of
1851 (grokfndecl): Don't mess with IDENTIFIER_GLOBAL_VALUE for local
1853 * method.c (do_inline_function_hair): Ditto.
1855 * class.c (finish_struct): It is legal for a class with no
1856 constructors to have nonstatic const and reference members.
1858 Thu Apr 14 07:15:11 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
1860 * decl.c (push_overloaded_decl): Avoid giving errors about
1861 built-ins, since duplicate_decls will have given warnings/errors
1864 Thu Apr 14 03:45:12 1994 Jason Merrill (jason@deneb.cygnus.com)
1866 * cvt.c (convert_to_reference): Warn about casting pointer type to
1867 reference type when this is probably not what they wanted.
1869 Wed Apr 13 13:12:35 1994 Per Bothner (bothner@kalessin.cygnus.com)
1871 * decl.c (finish_decl): Don't mindlessly set TREE_USED for
1872 static consts any more (toplev.c has now been modified to
1873 not emit warnings if they are unused).
1875 Wed Apr 13 00:22:35 1994 Jason Merrill (jason@deneb.cygnus.com)
1877 * decl.c (grok_op_properties): If op new/delete get here with
1878 METHOD_TYPEs, do a revert_static_member_fn.
1880 * cp-tree.h (IDENTIFIER_CLASS_TYPE_VALUE): Lose.
1881 * init.c (is_aggr_typedef): Don't look at
1882 IDENTIFIER_CLASS_TYPE_VALUE.
1883 (get_aggr_from_typedef): Ditto.
1884 (get_type_value): Ditto.
1885 * call.c (build_scoped_method_call): Don't rely on overloaded
1886 template names having IDENTIFIER_CLASS_VALUE set.
1888 * parse.y (component_decl_1, fn.def2): Revert rules for
1890 (component_decl_1, fn.def2): Use $1 instead of $$, since $$ is being
1893 * decl.c (start_function): Only warn about `void main()' if pedantic
1894 || warn_return_type.
1896 Tue Apr 12 02:14:17 1994 Jason Merrill (jason@deneb.cygnus.com)
1898 Clean up overloading of the template name.
1899 * class.c (pushclass): overload the template name whenever pushing
1900 into the scope of a template class, not just if it is
1902 (popclass): Correspondingly.
1903 * search.c (push_class_decls): Don't overload_template_name.
1904 * pt.c (overload_template_name): Don't set IDENTIFIER_LOCAL_VALUE or
1905 DECL_CONTEXT on things.
1906 * parse.y (left_curly): Don't overload_template_name.
1907 * class.c (finish_struct): Don't undo_template_name_overload.
1909 * method.c (build_opfncall): Only pass one argument to global op
1912 * call.c (build_method_call): Use TYPE_VEC_DELETE_TAKES_SIZE to
1913 decide how many arguments to use for vec delete.
1915 * decl.c (grok_op_properties): Be consistent in modifying
1917 (grokdeclarator): Only complain about function decls with no return
1918 type if we're being pedantic.
1920 Mon Apr 11 00:10:53 1994 Jason Merrill (jason@deneb.cygnus.com)
1922 Add support for operator new [] and operator delete [].
1924 * tree.def: Add VEC_NEW_EXPR and VEC_DELETE_EXPR.
1925 * ptree.c (print_lang_type): Indicate vec new/delete.
1926 * parse.y: Support vec new/delete.
1927 * method.c (build_decl_overload): Deal with vec new/delete.
1928 (build_opfncall): Ditto.
1929 * lex.c (init_lex): Set up values of ansi_opname and opname_tab for
1930 vec new/delete. vec new uses "__vn", and vec delete uses "__vd".
1931 * init.c (init_init_processing): Set up BIVN and BIVD.
1932 (do_friend): Don't clean up after mistaken setting of TREE_GETS_NEW,
1933 since it doesn't happen any more.
1934 (build_new): Support vec new. Always call something.
1935 (build_x_delete): Support vec delete.
1936 (build_vec_delete): Lose dtor_dummy argument, add use_global_delete,
1937 and pass it to build_x_delete.
1938 * decl2.c (delete_sanity): Don't change behavior by whether or not
1939 the type has a destructor. Pass use_global_delete to
1941 (coerce_delete_type): Make sure that the type returned has a first
1942 argument of ptr_type_node.
1943 * decl.c (init_decl_processing): Also declare the global vec
1945 (grokdeclarator): Also force vec new/delete to be static.
1946 (grok_op_properties): Note presence of vec new/delete, and play with
1947 their args. If vec delete takes the optional size_t argument, set
1948 TYPE_VEC_DELETE_TAKES_SIZE.
1949 * cp-tree.h (TYPE_GETS_{REG,VEC}_DELETE): New macros to simplify
1950 checking for one delete or the other.
1951 (lang_type): gets_new and gets_delete are now two bits long. The
1952 low bit is for the non-array version. Lose gets_placed_new.
1953 (TYPE_VEC_DELETE_TAKES_SIZE): New macro indicating that the vec
1954 delete defined by this class wants to know how much space it is
1956 (TYPE_VEC_NEW_USES_COOKIE): New macro to indicate when vec new must
1957 add a header containing the number of elements in the vector; i.e.
1958 when the elements need to be destroyed or vec delete wants to know
1960 * class.c (finish_struct_methods): Also check for overloading vec
1962 * call.c (build_method_call): Also delete second argument for vec
1965 * decl.c (grokdeclarator): Correct complaints again.
1966 (grokdeclarator): Fix segfault on null declarator.
1967 (decls_match): Also accept redeclaration with no arguments if both
1968 declarations were in C context. Bash TREE_TYPE (newdecl) here.
1969 (duplicate_decls): Instead of here.
1971 * parse.y (nested_name_specifier_1): Lose rules for dealing with
1972 syntax errors nicely, since they break parsing of 'const i;'.
1974 * decl.c (lookup_name): if (got_scope == current_class_type)
1975 val = IDENTIFIER_CLASS_VALUE (name).
1977 * search.c (lookup_nested_tag): Look in enclosing classes, too.
1979 * spew.c (yylex): Only look one character ahead when checking for a
1982 * lex.c (check_newline): Read first nonwhite char before
1983 incrementing lineno.
1985 * decl.c (grokdeclarator): Don't claim that typedefs are variables
1988 * parse.y: Divide up uses of unqualified_id into
1989 notype_unqualified_id and unqualified_id, so that TYPENAME can be
1990 used as an identifier after an object.
1992 * class.c (push_nested_class): Don't push into non-class scope.
1994 * decl.c (grokdeclarator): If an identifier could be a type
1995 conversion operator, but has no associated type, it's not a type
1996 conversion operator.
1998 * pt.c (unify): Check for equality of constants better.
2000 * decl.c (grokdeclarator): Don't complain about access decls.
2002 Sun Apr 10 02:39:55 1994 Jason Merrill (jason@deneb.cygnus.com)
2004 * decl.c (grokdeclarator): pedwarn about data definitions without
2007 * parse.y (datadef): Don't pedwarn about decls without types here,
2008 since that is valid for functions.
2009 (fn.def2, component_decl): Support constructors with declmods again.
2010 (nomods_initdecls): For decls without any mods, so that we don't try
2011 to get declspecs from some arbitrary $0.
2013 * search.c (lookup_field): Use cp_error.
2015 * parse.y (nested_name_specifier_1): Don't check aggr/non-aggr type
2016 here; it breaks destructors for non-aggr types.
2018 * decl.c (lookup_name): Only look for TYPE_DECLs in base classes of
2019 a type being defined, like the comment says.
2020 If got_scope is not an aggregate, just return NULL_TREE.
2022 * pt.c (create_nested_upt): Kung's code for creating types nested
2023 within uninstantiated templates now lives here (it used to live in
2024 hack_more_ids). It needs to be expanded.
2026 * parse.y: Stop calling see_typename so much.
2028 * decl.c (lookup_name): Deal with TTPs and UPTs.
2030 * lex.c (real_yylex): Don't set looking_for_typename just because we
2032 (dont_see_typename): #if 0 out.
2034 * spew.c (yylex): Increment looking_for_typename if the next
2035 character is SCOPE, rather than setting it to 1; this way, the value
2036 from seeing an aggr specifier will not be lost. This kinda relies
2037 on looking_for_typename never being < 0, which is now true.
2039 * parse.y (nested_name_specifier_1): Accept TEMPLATE_TYPE_PARMs,
2041 (named_class_head_sans_basetype): Accept template types, too. Oops.
2043 Fri Apr 8 16:39:35 1994 Jason Merrill (jason@deneb.cygnus.com)
2045 * decl2.c (reparse_decl_as_expr1): Handle SCOPE_REFs.
2047 * parse.y: Lose START_DECLARATOR.
2049 * search.c (lookup_nested_tag): New function to scan CLASSTYPE_TAGS
2052 * parse.y: Simplify fn.def2 and component_decl. Support 'enum
2053 A::foo' syntax. Catch invalid scopes better.
2055 * parse.y, lex.c: lose TYPENAME_COLON.
2057 * decl2.c (groktypefield): #if 0 out.
2059 * decl.c (lookup_name): If the type denoted by got_scope is
2060 currently being defined, look in CLASSTYPE_TAGS rather than FIELDS.
2062 * class.c (push_nested_class): Don't try to push into
2065 Fri Apr 8 07:26:36 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
2067 * Makefile.in (stamp-parse): Update count of conflicts to 33.
2069 Thu Apr 7 17:47:53 1994 Jason Merrill (jason@deneb.cygnus.com)
2071 A saner implementation of nested types that treats template types
2072 no differently from non-template types. There are still some
2073 shortcomings of our system; most notably, it is difficult to look
2074 for a nested type that is hidden by another name, because of the way
2075 we keep track of hidden types. But this shouldn't be a problem for
2076 just about anyone. Perhaps lookup_field should be fixed up a bit.
2078 * spew.c: Moved handling of nested types/scoping from the lexer
2079 into the parser. Removed variable template_type_seen_before_scope.
2080 Removed functions frob_identifier, hack_more_ids, and various cruft
2081 that was #if 0'd out in the past, reducing the size of the file from
2082 1146 lines to 450 lines. We can't quite do away with spew.c yet,
2083 though; we still need it for do_aggr () and checking for SCOPE after
2084 the current identifier. And setting lastiddecl.
2086 * parse.y: Moved handling of nested types/scoping from the lexer
2087 into the parser, using a new global variable `got_scope'. Reduced
2088 the number of states by 53. Implemented all uses of explicit global
2089 scope. Removed terminals SCOPED_TYPENAME and SCOPED_NAME. Removed
2090 nonterminals tmpl.1, scoped_base_class, id_scope, typename_scope,
2091 scoped_typename. Added nonterminals nested_type,
2092 qualified_type_name, complete_type_name, qualified_id, ptr_to_mem,
2093 nested_name_specifier, global_scope, overqualified_id, type_name.
2094 Changed many others. Added 9 new reduce/reduce conflicts, which are
2095 nested type parallels of 9 that were already in the grammar for
2096 non-nested types. Eight of the now 33 conflicts should be removed
2097 in the process of resolving the late binding between variable and
2100 * gxxint.texi (Parser): Update.
2102 * cp-tree.h (IS_AGGR_TYPE_CODE): Add UNINSTANTIATED_P_TYPE.
2104 * lex.h: Add decl for got_scope.
2106 * lex.c (see_typename): Claim to be the lexer when calling
2109 * decl.c (lookup_name): When called from the lexer, look at
2110 got_scope and looking_at_typename; otherwise don't.
2112 Thu Apr 7 22:05:47 1994 Mike Stump (mrs@cygnus.com)
2114 31th Cygnus<->FSF merge.
2116 Thu Apr 7 17:47:53 1994 Jason Merrill (jason@deneb.cygnus.com)
2118 * decl2.c (mark_vtable_entries): Call this to mark all the
2119 entries in the vtable addressable.
2120 (finish_decl_parsing): Handle SCOPE_REFs.
2122 * decl.c (decls_match): Always call compparms with strict == 1.
2123 Handle the special case of C function redecl here.
2124 (duplicate_decls): Only keep the old type if the new decl takes no
2127 * typeck.c (compparms): Also allow t1 to be ... if strict == 0.
2129 Thu Apr 7 16:17:50 1994 Mike Stump (mrs@cygnus.com)
2131 * class.c (build_vtable_entry): Fix breakage introduced Apr 5
2134 Wed Apr 6 16:05:10 1994 Per Bothner (bothner@kalessin.cygnus.com)
2136 * init.c (build_virtual_init), search.c (build_vbase_vtables_init),
2137 ch-tree.h: Every place these functions were called, the result was
2138 immediately passed to expand_expr_stmt. Reduce redundancy by
2139 calling expand_expr_init *inside* these functions. These
2140 makes for a simpler interface, and we don't have to build
2141 compound expressions. Hence, rename these function to:
2142 expand_virtual_init and expand_vbase_vtables_init respectively.
2143 * init.c, decl.c: Change callers of these functions.
2144 * init.c, cp-tree.h (expand_virtual_init): Make static.
2146 * decl2.c (finish_file): Check TREE_PUBLIC||TREE_ADDRESSABLE
2147 rather than DECL_SAVED_INSNS before emitting inlines.
2149 Wed Apr 6 13:06:39 1994 Jason Merrill (jason@deneb.cygnus.com)
2151 * spew.c (init_spew): #if 0 out stuff used by arbitrate_lookup.
2153 * decl.c (duplicate_decls): If this is a new declaration of an
2154 extern "C" function, keep the type (for the argtypes).
2155 (redeclaration_error_message): Don't check DECL_LANGUAGE here.
2156 (decls_match): Call compparms with a value of strict dependent on
2157 the value of strict_prototypes for DECL_LANGUAGE (oldecl).
2159 * typeck.c (compparms): ... is only equivalent to non-promoting
2160 parms if we're not being strict.
2162 * parse.y (empty_parms): Don't check flag_ansi || pedantic here.
2164 * decl.c (init_decl_processing): if (flag_ansi || pedantic)
2165 strict_prototypes_lang_c = strict_prototypes_lang_cplusplus;
2167 * decl2.c (grok_function_init): Don't set DECL_INITIAL on pure
2170 Tue Apr 5 17:48:41 1994 Per Bothner (bothner@kalessin.cygnus.com)
2172 Support for implementing vtables with thunks.
2173 * tree.def (THUNK_DECL): New TREE_CODE.
2174 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY), tree.c
2175 (fnaddr_from_vtable_entry): Handle flag_vtable_thunks case.
2176 * cp-tree.h (memptr_type): New variable.
2177 * class.c (build_vtable_entry): Build thunk if necessary.
2178 * class.c (build_vfn_ref): If using thunks, don't need
2179 to add delta field from vtable (there is none!).
2180 * decl.c: Add memptr_type as well as vtable_entry_type.
2181 If using thunks, the latter is just ptr_type_node.
2182 * gc.c, typeck.c: Use memptr_typeChange, not vtable_entry_type.
2183 * decl2.c (finish_vtable_vardecl): Handle thunks.
2184 * expr.c (cplus_expand_expr): Support THUNK_DECL.
2186 * decl.c (grokdeclarator): Set DECL_THIS_EXTERN if "extern".
2187 * decl.c (start_function): Set current_extern_inline based on
2188 DECL_THIS_EXTERN, not TREE_PUBLIC.
2189 * decl.c (finish_function): Call mark_inline_for_output if needed,
2191 Improve intelligence about when to emit inlines.
2192 * cp-tree.h (lang_decl_flags): New field saved_inline.
2193 * cp-tree.h (DECL_SAVED_INLINE): New macro.
2194 * class.c (add_virtual_function): Don't set TREE_ADDRESSABLE.
2195 * decl.h, decl.c (pending_addressable_inlines): Removed.
2196 * decl2.c (pending_addressable_inlines): Renamed to saved_inlines.
2197 * decl2.c (mark_inline_for_output): Do nothing if
2198 DECL_SAVED_INLINE; otherwise set it (and add to saved_inlines list).
2199 * decl2.c (finish_vtable_vardecl): SET_CLASSTYPE_INTERFACE_KNOWN
2200 and set CLASSTYPE_INTERFACE_ONLY if there is a non-inline virtual.
2201 * decl2.c (finish_file): Writing out inlines later, so we can
2202 also handle the ones needed for vtbales.
2203 * decl2.c (write_vtable_entries, finish_vtable_typedecl): Removed.
2205 * cp-tree.h, class.c, decl2.c, search.c: Remove -fvtable-hack
2206 and flag_vtable_hack. Use -fvtable-thunks and flag_vtable_thunks
2207 instead. (The rationale is that these optimizations both break binary
2208 compatibility, but should become the default in a future release.)
2210 Wed Apr 6 10:53:56 1994 Mike Stump (mrs@cygnus.com)
2212 * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT
2213 of a fndecl, as we might not be from that vfield.
2215 Tue Apr 5 17:43:35 1994 Kung Hsu (kung@mexican.cygnus.com)
2217 * class.c (add_virtual_function): fix bug for pure virtual, so
2218 that DECL_VINDEX of the dummy decl copied won't be error.
2219 (see also Apr 4 change)
2221 Tue Apr 5 17:23:45 1994 Per Bothner (bothner@kalessin.cygnus.com)
2223 * typeck.c (c_expand_return): Before checking that we're not
2224 returning the address of a local, make sure it's a VAR_DECL.
2225 (And don't worry about it being a TREE_LIST.)
2227 Tue Apr 5 13:26:42 1994 Jason Merrill (jason@deneb.cygnus.com)
2229 * parse.y (YYDEBUG): Always define.
2230 * lex.c (YYDEBUG): Ditto.
2232 Mon Apr 4 11:28:17 1994 Kung Hsu (kung@mexican.cygnus.com)
2234 * class.c (finish_struct): backup out the change below, put the
2235 new change for the same purpose. The change below breaks code.
2237 * class.c (finish_struct): if pure virtual, copy node and make
2238 RTL point to abort, then put in virtual table.
2239 * decl2.c (grok_function_iit): reinstate Mar 31 change.
2241 Sat Apr 2 03:12:58 1994 Jason Merrill (jason@deneb.cygnus.com)
2243 * init.c (build_new): pedwarn about newing const and volatile
2246 * tree.c (get_identifier_list): Only do the special handling
2247 thing if we're dealing with the main variant of the record type.
2249 * cvt.c (convert_to_reference): When converting between
2250 compatible reference types, use the pointer conversion machinery.
2251 Don't just blindly overwrite the old type.
2253 Fri Apr 1 17:14:42 1994 Jason Merrill (jason@deneb.cygnus.com)
2255 * call.c (build_method_call): When looking at global functions,
2256 be sure to use instance_ptr for the first argument, not some version
2257 of it that has been cast to a base class. Also do this before
2258 comparing candidates.
2260 Thu Mar 31 19:50:35 1994 Jason Merrill (jason@deneb.cygnus.com)
2262 * call.c (build_method_call): Constructors can be called for
2265 Thu Mar 31 16:20:16 1994 Kung Hsu (kung@mexican.cygnus.com)
2267 * decl2.c (grok_func_init): do not abort as rtl for pur virtual
2268 fucntions. They can be defined somewhere else.
2270 Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
2272 * decl.c (init_decl_processing): Declare __builtin_return_address
2273 and __builtin_frame_address for C++ as well.
2275 Thu Mar 31 12:35:49 1994 Mike Stump (mrs@cygnus.com)
2277 * typeck2.c (store_init_value): Integral constant variables are
2278 always constant, even when doing -fpic.
2280 Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
2282 * decl.c (redeclaration_error_message): Pass the types to
2285 Wed Mar 30 21:29:25 1994 Mike Stump (mrs@cygnus.com)
2287 Cures incorrect errors about pure virtuals in a class, when they
2288 have been overridden in a derived class.
2290 * search.c (get_abstract_virtuals): Reimplement.
2291 * search.c (get_abstract_virtuals_1): New routine.
2293 Wed Mar 30 14:10:04 1994 Jason Merrill (jason@deneb.cygnus.com)
2295 * pt.c (push_template_decls): Make the pushed level pseudo
2298 * parse.y (extdefs): Don't pop everything if the current binding
2299 level is pseudo_global.
2301 * decl.c (pop_everything): Stop on reaching a pseudo-global
2304 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Change to more reliable test.
2306 * decl.c (duplicate_decls): Only copy DECL_SOURCE_{FILE_LINE} if
2307 the old decl actually had an initializer.
2309 * {various}: Clean up gcc -W complaints.
2311 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Currently defined to be
2312 (DECL_CONTEXT (NODE) != NULL_TREE).
2314 * parse.y (lang_extdef): Call pop_everything if necessary.
2316 * decl.c (pop_everything): New function for popping binding
2317 levels left over after a syntax error.
2318 (pushdecl): Use DECL_FUNCTION_MEMBER_P to decide whether or not
2319 a function is a member.
2321 Wed Mar 30 14:20:50 1994 Mike Stump (mrs@cygnus.com)
2323 Cures calling a more base base class function, when a more derived
2324 base class member should be called in some MI situations.
2326 * search.c (make_binfo): Use more the more specialized base
2327 binfos from the binfo given as the second argument to make_binfo,
2328 instead of the unspecialized ones from the TYPE_BINFO.
2329 * class.c (finish_base_struct): Ditto, update callers.
2330 * search.c (dfs_get_vbase_types): Ditto.
2331 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Ditto.
2332 * decl.c (xref_tag): Use NULL_TREE instead of 0.
2333 * lex.c (make_lang_type): Ditto.
2335 Wed Mar 30 14:10:04 1994 Jason Merrill (jason@deneb.cygnus.com)
2337 * decl.c (pushdecl): If pushing a C-linkage function, only do a
2338 push_overloaded_decl.
2339 (duplicate_decls): Standard overloading does not shadow built-ins.
2341 Tue Mar 29 00:54:18 1994 Jason Merrill (jason@deneb.cygnus.com)
2343 * pt.c (end_template_decl): Don't call push_overloaded_decl.
2345 * init.c (do_friend): Don't call push_overloaded_decl.
2347 * decl.c (pushdecl): Call push_overloaded_decl for functions and
2349 (duplicate_decls): functions and function templates are not
2350 duplicates, but don't complain about calling this function to
2352 (push_overloaded_decl): Don't deal with linkage. Call
2354 (redeclaration_error_message): Deal with linkage.
2356 * decl.c (start_function): If push_overloaded_decl returns an
2357 older version of the function, deal with it.
2359 * decl.c (start_function): Be sure only to push_overloaded_decl
2362 * decl.c (grokfndecl): Put back clearing of DECL_CHAIN for
2364 (start_function): Lose broken and redundant code for checking old
2367 * init.c (add_friend): Give line numbers of both friend decls
2368 when warning about re-friending.
2370 * pt.c (tsubst): Use comptypes rather than == to compare the
2371 types of the method as declared and as defined, since default
2372 parameters may be different.
2374 * call.c (build_method_call): Use brendan's candidate printing
2377 * decl.c (start_method): Methods defined in the class body are
2378 inline whether or not it's a template class.
2380 Mon Mar 28 16:39:26 1994 Jason Merrill (jason@deneb.cygnus.com)
2382 * parse.y (initdcl0): Add "extern" to current_declspecs if
2383 have_extern_spec && ! used_extern_spcec.
2385 * tree.c (really_overloaded_fn): A fn with more than one
2388 * pt.c (end_template_decl): Use really_overloaded_fn.
2390 * decl.c (duplicate_decls): When smashing a decl into a previous
2391 definition, keep the old file and line.
2392 Don't deal with overloaded functions.
2393 Lose old code for checking arg types of functions.
2394 Check for overloaded C functions.
2395 (pushdecl): Deal with overloaded functions.
2396 (start_decl): Expect pushdecl to return an appropriate function decl.
2397 (start_function): Ditto.
2398 (push_overloaded_decl): Don't check for overloaded C functions.
2400 * *.c: Stop using DECL_OVERLOADED, it being archaic.
2401 TREE_OVERLOADED should probably go, too.
2403 Mon Mar 28 14:00:45 1994 Ron Guilmette (rfg@netcom.com)
2405 * typeck.c (comp_target_types): Call comp_target_parms with
2408 Sun Mar 27 00:07:45 1994 Jason Merrill (jason@deneb.cygnus.com)
2410 * parse.y (empty_parms): Don't parse () as (...) in extern "C"
2411 sections if we're compiling with -ansi or -pedantic.
2413 * decl.c (decls_match): Don't treat (int) and (int&) as matching.
2415 * decl2.c (grokfield): Don't pedwarn twice about initializing
2418 * decl.c (push_overloaded_decl): Warn about shadowing
2420 (redeclaration_error_message): Don't allow 'int a; int a;'
2422 * cvt.c (build_up_reference): Only check for valid upcast if
2423 LOOKUP_PROTECT is set, not just any flag.
2425 Fri Mar 25 01:22:31 1994 Jason Merrill (jason@deneb.cygnus.com)
2427 * lex.c (check_newline): When we see a #pragma implementation,
2428 also set it for the main input file.
2430 * init.c (build_new): Convert array size argument to size_t.
2432 * parse.y (primary): If we're doing a parenthesized type-id, call
2433 groktypename before passing it to build_new.
2435 * call.c (build_method_call): Deal properly with const and
2436 volatile for instances of reference type.
2438 * decl.c (store_return_init): Change 'if (pedantic) error' to 'if
2439 (pedantic) pedwarn'.
2441 * decl.c (grokdeclarator): Don't complain about putting `static'
2442 and `inline' on template function decls.
2444 Thu Mar 24 23:18:19 1994 Jason Merrill (jason@deneb.cygnus.com)
2446 * call.c (build_method_call): Preserve const & volatile on
2449 Thu Mar 24 16:21:52 1994 Mike Stump (mrs@cygnus.com)
2451 * init.c (build_new, build_vec_delete): Use global new and delete
2453 * decl2.c (delete_sanity): Ditto.
2455 Thu Mar 24 02:10:46 1994 Jason Merrill (jason@deneb.cygnus.com)
2457 * cvt.c (convert_to_reference): If i is an lvalue,
2458 (int &)i -> *(int*)&i, as per 5.2.8p9 of the latest WP.
2459 (convert_force): Call convert_to_reference with LOOKUP_COMPLAIN.
2461 Wed Mar 23 17:45:37 1994 Jason Merrill (jason@deneb.cygnus.com)
2463 * decl.c (duplicate_decls): Also propagate DECL_TEMPLATE_MEMBERS
2464 and DECL_TEMPLATE_INSTANTIATIONS.
2466 * init.c (build_new): Handle array typedefs properly.
2468 Wed Mar 23 18:23:33 1994 Mike Stump (mrs@cygnus.com)
2470 30th Cygnus<->FSF merge.
2472 Wed Mar 23 00:46:24 1994 Mike Stump (mrs@cygnus.com)
2474 * class.c (modify_vtable_entries): Avoid running off the end of the
2475 virtuals list when processing a virtual destructor.
2476 * class.c (get_vtable_entry): Ditto.
2478 Wed Mar 23 00:23:59 1994 Jason Merrill (jason@deneb.cygnus.com)
2480 * decl.c (duplicate_decls): If two template decls don't match,
2483 Tue Mar 22 23:49:41 1994 Jason Merrill (jason@deneb.cygnus.com)
2485 * typeck.c (convert_for_assignment): Don't pedwarn about
2486 converting function pointer to void *.
2488 Tue Mar 22 22:23:19 1994 Mike Stump (mrs@cygnus.com)
2490 Major revamp of pointer to member functions. Cures major
2491 nonfunctionality when used in casts, and MI situations.
2493 * cvt.c (convert_force): Update call site of build_ptrmemfunc.
2494 * typeck.c (convert_for_assignment): Ditto.
2495 * typeck2.c (digest_init): Ditto.
2496 * typeck2.c (process_init_constructor): Simplify by moving code into
2498 * typeck2.c (digest_init): Do default_conversions on init value, if
2499 we are processing pointer to member functions.
2500 * class.c (get_vfield_offset): Now non-static. Convert bit offset
2502 * cp-tree.h (get_vfield_offset): Ditto.
2503 * typeck.c (get_member_function_from_ptrfunc): Convert down to right
2504 instance, before fetching vtable pointer.
2505 * typeck.c (get_delta_difference): New routine.
2506 * typeck.c (build_ptrmemfunc): Revamp to handle casting better, also
2507 get vtable pointer out of right subobject.
2509 Tue Mar 22 17:56:48 1994 Mike Stump (mrs@cygnus.com)
2511 * search.c (get_binfo): Return NULL instead of aborting, when
2512 passed a UNION_TYPE.
2514 Tue Mar 22 12:44:54 1994 Jason Merrill (jason@deneb.cygnus.com)
2516 These patches implement handling of redefinition/redeclaration of
2519 * typeck.c (comptypes): Simplify. All TEMPLATE_TYPE_PARMs are
2520 considered compatible.
2522 * parse.y (template_def): Pass defn argument to end_template_decl.
2524 * pt.c (end_template_decl): Add defn argument. Check for
2525 redefinition. Simplify.
2527 * error.c (OB_UNPUT): New macro, to remove mistakes.
2528 (aggr_variety): Subroutine of dump_aggr_type.
2530 * decl.c (decls_match): Support templates.
2531 (duplicate_decls): No longer static. Don't try to lay out template
2533 (pushdecl): Simplify.
2535 * cp-tree.h (DECL_TEMPLATE_MEMBERS): Use DECL_SIZE instead of
2538 Mon Mar 21 11:46:55 1994 Jason Merrill (jason@deneb.cygnus.com)
2540 * error.c (dump_decl): Support class template decls.
2541 (dump_type): Don't adorn template type parms.
2543 * decl.c (duplicate_decls): Save DECL_TEMPLATE_INFO from old decl
2544 if it was a definition.
2545 (redeclaration_error_message): Do the cp_error thang, and reject
2546 redefinition of templates.
2548 Mon Mar 21 19:36:06 1994 Per Bothner (bothner@kalessin.cygnus.com)
2550 * decl.c (grokdeclarator): Set TREE_PUBLIC for METHOD_TYPE
2551 in FIELD context, when appropriate. Also,
2552 CLASSTYPE_INTERFACE_ONLY is irrelevant to setting TREE_PUBLIC.
2553 Also, simplify check for bogus return specifiers.
2555 Mon Mar 21 11:46:55 1994 Jason Merrill (jason@deneb.cygnus.com)
2557 * parse.y (after_type_declarator1): Expand type_quals.
2558 (notype_declarator1): Ditto.
2561 Sat Mar 19 01:05:17 1994 Jason Merrill (jason@deneb.cygnus.com)
2563 * decl.c (grokdeclarator): Treat class-local typedefs like static
2564 members; i.e. 'typedef int f();' means that f is a function type,
2567 * parse.y (decl): Change direct_* back to *.
2568 (type_id): Change direct_abstract_declarator to absdcl.
2569 (direct_declarator, direct_initdecls, direct_initdcl0): Remove again.
2571 Fri Mar 18 12:47:59 1994 Jason Merrill (jason@deneb.cygnus.com)
2573 These two patches fix crashes on instantiating a template inside a
2574 function with C linkage or containing labels.
2576 * class.c (current_lang_stacksize): No longer static.
2578 * decl.c (struct saved_scope): Add lang_base, lang_stack,
2579 lang_name, lang_stacksize, and named_labels.
2580 (push_to_top_level): Save them.
2581 (pop_from_top_level): Restore them.
2583 * gxxint.texi (Parser): Update.
2585 These two patches finish moving the task of expr/declarator
2586 ambiguity resolution from the lexer to the parser, and add one more
2587 r/r conflict. START_DECLARATOR can now be nuked.
2589 * parse.y (decl): Add "direct_" in typespec X rules.
2590 (direct_declarator): New nonterminal for
2591 direct_after_type_declarator and direct_notype_declarator.
2592 (direct_initdecls): Like initdecls, but uses direct_initdcl0.
2593 (direct_initdcl0): Like initdcl0, but uses direct_declarator.
2594 (named_parm): Add typespec direct_declarator rule.
2596 * spew.c (yylex): #if 0 out START_DECLARATOR insertion.
2598 These two patches disable some excessive cleverness on the part of
2599 g++; a non-class declaration always hides a class declaration in the
2600 same scope, and g++ was trying to unhide it depending on the
2601 enclosing expression.
2603 * spew.c (arbitrate_lookup): #if 0 out.
2605 * decl.c (lookup_name): Never call arbitrate_lookup.
2607 * parse.y (complex_notype_declarator1): Add '*'
2608 complex_notype_declarator1 and '&' complex_notype_declarator1 rules.
2610 * parse.y (complex_direct_notype_declarator): Restore id_scope
2611 see_typename TYPENAME rule, remove all other rules beginning with
2613 (notype_unqualified_id): Add '~' see_typename IDENTIFIER rule.
2615 Thu Mar 17 17:30:01 1994 Jason Merrill (jason@deneb.cygnus.com)
2617 These changes fix the compiler's handling of the functional cast/
2618 object declaration ambiguities in section 6.8 of the ARM. They also
2619 add 11 reduce/reduce conflicts. Sigh.
2621 * parse.y: Add precedence decls for OPERATOR and '~'.
2622 (notype_unqualified_id): New nonterminal, encompasses all of the
2623 ANSI unqualified-id nonterminal except TYPENAMEs.
2624 (expr_or_declarator): New nonterminal to delay parsing of code like
2626 (primary): Use notype_unqualified_id.
2627 (decl): Add typespec initdecls ';' and typespec declarator ';'
2629 (initdcl0): Deal with the above.
2630 (complex_notype_declarator1): A notype_declarator that is not also
2631 an expr_or_declarator.
2632 (complex_direct_notype_declarator): A direct_notype_declarator that
2633 doesn't conflict with expr_or_declarator. Use
2634 notype_unqualified_id. Remove id_scope see_typename TYPENAME rule.
2635 (functional_cast): New nonterminal, for the three functional cast
2636 rules. So that they can be moved after
2637 complex_direct_notype_declarator.
2638 (see_typename): Don't accept type_quals any more.
2640 * decl2.c (reparse_decl_as_expr): New function to deal with parse
2641 nodes for code like `int (*a)++;'.
2642 (reparse_decl_as_expr1): Recursive subroutine of the above.
2643 (finish_decl_parsing): New function to deal with parse nodes for
2644 code like `int (*a);'. See the difference?
2646 Thu Mar 17 12:16:10 1994 Mike Stump (mrs@cygnus.com)
2648 These changes break binary compatibility in code with classes
2649 that use virtual bases.
2651 * search.c (dfs_get_vbase_types): Simplify and correct to make
2652 sure virtual bases are initialized in dfs ordering.
2653 * search.c (get_vbase_types): Simplify and make readable.
2655 Thu Mar 17 12:01:10 1994 Jason Merrill (jason@deneb.cygnus.com)
2657 * parse.y: s/ typename / type_id /g
2659 Wed Mar 16 17:42:52 1994 Kung Hsu (kung@mexican.cygnus.com)
2661 * parse.y (typespec): add SCOPE TYPENAME for global scoped
2664 * decl.c (complete_array_type): fix a bug that in -pendantic
2665 mode even there's no initializer, it will continue to build
2668 Wed Mar 16 17:43:07 1994 Jason Merrill (jason@deneb.cygnus.com)
2670 * parse.y (direct_notype_declarator): Add PTYPENAME rule, remove
2671 all of the scoped PTYPENAME rules.
2673 Wed Mar 16 16:39:02 1994 Mike Stump (mrs@cygnus.com)
2675 * init.c (build_offset_ref): The value of A::typedef_name is
2676 always the TYPE_DECL, and never an error.
2678 Tue Mar 15 20:02:35 1994 Jason Merrill (jason@deneb.cygnus.com)
2680 * search.c (get_base_distance_recursive): Two binfos can only
2681 represent the same object if they are both via_virtual.
2683 * class.c (finish_base_struct): Check vbases for ambiguity, too.
2685 * search.c (get_vbase_types): Accept binfo argument, too.
2687 Tue Mar 15 19:22:05 1994 Kung Hsu (kung@mexican.cygnus.com)
2689 * decl.c (complete_array_type): complete TYPE_DOMAIN of the
2690 initializer also, because back-end requires it.
2692 Tue Mar 15 15:33:31 1994 Jason Merrill (jason@deneb.cygnus.com)
2694 * error.c (dump_expr): Support member functions (which show up as
2697 Mon Mar 14 16:24:36 1994 Mike Stump (mrs@cygnus.com)
2699 * init.c (build_new): Set the return type of multidimensional
2702 Fri Mar 11 15:35:39 1994 Kung Hsu (kung@mexican.cygnus.com)
2704 * call.c (build_method_call): if basetype not equal to type
2705 of the instance, use the type of the instance in building
2708 Thu Mar 10 17:07:10 1994 Kung Hsu (kung@mexican.cygnus.com)
2710 * parse.y (direct_notype_declarator): add push_nested_type for
2711 'template_type SCOPED_NAME' rule.
2713 Tue Mar 8 00:19:58 1994 Jason Merrill (jason@deneb.cygnus.com)
2715 * parse.y (parm): Add typed_declspec1 {absdcl, epsilon} rules.
2717 Sat Mar 5 04:47:48 1994 Jason Merrill (jason@deneb.cygnus.com)
2719 * parse.y (regcast_or_absdcl): New nonterminal to implement late
2720 reduction of constructs like `int ((int)(int)(int))'.
2721 (cast_expr): Use it.
2722 (sub_cast_expr): Everything that can come after a cast.
2723 (typed_declspecs1): typed_declspecs that are not typed_typespecs.
2724 (direct_after_type_declarator): Lose PAREN_STAR_PAREN rule.
2725 (direct_abstract_declarator): Replace '(' parmlist ')' rule with
2726 '(' complex_parmlist ')' and regcast_or_absdcl.
2728 (complex_parmlist): Parmlists that are not also typenames.
2729 (parms_comma): Enabler.
2730 (named_parm): A parm that is not also a typename. Use declarator
2731 rather than dont_see_typename abs_or_notype_decl. Expand
2732 typed_declspecs inline.
2733 (abs_or_notype_decl): Lose.
2734 (dont_see_typename): Comment out.
2735 (bad_parm): Break out abs_or_notype_decl into two rules.
2737 Fri Mar 4 18:22:39 1994 Jason Merrill (jason@deneb.cygnus.com)
2739 * decl2.c (reparse_decl_as_casts): New function to change parse
2740 nodes for `(int)(int)(int)' from "function taking int and returning
2741 function taking int and returning function taking int" to "... cast
2742 to int, cast to int, cast to int".
2744 * decl2.c (reparse_decl_as_expr): Recursive function to change
2745 parse nodes for `A()()' from "function returning function returning
2746 A" to "A().operator()".
2748 * parse.y (primary): Replace `typespec LEFT_RIGHT' rule with
2749 `typespec fcast_or_absdcl' rule.
2750 (fcast_or_absdcl): New nonterminal to implement late reduction of
2751 constructs like `A()()()()'.
2752 (typename): Replace `typespec absdcl1' rule with
2753 `typespec direct_abstract_declarator' rule.
2754 (direct_abstract_declarator): Replace `LEFT_RIGHT type_quals' rule
2755 with `fcast_or_absdcl type_quals' rule.
2757 Fri Mar 4 16:18:03 1994 Mike Stump (mrs@cygnus.com)
2759 * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it
2760 matches Section 5.5.
2762 Fri Mar 4 14:01:59 1994 Jason Merrill (jason@deneb.cygnus.com)
2764 * error.c (dump_type_prefix): Don't print basetype twice for
2767 Fri Mar 4 13:24:33 1994 Mike Stump (mrs@cygnus.com)
2769 * typeck.c (convert_arguments): Handle setHandler(A::handlerFn)
2770 so that it is like setHandler(&A::handlerFn). Cures an `invalid
2771 lvalue in unary `&''.
2773 Fri Mar 4 11:15:59 1994 Jason Merrill (jason@deneb.cygnus.com)
2775 * gxxint.texi (Copying Objects): New section discussing default
2776 op= problems with virtual inheritance.
2778 * decl2.c (grokoptypename): Just does grokdeclarator and
2779 build_typename_overload, since the parser can't call grokdeclarator
2782 * method.c (build_typename_overload): Set IDENTIFIER_GLOBAL_VALUE
2783 and TREE_TYPE on generated identifiers.
2785 * decl.c (grokdeclarator): Don't deal with TYPE_EXPRs anymore.
2787 * parse.y (parm): Convert `const char *' to `__opPCc' here.
2789 * error.c (dump_decl): Say sorry rather than my_friendly_aborting
2790 if we can't figure out what to do.
2791 (dump_type*): Ditto.
2793 * typeck2.c (build_m_component_ref): 'component' is an expr, not
2794 a decl. Also move the IS_AGGR_TYPE check after the stripping of
2797 Fri Mar 4 04:46:05 1994 Mike Stump (mrs@cygnus.com)
2799 * call.c (build_method_call): Handle b->setHandler(A::handlerFn)
2800 so that it is like b->setHandler(&A::handlerFn). Cures an `invalid
2801 lvalue in unary `&''.
2803 Thu Mar 3 12:38:15 1994 Jason Merrill (jason@deneb.cygnus.com)
2805 * parse.y: Add precedence specification for START_DECLARATOR.
2806 (type_quals): Move before primary.
2807 (typename): Move before typed_declspecs, add 'typespec absdcl1' rule.
2809 * decl2.c (grokoptypename): Lose.
2811 * decl.c (grokdeclarator): Parse TYPE_EXPRs in the initial scan,
2812 rather than waiting until later.
2814 Wed Mar 2 14:12:23 1994 Jason Merrill (jason@deneb.cygnus.com)
2816 * parse.y (unary_expr): Use 'typename' in 'new' rules, rather
2817 than expanding it inline.
2818 (typename): Expand empty option of (former) absdcl inline.
2819 (abs_or_notype_decl): Ditto.
2820 (absdcl): Lose empty rule.
2821 (conversion_declarator): New nonterminal for 'typename' of 'operator
2823 (operator_name): Use it instead of absdcl.
2825 * parse.y: Add precedence declarations for SCOPED_TYPENAME,
2827 (typed_declspecs): Accept typed_typespecs, rather than typespec
2828 directly. Add rules with reserved_typespecquals.
2829 (reserved_declspecs): Don't accept typespecqual_reserved at the
2830 beginning of the list. The typed_declspecs rule will deal with this
2832 (declmods): Accept nonempty_type_quals, rather than TYPE_QUAL
2835 * parse.y (direct_notype_declarator,
2836 direct_after_type_declarator, direct_abstract_declarator): Split up
2837 the declarator1 nonterminals to match the draft standard and avoid
2839 (new_type_id, new_declarator, direct_new_declarator,
2840 new_member_declarator): New nonterminals to implement the subset of
2841 'typename' allowed in new expressions.
2842 (unary_expr): Use new_type_id instead of typename.
2843 (after_type_declarator1, absdcl1): Fix semantics of member pointers.
2844 (abs_member_declarator, after_type_member_declarator): Lose.
2846 * parse.y (absdcl1): Don't require parens around
2847 abs_member_declarator.
2848 (abs_member_declarator): Lose see_typename from rules.
2849 (after_type_member_declarator): Ditto.
2851 * tree.c (get_identifier_list): New function, containing code
2852 previously duplicated in get_decl_list and list_hash_lookup_or_cons.
2853 (get_decl_list): Use it.
2854 (list_hash_lookup_or_cons): Ditto.
2856 * parse.y (typed_declspecs, declmods): It's not necessary to hash
2857 the declspecs on class_obstack, so don't. This way typed_typespecs
2858 can reduce to typed_declspecs.
2860 Wed Mar 2 14:29:18 1994 Jason Merrill (jason@cygnus.com)
2862 * cvt.c (build_up_reference): If we aren't checking visibility,
2863 also allow base->derived conversions.
2865 Mon Feb 28 15:14:29 1994 Per Bothner (bothner@kalessin.cygnus.com)
2867 * typeck.c (build_c_cast): Remove bogus hack when converting
2868 to a reference type.
2870 * cp-tree.h (lang_decl::vbase_init_list, DECL_VBASE_INIT_LIST):
2872 (lang_stype::methods, lang_decl::next_method): New fields.
2873 (CLASSTYPE_METHODS, DECL_NEXT_METHOD): New macros.
2874 * decl.c (duplicate_decls): Preserve DECL_NEXT_METHOD.
2876 * cp-tree.h, decl2.c (flag_vtable_hack): New flag.
2877 * decl2.c (finish_vtable_vardecl): If flag_vtable_hack,
2878 and !CLASSTYPE_INTERFACE_KNOWN, try to use the presence of
2879 a non-inline virtual function to control emitting of vtables.
2880 * class.c (finish_struct): Build CLASSTYPE_METHODS list.
2881 * search.c (build_vbase_vtables_init): Don't assemble_external
2882 (yet) if flag_vtable_hack.
2883 * class.c (build_vfn_ref): Ditto.
2885 Mon Feb 28 14:54:13 1994 Jason Merrill (jason@deneb.cygnus.com)
2887 * parse.y (component_decl): Don't include "typed_declspecs
2888 declarator ';'" speedup, since it breaks enums.
2890 Fri Feb 25 15:43:44 1994 Per Bothner (bothner@kalessin.cygnus.com)
2892 * class.c (finish_struct): Minor optimization for building
2895 Fri Feb 25 15:23:42 1994 Jason Merrill (jason@deneb.cygnus.com)
2897 * decl.c (start_function): Fix detection of function overloading.
2899 Thu Feb 24 22:26:19 1994 Mike Stump (mrs@cygnus.com)
2901 * lex.c (check_newline): #pragma interface can take a string
2902 argument, just like #pragma implementation. #pragma implementation
2903 checks for garbage on the line, line #pragma interface does. Main
2904 input files do not auto implement like named files, #pragma
2905 implementation must be used explicitly.
2907 Thu Feb 24 17:09:01 1994 Jason Merrill (jason@deneb.cygnus.com)
2909 * parse.y (components): Handle list of one again.
2910 (notype_components): Ditto.
2911 (after_type_declarator1): Take maybe_raises out again.
2913 * gxxint.texi (Parser): Document additional r/r conflict.
2915 Wed Feb 23 14:42:55 1994 Jason Merrill (jason@deneb.cygnus.com)
2917 * gxxint.texi (Parser): Add node.
2919 * Makefile.in (stamp-parse): Update expected conflict count.
2921 * parse.y (various): Replace "declmods declarator" with "declmods
2922 notype_declarator". The comment saying that "declmods declarator ';'"
2923 corresponds to "int i;" was wrong; it corresponds to "const i;".
2924 (component_decl): Add "typed_declspecs declarator ';'" rule; this
2925 *does* correspond to "int i;". Change "declmods components" to
2926 "declmods notype_components".
2927 (components): Don't deal with a list of one anymore.
2928 (notype_components): New nonterminal, corresponds to notype_declarator.
2929 ({after_,no}type_component_decl{,0}): More new nonterminals.
2930 ({after_,no}type_declarator): Fold in START_DECLARATOR token.
2931 Eliminates four reduce/reduce conflicts.
2933 (expr): Depend on nontrivial_exprlist instead of nonnull_exprlist.
2934 (nontrivial_exprlist): New nonterminal: A list of at least two
2936 (nonnull_exprlist): Depend on nontrival_exprlist.
2937 Eliminates four reduce/reduce conflicts.
2939 (named_class_head): Move intermediate code block into separate
2940 nonterminal so that we can stick %prec EMPTY on it.
2942 Add more %prec EMPTY's to eliminate remaining shift/reduce
2945 (after_type_declarator): Add maybe_raises to fndecl rules.
2946 (after_type_declarator_no_typename): Remove.
2949 Document remaining reduce/reduce conflicts.
2951 Tue Feb 22 12:10:32 1994 Jason Merrill (jason@deneb.cygnus.com)
2953 * search.c (get_base_distance): Only bash BINFO_INHERITANCE_CHAIN
2954 (TYPE_BINFO (type)) if we care about the path.
2956 * tree.c (lvalue_p): A COND_EXPR is an lvalue if both of the
2959 Mon Feb 21 19:59:40 1994 Mike Stump (mrs@cygnus.com)
2961 * Makefile.in (mostlyclean): lex.c is a source file, don't
2964 Sat Feb 19 01:27:14 1994 Jason Merrill (jason@deneb.cygnus.com)
2966 * parse.y: Eliminate 20 shift/reduce conflicts.
2968 Fri Feb 18 11:49:42 1994 Jason Merrill (jason@deneb.cygnus.com)
2970 * pt.c (type_unification): Add subr argument; if set, it means
2971 that we are calling ourselves recursively, so a partial match is OK.
2972 (unify): Support pointers to methods and functions.
2973 (tsubst): Support method pointers.
2974 * decl.c (build_ptrmemfunc_type): No longer static, so that
2975 tsubst can get at it.
2977 * init.c (is_aggr_typedef): Pretend template type parms are
2979 * decl2.c (build_push_scope): If cname refers to a template type
2980 parm, just grin and nod.
2982 * call.c (build_overload_call_real): Pass subr argument to
2984 * pt.c (do_function_instantiation): Ditto.
2985 * class.c (instantiate_type): Ditto.
2987 * search.c (get_base_distance): If BINFO is a binfo, use it and
2988 don't mess with its BINFO_INHERITANCE_CHAIN.
2990 * cvt.c (convert_to_reference): Fix temporary generation.
2991 If ambiguous, return error_mark_node.
2993 * init.c (build_new): Put back some necessary code.
2995 Thu Feb 17 15:39:47 1994 Jason Merrill (jason@deneb.cygnus.com)
2997 * init.c (build_new): Deal with array types properly.
2999 * search.c (get_binfo): Become a shell for get_base_distance.
3000 (get_binfo_recursive): Lose.
3001 (get_base_distance_recursive): Find the path to the via_virtual base
3002 that provides the most access.
3003 (get_base_distance): Ditto.
3005 * parse.y (explicit_instantiation): Syntax is 'template class
3006 A<int>', not 'template A<int>'.
3008 * typeck.c (convert_for_initialization): Remove bogus warning.
3010 * parse.y (datadef): Revert patch of Oct 27.
3012 Thu Feb 17 15:12:29 1994 Per Bothner (bothner@kalessin.cygnus.com)
3014 * class.c (build_vfn_ref): Cast delta field to ptrdiff_type_node,
3015 rather than integer_type_node. Does wonders for the Alpha.
3017 Thu Feb 17 13:36:21 1994 Jason Merrill (jason@deneb.cygnus.com)
3019 * decl.c (build_ptrmemfunc_type): Make sure that the pmf type
3020 goes onto the same obstack as its target type.
3022 Wed Feb 16 00:34:46 1994 Jason Merrill (jason@deneb.cygnus.com)
3024 * cvt.c (convert_to_reference): If converting via constructor
3025 on local level, go back to build_cplus_new approach.
3027 * tree.c (build_cplus_new): If with_cleanup_p, set cleanup slot
3028 to error_mark_node to prevent expand_expr from building a cleanup
3031 * lex.c (default_assign_ref_body): Return *this from the memcpy
3034 * decl.c (grok_reference_init): Just return if called with
3035 error_mark_node, don't worry about initializing non-const reference
3038 * cvt.c (convert_to_reference): Do the right thing for
3039 non-aggregate reference conversions, pedwarn when generating a
3040 non-const reference to a temporary.
3042 * class.c (finish_struct): TYPE_HAS_COMPLEX_{INIT,ASSIGN}_REF and
3043 TYPE_NEEDS_CONSTRUCTING all depend on TYPE_USES_VIRTUAL_BASECLASSES
3046 Tue Feb 15 19:47:19 1994 Jason Merrill (jason@deneb.cygnus.com)
3048 * decl.c (grok_reference_init): Pawn off a lot of the work on
3049 convert_to_reference. Generally do the right thing.
3051 * cvt.c (convert_to_reference): Conform to the initial comment;
3052 i.e. don't create temps if decl != error_mark_node. Handle
3053 cleanups better for temps that do get created. Don't pretend
3054 that we can use an 'A' to initialize a 'const double &' just by
3055 tacking on a NOP_EXPR. Support LOOKUP_SPECULATIVELY.
3057 * call.c (build_method_call): Set TREE_HAS_CONSTRUCTOR on
3060 Mon Feb 14 14:50:17 1994 Jason Merrill (jason@deneb.cygnus.com)
3062 * decl.c (grok_reference_init): Make a temporary for initializing
3063 const reference from constant expression.
3065 Mon Feb 14 11:31:31 1994 Per Bothner (bothner@kalessin.cygnus.com)
3067 * cp-tree.h, decl.c (set_identifier_local_value): Deleted function.
3068 * decl.c (pushdecl): Define decl in correct binding_level
3069 (which isn't always the inner_binding_level).
3071 * cvt.c (build_up_reference): Don't ever call expand_aggr_init.
3072 It's ugly, and I don't think it's the right thing to do.
3074 * cp-tree.h, class.c, decl.c, decl2.c, sp/search.c:
3075 Remove NEW_CLASS_SCOPING, assuming it is always 1.
3076 * decl.c (pop_decl_level): Removed; manually inlined.
3078 Sun Feb 13 19:04:56 1994 Jason Merrill (jason@deneb.cygnus.com)
3080 * class.h (candidate): Add basetypes field.
3082 * call.c (build_method_call): Do access checking after choosing a
3083 function, not before.
3085 * Makefile.in (cvt.o, call.o, method.o): Depend on class.h.
3086 (mostlyclean): Remove ../cc1plus.
3088 Fri Feb 11 11:52:26 1994 Jason Merrill (jason@deneb.cygnus.com)
3090 * class.c (finish_struct): Don't allow adjusting access to a field
3091 of a base class if a local field has the same name.
3093 * error.c (dump_type_prefix): Output basetype for METHOD_TYPEs.
3095 hu Jan 13 17:55:51 EST 1994 Gnanasekaran Swaminathan (gs4t@virginia.edu)
3097 * cp-tree.h (DESTRUCTOR_NAME_P): do not confuse AUTO_TEMP names
3098 with destructor names when either NO_DOLLAR_IN_LABEL or
3099 NO_DOT_IN_LABEL are not defined.
3101 Now `template <class T, T f(T&), const T*> class A {...}' works.
3103 * pt.c (grok_template_type): substitute template parm types
3104 with actual types in complex type as well.
3105 (coerce_template_parms): update the grok_template_type ()
3108 * pt.c (tsubst): Traverse method list using DECL_CHAIN.
3110 * decl.c (grok_op_properties): Allow operator++/-- to have
3113 * typeck2.c (store_init_value): Don't abort when called to
3114 initialize a type that needs constructing with a CONSTRUCTOR.
3116 * init.c (expand_aggr_init_1, CONSTRUCTOR case): If
3117 store_init_value fails, build and expand an INIT_EXPR. If
3118 store_init_value succeeds, call expand_decl_init.
3120 Fri Feb 11 02:49:23 1994 Mike Stump (mrs@cygnus.com)
3122 * class.c (build_vbase_path): Use complete_type_p instead of
3123 resolves_to_fixed_type_p to determine if the virtual bases are in
3124 their right place for the type of expr. Cures problem of thinking a
3125 virtual base class is one place, when it is in fact someplace else.
3127 Fri Feb 11 00:26:46 1994 Mike Stump (mrs@cygnus.com)
3129 * init.c (resolve_offset_ref): Make sure we first convert to
3130 intermediate type, if given, when dealing with members off `this'.
3131 Solves an incorrrect `type `foo' is not a base type for type
3132 `multiple'' when it is infact, a base type.
3134 Thu Feb 10 21:49:35 1994 Mike Stump (mrs@cygnus.com)
3136 * class.c (modify_other_vtable_entries): Use get_binfo, instead
3137 of binfo_value. Solves problem with compiler giving a `base class
3138 `B' ambiguous in binfo_value (compiler error)' on complex MI
3139 herarchies, when a virtual function is first defied in a virtual
3142 Thu Feb 10 17:19:32 1994 Mike Stump (mrs@cygnus.com)
3144 * class.c (build_vbase_path): Don't complain about ambiguous
3145 intermediate conversion when converting down to a virtual base
3146 class, even if they might seem to be ambiguous.
3148 Thu Feb 10 12:18:26 1994 Jason Merrill (jason@deneb.cygnus.com)
3150 * typeck2.c (build_functional_cast): #if 0 out constructor
3151 inheritance code, improve error messages.
3153 * class.c (finish_base_struct): Complain about base with only
3154 non-default constructors in derived class with no constructors.
3156 * decl.c (grokdeclarator): Fix detection of virtual new/delete.
3158 Wed Feb 9 22:02:32 1994 Mike Stump (mrs@cygnus.com)
3160 * search.c (build_mi_virtuals, add_mi_virtuals,
3161 report_ambiguous_mi_virtuals): Removed unneeded code.
3162 * class.c (finish_struct_bits): Ditto.
3164 Wed Feb 9 11:27:17 1994 Jason Merrill (jason@deneb.cygnus.com)
3166 * pt.c (end_template_instantiation): Push decl before
3169 * typeck2.c (build_m_component_ref): Make sure datum is of
3172 * init.c (get_type_value): New function, returns
3173 IDENTIFIER_TYPE_VALUE or IDENTIFIER_CLASS_TYPE_VALUE or NULL_TREE.
3175 * call.c (build_method_call): Don't die on call to destructor for
3178 * decl.c (grokdeclarator): Complain about virtual op new and op
3179 delete, make static virtuals unvirtual instead of unstatic.
3181 * typeck.c (build_c_cast): Also call default_conversion on
3184 * decl.c (grokdeclarator): Don't complain about anonymous
3187 * parse.y (simple_stmt, for loops): Move the continue point after
3190 * class.c (finish_struct): Fix setting of
3191 TYPE_HAS_COMPLEX_INIT_REF.
3193 Tue Feb 8 13:21:40 1994 Jason Merrill (jason@deneb.cygnus.com)
3195 * init.c (build_new): Deal with `new double (1)'.
3197 * class.c (finish_struct): TYPE_HAS_COMPLEX_*_REF are supersets of
3198 TYPE_HAS_REAL_*_REF, but TYPE_HAS_COMPLEX_INIT_REF is independent of
3199 TYPE_NEEDS_CONSTRUCTING.
3201 * decl.c (duplicate_decls): Propagate access decls.
3203 * typeck2.c (process_init_constructor): Accept empty_init_node
3204 for initializing unions.
3206 * class.c, lex.c, cp-tree.h: Use
3207 TYPE_HAS_COMPLEX_ASSIGN_REF where TYPE_HAS_REAL_ASSIGN_REF was used
3208 before, use TYPE_HAS_COMPLEX_INIT_REF for TYPE_NEEDS_CONSTRUCTING in
3211 * decl.c (finish_decl): Don't complain about uninitialized const
3212 if it was initialized before.
3214 Mon Feb 7 18:12:34 1994 Jason Merrill (jason@deneb.cygnus.com)
3216 * lex.c (default_assign_ref_body): Don't deal with vbases for
3219 * decl.c (finish_decl): Fix reversed logic for objects and other
3220 things that need to be constructed but have no initializer.
3222 * class.c (finish_struct): Don't set TYPE_HAS_* flags that are
3223 set by grok_op_properties or finish_decl.
3225 * decl.c: Don't warn about extern redeclared inline unless
3226 -Wextern-inline is given.
3227 * decl2.c (lang_decode_option): Ditto.
3230 Mon Feb 7 17:29:24 1994 Per Bothner (bothner@kalessin.cygnus.com)
3232 * decl.c (pushdecl_with_scope): Fix thinko. Add forward
3235 * decl.c (pushdecl_with_scope): New function.
3236 * decl.c (pushdecl_top_level): Use new function.
3237 * decl.c (pushtag): Initialize newdecl.
3238 * decl.c (pushtag): Push new type decl into correct scope.
3240 Mon Feb 7 14:42:03 1994 Jason Merrill (jason@deneb.cygnus.com)
3242 * call.c, cvt.c, init.c, search.c, cp-tree.h:
3243 Eradicate LOOKUP_PROTECTED_OK.
3245 Mon Feb 7 13:57:19 1994 Per Bothner (bothner@kalessin.cygnus.com)
3247 * decl.c (pushtag, xref_tag), cp-tree.h: Add extra parameter
3248 'globalize' to signify implicit declarations.
3249 * decl.c (globalize_nested_type, maybe_globalize_type): Removed.
3250 * decl.c (set_identifier_type_value_with_scope): New function.
3251 * decl.c (set_identifier_local_value): Simplify.
3252 * spew.c (yylex, do_addr): Modify to return a _DEFN if a
3253 forward declaration (followed by ';' and not preceded by 'friend').
3254 * class.c, decl.c, except.c, init.c, parse.y,
3255 pt.c, search.c: Add new argument to calls to xref_tag and
3258 Mon Feb 7 00:22:59 1994 Jason Merrill (jason@deneb.cygnus.com)
3260 * cp-tree.h (ACCESSIBLY_UNIQUELY_DERIVED_P): New macro, means what
3261 ACCESSIBLY_DERIVED_FROM_P meant before.
3262 (ACCESSIBLY_DERIVED_FROM_P): Now disregards ambiguity.
3264 * cvt.c (build_up_reference): Call get_binfo with PROTECT == 1.
3266 * search.c (get_base_distance_recursive): Members and friends of
3267 a class X can implicitly convert an X* to a pointer to a private or
3268 protected immediate base class of X.
3269 (get_binfo_recursive): Ditto.
3270 (get_base_distance): Ignore ambiguity if PROTECT < 0.
3271 (get_binfo): Lose multiple values of PROTECT.
3272 (compute_access): Protected is OK if the start of the
3273 search is an accessible base class of current_class_type.
3275 * method.c (build_opfncall): Do check access on operator new here.
3277 * decl.c (finish_function): Don't check access on operator new
3280 Sun Feb 6 14:06:58 1994 Jason Merrill (jason@deneb.cygnus.com)
3282 * decl.c (xref_tag): The base of a derived struct is NOT always
3285 * pt.c (do_explicit_instantiation): New function, called from
3286 parser to do explicit function instantiation.
3287 (type_unification): Allow the args list to be terminated with
3289 (do_pending_expansions): Look at i->interface for non-member
3292 * parse.y (datadef): Move explicit_instantiation here.
3293 (structsp): From here.
3294 (datadef): Complain about `int;'.
3296 Sun Feb 6 12:33:18 1994 Per Bothner (bothner@kalessin.cygnus.com)
3298 * pt.c (end_template_instantiation), cp-tree.h: Remove unused
3299 second parameter, and simplify first from a TREE_LIST where
3300 we only care about its TREE_VALUE to just the value (an IDENTIFIER).
3301 * pt.c (instantiate_member_templates): Simplify argument list
3302 from a TREE_LIST to just an IDENTIFIER.
3303 * lex.c (yyprint): PRE_PARSED_CLASS_DECL is now just an IDENTIFIER.
3304 * parse.y (template_instantiate_once): Simplify accordingly.
3305 * decl.c (inner_binding_level): New. Use various places to
3308 Sun Feb 6 02:49:37 1994 Jason Merrill (jason@deneb.cygnus.com)
3310 * typeck2.c (build_functional_cast): int() -> int(0).
3312 Sat Feb 5 00:53:21 1994 Jason Merrill (jason@deneb.cygnus.com)
3314 * class.c (finish_struct): Don't do a bitwise copy for op= if the
3315 class has a virtual function table.
3317 * typeck.c (convert_for_initialization): Restore warnings about
3318 not using defined op=. Should really be my_friendly_aborts, I
3321 Fri Feb 4 14:21:00 1994 Jason Merrill (jason@deneb.cygnus.com)
3323 * class.c (finish_struct): Tidy up conditions for doing bitwise
3326 * decl.c (build_default_constructor): #if 0 out.
3328 * *: Eradicate TYPE_GETS_{ASSIGNMENT,ASSIGN_REF,CONST_ASSIGN_REF,
3329 CONST_INIT_REF}, TYPE_HAS_REAL_CONSTRUCTOR.
3331 * decl.c (grokdeclarator): Don't return void_type_node for
3332 friends being defined here.
3334 * init.c (perform_member_init): Only do the init if it's useful.
3336 * lex.c (default_copy_constructor_body): If we don't need to do
3337 memberwise init, just call __builtin_memcpy.
3338 (default_assign_ref_body): Ditto.
3340 * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0.
3342 Fri Feb 4 13:02:56 1994 Mike Stump (mrs@cygnus.com)
3344 * lex.c (reinit_parse_for_method, cons_up_default_function):
3345 Don't give warn_if_unknown_interface warning when it came from a
3347 * pt.c (end_template_decl, instantiate_template): Ditto.
3348 * decl.c (start_decl): Ditto.
3350 Fri Feb 4 00:41:21 1994 Jason Merrill (jason@deneb.cygnus.com)
3352 * decl.c (grokdeclarator): Don't try to set TYPE_WAS_ANONYMOUS on
3355 * decl2.c (constructor_name_full): Use IS_AGGR_TYPE_CODE instead of
3356 IS_AGGR_TYPE, since we don't know it's a type.
3358 Thu Feb 3 11:36:46 1994 Jason Merrill (jason@deneb.cygnus.com)
3360 * decl.c (grokdeclarator): Don't complain about anonymous unions.
3362 * cp-tree.h (TYPE_WAS_ANONYMOUS): This struct was originally
3363 anonymous, but had a name given to it by a typedef.
3365 * decl.c (grokdeclarator): When renaming an anonymous struct, set
3368 * decl2.c (constructor_name_full): Use TYPE_WAS_ANONYMOUS.
3370 * cp-tree.h (DECL_UNDEFINED_FRIENDS): #if 0 out.
3372 * init.c (xref_friend): Don't set up DECL_UNDEFINED_FRIENDS.
3373 (embrace_waiting_friends): Don't use DECL_UNDEFINED_FRIENDS.
3375 * decl.c (grokdeclarator): Set TYPE_NESTED_NAME properly on nested
3376 anonymous structs that get typedef'd.
3378 * decl.c (grokdeclarator): Always return void_type_node for
3381 * error.c (dump_function_decl): Don't use DECL_CLASS_CONTEXT for
3383 (dump_function_decl): Don't print out default args for
3384 a function used in an expression.
3386 * decl.c (grokdeclarator): Give error on abstract declarator used
3387 in an invalid context (i.e. `void (*)();').
3389 * error.c (cp_line_of): Support _TYPE nodes.
3390 (cp_file_of): Ditto.
3392 * cvt.c (build_up_reference): Don't abort if passed a SAVE_EXPR;
3393 it can happen for the RHS of an assignment stmt where the LHS is
3396 * init.c (expand_aggr_init_1): Deal with bracketed initializer
3399 * class.c (finish_struct): Deal with enumerators and typedefs
3402 Wed Feb 2 11:30:22 1994 Jason Merrill (jason@deneb.cygnus.com)
3404 * class.c (finish_struct): Tidy up loop over fields.
3406 * errfn.c (cp_thing): Don't advance twice after a format.
3408 * class.c (finish_struct): Complain about needing a constructor
3409 if a member has only non-default constructors, and don't try to
3410 generate a default constructor.
3412 * decl.c (finish_decl): Also do the constructor thing if
3413 TYPE_NEEDS_CONSTRUCTING is set (for arrays).
3415 * search.c (unuse_fields): New function: mark all fields in this
3417 (dfs_unuse_fields): Helper function.
3419 * class.c (pushclass): If the new class is the same as the old
3420 class, still unuse the fields.
3421 (unuse_fields): Move to search.c.
3423 * decl.c (grok_op_properties): Add friendp argument.
3424 (grokfndecl): Pass it.
3425 (start_method): Ditto.
3427 * decl2.c (delete_sanity): Add use_global_delete parameter to catch
3430 * parse.y (unary_expr): Pass new parameter to delete_sanity.
3432 * lex.c (default_copy_constructor_body): Don't choke if the union
3434 (default_assign_ref_body): Ditto.
3436 * call.c (compute_conversion_costs_ansi): Do the right thing for
3439 * decl.c (push_to_top_level): Optimize.
3441 * decl.c (start_function): Look for the lexical scope of a friend
3442 in DECL_CLASS_CONTEXT.
3444 * init.c (do_friend): Set DECL_CLASS_CONTEXT on global friends.
3446 Tue Feb 1 15:59:24 1994 Jason Merrill (jason@deneb.cygnus.com)
3448 * cp-tree.h (TREE_GETS_PLACED_NEW): New macro.
3450 * init.c (init_init_processing): Don't assign BIN/BID to the
3451 IDENTIFIER_GLOBAL_VALUEs of their respective operators.
3452 (build_new): Check TREE_GETS_PLACED_NEW.
3454 * decl.c (grok_op_properties): Don't set TREE_GETS_NEW for a decl of
3455 op new with placement, set TREE_GETS_PLACED_NEW.
3457 * cp-tree.h (ANON_UNION_P): New macro. Applies to decls.
3459 * class.c (finish_struct): Don't treat anonymous unions like
3460 other aggregate members. Do synthesize methods for unions without
3461 a name, since they may or may not be "anonymous unions".
3463 * decl2.c (grok_x_components): Wipe out memory of synthesized methods
3464 in anonymous unions.
3466 * lex.c (default_copy_constructor_body): Support unions.
3467 (default_assign_ref_body): Ditto.
3469 Mon Jan 31 12:07:30 1994 Jason Merrill (jason@deneb.cygnus.com)
3471 * cp-tree.h: Fix documentation of LOOKUP_GLOBAL, add prototypes.
3473 * error.c (args_as_string): New function (%A), like type_as_string
3474 except NULL_TREE -> "..."
3476 * call.c (build_overload_call_real): Fix for new overloading.
3478 * decl.c (grok_op_properties): Set all of the TYPE_OVERLOADS_* flags
3481 * parse.y (operator_name): Instead of here.
3483 * typeck2.c (build_functional_cast): Treat a TREE_LIST as a list
3486 * call.c (build_overload_call_real): Support LOOKUP_SPECULATIVELY.
3488 * method.c (build_opfncall): Don't need to massage return value
3489 any more, call build_overload_call with all flags.
3491 * typeck.c (build_x_binary_op): Put back speculative call to
3493 (build_x_unary_op): Ditto.
3494 (build_x_conditional_expr): Ditto.
3496 Mon Jan 31 10:00:30 1994 Mike Stump (mrs@cygnus.com)
3498 * cvt.c (build_type_conversion_1): Change call to pedwarn into
3499 warning, and conditionalize upon warn_cast_qual.
3501 Fri Jan 28 11:48:15 1994 Jason Merrill (jason@deneb.cygnus.com)
3503 * search.c (lookup_field): If xbasetype is a binfo, copy it to
3504 avoid clobbering its inheritance info.
3506 * call.c (build_method_call): Don't overwrite basetype_path with
3507 TYPE_BINFO (inst_ptr_basetype) if they have the same type.
3509 * search.c (compute_access): Fix handling of protected inheritance
3510 and friendship with the enclosing class.
3512 * typeck2.c (store_init_value): Allow passing of TREE_CHAIN for
3513 initialization of arbitrary variable.
3515 * typeck2.c (build_functional_cast): Only try calling a method if
3518 * decl.c (grokdeclarator): Move handling of constructor syntax
3519 initialization into first loop for generality.
3520 (parmlist_is_random): Lose.
3522 * lex.c (cons_up_default_function): Set TREE_PARMLIST on arguments
3523 to default function.
3525 Thu Jan 27 19:26:51 1994 Jason Merrill (jason@deneb.cygnus.com)
3527 * decl.c (grokparms): Abort if we get called with something we don't
3530 Thu Jan 27 17:37:25 1994 Mike Stump (mrs@cygnus.com)
3532 * call.c (build_overload_call_real): Change argument complain to
3533 flags to match style of rest of code. Pass it down to
3534 build_function_call_real as necessary.
3535 * call.c (build_overload_call, build_overload_call_maybe): Change
3536 argument complain to flags to match style of rest of code.
3537 * cp-tree.h (build_function_call_real): Added fourth flags
3539 * cvt.c (convert_to_reference): Only give warning messages, if
3540 LOOKUP_COMPLAIN is set.
3541 * typeck.c (build_x_function_call): Change simple complain
3542 argument to build_overload_call_maybe and build_overload_call, to
3543 LOOKUP_COMPLAIN to match style of rest of code.
3544 * typeck2.c (build_functional_cast): Ditto.
3545 * typeck.c (build_function_call_real): Add flags, so that we can
3546 not complain, if we don't want to complain. Complain about
3547 arguments, if we are complaining, otherwise don't.
3548 * typeck.c (build_function_call, build_function_call_maybe):
3549 Stick in flags argument.
3550 * typeck.c (build_x_binary_op, build_x_unary_op,
3551 build_x_conditional_expr, build_x_compound_expr): Follow style of
3552 build_x_indirect_ref, as it is more correct and more common.
3554 Thu Jan 27 14:36:20 1994 Jason Merrill (jason@deneb.cygnus.com)
3556 * call.c (build_method_call): Don't check for being called with
3559 * decl2.c (finish_file): Don't play with DECL_CLASS_CONTEXT for the
3560 static initializer function.
3562 * init.c (build_member_call): Use convert_force here, too.
3564 * search.c (compute_access): Only treat static members specially
3565 if they are referenced directly.
3567 Wed Jan 26 18:28:14 1994 Jason Merrill (jason@deneb.cygnus.com)
3569 * gxxint.texi (Access Control): New node.
3571 * search.c (current_scope): New function; returns whichever of
3572 current_class_type and current_function_decl is the most nested.
3573 (compute_access): Total overhaul to make it clearer and more
3574 correct. Don't use the cache for now; in the only situation where
3575 it was used before, it gained nothing. This frees up three of the
3576 DECL_LANG_FLAGs for possible other use!
3578 * cp-tree.h: #if 0 out DECL_PUBLIC & friends.
3580 * typeck.c (build_component_ref_1): Don't check DECL_PUBLIC.
3582 * call.c (build_method_call): Use convert_force to cast `this' --
3583 rely on the access checking for the method itself.
3585 * init.c (is_friend): Do the nesting thing, handle types. I am
3587 (is_friend_type): Become a shell for is_friend.
3588 (add_friend): Never stick in ctype.
3589 Why are the friendship functions in init.c, anyway?
3591 Wed Jan 26 17:50:00 1994 Mike Stump (mrs@cygnus.com)
3593 * cvt.c (build_type_conversion_1): Don't conditionalize call to
3594 pedwarn upon pedantic.
3596 Wed Jan 26 17:20:46 1994 Mike Stump (mrs@cygnus.com)
3598 * cvt.c (convert_to_reference): Add 8.4.3 checking so that one
3599 gets a warning if one tries to initialize a non-const & from a
3601 * cvt.c (convert_to_reference): Use %P format for argument
3602 numbers in warnings.
3604 Wed Jan 26 14:35:06 1994 Mike Stump (mrs@cygnus.com)
3606 * init.c (build_delete): Follow style in call.c to construct the
3607 virtual call to the desctructor, as that code is right. Fixes a
3608 problem of the compiler saying a pointer conversion is ambiguous.
3610 Wed Jan 26 11:28:14 1994 Jason Merrill (jason@deneb.cygnus.com)
3612 * cp-tree.h (VTABLE_NAME_P): Change other occurrence of
3613 VTABLE_NAME_FORMAT to VTABLE_NAME.
3615 * *: s/visibility/access/g
3617 Tue Jan 25 18:39:12 1994 Jason Merrill (jason@deneb.cygnus.com)
3619 * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR.
3621 Tue Jan 25 13:54:29 1994 Mike Stump (mrs@cygnus.com)
3623 * init.c (build_delete): Back out Jan 17th & 18th pacthes, as
3626 Tue Jan 25 13:11:45 1994 Jason Merrill (jason@deneb.cygnus.com)
3628 * decl.c (duplicate_decls): Fix pointer arithmetic.
3630 Mon Jan 24 15:50:06 1994 Chip Salzenberg (chip@fin.uucp)
3632 [ cp-* changes propagated from c-* changes in 940114 snapshot ]
3633 * cp-parse.y (maybe_attribute): Allow multiple __attribute__
3634 clauses on a declaration.
3636 Mon Jan 24 17:06:23 1994 Jason Merrill (jason@deneb.cygnus.com)
3638 * class.c (finish_struct): Do synthesize methods for anon
3639 structs, just not unions.
3641 Mon Jan 24 13:50:13 1994 Kung Hsu (kung@mexican.cygnus.com)
3643 * decl.c (xref_tag): handle anonymous nested type.
3644 * decl.c (globalize_nested_type): add no globalize bit check.
3645 * spew.c (hack_more_ids) : templated nested decl not push top
3648 * parse.y : get rid of 'goto do_components'. It is much better
3651 * decl.c (is_anon_name): get rid of the function and use the
3652 macro ANON_AGGRNAME_P.
3655 Fri Jan 21 14:06:02 1994 Jason Merrill (jason@deneb.cygnus.com)
3657 * class.c (finish_struct): Don't synthesize any methods for
3658 anonymous structs/unions.
3660 * typeck.c (build_modify_expr): Don't treat pmf's as class objects.
3662 Thu Jan 20 18:56:46 1994 Jason Merrill (jason@deneb.cygnus.com)
3664 * method.c (build_opfncall): Call build_indirect_ref on
3665 synthesized instance for operator delete.
3667 * pt.c (type_unification): Don't abort if called with a list of
3670 * class.c (instantiate_type): Deal with function templates.
3672 Thu Jan 20 16:55:35 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
3674 * Makefile.in (CC): Default to cc not gcc.
3676 Thu Jan 20 13:47:54 1994 Jason Merrill (jason@deneb.cygnus.com)
3678 * typeck.c (build_modify_expr): Call constructor if appropriate.
3680 * decl.c (push_to_top_level): Clear out class-level bindings cache.
3682 Wed Jan 19 13:51:22 1994 Jason Merrill (jason@deneb.cygnus.com)
3684 * call.c (resolve_scope_to_name): Work recursively (previously only
3685 looked down one level).
3687 * lex.c (do_pending_inlines): If we're still dealing with the last
3688 batch of inlines, don't start working on a new one.
3690 * Makefile.in (stamp-parse): Update conflict count.
3693 * parse.y (explicit_instantiation): New rule; implements
3694 'template A<int>' syntax (though not 'template foo(int)' yet).
3695 (structsp): Add explicit_instantiation.
3697 Tue Jan 18 13:53:05 1994 Jason Merrill (jason@deneb.cygnus.com)
3699 * class.c (finish_struct, etc.): Simplify decision to synthesize
3702 * call.c, class.c, cp-tree.h, decl.c, init.c,
3703 ptree.c, search.c, typeck.c, typeck2.c: Nuke
3704 TYPE_NEEDS_CONSTRUCTOR (change all calls to TYPE_NEEDS_CONSTRUCTING).
3705 * init.c (expand_aggr_init_1): Don't try non-constructor methods
3706 of initializing objects.
3707 (build_new): Don't try other methods if the constructor lookup fails.
3709 * class.c (finish_base_struct): Set cant_have_default_ctor and
3710 cant_synth_copy_ctor properly.
3711 (finish_struct): Ditto.
3713 Mon Jan 17 13:58:18 1994 Jason Merrill (jason@deneb.cygnus.com)
3715 * typeck.c (build_modify_expr_1): #if 0 out again.
3716 (build_modify_expr): #if 0 out memberwise init code again.
3718 * lex.c (default_copy_constructor_body): Be const-correct.
3719 (default_assign_ref_body): Ditto.
3721 * init.c (perform_member_init): Use TYPE_HAS_CONSTRUCTOR to decide
3722 whether or not to use it, rather than TYPE_NEEDS_CONSTRUCTING.
3723 (expand_aggr_init): Disable silent conversion from initializer list
3724 to list of args for a constructor.
3726 * class.c (base_info): Lose needs_default_ctor.
3727 (finish_base_struct): Ditto.
3728 (finish_struct): Ditto.
3730 * decl.c (init_decl_processing): Don't turn off flag_default_inline
3731 just because flag_no_inline is on.
3732 (finish_decl): Use TYPE_HAS_CONSTRUCTOR to decide to use
3735 * class.c (finish_struct): Synthesize default ctor whenever
3738 * Makefile.in (TAGS): Don't try to run etags on cp-parse.y.
3740 Sat Jan 15 18:34:33 1994 Mike Stump (mrs@cygnus.com)
3742 * Makefile.in, configure: Handle the C++ front-end in a
3744 * cp-*: Move C++ front-end to cp/*.
3746 Fri Jan 14 14:09:37 1994 Jason Merrill (jason@deneb.cygnus.com)
3748 * cp-typeck.c (build_function_call_real): Modify to match other
3749 instances of taking the address of the function.
3751 * cp-class.c (finish_struct): Set TYPE_HAS_REAL_CONSTRUCTOR to 1 if
3752 there are non-synthesized constructors.
3753 Only set TYPE_NEEDS_CONSTRUCTOR if TYPE_HAS_REAL_CONSTRUCTOR.
3754 Always generate copy constructor if possible.
3756 * cp-tree.h (lang_type): Add has_real_constructor bitfield.
3757 (TYPE_HAS_REAL_CONSTRUCTOR): Define.
3759 * cp-lex.c (default_copy_constructor_body): Use init syntax
3762 * cp-type2.c (store_init_value): Only give error for initializer list
3763 if TYPE_HAS_REAL_CONSTRUCTOR.
3765 Thu Jan 13 15:38:29 1994 Jason Merrill (jason@deneb.cygnus.com)
3767 * cp-tree.h (DECL_SYNTHESIZED): Add defn.
3768 (lang_decl): Add synthesized bitfield to decl_flags.
3770 * cp-lex.c (cons_up_default_function): Use DECL_SYNTHESIZED to mark
3771 artificial methods, rather than a line # of 0.
3773 Fri Jan 14 18:25:29 1994 Kung Hsu (kung@mexican.cygnus.com)
3775 * cp-decl (xref_tag): fix a bug in conflict type.
3776 * cp-parse.y : add SCOPED_NAME for uninstantiated template nested
3778 * cp-spew.c (yylex) : generated SCOPED_NAME token.
3779 * cp-lex.c (yyprint): handle SCOPED_NAME.
3781 Fri Jan 14 17:00:29 1994 Mike Stump (mrs@cygnus.com)
3783 * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is
3786 Thu Jan 13 14:00:35 1994 Kung Hsu (kung@mexican.cygnus.com)
3788 * cp-decl2.c (grok_x_components): fix a bug that enum type does not
3791 Thu Jan 13 11:39:34 1994 Mike Stump (mrs@cygnus.com)
3793 Ensure that all vtable pointers are initialized with all the right
3796 * cp-class.c (is_normal): Changed to reflect new meaning of
3797 CLASSTYPE_VFIELD_PARENT.
3798 * cp-class.c (maybe_fixup_vptrs): Use of
3799 CLASSTYPE_NEEDS_VIRTUAL_REINIT here is misguided. Use
3800 BINFO_MODIFIED instead.
3801 * cp-class.c (finish_struct): Changed to reflect new meaning of
3802 CLASSTYPE_VFIELD_PARENT.
3803 * cp-decl.c (get_binfo_from_vfield): Removed, unneeded now.
3804 * cp-decl.c (finish_function): Use init_vtbl_ptrs, instead of open
3806 * cp-init.c (init_vfields): Changed name to init_vtbl_ptrs, and
3808 * cp-init.c (emit_base_init): Use new name init_vtbl_ptrs.
3809 * cp-tree.h (vfield_parent): Changed to integer.
3810 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Changed docs to reflect new
3812 * cp-tree.h (init_vtbl_ptrs): Added init_vtbl_ptrs.
3814 Wed Jan 12 18:24:16 1994 Kung Hsu (kung@mexican.cygnus.com)
3816 * cp-decl.c (xref_tag): re-implement globalize nested type.
3817 * cp-decl2.c (grok_x_components): ditto.
3818 * cp-parse.y: ditto.
3819 * cp-tree.h (lang_type): add no_globalize bit in type_flags.
3821 Wed Jan 12 14:08:09 1994 Jason Merrill (jason@deneb.cygnus.com)
3823 * cp-decl.c (grokdeclarator): Don't set TREE_PUBLIC on friend
3824 decls with a definition attached.
3826 * cp-typeck.c (build_modify_expr): Undo previous change in the case
3829 Tue Jan 11 19:33:03 1994 Jason Merrill (jason@deneb.cygnus.com)
3831 * cp-typeck.c (build_modify_expr): Replace code for generating
3832 assignment semantics for classes with an error.
3833 (build_modify_expr_1): #if 0 out.
3835 * cp-decl.c (pushdecl): Patch bogus design of pushdecl
3836 behavior for overloaded functions (it doesn't push anything).
3838 * cp-class.c (finish_struct): When generating default op=,
3839 set TYPE_HAS_ASSIGNMENT.
3841 Mon Jan 10 18:48:06 1994 Mike Stump (mrs@cygnus.com)
3843 * cp-cvt.c (convert): Make {double, clashing enum} -> enum
3845 * cp-typeck.c (convert_for_assignment): Simplify.
3846 * cp-decl2.c (warn_enum_clash): Removed.
3847 * invoke.texi (-Wenum-clash): Removed.
3848 * toplev.c (-Wenum-clash): Removed.
3850 Mon Jan 10 17:48:37 1994 Kung Hsu (kung@mexican.cygnus.com)
3852 * cp-decl.c (finish_decl): fix incorrect popclass call.
3854 * cp-decl.c (is_anon_name): new function, check whether the name
3855 is anonymous name generated by compiler.
3856 * cp-decl.c (grokdeclarator): allow nested SCOPE_REF
3857 * cp-spew.c (hack_more_ids): handle nested type in template.
3858 * cp-parse.y : handle nested type reference in uninstantiated
3860 * cp-call.c (build_method_call): handle uninstantiated template
3862 * cp-pt.c (search_nested_type_in_tmpl): new function, search nested
3864 * cp-pt.c (lookup_nested_type_by_name): new function, lookup nested
3866 * cp-pt.c (tsubst): handle nested type search by name.
3868 Mon Jan 10 14:32:18 1994 Jason Merrill (jason@deneb.cygnus.com)
3870 * cp-init.c (build_member_call): Propagate qualifiers to new type.
3872 * cp-call.c (build_method_call): Count functions the new way.
3874 Fri Jan 7 19:03:26 1994 Jason Merrill (jason@deneb.cygnus.com)
3876 * cp-decl.c (pushtag): Set DECL_ASSEMBLER_NAME for nested classes,
3879 Tue Jan 4 16:45:51 1994 Kung Hsu (kung@cirdan.cygnus.com)
3881 * cp-parse.y: change to handle whether to globalize nested class.
3882 * cp-decl.c(xref_tag, maybe_globalize_type): Ditto.
3884 Mon Jan 3 22:22:32 1994 Gerald Baumgartner (gb@cygnus.com)
3886 * Makefile.in cp-call.c cp-class.c cp-cvt.c cp-decl.c cp-decl2.c
3887 cp-error.c cp-init.c cp-lex.c cp-lex.h cp-method.c cp-parse.y
3888 cp-spew.c cp-tree.c cp-tree.h cp-type2.c cp-typeck.c cp-xref.c
3889 gplus.gperf toplev.c: Incorporated C++ signature extension.
3890 * cp-sig.c: New file, contains most of signature processing.
3891 * cp-hash.h: Regenerated from gplus.gperf.
3893 * gcc.1 g++.1: Added explanation for the `-fhandle-signatures'
3894 and `-fno-handle-signatures' command line flags.
3896 * gcc.texi: Changed the last-modification date.
3897 * invoke.texi: Added `-fhandle-signatures' in the list of
3898 C++ language options. Added explanation for this option.
3900 Tue Dec 28 21:10:03 1993 Mike Stump (mrs@cygnus.com)
3902 * cp-init.c (expand_vec_init): Remove comptypes test, as it is too
3905 Tue Dec 28 13:42:22 1993 Mike Stump (mrs@cygnus.com)
3907 * cp-pt.c (do_pending_expansions): Decide to expand a template
3908 member function, based upon it's class type, not the class type of
3909 the first place it was declared.
3911 Tue Dec 28 05:42:31 1993 Mike Stump (mrs@cygnus.com)
3913 * cp-class.c (is_normal): New routine, use to determine when the
3914 given binfo is the normal one. (The one that should have the simple
3916 * cp-class.c (modify_other_vtable_entries): Use DECL_ASSEMBLER_NAME
3917 to check if two fndecls are `the same'. Sometimes this routine can
3918 modify the main vtable, and normal should be 1, in that case, so use
3919 is_normal() to determine if this is the main vtable for the class.
3920 Don't recurse down virtual bases, as they are shared, and we take
3921 care of them elsewhere.
3922 * cp-class.c (modify_vtable_entries): If we have already updated the
3923 vtable with the new virtual, don't do it again.
3924 * cp-class.c (finish_struct): Set CLASSTYPE_VFIELD_PARENT as
3925 appropriate. Do virtual function overriding in virtual bases, after
3926 normal overriding, so that the base function list in DECL_VINDEX is
3927 not overridden, before we have a chance to run through the list.
3928 Use DECL_ASSEMBLER_NAME to check if two fndecls are `the same'.
3929 Make sure we pass the right address into modify_vtable_entries.
3930 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): New field to indicate which
3931 binfo is the one that has the vtable that we based our vtable on.
3933 Fri Dec 24 09:40:52 1993 Michael Tiemann (tiemann@blues.cygnus.com)
3935 * cp-typeck.c (c_expand_start_case): Use default_conversion to
3936 convert expression from reference type if necessary.
3938 Wed Dec 22 17:58:43 1993 Jason Merrill (jason@deneb.cygnus.com)
3940 * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before
3941 trying to read its TREE_VALUE.
3943 * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here.
3944 (finish_struct): Instead of here.
3946 Tue Dec 21 14:34:25 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
3948 * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't
3949 have TYPE_PTRMEMFUNC_P set before we try to build its
3950 CLASSTYPE_ID_AS_LIST.
3951 (get_decl_list): Likewise, when trying to read it.
3953 * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined.
3954 (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT.
3956 Mon Dec 20 13:35:03 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
3958 * cp-typeck.c (rationalize_conditional_expr): New function.
3959 (unary_complex_lvalue): Use it.
3960 (build_modify_expr): Use it, since trying to do an ADDR_EXPR of it
3961 with build_unary_op won't cut it. Don't wrap the COND_EXPR with a
3964 * cp-decl2.c (explicit_warn_return_type): Deleted variable.
3965 (lang_decode_option): Set warn_return_type, not explicit_*, for
3966 -Wreturn-type and -Wall. This is what rest_of_compilation uses to
3967 decide if it should go into jump_optimize or not.
3968 * cp-tree.h (explicit_warn_return_type): Deleted.
3969 * cp-decl.c (grokdeclarator): Use warn_return_type, not explicit_*.
3970 (finish_function): Also complain about no return in a non-void fn if
3971 we're being pedantic (don't rely on use of -Wreturn-type).
3973 Fri Dec 17 15:45:46 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
3975 * cp-decl.c (grokdeclarator): Forbid declaration of a function as
3976 static if it's being done inside another function.
3978 * cp-search.c (compute_visibility): Check for friendship both ways.
3980 Fri Dec 17 14:28:25 1993 Jason Merrill (jason@deneb.cygnus.com)
3982 * cp-cvt.c (build_default_binary_type_conversion): Make error
3983 messages more helpful.
3985 * cp-error.c (op_as_string): New function, returns "operator =="
3986 given EQ_EXPR or suchlike.
3988 Fri Dec 17 13:28:11 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
3990 * cp-call.c (print_n_candidates): New function.
3991 (build_overload_call_real): Use it when we complain about a call
3994 Fri Dec 17 12:41:17 1993 Jason Merrill (jason@deneb.cygnus.com)
3996 * cp-call.c (build_method_call): Fix checking for static call
3999 * cp-method.c (build_opfncall): Call build_indirect_ref on argument
4002 * cp-init.c (build_new): Don't mess with rval when building
4005 Thu Dec 16 16:48:05 1993 Kung Hsu (kung@cirdan.cygnus.com)
4007 * cp-lex.c (default_assign_ref_body): add check when TYPE_NESTED_
4008 NAME(type) may not be exist. It's not a problem for old compiler.
4010 Thu Dec 16 14:46:06 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4012 * cp-tree.h (CLASSTYPE_ALTERS_VISIBILITIES_P): Delete macro, it's
4013 never used for anything.
4014 (struct lang_type, member type_flags): Delete field
4015 `alters_visibility', and up `dummy' by 1.
4016 * cp-class.c (finish_base_struct): Delete code that copies the
4017 setting of CLASSTYPE_ALTERS_VISIBILITIES_P.
4018 (finish_struct): Delete code that sets it.
4020 Thu Dec 16 14:44:39 1993 Jason Merrill (jason@deneb.cygnus.com)
4022 * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to
4023 build_method_call that I messed up before.
4025 * cp-search.c (get_base_distance): If protect > 1, allow immediate
4028 * cp-class.c (finish_base_struct): Set cant_synth_* correctly.
4029 (finish_struct): Ditto. Well, nigh-correctly; it won't deal
4030 properly with the case where a class contains an object of an
4031 ambiguous base class which has a protected op=. Should be fixed
4032 when the access control code gets overhauled.
4033 (finish_struct_methods): Set TYPE_HAS_NONPUBLIC_* correctly.
4035 Thu Dec 16 12:17:06 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4037 * cp-lex.c (real_yylex): Turn the code back on that deals with
4038 __FUNCTION__ and __PRETTY_FUNCTION__. Don't use lookup_name, to
4039 avoid the ambiguity problems that led to it being turned off in the
4042 * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P
4043 to see if something is a method.
4045 Wed Dec 15 18:35:58 1993 Mike Stump (mrs@cygnus.com)
4047 * cp-typeck.c (build_modify_expr): Avoid error messages on small
4049 * cp-typeck.c (convert_for_assignment): Add missing argument to
4050 cp_warning and cp_pedwarn calls.
4052 Wed Dec 15 18:25:32 1993 Jason Merrill (jason@deneb.cygnus.com)
4054 * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base
4055 initializers; it's just anachronistic.
4057 * cp-decl.c (finish_decl): Don't require external-linkage arrays
4058 to have a complete type at declaration time when pedantic.
4060 Tue Dec 14 11:37:23 1993 Jason Merrill (jason@deneb.cygnus.com)
4062 * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set.
4064 * cp-call.c (build_method_call): Don't dereference pointer given
4067 * cp-decl.c (finish_function): Don't pass pointer to
4069 (finish_function): Ditto.
4071 * cp-typeck.c (build_x_function_call): Ditto.
4073 * cp-method.c (build_component_type_expr): Ditto.
4075 * cp-init.c (build_member_call): Ditto.
4078 Mon Dec 13 18:04:33 1993 Kung Hsu (kung@cirdan.cygnus.com)
4080 * cp-decl.c (xref_tag): fix regression created by changes made
4082 * cp-decl.c (xref_defn_tag): fix parallel nested class problem.
4084 Fri Dec 10 12:40:25 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4086 * cp-call.c (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print
4087 out the final evaluation of the function, so we can see if ELLIPSIS,
4088 USER, and EVIL were set at the end.
4090 * cp-call.c (convert_harshness_ansi): When the parm isn't an lvalue,
4091 only go for setting TRIVIAL_CODE if we are dealing with types that
4094 Thu Dec 9 18:27:22 1993 Mike Stump (mrs@cygnus.com)
4096 * cp-decl.c (flag_huge_objects): New flag to allow large objects.
4097 * toplev.c (lang_options): Ditto.
4098 * cp-decl2.c (flag_huge_objects, lang_f_options): Ditto.
4099 * cp-decl.c (delta_type_node): New type for delta entries.
4100 * cp-tree.h (delta_type_node): Ditto.
4101 * cp-decl.c (init_decl_processing): Setup delta_type_node.
4102 * cp-decl.c (init_decl_processing, build_ptrmemfunc_type): Use
4103 delta_type_node instead of short_integer_type_node.
4104 * cp-class.c (build_vtable_entry): Ditto.
4106 Thu Dec 9 16:19:05 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4108 * cp-tree.h (OPERATOR_TYPENAME_P): Define outside of
4109 NO_{DOLLAR,DOT} macro checks, so it always gets defined.
4110 (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL.
4112 Wed Dec 8 17:38:06 1993 Mike Stump (mrs@cygnus.com)
4114 * cp-decl.c (finish_decl): Make sure things that can go into
4115 "common", do go into common, if -fcommon is given.
4117 Wed Dec 8 13:01:54 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4119 * cp-call.c (print_harshness) [DEBUG_MATCHING]: New function.
4120 (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print out
4121 argument matching diagnostics to make instantly clear what the
4124 * cp-call.c (convert_harshness_ansi): If the parm isn't an lvalue,
4125 then check to see if the penalty was increased due to
4126 signed/unsigned mismatch, and use a TRIVIAL_CODE if it wasn't.
4128 Tue Dec 7 18:29:14 1993 Kung Hsu (kung@cirdan.cygnus.com)
4130 * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution
4133 Tue Dec 7 16:09:34 1993 Jason Merrill (jason@deneb.cygnus.com)
4135 * cp-class.c (finish_struct): Before synthesizing methods, if no
4136 methods have yet been declared then set nonprivate_method. Don't
4137 set non_private method after synthesizing a method.
4139 * cp-lex.c (extract_interface_info): If flag_alt_external_templates
4140 is set, tie emitted code to the location of template instantiation,
4141 rather than definition.
4143 * cp-tree.h: Declare flag_alt_external_templates.
4145 * cp-decl2.c (lang_decode_option): Support -falt-external-templates.
4147 * toplev.c (lang_options): Ditto.
4149 Mon Oct 4 12:50:02 1993 Chip Salzenberg (chip@fin.uucp)
4151 [changes propagated from 930810 snapshot]
4152 * cp-decl.c (init_decl_processing): Make long long available for use
4153 as SIZE_TYPE and PTRDIFF_TYPE.
4154 (finish_decl): Allow file-scope static incomplete array.
4155 (grokdeclarator): Don't pass on const and volatile fron function
4156 value type to function type.
4157 Warn here for volatile fn returning non-void type.
4158 * cp-parse.y (attrib): Accept attributes `volatile' with alias
4159 `noreturn', and `const'.
4160 * cp-typeck.c (default_conversion): Don't lose const and volatile.
4161 (build_binary_op_nodefault): Generate pedantic warning for comparison
4162 of complete pointer type with incomplete pointer type.
4163 (build_c_cast): Be careful that null pointer constant be INTEGER_CST.
4165 Tue Dec 7 10:46:48 1993 Jason Merrill (jason@deneb.cygnus.com)
4167 * cp-init.c (expand_vec_init): When creating a temporary for copying
4168 arrays, use the type of the source, not the target.
4170 * cp-cvt.c (convert): Pass an argument for errtype to
4171 convert_to_reference.
4173 * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with
4174 methods, -> and `this'.
4176 Mon Dec 6 17:12:33 1993 Jason Merrill (jason@deneb.cygnus.com)
4178 * cp-error.c (parm_as_string): New function; returns `this' or arg
4179 number. Corresponds to %P.
4180 (dump_expr): Deal with method calls.
4182 * cp-cvt.c (convert_to_reference): Stop using warn_for_assignment.
4183 * cp-typeck.c (convert_for_assignment): Ditto.
4184 (warn_for_assignment): Lose.
4186 Mon Dec 6 11:33:35 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4188 * cp-call.c (ideal_candidate_ansi): Delete code that was never
4189 doing anything useful. Instead, sort once, and DO NOT wipe
4190 out any codes with EVIL_CODE, since that's what we use as a
4191 marker for the end of the list of candidates.
4193 * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN.
4195 Mon Dec 6 12:49:17 1993 Jason Merrill (jason@deneb.cygnus.com)
4197 * cp-init.c (get_aggr_from_typedef): New function, like
4198 is_aggr_typedef but returns the _TYPE.
4200 * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name.
4202 Sun Dec 5 18:12:48 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4204 * cp-lex.c (readescape): Pedwarn when a hex escape is out of range.
4206 Thu Nov 25 23:50:19 1993 Chip Salzenberg (chip@fin.uucp)
4208 Delay language context change until beginning of next decl.
4210 * cp-lex.h (c_header_level): Removed.
4211 (pending_lang_change): Declared.
4212 * cp-lex.c (c_header_level): Renamed from in_c_header, made static.
4213 (pending_lang_change): Defined.
4214 (check_newline): Rework code that recognizes line number and
4215 filename changes. Instead of pushing and popping lang context,
4216 increment and decrement pending_lang_change.
4217 (do_pending_lang_change): Push and pop lang context according
4218 to value of pending_lang_change.
4219 * cp-parse.y (extdefs): Use lang_extdef instead of extdef.
4220 (extdef): Same as extdef, but call do_pending_lang_change() first.
4222 Mon Nov 15 15:39:15 1993 Chip Salzenberg (chip@fin.uucp)
4224 * cp-typeck.c (build_binary_op_nodefault): Warn for ordered
4225 compare of ptr with 0 only if pedantic in both cases.
4227 Thu Nov 25 13:31:37 1993 Chip Salzenberg (chip@fin.uucp)
4229 Reinstate the below patch, which got lost in the Cygnus merge:
4230 Tue Nov 23 13:59:24 1993 Hallvard B Furuseth (hbf@durin.uio.no)
4231 * cp-parse.y (maybe_type_qual): Don't fail to set $$.
4233 Wed Nov 17 19:03:30 1993 Chip Salzenberg (chip@fin.uucp)
4235 * cp-parse.y (attrib): Allow "ident(ident)" like the C front end.
4237 Fri Oct 22 20:43:37 1993 Paul Eggert (eggert@twinsun.com)
4239 * cp-lex.c (real_yylex): Diagnose floating point constants
4242 Wed Nov 17 19:10:37 1993 Chip Salzenberg (chip@fin.uucp)
4244 * cp-type2.c (build_functional_cast): ARM page 16: When a class
4245 and an object, function or enumerator are declared in the same
4246 scope with the same name, the class name is hidden.
4248 Wed Nov 17 19:07:18 1993 Chip Salzenberg (chip@fin.uucp)
4250 * cp-call.c (convert_harshness_ansi): Distinguish float, double,
4251 and long double from each other when overloading.
4252 (compute_conversion_costs_{ansi,old}, build_method_call,
4253 build_overlay_call_real, convert_to_aggr): Always set and
4254 always use H_LEN member of candidate structure.
4256 Mon Oct 11 23:10:53 1993 Chip Salzenberg (chip@fin.uucp)
4258 * cp-decl.c (duplicate_decls): Note redeclarations of library
4259 functions, and generate distinct warnings for them.
4261 Mon Oct 4 12:26:49 1993 Chip Salzenberg (chip@fin.uucp)
4263 Support format warnings in G++.
4265 * cp-tree.h: Protect against multiple inclusion.
4266 Declare all public functions in c-common.c (copy from c-tree.h).
4267 (STDIO_PROTO): Define.
4268 (warn_format): Declare.
4269 (record_format_info): Remove declaration.
4270 * cp-decl.c (init_decl_processing): Call init_function_format_info.
4271 * cp-decl2.c (lang_decode_option): Make "-Wall" include warn_format.
4272 * cp-typeck.c (build_function_call_real): Call check_function_format.
4273 (record_format_info): Remove -- obsolete stub.
4275 Sat Jul 24 12:04:29 1993 Chip Salzenberg (chip@fin.uucp)
4277 * cp-decl.c (duplicate_decls): Don't warn for non-extern var decl
4278 following an extern one (for -Wredundant-decls).
4279 * cp-parse.y (primary): In statement expression case, if compstmt
4280 returns something other than a BLOCK, return it unchanged.
4282 Thu Dec 2 20:44:58 1993 Chip Salzenberg (chip@fin.uucp)
4284 * cp-decl.c (warn_extern_redeclared_static): New function made
4285 from code extracted from pushdecl.
4286 (duplicate_decls, pushdecl): Call new function.
4287 (lookup_name_current_level): Allow for IDENTIFIER_GLOBAL_VALUE
4288 to be a TREE_LIST when function is declared in 'extern "C" {}'.
4290 Fri Dec 3 16:01:10 1993 Jason Merrill (jason@deneb.cygnus.com)
4292 * cp-class.c (duplicate_tag_error): Use cp_error.
4293 (finish_base_struct): Check for ambiguity with direct base, and don't
4294 generate op= or copy ctor if it exists.
4296 Fri Dec 3 15:32:34 1993 Kung Hsu (kung@cirdan.cygnus.com)
4298 * cp-init.c (expand_member_init): when initializer name is null,
4299 don't try to build it now because emit_base_init will handle it.
4301 Fri Dec 3 12:28:59 1993 Jason Merrill (jason@deneb.cygnus.com)
4303 * cp-lex.c (init_lex): Initialize input_filename to "<internal>" for
4304 code such as ExceptionHandler::operator=.
4306 Fri Dec 3 10:32:08 1993 Jason Merrill (jason@deneb.cygnus.com)
4308 * cp-decl.c (grokdeclarator): Don't try to print out dname when
4309 complaining about arrays of references if decl_context==TYPENAME,
4310 since it will be null.
4312 * cp-decl2.c: Default to flag_ansi_overloading.
4314 Thu Dec 2 18:05:56 1993 Kung Hsu (kung@cirdan.cygnus.com)
4316 * cp-call.c (build_method_call): use binfo from instance if it's
4317 different from binfo (basetype_path) passed from above.
4319 Thu Dec 2 12:48:36 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4321 Wed Nov 17 19:14:29 1993 Chip Salzenberg (chip@fin.uucp)
4323 cp-error.c (dump_expr): Use unsigned chars to output a
4324 TREE_REAL_CST in hex.
4326 Thu Dec 2 11:05:48 1993 Jason Merrill (jason@deneb.cygnus.com)
4328 * cp-class.c (finish_struct): Fix typo in setting
4331 * cp-tree.h (TYPE_NESTED_NAME): New macro, does
4332 DECL_NESTED_TYPENAME (TYPE_NAME (NODE)).
4334 * cp-lex.c (default_copy_constructor_body): Change
4335 DECL_NAME (TYPE_NAME (btype)) to TYPE_NESTED_NAME (btype).
4336 (default_assign_ref_body): Ditto.
4337 (default_copy_constructor_body): Call operator= explicitly for
4338 base classes that have no constructor.
4340 Thu Dec 2 10:47:15 1993 Michael Tiemann (tiemann@blues.cygnus.com)
4342 * cp-call.c (build_method_call): If the instance variable is
4343 converted to error_mark_node when we're trying to convert it to the
4344 base type of a method we're looking up, return error_mark_node.
4346 Thu Dec 2 10:41:16 1993 Torbjorn Granlund (tege@cygnus.com)
4348 * cp-typeck.c (build_binary_op_nodefault): In *_DIV_EXPR *_MOD_EXPR
4349 cases, tests for unsigned operands by peeking inside a NOP_EXPR.
4351 Wed Dec 1 13:33:34 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4353 * cp-call.c (compute_conversion_costs_ansi): Use the size of struct
4354 harshness_code, not the size of short, for clearing out the
4357 * cp-call.c (print_candidates): New function.
4358 (build_method_call): When we had some candidates, but didn't get a
4359 usable match, don't report that we got an error with the first
4360 candidate. Instead, say there were no matches, and list the
4361 candidates with print_candidates. In the second pass, make sure we
4362 clear out ever_seen, so we can accurately count the number of
4363 functions that qualified.
4365 Wed Dec 1 09:53:59 1993 Torbjorn Granlund (tege@cygnus.com)
4367 * cp-typeck.c (build_binary_op_nodefault): Shorten for *_MOD_EXPR
4368 only if op1 is known to be != -1.
4369 (build_binary_op_nodefault): Handle *_DIV_EXPR likewise.
4371 Tue Nov 30 14:07:26 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4373 * cp-method.c (hack_identifier): If the field itself is private, and
4374 not from a private base class, say so.
4376 Mon Nov 29 03:00:56 1993 Jason Merrill (jason@deneb.cygnus.com)
4378 * cp-decl.c (grokdeclarator): Always warn on initialization of
4381 Wed Nov 24 00:49:35 1993 Jason Merrill (jason@deneb.cygnus.com)
4383 * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly.
4384 (finish_base_struct): Set cant_synth_asn_ref properly.
4386 * cp-lex.c (cons_up_default_function): Add section for operator=.
4387 (default_assign_ref_body): New function, mostly cribbed from
4388 default_copy_constructor_body.
4390 * cp-class.c (base_info): Add members cant_synth_copy_ctor,
4391 cant_synth_asn_ref, no_const_asn_ref.
4392 (finish_base_struct): Update no_const_asn_ref, note that you should
4393 update cant_synth_*, propagate TYPE_GETS_ASSIGN_REF.
4394 (finish_struct): Add decls for cant_synth_*, no_const_asn_ref, and
4395 initialize them properly. Set no_const_asn_ref properly. Set
4396 cant_synth_* in some of the situations where they should be set.
4397 Propagate TYPE_GETS_ASSIGN_REF. Use cant_synth_copy_ctor. Add call
4398 to cons_up_default_function for operator=.
4400 Tue Nov 23 20:24:58 1993 Mike Stump (mrs@cygnus.com)
4402 * cp-cvt.c (convert_force): Add code to perform casting of pointer
4403 to member function types.
4404 * cp-typeck.c (build_ptrmemfunc): Add FORCE parameter to indicate
4405 when the conversion should be done, regardless.
4406 * cp-tree.h (build_ptrmemfunc): Ditto.
4407 * cp-type2.c (digest_init): Ditto.
4408 * cp-typeck.c (convert_for_assignment): Ditto.
4410 Tue Nov 23 18:06:58 1993 Jason Merrill (jason@deneb.cygnus.com)
4412 * cp-error.c (dump_expr): Do the right thing for variables of
4415 * cp-decl.c (grok_op_properties): Set TYPE_HAS_ASSIGN_REF
4416 and its kin properly.
4417 (xref_tag): Propagate TYPE_GETS_ASSIGN_REF.
4419 Tue Nov 23 12:26:13 1993 Mike Stump (mrs@cygnus.com)
4421 * cp-method.c (build_opfncall): Don't count pointer to member
4422 functions as aggregates here, as we don't want to look up methods in
4423 them. The compiler would core dump if we did, as they don't have
4425 * cp-typeck.c (build_indirect_ref): Improve wording on error
4428 Mon Nov 22 14:22:23 1993 Jason Merrill (jason@deneb.cygnus.com)
4430 * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn
4431 (since it's supported in other compiler bits).
4433 * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name
4436 * cp-error.c (dump_function_decl): Don't print return type for
4437 constructors and destructors.
4439 * cp-cvt.c (cp_convert_to_pointer): Import code from
4440 convert_to_pointer so we can return error_mark_node in the case of an
4441 error, and to allow more meaningful error messages.
4442 (build_type_conversion): Don't go through void* when trying
4443 to convert to a pointer type.
4445 * cp-decl.c (grokfndecl): Move call to grok_op_properties back
4446 after grokclassfn so that it's dealing with the right decl.
4447 (grok_op_properties): Don't assert !methodp for op new and op delete.
4449 * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now
4450 no uses of it in the compiler).
4452 * cp-call.c (build_scoped_method_call): Fix for destructors of simple
4454 (build_method_call): Ditto.
4456 Fri Nov 19 12:59:38 1993 Jason Merrill (jason@deneb.cygnus.com)
4458 * cp-tree.c (count_functions): Abstraction function.
4460 * cp-call.c (build_overload_call_real): Deal with new overloading
4461 properly, remove dead code.
4463 * gcc.c (default_compilers): Generate and use .ii files in the
4464 intermediate stage of compiling C++ source.
4466 Fri Nov 19 11:26:09 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
4468 * cp-expr.c (cplus_expand_expr): Make call_target a valid memory
4469 address before using it, so it can be later safely compared.
4471 Fri Nov 12 15:30:27 1993 Jason Merrill (jason@deneb.cygnus.com)
4473 * cp-pt.c (tsubst): Deal with new overloading.
4475 * cp-typeck.c (fntype_p): is the arg function type?
4476 (comp_target_parms): pedwarn on conversion from (anything) to (...).
4477 (build_x_function_call): Deal with new overloading.
4479 * cp-tree.c (decl_list_length): Deal with new overloading.
4480 (decl_value_member): Like value_member, but for DECL_CHAINs.
4482 * cp-decl.c (duplicate_decls): Deal with new overloading.
4483 (start_decl): Ditto.
4485 * cp-class.c (instantiate_type): Deal with new overloading.
4487 * cp-call.c (convert_harshness_ansi): Deal with new overloading.
4488 (convert_harshness_old): Deal with new overloading.
4489 (build_overload_call_real): Ditto.
4491 Mon Nov 8 13:50:49 1993 Jason Merrill (jason@deneb.cygnus.com)
4493 * cp-tree.c (get_unique_fn): New function; returns FUNCTION_DECL
4494 if unambiguous, NULL_TREE otherwise.
4495 (get_first_fn): Returns the first appropriate FUNCTION_DECL.
4496 (is_overloaded_fn): Returns whether or not the passed tree is
4497 a function or list of functions.
4499 * cp-init.c (init_init_processing): use `get_first_fn' to find
4500 the FUNCTION_DEFN for new and delete.
4502 * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut
4503 code size in half (I spit on special cases).
4505 Tue Sep 7 20:03:33 1993 Jason Merrill (jason@deneb.cygnus.com)
4507 * cp-decl.c: Allow references and template type parameters as well
4510 eval: (auto-fill-mode)