]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
*** empty log message ***
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
cf17cae3
JM
1Wed Jul 13 03:57:54 1994 Jason Merrill (jason@deneb.cygnus.com)
2
3 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): #if 0 out; this macro is now
4 defined in the language-independent tree.h.
5
6 * tree.c (count_functions): Avoid bogus warning when compiling this
7 function.
8
9Mon Jul 11 18:37:20 1994 Jason Merrill (jason@deneb.cygnus.com)
10
11 * decl.c (grok_reference_init): Always save the initializer of a
12 reference.
13
5b605f68
MS
14Fri Jul 8 17:41:46 1994 Mike Stump (mrs@cygnus.com)
15
16 * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside
17 CLEANUP_POINT_EXPRs so that the stack slots can be reused.
63c68bb7 18 (disabled for now)
5b605f68
MS
19
20Fri Jul 8 12:59:38 1994 Jason Merrill (jason@deneb.cygnus.com)
21
22 * method.c (hack_identifier): Fix for new overloading.
23
24 * typeck.c (build_binary_op_nodefault): Don't mess with division by
25 zero.
26
27Fri Jul 8 13:20:28 1994 Gerald Baumgartner (gb@cs.purdue.edu)
28
29 * decl2.c (finish_file): Only call walk_sigtables, if
30 flag_handle_signatures is turned on, don't waste time otherwise.
31
32Fri Jul 8 02:27:41 1994 Jason Merrill (jason@deneb.cygnus.com)
33
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
37
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.
41
311862c8
GB
42Thu Jul 7 22:20:46 1994 Gerald Baumgartner (gb@andros.cygnus.com)
43
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.
50
51 * sig.c (build_signature_table_constructor): Mark class member
52 function pointed to from signature table entry as addressable.
53
5b605f68
MS
54Thu Jul 7 13:39:37 1994 Jason Merrill (jason@deneb.cygnus.com)
55
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.
59
60 * class.c (prepare_fresh_vtable): Call import_export_vtable if not
61 -fvtable-thunks.
62 (build_vtable): Ditto.
63
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
68 import_export_vtable.
69
a3b49ccd
MS
70Wed Jul 6 20:25:48 1994 Mike Stump (mrs@cygnus.com)
71
72 * except.c (init_exception_processing): Setup interim_eh_hook to
73 call lang_interim_eh.
74 * except.c (do_unwind): Propagate throw object value across
75 stack unwinding.
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.
85
86Wed Jul 6 17:55:32 1994 Per Bothner (bothner@kalessin.cygnus.com)
87
88 * decl2.c (mark_vtable_entries): If -ftable-thunks, set the
89 vtable entry properly to abort.
90
5b605f68
MS
91Tue Jul 5 14:07:54 1994 Jason Merrill (jason@deneb.cygnus.com)
92
93 * typeck.c (build_binary_op_nodefault): Downgrade division by zero
94 errors to warnings.
95
96 * call.c (build_overload_call_real): Handle fnname being a list of
97 functions.
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
101 argument.
102
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.
106
9a0e77ba
JM
107Fri Jul 1 09:35:51 1994 Jason Merrill (jason@deneb.cygnus.com)
108
109 * parse.y (init): ANSI C++ does not forbid { }.
110
111Thu Jun 30 00:35:22 1994 Jason Merrill (jason@deneb.cygnus.com)
112
113 * decl2.c (lang_decode_option): Set warn_nonvdtor along with -Wall.
114 warn_nonvdtor defaults to off.
115
116 * class.c (instantiate_type): Use comptypes rather than relying on
117 types to satisfy ==.
118
119 * decl.c (start_function): Set DECL_DEFER_OUTPUT on all inlines that
120 might be static.
121
122 * tree.c (build_cplus_new): Never build WITH_CLEANUP_EXPRs.
123
124 * decl.c (grok_reference_init): Deal with ADDR_EXPRs of TARGET_EXPRs.
125
126 * cvt.c (cp_convert): Pass 0 to with_cleanup_p arg of
127 build_cplus_new.
128
129Wed Jun 29 22:31:09 1994 Jason Merrill (jason@deneb.cygnus.com)
130
131 * decl2.c (finish_file): Maybe consider static inlines multiple
132 times, in case they reference each other.
133
63718c49
GB
134Tue Jun 28 11:58:38 1994 Gerald Baumgartner (gb@cs.purdue.edu)
135
136 * class.c (finish_struct): Don't `cons_up_default_function's
137 for signatures.
138 (finish_struct): Handle an empty method_vec correctly.
139
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
143 `cp_warning's.
144
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.
152
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.
156
157Mon Jun 27 14:05:16 1994 Gerald Baumgartner (gb@cs.purdue.edu)
158
159 * typeck2.c (store_init_value): Don't be pedantic about
160 non-constant initializers of signature tables/pointers/references.
161
162Fri Jun 24 16:49:41 1994 Gerald Baumgartner (gb@cs.purdue.edu)
163
164 * decl.c (grokdeclarator): If we are grokking an opaque typedef
165 in a signature, don't complain about it begin static.
166
21474714
MS
167Wed Jun 29 16:44:45 1994 Mike Stump (mrs@cygnus.com)
168
169 Fixes a problem of the this pointer being wrong in virtual calls to
170 methods that are not overridden in more derived classes.
171
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.
177
178Tue Jun 28 23:49:28 1994 Jason Merrill (jason@deneb.cygnus.com)
179
180 * typeck.c (build_binary_op): Use the types before default
181 conversions in the error message.
182
183 * *.c: Use c_build_type_variant instead of build_type_variant where
184 the type might be an array.
185
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.
189
190Wed Jun 29 16:58:53 1994 Jason Merrill (jason@deneb.cygnus.com)
191
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.
195
196Tue Jun 28 23:49:28 1994 Jason Merrill (jason@deneb.cygnus.com)
197
198 * typeck.c (build_binary_op): Use the types before default
199 conversions in the error message.
200
201 * *.c: Use c_build_type_variant instead of build_type_variant where
202 the type might be an array.
203
204Sat Jun 25 11:50:54 1994 Jason Merrill (jason@deneb.cygnus.com)
205
206 * cvt.c (convert_to_reference): Try UDC's before doing the
207 reinterpret_cast thang, though.
208
209Fri Jun 24 01:24:01 1994 Jason Merrill (jason@deneb.cygnus.com)
210
211 * typeck.c (c_expand_return): Don't USE the return value location
212 after we've expanded the jump.
213
214 * decl2.c (finish_file): Make sure DECL_SAVED_INSNS is not 0 before
215 trying to write out an inline.
216
217 * cvt.c (build_up_reference): Also do address adjustment when the
218 target type uses MI.
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
221 method.
222 (build_type_conversion): #if 0 out code for binding to reference.
223
a3203465
MS
224Thu Jun 23 00:22:28 1994 Jason Merrill (jason@deneb.cygnus.com)
225
21474714
MS
226 * decl2.c (finish_file): Use TREE_SYMBOL_REFERENCED to decide
227 whether to emit inlines.
228
a3203465
MS
229 * decl.c (grokdeclarator): Set explicit_int for decls that just
230 specify, say, 'long'.
231
232 * init.c (do_friend): Do overload C functions (or call pushdecl,
63718c49 233 anyaway).
a3203465
MS
234
235Wed Jun 22 13:40:49 1994 Jason Merrill (jason@deneb.cygnus.com)
236
237 * cvt.c (build_up_reference): Don't call readonly_error.
238 (convert_to_reference): Propagate const and volatile from expr to
239 its type.
240
241 * tree.c (lvalue_p): Random CALL_EXPRs are not lvalues.
242
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.
247
248 * typeck2.c (build_functional_cast): Ditto.
249
250Tue Jun 21 17:38:38 1994 Jason Merrill (jason@deneb.cygnus.com)
251
252 * decl.c (grokdeclarator): signed, unsigned, long and short all
253 imply 'int'.
254
255 * decl.c (grokdeclarator): Allow "this is a type" syntax.
256 (grok_reference_init): Simplify and fix.
257
258Sun Jun 19 17:08:48 1994 Jason Merrill (jason@deneb.cygnus.com)
259
260 * decl.c (grokdeclarator): pedwarn about a typedef that specifies no
261 type.
262
263Sat Jun 18 04:16:50 1994 Jason Merrill (jason@deneb.cygnus.com)
264
265 * decl.c (start_function): Move TREE_PUBLIC and DECL_EXTERNAL
266 tinkering to after call to pushdecl.
267
268Fri Jun 17 14:48:28 1994 Jason Merrill (jason@deneb.cygnus.com)
269
270 * call.c (build_method_call): Handle destructors for non-aggregate
271 types properly.
272
273Thu Jun 16 16:48:05 1994 Jason Merrill (jason@deneb.cygnus.com)
274
275 * call.c (build_method_call): Make sure that the name given for the
276 destructor matches the constructor_name of the instance.
277
278 * pt.c (do_function_instantiation): A non-extern instantiation
279 overrides a later extern one.
280 (do_type_instantiation): Ditto.
281
282Wed Jun 15 19:34:54 1994 Jason Merrill (jason@deneb.cygnus.com)
283
284 * init.c (expand_aggr_init): Use TYPE_MAIN_VARIANT to get the
285 unqualified array type.
286
287 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Tests whether NODE is a
288 CONSTRUCTOR with no elements.
289
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
295 specially.
296
297 * typeck2.c (process_init_constructor): Don't treat empty_init_node
298 specially.
299
300Wed Jun 15 19:05:25 1994 Mike Stump (mrs@cygnus.com)
301
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.
304
305Wed Jun 15 15:03:16 1994 Jason Merrill (jason@deneb.cygnus.com)
306
307 * decl.c (start_decl): Put statics in common again.
308
309 * decl.c (grokdeclarator): Return NULL_TREE for an error rather than
310 setting the type to error_mark_node.
311
312 * typeck.c (build_modify_expr): Build up a COMPOUND_EXPR for enum
313 bitfield assignments.
314
f0e01782
MS
315Tue Jun 14 12:23:38 1994 Jason Merrill (jason@deneb.cygnus.com)
316
317 * decl.c (grok_op_properties): Const objects can be passed by value.
318
319Mon Jun 13 03:10:59 1994 Jason Merrill (jason@deneb.cygnus.com)
320
321 * decl2.c (import_export_vtable): Force implicit instantiations to
322 be interface_only when -fno-implicit-templates.
323
324 * decl.c (duplicate_decls): Redeclaring a class template name is an
325 error.
326
327 * pt.c (end_template_decl): Call GNU_xref_decl for class templates.
328 * xref.c (GNU_xref_decl): Support templates.
329
330Sat Jun 11 17:09:05 1994 Jason Merrill (jason@deneb.cygnus.com)
331
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.
338
339 * search.c (dfs_debug_mark): Lose checks for DWARF_DEBUG and
340 TREE_ASM_WRITTEN, as they are redundant.
341
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
345 type to be emitted.
346
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
350 template classes.
351
352Fri Jun 10 00:41:19 1994 Jason Merrill (jason@deneb.cygnus.com)
353
354 * decl.c (grokdeclarator): Set DECL_CONTEXT on static data members.
355
356 * g++.c (main): Use -xc++-cpp-output for .i files.
357
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.
363
364Thu Jun 9 19:04:59 1994 Jason Merrill (jason@deneb.cygnus.com)
365
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
374 actually set.
375 * decl2.c (grok_function_init): Set TYPE_HAS_ABSTRACT_ASSIGN_REF.
376
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.
382
383Wed Jun 8 20:48:02 1994 Mike Stump (mrs@cygnus.com)
384
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.
390
391Wed Jun 8 16:18:14 1994 Jason Merrill (jason@deneb.cygnus.com)
392
393 * gxxint.texi (Free Store): New section with code for examining
394 cookie.
395 (Limitations of g++): Remove operator delete entry, since it is no
396 longer accurate. Fix access control entry.
397
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.
401
402 * search.c (get_base_distance): Use IS_AGGR_TYPE_CODE to check for
403 class type, not == RECORD_TYPE.
404
405 * decl.c (grokdeclarator): Cope with grokfndecl returning NULL_TREE.
406
407 * typeck2.c (report_case_error): #if 0 out.
408 * lex.c (real_yylex): Lose RANGE.
409 * parse.y: Ditto.
410
411Tue Jun 7 18:17:35 1994 Jason Merrill (jason@deneb.cygnus.com)
412
413 * parse.y (simple_stmt, case ranges): Use ELLIPSIS instead of RANGE.
414
415Mon Jun 6 19:39:57 1994 Jason Merrill (jason@deneb.cygnus.com)
416
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
419 done in cp_convert.
420
421 * cvt.c (cp_convert): When converting to bool, take
422 integer_zero_node to false_node and all other INTEGER_CSTs to
423 true_node.
424 (build_type_conversion): Don't complain about multiple conversions
425 to float if we're not really converting.
426
a0a33927
MS
427Fri Jun 3 02:10:56 1994 Jason Merrill (jason@deneb.cygnus.com)
428
f0e01782
MS
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
433 instantiations.
434 (do_function_instantiation): Set DECL_EXTERNAL on 'extern' explicit
435 instantiations.
436 (do_type_instantiation): Ditto.
437 * parse.y (explicit_instantiation): Support 'extern template class
438 A<int>;' syntax.
439 * decl.c (start_function): Don't modify the settings of TREE_PUBLIC
440 and DECL_EXTERNAL on explicit instantiations.
441
a0a33927
MS
442 * cvt.c (cp_convert): Replace constants with their values before
443 converting.
f0e01782 444 (cp_convert): Consistently use 'e' instead of 'expr'.
a0a33927
MS
445
446Thu Jun 2 03:53:30 1994 Jason Merrill (jason@deneb.cygnus.com)
447
448 * typeck2.c (build_x_arrow): Resolve OFFSET_REFs first.
449
450Wed Jun 1 18:57:35 1994 Jason Merrill (jason@deneb.cygnus.com)
451
452 * typeck2.c (digest_init): Handle initializing a pmf with an
453 overloaded method.
454 * typeck.c (build_ptrmemfunc): Handle overloaded methods.
455
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
464 TYPE_DECLs.
465
466 * typeck.c (convert_arguments): Make sure type is not NULL before
467 checking its TREE_CODE.
468
469Wed Jun 1 17:40:39 1994 Mike Stump (mrs@cygnus.com)
470
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
476 from.
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.
480
481Wed Jun 1 16:50:59 1994 Jason Merrill (jason@deneb.cygnus.com)
482
483 * init.c (build_member_call): Use build_pointer_type instead of
484 TYPE_POINTER_TO.
485
486Wed Jun 1 11:11:15 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
487
488 * decl.c (grokdeclarator): Make sure we have a DNAME set before we
489 try to use it in an error.
490
491Wed Jun 1 09:48:49 1994 Mike Stump (mrs@cygnus.com)
492
493 * typeck.c (convert_arguments, convert_for_initialization): Don't
494 strip NOP_EXPRs, when we are converting to a reference.
495
496Wed Jun 1 01:11:38 1994 Jason Merrill (jason@deneb.cygnus.com)
497
498 * typeck.c (build_modify_expr): Don't dereference references when
499 initializing them.
500
501 * decl2.c (grokfield): Don't check for grokdeclarator returning
502 error_mark_node any more.
503
504 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
505 (start_method): Return void_type_node instead of error_mark_node.
506
507 * typeck.c (build_modify_expr): Resolve offset refs earlier.
508
509Tue May 31 16:06:58 1994 Jason Merrill (jason@deneb.cygnus.com)
510
511 * call.c (build_method_call): Resolve OFFSET_REFs in the object.
512
513 * typeck.c (build_modify_expr): Dereference references before trying
514 to assign to them.
515
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
527 identifier.
528 * cp-tree.h (DERIVED_FROM_P): Should be self-explanatory.
529
530 * decl.c (start_decl): Don't complain that error_mark_node is an
531 incomplete type.
532 (finish_decl): Check for type == error_mark_node.
533
534Mon May 30 23:38:55 1994 Jason Merrill (jason@deneb.cygnus.com)
535
536 * decl.c (start_function): Set DECL_DEFER_OUTPUT on implicit
537 instantiations and inline members.
538
539 * spew.c (yylex): Set looking_for_template if the next token is a '<'.
540
541 * lex.h: Declare looking_for_template.
542
543 * decl.c (lookup_name_real): Use looking_for_template to arbitrate
544 between type and template interpretations of an identifier.
545
546Sat May 28 04:07:40 1994 Jason Merrill (jason@deneb.cygnus.com)
547
548 * pt.c (instantiate_template): Zero out p if we found a
549 specialization.
550
551 * decl.c (grokdeclarator): Elucidate warning.
552 (grokdeclarator): If pedantic AND -ansi, complain about long long.
553
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
559 semantics.
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
577 template class.
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.
581
582Fri May 27 13:57:40 1994 Jason Merrill (jason@deneb.cygnus.com)
583
584 * typeck.c (build_binary_op_nodefault): Division by constant zero is
585 an error.
586
587Fri May 27 13:50:15 1994 Mike Stump (mrs@cygnus.com)
588
589 * class.c (override_one_vtable): Don't modify things we don't own.
590
591Fri May 27 01:42:58 1994 Jason Merrill (jason@deneb.cygnus.com)
592
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.
598
599 * decl.c (pushtag): Don't try to set DECL_CLASS_CONTEXT on a
600 TYPE_DECL.
601
602 * call.c (convert_harshness): Dereference reference on rhs before
603 proceeding, properly grok passing const things to non-const
604 references.
605
606 * typeck.c (build_unary_op): Soften error about taking the address
607 of main() to a pedwarn.
608
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.
612
613Thu May 26 13:13:55 1994 Gerald Baumgartner (gb@mexican.cygnus.com)
614
615 * decl2.c (grokfield): Don't complain about local signature
616 method declaration without definition.
617
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.
622
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.
626
627Thu May 26 12:56:25 1994 Jason Merrill (jason@deneb.cygnus.com)
628
629 * decl2.c (grokfield): Don't set TREE_PUBLIC on member function
630 declarations.
631
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
635 declarations.
636
637Wed May 25 14:36:38 1994 Jason Merrill (jason@deneb.cygnus.com)
638
639 * decl.c (grokdeclarator): Handle initialization of static const
640 members.
641 (finish_decl): Ditto.
642
643 * decl2.c (grokfield): Allow initialization of static const members
644 even when pedantic.
645
646 * decl2.c (grokfield): Deal with grokdeclarator returning
647 error_mark_node.
648
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.
652
653 * parse.y (absdcl): Expand type_quals inline.
654
655Tue May 24 19:10:32 1994 Jason Merrill (jason@deneb.cygnus.com)
656
657 * decl.c (pushtag): Use IS_AGGR_TYPE rather than checking for a
658 RECORD_TYPE.
659
660Tue May 24 18:09:16 1994 Per Bothner (bothner@kalessin.cygnus.com)
661
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
667 to be emitted.
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.
674
675Tue May 24 00:22:04 1994 Jason Merrill (jason@deneb.cygnus.com)
676
677 * pt.c (tsubst): Use lookup_name_nonclass to find guiding decls, not
678 lookup_name.
679
680 * call.c (build_overload_call_real): Don't immediately pick a
681 function which matches perfectly.
682
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').
686
687 * typeck.c (convert_arguments): Don't mess with i for methods.
688 * call.c (build_method_call): Pass the function decl to
689 convert_arguments.
690
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.
696
697Mon May 23 14:11:24 1994 Jason Merrill (jason@deneb.cygnus.com)
698
699 * error.c (dump_char): Use TARGET_* for character constants.
700
701Mon May 23 13:03:03 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
702
703 * tree.c (debug_no_list_hash): Make static.
704
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
709 warnings.
710
711Fri May 20 14:04:34 1994 Jason Merrill (jason@deneb.cygnus.com)
712
713 * decl.c (grokdeclarator): Make warning about duplicate short, etc.
714 a pedwarn.
715
716 * typeck.c (build_c_cast): Casting to function or method type is an
717 error.
718
719 * class.c (finish_struct): Make warning for anonymous class with no
720 instances a pedwarn.
721
722 * Makefile.in (stamp-parse): Expect a s/r conflict.
723
724 * typeck.c (build_modify_expr): pedwarn about using a non-lvalue
725 cast as an lvalue.
726
2986ae00
MS
727Thu May 19 12:08:48 1994 Jason Merrill (jason@deneb.cygnus.com)
728
729 * cvt.c (type_promotes_to): Make sure bool promotes to int rather
730 than unsigned on platforms where sizeof(char)==sizeof(int).
731
732Wed May 18 14:27:06 1994 Jason Merrill (jason@deneb.cygnus.com)
733
734 * typeck.c (build_c_cast): Tack on a NOP_EXPR when casting to
735 another variant.
736 (build_modify_expr): Don't strip NOP_EXPRs, and don't get tricky
737 and treat them as lvalues.
738
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
742 empty declarations.
743
744 * typeck.c (convert_for_assignment): Complain about changing
745 the signedness of a pointer's target type.
746
747 * parse.y (stmt): Move duplicated code for checking case values from
748 here.
749 * decl2.c (check_cp_case_value): To here. And add a call to
750 constant_expression_warning.
751
752 * typeck.c (convert_for_assignment): Don't complain about assigning
753 a negative value to bool.
754
755 * decl.c (init_decl_processing): Make bool unsigned.
756
757 * class.c (finish_struct): Allow bool bitfields.
758
2986ae00
MS
759Wed May 18 12:35:27 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
760
761 * Make-lang.in (c++.install-man): Get g++.1 from $(srcdir)/cp.
762
763Wed May 18 03:28:35 1994 Jason Merrill (jason@deneb.cygnus.com)
764
765 * cvt.c (build_type_conversion): Lose special handling of
766 truthvalues.
767
768 * search.c (dfs_pushdecls): Improve shadowing warning.
769
770Tue May 17 13:34:46 1994 Jason Merrill (jason@deneb.cygnus.com)
771
772 * init.c (build_delete): Throw away const and volatile on `this'.
773
774 * decl.c (finish_enum): Put the constants in TYPE_VALUES again,
775 rather than the enumerators.
776 (pushtag): s/cdecl/c_decl/g
777
778Mon May 16 23:04:01 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
779
63718c49
GB
780 * cp/typeck.c (common_type): Attribute merging.
781 (comp_types): Utilise COMP_TYPE_ATTRIBUTES macro.
2986ae00 782
63718c49 783 * cp/parse.y: Revamp attribute parsing.
2986ae00
MS
784
785Mon May 16 01:40:34 1994 Jason Merrill (jason@deneb.cygnus.com)
786
787 * decl.c (shadow_tag): Also check for inappropriate use of auto and
788 register.
789
790 * method.c (build_overload_name): Clarify that the illegal case is a
791 pointer or reference to array of unknown bound.
792
793 * error.c (dump_type_prefix): Print references to arrays properly.
794
795 * typeck.c (various): Be more helpful in pointer
796 comparison diagnostics.
797
798 * tree.c (lvalue_p): MODIFY_EXPRs are lvalues again. Isn't this
799 fun?
800
801 * parse.y: Also catch an error after valid stmts.
802
803 * search.c (dfs_init_vbase_pointers): Don't abort because `this' is
804 const.
805
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.
809
810 * errfn.c (cp_thing): Check atarg1 to determine whether or not we're
811 specifying a line, not atarg.
812
813 * tree.c (build_cplus_method_type): Always make `this' const.
814
815 * decl2.c (grokclassfn): If -fthis-is-variable and this function is
816 a constructor or destructor, make `this' non-const.
817
818 * typeck.c (build_modify_expr): Don't warn specially about
819 assignment to `this' here anymore, since it will be caught by the
820 usual machinery.
821
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.
826
827 * typeck2.c (build_functional_cast): Call build_method_call with
828 LOOKUP_PROTECT.
829 (process_init_constructor): Only process FIELD_DECLs.
830
831 * decl.c (finish_decl): Also force static consts with no explicit
832 initializer that need constructing into the data segment.
833
834 * init.c (build_delete): Undo last patch, as it interferes with
835 automatic cleanups.
836
837Sat May 14 01:59:31 1994 Jason Merrill (jason@deneb.cygnus.com)
838
839 * call.c, class.h, cp-tree.h, cvt.c, decl2.c: Lose old overloading
840 code.
841
842 * init.c (build_delete): pedwarn about using plain delete to delete
843 an array.
844
845Fri May 13 16:45:07 1994 Jason Merrill (jason@deneb.cygnus.com)
846
847 * typeck.c (comp_target_types): Be more helpful in contravariance
848 warnings, and make them pedwarns.
849
850 * decl.c (grokdeclarator): Use decl_context to decide whether or not
851 this is an access declaration.
852
853 * class.c (finish_struct_bits): Set TYPE_HAS_INT_CONVERSION if it
854 has a conversion to enum or bool, too.
855
856Fri May 13 16:31:27 1994 Mike Stump (mrs@cygnus.com)
857
858 * method.c (emit_thunk): Make declaration for
859 current_call_is_indirect local (needed for hppa).
860
861Fri May 13 16:16:37 1994 Jason Merrill (jason@deneb.cygnus.com)
862
863 * pt.c (uses_template_parms): Grok BOOLEAN_TYPE.
864 (tsubst): Ditto.
865
866Fri May 13 16:23:32 1994 Mike Stump (mrs@cygnus.com)
867
868 * pt.c (tsubst): If there is already a function for this expansion,
869 use it.
870 * pt.c (instantiate_template): Ditto.
871
872Fri May 13 10:30:42 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
873
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.
877
878 * cp-tree.h (build_static_cast, build_reinterpret_cast,
879 build_const_cast): Add declarations.
880
881Fri May 13 09:50:31 1994 Mike Stump (mrs@cygnus.com)
882
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.
886
887Fri May 13 01:43:18 1994 Jason Merrill (jason@deneb.cygnus.com)
888
889 * parse.y (initdcl): Call cplus_decl_attributes on the right
890 variable.
891 * decl2.c (cplus_decl_attributes): Don't call decl_attributes for
892 void_type_node.
893
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 &&
898 and || to bool.
899 (build_default_unary_type_conversion): Convert arg of ! to bool.
900 (type_promotes_to): bool promotes to int.
901
902Fri May 13 01:43:18 1994 Mike Stump (mrs@cygnus.com)
903
904 Implement the new builtin `bool' type.
905 * typeck.c (build_binary_op_nodefault): Convert args of && and || to
906 bool.
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).
919
8de7634e
RE
920Thu May 12 19:13:54 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk)
921
922 * g++.c: Use #ifdef for __MSDOS__, not #if.
923
a4443a08
MS
924Thu May 12 18:05:18 1994 Mike Stump (mrs@cygnus.com)
925
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.
929
930Thu May 12 14:45:35 1994 Jason Merrill (jason@deneb.cygnus.com)
931
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.
938
939 * cvt.c (convert_to_reference): Allow DECL to be error_mark_node if
940 we don't know what we're initializing.
941
942Wed May 11 01:59:36 1994 Jason Merrill (jason@deneb.cygnus.com)
943
944 * cvt.c (convert_to_reference): Modify to use convtype parameter.
945 Only create temporaries when initializing a reference, not when
946 casting.
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.
952
953 * tree.c (lvalue_p): MODIFY_EXPRs are no longer lvalues.
954
955 * typeck.c (build_{static,reinterpret,const_cast): Stubs that just
956 call build_c_cast.
957 * parse.y: Add {static,reinterpret,const}_cast.
958 * gxx.gperf: Ditto.
959
960 * typeck.c (common_type): Allow methods with basetypes of different
961 UPTs.
962 (comptypes): Deal with UPTs.
963 (build_modify_expr): Wrap all MODIFY_EXPRs in a COMPOUND_EXPR.
964
965 * pt.c (end_template_decl): Check for multiple definitions of member
966 templates.
967
968 * call.c (build_method_call): Complain about calling an abstract
969 virtual from a constructor.
970
971 * typeck.c (pointer_int_sum): Check for the integer operand being 0
972 after checking the validity of the pointer operand.
973
974 * typeck2.c (digest_init): Pedwarn about string initializer being
975 too long.
976
977Tue May 10 12:10:28 1994 Jason Merrill (jason@deneb.cygnus.com)
978
979 * decl.c (push_overloaded_decl): Only throw away a builtin if the
980 decl in question is the artificial one.
981
982 * parse.y (simple_stmt, switch): Use implicitly_scoped_stmt because
983 expand_{start,end}_case cannot happen in the middle of a block.
984
985 * cvt.c (build_type_conversion_1): Use convert again.
986
987Tue May 10 11:52:04 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
988
989 * typeck2.c (digest_init): Make sure we check for signed and
990 unsigned chars as well when warning about string initializers.
991
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.
994
995Tue May 10 11:34:37 1994 Mike Stump (mrs@cygnus.com)
996
997 * except.c: Don't do anything useful when cross compiling.
998
999Tue May 10 03:04:13 1994 Jason Merrill (jason@deneb.cygnus.com)
1000
1001 * decl.c (duplicate_decls): Fix up handling of builtins yet again.
1002 (push_overloaded_decl): Ditto.
1003
1004 * cvt.c (convert): Don't look for void type conversion.
1005
1006Mon May 9 18:05:41 1994 Jason Merrill (jason@deneb.cygnus.com)
1007
1008 * init.c (do_friend): Only do a pushdecl for friends, not
1009 pushdecl_top_level.
1010
1011Mon May 9 13:36:34 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
1012
1013 * decl.c (lookup_name_current_level): Put empty statement after
1014 the label OUT to make the code valid C.
1015
1016Mon May 9 12:20:57 1994 Jason Merrill (jason@deneb.cygnus.com)
1017
1018 * typeck.c (build_binary_op_nodefault): Only complain about
1019 comparing void * and a function pointer if void * is smaller.
1020
1021Sun May 8 01:29:13 1994 Jason Merrill (jason@deneb.cygnus.com)
1022
1023 * decl.c (lookup_name_current_level): Move through temporary binding
1024 levels.
1025
1026 * parse.y (already_scoped_stmt): Revive.
1027 (simple_stmt): Use it again.
1028
1029 * decl.c (poplevel): Always call poplevel recursively if we're
1030 dealing with a temporary binding level.
1031
1032Sat May 7 10:52:28 1994 Mike Stump (mrs@cygnus.com)
1033
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.
1038
1039Sat May 7 03:57:44 1994 Jason Merrill (jason@deneb.cygnus.com)
1040
1041 * typeck.c (commonparms): Don't complain about redefining default
1042 args.
1043
1044 * decl.c (duplicate_decls): Don't complain twice about conflicting
1045 function decls.
1046 (decls_match): Don't look at default args.
1047 (redeclaration_error_message): Complain about redefining default
1048 args.
1049
1050 * call.c (build_overload_call_real): Also deal with guiding
1051 declarations coming BEFORE the template decl.
1052
1053 * pt.c (unify): Allow different parms to have different
1054 cv-qualifiers.
1055 (unify): Allow trivial conversions on non-template parms.
1056
1057Fri May 6 03:53:23 1994 Jason Merrill (jason@deneb.cygnus.com)
1058
1059 * pt.c (tsubst): Support OFFSET_TYPEs.
1060 (unify): Ditto.
1061
1062 * decl2.c (finish_decl_parsing): Call push_nested_class with a type.
1063
1064 * init.c (build_offset_ref): Fix error message.
1065 * search.c (lookup_field): Ditto.
1066
1067 * call.c (build_scoped_method_call): Pass binfo to
1068 build_method_call.
1069 * typeck.c (build_object_ref): Ditto.
1070
1071 * typeck2.c (binfo_or_else): Don't return a _TYPE.
1072
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.
1076
1077 * decl.c (finish_enum): Set the type of all the enums.
1078
1079 * class.c (finish_struct): Don't get confused by access decls.
1080
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.
1083
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'.
1088
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
1094 the catch variable.
1095 (init_exception_processing): The second argument to
1096 __throw_type_match is ptr_type_node.
1097
1098 Fri May 6 07:18:54 1994 Chip Salzenberg (chip@fin)
1099
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.
1103
8d2733ca
MS
1104Fri May 6 01:25:38 1994 Mike Stump (mrs@cygnus.com)
1105
1106 Add alpha exception handling support to the compiler.
1107 Quick and dirty backend in except.c.
1108
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.
1120
1121Thu May 5 17:35:37 1994 Jason Merrill (jason@deneb.cygnus.com)
1122
1123 * parse.y (simple_stmt, for loops): Use implicitly_scoped_stmt.
1124 (various): Lose .kindof_pushlevel and partially_scoped_stmt.
1125
1126Thu May 5 16:17:27 1994 Kung Hsu (kung@mexican.cygnus.com)
1127
1128 * parse.y (already_scoped_stmt): move expand_end_binding() to
1129 fix the unmatched LBB/LBE in stabs.
1130
1131Thu May 5 14:36:17 1994 Jason Merrill (jason@deneb.cygnus.com)
1132
1133 * decl.c (set_nested_typename): Set TREE_MANGLED on the new
1134 identifiers.
1135 (pushdecl): Check TREE_MANGLED.
1136 (xref_tag): Ditto.
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).
1140
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
1145 initial value.
1146 (pushdecl_class_level): Check inconsistent use of a name in the
1147 class body.
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.
1155
700f8a87
MS
1156Thu May 5 09:35:35 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
1157
1158 * typeck.c (build_modify_expr): Warn about assignment to `this'.
1159
1160Wed May 4 15:55:49 1994 Jason Merrill (jason@deneb.cygnus.com)
1161
1162 * init.c (build_delete): Use the global operator delete when
1163 requested.
1164
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
1167 the type.
1168
1169 * class.c (finish_struct): Remove a couple of dependencies on
1170 language linkage.
1171
1172 * decl.c (pushtag): Classes do nest in extern "C" blocks.
1173 (pushdecl): Only set DECL_NESTED_TYPENAME on the canonical one for
1174 the type.
1175 (pushtag): Remove another dependency on the language linkage.
1176
1177 * lex.c (cons_up_default_function): Don't set DECL_CLASS_CONTEXT to
1178 a const-qualified type.
1179
1180 * decl.c (push_overloaded_decl): Throw away built-in decls here.
1181 (duplicate_decls): Instead of here.
1182
1183Wed May 4 15:27:40 1994 Per Bothner (bothner@kalessin.cygnus.com)
1184
1185 * typeck.c (get_member_function_from_ptrfunc): Do The Right
1186 Thing (I hope) if we're using thunks.
1187
1188Wed May 4 13:52:38 1994 Jason Merrill (jason@deneb.cygnus.com)
1189
1190 * parse.y (specialization): aggr template_type_name ';'.
1191 (named_class_head_sans_basetype): Use it.
1192 (explicit_instantiation): Ditto.
1193 (tmpl.2): Revert.
1194
1195 * cvt.c (build_type_conversion_1): Use convert_for_initialization,
1196 rather than convert, to do conversions after the UDC.
1197
1198 * cp-tree.h (SHARED_MEMBER_P): This member is shared between all
1199 instances of the class.
1200
1201 * search.c (lookup_field): If the entity found by two routes is the
1202 same, it's not ambiguous.
1203
1204Wed May 4 12:10:00 1994 Per Bothner (bothner@kalessin.cygnus.com)
1205
1206 * decl.c (lookup_name_real): Check for a NULL TREE_VALUE,
1207 to prevent the compiler from crashing ...
1208
1209Wed May 4 11:19:45 1994 Jason Merrill (jason@deneb.cygnus.com)
1210
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.
1213
1214 * typeck.c (convert_for_initialization): Pass TYPE_BINFO (type) to
1215 build_method_call in case exp is NULL_TREE.
1216
1217Tue May 3 16:02:53 1994 Per Bothner (bothner@kalessin.cygnus.com)
1218
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.
1228
1229Tue May 3 09:20:44 1994 Jason Merrill (jason@deneb.cygnus.com)
1230
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
1238 ';' again.
1239
1240Mon May 2 23:17:21 1994 Jason Merrill (jason@deneb.cygnus.com)
1241
1242 * search.c (lookup_nested_tag): Lose.
1243
1244 * decl2.c (grokfield): Set DECL_CONTEXT on TYPE_DECLs.
1245 (lookup_name_nonclass): Lose.
1246
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.
1251
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.
1255
1256Mon May 2 19:06:21 1994 Per Bothner (bothner@kalessin.cygnus.com)
1257
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.
1264
1265Mon May 2 15:02:11 1994 Jason Merrill (jason@deneb.cygnus.com)
1266
1267 * parse.y (named_class_head_sans_basetype): Add "aggr
1268 template_type_name ';'" rule for forward declaration of
1269 specializations.
1270
1271Mon May 2 15:02:11 1994 Jason Merrill (jason@deneb.cygnus.com)
1272
1273 * class.c (instantiate_type): Deal with pmf's.
bfef964b
JM
1274
1275 * Make-lang.in (cc1plus): Don't depend on OBJS or BC_OBJS, since
1276 stamp-objlist does.
700f8a87 1277
bfef964b
JM
1278 * Makefile.in (../cc1plus): Depend on OBJDEPS.
1279 (OBJDEPS): Dependency version of OBJS.
1280
700f8a87
MS
1281Mon May 2 12:51:31 1994 Kung Hsu (kung@mexican.cygnus.com)
1282
1283 * search.c (dfs_debug_mark): unmark TYPE_DECL_SUPPRESS_DEBUG, not
1284 DECL_IGNORED_P.
1285
1286Fri Apr 29 12:29:56 1994 Jason Merrill (jason@deneb.cygnus.com)
1287
1288 * class.c (finish_struct): Clear out memory of local tags. And
1289 typedefs.
1290
1291 * decl2.c (grokclassfn): Don't set DECL_CONTEXT to a cv-qualified
1292 type.
1293 * search.c (get_matching_virtual): Be more helpful in error message.
1294
1295 * *: Use DECL_ARTIFICIAL (renamed from DECL_SYNTHESIZED).
1296
1297 * lex.c (default_assign_ref_body): Expect TYPE_NESTED_NAME to work.
1298 (default_copy_constructor_body): Ditto.
1299
1300 * class.c (finish_struct): Don't gratuitously create multiple decls
1301 for nested classes.
1302
1303Thu Apr 28 23:39:38 1994 Jason Merrill (jason@deneb.cygnus.com)
1304
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
1309 above.
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.
1313
15fa00e9
DE
1314Thu Apr 28 16:29:11 1994 Doug Evans (dje@canuck.cygnus.com)
1315
1316 * Make-lang.in (cc1plus): Depend on stamp-objlist.
1317 * Makefile.in (BC_OBJS): Delete.
700f8a87
MS
1318 (OBJS): Cat ../stamp-objlist to get language independent files.
1319 Include ../c-common.o.
15fa00e9
DE
1320 (../cc1plus): Delete reference to BC_OBJS.
1321
700f8a87
MS
1322Thu Apr 28 02:12:08 1994 Jason Merrill (jason@deneb.cygnus.com)
1323
1324 * search.c (compute_access): No really, deal with static members
1325 properly. Would I lie to you?
1326
1327 Implement lexical hiding of function declarations.
1328 * pt.c (tsubst): Use lookup_name to look for function decls to guide
1329 instantiation.
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
1333 functions.
1334 * error.c (ident_fndecl): Use lookup_name to look for functions.
1335 * decl2.c (lookup_name_nonclass): New function, skips over
1336 CLASS_VALUE.
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.
1345
1346 * decl.c (duplicate_decls): Check for ambiguous overloads here.
1347 (push_overloaded_decl): Instead of here.
1348
1349 * decl.c (pushdecl): Back out Chip's last change.
1350
1351 * decl.c (grok_op_properties): operators cannot be static members.
1352
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.
1356
1357 * method.c (do_inline_function_hair): Don't put friends of local
1358 classes into global scope, either.
1359
1360 * typeck2.c (build_functional_cast): Don't look for a function call
1361 interpretation.
1362
39211cd5
MS
1363Thu Apr 28 15:19:46 1994 Mike Stump (mrs@cygnus.com)
1364
1365 * cp-tree.h: disable use of backend EH.
1366
15fa00e9
DE
1367Wed Apr 27 21:01:24 1994 Doug Evans (dje@canuck.cygnus.com)
1368
1369 * Make-lang.in (c++.distdir): mkdir tmp/cp first.
1370 * Makefile.in (INCLUDES): Move definition to same place as
1371 parent makefile.
1372 (ALLOCA): Define.
1373 (OLDAR_FLAGS): Delete.
1374 (OLDCC): Define.
1375 (DIR): Delete.
1376 (CLIB): Define.
1377 (####site): Delete.
1378 (SUBDIR_USE_ALLOCA): Don't use ALLOCA if compiling with gcc.
1379
39211cd5
MS
1380Wed Apr 27 19:10:04 1994 Kung Hsu (kung@mexican.cygnus.com)
1381
1382 * decl.c (xref_tag): not to use strstr(), it's not available on
1383 all platforms.
1384
1385Wed Apr 27 18:10:12 1994 Jason Merrill (jason@deneb.cygnus.com)
1386
1387 * class.c (finish_struct): Resolve yet another class/pmf confusion.
1388
1389 * call.c (build_overload_call_real): Don't take the single-function
1390 shortcut if we're dealing with an overloaded operator.
1391
1392Wed Apr 27 17:35:37 1994 Mike Stump (mrs@cygnus.com)
1393
1394 * search.c (get_base_distance): Search the virtual base class
1395 binfos, incase someone wants to convert to a real virtual base
1396 class.
1397 * search.c (expand_indirect_vtbls_init): Use convert_pointer_to_real
1398 instead of convert_pointer_to, as it now will work.
1399
1400Wed Apr 27 15:36:49 1994 Jason Merrill (jason@deneb.cygnus.com)
1401
1402 * cvt.c (convert_to_reference): Don't complain about casting away
1403 const and volatile.
1404
1405 * typeck.c (build_unary_op): References are too lvalues.
1406
1407Wed Apr 27 13:58:05 1994 Mike Stump (mrs@cygnus.com)
1408
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
1413 ill-formed.
1414
1415Wed Apr 27 01:17:08 1994 Jason Merrill (jason@deneb.cygnus.com)
1416
1417 * parse.y (unary_expr): Expand new_placement[opt] and
1418 new_initializer[opt] inline.
1419
1420 * search.c (lookup_fnfields): Don't throw away the inheritance
1421 information here, either.
1422 (compute_access): Handle static members properly.
1423
1424 * init.c (build_member_call): Always set basetype_path, and pass it
1425 to lookup_fnfields.
1426
1427 * search.c (lookup_field): Deal properly with the case where
1428 xbasetype is a chain of binfos; don't throw away the inheritance
1429 information.
1430 (compute_access): protected_ok always starts out at 0.
1431
1432 * init.c (resolve_offset_ref): Don't cast `this' to the base type
1433 until we've got our basetype_path.
1434
1435 * cp-tree.h (IS_OVERLOAD_TYPE): aggregate or enum.
1436
1437 * cvt.c (build_up_reference): Use build_pointer_type rather than
1438 TYPE_POINTER_TO.
1439
1440 * call.c (convert_harshness_ansi): Call type_promotes_to for reals
1441 as well.
1442
1443 * cvt.c (type_promotes_to): Retain const and volatile, add
1444 float->double promotion.
1445
1446 * decl.c (grokdeclarator): Don't bash references to arrays into
1447 references to pointers in function parms. Use type_promotes_to.
1448
1449Tue Apr 26 23:44:36 1994 Mike Stump (mrs@cygnus.com)
1450
1451 Finish off Apr 19th work.
1452
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
1458 in virtual bases.
1459
1460Tue Apr 26 12:45:53 1994 Jason Merrill (jason@deneb.cygnus.com)
1461
1462 * typeck.c (build_function_call): Call build_function_call_real with
1463 LOOKUP_NORMAL.
1464
1465 * *: Don't deal with TYPE_EXPRs.
1466
1467 * tree.c (lvalue_p): If the type of the expression is a reference,
1468 it's an lvalue.
1469
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.
1474
1475 * parse.y: Simplify and fix rules for `new'.
1476
1477 * decl.c (grok_op_properties): operator void is illegal.
1478
1479Mon Apr 25 02:36:28 1994 Jason Merrill (jason@deneb.cygnus.com)
1480
1481 * parse.y (components): Anonymous bitfields can still have declspecs.
1482
1483 * decl.c (pushdecl): Postpone handling of function templates like we
1484 do C functions.
1485
1486 * search.c (expand_indirect_vtbls_init): Fix infinite loop when
1487 convert_pointer_to fails.
1488
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.
1492
1493 * cp-tree.h: Declare flag_ansi.
1494
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.
1500
1501 * tree.c (lvalue_p): A comma expression is an lvalue if its second
1502 operand is.
1503
1504 * typeck.c (default_conversion): Move code for promoting enums and
1505 ints from here.
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.
1509
15fa00e9
DE
1510Sun Apr 24 16:52:51 1994 Doug Evans (dje@canuck.cygnus.com)
1511
1512 * Make-lang.in (c++.install-common): Check for g++-cross.
1513 * Makefile.in: Remove Cygnus cruft.
1514 (config.status): Delete.
1515 (RTL_H): Define.
1516 (TREE_H): Use complete pathname, some native makes have minimal
1517 VPATH support.
1518 (*.o): Use complete pathname to headers in parent dir.
1519 (doc, info, dvi): Delete.
1520
700f8a87
MS
1521Sun Apr 24 16:52:51 1994 Doug Evans (dje@canuck.cygnus.com)
1522
1523 * Make-lang.in (c++.install-common): Check for g++-cross.
1524 * Makefile.in: Remove Cygnus cruft.
1525 (config.status): Delete.
1526 (RTL_H): Define.
1527 (TREE_H): Use complete pathname, some native makes have minimal
1528 VPATH support.
1529 (*.o): Use complete pathname to headers in parent dir.
1530 (doc, info, dvi): Delete.
1531
39211cd5
MS
1532Sun Apr 24 00:47:49 1994 Jason Merrill (jason@deneb.cygnus.com)
1533
1534 * decl.c (pushdecl): Avoid redundant warning on redeclaring function
1535 with different return type.
1536 (decls_match): Compare return types strictly.
1537
1538Fri Apr 22 12:55:42 1994 Jason Merrill (jason@deneb.cygnus.com)
1539
1540 * cvt.c (build_type_conversion): Do try to convert through other
1541 pointers. This will fail if the class defines multiple pointer
1542 conversions.
1543
1544 * error.c (dump_type_prefix): Print out pointers to arrays properly.
1545 (dump_type_suffix): Ditto. (was 'int *[]', now 'int (*)[]')
1546
1547 * typeck.c (build_unary_op): Disallow ++/-- on pointers to
1548 incomplete type.
1549
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.
1553
1554 * cvt.c (convert_to_reference): Don't force arrays to decay here.
1555
1556 * tree.c (lvalue_p): A MODIFY_EXPR is an lvalue.
1557
1558 * decl.c (duplicate_decls): Don't assume that the decls will have
1559 types.
1560
1561 Mon Apr 18 11:35:32 1994 Chip Salzenberg (chip@fin.uucp)
1562
1563 [ cp/* changes propagated from c-* changes in 940318 snapshot ]
1564 * c-decl.c (pushdecl): Warn if type mismatch with another external decl
1565 in a global scope.
1566
1567 Fri Apr 22 06:38:56 1994 Chip Salzenberg (chip@fin.uucp)
1568
1569 * cp/typeck2.c (signature_error): Use cp_error for "%T".
1570
1571 Mon Apr 18 11:59:59 1994 Chip Salzenberg (chip@fin.uucp)
1572
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.
1576
1577 Mon Apr 18 11:55:18 1994 Chip Salzenberg (chip@fin.uucp)
1578
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.
1582
1583 Mon Apr 18 11:48:49 1994 Chip Salzenberg (chip@fin.uucp)
1584
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.
1589
1590 Mon Apr 18 11:24:00 1994 Chip Salzenberg (chip@fin.uucp)
1591
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.
1595
1596 Sun Mar 6 19:43:39 1994 Chip Salzenberg (chip@fin.uucp)
1597
1598 [ cp/* changes propagated from c-* changes in 940304 snapshot ]
1599 * cp/decl.c (finish_decl): Issue warning for large objects,
1600 if requested.
1601
1602 Sat Feb 19 22:20:32 1994 Chip Salzenberg (chip@fin.uucp)
1603
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.
1607
1608 Tue Feb 8 09:49:17 1994 Chip Salzenberg (chip@fin.uucp)
1609
1610 [ cp/* changes propagated from c-* changes in 940206 snapshot ]
1611 * cp/typeck.c (signed_or_unsigned_type): Check for any
63718c49 1612 INTEGRAL_TYPE_P not just INTEGER_TYPE.
39211cd5
MS
1613
1614 Mon Dec 6 13:35:31 1993 Norbert Kiesel (norbert@i3.INformatik.rwth-aachen.DE)
1615
1616 * cp/decl.c (finish_enum): Start from 0 when determining precision
1617 for short enums.
1618
1619 Fri Dec 3 17:07:58 1993 Ralph Campbell (ralphc@pyramid.COM)
1620
1621 * cp/parse.y (unary_expr): Look at $1 for tree_code rather than
1622 casting $$.
1623
1624 Wed Nov 17 19:22:09 1993 Chip Salzenberg (chip@fin.uucp)
1625
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".
1629
1630 Wed Nov 17 19:17:18 1993 Chip Salzenberg (chip@fin.uucp)
1631
1632 * cp/call.c (convert_harshness_ansi): Given an (e.g.) char
1633 constant, prefer 'const char &' to 'int'.
1634
1635 Wed Feb 3 13:11:48 1993 Chip Salzenberg (chip@fin.uucp)
1636
1637 * cp/class.c (finish_struct_methods): Handle multiple
1638 constructors in fn_fields list.
1639
1640Fri Apr 22 12:48:10 1994 Kung Hsu (kung@mexican.cygnus.com)
1641
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
1645 mark unknown type.
1646
15fa00e9
DE
1647Fri Apr 22 03:27:26 1994 Doug Evans (dje@cygnus.com)
1648
1649 * Language directory reorganization.
1650 See parent makefile.
1651
700f8a87
MS
1652Fri Apr 22 03:27:26 1994 Doug Evans (dje@cygnus.com)
1653
1654 * Language directory reorganization.
1655 See parent makefile.
1656
39211cd5
MS
1657Thu Apr 21 18:27:57 1994 Per Bothner (bothner@kalessin.cygnus.com)
1658
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.
1667
7177d104
MS
1668Thu Apr 21 00:09:02 1994 Jason Merrill (jason@deneb.cygnus.com)
1669
1670 * lex.c (check_newline): Force interface_unknown on main input file.
1671
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
1678 types.
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
1683 DECL_LANG_FLAG_4.
1684 * class.c: Move import_export_vtable to decl2.c, and comment out all
1685 uses.
1686
1687Wed Apr 20 16:51:06 1994 Jason Merrill (jason@deneb.cygnus.com)
1688
1689 * lex.c (process_next_inline): Don't muck with DECL_INLINE.
1690 (do_pending_inlines): Ditto.
1691
1692Tue Apr 19 22:25:41 1994 Mike Stump (mrs@cygnus.com)
1693
1694 Reimplement vtable building, and most vtable pointer setting.
1695 Allows for earier maintenance, easier understandability, and most
1696 importantly, correct semantics.
1697
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
1707 work.
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):
1750 Removed.
1751
1752 * *.[chy]: Remove support for VTABLE_USES_MASK.
1753
1754Tue Apr 19 12:51:59 1994 Jason Merrill (jason@deneb.cygnus.com)
1755
1756 * cvt.c (convert_to_reference): Use NOP_EXPRs to switch between
1757 reference and pointer types instead of bashing the types directly.
1758
1759 * call.c (build_overload_call_real): Use the TREE_CODE to determine
1760 whether the function is overloaded or not, rather than
1761 TREE_OVERLOADED.
1762 * *: Remove all uses of TREE_OVERLOADED.
1763
1764 * decl.c (grokdeclarator): Only complain about initializing const
1765 fields when -ansi or -pedantic.
1766
1767Tue Apr 19 12:42:42 1994 Doug Evans (dje@canuck.cygnus.com)
1768
1769 * cp-tree.h (THUNK_DELTA): frame_size is now a union.
1770
1771Mon Apr 18 00:17:13 1994 Jason Merrill (jason@deneb.cygnus.com)
1772
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.
1780
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().
1784
1785 * search.c (current_scope): Move Brendan's comment from
1786 build_enumerator here.
1787
1788 * typeck.c (convert_for_assignment): Change warnings to pedwarns for
1789 discarding const/volatile.
1790
1791Sat Apr 16 01:18:21 1994 Jason Merrill (jason@deneb.cygnus.com)
1792
1793 * typeck.c (comp_target_parms): Accept TEMPLATE_TYPE_PARMs on the rhs.
1794 (comp_target_types): Ditto.
1795
1796 * decl.c (lookup_name): Don't unset got_scope here.
1797
1798 * spew.c (yylex): Only replace yylval with the TYPE_NESTED_NAME if
1799 got_scope != NULL_TREE.
1800
1801Fri Apr 15 16:36:33 1994 Jason Merrill (jason@deneb.cygnus.com)
1802
1803 Horrible kludge to prevent templates from being instantiated by
1804 their base classes.
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.
1808
1809 * error.c (dump_decl): If it's a typedef, print out the name of the
1810 decl, not just the underlying type.
1811
1812 * decl.c (pushdecl): If the old duplicate decl was a TYPE_DECL,
1813 update the IDENTIFIER_TYPE_VALUE of its name.
1814
1815 * decl2.c (finish_file): When processing the initializer for a
1816 static member, pretend that the dummy function is a member of the
1817 same class.
1818
1819Fri Apr 15 15:56:35 1994 Kung Hsu (kung@mexican.cygnus.com)
1820
63718c49
GB
1821 * class.c (build_vtable_entry): revert Apr 4 change.
1822 * decl2.c (mark_vtable_entries): replace pure virtual function
1823 decl with abort's.
7177d104
MS
1824
1825Fri Apr 15 13:49:33 1994 Jason Merrill (jason@deneb.cygnus.com)
1826
1827 * typeck.c (build_conditional_expr): Pedwarn on pointer/integer
1828 mismatch, and don't pedwarn on 0/function pointer mismatch.
1829
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.
1833
1834 * decl2.c (grokfield): Complain about local class method declaration
1835 without definition.
1836
1837Fri Apr 15 13:19:40 1994 Per Bothner (bothner@kalessin.cygnus.com)
1838
1839 * method.c (emit_thunk): Add extern declaration for
1840 current_call_is_indirect (needed for hppa).
1841
1842Thu Apr 14 16:12:31 1994 Jason Merrill (jason@deneb.cygnus.com)
1843
1844 Improve local class support; allow classes in different blocks to
1845 have the same name.
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
1850 pushdecl_top_level.
1851 (grokfndecl): Don't mess with IDENTIFIER_GLOBAL_VALUE for local
1852 class methods.
1853 * method.c (do_inline_function_hair): Ditto.
1854
1855 * class.c (finish_struct): It is legal for a class with no
1856 constructors to have nonstatic const and reference members.
1857
1858Thu Apr 14 07:15:11 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
1859
1860 * decl.c (push_overloaded_decl): Avoid giving errors about
1861 built-ins, since duplicate_decls will have given warnings/errors
1862 for them.
1863
1864Thu Apr 14 03:45:12 1994 Jason Merrill (jason@deneb.cygnus.com)
1865
1866 * cvt.c (convert_to_reference): Warn about casting pointer type to
1867 reference type when this is probably not what they wanted.
1868
1869Wed Apr 13 13:12:35 1994 Per Bothner (bothner@kalessin.cygnus.com)
1870
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).
1874
1875Wed Apr 13 00:22:35 1994 Jason Merrill (jason@deneb.cygnus.com)
1876
1877 * decl.c (grok_op_properties): If op new/delete get here with
1878 METHOD_TYPEs, do a revert_static_member_fn.
1879
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.
1887
1888 * parse.y (component_decl_1, fn.def2): Revert rules for
1889 constructors.
1890 (component_decl_1, fn.def2): Use $1 instead of $$, since $$ is being
1891 clobbered.
1892
1893 * decl.c (start_function): Only warn about `void main()' if pedantic
1894 || warn_return_type.
1895
1896Tue Apr 12 02:14:17 1994 Jason Merrill (jason@deneb.cygnus.com)
1897
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
1901 uninstantiated.
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.
1908
1909 * method.c (build_opfncall): Only pass one argument to global op
1910 delete.
1911
1912 * call.c (build_method_call): Use TYPE_VEC_DELETE_TAKES_SIZE to
1913 decide how many arguments to use for vec delete.
1914
1915 * decl.c (grok_op_properties): Be consistent in modifying
1916 current_class_type.
1917 (grokdeclarator): Only complain about function decls with no return
1918 type if we're being pedantic.
1919
1920Mon Apr 11 00:10:53 1994 Jason Merrill (jason@deneb.cygnus.com)
1921
1922 Add support for operator new [] and operator delete [].
1923
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
1940 build_vec_delete.
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
1944 new/delete.
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
1955 deleting.
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
1959 the size.
1960 * class.c (finish_struct_methods): Also check for overloading vec
1961 delete.
1962 * call.c (build_method_call): Also delete second argument for vec
1963 delete.
1964
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.
1970
1971 * parse.y (nested_name_specifier_1): Lose rules for dealing with
1972 syntax errors nicely, since they break parsing of 'const i;'.
1973
1974 * decl.c (lookup_name): if (got_scope == current_class_type)
1975 val = IDENTIFIER_CLASS_VALUE (name).
1976
1977 * search.c (lookup_nested_tag): Look in enclosing classes, too.
1978
1979 * spew.c (yylex): Only look one character ahead when checking for a
1980 SCOPE.
1981
1982 * lex.c (check_newline): Read first nonwhite char before
1983 incrementing lineno.
1984
1985 * decl.c (grokdeclarator): Don't claim that typedefs are variables
1986 in warning.
1987
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.
1991
1992 * class.c (push_nested_class): Don't push into non-class scope.
1993
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.
1997
1998 * pt.c (unify): Check for equality of constants better.
1999
2000 * decl.c (grokdeclarator): Don't complain about access decls.
2001
2002Sun Apr 10 02:39:55 1994 Jason Merrill (jason@deneb.cygnus.com)
2003
2004 * decl.c (grokdeclarator): pedwarn about data definitions without
2005 types here.
2006
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.
2012
2013 * search.c (lookup_field): Use cp_error.
2014
2015 * parse.y (nested_name_specifier_1): Don't check aggr/non-aggr type
2016 here; it breaks destructors for non-aggr types.
2017
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.
2021
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.
2025
2026 * parse.y: Stop calling see_typename so much.
2027
2028 * decl.c (lookup_name): Deal with TTPs and UPTs.
2029
2030 * lex.c (real_yylex): Don't set looking_for_typename just because we
2031 saw a 'new'.
2032 (dont_see_typename): #if 0 out.
2033
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.
2038
2039 * parse.y (nested_name_specifier_1): Accept TEMPLATE_TYPE_PARMs,
2040 too.
2041 (named_class_head_sans_basetype): Accept template types, too. Oops.
2042
2043Fri Apr 8 16:39:35 1994 Jason Merrill (jason@deneb.cygnus.com)
2044
2045 * decl2.c (reparse_decl_as_expr1): Handle SCOPE_REFs.
2046
2047 * parse.y: Lose START_DECLARATOR.
2048
2049 * search.c (lookup_nested_tag): New function to scan CLASSTYPE_TAGS
2050 for a class.
2051
2052 * parse.y: Simplify fn.def2 and component_decl. Support 'enum
2053 A::foo' syntax. Catch invalid scopes better.
2054
2055 * parse.y, lex.c: lose TYPENAME_COLON.
2056
2057 * decl2.c (groktypefield): #if 0 out.
2058
2059 * decl.c (lookup_name): If the type denoted by got_scope is
2060 currently being defined, look in CLASSTYPE_TAGS rather than FIELDS.
2061
2062 * class.c (push_nested_class): Don't try to push into
2063 error_mark_node.
2064
2065Fri Apr 8 07:26:36 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
2066
2067 * Makefile.in (stamp-parse): Update count of conflicts to 33.
2068
2069Thu Apr 7 17:47:53 1994 Jason Merrill (jason@deneb.cygnus.com)
2070
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.
2077
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.
2085
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
2098 function decls.
2099
2100 * gxxint.texi (Parser): Update.
2101
2102 * cp-tree.h (IS_AGGR_TYPE_CODE): Add UNINSTANTIATED_P_TYPE.
2103
2104 * lex.h: Add decl for got_scope.
2105
2106 * lex.c (see_typename): Claim to be the lexer when calling
2107 lookup_name.
2108
2109 * decl.c (lookup_name): When called from the lexer, look at
2110 got_scope and looking_at_typename; otherwise don't.
2111
2112Thu Apr 7 22:05:47 1994 Mike Stump (mrs@cygnus.com)
2113
2114 31th Cygnus<->FSF merge.
2115
2116Thu Apr 7 17:47:53 1994 Jason Merrill (jason@deneb.cygnus.com)
2117
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.
2121
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
2125 arguments.
2126
2127 * typeck.c (compparms): Also allow t1 to be ... if strict == 0.
2128
2129Thu Apr 7 16:17:50 1994 Mike Stump (mrs@cygnus.com)
2130
2131 * class.c (build_vtable_entry): Fix breakage introduced Apr 5
2132 17:48:41.
2133
2134Wed Apr 6 16:05:10 1994 Per Bothner (bothner@kalessin.cygnus.com)
2135
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.
2145
2146 * decl2.c (finish_file): Check TREE_PUBLIC||TREE_ADDRESSABLE
2147 rather than DECL_SAVED_INSNS before emitting inlines.
2148
2149Wed Apr 6 13:06:39 1994 Jason Merrill (jason@deneb.cygnus.com)
2150
2151 * spew.c (init_spew): #if 0 out stuff used by arbitrate_lookup.
2152
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).
2158
2159 * typeck.c (compparms): ... is only equivalent to non-promoting
2160 parms if we're not being strict.
2161
2162 * parse.y (empty_parms): Don't check flag_ansi || pedantic here.
2163
2164 * decl.c (init_decl_processing): if (flag_ansi || pedantic)
2165 strict_prototypes_lang_c = strict_prototypes_lang_cplusplus;
2166
2167 * decl2.c (grok_function_init): Don't set DECL_INITIAL on pure
2168 virtuals.
2169
2170Tue Apr 5 17:48:41 1994 Per Bothner (bothner@kalessin.cygnus.com)
2171
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.
2185
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,
2190
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.
2204
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.)
2209
2210Wed Apr 6 10:53:56 1994 Mike Stump (mrs@cygnus.com)
2211
2212 * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT
2213 of a fndecl, as we might not be from that vfield.
2214
2215Tue Apr 5 17:43:35 1994 Kung Hsu (kung@mexican.cygnus.com)
2216
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)
2220
2221Tue Apr 5 17:23:45 1994 Per Bothner (bothner@kalessin.cygnus.com)
2222
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.)
2226
2227Tue Apr 5 13:26:42 1994 Jason Merrill (jason@deneb.cygnus.com)
2228
2229 * parse.y (YYDEBUG): Always define.
2230 * lex.c (YYDEBUG): Ditto.
2231
2232Mon Apr 4 11:28:17 1994 Kung Hsu (kung@mexican.cygnus.com)
2233
2234 * class.c (finish_struct): backup out the change below, put the
2235 new change for the same purpose. The change below breaks code.
2236
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.
2240
2241Sat Apr 2 03:12:58 1994 Jason Merrill (jason@deneb.cygnus.com)
2242
2243 * init.c (build_new): pedwarn about newing const and volatile
2244 types.
2245
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.
2248
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.
2252
2253Fri Apr 1 17:14:42 1994 Jason Merrill (jason@deneb.cygnus.com)
2254
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.
2259
2260Thu Mar 31 19:50:35 1994 Jason Merrill (jason@deneb.cygnus.com)
2261
2262 * call.c (build_method_call): Constructors can be called for
2263 const objects.
2264
2265Thu Mar 31 16:20:16 1994 Kung Hsu (kung@mexican.cygnus.com)
2266
2267 * decl2.c (grok_func_init): do not abort as rtl for pur virtual
2268 fucntions. They can be defined somewhere else.
2269
2270Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
2271
2272 * decl.c (init_decl_processing): Declare __builtin_return_address
2273 and __builtin_frame_address for C++ as well.
2274
2275Thu Mar 31 12:35:49 1994 Mike Stump (mrs@cygnus.com)
2276
2277 * typeck2.c (store_init_value): Integral constant variables are
2278 always constant, even when doing -fpic.
2279
2280Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
2281
2282 * decl.c (redeclaration_error_message): Pass the types to
2283 comptypes.
2284
2285Wed Mar 30 21:29:25 1994 Mike Stump (mrs@cygnus.com)
2286
2287 Cures incorrect errors about pure virtuals in a class, when they
2288 have been overridden in a derived class.
2289
2290 * search.c (get_abstract_virtuals): Reimplement.
2291 * search.c (get_abstract_virtuals_1): New routine.
2292
2293Wed Mar 30 14:10:04 1994 Jason Merrill (jason@deneb.cygnus.com)
2294
2295 * pt.c (push_template_decls): Make the pushed level pseudo
2296 global.
2297
2298 * parse.y (extdefs): Don't pop everything if the current binding
2299 level is pseudo_global.
2300
2301 * decl.c (pop_everything): Stop on reaching a pseudo-global
2302 binding level.
2303
2304 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Change to more reliable test.
2305
2306 * decl.c (duplicate_decls): Only copy DECL_SOURCE_{FILE_LINE} if
2307 the old decl actually had an initializer.
2308
2309 * {various}: Clean up gcc -W complaints.
2310
2311 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Currently defined to be
2312 (DECL_CONTEXT (NODE) != NULL_TREE).
2313
2314 * parse.y (lang_extdef): Call pop_everything if necessary.
2315
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.
2320
2321Wed Mar 30 14:20:50 1994 Mike Stump (mrs@cygnus.com)
2322
2323 Cures calling a more base base class function, when a more derived
2324 base class member should be called in some MI situations.
2325
2326 * search.c (make_binfo): Use more the more specialized base
63718c49
GB
2327 binfos from the binfo given as the second argument to make_binfo,
2328 instead of the unspecialized ones from the TYPE_BINFO.
7177d104
MS
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.
2334
2335Wed Mar 30 14:10:04 1994 Jason Merrill (jason@deneb.cygnus.com)
2336
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.
2340
2341Tue Mar 29 00:54:18 1994 Jason Merrill (jason@deneb.cygnus.com)
2342
2343 * pt.c (end_template_decl): Don't call push_overloaded_decl.
2344
2345 * init.c (do_friend): Don't call push_overloaded_decl.
2346
2347 * decl.c (pushdecl): Call push_overloaded_decl for functions and
2348 function templates.
2349 (duplicate_decls): functions and function templates are not
2350 duplicates, but don't complain about calling this function to
2351 compare them.
2352 (push_overloaded_decl): Don't deal with linkage. Call
2353 duplicate_decls.
2354 (redeclaration_error_message): Deal with linkage.
2355
2356 * decl.c (start_function): If push_overloaded_decl returns an
2357 older version of the function, deal with it.
2358
2359 * decl.c (start_function): Be sure only to push_overloaded_decl
2360 for non-members.
2361
2362 * decl.c (grokfndecl): Put back clearing of DECL_CHAIN for
2363 methods.
2364 (start_function): Lose broken and redundant code for checking old
2365 decl.
2366
2367 * init.c (add_friend): Give line numbers of both friend decls
2368 when warning about re-friending.
2369
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.
2373
2374 * call.c (build_method_call): Use brendan's candidate printing
2375 routine.
2376
2377 * decl.c (start_method): Methods defined in the class body are
2378 inline whether or not it's a template class.
2379
2380Mon Mar 28 16:39:26 1994 Jason Merrill (jason@deneb.cygnus.com)
2381
2382 * parse.y (initdcl0): Add "extern" to current_declspecs if
2383 have_extern_spec && ! used_extern_spcec.
2384
2385 * tree.c (really_overloaded_fn): A fn with more than one
2386 overload.
2387
2388 * pt.c (end_template_decl): Use really_overloaded_fn.
2389
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.
2399
2400 * *.c: Stop using DECL_OVERLOADED, it being archaic.
2401 TREE_OVERLOADED should probably go, too.
2402
2403Mon Mar 28 14:00:45 1994 Ron Guilmette (rfg@netcom.com)
2404
2405 * typeck.c (comp_target_types): Call comp_target_parms with
2406 strict == 1.
2407
2408Sun Mar 27 00:07:45 1994 Jason Merrill (jason@deneb.cygnus.com)
2409
2410 * parse.y (empty_parms): Don't parse () as (...) in extern "C"
2411 sections if we're compiling with -ansi or -pedantic.
2412
2413 * decl.c (decls_match): Don't treat (int) and (int&) as matching.
2414
2415 * decl2.c (grokfield): Don't pedwarn twice about initializing
2416 field.
2417
2418 * decl.c (push_overloaded_decl): Warn about shadowing
2419 constructor.
2420 (redeclaration_error_message): Don't allow 'int a; int a;'
2421
2422 * cvt.c (build_up_reference): Only check for valid upcast if
2423 LOOKUP_PROTECT is set, not just any flag.
2424
2425Fri Mar 25 01:22:31 1994 Jason Merrill (jason@deneb.cygnus.com)
2426
2427 * lex.c (check_newline): When we see a #pragma implementation,
2428 also set it for the main input file.
2429
2430 * init.c (build_new): Convert array size argument to size_t.
2431
2432 * parse.y (primary): If we're doing a parenthesized type-id, call
2433 groktypename before passing it to build_new.
2434
2435 * call.c (build_method_call): Deal properly with const and
2436 volatile for instances of reference type.
2437
2438 * decl.c (store_return_init): Change 'if (pedantic) error' to 'if
2439 (pedantic) pedwarn'.
2440
2441 * decl.c (grokdeclarator): Don't complain about putting `static'
2442 and `inline' on template function decls.
2443
2444Thu Mar 24 23:18:19 1994 Jason Merrill (jason@deneb.cygnus.com)
2445
2446 * call.c (build_method_call): Preserve const & volatile on
2447 `this'.
2448
2449Thu Mar 24 16:21:52 1994 Mike Stump (mrs@cygnus.com)
2450
2451 * init.c (build_new, build_vec_delete): Use global new and delete
2452 for arrays.
2453 * decl2.c (delete_sanity): Ditto.
2454
2455Thu Mar 24 02:10:46 1994 Jason Merrill (jason@deneb.cygnus.com)
2456
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.
2460
2461Wed Mar 23 17:45:37 1994 Jason Merrill (jason@deneb.cygnus.com)
2462
2463 * decl.c (duplicate_decls): Also propagate DECL_TEMPLATE_MEMBERS
2464 and DECL_TEMPLATE_INSTANTIATIONS.
2465
2466 * init.c (build_new): Handle array typedefs properly.
2467
2468Wed Mar 23 18:23:33 1994 Mike Stump (mrs@cygnus.com)
2469
2470 30th Cygnus<->FSF merge.
2471
2472Wed Mar 23 00:46:24 1994 Mike Stump (mrs@cygnus.com)
2473
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.
2477
2478Wed Mar 23 00:23:59 1994 Jason Merrill (jason@deneb.cygnus.com)
2479
2480 * decl.c (duplicate_decls): If two template decls don't match,
2481 just return 0.
2482
2483Tue Mar 22 23:49:41 1994 Jason Merrill (jason@deneb.cygnus.com)
2484
2485 * typeck.c (convert_for_assignment): Don't pedwarn about
2486 converting function pointer to void *.
2487
2488Tue Mar 22 22:23:19 1994 Mike Stump (mrs@cygnus.com)
2489
2490 Major revamp of pointer to member functions. Cures major
2491 nonfunctionality when used in casts, and MI situations.
2492
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
2497 digest_init.
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
2501 into byte 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.
2508
2509Tue Mar 22 17:56:48 1994 Mike Stump (mrs@cygnus.com)
2510
2511 * search.c (get_binfo): Return NULL instead of aborting, when
2512 passed a UNION_TYPE.
2513
2514Tue Mar 22 12:44:54 1994 Jason Merrill (jason@deneb.cygnus.com)
2515
2516 These patches implement handling of redefinition/redeclaration of
2517 templates.
2518
2519 * typeck.c (comptypes): Simplify. All TEMPLATE_TYPE_PARMs are
2520 considered compatible.
2521
2522 * parse.y (template_def): Pass defn argument to end_template_decl.
2523
2524 * pt.c (end_template_decl): Add defn argument. Check for
2525 redefinition. Simplify.
2526
2527 * error.c (OB_UNPUT): New macro, to remove mistakes.
2528 (aggr_variety): Subroutine of dump_aggr_type.
2529
2530 * decl.c (decls_match): Support templates.
2531 (duplicate_decls): No longer static. Don't try to lay out template
2532 decls.
2533 (pushdecl): Simplify.
2534
2535 * cp-tree.h (DECL_TEMPLATE_MEMBERS): Use DECL_SIZE instead of
2536 DECL_INITIAL.
2537
2538Mon Mar 21 11:46:55 1994 Jason Merrill (jason@deneb.cygnus.com)
2539
2540 * error.c (dump_decl): Support class template decls.
2541 (dump_type): Don't adorn template type parms.
2542
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.
2547
2548Mon Mar 21 19:36:06 1994 Per Bothner (bothner@kalessin.cygnus.com)
2549
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.
2554
2555Mon Mar 21 11:46:55 1994 Jason Merrill (jason@deneb.cygnus.com)
2556
2557 * parse.y (after_type_declarator1): Expand type_quals.
2558 (notype_declarator1): Ditto.
2559 (absdcl1): Ditto.
2560
2561Sat Mar 19 01:05:17 1994 Jason Merrill (jason@deneb.cygnus.com)
2562
2563 * decl.c (grokdeclarator): Treat class-local typedefs like static
2564 members; i.e. 'typedef int f();' means that f is a function type,
2565 not a method type.
2566
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.
2570
2571Fri Mar 18 12:47:59 1994 Jason Merrill (jason@deneb.cygnus.com)
2572
2573 These two patches fix crashes on instantiating a template inside a
2574 function with C linkage or containing labels.
2575
2576 * class.c (current_lang_stacksize): No longer static.
2577
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.
2582
2583 * gxxint.texi (Parser): Update.
2584
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.
2588
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.
2595
2596 * spew.c (yylex): #if 0 out START_DECLARATOR insertion.
2597
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.
2602
2603 * spew.c (arbitrate_lookup): #if 0 out.
2604
2605 * decl.c (lookup_name): Never call arbitrate_lookup.
2606
2607 * parse.y (complex_notype_declarator1): Add '*'
2608 complex_notype_declarator1 and '&' complex_notype_declarator1 rules.
2609
2610 * parse.y (complex_direct_notype_declarator): Restore id_scope
2611 see_typename TYPENAME rule, remove all other rules beginning with
2612 those tokens.
2613 (notype_unqualified_id): Add '~' see_typename IDENTIFIER rule.
2614
2615Thu Mar 17 17:30:01 1994 Jason Merrill (jason@deneb.cygnus.com)
2616
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.
2620
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
2625 `int (*a)'.
2626 (primary): Use notype_unqualified_id.
2627 (decl): Add typespec initdecls ';' and typespec declarator ';'
2628 rules.
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.
2639
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?
2645
2646Thu Mar 17 12:16:10 1994 Mike Stump (mrs@cygnus.com)
2647
2648 These changes break binary compatibility in code with classes
2649 that use virtual bases.
2650
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.
2654
2655Thu Mar 17 12:01:10 1994 Jason Merrill (jason@deneb.cygnus.com)
2656
2657 * parse.y: s/ typename / type_id /g
2658
2659Wed Mar 16 17:42:52 1994 Kung Hsu (kung@mexican.cygnus.com)
2660
2661 * parse.y (typespec): add SCOPE TYPENAME for global scoped
2662 type. e.g. ::B x.
2663
2664 * decl.c (complete_array_type): fix a bug that in -pendantic
2665 mode even there's no initializer, it will continue to build
2666 default index.
2667
2668Wed Mar 16 17:43:07 1994 Jason Merrill (jason@deneb.cygnus.com)
2669
2670 * parse.y (direct_notype_declarator): Add PTYPENAME rule, remove
2671 all of the scoped PTYPENAME rules.
2672
2673Wed Mar 16 16:39:02 1994 Mike Stump (mrs@cygnus.com)
2674
2675 * init.c (build_offset_ref): The value of A::typedef_name is
2676 always the TYPE_DECL, and never an error.
2677
2678Tue Mar 15 20:02:35 1994 Jason Merrill (jason@deneb.cygnus.com)
2679
2680 * search.c (get_base_distance_recursive): Two binfos can only
2681 represent the same object if they are both via_virtual.
2682
2683 * class.c (finish_base_struct): Check vbases for ambiguity, too.
2684
2685 * search.c (get_vbase_types): Accept binfo argument, too.
2686
2687Tue Mar 15 19:22:05 1994 Kung Hsu (kung@mexican.cygnus.com)
2688
2689 * decl.c (complete_array_type): complete TYPE_DOMAIN of the
2690 initializer also, because back-end requires it.
2691
2692Tue Mar 15 15:33:31 1994 Jason Merrill (jason@deneb.cygnus.com)
2693
2694 * error.c (dump_expr): Support member functions (which show up as
2695 OFFSET_REFs).
2696
2697Mon Mar 14 16:24:36 1994 Mike Stump (mrs@cygnus.com)
2698
2699 * init.c (build_new): Set the return type of multidimensional
2700 news correctly.
2701
2702Fri Mar 11 15:35:39 1994 Kung Hsu (kung@mexican.cygnus.com)
2703
2704 * call.c (build_method_call): if basetype not equal to type
2705 of the instance, use the type of the instance in building
2706 destructor.
2707
2708Thu Mar 10 17:07:10 1994 Kung Hsu (kung@mexican.cygnus.com)
2709
2710 * parse.y (direct_notype_declarator): add push_nested_type for
2711 'template_type SCOPED_NAME' rule.
2712
2713Tue Mar 8 00:19:58 1994 Jason Merrill (jason@deneb.cygnus.com)
2714
2715 * parse.y (parm): Add typed_declspec1 {absdcl, epsilon} rules.
2716
2717Sat Mar 5 04:47:48 1994 Jason Merrill (jason@deneb.cygnus.com)
2718
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.
2727 (parmlist): Split
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.
2736
2737Fri Mar 4 18:22:39 1994 Jason Merrill (jason@deneb.cygnus.com)
2738
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".
2743
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()".
2747
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.
2756
2757Fri Mar 4 16:18:03 1994 Mike Stump (mrs@cygnus.com)
2758
2759 * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it
2760 matches Section 5.5.
2761
2762Fri Mar 4 14:01:59 1994 Jason Merrill (jason@deneb.cygnus.com)
2763
2764 * error.c (dump_type_prefix): Don't print basetype twice for
2765 pmfs.
2766
2767Fri Mar 4 13:24:33 1994 Mike Stump (mrs@cygnus.com)
2768
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 `&''.
2772
2773Fri Mar 4 11:15:59 1994 Jason Merrill (jason@deneb.cygnus.com)
2774
2775 * gxxint.texi (Copying Objects): New section discussing default
2776 op= problems with virtual inheritance.
2777
2778 * decl2.c (grokoptypename): Just does grokdeclarator and
2779 build_typename_overload, since the parser can't call grokdeclarator
2780 directly.
2781
2782 * method.c (build_typename_overload): Set IDENTIFIER_GLOBAL_VALUE
2783 and TREE_TYPE on generated identifiers.
2784
2785 * decl.c (grokdeclarator): Don't deal with TYPE_EXPRs anymore.
2786
2787 * parse.y (parm): Convert `const char *' to `__opPCc' here.
2788
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.
2792
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
2795 REFERENCE_TYPE.
2796
2797Fri Mar 4 04:46:05 1994 Mike Stump (mrs@cygnus.com)
2798
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 `&''.
2802
2803Thu Mar 3 12:38:15 1994 Jason Merrill (jason@deneb.cygnus.com)
2804
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.
2808
2809 * decl2.c (grokoptypename): Lose.
2810
2811 * decl.c (grokdeclarator): Parse TYPE_EXPRs in the initial scan,
2812 rather than waiting until later.
2813
2814Wed Mar 2 14:12:23 1994 Jason Merrill (jason@deneb.cygnus.com)
2815
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
2822 typename'.
2823 (operator_name): Use it instead of absdcl.
2824
2825 * parse.y: Add precedence declarations for SCOPED_TYPENAME,
2826 TYPEOF, and SIGOF.
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
2831 omission.
2832 (declmods): Accept nonempty_type_quals, rather than TYPE_QUAL
2833 directly.
2834
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
2838 ambiguities.
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.
2845
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.
2850
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.
2855
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.
2859
2860Wed Mar 2 14:29:18 1994 Jason Merrill (jason@cygnus.com)
2861
2862 * cvt.c (build_up_reference): If we aren't checking visibility,
2863 also allow base->derived conversions.
2864
2865Mon Feb 28 15:14:29 1994 Per Bothner (bothner@kalessin.cygnus.com)
2866
2867 * typeck.c (build_c_cast): Remove bogus hack when converting
2868 to a reference type.
2869
2870 * cp-tree.h (lang_decl::vbase_init_list, DECL_VBASE_INIT_LIST):
2871 Removed, not used.
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.
2875
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.
2884
2885Mon Feb 28 14:54:13 1994 Jason Merrill (jason@deneb.cygnus.com)
2886
2887 * parse.y (component_decl): Don't include "typed_declspecs
2888 declarator ';'" speedup, since it breaks enums.
2889
2890Fri Feb 25 15:43:44 1994 Per Bothner (bothner@kalessin.cygnus.com)
2891
2892 * class.c (finish_struct): Minor optimization for building
2893 fn_fields list.
2894
2895Fri Feb 25 15:23:42 1994 Jason Merrill (jason@deneb.cygnus.com)
2896
2897 * decl.c (start_function): Fix detection of function overloading.
2898
2899Thu Feb 24 22:26:19 1994 Mike Stump (mrs@cygnus.com)
2900
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.
2906
2907Thu Feb 24 17:09:01 1994 Jason Merrill (jason@deneb.cygnus.com)
2908
2909 * parse.y (components): Handle list of one again.
2910 (notype_components): Ditto.
2911 (after_type_declarator1): Take maybe_raises out again.
2912
2913 * gxxint.texi (Parser): Document additional r/r conflict.
2914
2915Wed Feb 23 14:42:55 1994 Jason Merrill (jason@deneb.cygnus.com)
2916
2917 * gxxint.texi (Parser): Add node.
2918
2919 * Makefile.in (stamp-parse): Update expected conflict count.
2920
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.
2932
2933 (expr): Depend on nontrivial_exprlist instead of nonnull_exprlist.
2934 (nontrivial_exprlist): New nonterminal: A list of at least two
2935 expr_no_commas's.
2936 (nonnull_exprlist): Depend on nontrival_exprlist.
2937 Eliminates four reduce/reduce conflicts.
2938
2939 (named_class_head): Move intermediate code block into separate
2940 nonterminal so that we can stick %prec EMPTY on it.
2941
2942 Add more %prec EMPTY's to eliminate remaining shift/reduce
2943 conflicts.
2944
2945 (after_type_declarator): Add maybe_raises to fndecl rules.
2946 (after_type_declarator_no_typename): Remove.
2947 For correctness.
2948
2949 Document remaining reduce/reduce conflicts.
2950
2951Tue Feb 22 12:10:32 1994 Jason Merrill (jason@deneb.cygnus.com)
2952
2953 * search.c (get_base_distance): Only bash BINFO_INHERITANCE_CHAIN
2954 (TYPE_BINFO (type)) if we care about the path.
2955
2956 * tree.c (lvalue_p): A COND_EXPR is an lvalue if both of the
2957 options are.
2958
2959Mon Feb 21 19:59:40 1994 Mike Stump (mrs@cygnus.com)
2960
2961 * Makefile.in (mostlyclean): lex.c is a source file, don't
2962 remove.
2963
2964Sat Feb 19 01:27:14 1994 Jason Merrill (jason@deneb.cygnus.com)
2965
2966 * parse.y: Eliminate 20 shift/reduce conflicts.
2967
2968Fri Feb 18 11:49:42 1994 Jason Merrill (jason@deneb.cygnus.com)
2969
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.
2976
2977 * init.c (is_aggr_typedef): Pretend template type parms are
2978 aggregates.
2979 * decl2.c (build_push_scope): If cname refers to a template type
2980 parm, just grin and nod.
2981
2982 * call.c (build_overload_call_real): Pass subr argument to
2983 type_unification.
2984 * pt.c (do_function_instantiation): Ditto.
2985 * class.c (instantiate_type): Ditto.
2986
2987 * search.c (get_base_distance): If BINFO is a binfo, use it and
2988 don't mess with its BINFO_INHERITANCE_CHAIN.
2989
2990 * cvt.c (convert_to_reference): Fix temporary generation.
2991 If ambiguous, return error_mark_node.
2992
2993 * init.c (build_new): Put back some necessary code.
2994
2995Thu Feb 17 15:39:47 1994 Jason Merrill (jason@deneb.cygnus.com)
2996
2997 * init.c (build_new): Deal with array types properly.
2998
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.
3004
3005 * parse.y (explicit_instantiation): Syntax is 'template class
3006 A<int>', not 'template A<int>'.
3007
3008 * typeck.c (convert_for_initialization): Remove bogus warning.
3009
3010 * parse.y (datadef): Revert patch of Oct 27.
3011
3012Thu Feb 17 15:12:29 1994 Per Bothner (bothner@kalessin.cygnus.com)
3013
3014 * class.c (build_vfn_ref): Cast delta field to ptrdiff_type_node,
3015 rather than integer_type_node. Does wonders for the Alpha.
3016
3017Thu Feb 17 13:36:21 1994 Jason Merrill (jason@deneb.cygnus.com)
3018
3019 * decl.c (build_ptrmemfunc_type): Make sure that the pmf type
3020 goes onto the same obstack as its target type.
3021
3022Wed Feb 16 00:34:46 1994 Jason Merrill (jason@deneb.cygnus.com)
3023
3024 * cvt.c (convert_to_reference): If converting via constructor
3025 on local level, go back to build_cplus_new approach.
3026
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
3029 for this variable.
3030
3031 * lex.c (default_assign_ref_body): Return *this from the memcpy
3032 version, too.
3033
3034 * decl.c (grok_reference_init): Just return if called with
3035 error_mark_node, don't worry about initializing non-const reference
3036 with temporary.
3037
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.
3041
3042 * class.c (finish_struct): TYPE_HAS_COMPLEX_{INIT,ASSIGN}_REF and
3043 TYPE_NEEDS_CONSTRUCTING all depend on TYPE_USES_VIRTUAL_BASECLASSES
3044 again.
3045
3046Tue Feb 15 19:47:19 1994 Jason Merrill (jason@deneb.cygnus.com)
3047
3048 * decl.c (grok_reference_init): Pawn off a lot of the work on
3049 convert_to_reference. Generally do the right thing.
3050
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.
3056
3057 * call.c (build_method_call): Set TREE_HAS_CONSTRUCTOR on
3058 constructor calls.
3059
3060Mon Feb 14 14:50:17 1994 Jason Merrill (jason@deneb.cygnus.com)
3061
3062 * decl.c (grok_reference_init): Make a temporary for initializing
3063 const reference from constant expression.
3064
3065Mon Feb 14 11:31:31 1994 Per Bothner (bothner@kalessin.cygnus.com)
3066
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).
3070
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.
3073
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.
3077
3078Sun Feb 13 19:04:56 1994 Jason Merrill (jason@deneb.cygnus.com)
3079
3080 * class.h (candidate): Add basetypes field.
3081
3082 * call.c (build_method_call): Do access checking after choosing a
3083 function, not before.
3084
3085 * Makefile.in (cvt.o, call.o, method.o): Depend on class.h.
3086 (mostlyclean): Remove ../cc1plus.
3087
3088Fri Feb 11 11:52:26 1994 Jason Merrill (jason@deneb.cygnus.com)
3089
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.
3092
3093 * error.c (dump_type_prefix): Output basetype for METHOD_TYPEs.
3094
3095hu Jan 13 17:55:51 EST 1994 Gnanasekaran Swaminathan (gs4t@virginia.edu)
3096
63718c49 3097 * cp-tree.h (DESTRUCTOR_NAME_P): do not confuse AUTO_TEMP names
7177d104
MS
3098 with destructor names when either NO_DOLLAR_IN_LABEL or
3099 NO_DOT_IN_LABEL are not defined.
3100
3101 Now `template <class T, T f(T&), const T*> class A {...}' works.
3102
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 ()
3106 function call.
3107
3108 * pt.c (tsubst): Traverse method list using DECL_CHAIN.
3109
3110 * decl.c (grok_op_properties): Allow operator++/-- to have
3111 default arguments.
3112
3113 * typeck2.c (store_init_value): Don't abort when called to
3114 initialize a type that needs constructing with a CONSTRUCTOR.
3115
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.
3119
3120Fri Feb 11 02:49:23 1994 Mike Stump (mrs@cygnus.com)
3121
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.
3126
3127Fri Feb 11 00:26:46 1994 Mike Stump (mrs@cygnus.com)
3128
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.
3133
3134Thu Feb 10 21:49:35 1994 Mike Stump (mrs@cygnus.com)
3135
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
3140 base class.
3141
3142Thu Feb 10 17:19:32 1994 Mike Stump (mrs@cygnus.com)
3143
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.
3147
3148Thu Feb 10 12:18:26 1994 Jason Merrill (jason@deneb.cygnus.com)
3149
3150 * typeck2.c (build_functional_cast): #if 0 out constructor
3151 inheritance code, improve error messages.
3152
3153 * class.c (finish_base_struct): Complain about base with only
3154 non-default constructors in derived class with no constructors.
3155
3156 * decl.c (grokdeclarator): Fix detection of virtual new/delete.
3157
3158Wed Feb 9 22:02:32 1994 Mike Stump (mrs@cygnus.com)
3159
3160 * search.c (build_mi_virtuals, add_mi_virtuals,
3161 report_ambiguous_mi_virtuals): Removed unneeded code.
3162 * class.c (finish_struct_bits): Ditto.
3163
3164Wed Feb 9 11:27:17 1994 Jason Merrill (jason@deneb.cygnus.com)
3165
3166 * pt.c (end_template_instantiation): Push decl before
3167 pop_from_top_level.
3168
3169 * typeck2.c (build_m_component_ref): Make sure datum is of
3170 aggregate type.
3171
3172 * init.c (get_type_value): New function, returns
3173 IDENTIFIER_TYPE_VALUE or IDENTIFIER_CLASS_TYPE_VALUE or NULL_TREE.
3174
3175 * call.c (build_method_call): Don't die on call to destructor for
3176 non-type.
3177
3178 * decl.c (grokdeclarator): Complain about virtual op new and op
3179 delete, make static virtuals unvirtual instead of unstatic.
3180
3181 * typeck.c (build_c_cast): Also call default_conversion on
3182 methods.
3183
3184 * decl.c (grokdeclarator): Don't complain about anonymous
3185 bitfields.
3186
3187 * parse.y (simple_stmt, for loops): Move the continue point after
3188 the cleanups.
3189
3190 * class.c (finish_struct): Fix setting of
3191 TYPE_HAS_COMPLEX_INIT_REF.
3192
3193Tue Feb 8 13:21:40 1994 Jason Merrill (jason@deneb.cygnus.com)
3194
3195 * init.c (build_new): Deal with `new double (1)'.
3196
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.
3200
3201 * decl.c (duplicate_decls): Propagate access decls.
3202
3203 * typeck2.c (process_init_constructor): Accept empty_init_node
3204 for initializing unions.
3205
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
3209 some places.
3210
3211 * decl.c (finish_decl): Don't complain about uninitialized const
3212 if it was initialized before.
3213
3214Mon Feb 7 18:12:34 1994 Jason Merrill (jason@deneb.cygnus.com)
3215
3216 * lex.c (default_assign_ref_body): Don't deal with vbases for
3217 now.
3218
3219 * decl.c (finish_decl): Fix reversed logic for objects and other
3220 things that need to be constructed but have no initializer.
3221
3222 * class.c (finish_struct): Don't set TYPE_HAS_* flags that are
3223 set by grok_op_properties or finish_decl.
3224
3225 * decl.c: Don't warn about extern redeclared inline unless
3226 -Wextern-inline is given.
3227 * decl2.c (lang_decode_option): Ditto.
3228 * cp-tree.h: Ditto.
3229
3230Mon Feb 7 17:29:24 1994 Per Bothner (bothner@kalessin.cygnus.com)
3231
3232 * decl.c (pushdecl_with_scope): Fix thinko. Add forward
3233 declaration.
3234
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.
3239
3240Mon Feb 7 14:42:03 1994 Jason Merrill (jason@deneb.cygnus.com)
3241
3242 * call.c, cvt.c, init.c, search.c, cp-tree.h:
3243 Eradicate LOOKUP_PROTECTED_OK.
3244
3245Mon Feb 7 13:57:19 1994 Per Bothner (bothner@kalessin.cygnus.com)
3246
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
3256 pushtag.
3257
3258Mon Feb 7 00:22:59 1994 Jason Merrill (jason@deneb.cygnus.com)
3259
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.
3263
3264 * cvt.c (build_up_reference): Call get_binfo with PROTECT == 1.
3265
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.
3274
3275 * method.c (build_opfncall): Do check access on operator new here.
3276
3277 * decl.c (finish_function): Don't check access on operator new
3278 here.
3279
3280Sun Feb 6 14:06:58 1994 Jason Merrill (jason@deneb.cygnus.com)
3281
3282 * decl.c (xref_tag): The base of a derived struct is NOT always
3283 public. Duh.
3284
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
3288 void_list_node.
3289 (do_pending_expansions): Look at i->interface for non-member
3290 templates.
3291
3292 * parse.y (datadef): Move explicit_instantiation here.
3293 (structsp): From here.
3294 (datadef): Complain about `int;'.
3295
3296Sun Feb 6 12:33:18 1994 Per Bothner (bothner@kalessin.cygnus.com)
3297
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
3306 simplify.
3307
3308Sun Feb 6 02:49:37 1994 Jason Merrill (jason@deneb.cygnus.com)
3309
3310 * typeck2.c (build_functional_cast): int() -> int(0).
3311
3312Sat Feb 5 00:53:21 1994 Jason Merrill (jason@deneb.cygnus.com)
3313
3314 * class.c (finish_struct): Don't do a bitwise copy for op= if the
3315 class has a virtual function table.
3316
3317 * typeck.c (convert_for_initialization): Restore warnings about
3318 not using defined op=. Should really be my_friendly_aborts, I
3319 s'pose.
3320
3321Fri Feb 4 14:21:00 1994 Jason Merrill (jason@deneb.cygnus.com)
3322
3323 * class.c (finish_struct): Tidy up conditions for doing bitwise
3324 copies of objects.
3325
3326 * decl.c (build_default_constructor): #if 0 out.
3327
3328 * *: Eradicate TYPE_GETS_{ASSIGNMENT,ASSIGN_REF,CONST_ASSIGN_REF,
3329 CONST_INIT_REF}, TYPE_HAS_REAL_CONSTRUCTOR.
3330
3331 * decl.c (grokdeclarator): Don't return void_type_node for
3332 friends being defined here.
3333
3334 * init.c (perform_member_init): Only do the init if it's useful.
3335
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.
3339
3340 * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0.
3341
3342Fri Feb 4 13:02:56 1994 Mike Stump (mrs@cygnus.com)
3343
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
3346 system header file.
3347 * pt.c (end_template_decl, instantiate_template): Ditto.
3348 * decl.c (start_decl): Ditto.
3349
3350Fri Feb 4 00:41:21 1994 Jason Merrill (jason@deneb.cygnus.com)
3351
3352 * decl.c (grokdeclarator): Don't try to set TYPE_WAS_ANONYMOUS on
3353 enums.
3354
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.
3357
3358Thu Feb 3 11:36:46 1994 Jason Merrill (jason@deneb.cygnus.com)
3359
3360 * decl.c (grokdeclarator): Don't complain about anonymous unions.
3361
3362 * cp-tree.h (TYPE_WAS_ANONYMOUS): This struct was originally
3363 anonymous, but had a name given to it by a typedef.
3364
3365 * decl.c (grokdeclarator): When renaming an anonymous struct, set
3366 TYPE_WAS_ANONYMOUS.
3367
3368 * decl2.c (constructor_name_full): Use TYPE_WAS_ANONYMOUS.
3369
3370 * cp-tree.h (DECL_UNDEFINED_FRIENDS): #if 0 out.
3371
3372 * init.c (xref_friend): Don't set up DECL_UNDEFINED_FRIENDS.
3373 (embrace_waiting_friends): Don't use DECL_UNDEFINED_FRIENDS.
3374
3375 * decl.c (grokdeclarator): Set TYPE_NESTED_NAME properly on nested
3376 anonymous structs that get typedef'd.
3377
3378 * decl.c (grokdeclarator): Always return void_type_node for
3379 friends.
3380
3381 * error.c (dump_function_decl): Don't use DECL_CLASS_CONTEXT for
3382 friends.
3383 (dump_function_decl): Don't print out default args for
3384 a function used in an expression.
3385
3386 * decl.c (grokdeclarator): Give error on abstract declarator used
3387 in an invalid context (i.e. `void (*)();').
3388
3389 * error.c (cp_line_of): Support _TYPE nodes.
3390 (cp_file_of): Ditto.
3391
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
3394 a COND_EXPR.
3395
3396 * init.c (expand_aggr_init_1): Deal with bracketed initializer
3397 lists properly.
3398
3399 * class.c (finish_struct): Deal with enumerators and typedefs
3400 again.
3401
3402Wed Feb 2 11:30:22 1994 Jason Merrill (jason@deneb.cygnus.com)
3403
3404 * class.c (finish_struct): Tidy up loop over fields.
3405
3406 * errfn.c (cp_thing): Don't advance twice after a format.
3407
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.
3411
3412 * decl.c (finish_decl): Also do the constructor thing if
3413 TYPE_NEEDS_CONSTRUCTING is set (for arrays).
3414
3415 * search.c (unuse_fields): New function: mark all fields in this
3416 type unused.
3417 (dfs_unuse_fields): Helper function.
3418
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.
3422
3423 * decl.c (grok_op_properties): Add friendp argument.
3424 (grokfndecl): Pass it.
3425 (start_method): Ditto.
3426
3427 * decl2.c (delete_sanity): Add use_global_delete parameter to catch
3428 ::delete calls.
3429
3430 * parse.y (unary_expr): Pass new parameter to delete_sanity.
3431
3432 * lex.c (default_copy_constructor_body): Don't choke if the union
3433 has no fields.
3434 (default_assign_ref_body): Ditto.
3435
3436 * call.c (compute_conversion_costs_ansi): Do the right thing for
3437 ellipsis matches.
3438
3439 * decl.c (push_to_top_level): Optimize.
3440
3441 * decl.c (start_function): Look for the lexical scope of a friend
3442 in DECL_CLASS_CONTEXT.
3443
3444 * init.c (do_friend): Set DECL_CLASS_CONTEXT on global friends.
3445
3446Tue Feb 1 15:59:24 1994 Jason Merrill (jason@deneb.cygnus.com)
3447
3448 * cp-tree.h (TREE_GETS_PLACED_NEW): New macro.
3449
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.
3453
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.
3456
3457 * cp-tree.h (ANON_UNION_P): New macro. Applies to decls.
3458
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".
3462
3463 * decl2.c (grok_x_components): Wipe out memory of synthesized methods
3464 in anonymous unions.
3465
3466 * lex.c (default_copy_constructor_body): Support unions.
3467 (default_assign_ref_body): Ditto.
3468
3469Mon Jan 31 12:07:30 1994 Jason Merrill (jason@deneb.cygnus.com)
3470
3471 * cp-tree.h: Fix documentation of LOOKUP_GLOBAL, add prototypes.
3472
3473 * error.c (args_as_string): New function (%A), like type_as_string
3474 except NULL_TREE -> "..."
3475
3476 * call.c (build_overload_call_real): Fix for new overloading.
3477
3478 * decl.c (grok_op_properties): Set all of the TYPE_OVERLOADS_* flags
3479 here.
3480
3481 * parse.y (operator_name): Instead of here.
3482
3483 * typeck2.c (build_functional_cast): Treat a TREE_LIST as a list
3484 of functions.
3485
3486 * call.c (build_overload_call_real): Support LOOKUP_SPECULATIVELY.
3487
3488 * method.c (build_opfncall): Don't need to massage return value
3489 any more, call build_overload_call with all flags.
3490
3491 * typeck.c (build_x_binary_op): Put back speculative call to
3492 build_opfncall.
3493 (build_x_unary_op): Ditto.
3494 (build_x_conditional_expr): Ditto.
3495
3496Mon Jan 31 10:00:30 1994 Mike Stump (mrs@cygnus.com)
3497
3498 * cvt.c (build_type_conversion_1): Change call to pedwarn into
3499 warning, and conditionalize upon warn_cast_qual.
3500
3501Fri Jan 28 11:48:15 1994 Jason Merrill (jason@deneb.cygnus.com)
3502
3503 * search.c (lookup_field): If xbasetype is a binfo, copy it to
3504 avoid clobbering its inheritance info.
3505
3506 * call.c (build_method_call): Don't overwrite basetype_path with
3507 TYPE_BINFO (inst_ptr_basetype) if they have the same type.
3508
3509 * search.c (compute_access): Fix handling of protected inheritance
3510 and friendship with the enclosing class.
3511
3512 * typeck2.c (store_init_value): Allow passing of TREE_CHAIN for
3513 initialization of arbitrary variable.
3514
3515 * typeck2.c (build_functional_cast): Only try calling a method if
3516 one exists.
3517
3518 * decl.c (grokdeclarator): Move handling of constructor syntax
3519 initialization into first loop for generality.
3520 (parmlist_is_random): Lose.
3521
3522 * lex.c (cons_up_default_function): Set TREE_PARMLIST on arguments
3523 to default function.
3524
3525Thu Jan 27 19:26:51 1994 Jason Merrill (jason@deneb.cygnus.com)
3526
3527 * decl.c (grokparms): Abort if we get called with something we don't
3528 expect.
3529
3530Thu Jan 27 17:37:25 1994 Mike Stump (mrs@cygnus.com)
3531
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
3538 argument.
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.
3553
3554Thu Jan 27 14:36:20 1994 Jason Merrill (jason@deneb.cygnus.com)
3555
3556 * call.c (build_method_call): Don't check for being called with
3557 a pointer.
3558
3559 * decl2.c (finish_file): Don't play with DECL_CLASS_CONTEXT for the
3560 static initializer function.
3561
3562 * init.c (build_member_call): Use convert_force here, too.
3563
3564 * search.c (compute_access): Only treat static members specially
3565 if they are referenced directly.
3566
3567Wed Jan 26 18:28:14 1994 Jason Merrill (jason@deneb.cygnus.com)
3568
3569 * gxxint.texi (Access Control): New node.
3570
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!
3577
3578 * cp-tree.h: #if 0 out DECL_PUBLIC & friends.
3579
3580 * typeck.c (build_component_ref_1): Don't check DECL_PUBLIC.
3581
3582 * call.c (build_method_call): Use convert_force to cast `this' --
3583 rely on the access checking for the method itself.
3584
3585 * init.c (is_friend): Do the nesting thing, handle types. I am
3586 my own friend.
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?
3590
3591Wed Jan 26 17:50:00 1994 Mike Stump (mrs@cygnus.com)
3592
3593 * cvt.c (build_type_conversion_1): Don't conditionalize call to
3594 pedwarn upon pedantic.
3595
3596Wed Jan 26 17:20:46 1994 Mike Stump (mrs@cygnus.com)
3597
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
3600 non-lvalue.
3601 * cvt.c (convert_to_reference): Use %P format for argument
3602 numbers in warnings.
3603
3604Wed Jan 26 14:35:06 1994 Mike Stump (mrs@cygnus.com)
3605
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.
3609
3610Wed Jan 26 11:28:14 1994 Jason Merrill (jason@deneb.cygnus.com)
3611
3612 * cp-tree.h (VTABLE_NAME_P): Change other occurrence of
3613 VTABLE_NAME_FORMAT to VTABLE_NAME.
3614
3615 * *: s/visibility/access/g
3616
3617Tue Jan 25 18:39:12 1994 Jason Merrill (jason@deneb.cygnus.com)
3618
3619 * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR.
3620
3621Tue Jan 25 13:54:29 1994 Mike Stump (mrs@cygnus.com)
3622
3623 * init.c (build_delete): Back out Jan 17th & 18th pacthes, as
3624 they break libg++.
3625
3626Tue Jan 25 13:11:45 1994 Jason Merrill (jason@deneb.cygnus.com)
3627
3628 * decl.c (duplicate_decls): Fix pointer arithmetic.
3629
3630Mon Jan 24 15:50:06 1994 Chip Salzenberg (chip@fin.uucp)
3631
3632 [ cp-* changes propagated from c-* changes in 940114 snapshot ]
3633 * cp-parse.y (maybe_attribute): Allow multiple __attribute__
3634 clauses on a declaration.
3635
3636Mon Jan 24 17:06:23 1994 Jason Merrill (jason@deneb.cygnus.com)
3637
3638 * class.c (finish_struct): Do synthesize methods for anon
3639 structs, just not unions.
3640
3641Mon Jan 24 13:50:13 1994 Kung Hsu (kung@mexican.cygnus.com)
3642
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
3646 level.
3647
3648 * parse.y : get rid of 'goto do_components'. It is much better
3649 for debugging.
3650
3651 * decl.c (is_anon_name): get rid of the function and use the
3652 macro ANON_AGGRNAME_P.
3653 * pt.c : ditto.
3654
3655Fri Jan 21 14:06:02 1994 Jason Merrill (jason@deneb.cygnus.com)
3656
3657 * class.c (finish_struct): Don't synthesize any methods for
3658 anonymous structs/unions.
3659
3660 * typeck.c (build_modify_expr): Don't treat pmf's as class objects.
3661
3662Thu Jan 20 18:56:46 1994 Jason Merrill (jason@deneb.cygnus.com)
3663
3664 * method.c (build_opfncall): Call build_indirect_ref on
3665 synthesized instance for operator delete.
3666
3667 * pt.c (type_unification): Don't abort if called with a list of
3668 types in ARGS.
3669
3670 * class.c (instantiate_type): Deal with function templates.
3671
3672Thu Jan 20 16:55:35 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
3673
3674 * Makefile.in (CC): Default to cc not gcc.
3675
3676Thu Jan 20 13:47:54 1994 Jason Merrill (jason@deneb.cygnus.com)
3677
3678 * typeck.c (build_modify_expr): Call constructor if appropriate.
3679
3680 * decl.c (push_to_top_level): Clear out class-level bindings cache.
3681
3682Wed Jan 19 13:51:22 1994 Jason Merrill (jason@deneb.cygnus.com)
3683
3684 * call.c (resolve_scope_to_name): Work recursively (previously only
3685 looked down one level).
3686
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.
3689
3690 * Makefile.in (stamp-parse): Update conflict count.
3691 (TAGS): Fix.
3692
3693 * parse.y (explicit_instantiation): New rule; implements
3694 'template A<int>' syntax (though not 'template foo(int)' yet).
3695 (structsp): Add explicit_instantiation.
3696
3697Tue Jan 18 13:53:05 1994 Jason Merrill (jason@deneb.cygnus.com)
3698
3699 * class.c (finish_struct, etc.): Simplify decision to synthesize
3700 a destructor.
3701
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.
3708
3709 * class.c (finish_base_struct): Set cant_have_default_ctor and
3710 cant_synth_copy_ctor properly.
3711 (finish_struct): Ditto.
3712
3713Mon Jan 17 13:58:18 1994 Jason Merrill (jason@deneb.cygnus.com)
3714
3715 * typeck.c (build_modify_expr_1): #if 0 out again.
3716 (build_modify_expr): #if 0 out memberwise init code again.
3717
3718 * lex.c (default_copy_constructor_body): Be const-correct.
3719 (default_assign_ref_body): Ditto.
3720
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.
3725
3726 * class.c (base_info): Lose needs_default_ctor.
3727 (finish_base_struct): Ditto.
3728 (finish_struct): Ditto.
3729
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
3733 constructor.
3734
3735 * class.c (finish_struct): Synthesize default ctor whenever
3736 allowed.
3737
3738 * Makefile.in (TAGS): Don't try to run etags on cp-parse.y.
3739
3740Sat Jan 15 18:34:33 1994 Mike Stump (mrs@cygnus.com)
3741
3742 * Makefile.in, configure: Handle the C++ front-end in a
3743 subdirectory.
3744 * cp-*: Move C++ front-end to cp/*.
3745
3746Fri Jan 14 14:09:37 1994 Jason Merrill (jason@deneb.cygnus.com)
3747
3748 * cp-typeck.c (build_function_call_real): Modify to match other
3749 instances of taking the address of the function.
3750
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.
3755
3756 * cp-tree.h (lang_type): Add has_real_constructor bitfield.
3757 (TYPE_HAS_REAL_CONSTRUCTOR): Define.
3758
3759 * cp-lex.c (default_copy_constructor_body): Use init syntax
3760 for all bases.
3761
3762 * cp-type2.c (store_init_value): Only give error for initializer list
3763 if TYPE_HAS_REAL_CONSTRUCTOR.
3764
3765Thu Jan 13 15:38:29 1994 Jason Merrill (jason@deneb.cygnus.com)
3766
3767 * cp-tree.h (DECL_SYNTHESIZED): Add defn.
3768 (lang_decl): Add synthesized bitfield to decl_flags.
3769
3770 * cp-lex.c (cons_up_default_function): Use DECL_SYNTHESIZED to mark
3771 artificial methods, rather than a line # of 0.
3772
3773Fri Jan 14 18:25:29 1994 Kung Hsu (kung@mexican.cygnus.com)
3774
3775 * cp-decl (xref_tag): fix a bug in conflict type.
3776 * cp-parse.y : add SCOPED_NAME for uninstantiated template nested
3777 type reference.
3778 * cp-spew.c (yylex) : generated SCOPED_NAME token.
3779 * cp-lex.c (yyprint): handle SCOPED_NAME.
3780
3781Fri Jan 14 17:00:29 1994 Mike Stump (mrs@cygnus.com)
3782
3783 * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is
3784 not right.
3785
3786Thu Jan 13 14:00:35 1994 Kung Hsu (kung@mexican.cygnus.com)
3787
3788 * cp-decl2.c (grok_x_components): fix a bug that enum type does not
3789 have type_flags.
3790
3791Thu Jan 13 11:39:34 1994 Mike Stump (mrs@cygnus.com)
3792
3793 Ensure that all vtable pointers are initialized with all the right
3794 values.
3795
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
3805 coding it here.
3806 * cp-init.c (init_vfields): Changed name to init_vtbl_ptrs, and
3807 re-implement.
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
3811 meaning.
3812 * cp-tree.h (init_vtbl_ptrs): Added init_vtbl_ptrs.
3813
3814Wed Jan 12 18:24:16 1994 Kung Hsu (kung@mexican.cygnus.com)
3815
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.
3820
3821Wed Jan 12 14:08:09 1994 Jason Merrill (jason@deneb.cygnus.com)
3822
3823 * cp-decl.c (grokdeclarator): Don't set TREE_PUBLIC on friend
3824 decls with a definition attached.
3825
3826 * cp-typeck.c (build_modify_expr): Undo previous change in the case
3827 of INIT_EXPRs.
3828
3829Tue Jan 11 19:33:03 1994 Jason Merrill (jason@deneb.cygnus.com)
3830
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.
3834
3835 * cp-decl.c (pushdecl): Patch bogus design of pushdecl
3836 behavior for overloaded functions (it doesn't push anything).
3837
3838 * cp-class.c (finish_struct): When generating default op=,
3839 set TYPE_HAS_ASSIGNMENT.
3840
3841Mon Jan 10 18:48:06 1994 Mike Stump (mrs@cygnus.com)
3842
3843 * cp-cvt.c (convert): Make {double, clashing enum} -> enum
3844 invalid.
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.
3849
3850Mon Jan 10 17:48:37 1994 Kung Hsu (kung@mexican.cygnus.com)
3851
3852 * cp-decl.c (finish_decl): fix incorrect popclass call.
3853
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
3859 template.
3860 * cp-call.c (build_method_call): handle uninstantiated template
3861 case.
3862 * cp-pt.c (search_nested_type_in_tmpl): new function, search nested
3863 type in template.
3864 * cp-pt.c (lookup_nested_type_by_name): new function, lookup nested
3865 type by name.
3866 * cp-pt.c (tsubst): handle nested type search by name.
3867
3868Mon Jan 10 14:32:18 1994 Jason Merrill (jason@deneb.cygnus.com)
3869
3870 * cp-init.c (build_member_call): Propagate qualifiers to new type.
3871
3872 * cp-call.c (build_method_call): Count functions the new way.
3873
3874Fri Jan 7 19:03:26 1994 Jason Merrill (jason@deneb.cygnus.com)
3875
3876 * cp-decl.c (pushtag): Set DECL_ASSEMBLER_NAME for nested classes,
3877 too.
3878
3879Tue Jan 4 16:45:51 1994 Kung Hsu (kung@cirdan.cygnus.com)
3880
3881 * cp-parse.y: change to handle whether to globalize nested class.
3882 * cp-decl.c(xref_tag, maybe_globalize_type): Ditto.
3883
3884Mon Jan 3 22:22:32 1994 Gerald Baumgartner (gb@cygnus.com)
3885
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.
3892
3893 * gcc.1 g++.1: Added explanation for the `-fhandle-signatures'
3894 and `-fno-handle-signatures' command line flags.
3895
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.
3899
3900Tue Dec 28 21:10:03 1993 Mike Stump (mrs@cygnus.com)
3901
3902 * cp-init.c (expand_vec_init): Remove comptypes test, as it is too
3903 harsh here.
3904
3905Tue Dec 28 13:42:22 1993 Mike Stump (mrs@cygnus.com)
3906
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.
3910
3911Tue Dec 28 05:42:31 1993 Mike Stump (mrs@cygnus.com)
3912
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
3915 vtable name.)
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.
3932
3933Fri Dec 24 09:40:52 1993 Michael Tiemann (tiemann@blues.cygnus.com)
3934
3935 * cp-typeck.c (c_expand_start_case): Use default_conversion to
3936 convert expression from reference type if necessary.
3937
3938Wed Dec 22 17:58:43 1993 Jason Merrill (jason@deneb.cygnus.com)
3939
3940 * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before
3941 trying to read its TREE_VALUE.
3942
3943 * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here.
3944 (finish_struct): Instead of here.
3945
3946Tue Dec 21 14:34:25 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
3947
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.
3952
3953 * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined.
3954 (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT.
3955
3956Mon Dec 20 13:35:03 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
3957
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
3962 SAVE_EXPR either.
3963
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).
3972
3973Fri Dec 17 15:45:46 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
3974
3975 * cp-decl.c (grokdeclarator): Forbid declaration of a function as
3976 static if it's being done inside another function.
3977
3978 * cp-search.c (compute_visibility): Check for friendship both ways.
3979
3980Fri Dec 17 14:28:25 1993 Jason Merrill (jason@deneb.cygnus.com)
3981
3982 * cp-cvt.c (build_default_binary_type_conversion): Make error
3983 messages more helpful.
3984
3985 * cp-error.c (op_as_string): New function, returns "operator =="
3986 given EQ_EXPR or suchlike.
3987
3988Fri Dec 17 13:28:11 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
3989
3990 * cp-call.c (print_n_candidates): New function.
3991 (build_overload_call_real): Use it when we complain about a call
3992 being ambiguous.
3993
3994Fri Dec 17 12:41:17 1993 Jason Merrill (jason@deneb.cygnus.com)
3995
3996 * cp-call.c (build_method_call): Fix checking for static call
3997 context.
3998
3999 * cp-method.c (build_opfncall): Call build_indirect_ref on argument
4000 to operator new.
4001
4002 * cp-init.c (build_new): Don't mess with rval when building
4003 indirect ref.
4004
4005Thu Dec 16 16:48:05 1993 Kung Hsu (kung@cirdan.cygnus.com)
4006
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.
4009
4010Thu Dec 16 14:46:06 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4011
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.
4019
4020Thu Dec 16 14:44:39 1993 Jason Merrill (jason@deneb.cygnus.com)
4021
4022 * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to
4023 build_method_call that I messed up before.
4024
4025 * cp-search.c (get_base_distance): If protect > 1, allow immediate
4026 private base.
4027
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.
4034
4035Thu Dec 16 12:17:06 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4036
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
4040 first place.
4041
4042 * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P
4043 to see if something is a method.
4044
4045Wed Dec 15 18:35:58 1993 Mike Stump (mrs@cygnus.com)
4046
4047 * cp-typeck.c (build_modify_expr): Avoid error messages on small
4048 enum bit fields.
4049 * cp-typeck.c (convert_for_assignment): Add missing argument to
4050 cp_warning and cp_pedwarn calls.
4051
4052Wed Dec 15 18:25:32 1993 Jason Merrill (jason@deneb.cygnus.com)
4053
4054 * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base
4055 initializers; it's just anachronistic.
4056
4057 * cp-decl.c (finish_decl): Don't require external-linkage arrays
4058 to have a complete type at declaration time when pedantic.
4059
4060Tue Dec 14 11:37:23 1993 Jason Merrill (jason@deneb.cygnus.com)
4061
4062 * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set.
4063
4064 * cp-call.c (build_method_call): Don't dereference pointer given
4065 as instance.
4066
4067 * cp-decl.c (finish_function): Don't pass pointer to
4068 build_method_call.
4069 (finish_function): Ditto.
4070
4071 * cp-typeck.c (build_x_function_call): Ditto.
4072
4073 * cp-method.c (build_component_type_expr): Ditto.
4074
4075 * cp-init.c (build_member_call): Ditto.
4076 (build_new): Ditto.
4077
4078Mon Dec 13 18:04:33 1993 Kung Hsu (kung@cirdan.cygnus.com)
4079
4080 * cp-decl.c (xref_tag): fix regression created by changes made
4081 in Dec. 7 1993.
4082 * cp-decl.c (xref_defn_tag): fix parallel nested class problem.
4083
4084Fri Dec 10 12:40:25 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4085
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.
4089
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
4092 are compatible.
4093
4094Thu Dec 9 18:27:22 1993 Mike Stump (mrs@cygnus.com)
4095
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.
4105
4106Thu Dec 9 16:19:05 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4107
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.
4111
4112Wed Dec 8 17:38:06 1993 Mike Stump (mrs@cygnus.com)
4113
4114 * cp-decl.c (finish_decl): Make sure things that can go into
4115 "common", do go into common, if -fcommon is given.
4116
4117Wed Dec 8 13:01:54 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4118
63718c49
GB
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
4122 compiler is doing.
7177d104
MS
4123
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.
4127
4128Tue Dec 7 18:29:14 1993 Kung Hsu (kung@cirdan.cygnus.com)
4129
4130 * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution
4131 problem.
4132
4133Tue Dec 7 16:09:34 1993 Jason Merrill (jason@deneb.cygnus.com)
4134
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.
4138
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.
4142
4143 * cp-tree.h: Declare flag_alt_external_templates.
4144
4145 * cp-decl2.c (lang_decode_option): Support -falt-external-templates.
4146
4147 * toplev.c (lang_options): Ditto.
4148
4149 Mon Oct 4 12:50:02 1993 Chip Salzenberg (chip@fin.uucp)
4150
63718c49
GB
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.
7177d104
MS
4164
4165Tue Dec 7 10:46:48 1993 Jason Merrill (jason@deneb.cygnus.com)
4166
4167 * cp-init.c (expand_vec_init): When creating a temporary for copying
4168 arrays, use the type of the source, not the target.
4169
4170 * cp-cvt.c (convert): Pass an argument for errtype to
4171 convert_to_reference.
4172
4173 * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with
4174 methods, -> and `this'.
4175
4176Mon Dec 6 17:12:33 1993 Jason Merrill (jason@deneb.cygnus.com)
4177
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.
4181
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.
4185
4186Mon Dec 6 11:33:35 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4187
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.
4192
4193 * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN.
4194
4195Mon Dec 6 12:49:17 1993 Jason Merrill (jason@deneb.cygnus.com)
4196
4197 * cp-init.c (get_aggr_from_typedef): New function, like
4198 is_aggr_typedef but returns the _TYPE.
4199
4200 * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name.
4201
4202Sun Dec 5 18:12:48 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4203
4204 * cp-lex.c (readescape): Pedwarn when a hex escape is out of range.
4205
4206Thu Nov 25 23:50:19 1993 Chip Salzenberg (chip@fin.uucp)
4207
4208 Delay language context change until beginning of next decl.
4209
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.
4221
4222Mon Nov 15 15:39:15 1993 Chip Salzenberg (chip@fin.uucp)
4223
4224 * cp-typeck.c (build_binary_op_nodefault): Warn for ordered
4225 compare of ptr with 0 only if pedantic in both cases.
4226
4227Thu Nov 25 13:31:37 1993 Chip Salzenberg (chip@fin.uucp)
4228
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 $$.
4232
4233Wed Nov 17 19:03:30 1993 Chip Salzenberg (chip@fin.uucp)
4234
4235 * cp-parse.y (attrib): Allow "ident(ident)" like the C front end.
4236
4237Fri Oct 22 20:43:37 1993 Paul Eggert (eggert@twinsun.com)
4238
4239 * cp-lex.c (real_yylex): Diagnose floating point constants
4240 that are too large.
4241
4242Wed Nov 17 19:10:37 1993 Chip Salzenberg (chip@fin.uucp)
4243
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.
4247
4248Wed Nov 17 19:07:18 1993 Chip Salzenberg (chip@fin.uucp)
4249
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.
4255
4256Mon Oct 11 23:10:53 1993 Chip Salzenberg (chip@fin.uucp)
4257
4258 * cp-decl.c (duplicate_decls): Note redeclarations of library
4259 functions, and generate distinct warnings for them.
4260
4261Mon Oct 4 12:26:49 1993 Chip Salzenberg (chip@fin.uucp)
4262
4263 Support format warnings in G++.
4264
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.
4274
4275Sat Jul 24 12:04:29 1993 Chip Salzenberg (chip@fin.uucp)
4276
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.
4281
4282Thu Dec 2 20:44:58 1993 Chip Salzenberg (chip@fin.uucp)
4283
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" {}'.
4289
4290Fri Dec 3 16:01:10 1993 Jason Merrill (jason@deneb.cygnus.com)
4291
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.
4295
4296Fri Dec 3 15:32:34 1993 Kung Hsu (kung@cirdan.cygnus.com)
4297
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.
4300
4301Fri Dec 3 12:28:59 1993 Jason Merrill (jason@deneb.cygnus.com)
4302
4303 * cp-lex.c (init_lex): Initialize input_filename to "<internal>" for
4304 code such as ExceptionHandler::operator=.
4305
4306Fri Dec 3 10:32:08 1993 Jason Merrill (jason@deneb.cygnus.com)
4307
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.
4311
4312 * cp-decl2.c: Default to flag_ansi_overloading.
4313
4314Thu Dec 2 18:05:56 1993 Kung Hsu (kung@cirdan.cygnus.com)
4315
4316 * cp-call.c (build_method_call): use binfo from instance if it's
4317 different from binfo (basetype_path) passed from above.
4318
4319Thu Dec 2 12:48:36 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4320
4321Wed Nov 17 19:14:29 1993 Chip Salzenberg (chip@fin.uucp)
4322
4323 cp-error.c (dump_expr): Use unsigned chars to output a
4324 TREE_REAL_CST in hex.
4325
4326Thu Dec 2 11:05:48 1993 Jason Merrill (jason@deneb.cygnus.com)
4327
4328 * cp-class.c (finish_struct): Fix typo in setting
4329 cant_synth_asn_ref.
4330
4331 * cp-tree.h (TYPE_NESTED_NAME): New macro, does
4332 DECL_NESTED_TYPENAME (TYPE_NAME (NODE)).
4333
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.
4339
4340Thu Dec 2 10:47:15 1993 Michael Tiemann (tiemann@blues.cygnus.com)
4341
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.
4345
4346Thu Dec 2 10:41:16 1993 Torbjorn Granlund (tege@cygnus.com)
4347
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.
4350
4351Wed Dec 1 13:33:34 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4352
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
4355 ansi_harshness.
4356
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.
4364
4365Wed Dec 1 09:53:59 1993 Torbjorn Granlund (tege@cygnus.com)
4366
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.
4370
4371Tue Nov 30 14:07:26 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
4372
4373 * cp-method.c (hack_identifier): If the field itself is private, and
4374 not from a private base class, say so.
4375
4376Mon Nov 29 03:00:56 1993 Jason Merrill (jason@deneb.cygnus.com)
4377
4378 * cp-decl.c (grokdeclarator): Always warn on initialization of
4379 const member.
4380
4381Wed Nov 24 00:49:35 1993 Jason Merrill (jason@deneb.cygnus.com)
4382
4383 * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly.
4384 (finish_base_struct): Set cant_synth_asn_ref properly.
4385
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.
4389
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=.
4399
4400Tue Nov 23 20:24:58 1993 Mike Stump (mrs@cygnus.com)
4401
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.
4409
4410Tue Nov 23 18:06:58 1993 Jason Merrill (jason@deneb.cygnus.com)
4411
4412 * cp-error.c (dump_expr): Do the right thing for variables of
4413 reference type.
4414
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.
4418
4419Tue Nov 23 12:26:13 1993 Mike Stump (mrs@cygnus.com)
4420
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
4424 normal names.
4425 * cp-typeck.c (build_indirect_ref): Improve wording on error
4426 message.
4427
4428Mon Nov 22 14:22:23 1993 Jason Merrill (jason@deneb.cygnus.com)
4429
4430 * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn
4431 (since it's supported in other compiler bits).
4432
4433 * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name
4434 argument.
4435
4436 * cp-error.c (dump_function_decl): Don't print return type for
4437 constructors and destructors.
4438
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.
4444
4445 * cp-decl.c (grokfndecl): Move call to grok_op_properties back
4446 after grokclassfn so that it's dealing with the right decl.
63718c49 4447 (grok_op_properties): Don't assert !methodp for op new and op delete.
7177d104
MS
4448
4449 * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now
4450 no uses of it in the compiler).
4451
4452 * cp-call.c (build_scoped_method_call): Fix for destructors of simple
4453 types.
4454 (build_method_call): Ditto.
4455
4456Fri Nov 19 12:59:38 1993 Jason Merrill (jason@deneb.cygnus.com)
4457
4458 * cp-tree.c (count_functions): Abstraction function.
4459
4460 * cp-call.c (build_overload_call_real): Deal with new overloading
4461 properly, remove dead code.
4462
4463 * gcc.c (default_compilers): Generate and use .ii files in the
4464 intermediate stage of compiling C++ source.
4465
4466Fri Nov 19 11:26:09 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
4467
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.
4470
4471Fri Nov 12 15:30:27 1993 Jason Merrill (jason@deneb.cygnus.com)
4472
4473 * cp-pt.c (tsubst): Deal with new overloading.
4474
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.
4478
4479 * cp-tree.c (decl_list_length): Deal with new overloading.
4480 (decl_value_member): Like value_member, but for DECL_CHAINs.
4481
4482 * cp-decl.c (duplicate_decls): Deal with new overloading.
4483 (start_decl): Ditto.
4484
4485 * cp-class.c (instantiate_type): Deal with new overloading.
4486
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.
4490
4491Mon Nov 8 13:50:49 1993 Jason Merrill (jason@deneb.cygnus.com)
4492
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.
4498
4499 * cp-init.c (init_init_processing): use `get_first_fn' to find
4500 the FUNCTION_DEFN for new and delete.
4501
4502 * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut
4503 code size in half (I spit on special cases).
4504
4505Tue Sep 7 20:03:33 1993 Jason Merrill (jason@deneb.cygnus.com)
4506
4507 * cp-decl.c: Allow references and template type parameters as well
4508
4509Local Variables:
4510eval: (auto-fill-mode)
4511left-margin: 8
4512fill-column: 76
4513End:
This page took 0.482022 seconds and 5 git commands to generate.